*, *::before, *::after { box-sizing: border-box; }

:root {
    color-scheme: dark;
    --bg: #0e131a;
    --panel: #161b23;
    --panel-2: #1c222b;
    --panel-3: #232a35;
    --line: #2a323d;
    --line-soft: rgba(255, 255, 255, 0.05);
    --text: #eef1f6;
    --text-2: #c2cad5;
    --muted: #828c99;
    --brand: #2f7fc7;
    --brand-2: #3a8ed6;
    --brand-deep: #1f5b94;
    --accent: #2f7fc7;
    --accent-2: #3a8ed6;
    --ok: #4caf78;
    --warn: #d99a3b;
    --crit: #d65a5a;
    --info: #5a93cf;
    --radius: 6px;
    --radius-sm: 4px;
    --radius-lg: 8px;
    --shadow: 0 6px 18px rgba(0, 4, 14, 0.30);
    --container: 1680px;
}

html, body {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.hidden, .is-hidden { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    max-width: var(--container);
    margin: 0 auto;
    height: 56px;
    padding: 0 18px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-logo {
    height: 24px;
    width: auto;
    display: block;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-copy strong {
    display: block;
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--text);
}

.brand-copy small {
    display: block;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1px;
}

.topbar-nav {
    display: flex;
    gap: 2px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.topbar-nav::-webkit-scrollbar { display: none; }

.topbar-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    color: var(--text-2);
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.topbar-nav a:hover { color: var(--text); }

.topbar-nav a.active {
    color: var(--text);
    border-bottom-color: var(--brand);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-2);
}

.user-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-name strong {
    color: var(--text);
    font-size: 0.85rem;
}

.user-name span {
    color: var(--muted);
    font-size: 0.7rem;
}

.nav-toggle {
    display: none;
    position: relative;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
    content: "";
    position: absolute;
    left: 9px;
    width: 16px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
}

.nav-toggle span { top: 17px; }
.nav-toggle::before { top: 12px; }
.nav-toggle::after { top: 22px; }

.nav-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    background: var(--crit);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px 18px 36px;
}

.page-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.console-head {
    min-height: 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.console-title { min-width: 0; }

.console-title h1 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.console-subtitle {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.console-actions,
.head-metrics,
.filters-inline,
.detail-toolbar,
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.head-metrics {
    justify-content: flex-end;
}

.metric-chip,
.hero-meta-chip {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.metric-chip strong,
.hero-meta-chip strong {
    color: var(--text);
    font-weight: 700;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.summary-card,
.stat {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--info);
    border-radius: var(--radius);
    background: var(--panel);
}

.summary-card.ok, .stat.ok { border-left-color: var(--ok); }
.summary-card.warn, .stat.warn { border-left-color: var(--warn); }
.summary-card.crit, .stat.crit { border-left-color: var(--crit); }
.summary-card.info, .stat.info { border-left-color: var(--info); }

.summary-card span,
.stat span {
    display: block;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.summary-card strong,
.stat strong {
    display: block;
    margin-top: 5px;
    color: var(--text);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.summary-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.list-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.search-field {
    min-width: min(340px, 100%);
}

.search-field input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #11161c;
    color: var(--text);
}

.search-field input:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(79, 189, 246, 0.18);
}

.section-kicker,
.eyebrow {
    display: none;
}

.section-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
}

.section-copy {
    display: none;
}

.segmented {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

.segmented button,
.segmented a {
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--text-2);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.segmented button:hover,
.segmented a:hover {
    color: var(--text);
    border-color: var(--brand);
}

.segmented button.active,
.segmented a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    align-items: stretch;
    gap: 10px;
}

.cards-single {
    grid-template-columns: minmax(0, 1fr);
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--ok);
    border-radius: var(--radius);
    background: var(--panel-2);
    color: var(--text);
}

.card.sev-ok { border-left-color: var(--ok); }
.card.sev-warn { border-left-color: var(--warn); }
.card.sev-crit { border-left-color: var(--crit); }
.card.sev-down { border-left-color: var(--muted); opacity: 0.85; }
.card:hover { border-color: var(--brand); }

.card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    margin-bottom: 9px;
}

.card-title .name {
    min-width: 0;
    font-size: 0.98rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-title .type {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card-context {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 7px;
}

.card-context span,
.card-foot span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 7px;
    border-radius: var(--radius-sm);
    background: var(--panel-3);
    color: var(--text-2);
    font-size: 0.72rem;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-pill {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    background: rgba(130, 140, 153, 0.10);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.status-pill::before,
.live-dot {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-pill.ok { color: var(--ok); background: rgba(76, 175, 120, 0.12); }
.status-pill.warn { color: var(--warn); background: rgba(217, 154, 59, 0.12); }
.status-pill.crit { color: var(--crit); background: rgba(214, 90, 90, 0.12); }
.status-pill.down { color: var(--muted); }

.live-dot {
    display: inline-block;
    background: var(--ok);
}

.live-dot.pulsing { animation: pulse 1s ease-in-out infinite; }
.live-dot.error { background: var(--crit); }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(1.35); }
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow: hidden;
    min-height: 0;
}

.m-row {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.13);
    border: 1px solid var(--line-soft);
}

.m-row-head,
.m-row-flat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.m-label {
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.m-value {
    font-size: 0.98rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.m-value.warn { color: var(--warn); }
.m-value.crit { color: var(--crit); }

.bar {
    height: 5px;
    margin-top: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--ok);
}

.bar.warn > span { background: var(--warn); }
.bar.crit > span { background: var(--crit); }

.m-detail {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--line-soft);
}

.card-empty {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.12);
}

.card-empty-msg {
    color: var(--muted);
    font-size: 0.82rem;
}

.table-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: auto;
    background: var(--panel);
}

.table-shell-live {
    max-height: calc(100vh - 262px);
}

.table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.equipment-table {
    min-width: 1120px;
}

.node-guests-table {
    min-width: 520px;
}

.table th,
.table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: middle;
}

.table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--muted);
    background: var(--panel-2);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table td {
    color: var(--text-2);
    font-size: 0.84rem;
}

.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

.equipment-row.sev-ok td:first-child { border-left: 3px solid var(--ok); }
.equipment-row.sev-warn td:first-child { border-left: 3px solid var(--warn); }
.equipment-row.sev-crit td:first-child,
.equipment-row.sev-down td:first-child { border-left: 3px solid var(--crit); }

.cell-title, .table strong {
    color: var(--text);
    font-weight: 800;
}

