/* ══════════════════════════════════════
   SISCO-ROV · styles.css
   DVS Tecnología 2025
══════════════════════════════════════ */

:root {
  --bg:        #f0f4f8;
  --surface:   #ffffff;
  --navy:      #0f1e3d;
  --blue:      #1e3a8a;
  --accent:    #3b82f6;
  --accent-lt: #60a5fa;
  --green:     #059669;
  --green-lt:  #d1fae5;
  --rose:      #dc2626;
  --rose-lt:   #fef2f2;
  --amber:     #d97706;
  --amber-lt:  #fffbeb;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-700:  #374151;
  --gray-900:  #111827;
  --text:      #1f2937;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
  --font-body:    'DM Sans', -apple-system, sans-serif;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;
  --radius:    8px;
  --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow: hidden; /* login cubre toda la pantalla al inicio */
}

/* ══════════════ LOGIN ══════════════ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 70% 50% at 15% 85%, rgba(59,130,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 15%, rgba(15,30,61,0.15) 0%, transparent 60%),
    linear-gradient(160deg, #e8f0fe 0%, #f0f4f8 50%, #e8f4f0 100%);
  overflow: hidden;
}

.login-bg-glow {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.08) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-wrap { text-align: center; width: 100%; max-width: 420px; position: relative; }

.login-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem 1rem;
  background: rgba(30,58,138,.08);
  border: 1px solid rgba(30,58,138,.18);
  border-radius: 99px;
  font-family: var(--font-mono); font-size: .62rem;
  color: var(--blue); letter-spacing: .2em;
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.login-card {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(15,30,61,.12), 0 4px 16px rgba(0,0,0,.06);
  overflow: hidden;
  animation: slideUp .45s cubic-bezier(.16,1,.3,1) both;
}
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }

.login-card-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background: linear-gradient(160deg, var(--gray-50) 0%, var(--surface) 100%);
}
.login-icon-wrap {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  margin-bottom: 1rem;
  box-shadow: 0 8px 20px rgba(30,58,138,.25);
}
.login-logo { width: 44px; height: 44px; object-fit: contain; }
.login-icon-fallback {
  display: none; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem;
}
.login-card-header h1 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.login-card-header p  { font-size: .83rem; color: var(--muted); margin-top: .25rem; }

.login-card-body { padding: 1.75rem 2rem 2rem; }

.login-alert {
  display: none; align-items: center; gap: .6rem;
  padding: .7rem 1rem;
  background: var(--rose-lt); border: 1px solid rgba(220,38,38,.25);
  border-radius: var(--radius); font-size: .82rem; color: #b91c1c;
  margin-bottom: 1rem;
}
.login-alert.show { display: flex; animation: shake .4s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-5px)} 40%,80%{transform:translateX(5px)} }

.login-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.lf { margin-bottom: .85rem; }
.lf label {
  display: block; font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--gray-700); margin-bottom: .35rem;
}
.lf input {
  width: 100%; padding: .7rem .9rem;
  background: var(--gray-50); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font-body); font-size: .9rem;
  transition: border-color .2s, box-shadow .2s, background .2s; outline: none;
}
.lf input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.lf input.err  { border-color: var(--rose); background: var(--rose-lt); }
.lf-hint { font-family: var(--font-mono); font-size: .62rem; color: var(--muted); margin-top: .3rem; }

.login-btn {
  width: 100%; padding: .8rem;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  border: none; border-radius: var(--radius); color: #fff;
  font-family: var(--font-body); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: opacity .2s, transform .1s;
  box-shadow: 0 4px 12px rgba(30,58,138,.25);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: .25rem;
}
.login-btn:hover { opacity: .9; }
.login-btn:active { transform: scale(.98); }
.login-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.login-spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.login-btn.loading .login-spinner { display: block; }
@keyframes spin { to{transform:rotate(360deg)} }

.login-card-footer {
  padding: .9rem 2rem; border-top: 1px solid var(--border);
  text-align: center; font-size: .7rem; color: var(--muted);
}

/* ══════════════ APP LAYOUT ══════════════ */
.form-container { display: none; max-width: 1280px; margin: 0 auto; width: 100%; }

/* Header */
.header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy);
  padding: 1rem 1.75rem;
  border-bottom: 2px solid var(--accent);
  position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.company-logo-header { height: 36px; width: auto; }
