/* ============================================================
   GRIL ERP — Shared Design System
   One file, linked from every page instead of a duplicated
   inline <style> block per page.

   Palette is drawn from the actual GRIL logo (nuclear-medicine
   thyroid scan: deep indigo field, warm amber-gold scan gradient,
   radiation-yellow trefoil) — sampled directly from the PNG's
   pixels, not a generic SaaS blue.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@600;700;800&display=swap');

:root {
    /* --- Brand: indigo (from the logo's field) --- */
    --primary-900: #241C42;   /* deepest — header gradient, dark text on light bg */
    --primary-700: #4B3B7E;   /* main brand color — buttons, links, headings */
    --primary-500: #6E5AAE;   /* mid tint — hover states */
    --primary-100: #EEEAFA;   /* pale tint — icon chips, subtle backgrounds */

    /* --- Brand: amber-gold (from the logo's scan gradient) --- */
    --accent-700:  #B8811F;   /* hover / pressed */
    --accent-500:  #E0A83E;   /* accent — highlights, secondary actions */
    --accent-100:  #FBF0DA;   /* pale tint — accent chips */

    /* --- Semantic --- */
    --success: #16A34A;
    --success-bg: #DCFCE7;
    --danger: #DC2626;
    --danger-bg: #FEE2E2;
    --warning: #D97706;
    --warning-bg: #FEF3C7;

    /* --- Neutrals (warmed slightly toward the brand hue, not generic gray) --- */
    --text-main: #241F33;
    --text-sub: #6B6478;
    --surface: #FFFFFF;
    --surface-alt: #F8F6FC;
    --border: #E7E2F2;

    /* --- Shape / motion --- */
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shadow-card: 0 1px 2px rgba(36,28,66,0.04), 0 8px 24px rgba(36,28,66,0.06);
    --shadow-card-hover: 0 4px 8px rgba(36,28,66,0.06), 0 16px 32px rgba(75,59,126,0.14);
    --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

    --font-heading: 'Manrope', 'Segoe UI', sans-serif;
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 40px 24px;
    font-family: var(--font-body);
    background: var(--surface-alt);
    color: var(--text-main);
}

.wrapper { max-width: 1400px; margin: 0 auto; }

h1, h2, h3, .card-title { font-family: var(--font-heading); }

a { color: var(--primary-700); }

/* ---------- Panel ---------- */
.glass-panel {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.panel-body { padding: 40px; }

/* ---------- Header ---------- */
.app-header {
    position: relative;
    padding: 32px 40px;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
    color: #fff;
    overflow: hidden;
}

/* soft radial glow, echoing the scan-gradient on the logo */
.app-header::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(224,168,62,0.35) 0%, rgba(224,168,62,0) 70%);
    pointer-events: none;
}

/* Trefoil watermark — a nod to the actual radiation symbol on the GRIL
   logo, not a generic decorative blob. Three wedges around a hollow
   center, built with a conic-gradient + radial mask (no image asset). */
