@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0A0A0A;
    --bg-1: #111111;
    --bg-2: #1A1A1A;
    --bg-3: #222222;
    --border: #2A2A2A;
    --border-2: #333333;
    --text: #F0F0EE;
    --text-2: #A3A3A1;
    --text-3: #6B6B69;
    --green: #22C55E;
    --green-dim: rgba(34,197,94,0.12);
    --red: #EF4444;
    --red-dim: rgba(239,68,68,0.10);
    --yellow: #F59E0B;
    --yellow-dim: rgba(245,158,11,0.10);
    --blue: #3B82F6;
    --blue-dim: rgba(59,130,246,0.10);
    --violet: #7C5CBF;
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --r-sm: 6px; --r-md: 8px; --r-lg: 12px;
    --sidebar-w: 230px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* Login page */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 30% 20%, rgba(124,92,191,0.08), transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(34,197,94,0.05), transparent 50%),
                var(--bg);
}

.login-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.login-logo-mark {
    width: 32px; height: 32px;
    background: var(--violet);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.login-logo-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.login-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.login-sub { color: var(--text-3); font-size: 0.88em; margin-bottom: 28px; }

/* Layout */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--bg-1);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
}
.sidebar-logo {
    padding: 20px 18px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-logo-mark {
    width: 28px; height: 28px;
    background: var(--violet);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sidebar-logo-mark svg { width: 14px; height: 14px; fill: #fff; }
.sidebar-logo-text { font-size: 0.88em; font-weight: 600; color: var(--text); }
.sidebar-logo-sub { font-family: var(--mono); font-size: 0.68em; color: var(--text-3); margin-top: 1px; }

.role-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.62em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(124,92,191,0.15);
    color: var(--violet);
    border: 1px solid rgba(124,92,191,0.3);
    margin: 8px 18px 0;
}
.role-badge.admin { background: rgba(239,68,68,0.12); color: var(--red); border-color: rgba(239,68,68,0.3); }
.role-badge.model { background: rgba(34,197,94,0.12); color: var(--green); border-color: rgba(34,197,94,0.3); }

.sidebar-nav { padding: 16px 10px; flex: 1; }
.sidebar-section-label {
    font-family: var(--mono);
    font-size: 0.65em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 8px 8px 4px;
    margin-top: 8px;
}
.sidebar-section-label:first-child { margin-top: 0; }
.sidebar-link {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 8px;
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-size: 0.88em;
    font-weight: 500;
    transition: all 0.12s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.sidebar-link:hover { background: var(--bg-2); color: var(--text); }
.sidebar-link.active { background: var(--bg-3); color: var(--text); }
.sidebar-link svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.7; }
.sidebar-link.active svg { opacity: 1; }

.sidebar-footer {
    padding: 14px 10px;
    border-top: 1px solid var(--border);
}
.user-info {
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-3);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72em;
    color: var(--text-2);
    font-weight: 600;
    flex-shrink: 0;
}
.user-name { font-size: 0.82em; color: var(--text); font-weight: 500; }
.user-role { font-family: var(--mono); font-size: 0.65em; color: var(--text-3); text-transform: uppercase; }

.main { flex: 1; margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    height: 52px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
    background: var(--bg);
    position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 0.88em; font-weight: 600; color: var(--text); }
.status-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 2px var(--green-dim);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--green-dim); }
    50% { box-shadow: 0 0 0 5px transparent; }
}
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-status { font-family: var(--mono); font-size: 0.72em; color: var(--text-3); }

.page { padding: 28px; flex: 1; }
.page-header { margin-bottom: 28px; }
.page-eyebrow {
    font-family: var(--mono); font-size: 0.7em;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 6px;
}
.page-title { font-size: 1.5em; font-weight: 600; color: var(--text); letter-spacing: -0.025em; line-height: 1.2; }
.page-desc { color: var(--text-2); font-size: 0.88em; margin-top: 4px; }

