/* ForssCloud Portal – Styles */

/* ================================================================
   Design tokens
   ================================================================ */
:root {
  --sidebar-w: 240px;
  --sidebar-collapsed-w: 60px;
  --topbar-h: 52px;
  --radius: 8px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg-0: #0f1117;
  --bg-1: #161922;
  --bg-2: #1e2230;
  --bg-3: #282d3e;
  --border: #2a2f42;
  --text-0: #e4e6ef;
  --text-1: #a0a4b8;
  --text-2: #6c7293;
  --accent: #6c8cff;
  --accent-hover: #8aa4ff;
  --green: #34d399;
  --red: #f87171;
  --yellow: #fbbf24;
  --shadow: 0 2px 8px rgba(0,0,0,.35);
}

[data-theme="light"] {
  --bg-0: #f5f6fa;
  --bg-1: #ffffff;
  --bg-2: #eef0f6;
  --bg-3: #dfe2ec;
  --border: #d1d5e4;
  --text-0: #1a1d2e;
  --text-1: #4a4f6a;
  --text-2: #8890a8;
  --accent: #4b6bfb;
  --accent-hover: #3451d4;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-0);
  color: var(--text-0);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; color: inherit; font: inherit; }

/* ================================================================
   Sidebar
   ================================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width var(--transition);
  flex-shrink: 0;
  z-index: 20;
}

.sidebar.collapsed { width: var(--sidebar-collapsed-w); }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-divider span { display: none; }
.sidebar.collapsed .nav-divider { margin: 4px 12px; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.sidebar-toggle {
  padding: 4px;
  border-radius: 4px;
  color: var(--text-2);
  transition: color var(--transition);
}
.sidebar-toggle:hover { color: var(--text-0); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  margin: 2px 8px;
  border-radius: 6px;
  color: var(--text-1);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover { background: var(--bg-2); color: var(--text-0); }
.nav-item.active { background: var(--bg-3); color: var(--accent); }
.nav-item svg { flex-shrink: 0; }

.nav-divider {
  margin: 12px 16px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
}
.nav-divider span { display: block; }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 4px 0;
}

/* ================================================================
   Main area
   ================================================================ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: var(--topbar-h);
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-title {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu { display: none; }

.cmd-palette-btn {
  padding: 6px;
  border-radius: 6px;
  color: var(--text-2);
  transition: color var(--transition), background var(--transition);
}
.cmd-palette-btn:hover { background: var(--bg-2); color: var(--text-0); }

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.user-name {
  font-size: 0.85rem;
  color: var(--text-1);
}

.btn-logout {
  padding: 6px;
  border-radius: 6px;
  color: var(--text-2);
  transition: color var(--transition);
}
.btn-logout:hover { color: var(--red); }

/* ================================================================
   Views
   ================================================================ */
.view {
  flex: 1;
  overflow-y: auto;
  display: none;
}
.view.active { display: block; }

#service-iframe {
  width: 100%;
  height: 100%;
  border: none;
}
#view-service.active { display: flex; }

/* Iframe loading overlay */
.iframe-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-0);
  color: var(--text-2);
  font-size: 0.85rem;
  z-index: 5;
  transition: opacity 0.2s ease;
}
.iframe-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.iframe-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: iframe-spin 0.7s linear infinite;
}
@keyframes iframe-spin {
  to { transform: rotate(360deg); }
}
#view-service { position: relative; }

/* ================================================================
   Config error banner
   ================================================================ */
.config-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 24px 0;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--yellow) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--yellow) 30%, transparent);
  border-radius: var(--radius);
  color: var(--text-0);
  font-size: 0.85rem;
  line-height: 1.5;
}
.config-banner svg {
  flex-shrink: 0;
  color: var(--yellow);
  margin-top: 1px;
}
.config-banner-text strong {
  color: var(--yellow);
}
.config-banner-detail {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-2);
  font-family: "SF Mono", "Fira Code", monospace;
  word-break: break-all;
}

/* ================================================================
   Dashboard
   ================================================================ */
.dashboard-greeting {
  padding: 24px 24px 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-0);
}

.motd-banner {
  margin: 12px 24px 0;
  padding: 10px 16px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-1);
  line-height: 1.5;
}

.dashboard {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  align-content: start;
}

.widget {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-0);
}

.widget-body {
  padding: 0 16px 16px;
}

/* Service health rows */
.health-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.health-row:last-child { border-bottom: none; }

