/* ═══════════════════════════════════════════════════════════
   Zenger Control - Dark + Bordo Theme
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg-primary:    #0f0f0f;
  --bg-secondary:  #1a1a1a;
  --bg-tertiary:   #242424;
  --bg-hover:      #2e2e2e;

  --accent-primary: #8B1A2B;
  --accent-hover:   #A52238;
  --accent-dark:    #6B1420;
  --accent-subtle:  rgba(139, 26, 43, 0.15);
  --accent-border:  rgba(139, 26, 43, 0.4);

  --text-primary:   #E8E8E8;
  --text-secondary: #9a9a9a;
  --text-muted:     #606060;
  --text-on-accent: #FFFFFF;

  --border-primary: #2a2a2a;
  --border-hover:   #3a3a3a;

  --success: #27ae60;
  --warning: #f39c12;
  --danger:  #c0392b;
  --info:    #2980b9;

  --sidebar-width:   220px;
  --header-height:   60px;
  --border-radius:   8px;
  --border-radius-sm:4px;
  --transition:      0.2s ease;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent-hover); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-primary); }

img { max-width: 100%; }

/* ── App Layout ─────────────────────────────────────────── */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-tertiary);
  border-right: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
}

.sidebar-logo img {
  height: 36px;
  width: auto;
}

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

.nav-section-title {
  padding: 8px 20px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-subtle);
  color: var(--text-primary);
  border-left-color: var(--accent-primary);
}

.nav-item .nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  border-top: 1px solid var(--border-primary);
  padding: 16px 20px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  text-decoration: none;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition);
  cursor: pointer;
}

.sidebar-user:hover {
  background: var(--bg-hover);
}

.sidebar-user--active {
  background: var(--accent-subtle);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-user-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border-hover);
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  justify-content: center;
}

.btn-logout:hover {
  background: rgba(192, 57, 43, 0.15);
  border-color: var(--danger);
  color: #e74c3c;
}

/* ── Main Content ────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition);
}

.hamburger:hover { background: var(--bg-hover); color: var(--text-primary); }

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

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent-border);
  object-fit: cover;
}

.header-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: white;
}

/* ── Page Content ────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px;
  width: 100%;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-primary);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Stat Cards ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--accent-border); }

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-on-accent);
  border-color: var(--accent-primary);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-hover);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(192, 57, 43, 0.4);
}
.btn-danger:hover {
  background: rgba(192, 57, 43, 0.15);
  border-color: var(--danger);
}

.btn-sm { padding: 5px 10px; font-size: 0.8rem; }

/* ── Google Sign-In Button ───────────────────────────────── */
.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
}
.btn-google:hover {
  background: var(--accent-hover);
  color: white;
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.btn-google:active { transform: translateY(0); }
.btn-google svg { flex-shrink: 0; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-hover);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control--sm {
  padding: 5px 8px;
  font-size: 0.8rem;
}

select.form-control option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-inline {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-inline .form-group { margin-bottom: 0; flex: 1; min-width: 200px; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-primary);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-primary);
}

tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-primary);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--bg-hover); }
tbody tr.current-user { background: var(--accent-subtle); }

.td-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-admin {
  background: var(--accent-subtle);
  color: var(--accent-hover);
  border: 1px solid var(--accent-border);
}

.badge-user {
  background: rgba(41, 128, 185, 0.15);
  color: #5dade2;
  border: 1px solid rgba(41, 128, 185, 0.3);
}

/* ── Status indicators ───────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-dot.active  { background: var(--success); box-shadow: 0 0 4px var(--success); }
.status-dot.pending { background: var(--text-muted); }

/* ── Alerts / Flash ──────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 20px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background: rgba(39, 174, 96, 0.15);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: #58d68d;
}

.alert-error {
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: #e74c3c;
}

.alert-info {
  background: rgba(41, 128, 185, 0.15);
  border: 1px solid rgba(41, 128, 185, 0.3);
  color: #5dade2;
}

/* ── Login Page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 24px;
  position: relative;
}

.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(139, 26, 43, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-logo {
  margin-bottom: 8px;
}

.login-logo img {
  height: 44px;
  width: auto;
}

.login-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-primary);
}

.login-form { text-align: left; margin-bottom: 0; }
.login-form .form-group { margin-bottom: 16px; }
.login-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.login-form input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
}
.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}
.btn-login:hover { background: var(--accent-hover); }
.btn-login:active { transform: translateY(1px); }

.login-footer {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Profile Page ────────────────────────────────────────── */
.profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent-primary);
  object-fit: cover;
  flex-shrink: 0;
}

.profile-avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.profile-info h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-email {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.info-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--border-radius);
  padding: 16px 20px;
}

.info-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-weight: 600;
}

.info-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Welcome Banner ──────────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(139, 26, 43, 0.08) 100%);
  border: 1px solid var(--accent-border);
  border-radius: var(--border-radius);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.welcome-text h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.welcome-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.welcome-icon { font-size: 2.5rem; }

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
}

/* ── Role select in table ────────────────────────────────── */
.role-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-hover);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.role-select:focus { border-color: var(--accent-primary); }

/* ── Sidebar overlay (mobile) ────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 100;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .sidebar-overlay.active { display: block; }

  .main-content { margin-left: 0; }
  .hamburger { display: flex; }

  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .form-inline { flex-direction: column; }
  .form-inline .form-group { min-width: 100%; }

  .profile-card { flex-direction: column; text-align: center; }
  .login-card { padding: 32px 24px; }

  .td-actions { flex-direction: column; align-items: flex-start; gap: 4px; }
  .td-actions form, .td-actions .btn { width: 100%; justify-content: center; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Focus Accessibility ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ── App Toolbar (iframe pages) ──────────────────────────── */
.app-toolbar {
  height: 44px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
}

.app-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   Modules & Apps - iframe full-screen layout
   ═══════════════════════════════════════════════════════════ */

/* Force exact-viewport height on iframe pages — flex chain must be unbroken */
body.iframe-page,
body.iframe-page .app-container,
body.iframe-page .main-content {
  height: 100vh;
  overflow: hidden;
}

.page-content--iframe {
  padding: 0 !important;
  max-width: none !important;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0; /* required: flex children with overflow need this */
}

.module-iframe {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: none;
  background: var(--bg-primary);
  display: block;
}

.module-status-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 40px 24px;
}

.module-status-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.module-status-banner h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.module-status-banner p {
  color: var(--text-secondary);
  max-width: 400px;
}

.module-status-banner small {
  color: var(--text-muted);
  margin-top: 8px;
}

.module-status--disabled .module-status-icon { color: var(--text-muted); }
.module-status--down .module-status-icon { color: var(--danger); }
.module-status--down h2 { color: var(--danger); }
.module-status--unknown .module-status-icon { color: var(--warning); }
.module-status--link .module-status-icon { font-size: 4rem; }

/* ── Sidebar sections (collapsible) ─────────────────────── */

.nav-section {
  margin-bottom: 4px;
}

.nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.nav-section-toggle:hover {
  color: var(--text-secondary);
}

.nav-section-toggle .chevron {
  font-size: 0.6rem;
  transition: transform var(--transition);
}

.nav-section.collapsed .chevron {
  transform: rotate(-90deg);
}

.nav-section.collapsed .nav-section-items {
  display: none;
}

.nav-section-items {
  display: block;
}

/* Health dot in sidebar */
.nav-health-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-health-dot.health-ok { background: var(--success); }
.nav-health-dot.health-down { background: var(--danger); }
.nav-health-dot.health-unknown { background: var(--text-muted); }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-tertiary); }