.cell-title {
    display: block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.metric-value {
    color: var(--text);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.metric-value.warn { color: var(--warn); }
.metric-value.crit { color: var(--crit); }

.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.row-actions form { margin: 0; }

.form {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.form fieldset {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
}

.form legend {
    padding: 0 6px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
}

.form label {
    display: block;
    margin: 0;
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 700;
}

.form label.inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.form input[type=text],
.form input[type=url],
.form input[type=number],
.form input[type=password],
.form input:not([type]),
.form select,
.vxlan-controls select {
    display: block;
    width: 100%;
    height: 36px;
    margin-top: 4px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #11161c;
    color: var(--text);
}

.form input:focus,
.form select:focus,
.vxlan-controls select:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(79, 189, 246, 0.18);
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 10px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

button,
.btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    border: 1px solid var(--brand);
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

button:hover,
.btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

.btn-ghost, .btn-link {
    background: var(--panel-2);
    border-color: var(--line);
    color: var(--text-2);
}
.btn-ghost:hover, .btn-link:hover {
    background: var(--panel-3);
    border-color: var(--line);
    color: var(--text);
}
.btn-danger {
    background: var(--crit);
    border-color: var(--crit);
    color: #fff;
}
.btn-danger:hover { background: #b94848; border-color: #b94848; }
.btn-small {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.74rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border-radius: var(--radius-sm);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-info { background: rgba(90, 147, 207, 0.14); color: var(--info); }
.badge-warning { background: rgba(217, 154, 59, 0.14); color: var(--warn); }
.badge-critical { background: rgba(214, 90, 90, 0.14); color: var(--crit); }
.badge-ok { background: rgba(76, 175, 120, 0.14); color: var(--ok); }

.flash {
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel-2);
    font-weight: 700;
}
.flash-success { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.flash-error { color: var(--crit); border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); }

.empty-state {
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.empty-state p {
    margin: 0 0 12px;
    color: var(--muted);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.chart-card {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.chart-card h3 {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chart-card-wide { grid-column: 1 / -1; }
.chart-wrap { position: relative; height: 210px; width: 100%; }
.chart-wrap-tall { height: 320px; }

.vxlan-controls {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.vxlan-controls label {
    min-width: 220px;
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 700;
}

.vxlan-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.muted { color: var(--muted); }

/* Switch ports panel */
.ports-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.ports-subgrid {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    grid-template-rows: 1fr 1fr;
    gap: 5px;
}
.ports-grid-section {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line-soft);
}
.ports-grid-section:first-child { margin-top: 0; }

.port-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 6px 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--text);
    font-size: 0.72rem;
    line-height: 1.15;
    cursor: default;
    overflow: hidden;
    transition: transform 0.12s ease, border-color 0.12s ease;
}
.port-tile:hover { transform: translateY(-1px); border-color: var(--brand); }

.port-tile .pt-num {
    font-weight: 800;
    font-size: 0.84rem;
    letter-spacing: 0;
}
.port-tile .pt-vlan {
    color: var(--text-2);
    font-weight: 700;
    font-size: 0.66rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.port-tile .pt-mode {
    color: var(--muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.port-tile.is-up {
    border-color: rgba(76, 175, 120, 0.5);
    background: rgba(76, 175, 120, 0.10);
}
.port-tile.is-up.is-trunk {
    border-color: rgba(58, 142, 214, 0.55);
    background: rgba(58, 142, 214, 0.10);
}
.port-tile.is-down {
    color: var(--muted);
    background: var(--panel);
}
.port-tile.is-admin-down {
    color: var(--muted);
    background: repeating-linear-gradient(
        45deg,
        var(--panel) 0,
        var(--panel) 6px,
        var(--panel-2) 6px,
        var(--panel-2) 12px
    );
    border-color: var(--line);
}
.port-tile.is-sfp {
    border-style: dashed;
}

.ports-details {
    margin-top: 4px;
}
.ports-details summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 0;
}
.ports-details[open] summary { color: var(--text); }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--bg);
}

.login-layout {
    width: min(880px, 100%);
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 14px;
}

.login-aside,
.login-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}

.login-aside { padding: 24px; }
.login-logo {
    height: 32px;
    width: auto;
    margin-bottom: 18px;
    display: block;
}
.login-card-logo {
    height: 26px;
    width: auto;
    margin-bottom: 14px;
    display: block;
}
.login-aside h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}
.login-aside p { margin: 0; color: var(--muted); line-height: 1.55; }
.login-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}
.login-point {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
}
.login-point strong {
    display: block;
    font-size: 0.84rem;
    color: var(--text);
}
.login-point span { color: var(--muted); font-size: 0.76rem; }
.login-card { padding: 24px; }
.login-card h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 700;
}
.login-card p { margin: 0 0 14px; color: var(--muted); }
.login-card label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 700;
}
.login-card input {
    width: 100%;
    height: 38px;
    margin-top: 4px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #11161c;
    color: var(--text);
}
.login-card button { width: 100%; }

@media (max-width: 1200px) {
    .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); /* keep 3 cols on mid screens */ }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .topbar-inner {
        height: auto;
        min-height: 58px;
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 10px 12px;
    }
    .nav-toggle { display: block; }
    .topbar-nav {
        display: none;
        grid-column: 1 / -1;
        padding-top: 8px;
        flex-direction: column;
        align-items: stretch;
    }
    body.nav-open .topbar-nav { display: flex; }
    .topbar-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
    }
    .console-head {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .head-metrics,
    .console-actions { justify-content: flex-start; }
    .summary-grid,
    .vxlan-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .login-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .container { padding: 12px 10px 28px; }
    .page-stack { gap: 10px; }
    .summary-grid,
    .vxlan-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards { grid-template-columns: 1fr; }
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }
    .segmented { width: 100%; }
    .segmented button,
    .segmented a { flex: 1 1 auto; }
    .login-aside { display: none; }
}

/* ============================================================
   Unified Dashboard — Hero, Fleet matrix, Sparklines, Feed
   ============================================================ */

.dash-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 14px;
    padding: 18px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(1100px 240px at 0% 0%, rgba(47,127,199,0.10), transparent 60%),
        linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    overflow: hidden;
    position: relative;
}

.dash-hero-left {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.dash-hero-ring {
    position: relative;
    width: 132px;
    height: 132px;
    flex-shrink: 0;
}

.dash-hero-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dash-hero-ring .ring-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 9;
}

.dash-hero-ring .ring-fill {
    fill: none;
    stroke: var(--ok);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 327;
    transition: stroke-dashoffset 0.6s ease, stroke 0.4s ease;
    filter: drop-shadow(0 0 4px rgba(76, 175, 120, 0.28));
}