.trefoil-mark {
    position: absolute;
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(224,168,62,0.45) 0deg 55deg, transparent 55deg 120deg,
        rgba(224,168,62,0.45) 120deg 175deg, transparent 175deg 240deg,
        rgba(224,168,62,0.45) 240deg 295deg, transparent 295deg 360deg
    );
    -webkit-mask: radial-gradient(circle, transparent 17%, #000 19%);
            mask: radial-gradient(circle, transparent 17%, #000 19%);
    pointer-events: none;
}

.app-header-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.app-header .brand-row { display: flex; align-items: center; gap: 14px; }
.app-header .brand-logo { height: 40px; width: auto; display: block; }
.app-header h1 { font-size: 1.9rem; font-weight: 800; margin: 0; color: #fff; letter-spacing: -0.01em; }
.app-header .subtitle { color: rgba(255,255,255,0.72); font-size: 0.9rem; margin-top: 4px; }

.app-header .user-block { text-align: right; position: relative; font-size: 0.85rem; }
.app-header .user-day { font-weight: 700; color: #fff; }
.app-header .user-date { color: rgba(255,255,255,0.72); font-size: 0.82rem; }
.app-header .user-links { margin-top: 8px; color: rgba(255,255,255,0.6); font-size: 0.78rem; }
.app-header .user-links a { color: rgba(255,255,255,0.92); text-decoration: none; font-weight: 600; margin-left: 8px; }
.app-header .user-links a:hover { text-decoration: underline; }
.app-header .user-links a.link-danger { color: #FCA5A5; }

/* ---------- Stat strip (at-a-glance row above the module grid) ---------- */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    padding: 26px 40px 0;
}
.stat-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.stat-tile .icon-chip { width: 36px; height: 36px; border-radius: 9px; }
.stat-tile .icon-chip svg { width: 18px; height: 18px; }
.stat-tile-value { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text-main); }
.stat-tile-label { font-size: 0.74rem; color: var(--text-sub); margin-top: 3px; font-weight: 600; }
.stat-tile.is-alert .stat-tile-value { color: var(--danger); }
.stat-tile.is-ok .stat-tile-value { color: var(--success); }

/* ---------- All-clear illustration (replaces a bare "All Good" pill) ---------- */
.all-clear { display: flex; align-items: center; gap: 9px; }
.all-clear svg { width: 32px; height: 32px; color: var(--success); flex-shrink: 0; }
.all-clear-text { font-size: 0.78rem; font-weight: 700; color: var(--success); line-height: 1.25; }

/* ---------- Grid ---------- */
.grid-container {
    padding: 32px 40px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

/* ---------- Module card ---------- */
.module-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 270px;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-500);
    background: var(--surface);
}

.module-card.is-alert { border-left: 4px solid var(--danger); }
.module-card.is-ok { border-left: 4px solid var(--success); }
.module-card.is-warn { border-left: 4px solid var(--warning); }

.card-top-row { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }

.icon-chip {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-100);
    color: var(--primary-700);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.icon-chip svg { width: 22px; height: 22px; }
.icon-chip.accent { background: var(--accent-100); color: var(--accent-700); }
.icon-chip.danger { background: var(--danger-bg); color: var(--danger); }

.card-title { font-size: 1.08rem; font-weight: 700; color: var(--text-main); margin: 0 0 8px; }
.card-desc { color: var(--text-sub); font-size: 0.88rem; line-height: 1.55; margin-bottom: 22px; flex-grow: 1; }

.card-actions { display: grid; gap: 10px; }
.card-actions.cols-2 { grid-template-columns: 1fr 1fr; }
/* A 1fr column can't shrink below its button's min-content, so three buttons overflowed a
   ~290px card at common laptop widths. Flex-wrap keeps one row where they fit, two where not. */
.card-actions.cols-3 { display: flex; flex-wrap: wrap; }
.card-actions.cols-3 > * { flex: 1 1 0; min-width: min-content; display: flex; align-items: center; justify-content: center; }

/* ---------- Icon size fallback ----------
   icon() emits a bare <svg viewBox="0 0 256 256"> with no width/height, so an icon placed
   where no rule sizes it stretches to fill its container. :where() keeps this at zero
   specificity, so every explicit "... svg { width; height }" rule still wins. */
:where(svg[viewBox="0 0 256 256"]:not([width])) { width: 1em; height: 1em; }

/* ---------- Manage Users: module-access checkboxes ----------
   manage_users.php's own `.field input { width:100% }` also caught these checkboxes, pushing every
   label into a narrow column. Kept here rather than in that page's <style> so it could ship without
   re-uploading the page; the extra class makes it outrank the page rule regardless of load order. */
.mod-check-group input[type="checkbox"] { width: auto; padding: 0; margin: 0; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn-action {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--primary-700);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-action:hover { background: var(--primary-700); color: #fff; border-color: var(--primary-700); }

.btn-primary-action { background: var(--primary-700); color: #fff; border: 1px solid var(--primary-700); }
.btn-primary-action:hover { background: var(--primary-900); border-color: var(--primary-900); }

/* ---------- Badges ---------- */
.stat-badge {
    background: var(--primary-100);
    color: var(--primary-700);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
}
.alert-badge { background: var(--danger-bg); color: var(--danger); }
.success-badge { background: var(--success-bg); color: var(--success); }
.warn-badge { background: var(--warning-bg); color: var(--warning); }

/* ---------- Mini status ring (replaces a bare number for alert counts) ---------- */
.status-ring { display: flex; align-items: center; gap: 8px; }
.status-ring svg { width: 30px; height: 30px; }
.status-ring .ring-track { stroke: var(--border); fill: none; stroke-width: 3; }
.status-ring .ring-value { fill: none; stroke-width: 3; stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; }
.status-ring.is-alert .ring-value { stroke: var(--danger); }
.status-ring.is-ok .ring-value { stroke: var(--success); }
.status-ring .ring-label { font-size: 0.78rem; font-weight: 700; color: var(--text-sub); }

/* ============================================================
   Record-list pages (hospitals.php and similar): sticky topnav,
   filter controls, data table with expandable detail panel.
   ============================================================ */

/* ---------- Compact icon+label buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    font-family: var(--font-body);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary { background: var(--primary-700); color: #fff; }
.btn-primary:hover { background: var(--primary-900); }
.btn-subtle { background: var(--surface-alt); color: var(--text-main); border-color: var(--border); }
.btn-subtle:hover { background: var(--border); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-sm svg { width: 13px; height: 13px; }

/* ---------- Sticky top nav ---------- */
.topnav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}
.topnav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-alt);
    color: var(--primary-700);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    white-space: nowrap;
    transition: background 0.15s;
}
.topnav-back:hover { background: var(--border); }
.topnav-back svg { width: 14px; height: 14px; }
.topnav-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1rem; color: var(--text-main); font-family: var(--font-heading); }
.topnav-title svg { width: 19px; height: 19px; color: var(--primary-700); }
.topnav-right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.topnav-user { font-size: 0.82rem; color: var(--text-sub); margin-left: 6px; white-space: nowrap; }
.topnav-logout { font-size: 0.82rem; color: var(--danger); text-decoration: none; font-weight: 700; margin-left: 2px; }
.topnav-logout:hover { text-decoration: underline; }

