/* ============================================================
   OmniOps — Dark Mode Stylesheet
   Palette from design spec:
   SOC   → Crimson   #D32F2F  + Amber      #FF9800
   NOC   → Indigo    #3F51B5  + Emerald    #4CAF50
   SIEM  → Purple    #673AB7  + Graphite   #424242
   Topology → Teal  #009688  + Goldenrod  #FBC02D
   KPI   → Gray     #9E9E9E  + Sky Blue   #2196F3
   ============================================================ */

/* ---- Variables ---- */
:root {
  --bg-body: #121212;
  --bg-surface: #1e1e1e;
  --bg-card: #252525;
  --bg-input: #1a1a1a;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  --text-primary: #e0e0e0;
  --text-secondary: #9e9e9e;
  --text-muted: #616161;

  /* Module palette */
  --soc-primary: #d32f2f;
  --soc-secondary: #ff9800;
  --soc: #d32f2f;
  --soc-soft: rgba(211, 47, 47, 0.15);
  --soc-glow: rgba(211, 47, 47, 0.25);
  --amber: #ff9800;
  --amber-soft: rgba(255, 152, 0, 0.15);
  --noc: #3f51b5;
  --noc-soft: rgba(63, 81, 181, 0.15);
  --accent-teal: #009688;
  --emerald: #4caf50;
  --emerald-soft: rgba(76, 175, 80, 0.15);
  --siem: #673ab7;
  --siem-soft: rgba(103, 58, 183, 0.15);
  --teal: #009688;
  --gold: #fbc02d;
  --sky: #2196f3;
  --sky-soft: rgba(33, 150, 243, 0.15);

  --sidebar-w: 240px;
  --topbar-h: 58px;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 14px;
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
}
a {
  color: var(--sky);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
code {
  font-family: "Cascadia Code", "Consolas", monospace;
  font-size: 0.85em;
}
ul {
  list-style: none;
}

/* ---- Layout ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.2s ease;
}
.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s ease;
}
body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}
body.sidebar-collapsed .main-wrap {
  margin-left: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.page-body {
  padding: 24px;
  flex: 1;
}

/* ---- Sidebar Brand ---- */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-hex {
  font-size: 1.6rem;
  color: var(--sky);
}
.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}
.brand-version {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Sidebar Nav ---- */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}
.nav-section-label {
  padding: 16px 10px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition:
    background 0.15s,
    color 0.15s;
  margin-bottom: 2px;
  position: relative;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  text-decoration: none;
}
.nav-item.active {
  background: var(--sky-soft);
  color: var(--sky);
}
.nav-item.active .nav-icon {
  fill: var(--sky);
}
.soc-nav.active {
  background: var(--soc-soft);
  color: var(--soc);
}
.soc-nav.active .nav-icon {
  fill: var(--soc);
}
.noc-nav.active {
  background: var(--noc-soft);
  color: #7986cb;
}
.noc-nav.active .nav-icon {
  fill: #7986cb;
}
.nav-icon {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--soc);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ---- Sidebar Footer ---- */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--noc);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.user-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--noc);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.user-meta {
  min-width: 0;
}
.user-name {
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  fill: var(--text-muted);
  transition:
    background 0.15s,
    color 0.15s;
  flex-shrink: 0;
}
.btn-logout svg {
  fill: var(--text-muted);
}
.btn-logout:hover {
  background: var(--soc-soft);
  color: var(--soc);
  text-decoration: none;
}
.btn-logout:hover svg {
  fill: var(--soc);
}