.dash-hero-ring .ring-fill.warn { stroke: var(--warn); filter: drop-shadow(0 0 4px rgba(217, 154, 59, 0.32)); }
.dash-hero-ring .ring-fill.crit { stroke: var(--crit); filter: drop-shadow(0 0 4px rgba(214, 90, 90, 0.32)); }

.dash-hero-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.dash-hero-ring-center strong {
    display: block;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-hero-ring-center span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dash-hero-copy {
    min-width: 0;
}

.eyebrow-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-2);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow-live em {
    font-style: normal;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.dash-hero-copy h1 {
    margin: 6px 0 4px;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
}

.dash-hero-copy p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.dash-hero-footchips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dash-hero-footchips .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--muted);
}
.dot-ok   { background: var(--ok);   box-shadow: 0 0 6px rgba(76, 175, 120, 0.4); }
.dot-warn { background: var(--warn); box-shadow: 0 0 6px rgba(217, 154, 59, 0.4); }
.dot-crit { background: var(--crit); box-shadow: 0 0 6px rgba(214, 90, 90, 0.4); }
.dot-down { background: var(--muted); }

.dash-hero-right {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    align-content: center;
}

.dash-hero-stat {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-3);
    min-width: 0;
}

.dash-hero-stat span {
    display: block;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.dash-hero-stat strong {
    display: block;
    margin-top: 5px;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-hero-stat p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-hero-stat p a {
    color: var(--accent-2);
    font-weight: 700;
}

/* Toolbar */
.dash-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.dash-toolbar .segmented { flex-wrap: wrap; }

.dash-toolbar .search-field {
    flex: 1 1 260px;
    min-width: 200px;
    max-width: 420px;
}

/* Section dot accents */
.section-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
    background: var(--info);
}
.section-dot-network { background: #3a8ed6; }
.section-dot-servers { background: #4caf78; }
.section-dot-vms     { background: #b07ddc; }
.section-dot-feed    { background: #d99a3b; }

/* Fleet matrix */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 10px;
}

.fleet-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 12px 12px 10px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--ok);
    border-radius: var(--radius);
    background: var(--panel-2);
    color: var(--text);
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.fleet-tile:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.fleet-tile.sev-ok   { border-left-color: var(--ok); }
.fleet-tile.sev-warn { border-left-color: var(--warn); }
.fleet-tile.sev-crit { border-left-color: var(--crit); }
.fleet-tile.sev-down { border-left-color: var(--muted); opacity: 0.85; }

.fleet-tile-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    margin-bottom: 8px;
}

.fleet-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 6px;
    background: rgba(47, 127, 199, 0.12);
    color: var(--accent-2);
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
}

.fleet-tile-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fleet-tile-title {
    min-width: 0;
    flex: 1 1 auto;
}

.fleet-tile-title .name {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-tile-title .sub {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-spark {
    width: 100%;
    height: 30px;
    margin: 4px 0 8px;
    display: block;
}

.fleet-spark .spark-area { fill: rgba(47, 127, 199, 0.16); }
.fleet-spark .spark-line { fill: none; stroke: var(--accent-2); stroke-width: 1.6; stroke-linejoin: round; }
.fleet-spark.warn .spark-area { fill: rgba(217, 154, 59, 0.18); }
.fleet-spark.warn .spark-line { stroke: var(--warn); }
.fleet-spark.crit .spark-area { fill: rgba(214, 90, 90, 0.20); }
.fleet-spark.crit .spark-line { stroke: var(--crit); }

.fleet-spark-empty {
    height: 30px;
    margin: 4px 0 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.025);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.7rem;
}

.fleet-metrics {
    display: grid;
    gap: 6px;
}

.fleet-metric {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
}

.fleet-metric-label {
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fleet-metric-bar {
    position: relative;
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.fleet-metric-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--ok);
    transition: width 0.3s ease, background 0.2s ease;
}

.fleet-metric-bar.warn > span { background: var(--warn); }
.fleet-metric-bar.crit > span { background: var(--crit); }

.fleet-metric-val {
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.fleet-metric-val.warn { color: var(--warn); }
.fleet-metric-val.crit { color: var(--crit); }

.fleet-tile-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.fleet-tile-foot strong { color: var(--text-2); font-weight: 800; }

.fleet-tile-empty {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.18);
    color: var(--muted);
    font-size: 0.78rem;
}

/* Status pill compact for tiles */
.fleet-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 99px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(130, 140, 153, 0.12);
    color: var(--muted);
    white-space: nowrap;
}
.fleet-status::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}
.fleet-status.ok   { color: var(--ok);   background: rgba(76, 175, 120, 0.14); }
.fleet-status.warn { color: var(--warn); background: rgba(217, 154, 59, 0.14); }
.fleet-status.crit { color: var(--crit); background: rgba(214, 90, 90, 0.14); }
.fleet-status.down { color: var(--muted); background: rgba(130, 140, 153, 0.16); }

/* ============================================================
   VXLAN card — redesign : deux colonnes (commit | latence)
   ============================================================ */

/* Upper body: 2 col layout */
.vx-body {
    display: grid;
    grid-template-columns: 1fr 1px 90px;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
}

.vx-divider {
    background: var(--line);
    width: 1px;
    margin: 10px 0;
}

/* Shared column style */
.vx-col-commit,
.vx-col-lat {
    padding: 11px 12px;
}

/* Commit column */
.vx-col-commit {
    background: linear-gradient(160deg, rgba(47,127,199,0.09) 0%, transparent 70%);
}
.vx-col-commit.warn { background: linear-gradient(160deg, rgba(217,154,59,0.10) 0%, transparent 70%); }
.vx-col-commit.crit { background: linear-gradient(160deg, rgba(214,90,90,0.12) 0%, transparent 70%); }

/* Latency column */
.vx-col-lat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0,0,0,0.14);
    gap: 3px;
}

/* KPI label (shared) */
.vx-kpi-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

/* Pulsing live dot */
.vx-live-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--ok);
    animation: pulse 1.6s ease-in-out infinite;
    flex-shrink: 0;
}