/* ---------- Page header (title + primary actions) ---------- */
.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.page-header h1 { margin: 0; font-size: 1.55rem; font-weight: 800; font-family: var(--font-heading); color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.page-header h1 svg { width: 24px; height: 24px; color: var(--primary-700); }
.page-header .sub { color: var(--text-sub); font-size: 0.85rem; margin-top: 4px; }
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Filter controls ---------- */
.controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.controls select, .controls input[type=text] {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-body);
    background: var(--surface);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.controls select:focus, .controls input[type=text]:focus { border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-100); }
.controls input[type=text] { min-width: 240px; }

/* ---------- Stats bar (compact pills, distinct from .stat-strip's tiles) ---------- */
.stats-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-pill { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 18px; font-size: 0.8rem; color: var(--text-sub); font-weight: 600; }
.stat-pill strong { display: block; color: var(--text-main); font-size: 1.15rem; font-family: var(--font-heading); font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-pill.is-danger { border-color: var(--danger-bg); }
.stat-pill.is-danger strong { color: var(--danger); }
.stat-pill.is-warn { border-color: var(--warning-bg); }
.stat-pill.is-warn strong { color: var(--warning); }

/* ---------- Card container + data table ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-card); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    padding: 12px 20px;
    text-align: left;
    font-size: 0.7rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
}
.data-table tr.main-row { border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.12s; }
.data-table tr.main-row:hover { background: var(--surface-alt); }
.data-table tr.main-row td { padding: 16px 20px; }
.inst-pill { background: var(--primary-100); color: var(--primary-700); padding: 4px 10px; border-radius: 6px; font-weight: 800; font-size: 0.8rem; font-family: 'SFMono-Regular', Consolas, monospace; white-space: nowrap; }
.hosp-name { font-weight: 700; font-size: 0.95rem; color: var(--text-main); }
.city-text { color: var(--text-sub); font-size: 0.86rem; }
.expand-icon { color: var(--text-sub); float: right; display: inline-flex; transition: transform 0.2s; }
.expand-icon svg { width: 16px; height: 16px; }
tr.main-row.active .expand-icon { transform: rotate(180deg); }

/* ---------- NOC status badges (list row) ---------- */
.noc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.noc-ok { background: var(--success-bg); color: var(--success); }
.noc-warn { background: var(--warning-bg); color: var(--warning); }
.noc-exp { background: var(--danger-bg); color: var(--danger); }
.noc-none { background: var(--surface-alt); color: var(--text-sub); border: 1px solid var(--border); }

/* ---------- Expandable detail panel ---------- */
tr.detail-row { display: none; background: var(--surface-alt); }
tr.detail-row.open { display: table-row; }
.detail-box { padding: 28px 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
@media (max-width: 768px) { .detail-box { grid-template-columns: 1fr; } }

.section-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 16px; }
.section-head.spaced { margin-top: 22px; }
.section-head h4 { margin: 0; font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--text-main); }
.section-head h4 svg { width: 16px; height: 16px; color: var(--primary-700); }
.section-head + .info-group { margin-top: 0; }

.info-label { font-size: 0.68rem; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 3px; }
.info-val { font-size: 0.88rem; color: var(--text-main); font-weight: 600; }
.info-val.is-muted { color: var(--text-sub); }
.info-val a { color: var(--primary-700); }
.info-group { margin-bottom: 14px; }
.no-data-note { color: var(--text-sub); font-size: 0.85rem; margin: 0; }

