:root {
    --primary: #7b9669; --primary-dark: #404e3b; --primary-light: #e7efe1; --sage: #6c8480;
    --jade-light: #bac8b1; --bg: #f6f8f4; --card: #fff; --surface-alt: #f1f4ed;
    --text: #2a3328; --text-muted: #65725f; --border: #d4dccb; --danger: #a23b3b;
    --warning: #b6822a; --info: #4d6f8c; --radius: 16px; --radius-sm: 10px;
    --shadow: 0 2px 10px rgba(64, 78, 59, .08); --sidebar-width: 282px;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; }
body { margin: 0; font-family: "Nunito", Arial, sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input, textarea, select { font: inherit; } button { cursor: pointer; }
.pc-app { min-height: 100vh; width: 100%; display: flex; }
.pc-sidebar { background: var(--primary-dark); color: white; width: var(--sidebar-width); height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 1001; }
.brand { display: flex; align-items: center; gap: 12px; padding: 26px 20px 14px; }
.brand-copy { min-width: 0; }
.sidebar-toggle { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; color: white; flex-shrink: 0; height: 36px; margin-left: auto; width: 36px; }
.sidebar-toggle:hover { background: rgba(255,255,255,.18); }
.pc-sidebar.collapsed { width: 84px; }
.pc-sidebar.collapsed .brand { justify-content:center; padding-left: 12px; padding-right: 12px; }
.pc-sidebar.collapsed .brand-mark { display: none; }
.pc-sidebar.collapsed .sidebar-toggle { margin-left: 0; }
.fab-new { align-items:center; background:var(--primary); border:none; border-radius:50%; bottom:24px; box-shadow:0 6px 18px rgba(0,0,0,.28); color:#fff; cursor:pointer; display:flex; font-size:30px; font-weight:700; height:58px; justify-content:center; line-height:1; position:fixed; right:24px; width:58px; z-index:1400; transition:background .15s, transform .15s; }
.fab-new:hover { background:var(--primary-dark); transform:translateY(-2px); }
.shift-aware { position:relative; }
.fab-new.shift-aware { position:fixed; }
.shift-live-badge { align-items:center; background:#e1583d; border:3px solid #fff; border-radius:999px; box-shadow:0 4px 12px rgba(133,43,30,.35); color:#fff; display:none; font-size:10px; font-style:normal; height:19px; justify-content:center; line-height:1; position:absolute; right:-3px; top:-3px; width:19px; }
.has-active-shift .shift-live-badge { display:flex; animation:shiftPulse 1.6s ease-in-out infinite; }
.no-active-shift .shift-live-badge { display:flex; background:#f59e0b; box-shadow:0 4px 12px rgba(245,158,11,.35); font-weight:900; font-size:11px; }
.nav-link.shift-aware { position: relative; padding-right: 44px; }
.nav-link.shift-aware .shift-live-badge { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); border: none; box-shadow: none !important; }
.has-active-shift.nav-link.shift-aware .shift-live-badge { animation: none; }
.pc-sidebar.collapsed .nav-link.shift-aware { padding-right: 0; }
.pc-sidebar.collapsed .nav-link.shift-aware .shift-live-badge { right: 20px; top: 6px; transform: none; border: 2px solid var(--primary-dark); }
@keyframes shiftPulse { 0%, 100% { transform:scale(1); } 50% { transform:scale(1.12); } }
@media print { .fab-new { display:none !important; } }
@media(max-width:960px) { .fab-new { display:none; } }
@media (display-mode: standalone) { .fab-new { display:none !important; } }
.pc-sidebar.collapsed .brand-copy, .pc-sidebar.collapsed .municipality, .pc-sidebar.collapsed .sidebar-footer { display: none; }
.pc-sidebar.collapsed .nav-link { justify-content:center; padding: 12px 0; font-size: 0; gap: 0; }
.pc-sidebar.collapsed .nav-link .nav-icon { margin: 0; font-size: 17px; }
.pc-sidebar.collapsed + .pc-main { margin-left: 84px; width: calc(100% - 84px); }
.brand-mark { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--primary); font-size: 18px; font-weight: 800; }
.brand h1 { font-size: 24px; line-height: 1; letter-spacing: .06em; margin: 0 0 4px; }
.brand p { color: var(--jade-light); margin: 0; font-size: 14px; }
.municipality { margin: 0 20px 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.16); font-size: 13px; color: var(--jade-light); }
.side-nav { display: grid; gap: 5px; padding: 4px 12px 12px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.32) transparent; }
.side-nav::-webkit-scrollbar { width: 6px; } .side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 8px; }
.nav-link { align-items: center; background: transparent; border: 0; border-radius: 10px; color: #e9efe3; display: flex; gap: 12px; font-weight: 600; padding: 12px; text-align: left; width: 100%; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.14); color: #fff; }
.nav-link.active { box-shadow: inset 3px 0 white; }
.nav-icon { width: 24px; text-align: center; font-size: 17px; font-weight: 800; }
.nav-section { color: rgba(233,239,227,.45); font-size: 10px; font-weight: 800; letter-spacing: .09em; margin: 16px 0 5px; padding: 0 12px; text-transform: uppercase; }
.side-nav .nav-section:first-child { margin-top: 4px; }
.pc-sidebar.collapsed .nav-section { display: none; }
.nav-divider { border-top: 1px solid rgba(255,255,255,.14); margin: 8px; }
.sidebar-footer { background: var(--primary-dark); border-top: 1px solid rgba(255,255,255,.16); display: grid; flex-shrink: 0; gap: 5px; padding: 14px 20px max(14px, env(safe-area-inset-bottom)); font-size: 13px; color: var(--jade-light); }
.sidebar-footer strong { color: white; }
.sidebar-footer button { background: transparent; border: 1px solid rgba(255,255,255,.26); border-radius: 8px; color: white; margin-top: 10px; padding: 8px 10px; }
.pc-main { flex: 1; margin-left: var(--sidebar-width); min-width: 0; width: calc(100% - var(--sidebar-width)); }
.topbar { align-items: center; background: var(--card); border-bottom: 1px solid var(--border); display: flex; gap: 16px; padding: 15px 28px; position: sticky; top: 0; z-index: 40; }
.topbar h2 { font-size: 24px; line-height: 1.15; margin: 0; }
.topbar-subtitle { margin: 2px 0 0; color: var(--text-muted); font-size: 13px; }
.menu-btn { background: transparent; border: 0; color: var(--text); display: none; font-size: 24px; }
.topbar-actions { align-items: center; display: flex; gap: 16px; margin-left: auto; }
.notice-btn { background: white; border: 1px solid var(--border); border-radius: 50%; height: 42px; width: 42px; position: relative; }
.notice-btn span { background: var(--danger); border: 2px solid white; border-radius: 50%; color: white; display: grid; font-size: 10px; font-weight: 800; height: 19px; place-items: center; position: absolute; right: -4px; top: -4px; width: 19px; }
.notice-btn span.empty { background: var(--primary); }
.datetime { font-size: 12px; line-height: 1.35; color: var(--text-muted); text-align: right; }
.datetime strong { color: var(--text); font-size: 14px; }
.page-content { max-width: none; min-width: 0; padding: 28px; width: 100%; }
.page-content > * { max-width: 100%; min-width: 0; }
.loading { color: var(--text-muted); text-align: center; padding: 48px; }
.page-content > .header { background: transparent; color: var(--text); margin: 0 0 18px !important; padding: 0; text-align: left; }
.page-content > .header h1 { color: var(--primary-dark); font-size: 27px; margin: 0 0 4px; }
.page-content > .header p { color: var(--text-muted); margin: 0; }
.section-intro { color: var(--text-muted); font-size: 14px; margin: 0 0 16px; }
.content-title-row { align-items:center; display:flex; flex-wrap:wrap; gap:8px; }
.content-help { display:inline-flex; position:relative; }
.content-help summary { align-items:center; background:var(--primary-light); border:1px solid var(--border); border-radius:50%; color:var(--primary-dark); display:flex; font-size:13px; font-weight:900; height:28px; justify-content:center; list-style:none; width:28px; }
.content-help summary::-webkit-details-marker { display:none; }
.content-help summary:hover, .content-help[open] summary { background:var(--primary); color:#fff; }
.content-help-card { background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:0 18px 38px rgba(42,51,40,.22); color:var(--text); left:0; line-height:1.35; padding:16px; position:absolute; top:calc(100% + 8px); width:min(390px, calc(100vw - 56px)); z-index:80; }
.content-help-card strong { color:var(--primary-dark); }
.content-help-card p { color:var(--text-muted); font-size:13px; margin:0 0 9px; }
.content-help-card ul { margin:0 0 9px 18px; padding:0; }
.content-help-card li { color:var(--text); font-size:13px; margin:0 0 5px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; padding: 18px; }
.card-title { color: var(--primary-dark); font-size: 15px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.btn { align-items: center; border: 1px solid transparent; border-radius: var(--radius-sm); display: inline-flex; justify-content: center; font-weight: 700; padding: 11px 18px; text-decoration: none; width: 100%; }
.btn-primary { background: var(--primary); color: white; } .btn-primary:hover { background: var(--primary-dark); }
.form-group { margin-bottom: 14px; }
.form-group label { color: var(--text-muted); display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; text-transform: uppercase; }
.form-group input, .form-group select, .form-group textarea, input, select, textarea { background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 11px 12px; width: 100%; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(123,150,105,.2); outline: none; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; }
/* Formularios accesibles estilo SIGES: labels teal, inputs grandes con esquinas redondeadas y sombra suave */
.big-form input, .big-form select, .big-form textarea,
.ops-form:not(.compact-form) input, .ops-form:not(.compact-form) select, .ops-form:not(.compact-form) textarea {
    background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 3px rgba(42,51,40,.06);
    color: var(--text); font-size: 1.1rem !important; min-height: 56px; padding: 15px 16px;
}
.big-form textarea, .ops-form:not(.compact-form) textarea { min-height: 100px; }
.big-form input::placeholder, .big-form textarea::placeholder,
.ops-form:not(.compact-form) input::placeholder, .ops-form:not(.compact-form) textarea::placeholder { color: #9aa693; }
.big-form input:focus, .big-form select:focus, .big-form textarea:focus,
.ops-form:not(.compact-form) input:focus, .ops-form:not(.compact-form) select:focus, .ops-form:not(.compact-form) textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(123,150,105,.22); }
.big-form label, .big-form .form-group label, .ops-form:not(.compact-form) label {
    color: var(--primary-dark); font-size: .9rem; font-weight: 800; letter-spacing: .02em; margin-bottom: 9px; text-transform: uppercase;
}
.big-form .btn, .ops-form:not(.compact-form) .btn { font-size: 1.05rem; min-height: 54px; padding: 14px 18px; }
.big-form input[type="checkbox"], .big-form input[type="radio"],
.ops-form:not(.compact-form) input[type="checkbox"], .ops-form:not(.compact-form) input[type="radio"] { box-shadow: none; min-height: 0; transform: scale(1.3); }
.kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.kpi-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; position: relative; overflow: hidden; }
.kpi-card:after { background: linear-gradient(90deg, var(--primary), var(--sage)); bottom: 0; content: ""; height: 4px; left: 0; position: absolute; right: 0; }
.kpi-value { color: var(--primary-dark); font-size: 31px; font-weight: 900; overflow-wrap: anywhere; } .kpi-label { color: var(--text-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.guardia-item { border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; cursor: pointer; margin-top: 10px; padding: 13px; transition: box-shadow .15s; }
.guardia-item:hover { box-shadow: var(--shadow); } .guardia-item.urgente { border-left-color: var(--danger); } .guardia-item.alta { border-left-color: var(--warning); } .guardia-item.media { border-left-color: #d4a017; } .guardia-item.baja { border-left-color: var(--primary); }
.semaforo { border-radius: 50%; display: inline-block; height: 10px; width: 10px; margin-right: 6px; }
.semaforo.urgente { background: var(--danger); }
.semaforo.alta { background: var(--warning); }
.semaforo.media { background: #d4a017; }
.semaforo.baja { background: var(--primary); }
.guardia-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 7px; } .guardia-id { font-weight: 800; }
.guardia-badge { background: var(--primary-light); border-radius: 999px; color: var(--primary-dark); font-size: 11px; font-weight: 800; padding: 4px 10px; text-transform: uppercase; }
.back-btn {
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--primary-dark);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.back-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}
.back-btn:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(123,150,105,.22);
}
.badge-urgente { background: #f4dcdc; color: var(--danger); } .badge-pendiente, .badge-en_progreso { background: #faecc8; color: #735319; }
.guardia-meta { color: var(--text-muted); font-size: 13px; }
.notifications { background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 14px 32px rgba(64,78,59,.16); display: none; padding: 18px; position: fixed; right: 26px; top: 72px; width: 340px; z-index: 1002; }
.notifications.active { display: block; } .notifications h3 { margin: 0 0 12px; } .notifications p { border-top: 1px solid var(--border); font-size: 14px; margin: 0; padding: 11px 0; }
.notification-list { display:grid; gap:8px; }
.notification-item { background:var(--surface-alt); border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:12px; color:var(--text); display:grid; gap:3px; margin-top:8px; padding:10px 12px; text-align:left; width:100%; }
.notification-item strong { color:var(--primary-dark); font-size:14px; }
.notification-item span { color:var(--text-muted); font-size:12px; line-height:1.35; }
.notification-item.critical { border-left-color:var(--danger); }
.notification-item.critical strong { color:var(--danger); }
.notification-item.warning { border-left-color:var(--warning); }
.bottom-nav, .drawer-overlay, .mobile-more-overlay, .mobile-more-sheet { display: none; } .access-denied { max-width: 520px; }
.pwa-install-card { align-items:center; background:white; border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:var(--radius); box-shadow:0 12px 30px rgba(64,78,59,.14); display:none; gap:14px; justify-content:space-between; padding:14px 16px; position:fixed; right:24px; top:84px; width:min(420px, calc(100vw - 32px)); z-index:1003; }
.pwa-install-card strong { color:var(--primary-dark); display:block; font-size:16px; }
.pwa-install-card p { color:var(--text-muted); margin:2px 0 0; }
.pwa-install-actions { align-items:center; display:flex; flex-shrink:0; gap:8px; }
@media (min-width: 961px) {
    .pwa-install-card, .pwa-install-card.active { display:none !important; }
}
.dashboard-intro { margin-bottom: 18px; }
.dashboard-intro-admin { align-items:flex-start; display:flex; gap:12px; justify-content:space-between; }
.dashboard-intro h1 { color: var(--primary-dark); font-size: 28px; margin: 0 0 4px; }
.dashboard-intro p, .kpi-hint { color: var(--text-muted); margin: 0; }
.reset-system-trigger { align-items:center; background:#fff; border:1px solid #e5b8b8; border-radius:999px; box-shadow:var(--shadow); color:var(--danger); display:inline-flex; flex-shrink:0; gap:8px; font-weight:900; justify-content:center; min-height:42px; padding:9px 13px; }
.reset-system-trigger:hover { background:#fff4f4; border-color:#d69a9a; transform:translateY(-1px); }
.reset-system-icon { align-items:center; background:#f4dcdc; border-radius:50%; display:inline-flex; font-size:17px; height:26px; justify-content:center; line-height:1; width:26px; }
.reset-system-label { font-size:13px; letter-spacing:.01em; white-space:nowrap; }
.reset-system-dialog { background:white; border:0; border-radius:22px; box-shadow:0 28px 70px rgba(42,51,40,.28); max-width:min(560px, calc(100vw - 28px)); overflow:hidden; padding:0; }
.reset-system-dialog::backdrop { background:rgba(42,51,40,.45); }
.reset-system-head { align-items:flex-start; background:linear-gradient(135deg,#fff4f4,#ffffff); border-bottom:1px solid #efd0d0; display:flex; gap:14px; padding:20px 20px 18px; position:relative; }
.reset-system-head h2 { color:var(--danger); font-size:24px; line-height:1.1; margin:0 0 6px; }
.reset-system-head p { color:var(--text-muted); margin:0; }
.reset-system-kicker { color:var(--danger) !important; font-size:11px; font-weight:900; letter-spacing:.08em; margin-bottom:4px !important; text-transform:uppercase; }
.reset-system-mark { align-items:center; background:#f4dcdc; border:1px solid #e5b8b8; border-radius:16px; color:var(--danger); display:flex; flex-shrink:0; font-size:22px; height:46px; justify-content:center; width:46px; }
.reset-system-close { background:white; border:1px solid #efd0d0; border-radius:50%; color:var(--danger); flex-shrink:0; font-size:22px; height:36px; line-height:1; margin-left:auto; width:36px; }
.reset-system-close:hover { background:#fff4f4; }
.reset-system-box { display:grid; gap:16px; margin:0; padding:20px; }
.reset-system-warning { background:#fff8f8; border:1px solid #efd0d0; border-left:4px solid var(--danger); border-radius:14px; color:var(--text); display:grid; gap:4px; padding:13px 14px; }
.reset-system-warning strong { color:var(--danger); }
.reset-system-warning span { color:var(--text-muted); font-size:13px; line-height:1.45; }
.reset-key-field { margin:0; }
.reset-key-field span { color:var(--primary-dark); display:block; font-size:13px; font-weight:900; letter-spacing:.04em; margin-bottom:7px; text-transform:uppercase; }
.reset-key-field input { border-width:1.5px; font-size:16px; padding:13px 14px; }
.reset-key-field small { color:var(--text-muted); display:block; font-size:12px; margin-top:7px; }
.reset-system-actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.reset-cancel { min-width:120px; }
.danger-action { background:var(--danger); border-color:var(--danger); color:white; min-width:170px; }
.danger-action:hover { background:#7c2d2d; }
.help-launcher { align-items: center; background: var(--primary-light); border: 1px solid var(--border); border-radius: var(--radius); display: flex; gap: 18px; justify-content: space-between; margin-bottom: 20px; padding: 16px 18px; }
.help-launcher strong { color: var(--primary-dark); display: block; font-size: 17px; margin-bottom: 3px; }
.help-launcher p { color: var(--text-muted); margin: 0; }
.help-actions { display: flex; flex-wrap:wrap; gap: 10px; flex-shrink: 0; }
.btn-outline { background: white; border-color: var(--primary); color: var(--primary-dark); }
.btn-outline:hover { background: var(--surface-alt); }
.kpi-card.urgent .kpi-value { color: var(--danger); }
.dashboard-actions { display:grid; gap:12px; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:16px; }
.action-card { background: linear-gradient(180deg, #ffffff, #f8faf6); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); color: var(--text); padding: 16px; text-align:left; width:100%; }
.action-card strong { color: var(--primary-dark); display:block; font-size:16px; margin:2px 0 6px; }
.action-card p { color: var(--text-muted); font-size:13px; line-height:1.45; margin:0; }
.action-kicker { color: var(--primary); display:block; font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.action-card:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(64, 78, 59, .12); }
.operation-alerts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr); }
.section-header { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.compact { padding: 9px 13px; width: auto; }
.text-btn { background: transparent; border: 0; color: var(--primary-dark); font-weight: 800; }
.search-row { margin-bottom: 10px; } .search-row input { max-width: 100%; }
.map-preview { background: linear-gradient(135deg,#e6ece0,#f8faf6); border: 1px solid var(--border); border-radius: 14px; height: 260px; overflow: hidden; position: relative; }
.quick-map-status { background:white; border:1px solid var(--border); border-radius:9px; color:var(--text-muted); left:12px; padding:7px 10px; position:absolute; top:12px; z-index:500; }
.legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; color: var(--text-muted); font-size: 13px; font-weight: 700; flex-wrap: wrap; }
.legend i { border-radius: 50%; display: inline-block; height: 10px; margin-right: 5px; width: 10px; } .legend .red { background: #ef4444; } .legend .orange { background: #f97316; } .legend .green { background: #10b981; }
.ia-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); }
.ia-provider-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 14px; }
.ia-zone-prompts { border-top:1px solid var(--border); display:grid; gap:10px; margin-top:10px; padding-top:16px; }
.ia-zone-card { background:var(--surface-alt); border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.ia-zone-card summary { cursor:pointer; display:grid; gap:3px; padding:12px 14px; }
.ia-zone-card summary strong { color:var(--primary-dark); }
.ia-zone-card summary span { color:var(--text-muted); font-size:12px; }
.ia-zone-card .form-group { margin:0; padding:0 14px 12px; }
.ia-zone-card textarea { min-height:112px; }
.switch-row { align-items: center; display: flex; gap: 10px; margin-bottom: 16px; }
.switch-row input { width: auto; }
.config-status { border-radius: 12px; margin-top: 12px; padding: 12px 14px; }
.config-status.ok { background: #dceedc; color: #2f673b; }
.config-status.fail { background: #f4dcdc; color: #7c2d2d; }
.muted { color: var(--text-muted); font-size: 13px; }
.guide-hero { align-items: center; background: linear-gradient(120deg, var(--primary-dark), var(--primary)); border-radius: var(--radius); color: white; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 18px; padding: 22px; }
.guide-hero h1 { font-size: 26px; margin: 0 0 5px; }
.guide-hero p { color: #e7efe1; margin: 0; max-width: 650px; }
.guide-hero .btn { background: white; color: var(--primary-dark); width: auto; }
.tour-shell { display: grid; gap: 16px; grid-template-columns: minmax(210px, .34fr) minmax(0, 1fr); }
.tour-index { display: grid; gap: 8px; align-content: start; }
.tour-step-btn { align-items: center; background: white; border: 1px solid var(--border); border-radius: 12px; color: var(--text-muted); display: flex; gap: 10px; font-weight: 700; padding: 12px; text-align: left; }
.tour-step-btn b { background: var(--surface-alt); border-radius: 50%; color: var(--primary-dark); display: grid; flex-shrink: 0; height: 28px; place-items: center; width: 28px; }
.tour-step-btn.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.tour-step-btn.active b { background: var(--primary); color: white; }
.tour-slide { display: none; min-height: 320px; }
.tour-slide.active { display: block; }
.tour-slide h2 { color: var(--primary-dark); margin: 0 0 8px; }
.tour-slide p { line-height: 1.55; }
.tour-checklist { display: grid; gap: 10px; list-style: none; margin: 18px 0; padding: 0; }
.tour-checklist li { align-items: flex-start; background: var(--surface-alt); border-radius: 10px; display: flex; gap: 9px; padding: 10px 12px; }
.tour-checklist li:before { color: var(--primary); content: "✓"; font-weight: 900; }
.tour-nav { align-items: center; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; padding-top: 14px; }
.tour-nav .btn { width: auto; }
.manual-layout { display: grid; gap: 16px; grid-template-columns: minmax(190px, .27fr) minmax(0, 1fr); }
.manual-toc { align-self: start; position: sticky; top: 92px; }
.manual-toc a { border-radius: 8px; color: var(--primary-dark); display: block; font-weight: 700; margin-top: 5px; padding: 8px 9px; text-decoration: none; }
.manual-toc a:hover { background: var(--primary-light); }
.manual-body h2 { border-bottom: 1px solid var(--border); color: var(--primary-dark); font-size: 20px; margin: 0 0 12px; padding-bottom: 8px; }
.manual-body h3 { color: var(--primary-dark); font-size: 16px; margin: 18px 0 7px; }
.manual-body { min-width:0; }
.manual-body section { scroll-margin-top: 92px; }
.manual-body ol, .manual-body ul { line-height: 1.6; padding-left: 22px; }
.manual-note { background: var(--primary-light); border-left: 4px solid var(--primary); border-radius: 8px; color: var(--primary-dark); margin: 12px 0; padding: 12px; }
.manual-table { border-collapse: collapse; font-size: 14px; width: 100%; }
.manual-table th, .manual-table td { border-bottom: 1px solid var(--border); padding: 10px 8px; text-align: left; vertical-align: top; }
.manual-table th { color: var(--text-muted); text-transform: uppercase; }
.manual-complete-layout { grid-template-columns:minmax(220px,.3fr) minmax(0,1fr); }
.manual-complete-body p { line-height:1.6; }
.manual-complete-body section { overflow-x:auto; }
.manual-complete-body .manual-table { margin-bottom:12px; }
.manual-complete-body .manual-table td:first-child { color:var(--primary-dark); font-weight:800; width:24%; }
.manual-end-actions { display:flex; gap:10px; margin-top:16px; }
.manual-end-actions .btn { width:auto; }
.product-tour-layer { display: none; position: fixed; inset: 0; z-index: 2500; }
.product-tour-layer.active { display: block; }
.tour-shade { background: rgba(20,27,20,.67); position: fixed; transition: all .28s ease; }
.tour-focus-ring { border: 3px solid #fff; border-radius: 14px; box-shadow: 0 0 0 4px rgba(123,150,105,.75), 0 0 24px rgba(0,0,0,.28); pointer-events: none; position: fixed; transition: all .3s ease; z-index: 2501; }
.tour-focus-ring:after { animation: tourPulse 1.4s ease-out infinite; border: 2px solid rgba(255,255,255,.76); border-radius: inherit; content: ""; inset: -9px; position: absolute; }
@keyframes tourPulse { from { opacity: .8; transform: scale(.98); } to { opacity: 0; transform: scale(1.05); } }
.tour-tooltip { background: white; border-radius: 16px; box-shadow: 0 18px 45px rgba(0,0,0,.25); color: var(--text); max-width: min(370px, calc(100vw - 28px)); padding: 17px; position: fixed; transition: opacity .18s ease, transform .22s ease; z-index: 2502; }
.tour-tooltip.enter { opacity: 0; transform: translateY(9px); }
.tour-tooltip-top { align-items: center; display: flex; justify-content: space-between; margin-bottom: 9px; }
.tour-tooltip-progress { color: var(--text-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tour-tooltip-close { background: transparent; border: 0; color: var(--text-muted); font-size: 22px; line-height: 1; padding: 0 4px; }
.tour-tooltip h3 { color: var(--primary-dark); font-size: 18px; margin: 0 0 7px; }
.tour-tooltip p { color: var(--text-muted); line-height: 1.42; margin: 0 0 15px; }
.tour-tooltip-actions { display: flex; gap: 8px; justify-content: flex-end; }
.tour-tooltip-actions .btn { width: auto; }
.tour-running { overflow: hidden; }
.operation-alerts { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.operation-alerts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 700px; }
.ops-today-hero { align-items:center; background:linear-gradient(135deg,var(--primary-dark),var(--primary)); border-radius:var(--radius); box-shadow:var(--shadow); color:#fff; display:flex; gap:18px; justify-content:space-between; margin-bottom:16px; padding:20px; }
.ops-today-hero h2 { color:#fff; font-size:24px; margin:2px 0 5px; }
.ops-today-hero p { color:rgba(255,255,255,.82); margin:0; max-width:760px; }
.ops-eyebrow { color:var(--jade-light); font-size:12px; font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
.ops-hero-actions { display:flex; flex:0 0 auto; gap:9px; }
.ops-hero-actions .btn { white-space:nowrap; width:auto; }
.ops-start-guardia-btn { background:#fff; color:var(--primary-dark); }
.ops-shift-live-btn, .ops-shift-live-btn:disabled { background:#fff; border-color:#fff; color:var(--primary-dark); opacity:1; }
.ops-active-shift { border-left:4px solid var(--primary); }
.ops-active-shift.is-active { background:linear-gradient(135deg,#f3f8ef,#fff); border-color:#b9c9ae; border-left-color:var(--primary); }
.ops-live-dot { background:#22c55e; border-radius:50%; box-shadow:0 0 0 5px rgba(34,197,94,.15); display:inline-block; height:10px; margin-left:7px; vertical-align:middle; width:10px; }
.ops-active-shift-data { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.ops-active-shift-data span { background:#fff; border:1px solid var(--border); border-radius:999px; color:var(--text-muted); font-size:12px; padding:7px 10px; }
.ops-active-shift-data strong { color:var(--primary-dark); margin-right:5px; }
.ops-close-shift-form { display:grid; gap:9px; grid-template-columns:minmax(0,1fr) auto; }
.ops-close-shift-form textarea { min-height:52px; }
.ops-close-shift-form .btn { align-self:stretch; width:auto; }
details.ops-turno-log { border-top:1px solid var(--border); margin-top:12px; padding-top:12px; }
details.ops-turno-log > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; user-select: none; }
details.ops-turno-log > summary::-webkit-details-marker { display: none; }
details.ops-turno-log > summary strong { color:var(--primary-dark); font-size:13px; text-transform:uppercase; }
details.ops-turno-log .chevron-icon { transition: transform 0.2s ease; color: var(--primary-dark); font-size: 11px; }
details.ops-turno-log[open] .chevron-icon { transform: rotate(180deg); }
details.ops-turno-log .ops-turno-log-content { display:grid; gap:8px; margin-top:12px; }
.ops-turno-log-row { align-items:flex-start; display:grid; gap:10px; grid-template-columns:48px 1fr; }
.ops-turno-log-row > span { background:var(--primary-light); border-radius:999px; color:var(--primary-dark); font-size:12px; font-weight:900; padding:4px 7px; text-align:center; }
.ops-turno-log-row b, .ops-turno-log-row small { display:block; }
.ops-turno-log-row b { color:var(--text); font-size:13px; }
.ops-turno-log-row small { color:var(--text-muted); font-size:12px; margin-top:2px; }
.ops-shift-modal { background:#fff; border:0; border-radius:22px; box-shadow:0 24px 70px rgba(15,23,42,.34); max-width:620px; overflow:hidden; padding:0; width:calc(100% - 32px); }
.ops-shift-modal::backdrop { background:rgba(15,23,42,.5); }
.ops-shift-modal-head { align-items:center; background:linear-gradient(135deg,var(--primary-dark),var(--primary)); color:#fff; display:flex; justify-content:space-between; gap:16px; padding:18px 20px; }
.ops-shift-modal-head span { color:var(--jade-light); display:block; font-size:11px; font-weight:900; letter-spacing:.1em; margin-bottom:3px; text-transform:uppercase; }
.ops-shift-modal-head h2 { color:#fff; font-size:20px; line-height:1.1; margin:0; }
.ops-shift-modal-head button { align-items:center; background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.24); border-radius:50%; color:#fff; display:flex; flex:0 0 auto; font-size:26px; height:38px; justify-content:center; line-height:1; padding:0 0 2px; width:38px; }
.ops-shift-modal-head button:hover { background:rgba(255,255,255,.28); }
.ops-shift-form { display:grid; gap:14px; max-height:min(78vh, 680px); overflow:auto; padding:18px; }
.ops-shift-grid { display:grid; gap:12px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.ops-shift-grid .wide { grid-column:1 / -1; }
.ops-shift-form .form-group { margin:0; }
.ops-shift-actions { border-top:1px solid var(--border); display:flex; gap:10px; justify-content:flex-end; padding-top:14px; }
.ops-shift-actions .btn { width:auto; }
.ops-today-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ops-today-metrics .kpi-card { cursor:pointer; text-align:left; width:100%; }
.ops-today-metrics button.kpi-card { color:inherit; font:inherit; }
.ops-command-grid { align-items:start; display:grid; gap:16px; grid-template-columns:minmax(0,1.45fr) minmax(320px,.55fr); margin-bottom:16px; }
.ops-side-stack { display:grid; gap:16px; }
.ops-board { margin-bottom:0; }
.ops-board-primary { border-left:4px solid var(--warning); }
.ops-mini-list { display:grid; gap:8px; }
.ops-mini-list span { background:var(--surface-alt); border-radius:10px; color:var(--text-muted); display:flex; justify-content:space-between; padding:10px 12px; }
.ops-mini-list strong { color:var(--primary-dark); font-size:18px; }
.ops-workflow { display:grid; gap:16px; grid-template-columns:repeat(3,minmax(0,1fr)); }
@media (max-width: 960px) {
    .ops-workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .ops-workflow { grid-template-columns: 1fr; }
}
.ops-flow-card { display:flex; flex-direction:column; justify-content:space-between; margin-bottom:0; height:100%; transition:transform 0.22s cubic-bezier(0.16,1,0.3,1), box-shadow 0.22s ease, border-color 0.22s ease; }
.ops-flow-card.interactive-card { cursor:pointer; }
.ops-flow-card.interactive-card:hover { transform:translateY(-4px); box-shadow:0 10px 24px rgba(64,78,59,.12); border-color:var(--primary); }
.ops-flow-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.ops-flow-icon { font-size:22px; background:var(--primary-light); width:40px; height:40px; display:flex; align-items:center; justify-content:center; border-radius:10px; box-shadow:inset 0 1px 3px rgba(0,0,0,.04); }
.ops-flow-card.interactive-card strong { color:var(--primary-dark); font-size:18px; font-weight:700; margin-bottom:6px; }
.ops-flow-card.interactive-card p { color:var(--text-muted); margin:0 0 16px 0; font-size:14px; line-height:1.45; min-height:48px; flex-grow:1; }
.ops-flow-card.interactive-card .card-action { margin-top:auto; width:100%; }
.ops-flow-card.interactive-card .card-action .btn { width:100%; text-align:center; font-weight:600; transition:background .2s, border-color .2s, color .2s; }
.ops-flow-card.interactive-card:hover .card-action .btn { background:var(--primary) !important; border-color:var(--primary) !important; color:#fff !important; }
.ops-inline-tool { background:var(--surface-alt); border:1px solid var(--border); border-radius:12px; padding:10px; }
.ops-inline-tool summary { color:var(--primary-dark); cursor:pointer; font-weight:900; list-style:none; }
.ops-inline-tool summary::-webkit-details-marker { display:none; }
.ops-inline-tool summary:before { content:"+"; display:inline-block; font-weight:900; margin-right:7px; }
.ops-inline-tool[open] summary:before { content:"-"; }
.ops-inline-tool .ops-form { margin-top:10px; }
.ops-recent-turnos { border-top:1px solid var(--border); display:grid; gap:5px; margin-top:10px; padding-top:8px; }
.ops-recent-turnos span { color:var(--text-muted); font-size:12px; }
.ops-module-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; margin-bottom: 16px; }
.ops-module-nav .btn { width: 100%; }
.ops-module-nav .active { background:var(--primary); border-color:var(--primary); color:white; }
.ops-success { background: var(--primary-light); color: var(--primary-dark); }
.ops-back { margin-bottom: 16px; }
.ops-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ops-full { grid-column: 1 / -1; }
.ops-form { display: grid; gap: 8px; margin-top: 12px; }
.ops-form.separated { border-top: 1px solid var(--border); margin-top: 15px; padding-top: 14px; }
.ops-form.horizontal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ops-form.horizontal textarea, .ops-form.horizontal .btn { grid-column: 1 / -1; }
.ops-form-wide { grid-column: 1 / -1; }
.ops-list { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 8px; }
.ops-list p { border-bottom: 1px solid var(--border); margin: 0; padding: 8px 0; }
.ops-entry { background: var(--surface-alt); border-radius: 10px; margin-top: 9px; padding: 10px; }
.ops-entry.overdue { background: #f8e3e3; border-left: 4px solid var(--danger); }
.ops-entry-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:9px; }
.inline-fields, .inline-form { display: flex; gap: 6px; margin-top: 8px; }
.inline-fields > *, .inline-form > * { min-width: 0; }
.inline-form input { flex: 1; }
.ops-check { align-items: center; color: var(--text-muted); display: flex; font-size: 13px; font-weight: 700; gap: 7px; }
.ops-check input { width: auto; }
.ops-link { display: block; margin-top: 8px; padding: 0; }
.ops-mobile-flow { background:var(--primary-light); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:16px; padding:14px; }
.ops-quick-actions { display:grid; gap:10px; grid-template-columns:repeat(4,minmax(0,1fr)); }
.ops-quick-actions .action-card { box-shadow:none; padding:12px; }
.ops-quick-actions .action-card strong { font-size:14px; }
.ops-work-queue { border-left:4px solid var(--warning); }
.ops-task { align-items:start; background:var(--surface-alt); border-left:4px solid var(--warning); border-radius:12px; display:grid; gap:10px; grid-template-columns:minmax(220px,1fr) auto; margin-top:9px; padding:12px; }
.ops-task.critical { background:#fff5f5; border-left-color:var(--danger); }
.ops-task-main { display:grid; gap:3px; }
.ops-task-type { color:var(--danger); font-size:11px; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.ops-task-actions { display:flex; gap:7px; }
.ops-sla-form { display:flex; gap:7px; grid-column:1 / -1; }
.ops-sla-form select, .ops-sla-form input { flex:1; }
.ops-sla-form .btn { flex-shrink:0; }
.compact-form { background: white; border-radius: 8px; margin-top: 9px; padding: 9px; }
.receipt { max-width: 650px; padding: 30px; }
.receipt header { border-bottom: 2px solid var(--primary); margin-bottom: 24px; padding-bottom: 15px; }
.receipt header h1 { color: var(--primary-dark); margin: 0 0 4px; }
.receipt header p { color: var(--text-muted); margin: 0; }
.receipt dl { background: var(--surface-alt); border-radius: 12px; display: grid; gap: 9px; grid-template-columns: 180px 1fr; margin: 20px 0; padding: 18px; }
.receipt dt { color: var(--text-muted); font-weight: 700; }
.receipt dd { font-weight: 800; margin: 0; }
.receipt-actions { display: flex; gap: 9px; margin-top: 20px; }
.audit-row { align-items:center; background:var(--surface-alt); border-radius:12px; display:flex; justify-content:space-between; gap:12px; padding:12px 14px; }
.audit-row strong { color:var(--primary-dark); display:block; margin-bottom:2px; }
.graph-board { display:grid; gap:14px; }
.graph-cluster { background:var(--surface-alt); border:1px solid var(--border); border-radius:18px; padding:16px; }
.graph-cluster.linked { border-left:4px solid var(--primary); }
.graph-cluster.isolated { border-left:4px solid var(--warning); }
.graph-cluster-head { align-items:flex-start; display:flex; gap:12px; justify-content:space-between; margin-bottom:12px; }
.graph-kpi-stack { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.graph-collapse-toggle { align-items:center; display:inline-flex; gap:7px; }
.graph-collapse-icon { background:var(--primary-light); border-radius:999px; color:var(--primary-dark); display:inline-grid; font-size:16px; font-weight:900; height:20px; line-height:1; place-items:center; width:20px; }
.graph-cluster.collapsed .graph-cluster-head { margin-bottom:0; }
.graph-cluster.collapsed .graph-cluster-body { display:none; }
.graph-core { background:white; border:1px solid var(--border); border-radius:16px; padding:14px; }
.graph-core strong { color:var(--primary-dark); display:block; font-size:18px; margin:4px 0 5px; }
.graph-core p { color:var(--text-muted); margin:0 0 10px; }
.graph-core-note { color:var(--text-muted); font-size:12px; font-weight:800; letter-spacing:.04em; margin:0 0 10px; text-transform:uppercase; }
.graph-kicker { color:var(--primary); font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.graph-chips { display:flex; flex-wrap:wrap; gap:8px; }
.graph-visual { display:grid; gap:14px; grid-template-columns:minmax(0,1.4fr) minmax(260px,.8fr); margin-top:14px; }
.graph-stage { background:#f9fbf7; border:1px solid var(--border); border-radius:18px; min-height:420px; overflow:visible; position:relative; }
.graph-svg { height:100%; inset:0; position:absolute; width:100%; }
.graph-edge { cursor:help; pointer-events:stroke; stroke-width:1.8; stroke-linecap:round; opacity:.82; }
.graph-edge:hover, .graph-edge:focus { opacity:1; outline:none; stroke-width:3.2; }
.graph-edge.rel-expediente { stroke:var(--primary-dark); }
.graph-edge.rel-dni { stroke:#51657a; }
.graph-edge.rel-telefono { stroke:#7b9669; }
.graph-edge.rel-email { stroke:#4d6f8c; }
.graph-edge.rel-domicilio { stroke:#b6822a; }
.graph-edge.rel-manual { stroke:#795392; stroke-dasharray:3 2; stroke-width:2.3; }
.graph-edge.rel-base { stroke:#9aa79a; }
.graph-edge-tooltip { background:white; border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:12px; box-shadow:0 12px 26px rgba(42,51,40,.2); display:none; max-width:250px; padding:10px 12px; pointer-events:none; position:absolute; z-index:9; }
.graph-edge-tooltip.active { display:block; }
.graph-edge-tooltip strong, .graph-edge-tooltip span { display:block; }
.graph-edge-tooltip strong { color:var(--primary-dark); font-size:12px; margin-bottom:3px; }
.graph-edge-tooltip span { color:var(--text-muted); font-size:12px; line-height:1.35; }
.graph-node-floating { align-items:flex-start; background:white; border:1px solid var(--border); border-radius:16px; box-shadow:0 10px 18px rgba(64,78,59,.08); display:grid; gap:2px; padding:11px 12px; position:absolute; text-align:left; transform:translate(-50%,-50%); width:min(170px, 42vw); z-index:2; }
.graph-node-floating:hover { border-color:var(--primary); box-shadow:0 12px 22px rgba(64,78,59,.16); }
.graph-node-floating.urgent { border-left:4px solid var(--danger); }
.graph-node-code { color:var(--primary-dark); font-weight:900; }
.graph-node-meta { color:var(--text-muted); font-size:12px; line-height:1.25; }
.graph-node-hint { color:var(--primary); font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.graph-person { position:absolute; transform:translate(-50%,-50%); z-index:2; }
.graph-person.open, .graph-person:focus-within, .graph-person:hover { z-index:6; }
.graph-person-pin { align-items:center; background:white; border:2px solid var(--primary); border-radius:999px; box-shadow:0 7px 16px rgba(64,78,59,.14); color:var(--primary-dark); display:grid; gap:2px; justify-items:center; min-height:74px; min-width:74px; padding:7px; position:relative; }
.graph-person-pin:hover, .graph-person-pin:focus { background:var(--primary-light); box-shadow:0 10px 22px rgba(64,78,59,.22); outline:none; }
.graph-person.urgent .graph-person-pin { border-color:var(--danger); }
.graph-person-icon { align-items:center; background:var(--primary-light); border-radius:50%; display:grid; font-size:23px; height:35px; line-height:1; place-items:center; width:35px; }
.graph-person.urgent .graph-person-icon { background:#f4dcdc; }
.graph-person-key { font-size:10px; font-weight:900; line-height:1.1; max-width:82px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.graph-person-degree { background:var(--primary-dark); border:2px solid white; border-radius:999px; color:white; font-size:10px; font-weight:900; min-width:21px; padding:2px 5px; position:absolute; right:-5px; top:-5px; }
.graph-person-tooltip { background:white; border:1px solid var(--border); border-radius:14px; bottom:calc(100% + 10px); box-shadow:0 14px 30px rgba(42,51,40,.2); display:none; left:50%; padding:12px; position:absolute; transform:translateX(-50%); width:250px; z-index:8; }
.graph-person-tooltip:after { background:white; border-bottom:1px solid var(--border); border-right:1px solid var(--border); bottom:-7px; content:""; height:12px; left:calc(50% - 6px); position:absolute; transform:rotate(45deg); width:12px; }
.graph-person.near-left .graph-person-tooltip { left:-10px; transform:none; }
.graph-person.near-left .graph-person-tooltip:after { left:35px; }
.graph-person.near-right .graph-person-tooltip { left:auto; right:-10px; transform:none; }
.graph-person.near-right .graph-person-tooltip:after { left:auto; right:35px; }
.graph-person:hover .graph-person-tooltip, .graph-person:focus-within .graph-person-tooltip, .graph-person.open .graph-person-tooltip { display:block; }
.graph-person-tooltip strong { color:var(--primary-dark); display:block; font-size:14px; margin-bottom:3px; }
.graph-tooltip-case { color:var(--text-muted); display:block; font-size:11px; font-weight:800; margin-bottom:8px; text-transform:uppercase; }
.graph-person-tooltip dl { display:grid; font-size:12px; gap:4px 8px; grid-template-columns:62px 1fr; margin:0 0 10px; }
.graph-person-tooltip dt { color:var(--text-muted); font-weight:800; }
.graph-person-tooltip dd { color:var(--text); font-weight:700; margin:0; overflow-wrap:anywhere; }
.graph-open-case { position:relative; width:100%; z-index:1; }
.graph-stage-empty { background:rgba(255,255,255,.78); border:1px dashed var(--border); border-radius:14px; color:var(--text-muted); left:50%; padding:10px 12px; position:absolute; top:50%; transform:translate(-50%,-50%); z-index:1; }
.graph-intel { display:grid; gap:12px; }
.graph-legend { display:grid; gap:8px; margin-top:12px; }
.graph-legend-item { align-items:center; background:white; border:1px solid var(--border); border-radius:12px; display:flex; gap:10px; justify-content:space-between; padding:10px 12px; }
.graph-legend-item span { color:var(--text); font-size:13px; font-weight:700; flex:1; }
.graph-legend-item small { color:var(--text-muted); font-weight:800; }
.graph-legend-dot { border-radius:999px; display:inline-block; height:10px; width:10px; }
.graph-legend-dot.rel-expediente { background:var(--primary-dark); }
.graph-legend-dot.rel-dni { background:#51657a; }
.graph-legend-dot.rel-telefono { background:#7b9669; }
.graph-legend-dot.rel-email { background:#4d6f8c; }
.graph-legend-dot.rel-domicilio { background:#b6822a; }
.graph-legend-dot.rel-manual { background:#795392; }
.graph-legend-dot.rel-base { background:#9aa79a; }
.graph-node-list { display:grid; gap:8px; max-height:220px; overflow:auto; }
.graph-node-row { align-items:flex-start; background:white; border:1px solid var(--border); border-radius:12px; display:grid; gap:2px; padding:10px 12px; text-align:left; }
.graph-node-row strong { color:var(--primary-dark); font-size:14px; }
.graph-node-row span { color:var(--text-muted); font-size:12px; }
.graph-node-row small { color:var(--primary); font-size:11px; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }
.graph-node-row:hover { border-color:var(--primary); box-shadow:var(--shadow); }
.graph-evidence { background:white; border:1px solid var(--border); border-radius:16px; display:grid; gap:7px; padding:12px; }
.graph-evidence-row { border-left:3px solid #9aa79a; display:grid; gap:2px; padding:5px 8px; }
.graph-evidence-row.rel-manual { border-left-color:#795392; }
.graph-evidence-row.rel-expediente { border-left-color:var(--primary-dark); }
.graph-evidence-row.rel-dni { border-left-color:#51657a; }
.graph-evidence-row.rel-telefono { border-left-color:#7b9669; }
.graph-evidence-row.rel-email { border-left-color:#4d6f8c; }
.graph-evidence-row.rel-domicilio { border-left-color:#b6822a; }
.graph-evidence-row strong { color:var(--primary-dark); font-size:12px; }
.graph-evidence-row span { color:var(--text-muted); font-size:12px; }
.graph-link-builder { margin-bottom:16px; }
.graph-manual-links { border-top:1px solid var(--border); display:grid; gap:8px; margin-top:16px; padding-top:12px; }
.graph-manual-row { align-items:center; background:var(--surface-alt); border-radius:12px; display:flex; gap:12px; justify-content:space-between; padding:10px 12px; }
.graph-manual-row strong, .graph-manual-row span, .graph-manual-row small { display:block; }
.graph-manual-row strong { color:var(--primary-dark); }
.graph-manual-row span, .graph-manual-row small { color:var(--text-muted); margin-top:3px; }
.graph-builder-actions { align-items:center; display:flex; gap:10px; }
.alert-link { border:0; font:inherit; }
.alert-link:hover, .alert-link:focus { box-shadow:0 0 0 3px rgba(162,59,59,.18); outline:none; text-decoration:underline; }
.integration-grid { display:grid; gap:12px; grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:12px; }
.integration-card { background:var(--surface-alt); border:1px solid var(--border); border-left:4px solid var(--primary); border-radius:14px; padding:14px; }
.integration-card.priority-high { border-left-color:var(--danger); }
.integration-card.priority-medium { border-left-color:var(--warning); }
.integration-card.priority-low { border-left-color:var(--sage); }
.integration-card h2 { color:var(--primary-dark); font-size:17px; margin:10px 0 8px; }
.integration-card p { line-height:1.45; margin:7px 0; }
.integration-steps { line-height:1.6; margin-bottom:0; }
.ops-territory-grid { display:grid; gap:16px; grid-template-columns:minmax(0,1.1fr) minmax(300px,.9fr); }
.territory-ranking, .territory-points { display:grid; gap:8px; margin-top:12px; max-height:470px; overflow:auto; }
.territory-row { align-items:center; background:var(--surface-alt); border-left:4px solid var(--primary); border-radius:12px; display:flex; gap:12px; justify-content:space-between; padding:11px; }
.territory-row.critical { border-left-color:var(--danger); }
.territory-row.active { border-left-color:var(--warning); }
.territory-row strong, .territory-row span { display:block; }
.territory-row span { color:var(--text-muted); font-size:12px; margin-top:2px; }
.territory-counts { display:flex; flex-wrap:wrap; gap:5px; justify-content:flex-end; }
.territory-point { background:white; border:1px solid var(--border); border-radius:11px; display:grid; gap:3px; padding:11px; text-align:left; }
.territory-point:hover { border-color:var(--primary); }
.territory-point strong { color:var(--primary-dark); }
.territory-point span { color:var(--text-muted); font-size:12px; }
.relation-audit-list { display:grid; gap:9px; }
.relation-audit-row { align-items:center; background:var(--surface-alt); border-radius:12px; display:grid; gap:12px; grid-template-columns:minmax(210px,.65fr) 1fr; padding:12px; }
.relation-audit-row strong, .relation-audit-row small { display:block; margin-top:5px; }
.relation-audit-row small, .relation-audit-detail { color:var(--text-muted); font-size:12px; }
.relation-audit-detail { display:grid; gap:4px; }
.operations-summary-card { border-left:4px solid var(--primary); }
.operations-summary-kpis { display:grid; gap:8px; grid-template-columns:repeat(3,minmax(0,1fr)); margin-bottom:12px; }
.operations-summary-kpis div { background:var(--surface-alt); border-radius:10px; padding:9px; text-align:center; }
.operations-summary-kpis strong { color:var(--primary-dark); display:block; font-size:22px; }
.operations-summary-kpis span { color:var(--text-muted); font-size:11px; font-weight:800; text-transform:uppercase; }
.case-relations { display:grid; gap:7px; margin-bottom:10px; }
.case-relation { background:white; border:1px solid var(--border); border-left:3px solid #795392; border-radius:9px; display:grid; padding:8px; text-align:left; }
.case-relation span, .summary-activity span { color:var(--text-muted); font-size:12px; }
.summary-activity { border-top:1px solid var(--border); display:flex; gap:8px; justify-content:space-between; padding:8px 0; }
.plan-calor-card { border-left: 4px solid var(--warning); }
.plan-calor-badges { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.plan-calor-badge { align-items:center; background:var(--surface-alt); border:1px solid var(--border); border-radius:999px; color:var(--text); display:inline-flex; font-size:12px; font-weight:800; gap:6px; padding:6px 10px; }
.plan-calor-badge.ok { background:#e7efe1; color:var(--primary-dark); }
.plan-calor-badge.warn { background:#faecc8; color:#735319; }
.plan-calor-badge.info { background:#e8f0f6; color:var(--info); }
.plan-calor-metrics { display:grid; gap:12px; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:14px; }
.plan-calor-metric { background:var(--surface-alt); border:1px solid var(--border); border-radius:12px; padding:12px; }
.plan-calor-metric-label { color:var(--text-muted); display:block; font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.plan-calor-metric strong { color:var(--primary-dark); display:block; font-size:24px; margin-top:4px; }
.plan-calor-metric small { color:var(--text-muted); }
.plan-calor-foot { align-items:center; display:flex; gap:12px; justify-content:space-between; margin-top:14px; flex-wrap:wrap; }
.plan-calor-empty { background:var(--surface-alt); border:1px dashed var(--border); border-radius:12px; color:var(--text-muted); padding:12px; }
.console-shell { display:grid; gap:16px; }
.console-head { align-items:flex-start; background:linear-gradient(135deg,#172018,#404e3b); border-radius:var(--radius); box-shadow:var(--shadow); color:#fff; display:flex; gap:16px; justify-content:space-between; padding:22px; }
.console-head h1 { font-size:27px; margin:2px 0 6px; }
.console-head p { color:var(--jade-light); margin:0; max-width:720px; }
.console-kicker { color:#cfe2c0; display:block; font-size:11px; font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
.console-shift { background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.24); border-radius:999px; color:#fff; flex-shrink:0; font-size:12px; font-weight:900; padding:8px 11px; }
.console-shift.live { background:#e1583d; border-color:rgba(255,255,255,.55); box-shadow:0 8px 18px rgba(0,0,0,.22); }
.console-grid { align-items:start; display:grid; gap:16px; grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr); }
.console-panel { background:#111812; border:1px solid #2f3f31; border-radius:18px; box-shadow:0 16px 34px rgba(23,32,24,.16); color:#e7f0e0; padding:16px; }
.console-panel h2 { color:#e7f0e0; font-size:16px; margin:0 0 10px; }
.console-terminal label, .console-prompt { color:#9bd67b; display:block; font-family:"Courier New", monospace; font-size:13px; font-weight:800; margin-bottom:8px; }
.console-terminal textarea { background:#0b100c; border:1px solid #3d503f; border-radius:12px; color:#e7f0e0; font-family:"Courier New", monospace; min-height:150px; resize:vertical; width:100%; }
.console-terminal textarea:focus { border-color:#9bd67b; box-shadow:0 0 0 3px rgba(155,214,123,.16); outline:none; }
.console-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.console-note { color:#b8c8ae; font-size:12px; margin:12px 0 0; }
.console-context { background:#0b100c; border:1px solid #2f3f31; border-radius:12px; color:#d5e4ce; font-family:"Courier New", monospace; font-size:12px; line-height:1.45; margin:0; max-height:440px; overflow:auto; padding:12px; white-space:pre-wrap; }
.console-output { min-height:130px; }
.console-empty { color:#b8c8ae; display:grid; gap:4px; }
.console-result { display:grid; gap:10px; }
.console-result.error { border-left:4px solid var(--danger); padding-left:12px; }
.console-answer { background:#0b100c; border-radius:12px; color:#f3f8ef; line-height:1.55; padding:14px; white-space:pre-wrap; }
.console-meta { color:#b8c8ae; font-size:12px; }

/* Emulación de Pantalla de Terminal Completa */
.terminal-window {
    position: relative;
    background: #090f0a;
    border: 1px solid #233425;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.45);
    font-family: "Courier New", Courier, monospace;
    overflow: hidden;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    cursor: text;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.terminal-window::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.15) 50%
    );
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
    opacity: 0.6;
}
.terminal-window::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: radial-gradient(circle, rgba(16, 32, 18, 0) 65%, rgba(6, 15, 7, 0.5) 100%);
    z-index: 11;
    pointer-events: none;
}
.terminal-window:hover {
    border-color: #354e38;
}
.terminal-header {
    background: #111a12;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #1a2a1c;
    user-select: none;
    position: relative;
    z-index: 12;
}
.terminal-buttons {
    display: flex;
    gap: 6px;
}
.terminal-buttons .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}
.terminal-buttons .dot.red { background: #ff5f56; }
.terminal-buttons .dot.yellow { background: #ffbd2e; }
.terminal-buttons .dot.green { background: #27c93f; }

/* Fullscreen Mode Overrides */
.terminal-window.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    border-radius: 0;
    border: none;
    margin-top: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}
.terminal-window.fullscreen .terminal-body {
    height: calc(100vh - 43px);
    height: calc(100dvh - 43px);
    min-height: 0;
    padding: 24px;
}
.terminal-window.fullscreen .terminal-output-container {
    font-size: 15px;
}

.terminal-title {
    color: #8fa391;
    font-size: 13px;
    margin-left: 20px;
    flex: 1;
    text-align: left;
}
.terminal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 480px;
    flex: 1;
    position: relative;
    z-index: 12;
}
.terminal-output-container {
    flex: 1;
    overflow-y: auto;
    color: #e2ede4;
    font-size: 14px;
    line-height: 1.5;
    border-bottom: 1px dashed #1c2e20;
    padding-bottom: 16px;
}
.terminal-input-line {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.prompt-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.terminal-prompt-label {
    color: #9bd67b;
    font-weight: bold;
    font-size: 14px;
    padding-top: 4px;
    white-space: nowrap;
}
.terminal-input-line textarea {
    flex: 1;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #f0fff4;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    padding: 4px 0;
    margin: 0;
    min-height: 28px;
    max-height: 150px;
    height: 28px;
    overflow-y: auto;
    line-height: 1.4;
    caret-color: #9bd67b;
}
.terminal-input-line textarea:focus {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Mic voice dictation style */
.console-mic-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #8fa391;
    transition: color 0.2s, transform 0.2s;
    padding: 4px 8px;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.console-mic-btn:hover {
    color: #9bd67b;
    transform: scale(1.1);
}
.console-mic-btn.recording {
    color: #ff5f56;
    animation: micPulse 1.5s infinite;
}
@keyframes micPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}
.terminal-input-line textarea::placeholder {
    color: #9bd67b;
    opacity: 1;
    animation: terminalBlink 1.0s step-start infinite;
}
@keyframes terminalBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.terminal-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}
.terminal-loading {
    color: #ffbd2e;
    font-size: 13px;
}
.terminal-buttons-group {
    display: flex;
    gap: 10px;
}

@media (max-width: 960px) {
    body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); overflow-x: hidden; }
    .pc-app, .pc-main, .topbar { max-width: 100%; width: 100%; }
    .pc-sidebar.collapsed { width: min(82vw, 282px); }
    .pc-sidebar.collapsed .brand-copy, .pc-sidebar.collapsed .municipality, .pc-sidebar.collapsed .side-nav, .pc-sidebar.collapsed .sidebar-footer { display:block; }
    .pc-sidebar.collapsed + .pc-main { margin-left: 0; width: 100%; }
    .pc-sidebar { transform: translateX(-100%); transition: transform .22s ease; width: min(82vw, 282px); } .pc-sidebar.open { transform: translateX(0); }
    .drawer-overlay.active { background: rgba(0,0,0,.35); display: block; inset: 0; position: fixed; z-index: 1000; } .pc-main { flex: 0 0 100%; margin-left: 0; }
    .menu-btn { display: none; } .page-content { max-width: none; padding: 16px 10px calc(86px + env(safe-area-inset-bottom)); width: 100%; } .topbar { padding: 12px 10px; } .topbar h2 { font-size: 19px; } .topbar-subtitle { display: none; }
    .page-content > *, .card, .dashboard-intro, .help-launcher, .guide-hero, .graph-board { max-width: 100%; min-width: 0; width: 100%; }
    .section-header { flex-wrap: wrap; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dashboard-grid, .ia-grid, .dashboard-actions { grid-template-columns: 1fr; }
    .operation-alerts, .operation-alerts.two, .operation-alerts.four, .ops-today-metrics, .plan-calor-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .operation-alerts .kpi-card, .kpi-grid .kpi-card { padding: 13px; }
    .operation-alerts .kpi-value, .kpi-grid .kpi-value { font-size: 24px; }
    .operation-alerts .kpi-card .kpi-hint, .kpi-grid .kpi-hint { font-size: 11px; }
    .help-launcher, .guide-hero { align-items: flex-start; flex-direction: column; }
    .dashboard-intro-admin { align-items:stretch; flex-direction:column; }
    .reset-system-trigger { align-self:flex-start; }
    .reset-system-dialog { border-radius:20px; width:calc(100vw - 20px); }
    .reset-system-head { padding:16px; }
    .reset-system-box { padding:16px; }
    .reset-system-actions { flex-direction:column-reverse; }
    .reset-system-actions .btn { width:100%; }
    .help-actions { width: 100%; }
    .help-actions .btn { flex: 1; }
    .tour-shell, .manual-layout { grid-template-columns: 1fr; }
    .tour-index { display: flex; overflow-x: auto; padding-bottom: 4px; }
    .tour-step-btn { flex: 0 0 auto; }
    .manual-toc { position: static; }
    .manual-complete-layout .manual-toc { display:flex; gap:7px; margin-bottom:0; overflow-x:auto; padding:12px; scroll-snap-type:x proximity; }
    .manual-complete-layout .manual-toc .card-title { flex:0 0 100%; display:none; }
    .manual-complete-layout .manual-toc a { background:var(--surface-alt); flex:0 0 auto; margin:0; padding:9px 12px; scroll-snap-align:start; white-space:nowrap; }
    .manual-complete-body section { overflow-x:visible; }
    .manual-complete-body .card { max-width:100%; min-width:0; }
    .manual-complete-body .manual-table,
    .manual-complete-body .manual-table tbody,
    .manual-complete-body .manual-table tr,
    .manual-complete-body .manual-table td { display:block; width:100%; }
    .manual-complete-body .manual-table thead { border:0; clip:rect(0 0 0 0); clip-path:inset(50%); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute; width:1px; white-space:nowrap; }
    .manual-complete-body .manual-table tr { background:var(--surface-alt); border:1px solid var(--border); border-radius:11px; margin-bottom:9px; overflow:hidden; padding:4px 10px; }
    .manual-complete-body .manual-table td,
    .manual-complete-body .manual-table td:first-child { border-bottom:1px solid var(--border); display:grid; gap:7px; grid-template-columns:minmax(82px,34%) 1fr; padding:8px 0; width:100%; }
    .manual-complete-body .manual-table td:last-child { border-bottom:0; }
    .manual-complete-body .manual-table td:before { color:var(--text-muted); content:attr(data-label); font-size:10px; font-weight:900; letter-spacing:.05em; text-transform:uppercase; }
    .manual-end-actions { flex-direction:column; }
    .manual-end-actions .btn { width:100%; }
    .tour-tooltip { bottom: calc(68px + env(safe-area-inset-bottom)); left: 8px !important; max-height: min(42vh, 258px); max-width: none; overflow-y: auto; padding: 12px; right: 8px; top: auto !important; }
    .tour-tooltip-top { margin-bottom: 6px; }
    .tour-tooltip h3 { font-size: 16px; margin-bottom: 5px; }
    .tour-tooltip p { font-size: 13px; margin-bottom: 10px; }
    .tour-tooltip-actions .btn { font-size: 13px; padding: 8px 12px; }
    .tour-focus-ring { border-radius: 10px; }
    .pwa-install-card { bottom:calc(86px + env(safe-area-inset-bottom)); flex-direction:column; left:10px; right:10px; top:auto; width:auto; }
    .pwa-install-card.active { display:flex; }
    .pwa-install-actions { width:100%; }
    .pwa-install-actions .btn { flex:1; }
    .bottom-nav { background: white; border-top: 1px solid var(--border); bottom: 0; display: flex; align-items: flex-end; left: 0; padding: 6px 6px max(8px, env(safe-area-inset-bottom)); position: fixed; right: 0; z-index: 1001; }
    .bottom-nav button { align-items: center; background: transparent; border: 0; border-radius:12px; color: var(--text-muted); display: flex; flex: 1; flex-direction: column; font-size: 12px; font-weight: 800; gap: 4px; justify-content: center; min-height: 64px; min-width: 0; padding: 8px 2px; }
    .bottom-nav span { display: block; font-size: 31px; line-height: 1.05; }
    .bottom-nav button.active { background:var(--primary-light); color: var(--primary-dark); }
    .bottom-nav .bn-fab { background: var(--primary); border-radius: 50%; box-shadow: 0 6px 16px rgba(0,0,0,.3); color: #fff; flex: 0 0 70px; height: 70px; margin: 0 10px; min-height: 70px; padding: 0; transform: translateY(-20px); width: 70px; }
    .bottom-nav .bn-fab span { font-size: 44px; }
    .bottom-nav .bn-fab.active { background: var(--primary-dark); color: #fff; }
    .mobile-more-overlay.active { background:rgba(0,0,0,.34); display:block; inset:0; position:fixed; z-index:1002; }
    .mobile-more-sheet { background:white; border-radius:22px 22px 0 0; bottom:0; box-shadow:0 -18px 38px rgba(42,51,40,.22); display:block; left:0; max-height:min(78vh, 560px); overflow:auto; padding:16px 14px calc(86px + env(safe-area-inset-bottom)); position:fixed; right:0; transform:translateY(110%); transition:transform .22s ease; z-index:1003; }
    .mobile-more-sheet.active { transform:translateY(0); }
    .mobile-more-header { align-items:center; display:flex; justify-content:space-between; gap:12px; margin-bottom:12px; }
    .mobile-more-header strong, .mobile-more-header span { display:block; }
    .mobile-more-header strong { color:var(--primary-dark); font-size:18px; }
    .mobile-more-header span { color:var(--text-muted); font-size:12px; }
    .mobile-more-grid { display:grid; gap:10px; grid-template-columns:repeat(3,minmax(0,1fr)); }
    .mobile-more-grid button { align-items:center; background:var(--surface-alt); border:1px solid var(--border); border-radius:14px; color:var(--text); display:flex; flex-direction:column; font-size:12px; font-weight:900; gap:7px; justify-content:center; line-height:1.15; min-height:88px; min-width:0; padding:10px 6px; text-align:center; }
    .mobile-more-grid button span { align-items:center; color:var(--primary-dark); display:flex; flex:0 0 38px; font-size:34px; font-weight:900; justify-content:center; line-height:1; width:100%; }
    .map-preview { height: 220px; }
    .ops-grid, .ops-territory-grid, .ops-command-grid, .ops-workflow { grid-template-columns: 1fr; }
    .ops-today-hero { align-items:stretch; flex-direction:column; }
    .ops-hero-actions { flex-direction:column; }
    .ops-hero-actions .btn { width:100%; }
    .ops-close-shift-form { grid-template-columns:1fr; }
    .ops-close-shift-form .btn { width:100%; }
    .ops-shift-grid { grid-template-columns:1fr; }
    .ops-shift-actions { flex-direction:column-reverse; }
    .ops-shift-actions .btn { width:100%; }
    .integration-grid { grid-template-columns:1fr; }
    .ops-module-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .ops-quick-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .ops-task { grid-template-columns:1fr; }
    .ops-task-actions { width:100%; }
    .ops-task-actions .btn { flex:1; }
    .ops-sla-form { flex-direction:column; }
    .graph-builder-actions { align-items:flex-start; flex-direction:column; }
    .graph-cluster-head { flex-direction:column; }
    .graph-kpi-stack { justify-content:flex-start; width:100%; }
    .relation-audit-row { grid-template-columns:1fr; }
    .ops-form.horizontal { grid-template-columns: 1fr; }
    .inline-form { flex-wrap: wrap; }
    .inline-form input { flex-basis: calc(50% - 4px); }
    .graph-visual { grid-template-columns:1fr; }
    .graph-stage { min-height:410px; }
    .graph-person-pin { min-height:63px; min-width:63px; padding:6px; }
    .graph-person-icon { font-size:20px; height:30px; width:30px; }
    .graph-person-key { font-size:9px; max-width:66px; }
    .graph-person-tooltip { width:min(252px, calc(100vw - 64px)); }
    .console-head, .console-grid { display:grid; grid-template-columns:1fr; }
    .console-shift { justify-self:start; }
    .receipt { padding: 18px; }
    .receipt dl { grid-template-columns: 1fr; gap: 3px; }
    .btn, button, input, select, textarea { min-height:44px; }
    .guardia-header, .receipt-actions, .section-header, .audit-row { align-items:flex-start; flex-direction:column; }
    .tab-labels { overflow-x:auto; white-space:nowrap; }
    table:not(.manual-table), table:not(.manual-table) tbody, table:not(.manual-table) tr, table:not(.manual-table) td { max-width:100%; }
}
@media (max-width: 560px) {
    .datetime { display: none; } .page-content { padding-left: 8px; padding-right: 8px; } .card { padding: 14px 12px; }
    .guide-hero h1 { font-size:22px; }
    .manual-complete-hero { padding:17px 15px; }
    .manual-complete-hero .help-actions { display:grid; grid-template-columns:1fr 1fr; }
    .manual-complete-hero .help-actions .btn { min-width:0; padding:10px 8px; }
    .manual-complete-body h2 { font-size:18px; }
    .manual-complete-body h3 { font-size:15px; }
    .manual-complete-body ol, .manual-complete-body ul { padding-left:18px; }
    .manual-complete-body .manual-table { font-size:13px; }
}
@media print {
    .receipt-actions, .pc-sidebar, .topbar, .bottom-nav { display: none !important; }
    .pc-main { margin-left: 0; width: 100%; }
    .page-content { padding: 0; }
    .receipt { border: 0; box-shadow: none; }
}

/* ─── TERMINAL EMULATION THEMES ─── */
.terminal-window.theme-amber {
    background: #0c0803 !important;
    border-color: #45240a !important;
}
.terminal-window.theme-amber::before {
    background: linear-gradient(rgba(26, 18, 12, 0) 50%, rgba(0, 0, 0, 0.22) 50%) !important;
    background-size: 100% 4px !important;
}
.terminal-window.theme-amber::after {
    background: radial-gradient(circle, rgba(40, 20, 5, 0) 65%, rgba(15, 8, 3, 0.45) 100%) !important;
}
.terminal-window.theme-amber .terminal-header {
    background: #140d06 !important;
    border-bottom: 1px solid #22140a !important;
}
.terminal-window.theme-amber .terminal-title { color: #e59866 !important; }
.terminal-window.theme-amber .terminal-prompt-label { color: #e59866 !important; }
.terminal-window.theme-amber .terminal-input-line textarea { color: #fdf2e9 !important; caret-color: #e59866 !important; }
.terminal-window.theme-amber .console-prompt { color: #e59866 !important; }
.terminal-window.theme-amber .console-answer { color: #faebd7 !important; }
.terminal-window.theme-amber .console-meta { color: #c39b82 !important; }
.terminal-window.theme-amber .terminal-loading { color: #f5b041 !important; }
.terminal-window.theme-amber .console-mic-btn { color: #e59866 !important; }
.terminal-window.theme-amber .console-mic-btn:hover { color: #fdf2e9 !important; }

.terminal-window.theme-matrix {
    background: #000000 !important;
    border-color: #00ff00 !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.15) !important;
}
.terminal-window.theme-matrix::before {
    background: linear-gradient(rgba(0, 255, 0, 0.05) 50%, rgba(0, 0, 0, 0.3) 50%) !important;
    background-size: 100% 4px !important;
    opacity: 0.8 !important;
}
.terminal-window.theme-matrix::after {
    background: radial-gradient(circle, rgba(0, 255, 0, 0) 70%, rgba(0, 50, 0, 0.3) 100%) !important;
}
.terminal-window.theme-matrix .terminal-header {
    background: #000a00 !important;
    border-bottom: 1px solid #004400 !important;
}
.terminal-window.theme-matrix .terminal-title { color: #00ff00 !important; text-shadow: 0 0 3px #00ff00 !important; }
.terminal-window.theme-matrix .terminal-prompt-label { color: #00ff00 !important; text-shadow: 0 0 5px #00ff00 !important; }
.terminal-window.theme-matrix .terminal-input-line textarea { color: #00ff00 !important; caret-color: #00ff00 !important; text-shadow: 0 0 4px #00ff00 !important; }
.terminal-window.theme-matrix .console-prompt { color: #00ff00 !important; text-shadow: 0 0 3px #00ff00 !important; }
.terminal-window.theme-matrix .console-answer { color: #00ff00 !important; text-shadow: 0 0 2px #00ff00 !important; }
.terminal-window.theme-matrix .console-meta { color: #00aa00 !important; }
.terminal-window.theme-matrix .terminal-loading { color: #00ff00 !important; }
.terminal-window.theme-matrix .console-mic-btn { color: #00ff00 !important; }

.terminal-window.theme-dark {
    background: #111827 !important;
    border-color: #1f2937 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}
.terminal-window.theme-dark::before { display: none !important; }
.terminal-window.theme-dark::after { display: none !important; }
.terminal-window.theme-dark .terminal-header {
    background: #1f2937 !important;
    border-bottom: 1px solid #374151 !important;
}
.terminal-window.theme-dark .terminal-title { color: #9ca3af !important; }
.terminal-window.theme-dark .terminal-prompt-label { color: #60a5fa !important; }
.terminal-window.theme-dark .terminal-input-line textarea { color: #f9fafb !important; caret-color: #3b82f6 !important; }
.terminal-window.theme-dark .console-prompt { color: #60a5fa !important; }
.terminal-window.theme-dark .console-answer { color: #e5e7eb !important; }
.terminal-window.theme-dark .console-meta { color: #6b7280 !important; }
.terminal-window.theme-dark .terminal-loading { color: #60a5fa !important; }
.terminal-window.theme-dark .console-mic-btn { color: #9ca3af !important; }
.terminal-window.theme-dark .console-mic-btn:hover { color: #3b82f6 !important; }

/* Sidebar dropdown collapsible accordion */
.sidebar-dropdown {
    display: block;
    margin-bottom: 2px;
}
.sidebar-dropdown summary {
    list-style: none;
    outline: none;
    user-select: none;
    padding-right: 16px !important;
}
.sidebar-dropdown summary::-webkit-details-marker {
    display: none;
}
.sidebar-dropdown summary .dropdown-arrow {
    margin-left: auto;
    font-size: 10px;
    opacity: 0.5;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-dropdown[open] summary .dropdown-arrow {
    transform: rotate(180deg);
}
.sidebar-dropdown .dropdown-items {
    display: grid;
    gap: 3px;
    padding-left: 10px;
    margin-top: 2px;
    margin-left: 23px;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.sidebar-dropdown[open] .dropdown-items {
    animation: sidebarDropdownSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes sidebarDropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.pc-sidebar.collapsed .sidebar-dropdown summary .dropdown-arrow {
    display: none;
}
.pc-sidebar.collapsed .sidebar-dropdown .dropdown-items {
    padding-left: 0;
    margin-left: 0;
    border-left: none;
    justify-content: center;
}

/* Centered & Floating Radial tools menu */
.ops-tools-radial-wrapper {
    position: relative;
    width: 100%;
    max-width: 220px;
    height: 140px;
    margin: 18px auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ops-tools-radial-wrapper.fab-ops-tools {
    position: fixed;
    bottom: 24px;
    left: calc(var(--sidebar-width) + 24px);
    width: 56px;
    height: 56px;
    margin: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.pc-sidebar.collapsed + .pc-main .ops-tools-radial-wrapper.fab-ops-tools {
    left: calc(84px + 24px);
}
@media (max-width: 960px) {
    .ops-tools-radial-wrapper.fab-ops-tools {
        left: 24px;
        bottom: calc(102px + env(safe-area-inset-bottom));
    }
}

.ops-radial-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #fff;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(64, 78, 59, 0.22);
    z-index: 10;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s;
}
.ops-tools-radial-wrapper.fab-ops-tools .ops-radial-toggle {
    width: 54px;
    height: 54px;
    font-size: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.ops-radial-toggle:hover {
    background-color: var(--primary-dark);
}
.ops-tools-radial-wrapper.is-open .ops-radial-toggle {
    transform: rotate(45deg);
    background-color: var(--danger);
}
.ops-radial-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    min-width: 210px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(42, 51, 40, 0.22);
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.96);
    transform-origin: bottom left;
    transition: transform 0.2s cubic-bezier(0.2, 0.85, 0.25, 1), opacity 0.16s, visibility 0.16s;
}
.ops-tools-radial-wrapper.fab-ops-tools.is-open .ops-radial-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.ops-radial-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 9px 12px 9px 8px;
    border-radius: 11px;
    background: transparent;
    border: 0;
    color: var(--primary-dark);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s;
}
.ops-radial-item .ops-radial-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    background: var(--primary-light);
    font-size: 16px;
}
.ops-radial-item:hover {
    background: var(--primary-light);
}
.ops-radial-item:hover .ops-radial-ico {
    background: var(--primary);
}
