:root {
    --bg: #f4f6f9;
    --panel: #ffffff;
    --line: #dfe6ee;
    --ink: #172033;
    --muted: #66758a;
    --noc-green: #198754;
    --noc-blue: #2563eb;
    --noc-yellow: #b7791f;
    --noc-orange: #c45f10;
    --noc-red: #c03221;
    --noc-gray: #5f6b7a;
    --noc-green-bg: #e8f5ee;
    --noc-blue-bg: #eaf2ff;
    --noc-yellow-bg: #fff7e6;
    --noc-orange-bg: #fff0e1;
    --noc-red-bg: #fdecea;
    --noc-gray-bg: #eef1f5;
    --ok: var(--noc-green);
    --warn: var(--noc-yellow);
    --crit: var(--noc-red);
    --orange: var(--noc-orange);
    --offline: var(--noc-gray);
}

body { background: var(--bg); color: var(--ink); font-size: 13px; }
a { text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; background: #101827; color: #dce7f5; border-right: 1px solid #0c1320; }
.brand-block { display: flex; align-items: center; gap: 12px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: #2f80ed; color: #fff; font-weight: 700; }
.brand-title { font-weight: 700; letter-spacing: .2px; }
.brand-subtitle { color: #93a4ba; font-size: 12px; }
.sidebar-nav { padding: 12px; gap: 3px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 10px; color: #b8c6d8; border-radius: 7px; padding: 9px 10px; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.main-panel { flex: 1; min-width: 0; }
.topbar { min-height: 58px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
.topbar h1 { font-size: 17px; line-height: 1.15; margin: 0; font-weight: 700; }
.topbar-subtitle { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 11.5px; }
.content-wrap { padding: 14px 16px 24px; }
.compact-ops-page { display: grid; gap: 8px; }
.compact-ops-page .filter-bar,
.compact-ops-page .noc-card,
.compact-ops-page.compact-form-card,
.compact-ops-page .compact-form-card { border-radius: 8px; }
.compact-ops-page .filter-bar { padding: 8px; margin-bottom: 8px; }
.compact-ops-page .row { --bs-gutter-x: .55rem; --bs-gutter-y: .5rem; }
.compact-ops-page .summary-grid { gap: 8px; margin-bottom: 8px; }
.compact-ops-page .summary-card { padding: 8px 9px; border-radius: 8px; }
.compact-ops-page .summary-card .label,
.compact-ops-page .summary-card .metric-label { font-size: 9.5px; line-height: 1.1; letter-spacing: .04em; }
.compact-ops-page .summary-card .value,
.compact-ops-page .summary-card .metric-value { font-size: 17px; line-height: 1.1; }
.compact-ops-page .help-note,
.compact-ops-page .form-text,
.compact-ops-page .small { font-size: 10.5px; line-height: 1.2; }
.compact-ops-page .noc-card { margin-bottom: 8px; }
.compact-ops-page .noc-card-header { padding: 8px 10px 7px; }
.compact-ops-page .noc-card-title { font-size: 13px; line-height: 1.15; margin: 0; }
.compact-ops-page .table-noc,
.compact-ops-page .compact-table { font-size: 11.25px; line-height: 1.16; margin-bottom: 0; }
.compact-ops-page .table-noc th,
.compact-ops-page .compact-table th { padding: 5px 6px; font-size: 8.8px; line-height: 1.1; letter-spacing: .05em; white-space: normal; }
.compact-ops-page .table-noc td,
.compact-ops-page .compact-table td { padding: 5px 6px; max-width: 220px; overflow-wrap: anywhere; white-space: normal; vertical-align: top; }
.compact-ops-page .status-badge { padding: 2px 5px; font-size: 9.5px; gap: 3px; max-width: max-content; }
.compact-ops-page .action-pill { min-height: 27px; padding: 4px 7px; border-radius: 7px; font-size: 10.5px; line-height: 1; gap: 5px; }
.compact-ops-page .action-icon-btn { width: 27px; height: 27px; }
.compact-ops-page .form-label { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .03em; line-height: 1.1; text-transform: uppercase; }
.compact-ops-page .form-control,
.compact-ops-page .form-select { min-height: 30px; padding: 4px 8px; border-radius: 7px; font-size: 12px; }
.compact-ops-page textarea.form-control { min-height: 58px; }
.compact-ops-page hr { margin: 4px 0 2px; }
.compact-ops-page pre { font-size: 10.5px; line-height: 1.2; }
.compact-ops-page .table-wrap { overflow: visible; }
.compact-ops-page details.compact-session-action { position: relative; }
.compact-ops-page details.compact-session-action summary { list-style: none; cursor: pointer; display: inline-flex; }
.compact-ops-page details.compact-session-action summary::-webkit-details-marker { display: none; }
.compact-ops-page .compact-revoke-form { display: grid; gap: 5px; min-width: 190px; margin-top: 5px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); }
.compact-ops-page .summary-card .small-value { font-size: 12px; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 900px) { .compact-ops-page .table-wrap { overflow: auto; } }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card, .noc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 1px 2px rgba(16,24,39,.04); }
.kpi-card { padding: 14px; position: relative; overflow: hidden; }
.kpi-link { display: block; color: inherit; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.kpi-link:hover { color: inherit; transform: translateY(-1px); border-color: #b9c7d8; box-shadow: 0 8px 18px rgba(16,24,39,.08); }
.metric-card { display: block; color: inherit; border-left: 5px solid var(--noc-gray); }
.metric-card:hover { color: inherit; }
.metric-ok { border-left-color: var(--noc-green); }
.metric-info { border-left-color: var(--noc-blue); }
.metric-warning { border-left-color: var(--noc-yellow); }
.metric-degraded { border-left-color: var(--noc-orange); }
.metric-critical { border-left-color: var(--noc-red); }
.metric-neutral { border-left-color: var(--noc-gray); }
.noc-alert { border-radius: 9px; border: 1px solid var(--line); padding: 11px 14px; margin-bottom: 16px; font-weight: 650; }
.noc-alert.status-ok { border-color: #a8d9bd; background: var(--noc-green-bg); color: var(--noc-green); }
.noc-alert.status-info { border-color: #b7cffb; background: var(--noc-blue-bg); color: var(--noc-blue); }
.noc-alert.status-warning { border-color: #f1d08b; background: var(--noc-yellow-bg); color: var(--noc-yellow); }
.noc-alert.status-degraded { border-color: #efb06e; background: var(--noc-orange-bg); color: var(--noc-orange); }
.noc-alert.status-critical { border-color: #efaaa2; background: var(--noc-red-bg); color: var(--noc-red); }
.kpi-card.compact { padding: 12px 14px; }
.kpi-card.compact .kpi-value { font-size: 22px; }
.secondary-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: -6px; }
.kpi-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 28px; font-weight: 750; line-height: 1.1; margin-top: 8px; }
.kpi-hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.noc-card { margin-bottom: 8px; }
.noc-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.noc-card-title { font-size: 13px; line-height: 1.15; font-weight: 700; margin: 0; }
.table-wrap, .table-responsive { overflow-x: auto; }
.table-noc, .compact-table { margin: 0; font-size: 11.25px; line-height: 1.18; }
.table-noc th, .compact-table th { color: var(--muted); font-size: 8.8px; line-height: 1.1; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; background: #f8fafc; white-space: normal; }
.table-noc td, .table-noc th, .compact-table td, .compact-table th { padding: 5px 6px; vertical-align: top; }
.table-noc td, .compact-table td { max-width: 220px; overflow-wrap: anywhere; white-space: normal; }
.compact-table-sm { font-size: 11px; }
.compact-table-sm td, .compact-table-sm th { padding: 4px 6px; white-space: nowrap; }
.dashboard-widget-table { max-height: 190px; overflow: auto; }
.dashboard-widget-table .table { margin-bottom: 0; }
.dashboard-widget-table thead th { position: sticky; top: 0; z-index: 2; }
.text-truncate-tooltip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; white-space: nowrap; }
.sortable-header { display: inline-flex; align-items: center; gap: 3px; color: inherit; text-decoration: none; white-space: nowrap; }
.sortable-header:hover, .sortable-header.is-active { color: #1d4ed8; }
.sortable-header.is-active { font-weight: 900; }
.sortable-header .sort-muted { color: #94a3b8; font-size: 10px; }
.pagination-compact { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pagination-count { color: var(--muted); font-size: 12px; font-weight: 700; }
.pagination-compact .page-link { min-width: 28px; padding: 3px 8px; font-size: 12px; text-align: center; }
.table-noc tbody tr,
.compact-table tbody tr {
    transition: background-color .12s ease, box-shadow .12s ease;
}
.table-noc tbody tr:hover,
.table-noc tbody tr:focus-within,
.compact-table tbody tr:hover,
.compact-table tbody tr:focus-within {
    box-shadow: inset 3px 0 0 #64748b;
}
.table-noc tbody tr:hover td,
.table-noc tbody tr:focus-within td,
.compact-table tbody tr:hover td,
.compact-table tbody tr:focus-within td {
    background: #eef2f7;
}
.table-noc tr.row-muted td,
.compact-table tr.row-muted td,
.table tr.row-muted td {
    background: #f8fafc;
    color: #64748b;
}
.table-noc tr.row-muted:hover td,
.table-noc tr.row-muted:focus-within td,
.compact-table tr.row-muted:hover td,
.compact-table tr.row-muted:focus-within td,
.table tr.row-muted:hover td,
.table tr.row-muted:focus-within td {
    background: #eef2f7;
}
.table-noc tr.row-muted a,
.compact-table tr.row-muted a,
.table tr.row-muted a {
    color: #475569;
}
.empty-state { padding: 28px; color: var(--muted); text-align: center; background: #fbfcfe; }
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; margin-right: 6px; }
.status-ok { background: var(--noc-green-bg); color: var(--noc-green); }
.status-info { background: var(--noc-blue-bg); color: var(--noc-blue); }
.status-warning { background: var(--noc-yellow-bg); color: var(--noc-yellow); }
.status-degraded, .status-orange { background: var(--noc-orange-bg); color: var(--noc-orange); }
.status-critical { background: var(--noc-red-bg); color: var(--noc-red); }
.status-unknown, .status-offline { background: var(--noc-gray-bg); color: var(--noc-gray); }
.badge-soft, .status-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 8px; font-weight: 750; font-size: 11px; line-height: 1; white-space: nowrap; }
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.row-accent { border-left: 4px solid transparent; }
.row-ok { border-left-color: var(--noc-green); }
.row-info { border-left-color: var(--noc-blue); }
.row-warning { border-left-color: var(--noc-yellow); }
.row-degraded { border-left-color: var(--noc-orange); }
.row-critical { border-left-color: var(--noc-red); }
.row-unknown { border-left-color: var(--noc-gray); }
.table-noc tr.row-warning td { background: #fffbf2; }
.table-noc tr.row-degraded td { background: #fff8f1; }
.table-noc tr.row-critical td { background: #fff5f4; }
.table-noc tr.row-warning:hover td,
.table-noc tr.row-warning:focus-within td { background: #fff4db; }
.table-noc tr.row-degraded:hover td,
.table-noc tr.row-degraded:focus-within td { background: #ffeddc; }
.table-noc tr.row-critical:hover td,
.table-noc tr.row-critical:focus-within td { background: #ffe4e1; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.summary-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--noc-gray); border-radius: 9px; padding: 12px 14px; }
.summary-card .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.summary-card .value { font-size: 24px; font-weight: 750; margin-top: 3px; }
.summary-card.metric-ok { border-left-color: var(--noc-green); }
.summary-card.metric-info { border-left-color: var(--noc-blue); }
.summary-card.metric-warning { border-left-color: var(--noc-yellow); }
.summary-card.metric-degraded { border-left-color: var(--noc-orange); }
.summary-card.metric-critical { border-left-color: var(--noc-red); }
.summary-card.metric-muted { border-left-color: #64748b; }
.help-note { color: var(--muted); font-size: 12px; background: #fbfcfe; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-bottom: 14px; }
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--noc-gray); border-radius: 9px; padding: 13px; }
.metric.metric-ok { border-left-color: var(--noc-green); }
.metric.metric-info { border-left-color: var(--noc-blue); }
.metric.metric-warning { border-left-color: var(--noc-yellow); }
.metric.metric-degraded { border-left-color: var(--noc-orange); }
.metric.metric-critical { border-left-color: var(--noc-red); }
.metric.metric-neutral { border-left-color: var(--noc-gray); }
.metric .label { color: var(--muted); font-size: 12px; }
.metric .value { font-size: 22px; font-weight: 750; margin-top: 4px; }
.auth-bg { min-height: 100vh; display: flex; align-items: center; background: #eef3f8; }
.login-panel { max-width: 420px; margin: 0 auto; }
@media (max-width: 1100px) { .kpi-grid, .metric-row, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sidebar { width: 210px; } }
@media (max-width: 760px) { .app-shell { display: block; } .sidebar { width: 100%; } .topbar { align-items: flex-start; gap: 12px; flex-direction: column; } .kpi-grid, .metric-row, .summary-grid { grid-template-columns: 1fr; } }

.dashboard-shell { display: grid; gap: 9px; }
.dashboard-hero { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 96px; padding: 11px 12px; border: 1px solid #d9e2ef; border-radius: 8px; background: linear-gradient(135deg, #081526, #10233b); color: #fff; box-shadow: 0 8px 18px rgba(8,21,38,.12); }
.dashboard-hero .eyebrow { color: #93c5fd; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.dashboard-hero h2 { margin: 2px 0 2px; font-size: 20px; line-height: 1.1; }
.dashboard-hero p { margin: 0; max-width: 620px; color: #b8c6d8; font-size: 12px; line-height: 1.35; }
.dashboard-clock { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; min-width: 0; }
.dashboard-clock div, .dashboard-clock button, .dashboard-compact-toggle { min-height: 34px; }
.dashboard-clock div, .dashboard-compact-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; background: rgba(255,255,255,.07); }
.dashboard-clock span { color: #93a4ba; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.dashboard-clock strong { color: #fff; font-size: 12px; white-space: nowrap; }
.dashboard-compact-toggle { color: #dce7f5; font-size: 12px; font-weight: 800; cursor: pointer; }
.dashboard-compact-toggle input { margin: 0; }
.attention-board { border: 1px solid #d9e2ef; border-radius: 8px; background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.04); }
.attention-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #e6edf5; }
.attention-header h3, .section-title h3 { margin: 0; color: #0f172a; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 0; }
.attention-header span, .widget-note { color: #64748b; font-size: 12px; }
.attention-columns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; padding: 8px; }
.attention-tile { display: grid; gap: 3px; min-height: 78px; padding: 8px; border: 1px solid #e2e8f0; border-top: 3px solid #64748b; border-radius: 7px; color: inherit; background: #fff; }
.attention-tile:hover { color: inherit; border-color: #bfdbfe; box-shadow: 0 10px 20px rgba(15,23,42,.07); }
.attention-tile strong { overflow: hidden; color: #0f172a; font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.attention-tile span { overflow: hidden; color: #64748b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.attention-tile em { align-self: end; color: #1d4ed8; font-size: 11px; font-style: normal; font-weight: 850; }
.attention-critical { border-top-color: #dc2626; background: #fff7f7; }
.attention-degraded { border-top-color: #f97316; background: #fff8f1; }
.attention-warning { border-top-color: #d97706; background: #fffbeb; }
.attention-ok { border-top-color: #16a34a; background: #f0fdf4; }
.dashboard-kpi-section { display: grid; gap: 5px; }
.section-title { display: flex; justify-content: space-between; align-items: center; }
.ops-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.ops-kpi-card { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 8px; min-height: 82px; padding: 8px; border: 1px solid #d9e2ef; border-left: 4px solid #64748b; border-radius: 7px; color: inherit; background: #fff; box-shadow: 0 5px 14px rgba(15,23,42,.035); }
.ops-kpi-card:hover { color: inherit; transform: translateY(-1px); border-color: #bfdbfe; box-shadow: 0 12px 24px rgba(15,23,42,.07); }
.ops-kpi-card span { display: block; color: #64748b; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.ops-kpi-card strong { display: block; margin-top: 3px; color: #0f172a; font-size: 21px; line-height: 1; }
.ops-kpi-card small, .ops-kpi-card em { display: block; margin-top: 4px; overflow: hidden; color: #64748b; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.ops-kpi-card em { color: #334155; font-weight: 750; }
.kpi-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #eef2ff; color: #2563eb; font-size: 15px; }
.ops-kpi-card.metric-ok { border-left-color: #16a34a; }
.ops-kpi-card.metric-info { border-left-color: #2563eb; }
.ops-kpi-card.metric-warning { border-left-color: #d97706; }
.ops-kpi-card.metric-degraded { border-left-color: #f97316; }
.ops-kpi-card.metric-critical { border-left-color: #dc2626; }
.ops-kpi-card.metric-unknown { border-left-color: #64748b; }
.lazy-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.lazy-widget { overflow: hidden; }
.widget-body { min-height: 118px; }
.skeleton-table { display: grid; gap: 7px; padding: 10px; }
.skeleton-table span { height: 18px; border-radius: 6px; background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7); background-size: 200% 100%; animation: dashboard-skeleton 1.1s linear infinite; }
.skeleton-table span:first-child { width: 70%; }
.skeleton-table span:nth-child(2) { width: 100%; }
.skeleton-table span:nth-child(3) { width: 86%; }
.skeleton-table span:nth-child(4) { width: 92%; }
@keyframes dashboard-skeleton { to { background-position-x: -200%; } }
@media (max-width: 1280px) {
    .ops-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .attention-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-hero { display: grid; }
    .dashboard-clock { min-width: 0; }
}
@media (max-width: 860px) {
    .ops-kpi-grid, .attention-columns, .lazy-dashboard-grid, .dashboard-clock { grid-template-columns: 1fr; }
    .dashboard-hero h2 { font-size: 21px; }
}
.dashboard-compact { gap: 6px; }
.dashboard-compact .dashboard-hero { min-height: 74px; padding: 8px 10px; }
.dashboard-compact .dashboard-hero p { display: none; }
.dashboard-compact .attention-header { padding: 6px 8px; }
.dashboard-compact .attention-columns { gap: 5px; padding: 6px; }
.dashboard-compact .attention-tile { min-height: 62px; padding: 6px; }
.dashboard-compact .dashboard-kpi-section { gap: 4px; }
.dashboard-compact .ops-kpi-grid { gap: 5px; }
.dashboard-compact .ops-kpi-card { min-height: 68px; padding: 6px; grid-template-columns: 26px minmax(0,1fr); }
.dashboard-compact .ops-kpi-card strong { font-size: 18px; }
.dashboard-compact .ops-kpi-card small { display: none; }
.dashboard-compact .kpi-icon { width: 26px; height: 26px; font-size: 13px; }
.dashboard-compact .lazy-dashboard-grid { gap: 7px; }
.dashboard-compact .noc-card-header { padding: 7px 9px; }
.dashboard-compact .widget-body { min-height: 92px; }
.dashboard-compact .skeleton-table { padding: 8px; }

.followup-modal .modal-content { border: 0; border-radius: 14px; box-shadow: 0 24px 70px rgba(15, 23, 42, .22); }
.followup-modal .modal-header { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.followup-modal .modal-body { padding: 20px 22px 22px; }
.modal-eyebrow { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.followup-modal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.followup-fact { border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; padding: 10px 12px; min-height: 74px; }
.followup-fact span { display: block; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.followup-fact strong { display: block; color: var(--ink); font-size: 13px; line-height: 1.25; word-break: break-word; }
.followup-fact small { display: block; color: var(--muted); margin-top: 5px; }
.followup-latest-note { border-left: 4px solid var(--noc-blue); background: var(--noc-blue-bg); border-radius: 9px; padding: 11px 13px; }
.followup-latest-note span { display: block; color: var(--noc-blue); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.followup-latest-note p { margin: 0; color: var(--ink); }
.followup-note-form { border-top: 1px solid var(--line); padding-top: 16px; }
.modal-action-row { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1100px) { .followup-modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .followup-modal-grid { grid-template-columns: 1fr; } .modal-action-row { justify-content: stretch; } .modal-action-row .btn { flex: 1 1 auto; } }


/* App-wide operations UI primitives */
.ops-shell { display: grid; gap: 16px; }
.ops-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 1px 2px rgba(16,24,39,.04); }
.ops-eyebrow, .ops-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ops-title { margin: 4px 0 6px; color: var(--ink); font-size: 30px; line-height: 1.12; font-weight: 850; }
.ops-copy { margin: 0; color: #526179; max-width: 760px; }
.ops-actions { display: grid; justify-items: end; gap: 10px; min-width: 320px; }
.ops-tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.ops-tabs a { padding: 8px 11px; border-radius: 8px; color: #475569; font-size: 13px; font-weight: 750; text-decoration: none; }
.ops-tabs a:hover { background: #eef2f7; color: var(--ink); }
.ops-tabs a.active { background: #0f766e; color: #fff; }
.ops-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ops-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: #475569; background: #f8fafc; font-size: 13px; font-weight: 700; }
.ops-pill::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: currentColor; opacity: .75; }
.ops-pill-success { background: var(--noc-green-bg); border-color: #bbf7d0; color: var(--noc-green); }
.ops-pill-warning { background: var(--noc-yellow-bg); border-color: #f1d08b; color: var(--noc-yellow); }
.ops-pill-danger { background: var(--noc-red-bg); border-color: #efaaa2; color: var(--noc-red); }
.ops-pill-muted { background: #f1f5f9; border-color: #cbd5e1; color: #64748b; }
.btn-outline-danger {
    background: #fff;
    border: 1px solid #ef4444;
    color: #b91c1c;
}
.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
}
.ops-filter-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 14px; box-shadow: 0 1px 2px rgba(16,24,39,.04); }
.ops-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.ops-filter-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.ops-filter-grid input, .ops-filter-grid select, .ops-control { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); padding: 7px 10px; }
.ops-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; box-shadow: 0 1px 2px rgba(16,24,39,.04); }
.ops-panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.ops-panel-header h2 { margin: 0; color: var(--ink); font-size: 19px; line-height: 1.2; }
.ops-panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.ops-table .table, .ops-table .compact-table, .ops-table .table-noc { margin-bottom: 0; }
.ops-table .table th, .ops-table .compact-table th, .ops-table .table-noc th { background: #f8fafc; color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.ops-primary-text { display: grid; gap: 2px; }
.ops-primary-text a, .ops-primary-text strong { color: #0b63f6; font-weight: 800; }
.ops-primary-text span { color: var(--muted); font-size: 12px; }
.action-row,
.action-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.action-row {
    flex-wrap: wrap;
}
.action-inline {
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: 100%;
}
.action-icon-btn,
.action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 26px;
    border: 1px solid #d9e2ef;
    border-radius: 7px;
    background: #ffffff;
    color: #475569;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}
.action-pill {
    padding: 4px 7px;
}
.action-icon-btn {
    width: 27px;
    padding: 0;
}
.form-label { margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .03em; line-height: 1.1; text-transform: uppercase; }
.form-control,
.form-select { min-height: 30px; padding: 4px 8px; border-radius: 7px; font-size: 12px; }
textarea.form-control { min-height: 58px; }
.action-icon-btn:hover,
.action-pill:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
}
.action-icon-btn.success,
.action-pill.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #047857;
}
.action-icon-btn.success:hover,
.action-pill.success:hover {
    border-color: #34d399;
    background: #dcfce7;
}
.action-icon-btn.warning,
.action-pill.warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}
.action-icon-btn.danger,
.action-pill.danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}
.action-menu .dropdown-toggle::after {
    display: none;
}
.action-menu .dropdown-menu {
    min-width: 190px;
    padding: 6px;
    border-color: #d9e2ef;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .14);
}
.action-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 7px;
    padding: 7px 9px;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
}
.action-menu .dropdown-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.compact-indicators {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.compact-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 18px;
    padding: 2px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}
.compact-indicator.warning { border-color: #fed7aa; background: #fff7ed; color: #c2410c; }
.compact-indicator.danger { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.compact-indicator.success { border-color: #bbf7d0; background: #f0fdf4; color: #047857; }
.compact-indicator.info { border-color: #bae6fd; background: #f0f9ff; color: #0369a1; }
.visibility-mini-label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-height: 14px;
    padding: 1px 4px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 9px;
    font-weight: 400;
    line-height: 1;
    justify-self: start;
    vertical-align: middle;
    white-space: nowrap;
    width: max-content;
}
.compact-status-badge .status-badge,
.compact-status-badge .badge {
    padding: 3px 7px;
    font-size: 10px;
    border-radius: 999px;
}
@media (max-width: 980px) {
    .action-inline .action-secondary {
        display: none;
    }
}
.ops-empty { padding: 34px 18px; text-align: center; color: var(--muted); background: #fbfcfe; }
.ops-pagination { margin-top: 12px; }
.ops-summary-line { color: var(--muted); font-size: 13px; }
@media (max-width: 1200px) { .ops-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .ops-hero { display: grid; } .ops-actions { justify-items: stretch; min-width: 0; } .ops-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .ops-tabs a { text-align: center; } .ops-filter-grid { grid-template-columns: 1fr; } .ops-panel-header { display: grid; } }

/* Sticky modal actions keep save/cancel visible on long operational forms. */
.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 2rem);
}

.modal-sticky-header {
    position: sticky;
    top: 0;
    z-index: 6;
    background: var(--bs-modal-bg, #fff);
}

.modal-sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    background: var(--bs-modal-bg, #fff);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}

.modal-sticky-actions .btn {
    min-width: 120px;
}

.pppoe-picker {
    position: relative;
}

.pppoe-search-results {
    position: static;
    z-index: 1080;
    max-height: 260px;
    margin-top: 4px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .16);
}

.pppoe-search-option {
    display: block;
    width: 100%;
    padding: 7px 9px;
    color: var(--ink);
    text-align: left;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #eef2f7;
}

.pppoe-search-option:hover,
.pppoe-search-option:focus {
    background: #eff6ff;
    outline: 0;
}

.pppoe-search-option:last-child {
    border-bottom: 0;
}

.pppoe-search-title {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 800;
}

.pppoe-search-meta {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.pppoe-selected-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.subscriber-live { display: grid; gap: 10px; }
.subscriber-ops { max-width: 1460px; margin: 0 auto; }
.subscriber-ops-bar {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 9px 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
}
.subscriber-ops-title { min-width: 0; }
.subscriber-ops-title h2 { margin: 1px 0 2px; color: #0f172a; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
.subscriber-toolbar,
.subscriber-hero {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
}
.subscriber-toolbar h2 { margin: 1px 0 2px; font-size: 19px; line-height: 1.15; }
.subscriber-eyebrow { color: #2563eb; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.subscriber-subtitle,
.subscriber-actions,
.subscriber-identifiers,
.session-main,
.session-facts { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.subscriber-subtitle span { color: var(--muted); font-size: 12px; }
.subscriber-subtitle span:not(:last-child)::after { margin-left: 7px; color: #cbd5e1; content: '/'; }
.subscriber-hero { align-items: stretch; border-left: 5px solid var(--noc-gray); }
.subscriber-hero.metric-ok { border-left-color: var(--noc-green); }
.subscriber-hero.metric-critical { border-left-color: var(--noc-red); }
.subscriber-hero.metric-warning { border-left-color: var(--noc-yellow); }
.subscriber-hero.metric-info { border-left-color: var(--noc-blue); }
.subscriber-state { display: grid; gap: 5px; min-width: 230px; }
.subscriber-state .state-label,
.subscriber-copy span,
.subscriber-profile span,
.session-facts b { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.subscriber-state strong { color: #0f172a; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }
.subscriber-state > span:last-child { color: var(--muted); font-size: 12px; }
.subscriber-identifiers { justify-content: flex-end; }
.subscriber-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14px;
    gap: 2px 7px;
    align-items: center;
    min-width: 132px;
    max-width: 210px;
    padding: 7px 8px;
    text-align: left;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
}
.subscriber-copy strong { overflow: hidden; color: #111827; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.subscriber-copy i { grid-row: 1 / span 2; grid-column: 2; color: #64748b; font-size: 12px; }
.subscriber-copy.copied { border-color: #86efac; background: #f0fdf4; }
.subscriber-current {
    display: grid;
    grid-template-columns: minmax(145px, .8fr) repeat(5, minmax(130px, 1fr));
    gap: 8px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 5px solid var(--noc-gray);
    border-radius: 9px;
}
.subscriber-current.metric-ok { border-left-color: var(--noc-green); }
.subscriber-current.metric-critical { border-left-color: var(--noc-red); }
.subscriber-current.metric-warning { border-left-color: var(--noc-yellow); }
.subscriber-current.metric-info { border-left-color: var(--noc-blue); }
.subscriber-status-cell {
    display: grid;
    gap: 4px;
    align-content: center;
    min-width: 0;
    padding: 6px 8px;
    background: #f8fafc;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
}
.subscriber-status-cell > span,
.subscriber-status-cell small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.subscriber-status-cell div { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.subscriber-current-copy { width: 100%; max-width: none; min-width: 0; padding: 6px 8px; }
.subscriber-current-copy strong { font-size: 12px; }
.subscriber-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.subscriber-ops .summary-card { min-width: 0; padding: 8px 10px; border-radius: 8px; }
.subscriber-ops .summary-card .label { font-size: 10px; font-weight: 900; }
.subscriber-ops .summary-card .value { margin-top: 2px; font-size: 18px; line-height: 1.15; }
.subscriber-small-value { overflow: hidden; font-size: 15px !important; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.subscriber-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 10px; }
.subscriber-ops-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .8fr); gap: 10px; align-items: start; }
.subscriber-side-stack { display: grid; gap: 10px; }
.subscriber-ops .noc-card { margin-bottom: 0; border-radius: 8px; }
.subscriber-ops .noc-card-header { padding: 8px 10px; }
.subscriber-ops .noc-card-title { font-size: 13px; }
.subscriber-session-list { display: grid; gap: 7px; padding: 9px; }
.subscriber-session { border: 1px solid #e2e8f0; border-left: 4px solid #64748b; border-radius: 7px; background: #fff; }
.subscriber-session.row-ok { border-left-color: var(--noc-green); }
.subscriber-session.row-critical { border-left-color: var(--noc-red); }
.session-main { justify-content: space-between; padding: 8px 9px; border-bottom: 1px solid #edf2f7; }
.session-main strong { display: block; color: #0f172a; font-size: 13px; overflow-wrap: anywhere; }
.session-main span { color: var(--muted); font-size: 11px; }
.session-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 8px 9px; }
.session-facts span { min-width: 0; overflow: hidden; color: #111827; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.session-facts b { display: block; margin-bottom: 2px; }
.subscriber-profile { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; padding: 9px; }
.subscriber-profile div { min-width: 0; padding: 7px 8px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 7px; }
.subscriber-profile strong { display: block; margin-top: 2px; overflow: hidden; color: #111827; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.subscriber-profile-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.subscriber-action-list { padding: 8px; }
@media (max-width: 1100px) {
    .subscriber-metrics,
    .subscriber-grid,
    .subscriber-ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .subscriber-current { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .subscriber-identifiers { justify-content: flex-start; }
}
@media (max-width: 760px) {
    .subscriber-toolbar,
    .subscriber-ops-bar,
    .subscriber-hero { display: grid; }
    .subscriber-actions .action-pill { flex: 1 1 46%; justify-content: center; }
    .subscriber-metrics,
    .subscriber-grid,
    .subscriber-ops-grid,
    .subscriber-current,
    .session-facts,
    .subscriber-profile { grid-template-columns: 1fr; }
    .subscriber-copy { max-width: none; width: 100%; }
}

.rich-editor-wrap { border: 1px solid #cfd8e3; border-radius: 8px; background: #fff; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.rich-editor-wrap.is-focused { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.rich-editor-comment-header { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 7px 9px 0; color: #64748b; font-size: 11px; line-height: 1.1; }
.rich-editor-comment-header span { display: inline-flex; gap: 5px; align-items: center; color: #1d4ed8; font-weight: 600; }
.rich-editor-comment-header small { color: #94a3b8; font-size: 10px; }
.rich-editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 5px; border-bottom: 1px solid #e4ebf3; background: #f8fafc; }
.rich-editor-comment-wrap .rich-editor-toolbar { border-bottom: 0; background: #fff; }
.rich-editor-toolbar button { display: inline-flex; place-items: center; justify-content: center; gap: 3px; min-width: 28px; height: 26px; padding: 0 7px; border: 1px solid #d8e2ef; border-radius: 7px; background: #fff; color: #334155; font-size: 11px; font-weight: 700; line-height: 1; }
.rich-editor-toolbar button:hover { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.rich-editor-surface { min-height: 74px; max-height: 260px; overflow: auto; padding: 8px 9px; color: #1f2937; font-size: 12px; line-height: 1.35; outline: 0; }
.rich-editor-comment-wrap .rich-editor-surface { min-height: 88px; margin: 0 7px 7px; padding: 8px; border: 1px solid #e4ebf3; border-radius: 8px; background: #fbfdff; }
.rich-editor-surface:empty::before { content: attr(data-placeholder); color: #94a3b8; }
.rich-editor-quick-row { display: flex; gap: 5px; overflow-x: auto; padding: 0 7px 7px; scrollbar-width: none; }
.rich-editor-quick-row::-webkit-scrollbar { display: none; }
.rich-editor-quick-row button { flex: 0 0 auto; min-height: 25px; padding: 3px 8px; border: 1px solid #dbeafe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.rich-editor-quick-row button:hover { border-color: #93c5fd; background: #dbeafe; }
.rich-text-output p,
.rich-editor-surface p { margin: 0 0 6px; }
.rich-text-output ul,
.rich-text-output ol,
.rich-editor-surface ul,
.rich-editor-surface ol { margin: 4px 0 6px 18px; padding: 0; }
.rich-text-output blockquote,
.rich-editor-surface blockquote { margin: 5px 0; padding: 4px 7px; border-left: 3px solid #bfdbfe; background: #eff6ff; color: #334155; }
.compact-ops-page .rich-editor-surface { min-height: 58px; font-size: 11.75px; }
.compact-ops-page .rich-editor-comment-wrap .rich-editor-surface { min-height: 86px; font-size: 12px; }
@media (max-width: 767px) {
    .rich-editor-toolbar { gap: 5px; padding: 6px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .rich-editor-toolbar::-webkit-scrollbar { display: none; }
    .rich-editor-toolbar button { min-width: 34px; height: 32px; border-radius: 8px; font-size: 12px; }
    .rich-editor-comment-header { padding: 8px 9px 0; font-size: 12px; }
    .rich-editor-comment-wrap .rich-editor-surface { min-height: 110px; font-size: 13px; line-height: 1.38; }
    .rich-editor-quick-row button { min-height: 31px; padding: 5px 10px; font-size: 11px; }
}

.flash-notice-stack {
    display: grid;
    gap: 6px;
    width: min(430px, 100%);
    margin: 0 0 10px auto;
}

.flash-notice {
    overflow: hidden;
    color: #334155;
    font-size: 12px;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.flash-notice-success { border-left-color: #16a34a; }
.flash-notice-warning { border-left-color: #d97706; }
.flash-notice-danger { border-left-color: #dc2626; }

.flash-notice summary {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    padding: 5px 7px;
    cursor: pointer;
    list-style: none;
}

.flash-notice summary::marker { content: ""; }
.flash-notice summary::-webkit-details-marker { display: none; }

.flash-notice-title {
    display: inline-flex;
    min-width: 0;
    gap: 6px;
    align-items: center;
    color: #1f2937;
    font-size: 11px;
}

.flash-notice-title strong {
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.flash-notice-title span {
    min-width: 0;
    overflow: hidden;
    color: #475569;
    font-weight: 500;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.flash-notice-body {
    padding: 0 8px 8px 26px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.flash-notice[open] .flash-notice-title span { display: none; }

.flash-notice-close {
    display: inline-grid;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #64748b;
    border-radius: 6px;
}

.flash-notice-close:hover,
.flash-notice-close:focus {
    color: #0f172a;
    background: #f1f5f9;
    outline: 0;
}

@media (max-width: 760px) {
    .flash-notice-stack {
        width: 100%;
        margin-left: 0;
    }
}

.compact-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(150px, 190px) auto auto;
    gap: 8px;
    align-items: center;
}

/* App-wide compact retrofit for older Bootstrap-style module pages. */
.content-wrap {
    max-width: 100%;
}

.content-wrap > .d-flex:first-child,
.content-wrap > .page-heading,
.content-wrap .section-title {
    margin-bottom: 8px;
}

.content-wrap h1 {
    margin: 0;
    font-size: 18px;
    line-height: 1.18;
    font-weight: 700;
}

.content-wrap h2,
.content-wrap h3 {
    line-height: 1.2;
}

.content-wrap .row {
    --bs-gutter-x: .55rem;
    --bs-gutter-y: .55rem;
}

.content-wrap .card,
.content-wrap .modal-content,
.content-wrap .dropdown-menu {
    border-color: var(--line, #dfe6ee);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16,24,39,.04);
}

.content-wrap .card-header,
.content-wrap .card-footer {
    padding: 7px 10px;
    background: #f8fafc;
    border-color: var(--line, #dfe6ee);
}

.content-wrap .card-body {
    padding: 10px;
}

.content-wrap .btn:not(.btn-lg) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 650;
    white-space: normal;
}

.content-wrap .btn-sm,
.content-wrap .action-pill.compact,
.content-wrap .action-icon-btn {
    min-height: 28px;
}

.content-wrap .form-label {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.15;
    font-weight: 700;
}

.content-wrap .form-control:not(.form-control-lg),
.content-wrap .form-select:not(.form-select-lg) {
    min-height: 32px;
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 12.5px;
    line-height: 1.25;
}

.content-wrap textarea.form-control:not(.form-control-lg) {
    min-height: 68px;
}

.content-wrap .alert {
    padding: 7px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 12.5px;
}

.content-wrap .summary-grid {
    gap: 8px;
    margin-bottom: 8px;
}

.content-wrap .summary-card {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 8px;
}

.content-wrap .summary-card .label,
.content-wrap .summary-card .metric-label {
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.content-wrap .summary-card .value,
.content-wrap .summary-card strong {
    font-size: 18px;
    line-height: 1.15;
}

.content-wrap .table {
    margin-bottom: 0;
}

.content-wrap .table > :not(caption) > * > * {
    padding: 5px 6px;
}

.content-wrap a,
.content-wrap code,
.content-wrap td,
.content-wrap th {
    overflow-wrap: anywhere;
}

.content-wrap .filter-bar {
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px solid var(--line, #dfe6ee);
    border-radius: 8px;
    background: #fff;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.page-heading p {
    font-size: 12.5px;
}

.compact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.compact-form-grid label {
    display: grid;
    gap: 4px;
    color: #64748b;
    font-size: 12px;
}

.compact-form-grid .form-control,
.compact-form-grid .form-select,
.compact-filter-bar .form-control,
.compact-filter-bar .form-select {
    min-height: 36px;
    font-size: 13px;
}

.grid-span-2 {
    grid-column: 1 / -1;
}

.two-col-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
    gap: 12px;
}

.compact-kv {
    display: grid;
    gap: 7px;
}

.compact-kv > div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 4px 0;
    border-bottom: 1px solid #eef2f7;
}

.compact-kv span {
    color: #64748b;
    font-size: 12px;
}

.compact-kv strong {
    min-width: 0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.hr-review-actions {
    display: grid;
    gap: 6px;
    min-width: 260px;
}

.hr-review-actions form {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto;
    gap: 6px;
    align-items: center;
}

.hr-compact {
    gap: 6px;
}

.hr-compact .page-heading {
    gap: 6px;
    margin-bottom: 0;
}

.hr-compact .page-heading h1 {
    font-size: 20px;
    line-height: 1.1;
    margin: 0;
}

.hr-compact .page-heading p {
    font-size: 11px;
    line-height: 1.15;
}

.hr-compact .action-inline {
    gap: 5px;
}

.hr-compact .hr-daily-heading {
    align-items: center;
    margin-bottom: -2px;
}

.hr-compact .hr-daily-heading h1 {
    font-size: 17px;
}

.hr-compact .hr-daily-filter-card .noc-card-header {
    padding: 4px 6px;
}

.hr-compact .hr-daily-filter-card .action-inline {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(132px, .6fr) minmax(130px, .7fr) minmax(142px, .7fr) minmax(130px, .6fr) minmax(150px, .72fr) minmax(130px, .62fr) auto;
    gap: 5px;
    align-items: center;
}

.hr-compact .hr-daily-filter-card .form-control,
.hr-compact .hr-daily-filter-card .form-select {
    min-height: 27px;
    padding: 2px 7px;
    font-size: 11px;
    line-height: 1.1;
}

.hr-compact .ops-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    align-items: stretch;
    margin-bottom: 0;
}

.hr-compact .ops-metric-grid.four-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-compact .hr-daily-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 5px 6px 6px;
}

.hr-compact a.summary-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hr-compact a.summary-card:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.hr-compact a.summary-card.is-active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18);
}

.hr-compact .hr-source-cards {
    padding: 5px 6px 6px;
}

.hr-compact .summary-grid,
.hr-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 0;
}

.hr-compact .summary-card {
    min-height: 39px;
    padding: 5px 7px;
    border-left-width: 3px;
}

.hr-compact .summary-card span {
    display: block;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.hr-compact .summary-card .metric-label {
    font-size: 9px;
    line-height: 1;
}

.hr-compact .summary-card strong {
    display: block;
    margin-top: 1px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 650;
    line-height: 1;
}

.hr-compact .summary-card small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 9.5px;
    line-height: 1.1;
}

.hr-compact .noc-card {
    margin-bottom: 0;
    border-radius: 8px;
}

.hr-compact .noc-card-header {
    min-height: 30px;
    padding: 5px 7px;
}

.hr-compact .noc-card-title {
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.1;
}

.hr-compact .hr-daily-section {
    margin-bottom: 6px;
}

.hr-compact .hr-daily-section .noc-card-header p {
    margin-top: 1px;
    font-size: 10px;
    line-height: 1.1;
}

.hr-compact .compact-filter-bar {
    grid-template-columns: minmax(180px, 1fr) minmax(120px, .28fr) minmax(130px, .32fr) auto auto;
    gap: 5px;
    padding: 6px;
}

.hr-compact .hr-dashboard-filter {
    grid-template-columns: minmax(130px, .3fr) minmax(150px, .4fr) minmax(150px, .4fr) auto auto;
}

.hr-compact .hr-employee-filter {
    grid-template-columns: minmax(190px, 1fr) minmax(116px, .28fr) minmax(124px, .32fr) minmax(130px, .35fr) minmax(130px, .35fr) minmax(130px, .35fr) auto auto;
}

.hr-compact .hr-leave-filter {
    grid-template-columns: minmax(180px, 1fr) minmax(112px, .26fr) minmax(130px, .34fr) minmax(130px, .34fr) minmax(116px, .28fr) minmax(116px, .28fr) auto auto;
}

.hr-compact .compact-filter-bar .form-control,
.hr-compact .compact-filter-bar .form-select,
.hr-compact .compact-form-grid .form-control,
.hr-compact .compact-form-grid .form-select {
    min-height: 28px;
    padding: 3px 7px;
    font-size: 11.5px;
}

.hr-compact textarea.form-control {
    min-height: 44px;
}

.hr-compact .compact-form-grid {
    gap: 6px;
    padding: 8px;
}

.hr-compact .compact-form-grid label {
    gap: 2px;
    font-size: 10.5px;
    line-height: 1.15;
}

.hr-compact .two-col-grid,
.hr-detail-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .72fr);
    gap: 8px;
}

.hr-compact .compact-kv {
    gap: 0;
}

.hr-compact .compact-kv > div {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
    padding: 3px 8px;
}

.hr-compact .compact-kv span {
    font-size: 10.5px;
    line-height: 1.15;
}

.hr-compact .compact-kv strong {
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.2;
}

.hr-compact .table-wrap {
    overflow: auto;
}

.hr-compact .compact-table {
    font-size: 10.2px;
    line-height: 1.08;
}

.hr-compact .compact-table th {
    padding: 3px 5px;
    font-size: 8px;
}

.hr-compact .compact-table td {
    padding: 3px 5px;
    max-width: 190px;
    vertical-align: middle;
}

.hr-compact .status-badge {
    padding: 1px 5px;
    font-size: 9px;
}

.hr-compact .action-pill {
    min-height: 24px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 9.8px;
}

.hr-compact .action-icon-btn {
    width: 24px;
    height: 24px;
}

.hr-reason-cell {
    max-width: 260px;
    color: #334155;
    line-height: 1.15;
}

.hr-review-actions {
    gap: 4px;
    min-width: 220px;
}

.hr-review-actions form {
    grid-template-columns: minmax(110px, 1fr) auto;
    gap: 4px;
}

.hr-review-actions .form-control-sm {
    min-height: 25px;
    padding: 2px 6px;
    font-size: 10.5px;
}

.hr-main-stack,
.hr-side-stack {
    display: grid;
    gap: 8px;
    align-content: start;
}

.hr-inline-create,
.hr-compact-upload {
    border-bottom: 1px solid #e2e8f0;
}

.hr-subsection-title {
    padding: 6px 8px 2px;
    color: #475569;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.hr-profile-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .compact-filter-bar,
    .two-col-grid,
    .compact-form-grid {
        grid-template-columns: 1fr;
    }

    .grid-span-2 {
        grid-column: auto;
    }

    .compact-kv > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .hr-review-actions,
    .hr-review-actions form {
        min-width: 0;
        grid-template-columns: 1fr;
    }

    .hr-compact .compact-filter-bar,
    .hr-compact .two-col-grid,
    .hr-detail-grid,
    .hr-compact .compact-form-grid {
        grid-template-columns: 1fr;
    }

    .hr-compact .summary-grid,
    .hr-compact .ops-metric-grid,
    .hr-compact .hr-daily-stats,
    .hr-summary-grid,
    .hr-profile-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-compact .hr-daily-filter-card .action-inline {
        grid-template-columns: 1fr;
    }

    .hr-compact .compact-kv > div {
        grid-template-columns: 1fr;
        gap: 1px;
    }
}