/* Botones */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    border-radius: var(--r-sm);
    font-size: 0.85em; font-weight: 500;
    cursor: pointer; border: 1px solid transparent;
    transition: all 0.12s;
    font-family: var(--font);
    line-height: 1;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover:not(:disabled) { background: #E0E0DE; border-color: #E0E0DE; }
.btn-violet { background: var(--violet); color: #fff; border-color: var(--violet); }
.btn-violet:hover:not(:disabled) { background: #6A4DAA; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--border-2); }
.btn-danger:hover:not(:disabled) { background: var(--red-dim); border-color: var(--red); }
.btn-success { background: var(--green); color: #062611; border-color: var(--green); }
.btn-success:hover:not(:disabled) { background: #16A34A; }
.btn-sm { padding: 6px 10px; font-size: 0.78em; }
.btn-lg { padding: 12px 20px; font-size: 0.95em; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon {
    width: 30px; height: 30px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-sm); background: transparent;
    color: var(--text-3); border: 1px solid transparent; cursor: pointer;
    transition: all 0.12s;
}
.btn-icon:hover { background: var(--bg-2); color: var(--text); border-color: var(--border); }

.card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
}

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi {
    background: var(--bg-1); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 16px 18px;
    position: relative; overflow: hidden;
}
.kpi::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 2px; background: var(--border);
}
.kpi.kpi-green::after { background: var(--green); }
.kpi.kpi-blue::after { background: var(--blue); }
.kpi.kpi-violet::after { background: var(--violet); }
.kpi.kpi-yellow::after { background: var(--yellow); }
.kpi.kpi-red::after { background: var(--red); }
.kpi-label {
    font-family: var(--mono); font-size: 0.68em;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--text-3); margin-bottom: 10px;
}
.kpi-value {
    font-family: var(--mono); font-size: 1.75em; font-weight: 500;
    color: var(--text); letter-spacing: -0.03em; line-height: 1;
}
.kpi-sub { font-size: 0.75em; color: var(--text-3); margin-top: 6px; }

/* Formularios */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; font-family: var(--mono);
    font-size: 0.72em; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-3); margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 9px 12px;
    background: var(--bg-2); border: 1px solid var(--border-2);
    border-radius: var(--r-sm); color: var(--text);
    font-family: var(--font); font-size: 0.9em;
    outline: none; transition: border-color 0.12s;
    appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--violet); }