.header-brand h1 {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 900;
  color: #fff; letter-spacing: .05em; line-height: 1;
}
.header-sub { font-family: var(--font-mono); font-size: .55rem; color: rgba(255,255,255,.4); letter-spacing: .2em; display: block; margin-top: .15rem; }
.header-right { display: flex; align-items: center; gap: .75rem; }
.header-operator { font-size: .78rem; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: .4rem; }
.header-operator i { color: var(--accent-lt); }
.header-clock { font-family: var(--font-mono); font-size: .8rem; color: var(--accent-lt); background: rgba(255,255,255,.06); padding: .35rem .8rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.1); }
.logout-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.7); padding: .35rem .9rem; border-radius: 6px;
  font-family: var(--font-body); font-size: .78rem; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; gap: .4rem;
}
.logout-btn:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.4); }

.sheet-link-btn {
  background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.4);
  color: #6ee7b7; padding: .35rem .9rem; border-radius: 6px;
  font-family: var(--font-body); font-size: .78rem; font-weight: 600;
  text-decoration: none; transition: all .2s;
  display: flex; align-items: center; gap: .4rem;
}
.sheet-link-btn:hover { background: rgba(16,185,129,.3); color: #fff; border-color: rgba(16,185,129,.7); }

/* Tabs */
.tabs {
  display: flex; background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 62px; z-index: 90;
  box-shadow: var(--shadow);
}
.tab {
  flex: 1; padding: .85rem 1rem;
  text-align: center; background: var(--gray-100);
  color: var(--muted); font-family: var(--font-body); font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
  border-right: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  position: relative; user-select: none;
}
.tab:last-child { border-right: none; }
.tab:hover:not(.disabled) { background: var(--gray-200); color: var(--gray-900); }
.tab.active { background: var(--surface); color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: 600; }
.tab.completed { background: var(--green-lt); color: var(--green); border-bottom: 2px solid var(--green); font-weight: 600; }
.tab.disabled { background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; opacity: .6; pointer-events: none; }
.tab-check { display: none; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; font-size: .6rem; align-items: center; justify-content: center; margin-left: .25rem; }
.tab.completed .tab-check { display: inline-flex; }

/* Form content area */
.form-content { padding: 1.5rem 1.75rem; background: var(--bg); }

.general-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.section-label {
  font-family: var(--font-display); font-size: .95rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--navy);
  display: flex; align-items: center; gap: .4rem;
  margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}
.section-label i { color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Form grid */
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem; margin-bottom: 1rem;
}
.fg { display: flex; flex-direction: column; gap: .3rem; }
.fg.full { grid-column: 1/-1; }

label {
  font-size: .72rem; font-weight: 600;
  color: var(--gray-700); text-transform: uppercase; letter-spacing: .06em;
  display: flex; align-items: center; gap: .35rem;
}
label i { color: var(--accent); font-size: .65rem; }

input, select, textarea {
  width: 100%; padding: .65rem .9rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .88rem; font-family: var(--font-body);
  background: var(--gray-50); color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}
input[readonly] { background: var(--gray-100); color: var(--muted); cursor: default; }
textarea { resize: vertical; min-height: 76px; }
select { cursor: pointer; }
select option { background: #fff; }

/* Checklist */
.checklist-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow); margin-bottom: 1.5rem;
}
.checklist-header { margin-bottom: 1.25rem; }
.checklist-header h3 {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  color: var(--navy); text-transform: uppercase; letter-spacing: .06em;
  display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem;
}
.checklist-header h3 i { color: var(--accent); }
.checklist-legend { font-size: .8rem; color: var(--muted); margin-bottom: .75rem; }
.checklist-progress-bar {
  background: var(--gray-100); border-radius: 99px;
  height: 5px; margin-bottom: .4rem; overflow: hidden;
}
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 99px; transition: width .4s ease; width: 0%; }
.checklist-progress { font-family: var(--font-mono); font-size: .65rem; color: var(--muted); text-align: right; }

.badge-opt {
  font-family: var(--font-mono); font-size: .58rem; font-weight: 400;
  background: var(--amber-lt); color: var(--amber); border: 1px solid rgba(217,119,6,.2);
  border-radius: 99px; padding: .1rem .5rem; text-transform: uppercase; letter-spacing: .1em;
  margin-left: .5rem; vertical-align: middle;
}