.health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.health-dot.up { background: var(--green); }
.health-dot.down { background: var(--red); }
.health-dot.unknown { background: var(--text-2); }

.health-name { flex: 1; font-size: 0.85rem; }
.health-latency {
  font-size: 0.75rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Grouped health (parent/child) */
.health-expandable {
  cursor: pointer;
  user-select: none;
}
.health-expandable:hover {
  background: var(--bg-2);
  border-radius: 4px;
}
.health-expandable .health-name::after {
  content: "▸";
  margin-left: 4px;
  font-size: 0.7rem;
  color: var(--text-2);
  transition: transform 0.15s;
  display: inline-block;
}
.health-expandable.expanded .health-name::after {
  transform: rotate(90deg);
}
.health-group-count {
  font-size: 0.68rem;
  color: var(--text-2);
  font-weight: 400;
}
.health-children {
  margin-left: 20px;
  border-left: 2px solid var(--border);
  padding-left: 8px;
}
.health-child {
  padding: 5px 0;
}
.health-child .health-dot {
  width: 7px;
  height: 7px;
}
.health-child .health-name {
  font-size: 0.78rem;
  color: var(--text-1);
}
.health-child .health-latency {
  font-size: 0.7rem;
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: var(--bg-2);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-2);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Quick actions */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--bg-2);
  font-size: 0.82rem;
  color: var(--text-1);
  transition: background var(--transition), color var(--transition);
}
.action-btn:hover { background: var(--bg-3); color: var(--text-0); }

/* Notifications */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-1);
}
.notif-item:last-child { border-bottom: none; }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-dot.info { background: var(--accent); }
.notif-dot.warn { background: var(--yellow); }
.notif-dot.error { background: var(--red); }

.notif-time {
  display: block;
  font-size: 0.72rem;
  color: var(--text-2);
  margin-top: 2px;
}

/* ================================================================
   Logs widget
   ================================================================ */
.log-feed {
  max-height: 340px;
  overflow-y: auto;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.74rem;
  line-height: 1.55;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.log-entry:last-child { border-bottom: none; }

.log-level {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.log-level.info  { background: var(--accent); }
.log-level.warn  { background: var(--yellow); }
.log-level.error { background: var(--red); }

.log-meta {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.log-time {
  color: var(--text-2);
  font-size: 0.7rem;
  white-space: nowrap;
}

.log-svc {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.72rem;
  white-space: nowrap;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-msg {
  color: var(--text-1);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.log-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}

.log-footer a {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.log-footer a:hover { color: var(--accent-hover); }

.log-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.log-filter select {
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-0);
  font-size: 0.76rem;
  outline: none;
}

/* Loki info page stat pills */
.loki-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.loki-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--bg-2);
  font-size: 0.75rem;
  color: var(--text-1);
}

/* ================================================================
   Loki Log Explorer
   ================================================================ */
.explorer-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-1);
  overflow: hidden;
}

.explorer-toolbar {
  padding: 12px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explorer-query-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.explorer-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.explorer-input {
  flex: 1;
  padding: 6px 10px;
  border-radius: 4px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  color: var(--text-0);
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.78rem;
  outline: none;
}
.explorer-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(108, 140, 255, 0.15);
}

.explorer-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.explorer-select {
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--bg-0);
  border: 1px solid var(--border);
  color: var(--text-0);
  font-size: 0.76rem;
  outline: none;
}
.explorer-select:focus { border-color: var(--accent); }

.explorer-btn {
  padding: 5px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.explorer-btn:hover { background: var(--bg-2); }

.explorer-btn-run {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.explorer-btn-run:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.explorer-auto-label {
  font-size: 0.76rem;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

.explorer-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  font-size: 0.74rem;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}

.explorer-feed {
  max-height: 520px;
  overflow-y: auto;
  padding: 4px 14px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.74rem;
  line-height: 1.55;
}

.explorer-entry .log-msg {
  word-break: break-word;
}

/* ================================================================
   Hosts widget
   ================================================================ */
.host-section {
  margin-bottom: 16px;
}

.host-section:last-child { margin-bottom: 0; }

.host-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.host-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-0);
}

.host-uptime {
  font-size: 0.72rem;
  color: var(--text-2);
}

.host-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.host-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.host-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-2);
}

/* ----------------------------------------------------------------
   Disk quotas (used inside hosts widget)
   ---------------------------------------------------------------- */