/* ---------- Contacts table ---------- */
.contact-table { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--surface); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.contact-table th { background: var(--surface-alt); font-size: 0.68rem; padding: 8px 10px; text-align: left; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.03em; }
.contact-table td { font-size: 0.83rem; padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--text-main); }
.contact-table tr:last-child td { border-bottom: none; }

/* ---------- Unlinked-document notice ---------- */
.unlinked-note { background: var(--warning-bg); border: 1px dashed var(--warning); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 14px; }
.unlinked-note-label { font-size: 0.72rem; font-weight: 700; color: var(--warning); text-transform: uppercase; letter-spacing: 0.04em; display: flex; align-items: center; gap: 6px; }
.unlinked-note-label svg { width: 13px; height: 13px; flex-shrink: 0; }
.unlinked-note .doc-chip-group { margin-top: 8px; }

/* ---------- Document chips ---------- */
.doc-chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-chip { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: 0.78rem; }
.doc-chip-name { padding: 5px 4px 5px 11px; color: var(--text-main); font-weight: 600; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 5px; }
.doc-chip-name svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-sub); }
.doc-chip a { padding: 5px 9px; text-decoration: none; font-weight: 700; border-left: 1px solid var(--border); display: inline-flex; align-items: center; }
.doc-chip a svg { width: 13px; height: 13px; }
.doc-chip .doc-view { color: var(--primary-700); }
.doc-chip .doc-download { color: var(--text-sub); }
.doc-chip .doc-delete { color: var(--danger); }

/* ---------- NOC cards ---------- */
.noc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; }
.noc-card-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border-bottom: 1px dashed var(--border); padding-bottom: 8px; margin-bottom: 10px; }
.noc-card-header .isotope { font-size: 0.82rem; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
.noc-card-header .isotope svg { width: 14px; height: 14px; color: var(--accent-700); }
.noc-card-actions { display: flex; gap: 8px; align-items: center; }
.noc-card-edit { font-size: 0.75rem; color: var(--primary-700); text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.noc-card-edit:hover { text-decoration: underline; }
.noc-card-edit svg { width: 12px; height: 12px; }
.noc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.82rem; }
.noc-grid .span-2 { grid-column: span 2; }
.noc-field-label { color: var(--text-sub); font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; display: block; }
.noc-field-value.is-ok { color: var(--success); font-weight: 700; }
.noc-field-value.is-warn { color: var(--warning); font-weight: 700; }
.noc-field-value.is-exp { color: var(--danger); font-weight: 700; }
.noc-card-docs { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.noc-card-docs .doc-chip { font-size: 0.74rem; }

/* ---------- Status badges (compact, uppercase) ---------- */
.status-badge { padding: 3px 9px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.st-ok { background: var(--success-bg); color: var(--success); }
.st-exp { background: var(--danger-bg); color: var(--danger); }
.st-soon { background: var(--warning-bg); color: var(--warning); }

/* ---------- NOC history (collapsed) ---------- */
.noc-history { margin-top: 10px; }
.noc-history summary { cursor: pointer; font-weight: 700; font-size: 0.82rem; color: var(--text-sub); padding: 8px 0; list-style: none; display: flex; align-items: center; gap: 7px; }
.noc-history summary::-webkit-details-marker { display: none; }
.noc-history summary svg { width: 14px; height: 14px; }
.noc-history-body { margin-top: 8px; }

.no-noc-note { text-align: center; color: var(--text-sub); padding: 30px 0; font-size: 0.88rem; }
.no-noc-note a { color: var(--primary-700); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; }
.no-noc-note a svg { width: 13px; height: 13px; }
.no-noc-note a:hover { text-decoration: underline; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-sub); }
.empty-state svg { width: 46px; height: 46px; color: var(--border); margin-bottom: 14px; }
.empty-state p { margin: 6px 0; }
.empty-state .empty-title { font-weight: 700; color: var(--text-main); font-size: 1rem; }
.empty-state .empty-hint { font-size: 0.86rem; }
.empty-state a { color: var(--primary-700); font-weight: 700; text-decoration: none; }
.empty-state a:hover { text-decoration: underline; }

/* ---------- Flash messages ---------- */
.flash { display: flex; align-items: center; gap: 8px; padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 700; font-size: 0.9rem; }
.flash svg { width: 16px; height: 16px; flex-shrink: 0; }
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-bg); }
.flash-error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-bg); }

@media (max-width: 640px) {
    body { padding: 20px 12px; }
    .panel-body, .app-header, .grid-container { padding-left: 20px; padding-right: 20px; }
    .app-header-row { align-items: flex-start; }
    .app-header .user-block { text-align: left; }
    .topnav-right { margin-left: 0; }
    .data-table thead { display: none; }
}