/* Checklist step */
.checklist-step {
  margin-bottom: .65rem; padding: .9rem 1rem;
  background: var(--gray-50); border: 1px solid var(--border);
  border-radius: var(--radius); position: relative;
  transition: border-color .2s, background .2s;
}
.checklist-step:hover { background: #fff; border-color: var(--gray-400); }
.checklist-step.completed { background: #f0fdf4; border-color: #86efac; }
.checklist-step.completed::after {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  color: var(--green); position: absolute; top: .9rem; right: 1rem; font-size: .8rem;
}
.checklist-step.invalid { border-color: var(--rose); background: var(--rose-lt); }

.checklist-step-grid {
  display: grid; grid-template-columns: 1fr auto;
  gap: .75rem; align-items: center;
}
.checklist-step-grid label {
  font-size: .85rem; font-weight: 500; text-transform: none;
  letter-spacing: 0; color: var(--gray-700);
  display: flex; align-items: center; gap: .4rem;
}
.checklist-step-grid label i { color: var(--accent); font-size: .78rem; }
.tooltip { font-size: .75em; color: var(--gray-400); cursor: help; margin-left: .25rem; }

.checklist-step-grid select {
  width: 180px; padding: .5rem .75rem;
  font-size: .82rem; border-radius: 6px;
}
select.completed-operativo,
select.completed-realizado   { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
select.completed-no-operativo,
select.completed-no-realizado { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
select.completed-no-aplica   { background: var(--gray-100); border-color: var(--gray-400); color: var(--muted); }

.observaciones-field { display: none; margin-top: .65rem; }
.observaciones-field.visible { display: block; }
.observaciones-field label { font-size: .7rem; color: var(--muted); margin-bottom: .25rem; }
.observaciones-field textarea { min-height: 56px; font-size: .82rem; }

/* Buttons */
.form-actions {
  display: flex; gap: .75rem; flex-wrap: wrap;
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.btn-confirm, .btn-reset, .btn-cancel {
  padding: .65rem 1.4rem; border: none; border-radius: var(--radius);
  font-family: var(--font-body); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: .4rem;
}
.btn-confirm {
  background: var(--blue); color: #fff;
  box-shadow: 0 2px 8px rgba(30,58,138,.2);
}
.btn-confirm:hover { background: var(--accent); box-shadow: 0 4px 12px rgba(59,130,246,.3); }
.btn-confirm:disabled { background: var(--gray-400); cursor: not-allowed; box-shadow: none; }
.btn-confirm.loading { opacity: .7; cursor: wait; }

.btn-reset { background: var(--gray-200); color: var(--gray-700); }
.btn-reset:hover { background: var(--gray-400); color: var(--gray-900); }
.btn-cancel { background: #dc3545; color: #fff; }
.btn-cancel:hover { background: #b91c1c; }

/* Image preview */
.image-preview-container { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; }
.image-preview { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); }

/* Footer */
.footer {
  background: var(--gray-100); border-top: 1px solid var(--border);
  padding: 1rem 1.75rem; text-align: center;
  font-size: .75rem; color: var(--muted);
}

/* Modal */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(15,30,61,.5); backdrop-filter: blur(4px);
  justify-content: center; align-items: center; z-index: 1000;
}
.modal-content {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1.75rem; max-width: 500px; width: 90%;
  box-shadow: 0 25px 50px rgba(0,0,0,.2);
  animation: modalIn .25s ease;
}
@keyframes modalIn { from{opacity:0;transform:scale(.95)} to{opacity:1;transform:none} }
.modal-content h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; display: flex; align-items: center; gap: .5rem; }
.modal-content ul { padding-left: 1.25rem; margin: .75rem 0; }
.modal-content ul li { font-size: .85rem; margin-bottom: .35rem; color: var(--rose); }
.modal-content p { font-size: .88rem; color: var(--muted); }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  background: var(--navy); color: #fff;
  border-radius: var(--radius-lg); padding: .85rem 1.25rem;
  font-size: .85rem; display: none; align-items: center; gap: .6rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  animation: fadeUp .3s ease;
}
.toast.show { display: flex; }
.toast.ok  { border-left: 3px solid var(--green); }
.toast.err { border-left: 3px solid var(--rose); }
.toast.warn { border-left: 3px solid var(--amber); }
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

/* ══════ Responsive ══════ */
@media (max-width: 768px) {
  .form-content { padding: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .general-block, .checklist-section { padding: 1rem; }
  .tabs { flex-direction: column; position: static; }
  .tab { border-right: none; border-bottom: 1px solid var(--border); }
  .header { flex-direction: column; gap: .75rem; padding: 1rem; }
  .header-right { flex-wrap: wrap; justify-content: center; }
  .header-brand h1 { font-size: 1.3rem; }
  .checklist-step-grid { grid-template-columns: 1fr; }
  .checklist-step-grid select { width: 100%; }
  .login-row2 { grid-template-columns: 1fr; }
  .login-card-body { padding: 1.25rem; }
}

/* ── Botón flotante Ver Excel ── */
#floatExcel {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 500;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #ffffff !important;
  text-decoration: none;
  padding: .7rem 1.25rem;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 700;
  display: none;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 4px 16px rgba(30,58,138,.4);
  transition: all .2s;
  border: 2px solid rgba(255,255,255,.4);
}
#floatExcel:hover {
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
  box-shadow: 0 6px 20px rgba(30,58,138,.5);
  transform: translateY(-2px);
  color: #ffffff !important;
}
#floatExcel i { font-size: 1rem; color: #ffffff !important; }
#floatExcel span { color: #ffffff !important; }

/* Botón Ver Excel del header — mismo estilo que Salir */
.sheet-link-btn {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  color: rgba(255,255,255,.7) !important;
  padding: .35rem .9rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
  display: flex !important;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  cursor: pointer;
}
.sheet-link-btn:hover {
  background: rgba(255,255,255,.08) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.4) !important;
}

/* ══════════════════════════════════════
   DASHBOARD
══════════════════════════════════════ */
.dashboard-wrap { padding: .25rem 0 2rem; }

.dash-toolbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1rem 1.25rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.dash-title {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: .08em; color: var(--navy);
  display: flex; align-items: center; gap: .4rem; margin-right: auto;
}
.dash-title i { color: var(--accent); }
.dash-filter-label { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.dash-period-btns { display: flex; gap: .35rem; }
.period-btn {
  padding: .35rem .8rem; border: 1px solid var(--border);
  border-radius: 99px; background: var(--gray-100);
  font-family: var(--font-body); font-size: .75rem; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: all .2s;
}
.period-btn:hover { background: var(--gray-200); color: var(--gray-900); }
.period-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.dash-refresh-btn {
  padding: .4rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--gray-50);
  font-family: var(--font-body); font-size: .78rem; font-weight: 600;
  color: var(--gray-700); cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: .4rem;
}
.dash-refresh-btn:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* KPIs */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr));
  gap: 1rem; margin-bottom: 1.25rem;
}
.kpi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem;
  display: flex; align-items: center; gap: .9rem;
  box-shadow: var(--shadow); transition: box-shadow .2s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.kpi-value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 900; color: var(--navy); line-height: 1; }
.kpi-label { font-size: .7rem; color: var(--muted); font-weight: 500; margin-top: .2rem; text-transform: uppercase; letter-spacing: .05em; }

/* Charts */
.charts-row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(420px,1fr));
  gap: 1.25rem; margin-bottom: 1.25rem;
}
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.chart-card-full { grid-column: 1/-1; }
.chart-title {
  font-family: var(--font-display); font-size: .9rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--navy);
  display: flex; align-items: center; gap: .4rem;
  margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border);
}
.chart-title i { color: var(--accent); font-size: .8rem; }
.chart-wrap { position: relative; height: 240px; }
.chart-card-full .chart-wrap { height: 200px; }

/* Loading / Error */
.dash-loading {
  text-align: center; padding: 3rem;
  font-size: .9rem; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: .75rem;
}
.dash-error {
  text-align: center; padding: 2rem;
  background: var(--rose-lt); border: 1px solid rgba(220,38,38,.2);
  border-radius: var(--radius-lg); color: var(--rose);
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: .85rem;
}

@media(max-width:768px){
  .charts-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .dash-toolbar { flex-direction: column; align-items: flex-start; }
  .dash-title { margin-right: 0; }
}