/* Mavillum - tema comun. Claro conserva el diseno de cada modulo; Oscuro usa la paleta premium. */
html[data-mv-theme-resolved="light"]{color-scheme:light}
html[data-mv-theme-resolved="dark"]{
  color-scheme:dark;
  --mv-bg-deep:#090d0b;
  --mv-bg:#0d1411;
  --mv-surface-1:#121b17;
  --mv-surface-2:#17231d;
  --mv-surface-3:#1d2b24;
  --mv-control:#223229;
  --mv-hover:#2a3d32;
  --mv-border:#33483d;
  --mv-border-strong:#456052;
  --mv-text:#edf6f0;
  --mv-muted:#a9bbb0;
  --mv-green:#7fbea3;
  --mv-green-soft:#233a2f;
  --mv-warm:#d9a071;
  --mv-warm-soft:#3b2a20;
  --mv-danger:#eaa0a1;
  --mv-shadow:0 26px 70px rgba(0,0,0,.32);
  --mv-shadow-soft:0 14px 38px rgba(0,0,0,.23);
  background:var(--mv-bg-deep);
}
html[data-mv-theme-resolved="dark"] body{
  background:
    radial-gradient(circle at 88% -8%,rgba(217,160,113,.075),transparent 34rem),
    radial-gradient(circle at -8% 106%,rgba(127,190,163,.075),transparent 38rem),
    linear-gradient(145deg,#090d0b 0,#0d1411 50%,#12100e 100%)!important;
  background-attachment:fixed!important;
  color:var(--mv-text);
}

/* Contactos */
html[data-mv-theme-resolved="dark"] body.ct-dark{
  --ct-ink:var(--mv-text);--ct-muted:var(--mv-muted);--ct-line:var(--mv-border);
  --ct-paper:var(--mv-surface-2);--ct-soft:var(--mv-surface-3);--ct-shadow:var(--mv-shadow-soft);
}
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-hero{
  background:linear-gradient(125deg,#101913 0,#193026 58%,#342b22 100%)!important;
  border-color:var(--mv-border)!important;
  box-shadow:0 16px 44px rgba(0,0,0,.22)!important;
}
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-side,
html[data-mv-theme-resolved="dark"] body.ct-dark .metric,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-toolbar,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-card,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-panel,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-back,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-savebar,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-drawer-card,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-action-sheet-card{
  background:linear-gradient(155deg,var(--mv-surface-2),var(--mv-surface-1))!important;
  border-color:var(--mv-border)!important;color:var(--mv-text)!important;
  box-shadow:var(--mv-shadow-soft)!important;
}
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-card-top{
  background:linear-gradient(145deg,#22342b,#17221d)!important;
}
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-input,
html[data-mv-theme-resolved="dark"] body.ct-dark input,
html[data-mv-theme-resolved="dark"] body.ct-dark select,
html[data-mv-theme-resolved="dark"] body.ct-dark textarea{
  background:#0f1713!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"] body.ct-dark .scope-link:hover,
html[data-mv-theme-resolved="dark"] body.ct-dark .scope-link.active,
html[data-mv-theme-resolved="dark"] body.ct-dark .viewbtn,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-q,
html[data-mv-theme-resolved="dark"] body.ct-dark .mini-btn{
  background:var(--mv-control)!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"] body.ct-dark .scope-link:hover,
html[data-mv-theme-resolved="dark"] body.ct-dark .viewbtn:hover,
html[data-mv-theme-resolved="dark"] body.ct-dark .ct-q:hover{background:var(--mv-hover)!important}

/* Gestion */
html[data-mv-theme-resolved="dark"] .shell{
  background:linear-gradient(150deg,#151e19 0,#101713 52%,#181411 100%)!important;
  border-color:#2c3d34!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.025),0 30px 90px rgba(0,0,0,.38)!important;
}
html[data-mv-theme-resolved="dark"] .top{
  background:linear-gradient(90deg,rgba(27,45,35,.94),rgba(18,27,22,.96) 50%,rgba(48,34,25,.90))!important;
  border-color:var(--mv-border)!important;
}
html[data-mv-theme-resolved="dark"] .actions a,
html[data-mv-theme-resolved="dark"] .actions .gh-theme-toggle,
html[data-mv-theme-resolved="dark"] .agenda-control{
  background:var(--mv-control)!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"] .actions a:hover,
html[data-mv-theme-resolved="dark"] .actions .gh-theme-toggle:hover,
html[data-mv-theme-resolved="dark"] .agenda-control:hover{background:var(--mv-hover)!important}
html[data-mv-theme-resolved="dark"] .agenda{
  background:linear-gradient(145deg,#1a2620,#121b17)!important;border-color:var(--mv-border)!important;box-shadow:var(--mv-shadow-soft)!important;
}
html[data-mv-theme-resolved="dark"] .event,
html[data-mv-theme-resolved="dark"] .empty{
  background:#18241e!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"] .card{
  background:linear-gradient(155deg,#1d2a23,#151e19)!important;border-color:var(--mv-border)!important;
  box-shadow:0 16px 38px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
html[data-mv-theme-resolved="dark"] .card:hover{background:linear-gradient(155deg,#223129,#18231d)!important;border-color:var(--mv-border-strong)!important}

/* Agenda */
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"]{
  --ink:var(--mv-text);--muted:var(--mv-muted);--line:var(--mv-border);--paper:var(--mv-surface-2);--wash:var(--mv-surface-1);
  --agenda-ink:var(--mv-text);--agenda-line:var(--mv-border);--agenda-surface:var(--mv-surface-2);--agenda-bg:var(--mv-bg);--agenda-text:var(--mv-text);--agenda-muted:var(--mv-muted);--agenda-accent-soft:var(--mv-green-soft);
}
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-top{
  background:linear-gradient(120deg,#11231b 0,#1b3b2d 58%,#493625 100%)!important;box-shadow:0 18px 48px rgba(0,0,0,.30)!important;
}
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-side,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-toolbar,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .agenda-toolbar-sticky,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-canvas,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .modal,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-quick-select-menu,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .sm-search-select-list,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .sm-search-select-panel{
  background:var(--mv-surface-2)!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .day-cell,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .list-event,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .mini-month,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .week-head{
  background:var(--mv-surface-1)!important;border-color:#2a3b32!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .day-cell.out{background:#0b110e!important;color:#65766c!important}
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .day-cell.today{background:linear-gradient(180deg,#203a2c,#121b17 52%)!important;box-shadow:inset 0 0 0 1.5px #5e9d73!important}
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-toolbtn,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .agenda-responsive-selects select,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .view-select,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-quick-select-button,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .field input,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .field select,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .field textarea{
  background:var(--mv-control)!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-toolbtn:hover,
html[data-mv-theme-resolved="dark"][data-ag-theme="dark"] .ag-quick-select-option:hover{background:var(--mv-hover)!important}

/* Salud */
html[data-mv-theme-resolved="dark"] body.salud-dark{
  --salud-card:var(--mv-surface-2);--salud-card-soft:var(--mv-surface-1);--salud-text:var(--mv-text);--salud-muted:var(--mv-muted);--salud-line:var(--mv-border);
}
html[data-mv-theme-resolved="dark"] .salud-top{
  background:rgba(13,20,17,.92)!important;border-color:var(--mv-border)!important;box-shadow:0 12px 34px rgba(0,0,0,.18)!important;
}
html[data-mv-theme-resolved="dark"] .salud-dark .panel,
html[data-mv-theme-resolved="dark"] .salud-dark .person-card,
html[data-mv-theme-resolved="dark"] .salud-dark .quick-grid a,
html[data-mv-theme-resolved="dark"] .salud-dark .record-card,
html[data-mv-theme-resolved="dark"] .salud-dark .timeline-item,
html[data-mv-theme-resolved="dark"] .salud-dark .section-nav a,
html[data-mv-theme-resolved="dark"] .salud-dark .health-kpis a,
html[data-mv-theme-resolved="dark"] .salud-dark .alert-item,
html[data-mv-theme-resolved="dark"] .salud-dark .health-library-stats a,
html[data-mv-theme-resolved="dark"] .salud-dark .appointment-list-card,
html[data-mv-theme-resolved="dark"] .salud-dark .privacy-check{
  background:linear-gradient(155deg,var(--mv-surface-2),var(--mv-surface-1))!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;box-shadow:var(--mv-shadow-soft)!important;
}
html[data-mv-theme-resolved="dark"] .salud-dark input,
html[data-mv-theme-resolved="dark"] .salud-dark select,
html[data-mv-theme-resolved="dark"] .salud-dark textarea{
  background:#0f1713!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"] .salud-dark .salud-day,
html[data-mv-theme-resolved="dark"] .salud-dark .salud-filter-pill,
html[data-mv-theme-resolved="dark"] .salud-dark .duration-shortcuts button{
  background:var(--mv-surface-2)!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}

/* Cocina */
html[data-mv-theme-resolved="dark"]{
  --c-bg:var(--mv-bg);--c-surface:var(--mv-surface-2);--c-surface-soft:var(--mv-surface-1);--c-soft:var(--mv-surface-3);
  --c-text:var(--mv-text);--c-muted:var(--mv-muted);--c-border:var(--mv-border);--c-primary:#82c6ad;--c-primary-strong:#a7dac7;--c-primary-soft:var(--mv-green-soft);--c-accent:var(--mv-warm);--c-accent-soft:var(--mv-warm-soft);--c-shadow:var(--mv-shadow);--c-shadow-soft:var(--mv-shadow-soft);
}
html[data-mv-theme-resolved="dark"] .c-header{background:rgba(14,21,18,.94)!important;border-color:var(--mv-border)!important;box-shadow:0 10px 32px rgba(0,0,0,.16)!important}
html[data-mv-theme-resolved="dark"] .c-footer,
html[data-mv-theme-resolved="dark"] .c-nav.is-open,
html[data-mv-theme-resolved="dark"] .c-menu-toggle,
html[data-mv-theme-resolved="dark"] .c-theme-toggle,
html[data-mv-theme-resolved="dark"] .c-hero__copy,
html[data-mv-theme-resolved="dark"] .c-toolbar,
html[data-mv-theme-resolved="dark"] .c-form__section,
html[data-mv-theme-resolved="dark"] .c-rich,
html[data-mv-theme-resolved="dark"] .c-table-wrap,
html[data-mv-theme-resolved="dark"] .c-article,
html[data-mv-theme-resolved="dark"] .c-kpi,
html[data-mv-theme-resolved="dark"] .c-module-card,
html[data-mv-theme-resolved="dark"] .c-recipe-card,
html[data-mv-theme-resolved="dark"] .c-recipe-row-modern,
html[data-mv-theme-resolved="dark"] .c-dialog{
  background:linear-gradient(155deg,var(--mv-surface-2),var(--mv-surface-1))!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;box-shadow:var(--mv-shadow-soft)!important;
}
html[data-mv-theme-resolved="dark"] .c-input,
html[data-mv-theme-resolved="dark"] .c-select,
html[data-mv-theme-resolved="dark"] .c-textarea,
html[data-mv-theme-resolved="dark"] .c-filter-panel-v6__search,
html[data-mv-theme-resolved="dark"] .c-filter-panel-v6__filters select{
  background:#0f1713!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important;
}
html[data-mv-theme-resolved="dark"] .c-btn--secondary,
html[data-mv-theme-resolved="dark"] .c-alpha,
html[data-mv-theme-resolved="dark"] .c-step__number{background:var(--mv-control)!important;border-color:var(--mv-border)!important;color:var(--mv-text)!important}
html[data-mv-theme-resolved="dark"] .c-btn--secondary:hover,
html[data-mv-theme-resolved="dark"] .c-alpha:hover{background:var(--mv-hover)!important}

@media print{
  html[data-mv-theme-resolved="dark"] body{background:#fff!important;color:#111!important}
}