.form-input::placeholder { color: var(--text-3); }
.form-textarea { min-height: 80px; font-family: var(--font); resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Alerts */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 14px; border-radius: var(--r-md);
    font-size: 0.85em; margin-bottom: 16px;
    border: 1px solid;
}
.alert-error { background: var(--red-dim); border-color: rgba(239,68,68,0.25); color: #FCA5A5; }
.alert-ok { background: var(--green-dim); border-color: rgba(34,197,94,0.25); color: #86EFAC; }
.alert-info { background: var(--blue-dim); border-color: rgba(59,130,246,0.25); color: #93C5FD; }
.alert-warn { background: var(--yellow-dim); border-color: rgba(245,158,11,0.25); color: #FCD34D; }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--mono); font-size: 0.72em; font-weight: 500;
    padding: 3px 8px; border-radius: 9999px; border: 1px solid;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.badge-live { background: var(--green-dim); color: var(--green); border-color: rgba(34,197,94,0.25); }
.badge-live .badge-dot { background: var(--green); animation: pulse 2s ease-in-out infinite; }
.badge-private { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(245,158,11,0.25); }
.badge-away { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(245,158,11,0.25); }
.badge-offline { background: var(--bg-3); color: var(--text-3); border-color: var(--border); }
.tag {
    display: inline-block; font-family: var(--mono); font-size: 0.72em;
    padding: 2px 7px; border-radius: 9999px; border: 1px solid var(--border);
    color: var(--text-3); background: var(--bg-3);
}
.tag-violet { background: rgba(124,92,191,0.12); color: var(--violet); border-color: rgba(124,92,191,0.25); }

/* Tables */
/* ═══════════════════════════════════════
   TABS (mismo estilo de botón que el resto del sitio)
═══════════════════════════════════════ */
.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 7px 14px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: var(--text-2);
    font-family: var(--font);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tab-btn:hover:not(.active) { background: var(--bg-3); color: var(--text); }
.tab-btn.active { background: var(--violet); color: #fff; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.table-wrap { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.table-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.table-header-title { font-size: 0.88em; font-weight: 600; color: var(--text); }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); }
th {
    padding: 10px 16px; text-align: left;
    font-family: var(--mono); font-size: 0.68em;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--text-3); font-weight: 400; white-space: nowrap;
    background: var(--bg-1);
}
td { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 0.85em; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-2); color: var(--text); }
.td-mono { font-family: var(--mono); font-size: 0.82em; color: var(--text-2); }
.td-strong { font-weight: 600; color: var(--text); }

/* Modal */
.modal {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 20px;
    overflow-y: auto;
}
.modal.show { display: flex; }
.modal-box {
    background: var(--bg-1); border: 1px solid var(--border-2);
    border-radius: var(--r-lg); padding: 24px;
    width: 100%; max-width: 480px; position: relative;
    max-height: 90vh; overflow-y: auto;
    animation: modalIn 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title { font-size: 1em; font-weight: 600; color: var(--text); margin-bottom: 20px; }
.modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 26px; height: 26px; background: var(--bg-3);
    border: 1px solid var(--border); border-radius: var(--r-sm);
    color: var(--text-3); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8em; transition: all 0.12s;
}
.modal-close:hover { color: var(--text); background: var(--bg-2); }

/* Model cards */
.models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.model-card {
    background: var(--bg-1); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden;
    transition: border-color 0.15s;
}
.model-card[data-status="public"] { border-color: rgba(34,197,94,0.3); }
.model-card-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.model-card-name { font-size: 0.83em; font-weight: 600; color: var(--text); font-family: var(--mono); }
.model-thumb {
    width: 100%; height: 160px; object-fit: cover; display: block;
    background: var(--bg-3);
}
.model-thumb-ph {
    width: 100%; height: 160px; background: var(--bg-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3); font-size: 2.2em;
}
.model-thumb-wrap { position: relative; overflow: hidden; }
.live-pill {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(0,0,0,0.75); border: 1px solid rgba(34,197,94,0.4);
    color: var(--green); font-family: var(--mono);
    font-size: 0.65em; font-weight: 500; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 3px 7px; border-radius: 4px;
    display: flex; align-items: center; gap: 5px;
}
.live-dot {
    width: 5px; height: 5px; border-radius: 50%; background: var(--green);
    animation: pulse 1.5s ease-in-out infinite; flex-shrink: 0;
}
.model-card-body { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.model-card-meta { font-family: var(--mono); font-size: 0.72em; color: var(--text-3); line-height: 1.8; }
.model-card-actions { display: flex; gap: 4px; padding: 8px 10px; }

/* Empty */
.empty {
    text-align: center; padding: 48px 20px;
    color: var(--text-3); font-size: 0.85em;
    border: 1px dashed var(--border); border-radius: var(--r-lg);
}

/* Notif */
.notif {
    position: fixed; bottom: 20px; right: 20px;
    background: var(--bg-2); border: 1px solid var(--border-2);
    color: var(--text); padding: 10px 16px;
    border-radius: var(--r-md); font-size: 0.83em;
    z-index: 9999; box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    animation: notifIn 180ms ease;
}
@keyframes notifIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Shift control panel */
.shift-panel {
    background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    margin-bottom: 20px;
}
.shift-status-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; background: var(--bg-2);
    border: 1px solid var(--border-2); border-radius: var(--r-md);
    margin-bottom: 20px;
}
.shift-status-label {
    font-family: var(--mono); font-size: 0.68em;
    letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3);
}
.shift-status-val { font-size: 1em; font-weight: 600; color: var(--text); }
.shift-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.shift-btn {
    padding: 16px 20px; border-radius: var(--r-md);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    cursor: pointer; border: 1px solid var(--border-2);
    background: var(--bg-1); color: var(--text);
    font-family: var(--font); font-size: 0.85em; font-weight: 500;
    transition: all 0.15s;
}
.shift-btn:hover:not(:disabled) { border-color: var(--violet); background: var(--bg-2); }
.shift-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.shift-btn.active { background: rgba(124,92,191,0.15); border-color: var(--violet); color: var(--violet); }
.shift-btn-icon { font-size: 1.4em; }
.shift-btn-hint { font-family: var(--mono); font-size: 0.65em; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }

.timeline {
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px; background: var(--bg-2);
    border-radius: var(--r-md); border: 1px solid var(--border);
    margin-top: 20px;
}
.timeline-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid var(--border);
    font-size: 0.83em;
}
.timeline-row:last-child { border-bottom: none; }
.timeline-label { color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.timeline-val { font-family: var(--mono); color: var(--text); }
.timeline-val.pending { color: var(--text-3); }

/* Responsive */
@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }
    .sidebar { transform: translateX(-100%); }
    .main { margin-left: 0; }
    .page { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .shift-actions { grid-template-columns: 1fr 1fr; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Timezone labels ── */
.tz-label {
    font-size: 0.70em;
    font-weight: 700;
    color: var(--violet);
    background: var(--bg-2);
    padding: 1px 4px;
    border-radius: 3px;
    font-family: var(--mono);
    letter-spacing: 0.04em;
    vertical-align: middle;
}

/* ════════════════════════════════════════════
   v21 — Rediseño visual inspirado en monitor.tarriso.com
   ════════════════════════════════════════════ */

/* KPI cards con borde superior de color */
.kpi-v21 {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-top: 3px solid var(--kpi-color, var(--violet));
    border-radius: 8px;
    padding: 14px 16px;
    min-width: 120px;
}
.kpi-v21 .kpi-label {
    font-family: var(--mono);
    font-size: 0.62em;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
}
.kpi-v21 .kpi-val {
    font-size: 1.6em;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--kpi-color, var(--violet));
    line-height: 1;
}
.kpi-v21 .kpi-sub {
    font-family: var(--mono);
    font-size: 0.68em;
    color: var(--text-3);
    margin-top: 4px;
}
.kpi-v21.violet  { --kpi-color: var(--violet); }
.kpi-v21.green   { --kpi-color: var(--green); }
.kpi-v21.blue    { --kpi-color: var(--blue); }
.kpi-v21.yellow  { --kpi-color: var(--yellow); }
.kpi-v21.red     { --kpi-color: var(--red); }
.kpi-v21.orange  { --kpi-color: #F97316; }

/* Grid de KPIs v21 */
.kpi-grid-v21 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

/* Cards de estado de modelos — estilo servicios monitor.tarriso.com */
.model-status-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.model-status-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 130px;
    max-width: 180px;
    flex: 1;
}
.model-status-card .msn { font-size: 0.85em; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.model-status-card .mss { font-family: var(--mono); font-size: 0.68em; display: flex; align-items: center; gap: 5px; }
.model-status-card .mss-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.mss-dot.green  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.mss-dot.orange { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.mss-dot.red    { background: var(--red); box-shadow: 0 0 6px var(--red); }
.mss-dot.gray   { background: var(--text-3); }

/* Aviso/notificación modelo */
.notice-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--red);
    color: #fff;
    border-radius: 50%;
    font-size: 0.6em;
    font-weight: 700;
    margin-left: 5px;
    vertical-align: middle;
}
.notice-item {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--violet);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 8px;
    font-size: 0.85em;
}
.notice-item.unread { border-left-color: var(--green); background: rgba(34,197,94,.05); }
.notice-item .notice-from { font-size: 0.72em; color: var(--text-3); margin-bottom: 3px; font-family: var(--mono); }
.notice-item .notice-text { color: var(--text-2); }
.notice-item .notice-time { font-size: 0.68em; color: var(--text-3); margin-top: 4px; font-family: var(--mono); }

/* ═══════════ cbv25: banners, cronómetros, móvil ═══════════ */
.global-banner { padding: 8px 16px; font-size: .82em; text-align: center; font-weight: 500; position: sticky; top: 0; z-index: 90; }
.global-banner-warn { background: var(--yellow-dim); color: #FCD34D; border-bottom: 1px solid rgba(245,158,11,.35); }
.global-banner-warn a { color: inherit; text-decoration: underline; margin-left: 8px; }
.global-banner-test { background: rgba(239,68,68,.15); color: #FCA5A5; border-bottom: 1px solid rgba(239,68,68,.35); }
.timer-warn { color: var(--red) !important; animation: pulse 1.2s ease-in-out infinite; }
.pagination .btn { min-width: 34px; justify-content: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: var(--r-sm); font-size: 1.1em; width: 36px; height: 34px; cursor: pointer; margin-right: 10px; }
.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 560px; }
@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .sidebar { transition: transform .2s ease; width: 260px; }
    body.sidebar-open .sidebar { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.6); }
    .topbar { padding: 0 14px; }
    .page-header { margin-bottom: 18px; }
    .page-title { font-size: 1.25em; }
    .btn { min-height: 38px; }
    .form-input, .form-select { font-size: 16px; }           /* evita el zoom automático de iOS */
    .shift-btn { min-height: 76px; }
    .card { padding: 14px; }
    [style*="grid-template-columns:minmax(220px,300px) 1fr"] { grid-template-columns: 1fr !important; }
}
@media print {
    .sidebar, .topbar, .nav-toggle, .btn, form { display: none !important; }
    .main { margin-left: 0 !important; }
}
a.tab-btn { text-decoration: none; display: inline-block; }
.model-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