/* KPI values */
.vx-kpi-value {
    font-size: 1.48rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.vx-col-commit.warn .vx-kpi-value { color: var(--warn); }
.vx-col-commit.crit .vx-kpi-value { color: var(--crit); }

/* Gauge */
.vx-gauge-wrap { margin: 7px 0 4px; }
.vx-gauge-track {
    height: 5px;
    border-radius: 99px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}
.vx-gauge-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-2), var(--brand));
    transition: width 0.5s ease;
}
.vx-gauge-bar.warn { background: linear-gradient(90deg, #c8831f, var(--warn)); }
.vx-gauge-bar.crit { background: linear-gradient(90deg, #b83030, var(--crit)); }

.vx-gauge-foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
}
.vx-gauge-foot strong { color: var(--text-2); font-variant-numeric: tabular-nums; }
.vx-pct { font-weight: 800; color: var(--text-2); }
.vx-pct.warn { color: var(--warn); }
.vx-pct.crit { color: var(--crit); }

/* Latency column values */
.vx-lat-num {
    line-height: 1;
    margin-top: 1px;
}
.vx-lat-num strong {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.vx-lat-num em {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
}
.vx-col-lat.warn .vx-lat-num strong { color: var(--warn); }
.vx-col-lat.crit .vx-lat-num strong { color: var(--crit); }
.vx-col-lat.warn { background: rgba(217,154,59,0.08); }
.vx-col-lat.crit { background: rgba(214,90,90,0.10); }

/* Mini sparkline inside latency col */
.vx-lat-spark {
    width: 72px !important;
    height: 22px !important;
    margin: 2px 0 0 !important;
}

.vx-lat-nospark {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    margin-top: 3px;
}

/* Threshold chips */
.vx-lat-thr {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}
.vx-lat-thr span {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.thr-warn { color: var(--warn); }
.thr-crit { color: var(--crit); }

/* IN / OUT row */
.vx-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 0;
}
.vx-flow-cell {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.18);
    border: 1px solid var(--line-soft);
}
.vx-flow-label {
    display: block;
    color: var(--muted);
    font-size: 0.60rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.vx-flow-cell strong {
    display: block;
    margin-top: 3px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.vx-flow-in  strong { color: #6cc7ff; }
.vx-flow-out strong { color: #5ad9a6; }

/* ============================================================
   Switch ports headline
   ============================================================ */
.sw-ports {
    margin-bottom: 8px;
    padding: 12px 12px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(58, 142, 214, 0.10), rgba(58, 142, 214, 0.02));
}
.sw-ports.warn {
    border-color: rgba(217, 154, 59, 0.35);
    background: linear-gradient(180deg, rgba(217, 154, 59, 0.10), rgba(217, 154, 59, 0.02));
}
.sw-ports.crit, .sw-ports.down {
    border-color: rgba(214, 90, 90, 0.45);
    background: linear-gradient(180deg, rgba(214, 90, 90, 0.12), rgba(214, 90, 90, 0.03));
}

.sw-ports-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sw-ports-label {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.sw-ports-value {
    margin-top: 2px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
}
.sw-ports-value strong {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.sw-ports-value em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.sw-ports.crit .sw-ports-value strong { color: var(--crit); }
.sw-ports.warn .sw-ports-value strong { color: var(--warn); }

.sw-port-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}
.sw-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-soft);
    color: var(--text-2);
}
.sw-chip b {
    color: var(--text);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.sw-chip-trunk  { color: #6cc7ff; border-color: rgba(108, 199, 255, 0.25); }
.sw-chip-access { color: #5ad9a6; border-color: rgba(90, 217, 166, 0.25); }
.sw-chip-down   { color: var(--crit); border-color: rgba(214, 90, 90, 0.30); }

.sw-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 6px;
    margin-top: 8px;
}
.sw-stat {
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--line-soft);
    text-align: center;
}
.sw-stat span {
    display: block;
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.sw-stat strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.sw-stat.warn strong { color: var(--warn); }
.sw-stat.crit strong { color: var(--crit); }

/* Incidents banner */
.incidents-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(214, 90, 90, 0.45);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(214, 90, 90, 0.10), rgba(214, 90, 90, 0.04));
}

.incidents-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--crit);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.78rem;
}

.incidents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.incidents-list a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    background: rgba(214, 90, 90, 0.12);
    border: 1px solid rgba(214, 90, 90, 0.25);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
}
.incidents-list a:hover { border-color: var(--crit); }
.incidents-list a small {
    color: var(--muted);
    font-weight: 600;
}

/* Feed list */
.feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.feed-item {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.12);
}

.feed-item .dot-sev {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--info);
}
.feed-item.sev-warning .dot-sev   { background: var(--warn); }
.feed-item.sev-critical .dot-sev  { background: var(--crit); }
.feed-item.sev-info .dot-sev      { background: var(--info); }

