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

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

:root {
    --bg:      #09090B;
    --bg-1:    #111113;
    --bg-2:    #18181B;
    --bg-3:    #27272A;
    --sb-bg:       #0C1220;
    --sb-bg-hover: #131D30;
    --sb-bg-active:#192540;
    --sb-border:   #1E2D45;
    --sb-text:     #94A3B8;
    --sb-text-dim: #3D5070;
    --border:   #27272A;
    --border-2: #3F3F46;
    --text:   #FAFAFA;
    --text-2: #A1A1AA;
    --text-3: #52525B;
    --violet:      #8B5CF6;
    --violet-dim:  rgba(139,92,246,0.12);
    --violet-glow: rgba(139,92,246,0.25);
    --green:      #22C55E;
    --green-dim:  rgba(34,197,94,0.12);
    --green-glow: rgba(34,197,94,0.25);
    --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);
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
    --sidebar-w: 234px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
}

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 ── */
.login-shell {
    min-height: 100vh; display: flex; align-items: center;
    justify-content: center; padding: 24px;
    background: radial-gradient(ellipse at 20% 50%, rgba(139,92,246,0.07) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.04) 0%, transparent 50%), var(--bg);
}
.login-card {
    background: var(--bg-1); border: 1px solid var(--border);
    border-radius: var(--r-xl); padding: 36px; width: 100%; max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-logo-mark {
    width: 36px; height: 36px; background: var(--violet); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px var(--violet-dim); flex-shrink: 0;
}
.login-logo-mark svg { width: 16px; height: 16px; fill: #fff; }
.login-logo-text { font-size: 1.05rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.login-logo-sub  { font-family: var(--mono); font-size: 0.65em; color: var(--text-3); margin-top: 1px; }
.login-title { font-size: 1.4rem; font-weight: 700; color: var(--text); letter-spacing: -0.025em; margin-bottom: 4px; }
.login-sub { color: var(--text-3); font-size: 0.875em; margin-bottom: 28px; }

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

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--sb-bg); border-right: 1px solid var(--sb-border);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 50;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--sb-border); border-radius: 2px; }

.sidebar-logo {
    padding: 20px 16px 16px; border-bottom: 1px solid var(--sb-border);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-logo-mark {
    width: 30px; height: 30px; background: var(--violet); border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--violet-dim);
}
.sidebar-logo-mark svg { width: 14px; height: 14px; fill: #fff; }
.sidebar-logo-text { font-size: 0.9em; font-weight: 700; color: #E2E8F0; letter-spacing: -0.01em; }
.sidebar-logo-sub  { font-family: var(--mono); font-size: 0.65em; color: var(--sb-text-dim); margin-top: 1px; }

.role-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--mono); font-size: 0.62em; letter-spacing: 0.07em;
    text-transform: uppercase; font-weight: 600;
    padding: 3px 10px; border-radius: 99px;
    background: rgba(139,92,246,0.15); color: #A78BFA;
    border: 1px solid rgba(139,92,246,0.3); margin: 10px 16px 2px;
}
.role-badge::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}
.role-badge.admin { background: rgba(239,68,68,0.12); color: #FCA5A5; border-color: rgba(239,68,68,0.3); }
.role-badge.model { background: rgba(34,197,94,0.12);  color: #86EFAC; border-color: rgba(34,197,94,0.3); }

.sidebar-nav { padding: 12px 8px; flex: 1; }
.sidebar-section-label {
    font-family: var(--mono); font-size: 0.6em; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--sb-text-dim);
    padding: 12px 10px 5px; margin-top: 4px;
}
.sidebar-section-label:first-child { margin-top: 0; }

.sidebar-link {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 10px; border-radius: var(--r-sm);
    color: var(--sb-text); font-size: 0.875em; font-weight: 500;
    transition: background 0.1s, color 0.1s;
    cursor: pointer; border: none; background: none;
    width: 100%; text-align: left; text-decoration: none; position: relative;
}
.sidebar-link:hover  { background: var(--sb-bg-hover); color: #CBD5E1; }
.sidebar-link.active { background: var(--sb-bg-active); color: #A78BFA; }
.sidebar-link.active::before {
    content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
    width: 3px; background: var(--violet); border-radius: 0 2px 2px 0;
}
.sidebar-link svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.6; transition: opacity 0.1s; }
.sidebar-link:hover svg  { opacity: 0.9; }
.sidebar-link.active svg { opacity: 1; }

.sidebar-footer {
    padding: 12px 8px; border-top: 1px solid var(--sb-border);
    background: rgba(0,0,0,0.2);
}
.user-info {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--r-sm);
    margin-bottom: 8px;
}
.user-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--violet) 0%, #3B82F6 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68em; color: #fff; font-weight: 700; flex-shrink: 0;
}
.user-name { font-size: 0.83em; color: #CBD5E1; font-weight: 600; }
.user-role { font-family: var(--mono); font-size: 0.62em; color: var(--sb-text-dim); text-transform: uppercase; letter-spacing: 0.06em; }

.notice-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--red); color: #fff; border-radius: 99px;
    font-size: 0.58em; font-weight: 700; margin-left: auto; flex-shrink: 0;
}