.quota-disk { margin-bottom: 16px; }
.quota-disk:last-child { margin-bottom: 0; }

.quota-disk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.quota-disk-name {
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-0);
}

.quota-disk-name svg { width: 14px; height: 14px; }

.quota-disk-usage {
  font-size: 0.75rem;
  color: var(--text-2);
}

.quota-bar-track {
  height: 5px;
  border-radius: 3px;
  background: var(--bg-2);
  overflow: hidden;
}

.quota-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
  min-width: 1px;
}

.quota-row {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.quota-row:last-child { border-bottom: none; }

.quota-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.quota-name {
  font-size: 0.8rem;
  color: var(--text-1);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.quota-usage {
  font-size: 0.72rem;
  color: var(--text-2);
  white-space: nowrap;
}

.quota-ts {
  display: block;
  font-size: 0.7rem;
  color: var(--text-2);
  text-align: right;
  margin-top: 10px;
}

/* ================================================================
   Info page (services without a web UI)
   ================================================================ */
.info-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
}

.info-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 480px;
  width: 100%;
  padding: 32px;
  text-align: center;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-2);
  color: var(--accent);
  margin-bottom: 16px;
}
.info-icon svg { width: 28px; height: 28px; }

.info-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.info-desc {
  font-size: 0.88rem;
  color: var(--text-1);
  margin-bottom: 24px;
  line-height: 1.5;
}

.info-meta {
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
}
.info-row:last-child { border-bottom: none; }

.info-label {
  color: var(--text-2);
  font-weight: 500;
}

.info-value {
  color: var(--text-0);
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-value code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.8rem;
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: 4px;
}

.info-badge {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-2);
  font-size: 0.76rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
}

/* ================================================================
   Settings view
   ================================================================ */
.settings {
  padding: 24px;
  max-width: 560px;
}

.settings h2 {
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.setting-group {
  margin-bottom: 24px;
}

.setting-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
}

.theme-picker {
  display: flex;
  gap: 8px;
}

.theme-btn {
  padding: 8px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 0.84rem;
  transition: all var(--transition);
}
.theme-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Account self-service links */
.account-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.account-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--bg-2);
  font-size: 0.82rem;
  color: var(--text-1);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.account-link-btn:hover { background: var(--bg-3); color: var(--text-0); }

/* ================================================================
   Command palette
   ================================================================ */
.cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18vh;
  z-index: 100;
}
.cmd-overlay.hidden { display: none; }

.cmd-palette {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 480px;
  max-width: 92vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  overflow: hidden;
}

#cmd-input {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-0);
  font-size: 0.95rem;
  outline: none;
}

.cmd-results {
  max-height: 280px;
  overflow-y: auto;
}

.cmd-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-1);
  transition: background var(--transition);
}
.cmd-result:hover, .cmd-result.selected {
  background: var(--bg-2);
  color: var(--text-0);
}
.cmd-result svg { flex-shrink: 0; color: var(--text-2); }

/* ================================================================
   Keyboard shortcuts help
   ================================================================ */
.shortcuts-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.shortcuts-card h3 {
  font-size: 1rem;
  margin-bottom: 16px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-1);
}
.shortcut-row:last-child { border-bottom: none; }
.shortcut-row span:last-child { margin-left: auto; color: var(--text-2); font-size: 0.8rem; }

kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-0);
}

/* ================================================================
   Session expired overlay
   ================================================================ */
.session-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.session-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  max-width: 360px;
  width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.session-card svg { color: var(--accent); margin-bottom: 12px; }
.session-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.session-card p { font-size: 0.85rem; color: var(--text-1); line-height: 1.5; margin-bottom: 20px; }

.session-login-btn {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
}
.session-login-btn:hover { background: var(--accent-hover); }

/* ================================================================
   Off-VPN connect page
   ================================================================ */
.offvpn-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.offvpn-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-1));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.offvpn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  flex-shrink: 0;
}
.offvpn-icon svg { width: 24px; height: 24px; }

.offvpn-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.offvpn-text p {
  font-size: 0.85rem;
  color: var(--text-1);
  line-height: 1.5;
  margin: 0;
}

.offvpn-iframe-wrap {
  flex: 1;
  overflow: hidden;
}

.offvpn-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    transition: left var(--transition);
    box-shadow: none;
  }
  .sidebar.open {
    left: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .mobile-menu { display: block; }
  .user-name { display: none; }
  .dashboard { grid-template-columns: 1fr; padding: 16px; }
}