/* ---- Topbar ---- */
.topbar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sidebar-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}
.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.sidebar-toggle:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}
.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.sidebar-backdrop {
  display: none;
}
.page-title {
  font-size: 1.15rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.clock {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    opacity 0.15s,
    box-shadow 0.15s;
  text-decoration: none !important;
}
.btn:hover {
  opacity: 0.85;
}
.btn-primary {
  background: var(--sky);
  color: #fff;
}
.btn-soc {
  background: var(--soc);
  color: #fff;
}
.btn-noc {
  background: var(--noc);
  color: #fff;
}
.btn-danger {
  background: var(--soc);
  color: #fff;
}
.btn-success {
  background: var(--emerald);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
}
.btn-block {
  width: 100%;
  justify-content: center;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 0.82rem;
}
.btn-xs {
  padding: 3px 8px;
  font-size: 0.76rem;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.card-body {
  padding: 16px;
}
.card-body.p0 {
  padding: 0;
}
.card-link {
  font-size: 0.82rem;
  color: var(--sky);
}
.card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}
.soc-badge {
  background: var(--soc-soft);
  color: var(--soc);
}
.noc-badge {
  background: var(--noc-soft);
  color: #7986cb;
}
.siem-badge {
  background: var(--siem-soft);
  color: #b39ddb;
}

/* ---- KPI Grid ---- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-grid.kpi-compact {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  border-top: 3px solid transparent;
  box-shadow: var(--shadow);
}
.kpi-value {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.kpi-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.kpi-soc {
  border-top-color: var(--soc);
}
.kpi-soc .kpi-value {
  color: var(--soc);
}
.kpi-amber {
  border-top-color: var(--amber);
}
.kpi-amber .kpi-value {
  color: var(--amber);
}
.kpi-critical {
  border-top-color: var(--soc);
}
.kpi-critical .kpi-value {
  color: #ef5350;
}
.kpi-noc {
  border-top-color: var(--noc);
}
.kpi-noc .kpi-value {
  color: #7986cb;
}
.kpi-resolved {
  border-top-color: var(--emerald);
}
.kpi-resolved .kpi-value {
  color: var(--emerald);
}
.kpi-assets-crit {
  border-top-color: var(--soc);
}
.kpi-assets-crit .kpi-value {
  color: #ef5350;
}

/* ---- Charts ---- */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.chart-container {
  height: 260px;
  position: relative;
}

/* ---- Two-col layout ---- */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ---- Topology workspace ---- */
.topology-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}
.topology-map-card {
  min-width: 0;
}
.topology-map-header {
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.topology-map-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.topology-layout-select {
  width: auto;
  padding: 3px 8px;
  font-size: 0.8rem;
}
.topology-map-canvas {
  width: 100%;
  height: 520px;
  min-width: 0;
  background: #1a1a1a;
}
.topology-side-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

/* ---- Tables ---- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.table thead tr {
  border-bottom: 2px solid var(--border);
}
.table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table-hover tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
.row-breach td:first-child {
  border-left: 3px solid var(--soc);
}
.truncate-text {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-critical {
  background: rgba(211, 47, 47, 0.2);
  color: #ef5350;
  border: 1px solid rgba(211, 47, 47, 0.3);
}
.badge-high {
  background: rgba(255, 152, 0, 0.2);
  color: var(--amber);
  border: 1px solid rgba(255, 152, 0, 0.3);
}
.badge-warning {
  background: rgba(251, 192, 45, 0.2);
  color: var(--gold);
  border: 1px solid rgba(251, 192, 45, 0.3);
}
.badge-success {
  background: rgba(76, 175, 80, 0.2);
  color: var(--emerald);
  border: 1px solid rgba(76, 175, 80, 0.3);
}
.badge-low {
  background: rgba(76, 175, 80, 0.15);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.2);
}
.badge-soc {
  background: var(--soc-soft);
  color: var(--soc);
}
.badge-noc {
  background: var(--noc-soft);
  color: #7986cb;
}
.badge-siem {
  background: var(--siem-soft);
  color: #b39ddb;
}
.badge-muted {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
}

/* ---- Alerts ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.88rem;
  border-left: 3px solid transparent;
}
.alert-danger {
  background: rgba(211, 47, 47, 0.12);
  border-color: var(--soc);
  color: #ef9a9a;
}
.alert-success {
  background: rgba(76, 175, 80, 0.12);
  border-color: var(--emerald);
  color: #a5d6a7;
}
.mb0 {
  margin-bottom: 0;
}
.mb-4 {
  margin-bottom: 20px;
}
.ml-1 {
  margin-left: 4px;
}
.ml-2 {
  margin-left: 8px;
}

/* ---- Forms ---- */
.form-page {
  max-width: 900px;
}
.form-card {
  max-width: 600px;
}
.form-card-lg {
  max-width: 860px;
}
.form-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.form-label {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-control {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.88rem;
  width: 100%;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 2px var(--sky-soft);
}
.form-control::placeholder {
  color: var(--text-muted);
}
select.form-control option {
  background: #2a2a2a;
}
textarea.form-control {
  resize: vertical;
}
.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
  overflow-x: auto;
}
.filter-bar > * {
  flex: 0 0 auto;
}
.req {
  color: var(--soc);
}
.w-full {
  width: 100%;
}

/* ---- Activity Feed ---- */
.activity-feed {
  padding: 4px 0;
}
.activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px 12px;
  align-items: baseline;
  padding: 8px 16px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-action {
  font-weight: 600;
  color: var(--text-primary);
  grid-column: 1;
}
.activity-user {
  color: var(--text-muted);
  grid-column: 2;
}
.activity-time {
  color: var(--text-muted);
  font-size: 0.76rem;
  grid-column: 3;
  white-space: nowrap;
}
.activity-details {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* ---- Toolbar ---- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border-hover);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}
.filter-btn.active {
  background: var(--sky-soft);
  color: var(--sky);
  border-color: transparent;
}