/* ── MAIN + TOPBAR ── */
.main { flex: 1; margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    height: 54px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; background: var(--bg-1);
    position: sticky; top: 0; z-index: 40;
}
.topbar-title  { font-size: 0.9em; font-weight: 600; color: var(--text); }
.topbar-right  { display: flex; align-items: center; gap: 10px; }
.topbar-status { font-family: var(--mono); font-size: 0.72em; color: var(--text-3); }
.status-dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--green);
    box-shadow: 0 0 0 3px var(--green-dim);
    animation: pulse 2.5s ease-in-out infinite; flex-shrink: 0;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--green-dim); }
    50%       { box-shadow: 0 0 0 6px transparent; }
}

/* ── PÁGINA ── */
.page { padding: 28px 32px; flex: 1; }
.page-header { margin-bottom: 28px; }
.page-eyebrow {
    font-family: var(--mono); font-size: 0.68em;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--violet); margin-bottom: 6px;
    display: flex; align-items: center; gap: 7px;
}
.page-eyebrow::before {
    content: ''; width: 14px; height: 2px;
    background: var(--violet); opacity: 0.6; border-radius: 1px; flex-shrink: 0;
}
.page-title { font-size: 1.6em; font-weight: 700; color: var(--text); letter-spacing: -0.03em; line-height: 1.15; }
.page-desc  { color: var(--text-3); font-size: 0.875em; margin-top: 5px; }

/* ── BOTONES ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--r-md);
    font-size: 0.85em; font-weight: 600; cursor: pointer;
    border: 1px solid transparent; transition: all 0.12s;
    font-family: var(--font); line-height: 1; white-space: nowrap;
}
.btn:active   { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover:not(:disabled) { background: #E4E4E7; }

.btn-violet { background: var(--violet); color: #fff; border-color: var(--violet); box-shadow: 0 1px 8px var(--violet-glow); }
.btn-violet:hover:not(:disabled) { background: #7C3AED; box-shadow: 0 2px 14px var(--violet-glow); }

.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: #052e16; border-color: var(--green); box-shadow: 0 1px 8px var(--green-dim); }
.btn-success:hover:not(:disabled) { background: #16A34A; }

.btn-sm    { padding: 5px 10px; font-size: 0.78em; border-radius: var(--r-sm); }
.btn-lg    { padding: 12px 22px; font-size: 0.95em; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon {
    width: 32px; height: 32px; 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 ── */
.card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }

/* ── KPI BASE ── */
.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: 18px 20px; position: relative; overflow: hidden;
}
.kpi::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.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.66em; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.kpi-value { font-family: var(--mono); font-size: 1.9em; font-weight: 700; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.kpi-sub   { font-size: 0.75em; color: var(--text-3); margin-top: 6px; }

/* ── KPI v21 ── */
.kpi-grid-v21 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.kpi-v21 {
    background: var(--bg-1); border: 1px solid var(--border);
    border-top: 3px solid var(--kpi-color, var(--violet));
    border-radius: var(--r-lg); padding: 16px 18px;
    transition: transform 0.12s;
}
.kpi-v21:hover { transform: translateY(-1px); }
.kpi-v21 .kpi-label { font-family: var(--mono); font-size: 0.63em; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.kpi-v21 .kpi-val   { font-size: 1.75em; font-weight: 700; font-family: var(--mono); color: var(--kpi-color, var(--violet)); line-height: 1; letter-spacing: -0.02em; }
.kpi-v21 .kpi-sub   { font-family: var(--mono); font-size: 0.68em; color: var(--text-3); margin-top: 5px; }
.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; }

/* ── FORMULARIOS ── */
.form-group  { margin-bottom: 18px; }
.form-label  { display: block; font-family: var(--mono); font-size: 0.7em; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 7px; font-weight: 500; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 13px;
    background: var(--bg-2); border: 1px solid var(--border-2);
    border-radius: var(--r-md); color: var(--text);
    font-family: var(--font); font-size: 0.9em;
    outline: none; transition: border-color 0.12s, box-shadow 0.12s; appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-dim); }
