/* DANFER | ERP — capa visual, revisión local 2026-10-22.
   Se carga al final de head. Conserva IDs, clases de estado y comportamiento. */
:root {
  --dp-bg:#f3f6fb; --dp-surface:#fff; --dp-soft:#f7f9fc;
  --dp-line:#dfe6ef; --dp-ink:#172b49; --dp-muted:#526681;
  --dp-blue:#174fc4; --dp-red:#c92a42; --dp-focus:#5788ed;
  --dp-shadow:0 4px 20px rgb(23 43 73 / 4%);
}
html[data-theme="dark"] {
  --dp-bg:#0e1728; --dp-surface:#162338; --dp-soft:#1c2c44;
  --dp-line:#33465f; --dp-ink:#edf3ff; --dp-muted:#b1bfd4;
  --dp-blue:#8bb5ff; --dp-red:#ff8b9d; --dp-focus:#9cc0ff;
  --dp-shadow:0 4px 20px rgb(0 0 0 / 12%);
}
html body { font-family:"Segoe UI",Inter,Arial,sans-serif !important; }
html body #appView,
html body #appView .main-content,
html body #appView .content,
html body #appView .content-intro,
html body #appView #moduleContent {
  background:var(--dp-bg) !important; color:var(--dp-ink) !important;
}
html body #appView { --ink-900:var(--dp-ink); --ink-700:var(--dp-muted); --ink-500:var(--dp-muted); --surface:var(--dp-surface); --canvas:var(--dp-bg); --line:var(--dp-line); }
html body #appView .sidebar {
  width:260px !important; padding:20px 14px 14px !important;
  background:linear-gradient(165deg,#102c57,#081c39 80%) !important;
  border-right:1px solid #29436a !important; box-shadow:none !important;
  height:100dvh; overflow-y:auto; scrollbar-width:thin;
}
html body #appView .sidebar .brand {
  display:flex !important; flex-direction:row !important; align-items:center !important;
  justify-content:center !important; min-height:90px; padding:14px 10px !important;
  margin:0 0 22px !important; border:1px solid #344c6f !important;
  border-radius:13px !important; background:#0b2144 !important; box-shadow:none !important;
  position:relative; flex-shrink:0;
}
html body #appView .sidebar .brand::before,
html body #appView .sidebar .brand::after { content:none !important; }
html body #appView .sidebar .brand img.brand-mark {
  width:206px !important; max-width:100% !important; height:auto !important;
  max-height:none !important; object-fit:contain !important; filter:none !important;
  background:transparent !important; box-shadow:none !important;
}
html body #appView .sidebar .nav-label { color:#a7bbd9 !important; font-size:10px !important; letter-spacing:.16em !important; margin:0 14px 10px !important; }
html body #appView #mainNav { overflow:visible; flex:1 0 auto; padding:0 !important; }
html body #appView .sidebar .nav-item {
  border:1px solid transparent !important; border-radius:9px !important;
  color:#d0dcef !important; background:transparent !important;
  min-height:42px !important; font-size:12px !important; font-weight:500 !important;
  line-height:1.4; gap:11px !important; padding:9px 12px !important; margin:3px 0 !important;
  box-shadow:none !important; transform:none !important;
}
html body #appView .sidebar .nav-item > span:first-child { width:22px; min-width:22px; color:#a0b6d9 !important; font-size:17px !important; text-align:center; }
html body #appView .sidebar .nav-item:hover { background:#1c365e !important; color:white !important; }
html body #appView .sidebar .nav-item.is-active { color:white !important; background:#20477e !important; border-color:#3b6091 !important; font-weight:650 !important; }
html body #appView .sidebar .nav-item.is-active::before { background:#ef5369 !important; width:3px !important; border-radius:3px; }
html body #appView .sidebar .nav-item.is-active > span:first-child { color:#fff !important; }
html body #appView .sidebar .nav-item b { background:#c92a42 !important; color:#fff !important; border-radius:6px; min-width:20px; text-align:center; }
html body #appView .sidebar-foot { margin-top:22px !important; padding:16px 10px 0 !important; border-top:1px solid #304568 !important; flex-shrink:0; }
html body #appView .sidebar-foot small,
html body #appView .sidebar-foot p { color:#a6bad7 !important; }
html body #appView .sidebar-foot strong { color:#e8f0fc !important; font-size:11px; }
html body #appView #danferThemeToggle { width:100%; min-height:40px; border:1px solid #425a7e !important; border-radius:8px; background:#193353 !important; color:#edf4ff !important; margin-top:14px; cursor:pointer; }
html body #appView .main-content { margin-left:260px !important; min-width:0; }
html body #appView .topbar {
  min-height:82px !important; height:auto !important; padding:16px 32px !important;
  gap:18px; background:var(--dp-surface) !important; border-bottom:1px solid var(--dp-line) !important;
  box-shadow:none !important; backdrop-filter:none !important;
}
html body #appView .page-title small { color:var(--dp-muted) !important; font-size:10px !important; letter-spacing:.13em; }
html body #appView .page-title h1 { font-size:22px !important; color:var(--dp-ink) !important; font-weight:700 !important; letter-spacing:-.03em; }
html body #appView .global-search { background:var(--dp-soft) !important; border:1px solid var(--dp-line) !important; border-radius:9px; height:42px; max-width:330px; }
html body #appView .global-search input { background:transparent !important; border:0 !important; box-shadow:none !important; color:var(--dp-ink) !important; min-width:0; font-size:12px !important; }
html body #appView .global-search:has(input:disabled) { opacity:.6; }
html body #appView .notification-button,
html body #appView .user-button,
html body #appView .menu-button { background:var(--dp-soft) !important; border:1px solid var(--dp-line) !important; color:var(--dp-ink) !important; min-height:42px; border-radius:9px !important; }
html body #appView .user-button strong { color:var(--dp-ink) !important; }
html body #appView .user-button small { color:var(--dp-muted) !important; }
html body #appView #userInitials { background:#164a99 !important; color:#fff !important; }
html body #appView .content { padding:32px !important; max-width:1800px; margin-inline:auto; }
html body #appView .content-intro { align-items:flex-end; gap:20px; margin-bottom:26px !important; }
html body #appView .content-intro h2 { color:var(--dp-ink) !important; font-size:clamp(23px,2.2vw,32px) !important; letter-spacing:-.035em !important; line-height:1.2 !important; font-weight:700 !important; max-width:820px; }
html body #appView .content-intro p:not(.eyebrow) { color:var(--dp-muted) !important; font-size:13px !important; line-height:1.65; }
html body #appView .eyebrow { color:var(--dp-red) !important; font-size:10px !important; letter-spacing:.13em !important; }
html body #appView :is(.primary-button,.secondary-button,.weekly-period) { min-height:40px; border-radius:8px !important; font-size:12px !important; padding:10px 14px !important; box-shadow:none !important; transform:none !important; height:auto; }
html body #appView .primary-button { background:#174fc4 !important; border:1px solid #174fc4 !important; color:#fff !important; }
html body #appView .primary-button:hover { background:#123c98 !important; }
html body #appView :is(.secondary-button,.weekly-period) { background:var(--dp-surface) !important; color:var(--dp-ink) !important; border:1px solid var(--dp-line) !important; }
html body #appView :is(.secondary-button,.weekly-period):hover { background:var(--dp-soft) !important; border-color:var(--dp-focus) !important; }
html body #appView .text-button { color:var(--dp-blue) !important; }
html body #appView #moduleContent :is(.panel,.module-panel,.metric-card,.source-card,.budget-card) {
  background:var(--dp-surface) !important; color:var(--dp-ink) !important;
  border:1px solid var(--dp-line) !important; border-radius:13px !important;
  box-shadow:var(--dp-shadow) !important; transform:none !important; min-width:0;
}
html body #appView #moduleContent :is(h2,h3,h4,h5,strong) { color:var(--dp-ink) !important; }
html body #appView #moduleContent :is(.panel-header,.weekly-executive-header,.weekly-service-header,.module-strip) { background:transparent !important; border-color:var(--dp-line) !important; }
html body #appView #moduleContent .weekly-executive-panel { padding:24px !important; margin-bottom:22px; border-top:3px solid #174fc4 !important; }
html body #appView #moduleContent .weekly-executive-header { gap:18px; padding:0 0 22px !important; align-items:center; flex-wrap:wrap; }
html body #appView #moduleContent .weekly-executive-header p { color:var(--dp-muted) !important; font-size:10px; letter-spacing:.12em; }
html body #appView #moduleContent .weekly-executive-header h3 { font-size:23px !important; letter-spacing:-.03em; margin-top:6px; }
html body #appView #moduleContent .metric-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; gap:14px !important; margin-bottom:22px !important; }
html body #appView #moduleContent .weekly-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
html body #appView #moduleContent .metric-card { padding:20px !important; overflow:hidden; border-top:1px solid var(--dp-line) !important; min-height:145px; }
html body #appView #moduleContent .metric-card::before,
html body #appView #moduleContent .metric-card::after { content:none !important; }
html body #appView #moduleContent .metric-card > div { align-items:center; gap:10px; }
html body #appView #moduleContent .metric-card > div > span { font-size:12px !important; font-weight:600 !important; color:var(--dp-muted) !important; }
html body #appView #moduleContent .metric-card > strong { font-size:clamp(23px,2.2vw,32px) !important; font-weight:700 !important; letter-spacing:-.045em; margin:16px 0 8px !important; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
html body #appView #moduleContent .metric-card > p { color:var(--dp-muted) !important; font-size:11px !important; line-height:1.6; }
html body #appView #moduleContent .metric-card > div > b { display:grid; place-items:center; width:34px; height:34px; flex-shrink:0; border-radius:9px; color:var(--dp-blue) !important; background:var(--dp-soft) !important; box-shadow:none !important; font-size:17px; }
html body #appView #moduleContent .metric-card--alert { border-left:3px solid var(--dp-red) !important; }
html body #appView #moduleContent .metric-card--alert > div > b { color:var(--dp-red) !important; }
html body #appView #moduleContent .weekly-kpi-icon svg { width:21px; height:21px; }
html body #appView #moduleContent .dashboard-grid { gap:20px !important; }
html body #appView #moduleContent .panel-header { padding:20px 22px !important; }
html body #appView #moduleContent .panel-header h3 { font-size:17px !important; font-weight:650 !important; }
html body #appView #moduleContent :is(.table-wrap,.weekly-service-table-wrap,.kvp-table-wrap) { max-width:100%; overflow-x:auto !important; border-color:var(--dp-line) !important; border-radius:0 0 12px 12px !important; background:var(--dp-surface) !important; }
html body #appView #moduleContent table { width:100% !important; border-collapse:collapse !important; background:var(--dp-surface) !important; color:var(--dp-ink) !important; }
html body #appView #moduleContent :is(thead,th) { background:var(--dp-soft) !important; color:var(--dp-muted) !important; }
html body #appView #moduleContent th { font-size:10px !important; font-weight:700 !important; letter-spacing:.07em; padding:14px 18px !important; border-bottom:1px solid var(--dp-line) !important; }
html body #appView #moduleContent td { font-size:12px !important; padding:16px 18px !important; border-bottom:1px solid var(--dp-line) !important; background:transparent !important; color:var(--dp-ink) !important; }
html body #appView #moduleContent tbody tr { background:var(--dp-surface) !important; }
html body #appView #moduleContent tbody tr:hover { background:var(--dp-soft) !important; }
html body #appView #moduleContent td small { color:var(--dp-muted) !important; line-height:1.6; }
html body #appView #moduleContent code { color:var(--dp-blue) !important; background:var(--dp-soft) !important; border:0 !important; font-family:Consolas,monospace; font-size:11px; }
html body #appView #moduleContent .status { font-size:10px !important; padding:5px 8px !important; border-radius:6px !important; }
html body #appView #moduleContent .status--success { color:#186044 !important; background:#e4f5ed !important; }
html body #appView #moduleContent .status--warning { color:#7d4e09 !important; background:#fff2d5 !important; }
html body #appView #moduleContent .status--danger { color:#a12238 !important; background:#ffe6eb !important; }
html body #appView #moduleContent .status--neutral { color:#3c526e !important; background:#eaf0f8 !important; }
html body #appView #moduleContent :is(.priority-list li,.source-list li,.weekly-service-panel) { background:var(--dp-surface) !important; border-color:var(--dp-line) !important; }
html body #appView #moduleContent :is(.priority-list,.source-list) p { color:var(--dp-muted) !important; font-size:12px !important; line-height:1.6; }
html body #appView #moduleContent .priority-list li { padding:16px 22px !important; }
html body #appView #moduleContent .module-strip { gap:16px; flex-wrap:wrap; padding:18px 22px !important; }
html body #appView #moduleContent .module-strip span { color:var(--dp-muted) !important; }
html body #appView #moduleContent :is(.inventory-kpi,.purchase-kpis article,.weekly-cost-panel,.weekly-analytics-panel,.weekly-v4-chart) {
  background:var(--dp-surface) !important; color:var(--dp-ink) !important;
  border:1px solid var(--dp-line) !important; border-radius:12px !important; box-shadow:var(--dp-shadow) !important;
}
html body #appView #moduleContent :is(.inventory-kpi,.purchase-kpis article) { padding:20px !important; }
html body #appView #moduleContent :is(.inventory-kpi,.purchase-kpis article) :is(span,small) { color:var(--dp-muted) !important; }
html body #appView #moduleContent :is(.weekly-cost-header,.weekly-analytics-header,.weekly-analytics-tabs,.weekly-analytics-quality) { background:var(--dp-soft) !important; color:var(--dp-ink) !important; border-color:var(--dp-line) !important; }
html body #appView #moduleContent :is(.weekly-cost-header,.weekly-analytics-header) :is(p,span,small) { color:var(--dp-muted) !important; }
html body #appView #moduleContent .weekly-analytics-tabs { display:flex; flex-wrap:wrap; gap:6px; padding:12px !important; }
html body #appView #moduleContent .weekly-analytics-tabs button { color:var(--dp-muted) !important; background:transparent !important; border:1px solid transparent !important; border-radius:7px; min-height:40px; padding:8px 12px; }
html body #appView #moduleContent .weekly-analytics-tabs button.is-active { color:var(--dp-blue) !important; background:var(--dp-surface) !important; border-color:var(--dp-line) !important; }
html body #appView #moduleContent :is(.weekly-cost-label,.weekly-cost-value,.weekly-cost-legend,.weekly-service-help,.weekly-service-header p) { color:var(--dp-muted) !important; }
html body #appView #moduleContent .weekly-service-header > span { color:var(--dp-muted) !important; background:var(--dp-soft) !important; }
html body #appView #moduleContent .budget-ring > div { background:var(--dp-surface) !important; }
html body #appView #moduleContent .budget-ring span { color:var(--dp-muted) !important; }
html body #appView #moduleContent :is(.loading,.empty-state) { color:var(--dp-muted) !important; }
html body #appView :is(input,select,textarea) { background:var(--dp-surface) !important; color:var(--dp-ink) !important; border-color:var(--dp-line) !important; border-radius:8px; }
html body #appView :is(button,a,input,select,textarea):focus-visible,
html body dialog :is(button,a,input,select,textarea):focus-visible { outline:3px solid var(--dp-focus) !important; outline-offset:3px !important; }
html body #appView button:disabled { cursor:not-allowed !important; opacity:.5; }
html body dialog.modal { max-width:calc(100vw - 24px); border:1px solid var(--dp-line) !important; border-radius:16px !important; color:var(--dp-ink) !important; background:var(--dp-surface) !important; }
html body dialog.modal::backdrop { background:rgb(8 22 44 / 60%); backdrop-filter:blur(3px); }
/* Acceso: se conservan el mapa, el formulario y sus validaciones originales. */
html body #loginView.login-shell { background:#0b1b34 !important; grid-template-columns:minmax(360px,.9fr) minmax(0,1.2fr); }
html body #loginView .login-card { padding:clamp(28px,5vw,76px) !important; background:linear-gradient(160deg,#122c50,#0a1930) !important; }
html body #loginView .login-brand img.brand-mark { width:330px !important; max-width:100% !important; filter:none !important; }
html body #loginView .login-copy h1 { color:#f4f8ff !important; font-size:clamp(30px,3vw,44px) !important; }
html body #loginView .login-copy p:not(.eyebrow) { color:#bbcae0 !important; }
html body #loginView .login-copy .eyebrow { color:#ff8b9d !important; }
html body #loginView .login-form label { color:#e1e9f7 !important; }
html body #loginView .login-form input { color:#fff !important; background:#193251 !important; border-color:#476181 !important; }
html body #loginView .login-form .primary-button { color:white !important; background:#2463d2 !important; border-color:#5087e9 !important; min-height:50px; }
html body #loginView .login-foot { color:#a4b8d5 !important; line-height:1.7; }
html body #loginView .login-form input:focus-visible { outline:3px solid #9cc0ff !important; outline-offset:3px; }
@media(min-width:1600px) { html body #appView #moduleContent .weekly-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)) !important; } }
@media(max-width:1200px) {
  html body #appView .content { padding:24px !important; }
  html body #appView .topbar { padding:14px 24px !important; gap:10px; }
  html body #appView #moduleContent .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  html body #appView .global-search { max-width:230px; }
}
@media(max-width:1050px) {
  html body #appView .sidebar { transform:translateX(-105%); z-index:100; }
  html body #appView .sidebar.is-open { transform:translateX(0); }
  html body #appView .main-content { margin-left:0 !important; }
  html body #appView :is(.sidebar-close,.menu-button) { display:inline-flex !important; align-items:center; justify-content:center; }
  html body #appView .sidebar-close { position:absolute; right:0; top:-12px; color:white !important; background:#233e65; border-radius:6px; width:30px; height:30px; font-size:24px; }
  html body #appView .overlay { z-index:90; }
}
@media(max-width:700px) {
  html body #appView .content { padding:22px 16px !important; }
  html body #appView .topbar { padding:12px 16px !important; min-height:72px !important; flex-wrap:wrap; }
  html body #appView .page-title { flex:1; }
  html body #appView .page-title h1 { font-size:20px !important; }
  html body #appView .global-search { order:5; width:100%; max-width:none; margin:0; }
  html body #appView .global-search:has(input:disabled) { display:none; }
  html body #appView .user-button { padding:4px !important; }
  html body #appView .user-button > div { display:none; }
  html body #appView .content-intro { flex-direction:column; align-items:stretch; gap:14px; }
  html body #appView .module-actions { justify-content:flex-start; flex-wrap:wrap; }
  html body #appView #moduleContent .dashboard-grid { grid-template-columns:minmax(0,1fr) !important; }
  html body #appView #moduleContent .weekly-executive-panel { padding:16px !important; }
  html body #appView #moduleContent .weekly-executive-header { align-items:flex-start; }
  html body #appView #moduleContent .metric-card { padding:16px !important; min-height:140px; }
  html body #appView #moduleContent .metric-card > strong { font-size:26px !important; }
  html body #appView #moduleContent .panel-header { gap:10px; flex-wrap:wrap; padding:18px !important; }
  html body #appView #moduleContent .weekly-service-header { gap:12px; flex-wrap:wrap; }
  html body #loginView.login-shell { grid-template-columns:minmax(0,1fr) !important; }
  html body #loginView .login-card { min-height:100dvh; padding:40px 26px !important; }
  html body #loginView .login-side { display:none !important; }
}
@media(max-width:480px) {
  html body #appView #moduleContent .metric-grid { grid-template-columns:minmax(0,1fr) !important; }
  html body #appView #moduleContent .metric-card { min-height:125px; }
  html body #appView #moduleContent .weekly-executive-header h3 { font-size:21px !important; }
}
@media(prefers-reduced-motion:reduce) {
  html body #appView *, html body #loginView * { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}

/* Segunda composición: navegación clara, portada azul y columnas de trabajo. */
:root { --dp-bg:#eef1f5; --dp-line:#dbe1e8; --dp-ink:#152943; --dp-muted:#52657b; }
html body #appView .sidebar {
  width:238px !important; background:#fff !important; border-right:1px solid #dbe1e8 !important;
  padding:16px 12px !important;
}
html body #appView .sidebar .brand { background:#102a50 !important; border:0 !important; min-height:78px; border-radius:10px !important; margin-bottom:18px !important; }
html body #appView .sidebar .brand img.brand-mark { width:190px !important; }
html body #appView .sidebar > .nav-label { display:none; }
html body #appView .danfer-nav-group { margin-bottom:18px; }
html body #appView .danfer-nav-heading { color:#6d7e92 !important; font-size:9px; letter-spacing:.14em; font-weight:750; text-transform:uppercase; margin:0 12px 8px; }
html body #appView .sidebar .nav-item { color:#43556c !important; min-height:37px !important; padding:8px 11px !important; margin:2px 0 !important; border-radius:6px !important; font-size:11px !important; }
html body #appView .sidebar .nav-item > span:first-child { color:#6c809a !important; font-size:16px !important; }
html body #appView .sidebar .nav-item:hover { background:#eef3fb !important; color:#123f83 !important; }
html body #appView .sidebar .nav-item.is-active { color:#a92139 !important; background:#fff0f2 !important; border-color:#f4d2d9 !important; font-weight:750 !important; }
html body #appView .sidebar .nav-item.is-active > span:first-child { color:#be2941 !important; }
html body #appView .sidebar .nav-item.is-active::before { background:#c92a42 !important; }
html body #appView .sidebar-foot { border-color:#dbe1e8 !important; }
html body #appView .sidebar-foot strong { color:#263e59 !important; }
html body #appView .sidebar-foot :is(small,p) { color:#66788d !important; }
html body #appView #danferThemeToggle { background:#f1f5fa !important; color:#284564 !important; border-color:#dbe1e8 !important; }
html body #appView .main-content { margin-left:238px !important; }
html body #appView .topbar { min-height:68px !important; padding:12px 30px !important; }
html body #appView .page-title h1 { font-size:18px !important; }
html body #appView .content { padding:26px 30px !important; max-width:1920px; }
html body #appView .content-intro {
  background:linear-gradient(115deg,#0d2345,#184a83) !important;
  border:0 !important; border-radius:15px; padding:30px 32px !important; margin-bottom:22px !important;
  min-height:174px; align-items:center; position:relative; overflow:hidden;
}
html body #appView .content-intro::after { content:""; position:absolute; width:320px; height:320px; right:-130px; top:-130px; border:1px solid #52779e; border-radius:50%; box-shadow:0 0 0 38px rgb(109 152 198 / 7%),0 0 0 76px rgb(109 152 198 / 5%); pointer-events:none; }
html body #appView .content-intro > div { position:relative; z-index:1; }
html body #appView .content-intro h2 { color:#fff !important; font-size:clamp(28px,2.8vw,42px) !important; font-weight:650 !important; letter-spacing:-.045em !important; }
html body #appView .content-intro .eyebrow { color:#ffa5b2 !important; margin-bottom:13px; }
html body #appView .content-intro p:not(.eyebrow) { color:#c6d8ec !important; font-size:12px !important; }
html body #appView .content-intro :is(.secondary-button,.primary-button) { background:#fff !important; color:#15395f !important; border-color:#fff !important; white-space:nowrap; }
html body #appView #moduleContent .danfer-dashboard-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:20px; align-items:start; }
html body #appView #moduleContent .danfer-overview-grid { grid-column:1/-1; margin:0 !important; gap:1px !important; background:var(--dp-line); border:1px solid var(--dp-line); border-radius:12px; overflow:hidden; }
html body #appView #moduleContent .danfer-overview-grid .metric-card { border:0 !important; border-radius:0 !important; box-shadow:none !important; padding:18px 20px !important; min-height:120px; }
html body #appView #moduleContent .danfer-overview-grid .metric-card > strong { font-size:27px !important; margin:8px 0 4px !important; }
html body #appView #moduleContent .danfer-overview-grid .metric-card > div > b { width:26px; height:26px; font-size:15px; background:transparent !important; }
html body #appView #moduleContent .danfer-overview-grid .metric-card > p { margin:0 !important; font-size:10px !important; }
html body #appView #moduleContent .weekly-dashboard-shell { min-width:0; margin:0 !important; padding:0 !important; }
html body #appView #moduleContent .weekly-executive-panel { padding:22px !important; margin:0 !important; border-top:0 !important; }
html body #appView #moduleContent .weekly-executive-header { align-items:flex-start; padding-bottom:18px !important; gap:12px; }
html body #appView #moduleContent .weekly-executive-header h3 { font-size:21px !important; }
html body #appView #moduleContent .weekly-executive-header > div:last-child { justify-content:flex-start !important; }
html body #appView #moduleContent .weekly-period { min-height:32px; padding:7px 10px !important; font-size:10px !important; }
html body #appView #moduleContent .weekly-analytics-panel { border:0 !important; box-shadow:none !important; padding:0 !important; }
html body #appView #moduleContent .weekly-analytics-header { background:transparent !important; padding:16px 0 !important; border-top:1px solid var(--dp-line); }
html body #appView #moduleContent .weekly-analytics-header h4 { font-size:16px !important; }
html body #appView #moduleContent .weekly-cost-panel { border:0 !important; box-shadow:none !important; padding:16px 0 !important; }
html body #appView #moduleContent .weekly-cost-header { background:transparent !important; }
html body #appView #moduleContent .weekly-cost-total { background:#123b6a !important; color:white !important; border-radius:10px; }
html body #appView #moduleContent .weekly-cost-total :is(strong,small) { color:#fff !important; }
html body #appView #moduleContent .danfer-section-heading { border-top:1px solid var(--dp-line); margin:24px 0 16px; padding-top:22px; }
html body #appView #moduleContent .danfer-section-heading p { color:var(--dp-red); font-size:9px; letter-spacing:.14em; font-weight:700; margin:0 0 6px; }
html body #appView #moduleContent .danfer-section-heading h4 { font-size:18px; margin:0; }
html body #appView #moduleContent .weekly-kpi-grid { gap:10px !important; }
html body #appView #moduleContent .weekly-kpi-card { min-height:122px !important; background:var(--dp-soft) !important; box-shadow:none !important; padding:14px !important; }
html body #appView #moduleContent .weekly-kpi-card > strong { font-size:23px !important; margin-top:10px !important; }
html body #appView #moduleContent .weekly-kpi-card > div > span { font-size:10px !important; }
html body #appView #moduleContent .weekly-kpi-card > p { font-size:10px !important; }
html body #appView #moduleContent .danfer-dashboard-secondary { display:flex !important; flex-direction:column; gap:16px !important; min-width:0; }
html body #appView #moduleContent .danfer-dashboard-secondary > article { width:100%; margin:0 !important; }
html body #appView #moduleContent .danfer-dashboard-secondary .budget-card { order:-1; }
html body #appView #moduleContent .danfer-dashboard-secondary .panel-header { padding:18px !important; }
html body #appView #moduleContent .danfer-dashboard-secondary .panel-header h3 { font-size:16px !important; }
html body #appView #moduleContent .danfer-dashboard-secondary .priority-list li { padding:14px 18px !important; }
html[data-theme="dark"] body #appView .sidebar { background:#142339 !important; border-color:#34465f !important; }
html[data-theme="dark"] body #appView .sidebar .nav-item { color:#ccdaec !important; }
html[data-theme="dark"] body #appView .sidebar .nav-item.is-active { color:#ffb8c4 !important; background:#4d2939 !important; border-color:#774356 !important; }
html[data-theme="dark"] body #appView .danfer-nav-heading { color:#a5b7ce !important; }
html[data-theme="dark"] body #appView .sidebar-foot strong { color:#dce8f9 !important; }
@media(max-width:1250px) {
 html body #appView #moduleContent .danfer-dashboard-layout { grid-template-columns:minmax(0,1fr); }
 html body #appView #moduleContent .danfer-dashboard-secondary { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); }
 html body #appView #moduleContent .danfer-overview-grid { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
}
@media(max-width:1050px) { html body #appView .main-content { margin-left:0 !important; } }
@media(max-width:700px) {
 html body #appView .content { padding:16px !important; }
 html body #appView .topbar { padding:12px 16px !important; }
 html body #appView .content-intro { padding:24px !important; align-items:flex-start; min-height:190px; }
 html body #appView .content-intro h2 { font-size:30px !important; }
 html body #appView #moduleContent .danfer-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
 html body #appView #moduleContent .danfer-overview-grid .metric-card { padding:14px !important; min-height:142px; }
 html body #appView #moduleContent .danfer-overview-grid .metric-card > strong { font-size:24px !important; }
 html body #appView #moduleContent .danfer-dashboard-secondary { display:flex !important; }
 html body #appView #moduleContent .weekly-executive-panel { padding:16px !important; }
 html body #appView #moduleContent .weekly-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
}
@media(max-width:360px) { html body #appView #moduleContent .danfer-overview-grid, html body #appView #moduleContent .weekly-kpi-grid { grid-template-columns:minmax(0,1fr) !important; } }

/* Paleta elegida: azul profundo, superficies azules y acentos DANFER rojos.
   La composición aprobada permanece intacta. */
html[data-theme="dark"] {
  color-scheme:dark;
  --dp-bg:#081525; --dp-surface:#102844; --dp-soft:#153252;
  --dp-line:#2c496b; --dp-ink:#edf4ff; --dp-muted:#b0c4df;
  --dp-blue:#8ebdff; --dp-red:#ff8297; --dp-focus:#9ec5ff;
  --df-bg:var(--dp-bg); --df-panel:var(--dp-surface); --df-panel-2:var(--dp-soft);
  --df-panel-3:#1a3b61; --df-head:#17375b; --df-border:var(--dp-line);
  --df-border-2:#496a91; --df-text:var(--dp-ink); --df-text-2:#d1e0f4; --df-muted:var(--dp-muted);
}
html[data-theme="dark"] body #appView .sidebar { background:#0b1e35 !important; border-color:#294565 !important; }
html[data-theme="dark"] body #appView .sidebar .brand { background:#102a4a !important; border:1px solid #2c496b !important; }
html[data-theme="dark"] body #appView .sidebar .nav-item { color:#bacee8 !important; }
html[data-theme="dark"] body #appView .sidebar .nav-item > span:first-child { color:#8eaccf !important; }
html[data-theme="dark"] body #appView .sidebar .nav-item:hover { background:#193c63 !important; color:#fff !important; }
html[data-theme="dark"] body #appView .sidebar .nav-item.is-active { background:#214d7c !important; border-color:#3b6491 !important; color:#fff !important; }
html[data-theme="dark"] body #appView .sidebar .nav-item.is-active > span:first-child { color:#ff9aad !important; }
html[data-theme="dark"] body #appView .sidebar .nav-item.is-active::before { background:#f04e6b !important; }
html[data-theme="dark"] body #appView .danfer-nav-heading { color:#8facce !important; }
html[data-theme="dark"] body #appView .sidebar-foot { border-color:#2c496b !important; }
html[data-theme="dark"] body #appView .sidebar-foot :is(small,p) { color:#a6bcda !important; }
html[data-theme="dark"] body #appView #danferThemeToggle { background:#153252 !important; color:#dceaff !important; border-color:#3b5c82 !important; }
html[data-theme="dark"] body #appView .topbar { background:#0e223b !important; border-color:#2c496b !important; }
html[data-theme="dark"] body #appView .content-intro { background:linear-gradient(115deg,#14375f,#1c4f86) !important; border-left:3px solid #ee4c69 !important; }
html[data-theme="dark"] body #appView .content-intro :is(.secondary-button,.primary-button),
html[data-theme="dark"] body #appView .primary-button { background:#bd2846 !important; border-color:#e25a74 !important; color:white !important; }
html[data-theme="dark"] body #appView .primary-button:hover { background:#a51e3a !important; }
html[data-theme="dark"] body #appView #moduleContent :is(.panel,.metric-card,.weekly-executive-panel,.weekly-analytics-panel,.weekly-cost-panel,.inventory-kpi,.purchase-kpis article) { background:var(--dp-surface) !important; color:var(--dp-ink) !important; border-color:var(--dp-line) !important; }
html[data-theme="dark"] body #appView #moduleContent :is(.panel-header,.weekly-executive-header,.weekly-analytics-header,.weekly-cost-header,.weekly-service-header) { background:transparent !important; border-color:var(--dp-line) !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-kpi-card { background:#153252 !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-total { background:#204d7d !important; border:1px solid #3b6794; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-total :is(strong,small) { color:#fff !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-analytics-tabs,
html[data-theme="dark"] body #appView #moduleContent .weekly-analytics-quality { background:#0d213a !important; border-color:#2c496b !important; color:#b0c4df !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-analytics-tabs button.is-active { background:#244f7b !important; border-color:#3b6491 !important; color:#fff !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-analytics-quality span { background:#163655 !important; border-color:#36577c !important; color:#c9dcf6 !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-analytics-quality .has-warning { background:#452639 !important; border-color:#815064 !important; color:#ffc0cb !important; }
html[data-theme="dark"] body #appView #moduleContent :is(thead,th) { background:#17375b !important; color:#c8dcf5 !important; }
html[data-theme="dark"] body #appView #moduleContent tbody tr { background:#102844 !important; }
html[data-theme="dark"] body #appView #moduleContent tbody tr:hover { background:#193a60 !important; }
html[data-theme="dark"] body #appView #moduleContent td { color:#e4efff !important; border-color:#2c496b !important; }
html[data-theme="dark"] body #appView #moduleContent .budget-ring { background:conic-gradient(#ed4967 var(--used),#234363 0) !important; }
html[data-theme="dark"] body #appView #moduleContent .budget-ring > div { background:#102844 !important; }
html[data-theme="dark"] body #appView #moduleContent .budget-ring::before { background:#102844 !important; }
html[data-theme="dark"] body #appView #moduleContent .budget-card dt { color:#b0c4df !important; }
html[data-theme="dark"] body #appView #moduleContent .budget-card dd { color:#edf4ff !important; }
html[data-theme="dark"] body #appView #moduleContent .priority-list li > span { background:#3b273d !important; color:#ff9db0 !important; }
html[data-theme="dark"] body #appView #moduleContent .metric-card--alert > div > b { color:#ff8297 !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-value { color:#d9e8fc !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-legend span { color:#b0c4df !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-segment--fuel { background:#438bd8 !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-segment--maintenance { background:#ee5b78 !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-segment--purchase { background:#79aadb !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-legend span:nth-child(2) i { background:#ee5b78 !important; }
html[data-theme="dark"] body #appView #moduleContent .weekly-cost-legend span:nth-child(3) i { background:#79aadb !important; }