.feed-item-text { min-width: 0; }
.feed-item-text strong {
    display: block;
    font-size: 0.86rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.feed-item-text small {
    display: block;
    color: var(--muted);
    font-size: 0.74rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-item-time {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.feed-empty {
    padding: 14px;
    text-align: center;
    color: var(--muted);
}

/* Hidden when no equipment */
.dash-section.dash-hidden { display: none; }

@media (max-width: 1080px) {
    .dash-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dash-hero-left { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .dash-hero-copy { text-align: center; }
    .dash-hero-footchips { justify-content: center; }
    .dash-hero-ring { width: 110px; height: 110px; }
    .fleet-grid { grid-template-columns: 1fr; }
}

/* ─── IP Traffic page ─────────────────────────────────────────── */

.ipt-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 20px 24px;
}

.ipt-spark-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ipt-spark-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.ipt-spark-canvas {
    height: 56px !important;
    width: 100% !important;
}

.ipt-search {
    background: var(--panel-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.82rem;
    padding: 4px 10px;
    outline: none;
    width: 180px;
    transition: border-color 0.15s;
}
.ipt-search:focus { border-color: var(--brand); }

.section-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Toggle group (Toutes / Utilisées / Libres) */
.ipt-toggle-group {
    display: flex;
    background: var(--panel-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.ipt-toggle {
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 11px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ipt-toggle:hover { background: var(--line-soft); color: var(--text); }
.ipt-toggle.active { background: var(--brand); color: #fff; }

.ipt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}
.ipt-toggle.active .ipt-badge { background: rgba(255,255,255,0.25); }
.ipt-badge-free { background: rgba(76, 175, 120, 0.2); color: var(--ok); }
.ipt-toggle.active .ipt-badge-free { background: rgba(255,255,255,0.25); color: #fff; }

/* Free/unused IP rows */
.ipt-row-free { opacity: 0.45; }
.ipt-row-free:hover { opacity: 0.75; }
.ipt-cell-free { color: var(--muted) !important; font-weight: 400 !important; }
.ipt-free-label {
    font-size: 0.72rem;
    font-style: italic;
    letter-spacing: 0.04em;
}

.ipt-table th.sortable { cursor: pointer; user-select: none; }
.ipt-table th.sortable:hover { color: var(--text); }

.sort-arrow {
    display: inline-block;
    opacity: 0.35;
    font-size: 0.7em;
    margin-left: 3px;
    transition: opacity 0.15s;
}
.sort-arrow.active { opacity: 1; color: var(--brand); }

.ipt-th-ip       { width: 200px; }
.ipt-th-assigned { width: 72px; text-align: center; color: var(--muted); font-weight: 500; }
.ipt-th-bps      { width: 110px; text-align: right; }
.ipt-th-total    { width: 120px; text-align: right; }
.ipt-th-bar      { min-width: 120px; }
.ipt-th-ts       { width: 100px; color: var(--muted); }

.ipt-cell-bps      { text-align: right; font-variant-numeric: tabular-nums; }
.ipt-cell-ip       { font-family: monospace; font-size: 0.87rem; font-weight: 600; }
.ipt-cell-assigned { text-align: center; }

/* Status dot (UP / IDLE / DOWN) */
.ipt-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    flex-shrink: 0;
    margin-right: 2px;
}
.ipt-dot-up   { background: var(--ok);   box-shadow: 0 0 5px var(--ok); }
.ipt-dot-idle { background: var(--warn); opacity: 0.75; }
.ipt-dot-down { background: var(--muted); opacity: 0.5; }

/* MAC / hostname sub-line inside IP cell */
.ipt-ip-sub  { display: block; font-size: 0.70rem; font-weight: 400; color: var(--muted); line-height: 1.4; font-family: inherit; }
.ipt-ip-name { font-style: normal; color: var(--text-2, var(--muted)); }
.ipt-ip-mac  { font-family: monospace; letter-spacing: 0.02em; font-size: 0.68rem; }

/* Assigned checkbox */
.ipt-chk-assigned {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--brand);
}

.ipt-bar-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ipt-bar-track {
    flex: 1;
    height: 6px;
    background: var(--panel-3);
    border-radius: 3px;
    overflow: hidden;
}

.ipt-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
    background: linear-gradient(90deg, var(--brand-deep), var(--brand-2));
}

.ipt-bar-fill.high  { background: linear-gradient(90deg, #a04040, var(--crit)); }
.ipt-bar-fill.med   { background: linear-gradient(90deg, #8f6a00, var(--warn)); }

.ipt-pct {
    font-size: 0.72rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: right;
}

.ipt-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}

.ipt-empty-icon { font-size: 2rem; margin-bottom: 8px; }
.ipt-empty-msg  { font-size: 0.9rem; }

@media (max-width: 768px) {
    .ipt-hero { grid-template-columns: 1fr; }
    .ipt-th-ts, .ipt-th-bar { display: none; }
}



/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GRAFANA-STYLE OVERHAUL â€” sidebar layout, refined tokens
   Appended; overrides earlier definitions when needed.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

:root {
    --bg:           #0b0e14;
    --panel:        #131820;
    --panel-2:      #1a212c;
    --panel-3:      #232b38;
    --line:         #262e3a;
    --line-soft:    rgba(255, 255, 255, 0.05);
    --line-strong:  #303949;
    --text:         #eef1f6;
    --text-2:       #c2cad5;
    --muted:        #828c99;
    --brand:        #3b8ed2;
    --brand-2:      #4ca0e4;
    --brand-deep:   #1f5b94;
    --brand-glow:   rgba(59, 142, 210, 0.18);
    --accent:       #3b8ed2;
    --ok:           #4caf78;
    --warn:         #e0a93e;
    --crit:         #e25c5c;
    --info:         #5a93cf;
    --radius:       8px;
    --radius-sm:    5px;
    --radius-lg:    12px;
    --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow:       0 4px 14px rgba(0, 4, 14, 0.35);
    --shadow-lg:    0 12px 32px rgba(0, 4, 14, 0.45);
    --sb-w:         232px;
    --sb-w-mini:    64px;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

code, pre, kbd, samp, .mono, .ip, .mac { font-family: "JetBrains Mono", "Fira Code", Consolas, monospace; }

/* â”€â”€â”€ Shell (sidebar + main) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

body.has-shell { display: flex; align-items: stretch; min-height: 100vh; }
body.has-shell > .topbar { display: none; }

.sidebar {
    width: var(--sb-w);
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 50;
    transition: width 0.18s ease;
}

.sidebar-head {
    height: 60px;
    padding: 0 12px 0 16px;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 1;
    min-width: 0;
    color: var(--text);
}

.sidebar-logo {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 5px;
}

.sidebar-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    min-width: 0;
    overflow: hidden;
}
.sidebar-brand-copy strong { font-weight: 700; font-size: 0.95rem; color: var(--text); white-space: nowrap; }
.sidebar-brand-copy small {
    font-size: 0.6rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-top: 2px;
    white-space: nowrap;
}

.sidebar-collapse {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.sidebar-collapse:hover { color: var(--text); background: var(--panel-2); }
.sidebar-collapse svg { width: 13px; height: 13px; transition: transform 0.18s ease; }
body.sidebar-collapsed .sidebar-collapse svg { transform: rotate(180deg); }

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.snav-section { display: flex; flex-direction: column; gap: 2px; }

.snav-section-title {
    padding: 0 12px 6px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.snav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 0.86rem;
    font-weight: 600;
    transition: background 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}
.snav-item:hover { background: var(--panel-2); color: var(--text); }
.snav-item.is-active {
    background: linear-gradient(90deg, var(--brand-glow), rgba(59, 142, 210, 0.05));
    color: #fff;
}
.snav-item.is-active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand);
}

.snav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: color 0.12s ease;
}
.snav-icon svg { width: 19px; height: 19px; }
.snav-item:hover .snav-icon,
.snav-item.is-active .snav-icon { color: var(--brand-2); }

.snav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.snav-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    background: var(--crit);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
}

/* Foot */
.sidebar-foot {
    padding: 10px 10px 14px;
    border-top: 1px solid var(--line-soft);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: var(--radius);
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-deep), var(--brand-2));
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    overflow: hidden;
}
.sidebar-user-info strong {
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-user-info span {
    color: var(--muted);
    font-size: 0.66rem;
}

.sidebar-logout {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.sidebar-logout:hover { color: var(--crit); background: var(--panel-2); }
.sidebar-logout svg { width: 16px; height: 16px; }

/* Main area */
body.has-shell .app-main {
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
}

body.has-shell .container {
    max-width: none;
    padding: 22px 28px 40px;
}

/* Collapsed sidebar (icon-only) */
body.sidebar-collapsed .sidebar { width: var(--sb-w-mini); }
body.sidebar-collapsed .sidebar-brand-copy,
body.sidebar-collapsed .snav-section-title,
body.sidebar-collapsed .snav-label,
body.sidebar-collapsed .snav-badge,
body.sidebar-collapsed .sidebar-user-info { display: none; }
body.sidebar-collapsed .sidebar-head { padding: 0; justify-content: center; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; gap: 0; }
body.sidebar-collapsed .sidebar-collapse { display: none; }
body.sidebar-collapsed .snav-item { justify-content: center; padding: 9px; }
body.sidebar-collapsed .snav-item.is-active::before { left: -10px; }
body.sidebar-collapsed .sidebar-user { justify-content: center; padding: 6px 0; }
body.sidebar-collapsed .sidebar-logout { display: none; }
body.sidebar-collapsed .sidebar-nav { padding: 14px 8px; }

/* Mobile drawer */
.mobile-burger {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mobile-burger svg { width: 18px; height: 18px; }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 49;
}

@media (max-width: 900px) {
    body.has-shell .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        transition: transform 0.2s ease;
    }
    body.has-shell.sidebar-open .sidebar { transform: translateX(0); }
    body.has-shell.sidebar-open .sidebar-backdrop { display: block; }
    body.has-shell .mobile-burger { display: inline-flex; }
    body.has-shell .container { padding: 60px 16px 40px; }
}

/* â”€â”€â”€ Polished components â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

body.has-shell .console-head {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel) 0%, rgba(19, 24, 32, 0.6) 100%);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    min-height: 72px;
    box-shadow: var(--shadow-sm);
}

body.has-shell .console-title h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
body.has-shell .console-subtitle {
    margin-top: 4px;
    color: var(--text-2);
    font-size: 0.86rem;
}

body.has-shell .metric-chip,
body.has-shell .hero-meta-chip {
    background: var(--panel-2);
    border: 1px solid var(--line);
    min-height: 32px;
    padding: 0 12px;
    border-radius: 99px;
    font-size: 0.78rem;
    box-shadow: var(--shadow-sm);
}

body.has-shell .summary-card,
body.has-shell .stat {
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(59, 142, 210, 0.04) 0%, transparent 60%),
        var(--panel);
    border: 1px solid var(--line);
    border-left-width: 3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
body.has-shell .summary-card:hover,
body.has-shell .stat:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}
body.has-shell .summary-card strong,
body.has-shell .stat strong {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
body.has-shell .summary-card span,
body.has-shell .stat span {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    color: var(--muted);
}

body.has-shell .section-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    padding: 16px 18px;
}

body.has-shell .section-head h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.005em;
}

/* Better focus ring */
body.has-shell a:focus-visible,
body.has-shell button:focus-visible,
body.has-shell input:focus-visible,
body.has-shell select:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Slimmer scrollbars */
body.has-shell ::-webkit-scrollbar { width: 8px; height: 8px; }
body.has-shell ::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
body.has-shell ::-webkit-scrollbar-thumb:hover { background: var(--muted); }
body.has-shell ::-webkit-scrollbar-track { background: transparent; }

/* Tooltip for collapsed sidebar */
body.sidebar-collapsed .snav-item::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--panel-3);
    color: var(--text);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--line);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 70;
    box-shadow: var(--shadow);
}
body.sidebar-collapsed .snav-item:hover::after { opacity: 1; }

/* Print: hide chrome */
@media print {
    body.has-shell { display: block; }
    body.has-shell .sidebar,
    body.has-shell .mobile-burger,
    body.has-shell .sidebar-backdrop { display: none; }
    body.has-shell .container { max-width: none; padding: 0; }
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Documentation drawer (right-side slide-in)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.doc-drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 460px;
    max-width: 92vw;
    background: var(--panel);
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateX(105%);
    transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 90;
    display: flex;
    flex-direction: column;
}
.doc-drawer.is-open { transform: translateX(0); }

.doc-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 85;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.doc-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }

.doc-drawer-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--line);
}
.doc-drawer-titles { flex: 1; min-width: 0; }
.doc-drawer-eyebrow {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--brand-2);
    margin-bottom: 4px;
}
.doc-drawer-titles h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.doc-drawer-sub {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.doc-drawer-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.doc-drawer-close:hover { color: var(--text); background: var(--panel-2); }

.doc-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.doc-field { display: flex; flex-direction: column; gap: 4px; }
.doc-field label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}
.doc-field input[type="text"],
.doc-field input[type="number"],
.doc-field select,
.doc-field textarea {
    width: 100%;
    padding: 9px 11px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 0.86rem;
    transition: border-color 0.12s, background 0.12s;
}
.doc-field input:focus,
.doc-field select:focus,
.doc-field textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--panel-3);
}
.doc-field textarea {
    min-height: 100px;
    resize: vertical;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.5;
}
.doc-field-hint { font-size: 0.7rem; color: var(--muted); margin-top: 1px; }

