:root {
  --m24-ink: #042f2e;
  --m24-teal: #0f766e;
  --m24-lime: #14b8a6;
  --m24-ok: #16a34a;
  --m24-down: #dc2626;
  --m24-bg: #f4f7f6;
}
body { font-family: system-ui, sans-serif; background: var(--m24-bg); color: #0f172a; }
.m24-brand { font-weight: 800; letter-spacing: -0.03em; text-decoration: none; color: var(--m24-ink); font-size: 1.4rem; }
.m24-brand span { color: var(--m24-lime); }
.m24-nav { background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 20; }
.m24-nav a { color: #334155; text-decoration: none; font-size: 0.95rem; }
.btn-m24,
a.btn-m24,
.m24-nav a.btn-m24 {
  background: var(--m24-teal);
  color: #fff;
  border: 0;
}
.btn-m24:hover,
.btn-m24:focus,
.btn-m24:visited,
a.btn-m24:hover,
a.btn-m24:focus,
a.btn-m24:visited,
.m24-nav a.btn-m24:hover,
.m24-nav a.btn-m24:focus,
.m24-nav a.btn-m24:visited {
  background: #0d5c56;
  color: #fff;
}
.m24-hero { background: linear-gradient(160deg, #042f2e, #0f766e); color: #fff; padding: 5rem 0 4rem; }
.m24-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
.m24-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.35rem 1.4rem;
  height: auto;
  box-shadow: 0 8px 24px rgba(4, 47, 46, .04);
}
.m24-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.m24-dot.ok { background: var(--m24-ok); }
.m24-dot.error { background: var(--m24-down); }
.m24-dot.desconocido, .m24-dot.pausado { background: #94a3b8; }
.m24-shell { display: flex; align-items: stretch; min-height: 100vh; }
.m24-sidebar { width: 230px; background: var(--m24-ink); color: #fff; padding: 1.25rem .75rem; flex-shrink: 0; }
.m24-sidebar .m24-brand,
.m24-sidebar .m24-brand:hover { color: #fff; font-size: 1.15rem; }
.m24-sidebar .m24-brand span { color: var(--m24-lime); }
.m24-sidebar a { display: block; color: rgba(255,255,255,.8); text-decoration: none; padding: .45rem .75rem; border-radius: 6px; }
.m24-sidebar a:hover, .m24-sidebar a.active { background: rgba(255,255,255,.1); color: #fff; }
.m24-sidebar a i { display: inline-block; width: 1.25rem; margin-right: .4rem; }
.m24-main { flex: 1; background: #f4f6f8; padding: 0; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.m24-main-body { flex: 1 0 auto; padding: 1.5rem; }
.footer-clinica { flex-shrink: 0; padding: 1rem 1.5rem; background: #fff; position: relative; z-index: 1; }
.m24-footer { background: #fff; border-top: 1px solid #e2e8f0; margin-top: 3rem; color: #64748b; }
.tp-panel-card, .m24-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1.25rem; }
.btn-tp { background: var(--m24-teal); color: #fff; border: 0; }
.btn-tp:hover { background: #0d5c56; color: #fff; }
.m24-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem 1.15rem; }
.m24-stat .n { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.m24-stat .l { color: #64748b; font-size: .85rem; margin-top: .35rem; }
.m24-price { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 1.6rem; height: 100%; }
.m24-price.featured { border-color: var(--m24-teal); box-shadow: 0 10px 30px rgba(15,118,110,.12); }
.m24-list { list-style: none; padding: 0; margin: 0; }
.m24-list li { padding: .45rem 0; border-bottom: 1px solid #f1f5f9; display: flex; gap: .6rem; align-items: center; }
.m24-footer h5 { font-size: .95rem; margin-bottom: .6rem; }
.m24-footer a { color: #334155; text-decoration: none; }
.m24-cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1080;
  background: #fff; border-top: 2px solid var(--m24-teal);
  box-shadow: 0 -8px 24px rgba(0,0,0,.12); padding: 1rem 0;
}
.m24-cookie-modal {
  position: fixed; inset: 0; z-index: 1090; background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.m24-cookie-modal-box {
  background: #fff; max-width: 420px; width: 100%; padding: 1.25rem; border-radius: 12px;
}
.sa-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.sa-tab {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.05rem; border-radius: 999px;
  border: 1px solid #e2e8f0; background: #fff; color: #334155;
  text-decoration: none; font-weight: 600; font-size: .9rem;
}
.sa-tab:hover { background: #f8fafc; color: #0f172a; }
.sa-tab.is-active { background: var(--m24-teal); border-color: var(--m24-teal); color: #fff; }
.sa-hub {
  display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 1.1rem 1.2rem; text-decoration: none; color: inherit; height: 100%;
}
.sa-hub:hover { border-color: var(--m24-teal); box-shadow: 0 8px 20px rgba(15,118,110,.08); }
.sa-hub strong { display: block; margin-bottom: .25rem; }
.sa-hub span { display: block; color: #64748b; font-size: .875rem; }
.sa-plan-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1.25rem 1.4rem;
}
.sa-plan-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.sa-plan-code { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: #64748b; margin-bottom: .35rem; }
.sa-usos { background: #f8fafc; border-radius: 10px; padding: .9rem 1rem; }
.sa-usos-title { display: block; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: .5rem; }
.sa-usos .form-check { display: inline-flex; align-items: center; gap: .4rem; margin-right: 1rem; margin-bottom: .35rem; }
.sa-sticky-save { position: sticky; bottom: 0; background: var(--m24-bg); padding: 1rem 0; border-top: 1px solid #e2e8f0; margin-top: 1rem; z-index: 2; }

.m24-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.m24-row-actions form { display: inline; }
.m24-row-off td { color: #64748b; }
.m24-row-off a { color: #475569; }
.m24-plan-pick {
  border: 1px solid #e2e8f0; border-radius: 12px; padding: .9rem 1rem; height: 100%; background: #f8fafc;
}
.m24-plan-pick.is-current { background: #ecfdf5; border-color: #86efac; }
.m24-plan-pick.is-upgrade { border-color: var(--m24-teal); box-shadow: 0 0 0 1px var(--m24-teal); background: #fff; }
.m24-form-lead { max-width: 720px; margin-bottom: .85rem; }
.m24-form-lead p { color: #64748b; font-size: .92rem; }
.m24-form-monitor { max-width: 720px; padding: 1rem 1.15rem 1.1rem; }
.m24-form-monitor .form-label { font-size: .8rem; font-weight: 650; margin-bottom: .2rem; color: #0f172a; }
.m24-form-monitor .form-text { font-size: .72rem; color: #64748b; margin-top: .15rem; line-height: 1.35; }
.m24-form-monitor .form-control,
.m24-form-monitor .form-select { font-size: .9rem; padding: .38rem .6rem; }
.m24-form-sec { margin-bottom: .95rem; }
.m24-form-sec > h2 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .07em;
  color: #64748b; font-weight: 700; margin-bottom: .45rem;
}
.m24-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.m24-type-card {
  display: flex; gap: .7rem; align-items: flex-start; margin: 0;
  border: 1px solid #e2e8f0; border-radius: 12px; padding: .7rem .8rem;
  cursor: pointer; background: #f8fafc; min-height: 0;
}
.m24-type-card:hover { border-color: #cbd5e1; }
.m24-type-card:has(input:checked) {
  border-color: var(--m24-teal); background: #ecfdf8;
  box-shadow: 0 0 0 1px var(--m24-teal);
}
.m24-type-card input { margin-top: .2rem; flex-shrink: 0; }
.m24-type-card i { color: var(--m24-teal); margin-right: .2rem; }
.m24-type-card strong { display: block; font-size: .9rem; }
.m24-type-card small { display: block; color: #64748b; font-size: .75rem; line-height: 1.3; }
.m24-mail-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.m24-mail-chip {
  display: inline-flex; align-items: center; gap: .45rem; margin: 0;
  border: 1px solid #e2e8f0; border-radius: 999px; padding: .28rem .7rem .28rem .5rem;
  background: #f8fafc; font-size: .8rem; cursor: pointer; max-width: 100%;
}
.m24-mail-chip input { margin: 0; }
.m24-mail-chip strong { display: block; font-size: .8rem; line-height: 1.15; }
.m24-mail-chip small { display: block; color: #64748b; font-size: .68rem; }
.m24-mail-chip:has(input:checked) { background: #ecfdf8; border-color: #99f6e4; }
.m24-check { display: flex; align-items: flex-start; gap: .5rem; margin: 0; font-size: .85rem; }
.m24-check .form-check-input { margin-top: .2rem; }
.m24-check small { display: block; color: #64748b; font-size: .72rem; }
.m24-adv {
  border: 1px dashed #dbe3ea; border-radius: 10px; padding: .5rem .8rem .7rem;
  background: #fbfdfe; margin-bottom: .9rem;
}
.m24-adv summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: #334155; }
.m24-form-actions { display: flex; align-items: center; gap: .35rem; }
@media (max-width: 640px) {
  .m24-type-grid { grid-template-columns: 1fr; }
}

.mk-estado { font-weight: 600; min-width: 8.2rem; }
.mk-estado-nuevo, .mk-estado-new { background: #cfe2ff; color: #084298; border-color: #9ec5fe; }
.mk-estado-contactado, .mk-estado-contacted { background: #d1e7dd; color: #0f5132; border-color: #75b798; }
.mk-estado-descartado, .mk-estado-closed { background: #e2e3e5; color: #41464b; border-color: #c6c7c8; }
.mk-estado-calificado { background: #fff3cd; color: #664d03; border-color: #ffecb5; }
.mk-estado-cliente { background: #e0cffc; color: #432874; border-color: #c5b3e6; }

.mk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.mk-cal-day { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; min-height: 10rem; padding: .55rem; }
.mk-cal-day.is-today { border-color: #0d6efd; box-shadow: 0 0 0 1px #0d6efd; }
.mk-cal-day.is-weekend { background: #f8fafb; }
.mk-cal-head { display: flex; justify-content: space-between; gap: .25rem; margin-bottom: .4rem; font-size: .85rem; }
.mk-cal-ev { font-size: .75rem; border-radius: 6px; padding: .25rem .4rem; margin-bottom: .3rem; line-height: 1.3; }
.mk-cal-ev a { color: inherit; font-weight: 600; }
.mk-cal-ev.is-hecho { opacity: .62; }
.mk-cal-ev-llamada { background: #cfe2ff; color: #084298; }
.mk-cal-ev-email { background: #d1e7dd; color: #0f5132; }
.mk-cal-ev-comentario { background: #fff3cd; color: #664d03; }
.mk-cal-ev-reunion { background: #e0cffc; color: #432874; }
.mk-cal-ev-planificado { background: #f8d7da; color: #842029; }
@media (max-width: 991px) { .mk-cal { grid-template-columns: 1fr 1fr; } }
.mk-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.mk-month-dow { text-align: center; font-size: .75rem; font-weight: 700; color: #64748b; padding: .2rem 0; }
.mk-month-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05rem; min-height: 3.4rem; padding: .35rem .15rem; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; color: inherit; text-decoration: none; }
.mk-month-day.is-out { opacity: .38; }
.mk-month-day.is-today { box-shadow: 0 0 0 2px #0d6efd; }
.mk-month-day.has-ev { font-weight: 700; cursor: pointer; }
.mk-month-day.has-ev-llamada { background: #cfe2ff; color: #084298; border-color: #9ec5fe; }
.mk-month-day.has-ev-email { background: #d1e7dd; color: #0f5132; border-color: #75b798; }
.mk-month-day.has-ev-comentario { background: #fff3cd; color: #664d03; border-color: #ffecb5; }
.mk-month-day.has-ev-reunion { background: #e0cffc; color: #432874; border-color: #c5b3e6; }
.mk-month-day.has-ev-planificado { background: #f8d7da; color: #842029; border-color: #f1aeb5; }
.mk-month-day.has-ev-mix { background: #cff4fc; color: #055160; border-color: #9eeaf9; }
.mk-month-day.is-sel { outline: 2px solid #0d6efd; outline-offset: 1px; }
.mk-month-day.has-ev:hover { filter: brightness(.96); }
.mk-month-num { font-size: 1rem; line-height: 1.1; }
.mk-month-count { font-size: .7rem; opacity: .85; }
.mk-tabla { font-size: .75rem; }
.mk-tabla td, .mk-tabla th { padding: .28rem .4rem; }
.mk-tabla .btn { font-size: .7rem; padding: .1rem .35rem; }
.mk-tabla .form-select { font-size: .72rem; padding: .15rem .35rem; min-height: 1.7rem; }
.mk-tabla .badge { font-size: .65rem; }
.mk-wysiwyg { border: 1px solid #dee2e6; border-radius: .375rem; background: #fff; }
.mk-wysiwyg-bar { display: flex; flex-wrap: wrap; gap: .2rem; padding: .25rem .4rem; border-bottom: 1px solid #e9ecef; background: #f8fafc; }
.mk-wysiwyg-bar button { border: 1px solid #dee2e6; background: #fff; border-radius: .25rem; font-size: .75rem; padding: .1rem .4rem; line-height: 1.2; }
.mk-wysiwyg-ed { min-height: 8rem; padding: .5rem .6rem; font-size: .875rem; outline: none; }
.mk-preview-body { border: 1px solid #e9ecef; border-radius: .375rem; padding: .75rem; min-height: 6rem; background: #fff; font-size: .875rem; }

@media (max-width: 800px) {
  .m24-shell { flex-direction: column; }
  .m24-sidebar { width: 100%; }
}
