/* ============================================================
   Control Operativo · hoja de estilos principal
   Paleta: azul oscuro, turquesa, verde y neutros.
   ============================================================ */
:root {
    --navy-900: #071d27;
    --navy-800: #07222e;
    --navy-700: #0b3b49;
    --navy-600: #124c5d;
    --teal-700: #087f80;
    --teal-600: #0d9b9b;
    --teal-500: #14b8b8;
    --teal-soft: #e7f6f6;
    --green-700: #157a52;
    --green-600: #1c9b68;
    --green-soft: #e8f7f0;
    --amber-700: #a16207;
    --amber-soft: #fdf4e3;
    --red-700: #a93f38;
    --red-600: #c04a42;
    --red-soft: #fdeceb;
    --ink: #0d2733;
    --ink-2: #173d4b;
    --muted: #657e88;
    --faint: #8ea1a8;
    --bg: #f2f6f7;
    --card: #ffffff;
    --line: #e2eaed;
    --line-strong: #d0dee2;
    --shadow-xs: 0 1px 2px rgba(7, 34, 46, .05);
    --shadow-sm: 0 4px 14px rgba(7, 34, 46, .06);
    --shadow: 0 12px 34px rgba(7, 34, 46, .09);
    --shadow-lg: 0 24px 60px rgba(7, 34, 46, .16);
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 20px;
    --sidebar: 266px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon { width: 20px; height: 20px; flex: none; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 26px; height: 26px; }

/* ---------- Auth ---------- */
.auth-body { background: var(--navy-900); min-height: 100vh; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr); min-height: 100vh; }
.auth-hero { position: relative; overflow: hidden; padding: 48px clamp(36px, 5vw, 84px); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background:
    radial-gradient(900px 500px at 85% 12%, rgba(20, 184, 184, .22), transparent 60%),
    radial-gradient(700px 500px at 0% 90%, rgba(28, 155, 104, .15), transparent 60%),
    linear-gradient(145deg, #061923 0%, #072836 45%, #0a3946 100%); }
.auth-hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(circle at 40% 40%, #000 0%, transparent 75%); pointer-events: none; }
.auth-hero::after { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid rgba(20, 184, 184, .22); border-radius: 50%; right: -160px; top: 20%; box-shadow: 0 0 0 70px rgba(20,184,184,.04), 0 0 0 150px rgba(20,184,184,.03); pointer-events: none; }
.auth-hero-top { position: relative; display: flex; align-items: center; gap: 14px; }
.auth-brand { font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; background: linear-gradient(145deg, var(--teal-500), var(--teal-700)); color: #fff; box-shadow: 0 8px 22px rgba(13, 155, 155, .35); flex: none; }
.brand-mark.lg { width: 48px; height: 48px; border-radius: 15px; }
.brand-mark .icon { width: 23px; height: 23px; stroke-width: 2.4; }
.auth-hero-copy { position: relative; max-width: 640px; padding: 60px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--teal-700); }
.eyebrow.light { color: #8fe4e1; }
.auth-hero-copy h1 { font-size: clamp(34px, 4.1vw, 56px); line-height: 1.07; letter-spacing: -.035em; margin: 20px 0 22px; font-weight: 750; }
.auth-hero-copy > p { color: rgba(226, 242, 244, .78); font-size: 16.5px; line-height: 1.7; max-width: 560px; }
.auth-principles { display: grid; gap: 16px; margin-top: 42px; max-width: 540px; }
.auth-principles > div { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.035); border-radius: 14px; backdrop-filter: blur(4px); }
.auth-principles strong { display: block; font-size: 14px; margin-bottom: 2px; }
.auth-principles small { color: rgba(226, 242, 244, .63); font-size: 12.5px; }
.principle-icon { width: 38px; height: 38px; border-radius: 11px; background: rgba(20,184,184,.14); color: #79dedb; display: grid; place-items: center; flex: none; }
.auth-quote { position: relative; color: rgba(226, 242, 244, .5); font-size: 13px; letter-spacing: .02em; }
.auth-panel { background: #fff; display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(28px, 4.5vw, 72px); position: relative; }
.auth-card { width: 100%; max-width: 450px; margin: 0 auto; }
.auth-card-head { margin-bottom: 28px; }
.auth-card-head h2 { font-size: 29px; letter-spacing: -.025em; margin-bottom: 8px; }
.auth-card-head p { color: var(--muted); font-size: 14px; }
.mobile-brand { display: none; font-weight: 750; color: var(--teal-700); margin-bottom: 20px; }
.auth-foot { text-align: center; color: var(--faint); font-size: 11.5px; margin-top: 38px; }
.demo-credentials { margin-top: 26px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 14px; background: #f8fbfb; }
.demo-credentials-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.demo-credentials-head small { color: var(--muted); font-size: 11px; }
.cred-grid { display: grid; gap: 10px; }
.cred-grid > div { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; align-items: center; padding: 9px 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.cred-grid strong { font-size: 12px; grid-row: span 2; }
.cred-grid code { font-size: 11.5px; background: var(--teal-soft); color: var(--teal-700); padding: 2px 7px; border-radius: 5px; justify-self: end; }
.demo-pill { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-700); font-size: 10.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.error-card { text-align: center; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.error-card .status-code { font-size: 54px; font-weight: 800; color: var(--teal-600); letter-spacing: -.04em; }
.error-card h2 { margin: 4px 0 10px; }
.error-card p { color: var(--muted); }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ---------- App shell ---------- */
.app-body { background: var(--bg); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: none; background: linear-gradient(180deg, var(--navy-900) 0%, #072632 55%, #06202a 100%); color: #d9e8eb; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 60; border-right: 1px solid rgba(255,255,255,.05); }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.brand-text strong { display: block; color: #fff; font-size: 14.5px; letter-spacing: -.01em; }
.brand-text small { display: block; color: rgba(214,235,238,.52); font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; margin-top: 2px; }
.side-nav { padding: 6px 12px 20px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.side-nav::-webkit-scrollbar { width: 5px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 10px; }
.nav-label { display: block; padding: 18px 12px 7px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .16em; color: rgba(214,235,238,.38); font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: rgba(224,240,242,.72); font-size: 13.5px; font-weight: 500; margin-bottom: 2px; transition: background .15s, color .15s; position: relative; }
.nav-link .icon { width: 18px; height: 18px; opacity: .8; }
.nav-link:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, rgba(20,184,184,.17), rgba(20,184,184,.06)); color: #fff; box-shadow: inset 2px 0 0 var(--teal-500); }
.nav-link.active .icon { color: #62e0dc; opacity: 1; }
.nav-badge { margin-left: auto; background: var(--teal-600); color: #fff; font-size: 10px; font-style: normal; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.side-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 11px; margin-bottom: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 10px; }
.side-note strong { display: block; font-size: 11.5px; color: #cfe6e9; }
.side-note small { font-size: 10.5px; color: rgba(214,235,238,.45); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-500); margin-top: 4px; box-shadow: 0 0 0 0 rgba(20,184,184,.5); animation: pulse 2.4s infinite; flex: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 10px; color: #e8f4f5; }
.user-chip:hover { background: rgba(255,255,255,.05); }
.user-meta strong { display: block; font-size: 12px; color: #eef8f9; }
.user-meta small { display: block; font-size: 10.5px; color: rgba(214,235,238,.48); }
.avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(145deg, #1a5c6e, #0f3b49); color: #d7f5f4; display: inline-grid; place-items: center; font-weight: 750; font-size: 12px; letter-spacing: .03em; flex: none; border: 1px solid rgba(255,255,255,.09); }
.avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 10.5px; }
.avatar.lg { width: 46px; height: 46px; border-radius: 13px; font-size: 15px; }
.avatar.online { box-shadow: inset 0 0 0 2px rgba(28,155,104,.45); }
.main-column { margin-left: var(--sidebar); flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: 68px; background: rgba(255,255,255,.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(18px, 2.6vw, 34px); position: sticky; top: 0; z-index: 40; gap: 16px; }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-heading h1 { font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-heading span { display: block; font-size: 10.5px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.server-clock { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: #f4f8f8; border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; margin-right: 4px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; color: var(--ink-2); position: relative; transition: background .15s, border-color .15s; }
.icon-btn:hover { background: #f1f6f7; border-color: var(--line); }
.icon-btn .icon { width: 19px; height: 19px; }
.with-badge { position: relative; }
.dot-badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--teal-600); color: #fff; border-radius: 99px; font-size: 9px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.user-pill { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px 4px 4px; color: var(--ink); }
.user-pill:hover { border-color: var(--line-strong); }
.user-pill-name { font-size: 12px; font-weight: 600; }
.chevron { font-size: 9px; color: var(--faint); }
.only-mobile { display: none; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 9px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); min-width: 240px; padding: 7px; display: none; z-index: 80; }
.dropdown.open .dropdown-menu { display: block; animation: dropIn .16s ease; }
.dropdown-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.dropdown-head strong { font-size: 12.5px; display: block; }
.dropdown-head small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.dropdown-menu a, .dropdown-menu .menu-logout { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: 12.5px; color: var(--ink-2); background: none; border: 0; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu .menu-logout:hover { background: #f3f8f8; }
.dropdown-menu .icon { width: 16px; height: 16px; color: var(--muted); }
.dropdown-menu form { margin: 0; }
.menu-logout { color: var(--red-600) !important; }
.notif-menu { width: 360px; max-width: calc(100vw - 30px); padding: 0; overflow: hidden; }
.notif-menu .dropdown-head { margin: 0; padding: 13px 14px; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: block; padding: 11px 14px; border-bottom: 1px solid #f0f4f5; }
.notif-item:hover { background: #f7fbfb; }
.notif-item.unread { background: #f2fbfb; }
.notif-item strong { display: block; font-size: 12px; margin-bottom: 2px; }
.notif-item p { font-size: 11.5px; color: var(--muted); margin: 0; }
.notif-item time { font-size: 10px; color: var(--faint); }
.dropdown-foot { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 600; }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal-700); font-size: 11px; font-weight: 600; }
.content { padding: clamp(18px, 2.4vw, 30px); max-width: 1600px; width: 100%; margin: 0 auto; flex: 1; }
.demo-banner { display: flex; gap: 11px; align-items: center; padding: 9px 13px; border: 1px solid #f0dfb8; background: #fffbf1; color: #7b5a16; border-radius: 10px; font-size: 11.5px; margin-bottom: 18px; }
.sidebar-overlay { display: none; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: 21px; letter-spacing: -.025em; }
.section-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.section-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { color: var(--teal-700); }

/* ---------- Buttons / forms / pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: 9px; border: 1px solid transparent; background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 650; line-height: 1.2; transition: transform .08s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(145deg, var(--teal-600), var(--teal-700)); color: #fff; box-shadow: 0 5px 14px rgba(13,155,155,.22); }
.btn-primary:hover { background: linear-gradient(145deg, #10a7a7, #087676); }
.btn-dark { background: var(--navy-700); color: #fff; }
.btn-dark:hover { background: var(--navy-600); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { background: #f7fafb; border-color: #bccdd2; }
.btn-soft { background: var(--teal-soft); color: var(--teal-700); }
.btn-soft:hover { background: #d8f1f1; }
.btn-success { background: var(--green-600); color: #fff; }
.btn-success:hover { background: var(--green-700); }
.btn-danger { background: var(--red-soft); color: var(--red-700); }
.btn-danger:hover { background: #fadad7; }
.btn-warn { background: var(--amber-soft); color: var(--amber-700); }
.btn-sm { padding: 7px 10px; font-size: 11.5px; border-radius: 8px; }
.btn-xs { padding: 5px 8px; font-size: 10.5px; border-radius: 7px; }
.btn-lg { padding: 12px 18px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack-form { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-size: 11.5px; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.field small { color: var(--faint); font-size: 10.5px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=time], input[type=search], input[type=url], select, textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; color: var(--ink); font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20,184,184,.13); }
textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7a9098 50%), linear-gradient(135deg, #7a9098 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 40px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--faint); padding: 4px; border-radius: 6px; }
.password-toggle:hover { color: var(--teal-700); background: var(--teal-soft); }
.password-toggle .icon { width: 17px; height: 17px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--teal-600); flex: none; }
.check small { display: block; color: var(--muted); font-size: 10.5px; }
.check-row { display: flex; flex-wrap: wrap; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 9px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.help-text { color: var(--muted); font-size: 11px; line-height: 1.5; }
.error-text { color: var(--red-600); font-size: 11.5px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .02em; background: #f0f4f5; color: var(--muted); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; background: #f0f4f5; color: #5c7480; white-space: nowrap; line-height: 1.5; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.status-pill.is-running { background: var(--teal-soft); color: var(--teal-700); }
.status-pill.is-done { background: var(--green-soft); color: var(--green-700); }
.status-pill.is-pending { background: #f0f4f5; color: #647d87; }
.status-pill.is-paused { background: #eef3fa; color: #506b8e; }
.status-pill.is-warn { background: var(--amber-soft); color: var(--amber-700); }
.status-pill.is-danger { background: var(--red-soft); color: var(--red-700); }
.status-pill.is-neutral { background: #f1f5f6; color: #6b8189; }
.badge-soft { background: var(--teal-soft); color: var(--teal-700); border-radius: 6px; padding: 2px 7px; font-size: 10.5px; font-weight: 650; }
.trend { font-weight: 750; font-size: 11.5px; }
.trend-decrease { color: var(--green-700); }
.trend-increase { color: var(--amber-700); }
.trend-stable { color: var(--muted); }
.trend-insufficient { color: var(--faint); }

/* ---------- Cards / tables ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { font-size: 14.5px; letter-spacing: -.01em; }
.card-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 20px; }
.card-foot { padding: 13px 20px; border-top: 1px solid var(--line); background: #fbfdfd; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.data-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 750; padding: 10px 13px; background: #f8fbfb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 11px 13px; border-bottom: 1px solid #eef3f4; font-size: 12.5px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafdfd; }
.data-table td .strong { font-size: 12.5px; }
.row-title { font-weight: 650; color: var(--ink); }
.row-sub { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.table-actions { display: flex; gap: 5px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 44px 22px; }
.empty-state .empty-icon { width: 58px; height: 58px; border-radius: 17px; background: var(--teal-soft); color: var(--teal-700); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-state h3 { font-size: 16px; margin-bottom: 5px; }
.empty-state p { color: var(--muted); font-size: 12.5px; max-width: 420px; margin: 0 auto 16px; }
.metric { padding: 17px 18px; }
.metric-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.metric-label .icon { width: 15px; height: 15px; color: var(--teal-600); }
.metric-value { font-size: 26px; font-weight: 760; letter-spacing: -.035em; margin-top: 8px; line-height: 1; }
.metric-value small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.metric-sub { font-size: 11px; color: var(--muted); margin-top: 7px; }
.metric.teal { background: linear-gradient(150deg, #f0fbfb, #fff 60%); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px; background: #f3f7f8; font-size: 10.5px; color: var(--muted); }
.progress { height: 6px; border-radius: 99px; background: #edf2f3; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-600), var(--green-600)); transition: width .45s ease; }
.progress.subtle > span { background: #b8c9ce; }

/* ---------- Toasts / modals ---------- */
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 9px; max-width: 390px; width: calc(100vw - 44px); }
.content > .toast-stack { position: fixed; }
.toast { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal-600); padding: 11px 12px; border-radius: 11px; box-shadow: var(--shadow); font-size: 12.5px; animation: toastIn .24s ease; }
.toast.toast-error { border-left-color: var(--red-600); }
.toast.toast-success { border-left-color: var(--green-600); }
.toast.toast-info { border-left-color: var(--teal-600); }
.toast-icon { color: var(--teal-700); margin-top: 1px; }
.toast-error .toast-icon { color: var(--red-600); }
.toast-success .toast-icon { color: var(--green-600); }
.toast > span:nth-child(2) { flex: 1; line-height: 1.45; }
.toast-close { border: 0; background: none; color: var(--faint); font-size: 17px; line-height: 1; padding: 0 2px; }
.toast.leaving { animation: toastOut .2s ease forwards; }
.modal { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 20, 27, .55); backdrop-filter: blur(3px); animation: fadeIn .18s ease; }
.modal-card { position: relative; background: #fff; border-radius: 17px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: hidden; display: flex; flex-direction: column; animation: modalIn .2s ease; }
.modal-card.wide { max-width: 760px; }
.modal-card.narrow { max-width: 440px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; letter-spacing: -.015em; }
.modal-head p { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.modal-close { border: 0; background: #f4f8f8; color: var(--muted); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; }
.modal-close:hover { background: #eaf1f2; color: var(--ink); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: #fbfdfd; flex-wrap: wrap; }
.file-input { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px; background: #f9fcfc; }
.file-input input { border: 0; padding: 0; background: transparent; }
.file-input .help-text { margin-top: 5px; }
.file-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfd; font-size: 10.5px; color: var(--ink-2); }
.file-chip .icon { width: 13px; height: 13px; color: var(--teal-600); }
.file-chip a { color: inherit; }
.file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.req { color: var(--red-600); }
.optional { color: var(--faint); font-weight: 500; }

/* ---------- Journey ---------- */
.journey-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.journey-title { display: flex; align-items: flex-start; gap: 14px; }
.journey-title h2 { font-size: 25px; letter-spacing: -.03em; }
.journey-title p { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.date-switch { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.date-switch a, .date-switch span { padding: 5px 8px; border-radius: 7px; font-size: 11.5px; color: var(--muted); }
.date-switch a:hover { background: #f2f7f7; color: var(--ink); }
.date-switch .current { background: var(--teal-soft); color: var(--teal-700); font-weight: 650; }
.journey-stats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.journey-stats .progress-wrap { min-width: 190px; }
.journey-stats .progress-label { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-bottom: 5px; }
.journey-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.journey-col { display: grid; gap: 16px; position: sticky; top: 84px; }
.ops-panel { overflow: hidden; }
.ops-panel .card-head { padding: 14px 15px; }
.ops-list { max-height: calc(100vh - 220px); overflow-y: auto; padding: 7px; scrollbar-width: thin; }
.ops-list::-webkit-scrollbar { width: 5px; }
.ops-list::-webkit-scrollbar-thumb { background: #d5e2e5; border-radius: 10px; }
.op-item { width: 100%; text-align: left; display: flex; gap: 9px; padding: 10px 9px; border-radius: 9px; border: 1px solid transparent; background: transparent; margin-bottom: 2px; position: relative; }
.op-item:hover { background: #f7fbfb; }
.op-item.active { background: #f2fbfb; border-color: #cdecec; box-shadow: inset 3px 0 0 var(--teal-500); }
.op-item.is-done-item .op-seq { background: var(--green-soft); color: var(--green-700); }
.op-item.is-running-item .op-seq { background: var(--teal-600); color: #fff; }
.op-item.is-noact .op-seq { background: #eef2f3; color: var(--muted); }
.op-item.is-warn-item .op-seq { background: var(--amber-soft); color: var(--amber-700); }
.op-seq { width: 25px; height: 25px; border-radius: 7px; background: #f0f5f6; color: var(--muted); display: grid; place-items: center; font-size: 10.5px; font-weight: 750; flex: none; }
.op-main { min-width: 0; flex: 1; }
.op-main strong { display: block; font-size: 12px; line-height: 1.35; font-weight: 650; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.op-meta { display: flex; gap: 7px; align-items: center; margin-top: 4px; color: var(--faint); font-size: 9.5px; flex-wrap: wrap; }
.op-meta .status-pill { font-size: 8.5px; padding: 2px 6px; }
.op-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.op-time { font-family: var(--mono); font-size: 9.5px; color: var(--faint); }
.op-dur { font-size: 9px; color: var(--muted); }
.op-flags { display: flex; gap: 2px; color: var(--faint); }
.op-flags .icon { width: 11px; height: 11px; }
.op-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 13px; border-top: 1px solid var(--line); background: #fbfdfd; }
.op-legend span { font-size: 9px; color: var(--faint); display: inline-flex; align-items: center; gap: 4px; }
.op-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-running { background: var(--teal-500); }
.legend-done { background: var(--green-600); }
.legend-pending { background: #b7c6ca; }
.legend-noact { background: #8fa4ac; }
.legend-warn { background: #d4a24a; }

.op-center { overflow: hidden; }
.op-hero { position: relative; padding: 20px 22px; background: radial-gradient(600px 200px at 85% 0%, rgba(20,184,184,.22), transparent 65%), linear-gradient(145deg, var(--navy-800), #0a3340 65%, #0c4350); color: #fff; overflow: hidden; }
.op-hero::after { content: ""; position: absolute; right: -60px; bottom: -100px; width: 260px; height: 260px; border: 1px solid rgba(20,184,184,.18); border-radius: 50%; box-shadow: 0 0 0 40px rgba(20,184,184,.04); }
.op-hero-top { position: relative; display: flex; justify-content: space-between; gap: 16px; z-index: 1; }
.op-hero h2 { font-size: 23px; letter-spacing: -.025em; margin: 7px 0 7px; max-width: 540px; }
.op-hero .op-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: rgba(217,240,242,.66); font-size: 11px; }
.op-hero .status-pill { background: rgba(255,255,255,.11); color: #d7f7f5; }
.op-hero .status-pill.is-done { background: rgba(28,155,104,.22); color: #9df0c6; }
.op-hero .status-pill.is-warn { background: rgba(212,162,74,.2); color: #f5d28e; }
.op-hero .status-pill.is-pending { background: rgba(255,255,255,.1); color: #c7dade; }
.op-hero .status-pill.is-paused { background: rgba(126,166,212,.18); color: #bfd8f7; }
.op-hero .status-pill.is-neutral { background: rgba(255,255,255,.09); color: #c7dade; }
.op-body { padding: 20px 22px; }
.op-instructions { color: var(--ink-2); font-size: 13px; line-height: 1.7; }
.op-instructions p { margin-bottom: 8px; }
.instruction-label { display: flex; align-items: center; gap: 7px; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 750; margin-bottom: 8px; }
.info-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.info-box { border: 1px solid var(--line); background: #fbfdfd; border-radius: 10px; padding: 10px 11px; }
.info-box span { display: block; font-size: 9px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.info-box strong { display: block; font-size: 11.5px; margin-top: 3px; color: var(--ink-2); }
.op-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.op-note { margin-top: 16px; padding: 11px 13px; border-radius: 10px; background: #f7fbfb; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.op-closed-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--green-soft); border: 1px solid #caefdb; color: var(--green-700); font-size: 11.5px; margin-top: 14px; }
.op-closed-banner.warn { background: var(--amber-soft); border-color: #f0dfb8; color: var(--amber-700); }
.op-files { margin-top: 16px; }
.op-files h4 { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); margin-bottom: 7px; }
.mini-events { margin-top: 16px; display: grid; gap: 0; }
.mini-event { display: flex; gap: 10px; font-size: 11px; color: var(--muted); padding: 6px 0; }
.mini-event .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-500); margin-top: 6px; flex: none; }
.mini-event strong { color: var(--ink-2); font-weight: 600; }
.incident-box { margin-top: 14px; padding: 11px 13px; border-radius: 10px; background: #fffbf1; border: 1px solid #f0dfb8; font-size: 11px; color: #7b5a16; }
.incident-box strong { display: block; margin-bottom: 2px; }

/* Timer */
.timer-card { position: relative; margin-top: 18px; border-radius: 15px; padding: 18px 20px; background: radial-gradient(420px 160px at 90% 10%, rgba(20,184,184,.2), transparent 70%), linear-gradient(145deg, #072a36, #093844); color: #fff; display: flex; align-items: center; gap: 20px; overflow: hidden; }
.timer-card.paused { background: linear-gradient(145deg, #102b38, #1a3b47); }
.timer-card .timer-info { flex: 1; min-width: 0; }
.timer-label { display: flex; align-items: center; gap: 6px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .13em; color: rgba(217,240,242,.55); font-weight: 700; }
.timer-label .live-dot { width: 6px; height: 6px; }
.timer-digits { font-family: var(--mono); font-size: clamp(32px, 4vw, 46px); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 10px 0 8px; font-weight: 600; color: #e9fffd; text-shadow: 0 0 26px rgba(20,184,184,.3); }
.timer-digits small { font-size: 13px; color: rgba(217,240,242,.45); letter-spacing: 0; margin-left: 6px; }
.timer-sub { display: flex; gap: 14px; flex-wrap: wrap; font-size: 10px; color: rgba(217,240,242,.58); }
.timer-sub b { color: #b9f1ef; font-family: var(--mono); font-weight: 500; }
.timer-note { margin-top: 9px; font-size: 9.5px; color: rgba(217,240,242,.38); }
.hourglass { width: 64px; height: 94px; position: relative; flex: none; filter: drop-shadow(0 0 16px rgba(20,184,184,.22)); }
.hg-top, .hg-bottom { position: absolute; left: 8px; width: 48px; height: 37px; background: linear-gradient(145deg, #38d6d1, #0d9b9b); opacity: .92; }
.hg-top { top: 0; clip-path: polygon(0 0, 100% 0, 58% 94%, 42% 94%); border-radius: 3px 3px 0 0; }
.hg-bottom { bottom: 0; clip-path: polygon(42% 5%, 58% 5%, 100% 100%, 0 100%); opacity: .72; }
.hg-frame-top, .hg-frame-bottom { position: absolute; left: 2px; width: 60px; height: 5px; background: #b9f1ef; border-radius: 3px; opacity: .8; }
.hg-frame-top { top: 0; } .hg-frame-bottom { bottom: 0; }
.hg-stream { position: absolute; left: 50%; top: 34px; width: 2px; height: 25px; margin-left: -1px; background: linear-gradient(#7ef4ee, rgba(126,244,238,.08)); animation: sandStream 1.1s linear infinite; }
.hg-grain { position: absolute; left: 50%; top: 38px; width: 3px; height: 3px; border-radius: 50%; background: #9ff8f3; animation: grainFall 1.2s linear infinite; }
.hg-grain:nth-child(3) { animation-delay: .4s; margin-left: -4px; }
.hg-grain:nth-child(4) { animation-delay: .8s; margin-left: 3px; }
.timer-card.paused .hg-stream, .timer-card.paused .hg-grain { animation-play-state: paused; opacity: .25; }
.timer-card:not(.running) .hg-stream, .timer-card:not(.running) .hg-grain { display: none; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ff0e6; display: inline-block; box-shadow: 0 0 0 0 rgba(79,240,230,.6); animation: pulse 2s infinite; }
.timer-card.paused .live-dot { background: #9db8d4; animation: none; }

/* Next / summary */
.next-list { display: grid; }
.next-item { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid #f0f4f5; }
.next-item:last-child { border-bottom: 0; padding-bottom: 0; }
.next-time { font-family: var(--mono); font-size: 10px; color: var(--teal-700); background: var(--teal-soft); padding: 3px 6px; border-radius: 5px; height: fit-content; flex: none; }
.next-item strong { font-size: 11.5px; display: block; line-height: 1.35; }
.next-item small { color: var(--faint); font-size: 9.5px; }
.stat-mini { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f4f5; font-size: 11.5px; color: var(--muted); }
.stat-mini:last-child { border: 0; }
.stat-mini strong { font-size: 15px; color: var(--ink); letter-spacing: -.02em; }
.readonly-banner { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 10px; background: #eef5f6; border: 1px solid var(--line); color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.progress-ring-sm { width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(var(--teal-600) var(--pct, 0%), #edf3f4 0); display: grid; place-items: center; flex: none; }
.progress-ring-sm::before { content: ""; width: 40px; height: 40px; border-radius: 50%; background: #fff; }
.progress-ring-sm span { position: absolute; font-size: 10px; font-weight: 750; }
.progress-ring-wrap { position: relative; display: grid; place-items: center; }

/* ---------- Audit ---------- */
.audit-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.audit-summary .metric { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.filter-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar .search-box { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search-box .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.search-box input { padding-left: 32px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; }
.live-indicator .live-dot { width: 6px; height: 6px; background: var(--green-600); }
.audit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.audit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.audit-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-xs); transition: box-shadow .18s, border-color .18s; }
.audit-card:hover { box-shadow: var(--shadow-sm); border-color: #d5e3e6; }
.audit-card.status-running { border-color: #bfe8e7; box-shadow: inset 0 3px 0 var(--teal-500), var(--shadow-xs); }
.audit-card.status-done { box-shadow: inset 0 3px 0 var(--green-600); }
.audit-card.status-neutral { opacity: .94; }
.audit-card-head { display: flex; gap: 11px; align-items: flex-start; }
.audit-card-head .who { flex: 1; min-width: 0; }
.audit-card-head h3 { font-size: 13.5px; letter-spacing: -.01em; }
.audit-card-head .where { font-size: 10px; color: var(--faint); margin-top: 2px; }
.online-state { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; color: var(--muted); margin-top: 4px; }
.online-state .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-600); }
.online-state.offline .dot { background: #b3c0c4; }
.audit-status-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }
.audit-progress { margin-top: 11px; }
.audit-progress .progress-label { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); margin-bottom: 5px; }
.audit-current { margin-top: 12px; padding: 10px 11px; border-radius: 10px; background: #f6fbfb; border: 1px solid #e3f0f0; }
.audit-current .lbl { font-size: 8.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 700; }
.audit-current strong { display: block; font-size: 11.5px; margin: 3px 0 4px; line-height: 1.35; }
.audit-current .elapsed { font-family: var(--mono); font-size: 15px; color: var(--teal-700); font-weight: 600; }
.audit-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 11px; }
.audit-metrics div { background: #f8fbfb; border-radius: 7px; padding: 6px 7px; }
.audit-metrics span { display: block; font-size: 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.audit-metrics strong { font-size: 13px; }
.audit-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 11px; border-top: 1px solid #f0f4f5; gap: 7px; }
.audit-unread { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; color: var(--teal-700); background: var(--teal-soft); padding: 3px 7px; border-radius: 99px; font-weight: 650; }
.incident-list { display: grid; gap: 0; }
.incident-item { padding: 11px 0; border-bottom: 1px solid #f0f4f5; }
.incident-item:last-child { border-bottom: 0; padding-bottom: 0; }
.incident-item strong { font-size: 11.5px; display: block; margin: 4px 0 3px; }
.incident-item p { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.incident-meta { display: flex; align-items: center; gap: 6px; font-size: 9px; color: var(--faint); }
.incident-meta .status-pill { font-size: 8.5px; }
.audit-note { padding: 11px 13px; border-radius: 9px; background: #f6fafb; border: 1px solid var(--line); font-size: 10.5px; color: var(--muted); line-height: 1.5; margin-top: 12px; }
.audit-live-empty { display: none; }
.audit-cards-updating { opacity: .55; transition: opacity .2s; pointer-events: none; }
.alert-info { display: flex; gap: 9px; padding: 10px 12px; background: #f2f9fa; border: 1px solid #dcebed; border-radius: 9px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.alert-info .icon { color: var(--teal-600); flex: none; width: 16px; height: 16px; margin-top: 1px; }
.alert-warn { display: flex; gap: 9px; padding: 10px 12px; background: #fff8e8; border: 1px solid #f0dfb6; border-radius: 9px; font-size: 11px; color: #7a5a16; line-height: 1.5; }
.alert-warn .icon { color: #a87615; flex: none; width: 16px; height: 16px; margin-top: 1px; }

/* ---------- Journey detail / timeline ---------- */
.detail-head { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 16px; }
.detail-head h2 { font-size: 24px; letter-spacing: -.03em; }
.detail-head p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.op-detail-row { border-bottom: 1px solid #eef3f4; }
.op-detail-row:last-child { border-bottom: 0; }
.op-detail-toggle { width: 100%; text-align: left; background: none; border: 0; padding: 13px 15px; display: flex; align-items: center; gap: 10px; }
.op-detail-toggle:hover { background: #fafdfd; }
.op-detail-body { padding: 0 15px 15px; display: none; }
.op-detail-row.open .op-detail-body { display: block; }
.op-detail-row.open .op-detail-toggle { background: #f8fcfc; }
.op-detail-name { flex: 1; min-width: 0; }
.op-detail-name strong { display: block; font-size: 12.5px; }
.op-detail-name small { font-size: 9.5px; color: var(--faint); }
.op-detail-time { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.detail-subgrid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-top: 10px; }
.detail-panel { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fbfdfd; }
.detail-panel h5 { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 7px; font-weight: 750; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 11px 0; font-size: 10.5px; color: var(--muted); }
.timeline-item::before { content: ""; position: absolute; left: -16px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-500); border: 2px solid #fff; box-shadow: 0 0 0 1px #cce8e8; }
.timeline-item strong { color: var(--ink-2); font-weight: 650; }
.timeline-item time { display: block; font-size: 9px; color: var(--faint); }
.reopen-box { padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; margin-top: 10px; }

/* ---------- Chat ---------- */
.chat-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: calc(100vh - 180px); min-height: 480px; box-shadow: var(--shadow-xs); }
.contacts-panel { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fbfdfd; }
.contacts-head { padding: 13px; border-bottom: 1px solid var(--line); }
.contacts-head h2 { font-size: 14px; margin-bottom: 9px; }
.contact-list { overflow-y: auto; flex: 1; }
.contact { display: flex; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #f1f5f6; position: relative; color: var(--ink); }
.contact:hover { background: #f4fafb; }
.contact.active { background: #eefafa; box-shadow: inset 3px 0 0 var(--teal-500); }
.contact .avatar { margin-top: 1px; }
.contact-main { flex: 1; min-width: 0; }
.contact-main strong { display: block; font-size: 12px; }
.contact-main small { display: block; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.contact-meta { text-align: right; display: grid; gap: 3px; justify-items: end; }
.contact-meta time { font-size: 8.5px; color: var(--faint); }
.contact-unread { min-width: 17px; height: 17px; border-radius: 99px; background: var(--teal-600); color: #fff; font-size: 9px; font-weight: 750; display: grid; place-items: center; padding: 0 4px; }
.contact-offline { color: var(--faint); font-size: 9px; }
.thread-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f6fafb; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 11px 15px; background: #fff; border-bottom: 1px solid var(--line); min-height: 59px; }
.thread-head .who { flex: 1; min-width: 0; }
.thread-head h3 { font-size: 13px; }
.thread-head small { font-size: 9.5px; color: var(--muted); display: block; }
.thread-head .online-state { margin: 0; display: inline-flex; }
.thread-tools { display: flex; gap: 3px; align-items: center; }
.messages-area { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; background-image: radial-gradient(rgba(13,155,155,.055) 1px, transparent 1px); background-size: 18px 18px; }
.msg-day { align-self: center; font-size: 9px; color: var(--faint); background: #eef4f5; padding: 3px 9px; border-radius: 99px; margin: 5px 0; }
.bubble-row { display: flex; justify-content: flex-start; }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: min(74%, 560px); background: #fff; border: 1px solid var(--line); border-radius: 13px 13px 13px 4px; padding: 9px 11px; box-shadow: 0 1px 1px rgba(7,34,46,.03); }
.bubble-row.mine .bubble { background: #e7f7f6; border-color: #d1eeec; border-radius: 13px 13px 4px 13px; }
.bubble-text { font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.bubble-meta { display: flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: 8.5px; color: var(--faint); margin-top: 4px; }
.checks { display: inline-flex; letter-spacing: -1px; font-size: 11px; color: #93a7ae; }
.checks.read { color: #168bd0; }
.checks.delivered { color: #93a7ae; }
.bubble-attachments { display: grid; gap: 5px; margin-top: 5px; }
.bubble-file { display: flex; align-items: center; gap: 7px; padding: 6px 7px; background: rgba(255,255,255,.65); border: 1px solid rgba(13,155,155,.14); border-radius: 7px; font-size: 10px; }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 30px; }
.chat-empty .empty-icon { margin: 0 auto 12px; }
.chat-empty h3 { font-size: 16px; margin-bottom: 4px; }
.chat-empty p { font-size: 11.5px; color: var(--muted); max-width: 330px; }
.composer { background: #fff; border-top: 1px solid var(--line); padding: 9px 12px 11px; }
.composer-attach { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.composer-row { display: flex; align-items: flex-end; gap: 6px; }
.composer textarea { min-height: 42px; max-height: 120px; resize: none; padding: 10px 12px; border-radius: 20px; background: #f6fafb; }
.composer .send-btn { width: 42px; height: 42px; border-radius: 50%; padding: 0; flex: none; }
.composer-note { font-size: 8.5px; color: var(--faint); margin-top: 5px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.composer-actions { display: flex; align-items: center; gap: 3px; }
.attach-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; flex: none; }
.attach-btn:hover { background: #f0f7f7; color: var(--teal-700); }
.chat-search-panel { position: absolute; right: 12px; top: 58px; width: 320px; max-height: 360px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 10px; z-index: 10; display: none; }
.chat-search-panel.open { display: block; }
.chat-search-result { padding: 7px 8px; border-bottom: 1px solid #f1f5f6; font-size: 10.5px; }
.chat-search-result:last-child { border: 0; }
.chat-search-result strong { display: block; font-size: 9px; color: var(--teal-700); }
.thread-wrap { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.op-assoc { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--teal-700); background: var(--teal-soft); border-radius: 6px; padding: 3px 7px; margin-bottom: 6px; }

/* ---------- Manuals ---------- */
.manual-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.manual-group + .manual-group { margin-top: 28px; }
.manual-group-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.manual-group:first-of-type .manual-group-head { padding-top: 0; border-top: 0; }
.manual-group-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; letter-spacing: -.01em; }
.manual-group-head p { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.manual-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-700); font-size: 10.5px; font-weight: 700; }
.manual-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; box-shadow: var(--shadow-xs); transition: box-shadow .16s, transform .16s; }
.manual-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.manual-card .manual-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--teal-soft); color: var(--teal-700); display: grid; place-items: center; margin-bottom: 12px; }
.manual-card h3 { font-size: 14px; letter-spacing: -.01em; margin-bottom: 5px; }
.manual-card p { color: var(--muted); font-size: 11.5px; line-height: 1.5; flex: 1; }
.manual-card .manual-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 11px; border-top: 1px solid #f0f4f5; }
.manual-card .manual-foot small { font-size: 9.5px; color: var(--faint); }
.manual-article { max-width: 900px; margin: 0 auto; }
.manual-article-head { background: linear-gradient(145deg, var(--navy-800), #0b3d4a); color: #fff; padding: 26px 28px; border-radius: var(--radius) var(--radius) 0 0; }
.manual-article-head h2 { font-size: 26px; letter-spacing: -.03em; margin: 8px 0 8px; }
.manual-article-head p { color: rgba(217,240,242,.72); font-size: 13px; line-height: 1.6; max-width: 640px; }
.manual-article-body { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 26px 28px; }
.manual-section { margin-bottom: 24px; }
.manual-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .11em; color: var(--teal-700); margin-bottom: 9px; }
.manual-section p, .manual-section li { font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.manual-section ol, .manual-section ul { margin: 0; padding-left: 21px; }
.manual-section li { margin-bottom: 6px; }
.callout { padding: 12px 14px; border-radius: 10px; font-size: 12px; line-height: 1.55; }
.callout.warn { background: var(--amber-soft); color: var(--amber-700); border: 1px solid #f0dfb8; }
.callout.info { background: var(--teal-soft); color: var(--teal-700); border: 1px solid #cceceb; }
.callout.good { background: var(--green-soft); color: var(--green-700); border: 1px solid #caefdb; }
.manual-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.manual-gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fbfdfd; }
.manual-gallery img { width: 100%; height: 150px; object-fit: cover; }
.manual-gallery figcaption { padding: 7px 9px; font-size: 9.5px; color: var(--muted); }
.manual-back { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-bottom: 12px; }
.manual-image-admin { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.manual-image-admin img { height: 140px; width: 100%; object-fit: cover; }
.manual-image-admin form { position: absolute; top: 5px; right: 5px; }

/* ---------- Evolution / stats ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; box-shadow: var(--shadow-xs); }
.stat-card .lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 750; }
.stat-card .val { font-size: 27px; font-weight: 760; letter-spacing: -.04em; margin-top: 7px; line-height: 1; }
.stat-card .val small { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-card .sub { font-size: 10.5px; color: var(--muted); margin-top: 7px; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.chart-wrap { padding: 12px 14px 16px; }
.chart-wrap canvas { width: 100% !important; height: 300px !important; }
.chart-legend { display: flex; gap: 12px; padding: 0 18px 12px; font-size: 9.5px; color: var(--muted); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.feedback-list { display: grid; gap: 8px; }
.feedback-item { display: flex; gap: 9px; padding: 10px 12px; border-radius: 9px; background: #f8fbfb; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); line-height: 1.5; }
.feedback-item .icon { color: var(--teal-600); flex: none; margin-top: 1px; }
.comparison-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.comp-box { padding: 13px; border-radius: 10px; background: #f8fbfb; border: 1px solid var(--line); }
.comp-box span { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.comp-box strong { display: block; font-size: 19px; letter-spacing: -.03em; margin-top: 3px; }
.comp-box small { font-size: 9.5px; color: var(--muted); }
.comp-arrow { color: var(--faint); font-size: 15px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.segmented { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented a, .segmented button { padding: 5px 10px; border-radius: 6px; font-size: 10.5px; color: var(--muted); border: 0; background: none; }
.segmented a:hover, .segmented button:hover { background: #f3f8f8; color: var(--ink); }
.segmented .active { background: var(--teal-soft); color: var(--teal-700); font-weight: 700; }
.sample-note { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--faint); }

/* ---------- Reports ---------- */
.report-page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: #fbfdfd; flex-wrap: wrap; }
.report-inner { padding: clamp(20px, 3vw, 36px); }
.report-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--navy-700); padding-bottom: 16px; flex-wrap: wrap; }
.report-brand { display: flex; gap: 11px; align-items: center; }
.report-brand strong { font-size: 16px; display: block; }
.report-brand small { color: var(--muted); font-size: 10px; }
.report-title { text-align: right; }
.report-title h1 { font-size: 22px; letter-spacing: -.03em; }
.report-title p { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.report-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.report-meta div { padding: 9px 11px; background: #f7fbfb; border: 1px solid var(--line); border-radius: 8px; }
.report-meta span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.report-meta strong { display: block; font-size: 11.5px; margin-top: 2px; }
.report-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.report-kpi { padding: 11px; border: 1px solid var(--line); border-radius: 9px; }
.report-kpi span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.report-kpi strong { display: block; font-size: 18px; letter-spacing: -.03em; margin-top: 3px; }
.report-section { margin-top: 22px; }
.report-section h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-700); margin-bottom: 9px; }
.report-section h3 { font-size: 13px; margin: 14px 0 7px; }
.report-note { font-size: 10.5px; color: var(--muted); line-height: 1.55; }
.report-bars { display: grid; gap: 7px; }
.report-bar-row { display: grid; grid-template-columns: 180px 1fr 64px; gap: 9px; align-items: center; font-size: 10px; }
.report-bar-row .bar { height: 8px; background: #edf3f4; border-radius: 99px; overflow: hidden; }
.report-bar-row .bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-500), var(--green-600)); border-radius: inherit; }
.report-bar-row .bar.noact span { background: #c8d4d8; }
.report-bar-row .bar.warn span { background: #e0b871; }
.report-bar-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-bar-value { text-align: right; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.report-cols .card { box-shadow: none; }
.report-signoff { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 9px; color: var(--faint); }
.report-preliminary { display: flex; gap: 8px; padding: 9px 11px; background: var(--amber-soft); border: 1px solid #f0dfb8; border-radius: 8px; font-size: 10.5px; color: var(--amber-700); margin-bottom: 14px; }
.report-noact { color: var(--muted); font-style: italic; }
.report-page .data-table { min-width: 0; }
.report-page .data-table th, .report-page .data-table td { padding: 7px 8px; font-size: 10px; }

/* ---------- Config / evaluations ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 9px 12px; font-size: 12px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; font-family: inherit; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--teal-700); border-bottom-color: var(--teal-600); font-weight: 650; }
.config-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 16px; align-items: start; }
.config-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f4f5; }
.config-list-item:last-child { border: 0; }
.config-list-item .main { flex: 1; min-width: 0; }
.config-list-item strong { display: block; font-size: 12px; }
.config-list-item small { color: var(--faint); font-size: 10px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-xs); }
.form-card h3 { font-size: 14px; margin-bottom: 3px; }
.form-card > p { font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.inline-form { display: flex; gap: 7px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 150px; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d8e3e5; border-radius: 99px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: .2s; }
.switch input:checked + span { background: var(--teal-600); }
.switch input:checked + span::before { transform: translateX(16px); }
.weekday-row { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-row label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 10.5px; cursor: pointer; background: #fff; }
.weekday-row input { accent-color: var(--teal-600); }
.weight-table td:last-child { width: 110px; }
.weight-total { display: flex; justify-content: flex-end; gap: 8px; font-size: 11px; color: var(--muted); padding-top: 10px; }
.weight-total strong { color: var(--ink); }
.eval-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.eval-score { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfd; }
.eval-score .lbl { flex: 1; min-width: 0; }
.eval-score .lbl strong { display: block; font-size: 10.5px; }
.eval-score .lbl small { font-size: 8.5px; color: var(--faint); }
.eval-score input { width: 64px; text-align: center; padding: 6px; }
.eval-total { display: flex; align-items: baseline; gap: 7px; font-size: 11px; color: var(--muted); }
.eval-total strong { font-size: 25px; color: var(--ink); letter-spacing: -.03em; }
.eval-history-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; background: #fff; }
.eval-history-item + .eval-history-item { margin-top: 8px; }
.eval-history-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.eval-history-head strong { font-size: 11.5px; }
.eval-history-head span { font-size: 9.5px; color: var(--faint); }
.eval-score-pill { font-size: 14px; font-weight: 750; color: var(--teal-700); }
.eval-breakdown { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px 10px; margin-top: 8px; font-size: 10px; color: var(--muted); }
.eval-breakdown div { display: flex; justify-content: space-between; gap: 6px; border-bottom: 1px dotted #e6edef; padding-bottom: 2px; }
.eval-note { font-size: 9.5px; color: var(--faint); margin-top: 7px; font-style: italic; }
.version-list { display: grid; gap: 8px; }
.version-item { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fbfdfd; }
.version-item strong { font-size: 10.5px; display: block; }
.version-item small { font-size: 9px; color: var(--faint); }
.log-details { font-size: 9.5px; color: var(--muted); max-width: 420px; word-break: break-word; }
.audit-perm-list { display: flex; flex-wrap: wrap; gap: 4px; }
.audit-perm-list span { font-size: 8.5px; background: #f2f7f8; border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; color: var(--muted); }
.settings-section + .settings-section { margin-top: 18px; }
.settings-section h3 { font-size: 13px; margin-bottom: 8px; }
.backup-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f4f5; font-size: 10.5px; }
.backup-row:last-child { border: 0; }
.notification-card { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #f0f4f5; }
.notification-card.unread { background: #f4fbfb; }
.notification-card .icon-wrap { width: 34px; height: 34px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-700); display: grid; place-items: center; flex: none; }
.notification-card strong { font-size: 12px; }
.notification-card p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notification-card time { font-size: 9px; color: var(--faint); }
.profile-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-card { text-align: center; padding: 26px 20px; }
.profile-card .avatar { width: 70px; height: 70px; border-radius: 20px; font-size: 22px; margin: 0 auto 12px; }
.profile-card h2 { font-size: 18px; }
.profile-card p { font-size: 11.5px; color: var(--muted); }
.profile-meta { margin-top: 16px; text-align: left; display: grid; gap: 8px; font-size: 11px; color: var(--muted); }
.profile-meta div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #f0f4f5; padding-bottom: 6px; }
.profile-meta strong { color: var(--ink-2); font-weight: 600; text-align: right; }

/* ---------- Utilities / animations ---------- */
.markdownish { white-space: pre-wrap; }
.mini-list { display: grid; gap: 6px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.flex { display: flex; } .between { justify-content: space-between; } .items-center { align-items: center; } .gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.pointer { cursor: pointer; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(20,184,184,.45); } 70% { box-shadow: 0 0 0 7px rgba(20,184,184,0); } 100% { box-shadow: 0 0 0 0 rgba(20,184,184,0); } }
@keyframes sandStream { 0% { opacity: .2; transform: scaleY(.4); } 50% { opacity: 1; transform: scaleY(1); } 100% { opacity: .2; transform: scaleY(.4); } }
@keyframes grainFall { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(22px); opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton { background: linear-gradient(90deg, #eef4f5 25%, #f7fbfb 50%, #eef4f5 75%); background-size: 800px 100%; animation: shimmer 1.4s infinite linear; border-radius: 7px; color: transparent; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
    .journey-grid { grid-template-columns: 290px minmax(0, 1fr) 275px; }
    .audit-layout { grid-template-columns: minmax(0, 1fr) 310px; }
}
@media (max-width: 1200px) {
    .journey-grid { grid-template-columns: 290px minmax(0, 1fr); }
    .journey-grid > .journey-col:last-child { grid-column: 1 / -1; position: static; grid-template-columns: 1fr 1fr; }
    .journey-col { position: static; }
    .ops-list { max-height: 560px; }
    .audit-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .detail-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .report-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; }
    .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(4,20,27,.45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; border: 0; }
    .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
    .main-column { margin-left: 0; }
    .only-mobile { display: inline-grid; }
    .audit-layout { grid-template-columns: 1fr; }
    .audit-layout > aside { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .config-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-panel { min-height: 100vh; background: linear-gradient(180deg, #f7fbfb, #fff); }
    .mobile-brand { display: block; }
    .auth-body { background: #fff; }
}
@media (max-width: 860px) {
    .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chat-layout { grid-template-columns: 270px minmax(0, 1fr); height: calc(100vh - 160px); }
    .report-cols { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .eval-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .topbar { height: 61px; padding: 0 14px; }
    .server-clock { display: none; }
    .page-heading span { display: none; }
    .content { padding: 14px; }
    .journey-grid { grid-template-columns: 1fr; }
    .journey-grid > .journey-col:last-child { grid-template-columns: 1fr; grid-column: auto; }
    .journey-col { gap: 12px; }
    .ops-list { max-height: 340px; }
    .op-hero { padding: 16px; }
    .op-hero h2 { font-size: 20px; }
    .op-body { padding: 16px; }
    .timer-card { flex-direction: row; padding: 14px; gap: 13px; }
    .hourglass { transform: scale(.86); transform-origin: center; }
    .timer-digits { font-size: 32px; }
    .info-strip { grid-template-columns: 1fr; gap: 7px; }
    .info-strip .info-box { padding: 8px 10px; }
    .audit-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .audit-layout > aside { grid-template-columns: 1fr; }
    .audit-grid { grid-template-columns: 1fr; }
    .detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-subgrid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .filter-bar { gap: 7px; }
    .filter-bar .search-box { max-width: none; }
    .segmented { width: 100%; overflow-x: auto; }
    .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 150px); min-height: 420px; }
    .chat-layout.has-peer .contacts-panel { display: none; }
    .chat-layout:not(.has-peer) .thread-panel { display: none; }
    .thread-wrap { height: 100%; }
    .bubble { max-width: 86%; }
    .report-inner { padding: 18px 15px; }
    .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-bar-row { grid-template-columns: 120px 1fr 50px; }
    .navbar-brand { font-size: 13px; }
    .modal { padding: 10px; }
    .modal-body { padding: 15px; }
    .modal-head, .modal-foot { padding: 14px 15px; }
    .settings-section { padding: 0; }
    .comparison-grid { grid-template-columns: 1fr; }
    .comp-arrow { transform: rotate(90deg); justify-self: center; }
    .report-head { flex-direction: column; align-items: flex-start; }
    .report-title { text-align: left; }
    .auth-panel { padding: 26px 18px; }
    .auth-card-head h2 { font-size: 25px; }
    .auth-foot { margin-top: 24px; }
    .toast-stack { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}
@media (max-width: 440px) {
    .stat-cards { grid-template-columns: 1fr; }
    .audit-summary { grid-template-columns: 1fr 1fr; }
    .detail-stats { grid-template-columns: 1fr 1fr; }
    .op-actions .btn { flex: 1 1 auto; }
    .timer-card { flex-wrap: wrap; }
    .hourglass { width: 50px; transform: scale(.72); margin: -8px -6px; }
    .timer-digits { font-size: 28px; }
    .journey-stats { width: 100%; }
    .journey-stats .progress-wrap { flex: 1; }
    .user-pill-name { display: none; }
}
@media print {
    .sidebar, .topbar, .report-toolbar, .toast-stack, .demo-banner, .section-actions, .no-print { display: none !important; }
    .main-column { margin-left: 0 !important; }
    .content { padding: 0 !important; max-width: none; }
    body, .app-body { background: #fff; }
    .report-page { border: 0; box-shadow: none; border-radius: 0; }
    .report-inner { padding: 0; }
    .card { box-shadow: none; }
    .app-shell { display: block; }
    a { color: var(--ink); }
    .report-section { break-inside: avoid; }
}

/* ---------- Compras del día ---------- */
.purchase-panel { margin-top: 16px; overflow: hidden; }
.purchase-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; border: 0; background: #fff; text-align: left; }
.purchase-toggle:hover { background: #fbfdfd; }
.purchase-toggle-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.purchase-toggle-title strong { display: block; font-size: 15px; color: var(--ink); }
.purchase-toggle-title small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.purchase-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-700); flex: none; }
.purchase-toggle-meta { display: flex; align-items: center; gap: 10px; flex: none; }
.purchase-chevron { font-size: 18px; color: var(--muted); transition: transform .18s; line-height: 1; }
.purchase-panel.open .purchase-chevron { transform: rotate(180deg); }
.purchase-body { padding: 0 20px 20px; border-top: 1px solid var(--line); }
.purchase-body > .help-text { margin: 13px 0; }
.purchase-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid #f0f4f5; }
.purchase-row:last-child { border-bottom: 0; }
.purchase-row .purchase-number { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f1f6f7; color: var(--teal-700); font-size: 10px; font-weight: 750; flex: none; }
.purchase-row-main { flex: 1; min-width: 0; }
.purchase-row-main strong { display: block; font-size: 12.5px; }
.purchase-row-main small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.purchase-row-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.purchase-row .status-pill { font-size: 9px; }
.purchase-link { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--teal-700); }
@media (max-width: 600px) {
    .purchase-row { flex-wrap: wrap; }
    .purchase-row-actions { width: 100%; justify-content: flex-start; padding-left: 41px; }
    .purchase-toggle { padding: 14px; }
}

/* ---------- Calendario mensual ---------- */
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-head { background: #f7fbfb; border-bottom: 1px solid var(--line); }
.calendar-head span { padding: 10px 8px; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.calendar-body { background: #fff; }
.calendar-day { min-height: 118px; padding: 8px; border-right: 1px solid #eef3f4; border-bottom: 1px solid #eef3f4; min-width: 0; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-empty { background: #fbfdfd; }
.calendar-day.is-weekend { background: #fcfefe; }
.calendar-day.is-today { background: #f2fbfb; box-shadow: inset 0 0 0 2px var(--teal-500); }
.calendar-day-number { font-size: 11px; font-weight: 750; color: var(--muted); margin-bottom: 6px; }
.calendar-day.is-today .calendar-day-number { color: var(--teal-700); }
.calendar-tasks { display: grid; gap: 3px; }
.calendar-task { display: flex; align-items: center; gap: 4px; padding: 4px 5px; border-radius: 5px; background: #f2f7f8; color: var(--ink-2); font-size: 8.5px; line-height: 1.3; overflow: hidden; }
.calendar-task:hover { background: var(--teal-soft); color: var(--teal-700); }
.calendar-task.is-done { background: var(--green-soft); color: var(--green-700); }
.calendar-task.is-warn { background: var(--amber-soft); color: var(--amber-700); }
.calendar-task.is-pending { background: #f2f7f8; color: var(--muted); }
.calendar-task-number { font-weight: 750; color: var(--teal-700); flex: none; }
.calendar-task small { font-size: 7.5px; color: var(--faint); margin-left: auto; flex: none; }
@media (max-width: 700px) { .calendar-day { min-height: 90px; padding: 5px; } .calendar-task { font-size: 7.5px; } .calendar-head span { font-size: 7px; padding: 7px 3px; } }

/* ---------- Procedimientos documentales ---------- */
.procedure-full-text { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); background: #fbfdfd; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; max-height: 680px; overflow-y: auto; }
.procedure-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 10px; }
.procedure-page { margin: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.procedure-page img { width: 100%; height: auto; display: block; }
.procedure-page figcaption { padding: 6px 8px; font-size: 9px; color: var(--muted); border-top: 1px solid var(--line); }
.manual-article .procedure-pages { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