.doc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.doc-drawer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: var(--panel-2);
}

.doc-drawer-status {
    font-size: 0.76rem;
    color: var(--muted);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.doc-drawer-status.is-ok    { color: var(--ok); }
.doc-drawer-status.is-error { color: var(--crit); }

.doc-drawer-actions { display: flex; gap: 8px; }

/* Generic buttons (in case missing) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    font-size: 0.84rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    text-decoration: none;
}
.btn:hover { background: var(--panel-3); }
.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel-2); }
.btn-danger { color: var(--crit); }
.btn-danger:hover { background: rgba(226, 92, 92, 0.1); border-color: var(--crit); }

/* Edit pencil icon (used to indicate clickable rows) */
.doc-edit-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease;
    margin-left: 6px;
    font-size: 0.78rem;
}
tr:hover .doc-edit-hint { opacity: 0.8; }
tr:hover .doc-edit-hint:hover { opacity: 1; color: var(--brand-2); background: var(--panel-3); }

/* Clickable rows */
.doc-clickable { cursor: pointer; }
.doc-clickable:hover { background: rgba(59, 142, 210, 0.05); }
.doc-clickable.has-doc { box-shadow: inset 3px 0 0 var(--brand); }

/* Customer/tag chips inline in tables */
.doc-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--panel-3);
    border: 1px solid var(--line);
    color: var(--text-2);
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 4px;
    line-height: 1.5;
}
.doc-chip-customer { background: rgba(59, 142, 210, 0.14); border-color: rgba(59, 142, 210, 0.25); color: var(--brand-2); }
.doc-chip-tag { background: var(--panel-3); }