.form-input::placeholder { color: var(--text-3); }
.form-textarea { min-height: 90px; font-family: var(--font); resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── ALERTAS ── */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--r-md); font-size: 0.875em; margin-bottom: 18px; 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 / TAGS ── */
.badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 0.7em; font-weight: 600; padding: 3px 8px; border-radius: 99px; 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.3); }
.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.3); }
.badge-away    { background: var(--yellow-dim); color: var(--yellow); border-color: rgba(245,158,11,0.3); }
.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.7em; font-weight: 500; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--border); color: var(--text-3); background: var(--bg-2); }
.tag-violet { background: var(--violet-dim); color: #A78BFA; border-color: rgba(139,92,246,0.3); }

/* ── TABS ── */
.tabs { display: inline-flex; gap: 3px; padding: 4px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn { padding: 7px 16px; background: transparent; border: none; border-radius: var(--r-md); color: var(--text-2); font-family: var(--font); font-size: 0.85em; font-weight: 500; cursor: pointer; transition: background 0.12s, color 0.12s; }
.tab-btn:hover:not(.active) { background: var(--bg-3); color: var(--text); }
.tab-btn.active { background: var(--violet); color: #fff; box-shadow: 0 1px 6px var(--violet-glow); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── TABLAS ── */
.table-wrap { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.table-header-title { font-size: 0.9em; font-weight: 600; color: var(--text); }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); }
th { padding: 10px 18px; text-align: left; font-family: var(--mono); font-size: 0.67em; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 500; white-space: nowrap; background: var(--bg-2); }
td { padding: 12px 18px; border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 0.875em; 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; }
.td-strong { font-weight: 600; color: var(--text); }
.td-green  { color: var(--green); font-weight: 600; }
.td-red    { color: var(--red);   font-weight: 600; }

/* ── MODAL ── */
.modal { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); 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-xl); padding: 28px; width: 100%; max-width: 500px; position: relative; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn 180ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-title { font-size: 1.05em; font-weight: 700; color: var(--text); margin-bottom: 22px; letter-spacing: -0.01em; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 28px; height: 28px; 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.85em; transition: all 0.12s; }
.modal-close:hover { color: var(--text); background: var(--bg-2); border-color: var(--border-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, transform 0.15s, box-shadow 0.15s; }
.model-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.model-card[data-status="public"] { border-color: rgba(34,197,94,0.35); }
.model-card[data-status="public"]:hover { border-color: rgba(34,197,94,0.6); }
.model-card-top { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.model-card-name { font-size: 0.82em; 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.4em; }
.model-thumb-wrap { position: relative; overflow: hidden; }
.live-pill { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,0.82); border: 1px solid rgba(34,197,94,0.5); color: var(--green); font-family: var(--mono); font-size: 0.63em; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; padding: 3px 8px; 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.7em; color: var(--text-3); line-height: 1.9; }
.model-card-actions { display: flex; gap: 4px; padding: 9px 10px; }

/* ── MODEL STATUS CARDS ── */
.model-status-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.model-status-card { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 16px; min-width: 140px; max-width: 190px; flex: 1; transition: border-color 0.15s; }
.model-status-card:hover { border-color: var(--border-2); }
.model-status-card .msn { font-size: 0.85em; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.model-status-card .mss { font-family: var(--mono); font-size: 0.68em; display: flex; align-items: center; gap: 6px; }
.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 8px var(--green-dim); }
.mss-dot.orange { background: var(--yellow); box-shadow: 0 0 8px var(--yellow-dim); }
.mss-dot.red    { background: var(--red);    box-shadow: 0 0 8px var(--red-dim); }
.mss-dot.gray   { background: var(--text-3); }

/* ── EMPTY ── */
.empty { text-align: center; padding: 56px 20px; color: var(--text-3); font-size: 0.875em; border: 1px dashed var(--border); border-radius: var(--r-lg); background: var(--bg-1); }

/* ── NOTIF ── */
.notif { position: fixed; bottom: 24px; right: 24px; background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text); padding: 12px 18px; border-radius: var(--r-lg); font-size: 0.85em; z-index: 9999; box-shadow: var(--shadow-lg); animation: notifIn 200ms cubic-bezier(0.16, 1, 0.3, 1); max-width: 320px; }
@keyframes notifIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── SHIFT PANEL ── */
.shift-panel { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; margin-bottom: 20px; }
.shift-status-bar { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--r-md); margin-bottom: 18px; }
.shift-status-label { font-family: var(--mono); font-size: 0.67em; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.shift-status-val { font-size: 1em; font-weight: 700; color: var(--text); }
.shift-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.shift-btn { padding: 18px 16px; border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; border: 1px solid var(--border-2); background: var(--bg-2); color: var(--text); font-family: var(--font); font-size: 0.875em; font-weight: 600; transition: all 0.12s; }
.shift-btn:hover:not(:disabled) { border-color: var(--violet); background: var(--bg-3); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.shift-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.shift-btn.active   { background: var(--violet-dim); border-color: rgba(139,92,246,0.4); color: #A78BFA; }
.shift-btn-icon { font-size: 1.5em; }
.shift-btn-hint { font-family: var(--mono); font-size: 0.63em; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; background: var(--bg-2); border-radius: var(--r-md); border: 1px solid var(--border); margin-top: 18px; overflow: hidden; }
.timeline-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--border); font-size: 0.85em; transition: background 0.1s; }
.timeline-row:last-child { border-bottom: none; }
.timeline-row:hover { background: var(--bg-3); }
.timeline-label { color: var(--text-2); display: flex; align-items: center; gap: 9px; }
.timeline-val { font-family: var(--mono); color: var(--text); font-weight: 500; }
.timeline-val.pending { color: var(--text-3); }

/* ── NOTICES ── */
.notice-item { background: var(--bg-1); border: 1px solid var(--border); border-left: 3px solid var(--violet); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 8px; font-size: 0.875em; transition: border-color 0.12s; }
.notice-item.unread { border-left-color: var(--green); background: rgba(34,197,94,0.04); }
.notice-item .notice-from { font-size: 0.72em; color: var(--text-3); margin-bottom: 4px; font-family: var(--mono); }
.notice-item .notice-text { color: var(--text-2); }
.notice-item .notice-time { font-size: 0.7em; color: var(--text-3); margin-top: 5px; font-family: var(--mono); }

/* ── TIMEZONE LABEL ── */
.tz-label { font-size: 0.68em; font-weight: 600; color: #A78BFA; background: var(--violet-dim); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); letter-spacing: 0.04em; vertical-align: middle; border: 1px solid rgba(139,92,246,0.2); }

/* ── 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; }
    .kpi-grid-v21 { grid-template-columns: 1fr 1fr; }
    .topbar { padding: 0 16px; }
}