/* ---- Detail Pages ---- */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  gap: 16px;
}
.detail-id {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.detail-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.meta-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  font-size: 0.88rem;
}
.detail-list dt {
  color: var(--text-muted);
  font-weight: 500;
}
.detail-list dd {
  color: var(--text-primary);
}
.detail-list-inline {
  gap: 4px 16px;
}
.notes-box {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---- Incident Detail Grid ---- */
.incident-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.incident-main {
}
.incident-sidebar {
}
.incident-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  padding-left: 20px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sky);
  border: 2px solid var(--bg-card);
  z-index: 1;
}
.timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.timeline-user {
  font-weight: 600;
  font-size: 0.85rem;
}
.timeline-time {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.timeline-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ---- User cell ---- */
.user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Misc ---- */
.code-text {
  font-size: 0.82rem;
  color: var(--gold);
  background: rgba(251, 192, 45, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
}
.link-primary {
  color: var(--sky);
  font-weight: 500;
}
.fw-bold {
  font-weight: 600;
}
.empty-state {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.text-danger {
  color: var(--soc);
}
.text-muted {
  color: var(--text-muted);
}

/* ---- Secure password preview ---- */
.secure-preview-dialog {
  width: calc(100% - 2rem);
  max-width: 520px;
  padding: 0;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}
.secure-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

/* ---- Login page ---- */
.login-body {
  background: var(--bg-body);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.login-header {
  text-align: center;
  margin-bottom: 28px;
}
.login-hex {
  font-size: 3rem;
  color: var(--sky);
}
.login-brand {
  font-size: 1.8rem;
  font-weight: 800;
  margin-top: 4px;
}
.login-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.login-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.login-hint code {
  color: var(--gold);
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .chart-grid,
  .two-col-grid,
  .incident-grid,
  .topology-workspace {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .sidebar {
    width: min(280px, 86vw);
    transform: translateX(-100%);
  }
  .main-wrap {
    margin-left: 0;
  }
  body.sidebar-open {
    overflow: hidden;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    border: 0;
    background: rgba(0, 0, 0, 0.58);
    cursor: pointer;
  }
  .topbar {
    padding: 0 14px;
  }
  .clock {
    display: none;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .topology-map-controls {
    width: 100%;
    margin-left: 0;
  }
  .topology-layout-select {
    min-width: 0;
    flex: 1;
  }
  .topology-map-canvas {
    height: min(460px, 62vh);
  }
}