@media (max-width: 600px) {
    .doc-drawer { width: 100vw; }
    .doc-row { grid-template-columns: 1fr; }
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Sidebar v2 â€” stacked brand, refined collapse/expand UX
   Override the v1 sidebar layout for a more polished feel.
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.sidebar-head {
    height: auto;
    padding: 18px 14px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    position: relative;
}

.sidebar-brand {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 6px;
    border-radius: var(--radius);
    transition: background 0.12s;
}
.sidebar-brand:hover { background: var(--panel-2); }

.sidebar-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35), inset 0 0 0 1px var(--line-soft);
    background: var(--panel-2);
    padding: 6px;
    transition: transform 0.18s, box-shadow 0.18s;
}
.sidebar-brand:hover .sidebar-logo {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(59,142,210,0.25), inset 0 0 0 1px var(--brand);
}

.sidebar-brand-copy {
    align-items: center;
    text-align: center;
    line-height: 1.15;
    gap: 1px;
}
.sidebar-brand-copy strong {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    background: linear-gradient(135deg, var(--brand-2) 0%, #6fb6e8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.sidebar-brand-copy small {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--muted);
    font-weight: 700;
    margin-top: 2px;
}

/* Collapse button moves to a thin row below the brand */
.sidebar-collapse {
    width: auto;
    height: 28px;
    border-radius: var(--radius-sm);
    padding: 0 10px;
    gap: 6px;
    align-self: stretch;
    justify-content: center;
}
.sidebar-collapse::after {
    content: "Replier";
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.12s;
}
.sidebar-collapse:hover::after { color: var(--text); }
.sidebar-collapse svg { width: 12px; height: 12px; }

/* Expand button â€” visible ONLY when sidebar is collapsed */
.sidebar-expand {
    display: none;
    position: absolute;
    top: 80px;
    right: -14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--muted);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    z-index: 51;
    transition: background 0.12s, color 0.12s, transform 0.12s;
}
.sidebar-expand:hover {
    background: var(--brand);
    color: #fff;
    transform: scale(1.08);
}
.sidebar-expand svg {
    width: 12px;
    height: 12px;
    transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar-expand { display: inline-flex; }

/* Collapsed state refinements */
body.sidebar-collapsed .sidebar-head {
    padding: 14px 8px;
    align-items: center;
}
body.sidebar-collapsed .sidebar-brand {
    padding: 6px;
    gap: 0;
}
body.sidebar-collapsed .sidebar-logo {
    width: 38px;
    height: 38px;
    padding: 4px;
}
body.sidebar-collapsed .sidebar-collapse { display: none; }

/* Pulse hint on expand button on first load (cute touch) */
@keyframes sb-expand-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59,142,210,0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(59,142,210,0); }
}
body.sidebar-collapsed .sidebar-expand { animation: sb-expand-pulse 2.4s ease-in-out 3; }

/* Avatar in foot â€” slight upgrade */
.sidebar-avatar {
    background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-2) 60%, #6fb6e8 100%);
    box-shadow: 0 2px 6px rgba(59,142,210,0.35);
}
.sidebar-user-info span {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--brand-2);
}

/* Active nav item: refined glow */
.snav-item.is-active {
    background: linear-gradient(90deg, var(--brand-glow), rgba(59,142,210,0.02));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(59,142,210,0.20);
}

/* Field controls in form pages */
.section-card .form input[type="text"],
.section-card .form input[type="url"],
.section-card .form input[type="number"],
.section-card .form input[type="email"],
.section-card .form input[type="password"],
.section-card .form select,
.section-card .form textarea {
    background: var(--panel-2);
}

/* Badge utility */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--panel-3);
    color: var(--text-2);
    border: 1px solid var(--line);
}
.badge-ok       { background: rgba(76,175,120,0.18);  color: var(--ok);   border-color: rgba(76,175,120,0.30); }
.badge-warning  { background: rgba(224,169,62,0.18);  color: var(--warn); border-color: rgba(224,169,62,0.30); }
.badge-critical { background: rgba(226,92,92,0.18);   color: var(--crit); border-color: rgba(226,92,92,0.30); }
.badge-info     { background: rgba(59,142,210,0.18);  color: var(--brand-2); border-color: rgba(59,142,210,0.30); }


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Global form controls + modal pattern
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

body.has-shell .form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.has-shell .form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

body.has-shell .form input[type="text"],
body.has-shell .form input[type="url"],
body.has-shell .form input[type="number"],
body.has-shell .form input[type="email"],
body.has-shell .form input[type="password"],
body.has-shell .form input[type="search"],
body.has-shell .form input[type="tel"],
body.has-shell .form select,
body.has-shell .form textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

body.has-shell .form input:focus,
body.has-shell .form select:focus,
body.has-shell .form textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--panel-3);
    box-shadow: 0 0 0 3px rgba(59, 142, 210, 0.18);
}

body.has-shell .form input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

body.has-shell .form textarea {
    min-height: 100px;
    resize: vertical;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    line-height: 1.5;
}

.field-hint {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 1px;
}

.req { color: var(--crit); margin-left: 2px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-2      { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) {
    .form-grid-2, .form-grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.checkbox-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 600 !important;
    font-size: 0.86rem !important;
    color: var(--text) !important;
    cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    flex-shrink: 0;
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-small { padding: 5px 10px; font-size: 0.78rem; }

/* â”€â”€â”€ Modal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 95;
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 96;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px 20px;
    overflow-y: auto;
    pointer-events: none;
}
.modal.is-open { display: flex; pointer-events: auto; }

.modal-inner {
    width: 100%;
    max-width: 640px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
    animation: modal-pop 0.18s ease-out;
}

@keyframes modal-pop {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)     scale(1); }
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}
.modal-head h2 {
    flex: 1;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.modal-close:hover { color: var(--text); background: var(--panel-2); }

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: var(--panel-2);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

@media (max-width: 640px) {
    .modal { padding: 16px; align-items: flex-end; }
    .modal-inner { max-height: 92vh; }
}

/* Fix any input inside table cells (e.g. ipt-search) keeps muted look */
.ipt-search {
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.86rem;
    min-width: 200px;
}
.ipt-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59,142,210,0.18); }


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   User modal â€” polished hero, role pills, toggle, password meter
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.user-modal-inner { max-width: 680px; padding: 0; }
.user-modal-inner .um-body { padding: 24px 28px 8px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; flex: 1; min-height: 0; }

/* â”€â”€â”€ Hero header â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.um-hero {
    position: relative;
    padding: 22px 26px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.um-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 30%, rgba(59,142,210,0.20) 0%, transparent 60%),
        radial-gradient(circle at 85% 70%, rgba(76,175,120,0.12) 0%, transparent 50%),
        linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
    z-index: 0;
}
.um-hero > * { position: relative; z-index: 1; }

.um-hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-2) 60%, #6fb6e8 100%);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(59,142,210,0.40), inset 0 0 0 3px rgba(255,255,255,0.10);
    transition: background 0.25s ease, transform 0.18s;
}
.um-hero-avatar[data-role="admin"]    { background: linear-gradient(135deg, #c14a4a 0%, #e25c5c 60%, #f88) 100%; box-shadow: 0 4px 14px rgba(226,92,92,0.40), inset 0 0 0 3px rgba(255,255,255,0.10); }
.um-hero-avatar[data-role="operator"] { background: linear-gradient(135deg, #b88030 0%, #e0a93e 60%, #f6c768 100%); box-shadow: 0 4px 14px rgba(224,169,62,0.40), inset 0 0 0 3px rgba(255,255,255,0.10); }
.um-hero-avatar[data-role="viewer"]   { background: linear-gradient(135deg, #2e5b89 0%, #3b8ed2 60%, #6fb6e8 100%); }

.um-hero-meta { flex: 1; min-width: 0; }
.um-hero-eyebrow {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brand-2);
    margin-bottom: 4px;
}
.um-hero-meta h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.um-hero-role {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: lowercase;
}

.um-close {
    align-self: flex-start;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

/* â”€â”€â”€ Sections â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.um-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.um-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 4px;
}
.um-section-icon { font-size: 0.95rem; }
.um-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--brand-2);
}
.um-section-sub {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* â”€â”€â”€ Fields & icon-wrapped inputs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.um-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.um-field  { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.um-field > label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.um-field .field-hint { font-size: 0.7rem; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; line-height: 1.5; }
.um-field .field-hint code { background: var(--panel-3); padding: 1px 5px; border-radius: 3px; font-family: "JetBrains Mono", monospace; font-size: 0.7rem; }

.um-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.um-input-wrap:focus-within {
    border-color: var(--brand);
    background: var(--panel-3);
    box-shadow: 0 0 0 3px rgba(59,142,210,0.18);
}
.um-input-icon {
    width: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.92rem;
    border-right: 1px solid var(--line-soft);
}
.um-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
    font-size: 0.9rem;
    outline: none;
    min-width: 0;
}
.um-input-wrap input:disabled { color: var(--muted); cursor: not-allowed; }
.um-input-wrap input::placeholder { color: var(--muted); opacity: 0.7; }

/* â”€â”€â”€ Password row with toggle + generate â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.um-pwd-wrap .um-pwd-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.12s, background 0.12s;
}
.um-pwd-wrap .um-pwd-btn:hover { color: var(--text); background: var(--panel-3); }
.um-pwd-wrap .um-pwd-btn:last-child { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }

.um-pwd-meter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.um-pwd-bar {
    flex: 1;
    height: 4px;
    background: var(--panel-3);
    border-radius: 99px;
    overflow: hidden;
}
.um-pwd-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: var(--crit);
    transition: width 0.18s ease, background 0.18s ease;
}
.um-pwd-hint {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    min-width: 90px;
    text-align: right;
}

@keyframes um-flash {
    0%, 100% { background: transparent; }
    50%      { background: rgba(76, 175, 120, 0.15); }
}

/* â”€â”€â”€ Role pills â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.um-role-pills {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}
.um-role-pills input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.um-role-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: 0.84rem;
    color: var(--text);
    position: relative;
    overflow: hidden;
}
.um-role-pill::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, var(--brand-glow) 100%);
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.um-role-pill:hover { border-color: var(--line-strong); background: var(--panel-3); }
.um-role-icon { font-size: 1.1rem; }
.um-role-label { font-weight: 700; font-size: 0.92rem; color: var(--text); }
.um-role-desc  { font-size: 0.7rem; color: var(--muted); }

.um-role-pills input[type="radio"]:checked + .um-role-pill {
    border-color: var(--brand);
    background: linear-gradient(135deg, rgba(59,142,210,0.10) 0%, rgba(59,142,210,0.04) 100%);
    box-shadow: 0 0 0 3px rgba(59,142,210,0.18);
}
.um-role-pills input[type="radio"]:checked + .um-role-pill[data-role="admin"] {
    border-color: var(--crit);
    background: linear-gradient(135deg, rgba(226,92,92,0.10) 0%, rgba(226,92,92,0.04) 100%);
    box-shadow: 0 0 0 3px rgba(226,92,92,0.18);
}
.um-role-pills input[type="radio"]:checked + .um-role-pill[data-role="operator"] {
    border-color: var(--warn);
    background: linear-gradient(135deg, rgba(224,169,62,0.10) 0%, rgba(224,169,62,0.04) 100%);
    box-shadow: 0 0 0 3px rgba(224,169,62,0.18);
}

.um-role-pills input[type="radio"]:focus-visible + .um-role-pill { outline: 2px solid var(--brand-2); outline-offset: 2px; }

/* â”€â”€â”€ Toggle switch â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.um-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 14px;
    cursor: pointer;
    padding: 12px 14px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: background 0.12s, border-color 0.12s;
}
.um-toggle:hover { background: var(--panel-3); }
.um-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.um-toggle-track {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--panel-3);
    border: 1px solid var(--line-strong);
    border-radius: 99px;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s;
}
.um-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--muted);
    transition: left 0.18s ease, background 0.18s ease, box-shadow 0.18s;
}
.um-toggle input:checked ~ .um-toggle-track {
    background: var(--ok);
    border-color: var(--ok);
}
.um-toggle input:checked ~ .um-toggle-track .um-toggle-thumb {
    left: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.um-toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.um-toggle-text strong { font-weight: 600; font-size: 0.86rem; color: var(--text); }
.um-toggle-text small  { font-size: 0.72rem; color: var(--muted); }

/* â”€â”€â”€ Footer â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.um-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: var(--panel-2);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    position: sticky;
    bottom: 0;
}

@media (max-width: 640px) {
    .um-hero { padding: 18px 20px 16px; gap: 14px; }
    .um-hero-avatar { width: 52px; height: 52px; font-size: 1.5rem; }
    .um-hero-meta h2 { font-size: 1.1rem; }
    .user-modal-inner .um-body { padding: 18px 18px 6px; gap: 18px; }
    .um-fields { grid-template-columns: 1fr; }
    .um-role-pills { grid-template-columns: 1fr; }
    .um-foot { padding: 12px 18px; }
}
