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

:root {
  --shell-sidebar-width: 240px;
  --shell-header-height: 86px;
  --sidebar-logo-scale: 2.7;
  --sidebar-logo-offset-y: 3px;
  --ink: #dce7ff;
  --sand: #0b1220;
  --clay: #a855f7;
  --slate: #0e172a;
  --moss: #34d399;
  --paper: #0f172a;
  --muted: #94a3b8;
  --stroke: #1f2b3b;
  --accent: #67e8f9;
  --accent-strong: #7c7cff;
  --glow: rgba(124, 124, 255, 0.18);
  --shadow: rgba(7, 11, 25, 0.7);
  --card-bg: rgba(15, 23, 42, 0.95);
  --border-subtle: rgba(148, 163, 184, 0.14);
  --text-primary: #dce7ff;
  --text-secondary: #94a3b8;
  --border-color: rgba(148, 163, 184, 0.2);
  --secondary: rgba(15, 23, 42, 0.5);
  --hover-bg: rgba(255, 255, 255, 0.05);
  --surface: rgba(22, 35, 60, 0.7);
}

/* Optional light mode tokens; apply class "theme-light" on body/html to activate */
.theme-light {
  --ink: #1f2937;
  --sand: #fafbfc;
  --clay: #0078d4;
  --slate: #111827;
  --moss: #107c41;
  --paper: #ffffff;
  --muted: #6b7280;
  --stroke: #e5e7eb;
  --accent: #0078d4;
  --accent-strong: #005a9e;
  --glow: rgba(0, 120, 212, 0.08);
  --shadow: rgba(31, 41, 55, 0.08);
  --card-bg: #ffffff;
  --border-subtle: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --secondary: #f3f4f6;
  --hover-bg: rgba(0, 0, 0, 0.05);
  --surface: #f0f2f5;
}

* { box-sizing: border-box; }

body {
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 20% 18%, rgba(103, 232, 249, 0.1), transparent 32%),
    radial-gradient(circle at 80% -10%, rgba(124, 124, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #0a101d 0%, #0b1224 45%, #0a142b 100%);
  color: var(--ink);
  min-height: 100vh;
  margin: 0;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.theme-light {
  background:
    radial-gradient(circle at 20% 18%, rgba(0, 120, 212, 0.04), transparent 40%),
    radial-gradient(circle at 75% -8%, rgba(0, 90, 158, 0.05), transparent 38%),
    linear-gradient(180deg, #fafbfc 0%, #f3f4f6 55%, #ffffff 100%);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

/* Site name above sidebar */
.sidebar-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--shell-sidebar-width);
  height: var(--shell-header-height);
  z-index: 50;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.sidebar-logo-link {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  overflow: hidden;
}
.sidebar-logo-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  flex: 0 1 auto;
  margin: 0;
}
.site-name {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #67e8f9, #7c7cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
}
body.theme-light .sidebar-header {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(31, 41, 55, 0.06);
}
body.theme-light .site-name {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar {
  background: rgba(15, 23, 42, 0.88);
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  margin-left: var(--shell-sidebar-width);
  width: calc(100% - var(--shell-sidebar-width));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  height: var(--shell-header-height);
  display: flex;
  align-items: center;
}

body.theme-light .topbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(31, 41, 55, 0.06);
}

.topbar-wrapper { 
  max-width: 100%; 
  margin: 0; 
  padding: 0 24px; 
  width: 100%; 
  display: flex;
  align-items: center;
  height: 100%;
  min-height: var(--shell-header-height);
  justify-content: flex-end;
}

/* Modern Header Layout */
.header-layout {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin-left: 0;
  flex: 1;
}

/* Brand */
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

/* User Section */
.header-user {
  position: relative;
}
.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: 10px;
  color: #0b1220;
  font-size: 1.4rem;
  box-shadow: 0 2px 8px rgba(103,232,249,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.brand-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(103,232,249,0.35);
}
.brand-text {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: #f8fafc;
}

/* Main Navigation */
.header-nav {
  display: none; /* Removed from header, only in sidebar now */
}

/* User Menu Button */
.header-user {
  position: relative;
}
.user-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}
.user-btn:hover {
  background: rgba(103,232,249,0.08);
  border-color: rgba(103,232,249,0.25);
  box-shadow: 0 2px 8px rgba(103,232,249,0.15);
}
.user-btn.is-open {
  background: rgba(103,232,249,0.12);
  border-color: rgba(103,232,249,0.35);
  box-shadow: 0 2px 8px rgba(103,232,249,0.2);
}
.user-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: 10px;
  color: #0b1220;
  font-size: 1.5rem;
  box-shadow: 0 2px 6px rgba(103,232,249,0.25);
  transition: transform 0.2s ease;
  overflow: hidden;
}
.user-avatar .user-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-btn:hover .user-avatar {
  transform: scale(1.05);
}
.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.user-name-label {
  font-weight: 800;
  font-size: 0.92rem;
  color: #f8fafc;
  line-height: 1.2;
}
.user-role-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.user-chevron {
  font-size: 0.9rem;
  color: #94a3b8;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Dropdown Panel */
.user-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 320px;
  background: linear-gradient(160deg, rgba(11,18,36,0.98), rgba(15,23,42,0.98));
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 0 1px rgba(103,232,249,0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.96);
  transform-origin: top right;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 60;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.user-dropdown-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Dropdown User Card */
.dropdown-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(103,232,249,0.08), rgba(124,124,255,0.12));
  border: 1px solid rgba(103,232,249,0.2);
  border-radius: 12px;
  margin-bottom: 4px;
}
.dropdown-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-radius: 12px;
  color: #0b1220;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(103,232,249,0.35);
  overflow: hidden;
  flex-shrink: 0;
}
.dropdown-avatar .user-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dropdown-user-info {
  flex: 1;
}
.dropdown-user-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #f8fafc;
  line-height: 1.3;
  margin-bottom: 2px;
}
.dropdown-user-role {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dropdown-user-email {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
  font-weight: 500;
}

/* Dropdown Divider */
.dropdown-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148,163,184,0.2), transparent);
  margin: 10px 0;
}

/* Dropdown Section */
.dropdown-section {
  padding: 8px 0;
}
.dropdown-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 6px;
}
.dropdown-section-title i {
  font-size: 1rem;
  color: var(--accent);
}

/* Dropdown Links */
.dropdown-links {
  display: grid;
  gap: 4px;
}
.dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 10px;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.dropdown-link i {
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

/* Pin Button Styles */
.pin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  background: rgba(148,163,184,0.1);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  padding: 0;
  z-index: 10;
}
.pin-btn:hover {
  background: rgba(103,232,249,0.15);
  border-color: rgba(103,232,249,0.3);
  color: #67e8f9;
  transform: scale(1.1);
}
.pin-btn.pinned {
  display: flex;
  background: rgba(103,232,249,0.15);
  border-color: rgba(103,232,249,0.3);
  color: #67e8f9;
}
.pin-btn.pinned i {
  transform: rotate(45deg);
}

.dropdown-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(103,232,249,0.1), rgba(124,124,255,0.15));
  opacity: 0;
  transition: opacity 0.2s ease;
}
.dropdown-link span {
  position: relative;
  z-index: 1;
}
.dropdown-link:hover {
  background: rgba(103,232,249,0.08);
  border-color: rgba(103,232,249,0.3);
  color: #f8fafc;
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(103,232,249,0.15);
}
.dropdown-link:hover i {
  transform: scale(1.15);
  color: #67e8f9;
}
.dropdown-link:hover::before {
  opacity: 1;
}

/* Theme Switcher */
.theme-switcher {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 4px;
}
.theme-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 10px;
  color: #cbd5e1;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.theme-option i {
  font-size: 1.15rem;
}
.theme-check {
  position: absolute;
  top: 6px;
  right: 6px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s ease;
}
.theme-check i {
  font-size: 0.95rem;
  color: var(--accent);
}
.theme-option:hover {
  background: rgba(103,232,249,0.08);
  border-color: rgba(103,232,249,0.25);
  color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(103,232,249,0.15);
}
.theme-option.is-active {
  background: linear-gradient(135deg, rgba(103,232,249,0.15), rgba(124,124,255,0.2));
  border-color: rgba(103,232,249,0.4);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(103,232,249,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}
.theme-option.is-active .theme-check {
  opacity: 1;
  transform: scale(1);
}

/* Dropdown Logout */
.dropdown-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 10px;
  color: #fecdd3;
  font-weight: 800;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  margin-top: 4px;
}
.dropdown-logout i {
  font-size: 1.15rem;
  transition: transform 0.2s ease;
}
.dropdown-logout:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: rgba(239,68,68,0.8);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(239,68,68,0.3);
  transform: translateY(-1px);
}
.dropdown-logout:hover i {
  transform: translateX(2px);
}

/* Light Theme Overrides */
body.theme-light .header-brand {
  background: transparent;
  border: none;
}
body.theme-light .brand-icon {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,120,212,0.2);
}
body.theme-light .brand-icon:hover {
  box-shadow: 0 4px 10px rgba(0,120,212,0.3);
}
body.theme-light .brand-text {
  color: #111827;
  font-weight: 800;
}
body.theme-light .nav-item {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}
body.theme-light .nav-item:hover {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  border-color: #0078d4;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0,120,212,0.25);
}
body.theme-light .nav-item.is-active {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  border-color: #005a9e;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0,120,212,0.3);
}
body.theme-light .user-btn {
  background: transparent;
  border-color: transparent;
}
body.theme-light .user-btn:hover {
  background: rgba(0,120,212,0.06);
  border-color: rgba(0,120,212,0.2);
  box-shadow: 0 2px 6px rgba(0,120,212,0.1);
}
body.theme-light .user-btn.is-open {
  background: rgba(0,120,212,0.1);
  border-color: rgba(0,120,212,0.3);
  box-shadow: 0 2px 8px rgba(0,120,212,0.15);
}
body.theme-light .user-btn.is-open .user-name-label,
body.theme-light .user-btn.is-open .user-role-label,
body.theme-light .user-btn.is-open .user-chevron {
  color: #1f2937;
}
body.theme-light .user-name-label {
  color: #1f2937;
}
body.theme-light .user-role-label {
  color: #6b7280;
}
body.theme-light .user-dropdown-panel {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 10px 25px rgba(31,41,55,0.1), 0 0 0 1px rgba(0,120,212,0.05);
}
body.theme-light .dropdown-user-card {
  background: linear-gradient(135deg, rgba(0,120,212,0.06), rgba(0,90,158,0.08));
  border-color: rgba(0,120,212,0.2);
}
body.theme-light .dropdown-user-name {
  color: #1f2937;
}
body.theme-light .dropdown-user-role {
  color: #6b7280;
}
body.theme-light .dropdown-user-email {
  color: #9ca3af;
}
body.theme-light .dropdown-divider {
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}
body.theme-light .dropdown-section-title {
  color: #6b7280;
}
body.theme-light .dropdown-link {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}
body.theme-light .dropdown-link:hover {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  border-color: #0078d4;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,120,212,0.2);
}
body.theme-light .theme-option {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}
body.theme-light .theme-option:hover {
  background: #f9fafb;
  border-color: #0078d4;
  color: #1f2937;
}
body.theme-light .theme-option.is-active {
  background: linear-gradient(135deg, #0078d4, #005a9e);
  border-color: #005a9e;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,120,212,0.25);
}
body.theme-light .dropdown-logout {
  background: rgba(220,38,38,0.06);
  border-color: rgba(220,38,38,0.2);
  color: #991b1b;
}
body.theme-light .dropdown-logout:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: rgba(220,38,38,0.6);
  color: #ffffff;
}

a {
  color: #8ddcff;
  text-decoration: none;
  transition: color 0.12s ease;
}
a:hover { color: #c7d2fe; }

@media (max-width: 1024px) {
  .header-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .header-brand {
    justify-self: center;
  }
  .header-nav {
    order: 2;
  }
  .header-user {
    justify-self: center;
  }
  .user-dropdown-panel {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-10px) scale(0.96);
  }
  .user-dropdown-panel.is-open {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}



.app-shell { background: transparent; margin-top: var(--shell-header-height); }

.sidebar {
  width: var(--shell-sidebar-width);
  background: #0b1324;
  color: #e2e8f0;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  min-height: calc(100vh - var(--shell-header-height));
  position: sticky;
  top: var(--shell-header-height);
  box-shadow: 10px 0 28px var(--shadow);
}

body.theme-light .sidebar {
  background: #ffffff;
  color: #1f2937;
  border-right: 1px solid #e5e7eb;
  box-shadow: 2px 0 8px rgba(31, 41, 55, 0.04);
}
.sidebar-inner { padding: 0 16px 18px 16px; display: grid; gap: 8px; overflow: hidden; }
.nav-link {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  white-space: nowrap;
  color: #e5edff;
  font-weight: 700;
  --nav-accent: var(--accent);
  --nav-accent-rgb: 103, 232, 249;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.16s ease, transform 0.12s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.nav-link i { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 10px; background: rgba(var(--nav-accent-rgb), 0.18); color: #0e172a; box-shadow: inset 0 1px 0 rgba(255,255,255,0.22); }
.nav-link:hover { background: rgba(124,124,255,0.14); border-color: rgba(var(--nav-accent-rgb), 0.3); transform: translateX(2px); color: #ffffff; box-shadow: 0 12px 30px rgba(var(--nav-accent-rgb), 0.25); }
.nav-link:hover i { background: rgba(var(--nav-accent-rgb), 0.22); color: #0b1220; }
.nav-link.is-active { background: linear-gradient(135deg, rgba(var(--nav-accent-rgb), 0.2), rgba(124, 124, 255, 0.3)); border-color: rgba(var(--nav-accent-rgb), 0.32); color: #ffffff; box-shadow: 0 16px 34px rgba(var(--nav-accent-rgb), 0.28); }
.nav-link.is-active i { background: rgba(var(--nav-accent-rgb), 0.24); color: #0b1220; }

/* Unique colors for each menu item icon */
.nav-link i.bi-speedometer2 { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #ffffff; } /* Dashboard - Blue */
.nav-link i.bi-inbox { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; } /* Tickets - Orange */
.nav-link i.bi-diagram-3 { background: linear-gradient(135deg, #06b6d4, #0891b2); color: #ffffff; } /* HR-Hub - Cyan */
.nav-link i.bi-check-circle { background: linear-gradient(135deg, #10b981, #059669); color: #ffffff; } /* Goedkeuringen - Green */
.nav-link i.bi-journal-text { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #ffffff; } /* Kennisbank - Purple */
.nav-link i.bi-megaphone { background: linear-gradient(135deg, #ec4899, #db2777); color: #ffffff; } /* Mededelingen - Pink */
.nav-link i.bi-telephone { background: linear-gradient(135deg, #14b8a6, #0f766e); color: #ffffff; } /* Telefoonboek - Teal */
.nav-link i.bi-activity { background: linear-gradient(135deg, #10b981, #059669); color: #ffffff; } /* M365 status - Green */
.nav-link i.bi-grid-3x3-gap { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #ffffff; } /* APP Store - Purple */
.nav-link i.bi-box-seam { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; } /* Assetmanagement - Amber */
.nav-link i.bi-envelope-open { background: linear-gradient(135deg, #06b6d4, #0891b2); color: #ffffff; } /* Mail to Ticket - Cyan */

.nav-link:hover i { opacity: 0.95; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.nav-link.is-active i { box-shadow: 0 2px 8px rgba(0,0,0,0.3); transform: scale(1.05); }

/* Pinned admin items colors - based on icon class */
.nav-link.pinned-item i.bi-speedometer { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #ffffff; } /* Beheer dashboard */
.nav-link.pinned-item i.bi-inbox-fill { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; } /* Tickets */
.nav-link.pinned-item i.bi-kanban { background: linear-gradient(135deg, #06b6d4, #0891b2); color: #ffffff; } /* Planbord */
.nav-link.pinned-item i.bi-people { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #ffffff; } /* Gebruikers */
.nav-link.pinned-item i.bi-building { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #ffffff; } /* Bedrijven */
.nav-link.pinned-item i.bi-tags { background: linear-gradient(135deg, #ec4899, #db2777); color: #ffffff; } /* Categorieën */
.nav-link.pinned-item i.bi-megaphone { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #ffffff; } /* Mededelingen */
.nav-link.pinned-item i.bi-gear { background: linear-gradient(135deg, #64748b, #475569); color: #ffffff; } /* Instellingen */
.nav-link.pinned-item i.bi-clock-history { background: linear-gradient(135deg, #10b981, #059669); color: #ffffff; } /* Cronjobs */
.nav-link.pinned-item i.bi-key { background: linear-gradient(135deg, #eab308, #ca8a04); color: #ffffff; } /* Verbindingen */
.nav-link.pinned-item i.bi-shield-check { background: linear-gradient(135deg, #14b8a6, #0d9488); color: #ffffff; } /* Audit logs */

.nav-section { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; padding: 10px 2px 2px; }

/* Pinned Menu Items */
.nav-link.pinned-item {
  position: relative;
  padding-right: 40px;
}
.pin-indicator {
  position: absolute;
  right: 12px;
  font-size: 0.85rem;
  color: rgba(103,232,249,0.8);
  opacity: 0.7;
}
.nav-link.pinned-item:hover .pin-indicator {
  opacity: 1;
  color: #67e8f9;
}
.nav-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148,163,184,0.2), transparent);
  margin: 8px 0;
}

body.theme-light .nav-link {
  color: #374151;
  background: #ffffff;
  border: 1px solid #d1d5db;
}
body.theme-light .nav-link i { background: linear-gradient(135deg, #0078d4, #005a9e); color: #ffffff; box-shadow: 0 2px 4px rgba(0,120,212,0.15); }
body.theme-light .nav-link:hover { background: linear-gradient(135deg, #0078d4, #005a9e); border-color: #0078d4; color: #ffffff; box-shadow: 0 4px 12px rgba(0,120,212,0.25); }
body.theme-light .nav-link:hover i { background: #ffffff; color: #0078d4; box-shadow: 0 2px 4px rgba(255,255,255,0.3); }
body.theme-light .nav-link.is-active { background: linear-gradient(135deg, #0078d4, #005a9e); border-color: #005a9e; color: #ffffff; box-shadow: 0 4px 12px rgba(0,120,212,0.3); }
body.theme-light .nav-link.is-active i { background: #ffffff; color: #0078d4; box-shadow: 0 2px 4px rgba(255,255,255,0.3); }
body.theme-light .nav-section { color: #6b7280; }
body.theme-light .pin-indicator { color: #0078d4; }
body.theme-light .nav-divider { background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent); }

/* Sidebar uses one consistent aqua accent to match the reference style */

/* ============================================================
   MOBILE NAV COMPONENTS (hamburger, brand, backdrop, drawer)
   ============================================================ */

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(103,232,249,0.2);
  border-radius: 10px;
  background: rgba(103,232,249,0.08);
  cursor: pointer;
  color: #67e8f9;
  font-size: 1.4rem;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: rgba(103,232,249,0.16); border-color: rgba(103,232,249,0.4); }
body.theme-light .nav-hamburger { border-color: rgba(0,120,212,0.25); background: rgba(0,120,212,0.08); color: #0078d4; }
body.theme-light .nav-hamburger:hover { background: rgba(0,120,212,0.14); border-color: rgba(0,120,212,0.4); }

/* Mobile brand in topbar — hidden on desktop */
.topbar-brand-mobile {
  display: none;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.topbar-brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  background: transparent;
  box-shadow: none;
}
.topbar-brand-img {
  display: block;
  height: 40px;
  width: auto;
  object-fit: contain;
  background: transparent;
}
.brand-text-mobile { font-weight: 800; font-size: 1rem; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
body.theme-light .brand-text-mobile { color: #1f2937; }

/* Drawer backdrop */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-backdrop.is-visible { opacity: 1; pointer-events: auto; cursor: pointer; }

/* Sidebar mobile close-header — hidden on desktop/tablet */
.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(148,163,184,0.14);
  gap: 12px;
  flex-shrink: 0;
}
.sidebar-mobile-logo { height: 38px; width: auto; max-width: 130px; object-fit: contain; }
.sidebar-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 8px;
  background: rgba(148,163,184,0.08);
  cursor: pointer;
  color: #94a3b8;
  font-size: 1rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.sidebar-close-btn:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #f87171; }

/* ============================================================
   TABLET (≤ 1024px): horizontal nav strip
   ============================================================ */
@media (max-width: 1024px) {
  /* Hide fixed logo box — brand moves into topbar */
  .sidebar-header { display: none; }
  /* Show mobile brand in topbar */
  .topbar-brand-mobile { display: flex; }
  /* Topbar full-width */
  .topbar { margin-left: 0; width: 100%; }
  .header-layout { justify-content: space-between; }
  /* Stack app-shell vertically */
  .app-shell { flex-direction: column; }
  /* Sidebar becomes horizontal strip */
  .sidebar {
    position: relative;
    top: 0;
    width: 100%;
    min-height: 0;
    box-shadow: none;
    border-right: none;
    border-bottom: 1px solid rgba(148,163,184,0.14);
  }
  .sidebar-inner { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); padding: 8px 10px; }
  .nav-link { justify-content: center; padding: 8px 6px; font-size: 0.82rem; gap: 6px; }
  .nav-link i { width: 26px; height: 26px; font-size: 0.95rem; }
  /* Hide user name/role on tablet to save topbar space */
  .user-info { display: none; }
  .user-chevron { display: none; }
}

/* ============================================================
   MOBILE (≤ 767px): slide-in drawer
   ============================================================ */
@media (max-width: 767px) {
  /* Show hamburger */
  .nav-hamburger { display: flex; }
  /* Show backdrop layer */
  .nav-backdrop { display: block; }
  /* Show sidebar close-header inside drawer */
  .sidebar-mobile-header { display: flex; }
  /* Sidebar becomes a fixed slide-in drawer */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    min-height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(148,163,184,0.14);
    border-bottom: none;
    box-shadow: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .sidebar.is-open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.6);
  }
  /* Single-column nav inside drawer */
  .sidebar-inner {
    grid-template-columns: 1fr;
    padding: 12px 14px 24px;
    overflow: visible;
  }
  .nav-link { justify-content: flex-start; font-size: 0.9rem; padding: 10px 12px; white-space: nowrap; gap: 10px; }
  .nav-link i { width: 30px; height: 30px; font-size: 1rem; }
  /* Keep user avatar visible, hide name/role */
  .user-info { display: none; }
  .user-chevron { display: none; }
  /* Prevent user dropdown going off-screen */
  .user-dropdown-panel {
    right: 0;
    left: auto;
    min-width: 280px;
    max-width: calc(100vw - 24px);
    transform: translateY(-10px) scale(0.96);
  }
  .user-dropdown-panel.is-open {
    transform: translateY(0) scale(1);
  }
  .header-layout {
    position: relative;
    min-height: 100%;
  }
  /* Reduce topbar padding on mobile */
  .topbar-wrapper { padding: 0 12px; }
  /* Mobile topbar: flat color so the header reads as one surface */
  .topbar {
    height: 104px;
    background: #0f172a;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav-hamburger {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 1.2rem;
  }
  .user-btn {
    padding: 0;
    border-radius: 10px;
  }
  .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 1.25rem;
  }
  .topbar-brand-mobile {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
  }
  .topbar-brand-link {
    display: flex;
    align-items: center;
  }
  .topbar-brand-img {
    display: block;
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }
  .app-shell { margin-top: 104px; }
  /* Main content safe-padding on mobile */
  .content { padding-top: 0.4rem !important; padding-left: 0; padding-right: 0; }
  .content > .px-4.py-4 { padding-top: 0.35rem !important; }
}

.content { width: 100%; }

.card {
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.85), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px var(--shadow), 0 0 0 1px rgba(124, 124, 255, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 24px 46px rgba(7, 11, 25, 0.8); border-color: rgba(124,124,255,0.18); }

body.theme-light .card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(31, 41, 55, 0.06), 0 1px 2px rgba(31, 41, 55, 0.04);
}
body.theme-light .card:hover { box-shadow: 0 4px 6px rgba(31, 41, 55, 0.08), 0 2px 4px rgba(31, 41, 55, 0.05); border-color: #d1d5db; }
.h1, .h2, .h3, .h4, .h5, .h6 { margin: 0; font-weight: 800; color: #e2ebff; }
.h4 { font-size: 1.2rem; }
.h6 { font-size: 1rem; }
.card-body { padding: 4px 2px; }
.shadow-sm { box-shadow: 0 16px 32px var(--shadow); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  background: linear-gradient(135deg, #4fc3f7, #7c7cff);
  color: #0b1220;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(124, 124, 255, 0.32); }
.btn-sm { padding: 8px 12px; font-size: 0.9rem; }
.btn-primary { background: linear-gradient(135deg, #4fc3f7, #7c7cff); border-color: rgba(124,124,255,0.5); }
.btn-outline-primary { background: transparent; color: #c7d2fe; border-color: rgba(124,124,255,0.5); }
.btn-outline-secondary { background: transparent; color: #cbd5e1; border-color: rgba(148, 163, 184, 0.4); }
.btn-outline-dark { background: transparent; color: #e2e8f0; border-color: rgba(255,255,255,0.18); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #f97316); border-color: rgba(239, 68, 68, 0.6); color: #fff; }

body.theme-light .btn { color: #1f2937; box-shadow: 0 2px 4px rgba(31,41,55,0.1); }
body.theme-light .btn-primary { background: linear-gradient(135deg, #0078d4, #005a9e); border-color: rgba(0,120,212,0.3); color: #ffffff; }
body.theme-light .btn-outline-primary { color: #0078d4; border-color: rgba(0,120,212,0.35); }
body.theme-light .btn-outline-secondary { color: #6b7280; border-color: #d1d5db; }
body.theme-light .btn-outline-dark { color: #1f2937; border-color: #1f2937; }
body.theme-light .btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #ffffff; border-color: rgba(220,38,38,0.5); }

body.theme-light .bg-secondary { background: #f3f4f6; color: #1f2937; border-color: #e5e7eb; }
body.theme-light .bg-success { background: linear-gradient(135deg, #107c41, #0b6a34); color: #ffffff; }
body.theme-light .bg-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #ffffff; }

body.theme-light .text-success { color: #107c41; }
body.theme-light .text-danger { color: #dc2626; }
body.theme-light .text-warning { color: #d97706; }
body.theme-light .border-subtle { border-color: #e5e7eb !important; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(103,232,249,0.12), rgba(124,124,255,0.2));
  color: #e2ebff;
}
.pill-amber { background: linear-gradient(135deg, rgba(251,191,36,0.16), rgba(251,146,60,0.24)); border-color: rgba(251,191,36,0.32); color: #fde68a; }
.pill-emerald { background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(34,197,94,0.24)); border-color: rgba(34,197,94,0.26); color: #bbf7d0; }
.pill-rose { background: linear-gradient(135deg, rgba(244,63,94,0.2), rgba(251,113,133,0.22)); border-color: rgba(244,63,94,0.3); color: #ffe4e6; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}
.bg-secondary { background: rgba(103, 232, 249, 0.16); color: #dce7ff; border: 1px solid rgba(103,232,249,0.35); }
.bg-success { background: linear-gradient(135deg, #34d399, #22c55e); color: #fff; border: 1px solid rgba(34,197,94,0.5); }
.bg-danger { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; border: 1px solid rgba(239,68,68,0.5); }
.bg-dark { background: rgba(17, 24, 39, 0.9); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.08); }

.text-success { color: #22c55e; }
.text-danger { color: #ef4444; }
.text-warning { color: #f59e0b; }
.border-subtle { border: 1px solid rgba(148, 163, 184, 0.22) !important; }
.border-dashed { border-style: dashed !important; }

body.theme-light .bg-secondary { background: #e5e7eb; color: #1f2937; border-color: #d1d5db; }
body.theme-light .bg-success { background: linear-gradient(135deg, #107c41, #0b6a34); color: #ffffff; }
body.theme-light .bg-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #ffffff; }

body.theme-light .text-success { color: #107c41; }
body.theme-light .text-danger { color: #dc2626; }
body.theme-light .text-warning { color: #d97706; }

body.theme-light .border-subtle { border-color: #e5e7eb !important; }


.form-label { display: inline-block; margin-bottom: 6px; font-weight: 700; color: #e5edff; }
.form-control, .form-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255,255,255,0.04);
  color: #e2e8f0;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.form-select-sm { padding: 8px 10px; font-size: 0.95rem; }
.form-control:focus, .form-select:focus { outline: none; border-color: rgba(103, 232, 249, 0.65); box-shadow: 0 0 0 3px rgba(124, 124, 255, 0.25); background: rgba(255,255,255,0.06); }
.form-text { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input { width: 16px; height: 16px; border-radius: 6px; border: 1px solid var(--stroke); accent-color: #7c7cff; background: #0b1220; }
.form-check-label { color: var(--ink); font-weight: 600; }

body.theme-light .form-control,
body.theme-light .form-select {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #1f2937;
}
body.theme-light .form-control:focus,
body.theme-light .form-select:focus { border-color: #0078d4; box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1); background: #ffffff; }
body.theme-light .form-text { color: #6b7280; }
body.theme-light .form-check-input { border-color: #d1d5db; background: #ffffff; }
body.theme-light .form-check-label { color: #1f2937; }

.table-responsive { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; background: transparent !important; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid rgba(148, 163, 184, 0.16); text-align: left; color: #dce7ff !important; background: transparent !important; }
.table thead th { font-weight: 800; color: #f8fafc !important; background: rgba(124, 124, 255, 0.08) !important; position: sticky; top: 0; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.table tbody { background: rgba(15, 23, 42, 0.4) !important; }
.table tbody tr { background: transparent !important; }
.table-hover tbody tr:hover { background: rgba(255,255,255,0.04) !important; }
.table tfoot td { border-top: 1px solid rgba(148, 163, 184, 0.2); color: #94a3b8; }

body.theme-light .table { background: transparent !important; }
body.theme-light .table th,
body.theme-light .table td { color: #1f2937 !important; border-bottom: 1px solid #e5e7eb; background: transparent !important; }
body.theme-light .table thead th { color: #111827 !important; background: #f9fafb !important; }
body.theme-light .table tbody { background: #ffffff !important; }
body.theme-light .table tbody tr { background: transparent !important; }
body.theme-light .table-hover tbody tr:hover { background: #f9fafb !important; }
body.theme-light .table tfoot td { color: #6b7280; border-top: 1px solid #e5e7eb; }

.alert { padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.alert-warning { background: rgba(251, 146, 60, 0.08); color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.28); }

.text-muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
.w-100 { width: 100%; }
.bg-light { background: rgba(255,255,255,0.04); }
.border { border: 1px solid rgba(148, 163, 184, 0.22); }
.rounded { border-radius: 12px; }
.rounded-lg { border-radius: 16px; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-start { justify-content: flex-start; }
.justify-content-end { justify-content: flex-end; }
.row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.row.g-2 { gap: 0.5rem; }
.row.g-3 { gap: 1rem; }
.row > [class^="col-"], .row > [class*=" col-"] { flex: 1 0 0; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-9 { flex: 0 0 75%; max-width: 75%; }
.col-lg-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-lg-10 { flex: 0 0 83.333%; max-width: 83.333%; }
@media (max-width: 767px) {
  body { background: var(--sand); }
  .top-links { width: 100%; }
  .row { gap: 0.75rem; }
  .col-lg-2, .col-lg-4, .col-lg-8, .col-lg-10,
  .col-md-3, .col-md-4, .col-md-9 { flex: 0 0 100%; max-width: 100%; }
}


.stat-card { border: 1px solid rgba(148, 163, 184, 0.18); background: linear-gradient(160deg, rgba(15,23,42,0.9), rgba(12,18,32,0.94)); border-radius: 14px; box-shadow: 0 18px 36px var(--shadow); }
.stat-label { text-transform: uppercase; font-size: 0.78rem; color: #94a3b8; letter-spacing: 0.04em; }
.stat-value { font-size: 2rem; font-weight: 800; color: #e2ebff; }

body.theme-light .stat-card { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 1px 3px rgba(31,41,55,0.06), 0 1px 2px rgba(31,41,55,0.04); }
body.theme-light .stat-label { color: #6b7280; }
body.theme-light .stat-value { color: #1f2937; }

.plan-column { min-height: 180px; display: flex; flex-direction: column; gap: 0.75rem; }
.plan-card { background: linear-gradient(145deg, rgba(15,23,42,0.82), rgba(17,24,39,0.92)); border: 1px solid rgba(124,124,255,0.2); border-radius: 12px; padding: 0.75rem 0.85rem; cursor: grab; box-shadow: 0 14px 28px var(--shadow); transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease; }
.plan-card:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(7, 11, 25, 0.85); border-color: rgba(103,232,249,0.28); }
.comment-item { border-bottom: 1px solid rgba(148, 163, 184, 0.16); padding: 0.75rem 0; color: #dce7ff; }

body.theme-light .plan-card { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 1px 3px rgba(31, 41, 55, 0.06); }
body.theme-light .plan-card:hover { box-shadow: 0 4px 6px rgba(31, 41, 55, 0.08); border-color: #d1d5db; }
body.theme-light .comment-item { border-bottom-color: #e5e7eb; color: #1f2937; }

.flash-toast { position: fixed; top: 18px; right: 18px; z-index: 60; }
.flash-card { border-radius: 14px; border: 1px solid rgba(124,124,255,0.24); background: rgba(12,18,32,0.95); box-shadow: 0 20px 40px var(--shadow); min-width: 280px; }
.flash-body { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.flash-icon { width: 32px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #0b1220; box-shadow: 0 10px 24px rgba(103,232,249,0.35); }
.flash-title { font-weight: 800; color: #e2ebff; }
.flash-text { color: var(--muted); }
.flash-success .flash-icon { background: #34d399; }
.flash-danger .flash-icon { background: #f87171; }
.btn-close { border: none; background: transparent; width: 18px; height: 18px; position: relative; cursor: pointer; opacity: 0.7; }
.btn-close::before, .btn-close::after { content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; background: #e2ebff; transform-origin: center; }
.btn-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.btn-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.fade-out { opacity: 0; transform: translateY(-4px); transition: opacity 0.16s ease, transform 0.16s ease; }

.table-empty { padding: 18px; text-align: center; color: var(--muted); }

.container-fluid { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 16px; }

/* KB search, alerts, and service-health tiles */
.kb-search input[type="search"] {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(124,124,255,0.2);
  color: #e2ebff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.kb-search input[type="search"]:focus { border-color: rgba(103,232,249,0.6); box-shadow: 0 0 0 3px rgba(124,124,255,0.22); }

.status-card {
  background: linear-gradient(140deg, rgba(12,18,32,0.9), rgba(15,23,42,0.92));
  border: 1px solid rgba(124,124,255,0.18);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 18px 32px var(--shadow);
}
.status-good { border-color: rgba(34,197,94,0.35); background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(34,197,94,0.2)); }
.status-warn { border-color: rgba(251,191,36,0.4); background: linear-gradient(135deg, rgba(251,191,36,0.14), rgba(251,146,60,0.2)); }
.status-bad { border-color: rgba(244,63,94,0.42); background: linear-gradient(135deg, rgba(244,63,94,0.16), rgba(251,113,133,0.2)); }

body.theme-light .status-card { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 1px 3px rgba(31, 41, 55, 0.06); }

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(148,163,184,0.22); color: #e2ebff; font-weight: 600; }
.chip:hover { border-color: rgba(103,232,249,0.38); }

/* Ticket list accents */
.ticket-row:hover { background: rgba(124,124,255,0.05); }
.ticket-number { font-weight: 800; color: #8ddcff; }
.ticket-title { color: #e2ebff; }

/* Audit log + tables for admin */
.audit-row { border-left: 3px solid rgba(124,124,255,0.45); padding-left: 10px; }
.audit-row:hover { background: rgba(255,255,255,0.03); }

/* Cards for assets/companies/categories to keep uniform look */
.grid-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-card {
  background: linear-gradient(150deg, rgba(12,18,32,0.9), rgba(17,24,39,0.92));
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 18px 32px var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.grid-card:hover { transform: translateY(-2px); box-shadow: 0 22px 38px rgba(7, 11, 25, 0.85); }
.grid-card h3 { margin: 0 0 6px; color: #e2ebff; font-size: 1rem; }
.grid-card .meta { color: #94a3b8; font-size: 0.9rem; }

body.theme-light .grid-card { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 1px 3px rgba(31, 41, 55, 0.06); }
body.theme-light .grid-card:hover { box-shadow: 0 4px 6px rgba(31, 41, 55, 0.08); }
body.theme-light .grid-card h3 { color: #1f2937; }
body.theme-light .grid-card .meta { color: #6b7280; }

/* Footer tint */
.footer { color: #94a3b8; }

/* Service health page */
.service-health { display: grid; gap: 16px; padding: 4px 0 12px; }
.service-health .page-shell { display: grid; gap: 16px; }
.service-health .hero {
  background:
    radial-gradient(circle at 20% 10%, rgba(103,232,249,0.24), transparent 38%),
    radial-gradient(circle at 82% 0%, rgba(124,124,255,0.24), transparent 42%),
    linear-gradient(135deg, rgba(12,18,32,0.92), rgba(17,24,39,0.94));
  color: var(--ink);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 40px var(--shadow);
  border: 1px solid rgba(124,124,255,0.28);
  display: grid;
  gap: 10px;
}
.service-health .hero h1 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: 0.01em; }
.service-health .hero .muted { color: var(--muted); }
.service-health .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.service-health .btn-refresh {
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  border: 1px solid rgba(124,124,255,0.32);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 26px rgba(7, 11, 25, 0.6);
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.12s ease, border-color 0.12s ease;
}
.service-health .btn-refresh:hover { transform: translateY(-1px); background: rgba(103,232,249,0.14); border-color: rgba(103,232,249,0.45); box-shadow: 0 16px 30px rgba(103,232,249,0.32); }

.service-health .pin-panel {
  background: linear-gradient(150deg, rgba(12,18,32,0.96), rgba(17,24,39,0.98));
  border: 1px solid rgba(148,163,184,0.28);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 18px 42px var(--shadow);
  display: none;
  gap: 8px;
  max-width: 520px;
}
.service-health .pin-panel.active { display: grid; }
.service-health .pin-panel h4 { margin: 0; font-size: 1rem; font-weight: 800; color: #e2ebff; }
.service-health .pin-list { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
.service-health .pin-row { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.service-health .pin-actions { display: flex; gap: 8px; justify-content: flex-end; }

.service-health .section {
  background: linear-gradient(150deg, rgba(12,18,32,0.9), rgba(15,23,42,0.94));
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 18px 36px var(--shadow);
  display: grid;
  gap: 12px;
}
.service-health .section h3 { margin: 0; font-size: 1.08rem; font-weight: 800; color: #e2ebff; }

.service-health .service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.service-health .service-card {
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(150deg, rgba(12,18,32,0.9), rgba(17,24,39,0.94));
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 8px;
  box-shadow: 0 16px 32px var(--shadow);
  min-height: 150px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.service-health .service-card:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(7, 11, 25, 0.82); border-color: rgba(124,124,255,0.24); }
.service-health .service-card.is-degraded { border-color: rgba(239,68,68,0.6); box-shadow: 0 20px 42px rgba(239,68,68,0.22); }
.service-health .service-card.is-operational { border-color: rgba(34,197,94,0.35); box-shadow: 0 18px 36px rgba(34,197,94,0.18); }
.service-health .service-card.is-restored { border-color: rgba(59,130,246,0.32); box-shadow: 0 18px 36px rgba(59,130,246,0.18); }
.service-health .service-name { font-weight: 800; color: #e2ebff; line-height: 1.25; min-height: 2.6em; }
.service-health .service-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-health .service-flags { display: inline-flex; align-items: center; gap: 6px; }
.service-health .incident-badge { margin-left: 8px; background: rgba(251,191,36,0.14); color: #fde68a; border: 1px solid rgba(251,191,36,0.36); border-radius: 999px; padding: 4px 10px; font-weight: 800; font-size: 0.85rem; box-shadow: 0 6px 14px rgba(251,191,36,0.18); }
.service-health .pill-slot { display: flex; justify-content: center; align-items: center; min-height: 52px; }
.service-health .pin-icon { color: #fcd34d; font-size: 0.95rem; line-height: 1; background: none; border: 0; cursor: pointer; padding: 4px; border-radius: 10px; }
.service-health .pin-icon:hover { background: rgba(251,191,36,0.14); }
.service-health .sh-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
  width: 170px;
  border: 1px solid rgba(124,124,255,0.28);
  background: linear-gradient(135deg, rgba(103,232,249,0.16), rgba(124,124,255,0.22));
  color: #e2ebff;
  gap: 6px;
  line-height: 1.1;
  box-shadow: 0 12px 26px rgba(124,124,255,0.18);
}
.service-health .sh-pill.degraded { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; border-color: rgba(239,68,68,0.9); box-shadow: 0 12px 28px rgba(239,68,68,0.32); }
.service-health .sh-pill.interrupted { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; border-color: rgba(239,68,68,0.9); box-shadow: 0 12px 28px rgba(239,68,68,0.32); }
.service-health .sh-pill.operational { background: linear-gradient(135deg, #34d399, #22c55e); color: #ffffff; border-color: rgba(34,197,94,0.7); box-shadow: 0 12px 28px rgba(52,211,153,0.22); }
.service-health .sh-pill.restored { background: linear-gradient(135deg, #67e8f9, #7c7cff); color: #0a1224; border-color: rgba(124,124,255,0.55); box-shadow: 0 12px 28px rgba(103,232,249,0.26); }
.service-health .sh-pill:hover { filter: brightness(1.02); }
.service-health .sh-pill-link { cursor: pointer; text-decoration: none; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.service-health .sh-pill-link:focus-visible { outline: 3px solid rgba(103,232,249,0.45); outline-offset: 3px; border-radius: 14px; }
.service-health .pill-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; }

.service-health .issue-list { display: grid; gap: 10px; }
.service-health .issue-card {
  border: 1px solid rgba(249,115,22,0.28);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(24,16,12,0.9), rgba(36,20,10,0.92));
  box-shadow: 0 18px 36px rgba(249,115,22,0.18);
  display: grid;
  gap: 8px;
}
.service-health .issue-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.service-health .issue-title { font-weight: 800; color: #ffd7a3; }
.service-health .issue-meta { color: var(--muted); }
.service-health .details-list { margin: 4px 0 0; padding-left: 16px; display: grid; gap: 6px; }
.service-health .details-list li { color: var(--muted); }

.service-health .modal-backdrop { position: fixed; inset: 0; background: rgba(7,11,25,0.7); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 16px; }
.service-health .modal-card {
  background: linear-gradient(150deg, rgba(12,18,32,0.96), rgba(15,23,42,0.98));
  border-radius: 16px;
  width: min(820px, 95vw);
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 26px 60px var(--shadow);
  border: 1px solid rgba(148,163,184,0.3);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.service-health .modal-header { padding: 16px 18px; border-bottom: 1px solid rgba(148,163,184,0.22); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(135deg, rgba(103,232,249,0.12), rgba(124,124,255,0.16)); box-shadow: inset 0 -1px 0 rgba(255,255,255,0.04); }
.service-health .modal-title { font-weight: 800; color: #e2ebff; margin: 0; display: flex; align-items: center; gap: 10px; }
.service-health .modal-body { padding: 18px 20px; overflow-y: auto; display: grid; gap: 14px; color: var(--ink); }
.service-health .modal-footer { padding: 12px 18px; border-top: 1px solid rgba(148,163,184,0.22); text-align: right; background: rgba(255,255,255,0.02); }
.service-health .btn-close-modal { border: 0; background: none; font-size: 1.4rem; cursor: pointer; color: #e2ebff; line-height: 1; }
.service-health .meta { color: var(--muted); font-size: 0.95rem; }
.service-health .issue-title-line { font-weight: 800; color: #e2ebff; font-size: 1.05rem; line-height: 1.4; }
.service-health .issue-meta-row { color: #cbd5e1; }
.service-health .issue-meta-row span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(148,163,184,0.16); }
.service-health .modal-body .timeline { padding-left: 2px; }
.service-health .modal-body .timeline-date { color: #e2ebff; }
.service-health .modal-body .timeline-body { color: #dce7ff; }
.service-health .update-post { padding: 10px 12px; border: 1px solid rgba(148,163,184,0.24); border-radius: 10px; background: rgba(255,255,255,0.03); }
.service-health .badge-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-weight: 800; font-size: 0.9rem; }
.service-health .badge-status.degraded { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; border: 1px solid rgba(239,68,68,0.9); box-shadow: 0 10px 24px rgba(239,68,68,0.3); }
.service-health .badge-status.operational { background: linear-gradient(135deg, #34d399, #22c55e); color: #062b15; border: 1px solid rgba(34,197,94,0.7); box-shadow: 0 10px 24px rgba(52,211,153,0.22); }
.service-health .badge-status.restored { background: linear-gradient(135deg, #67e8f9, #7c7cff); color: #0a1224; border: 1px solid rgba(124,124,255,0.6); box-shadow: 0 10px 24px rgba(103,232,249,0.22); }
.service-health .updates-title { font-weight: 800; color: #e2ebff; }
.service-health .timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.service-health .timeline-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.service-health .timeline-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: #7c7cff; box-shadow: 0 0 0 4px rgba(124,124,255,0.16); }
.service-health .timeline-date { font-weight: 700; color: #e2ebff; font-size: 0.95rem; }
.service-health .timeline-body { color: var(--ink); line-height: 1.45; }
.service-health .empty-updates { color: var(--muted); font-style: italic; }
.service-health .issue-switcher { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.service-health .issue-chip { border: 1px solid rgba(124,124,255,0.35); background: rgba(124,124,255,0.14); color: #e2ebff; padding: 6px 10px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: transform 0.08s ease, box-shadow 0.12s ease; }
.service-health .issue-chip.active { background: rgba(103,232,249,0.18); border-color: rgba(103,232,249,0.32); box-shadow: 0 6px 14px rgba(103,232,249,0.22); transform: translateY(-1px); }

body.theme-light .service-health .hero {
  background:
    radial-gradient(circle at 18% 8%, rgba(0,120,212,0.08), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(0,90,158,0.06), transparent 42%),
    linear-gradient(135deg, #ffffff, #fafbfc);
  color: #1f2937;
  border-color: #e5e7eb;
  box-shadow: 0 1px 3px rgba(31,41,55,0.06), 0 1px 2px rgba(31,41,55,0.04);
}
body.theme-light .service-health .hero .muted { color: #6b7280; }
body.theme-light .service-health .hero h1 { color: #1f2937; }

/* Light mode status summary */
body.theme-light .service-health .status-stat { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 1px 2px rgba(31,41,55,0.05); }
body.theme-light .service-health .status-stat.stat-operational { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: rgba(16,124,65,0.25); }
body.theme-light .service-health .status-stat.stat-operational i { color: #107c41; }
body.theme-light .service-health .status-stat.stat-operational .stat-number { color: #107c41; }
body.theme-light .service-health .status-stat.stat-degraded { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-color: rgba(220,38,38,0.25); }
body.theme-light .service-health .status-stat.stat-degraded i { color: #dc2626; }
body.theme-light .service-health .status-stat.stat-degraded .stat-number { color: #dc2626; }
body.theme-light .service-health .stat-label { color: #6b7280; }

body.theme-light .service-health .btn-refresh { background: #f0f9ff; color: #1f2937; border-color: rgba(0,120,212,0.25); box-shadow: 0 1px 2px rgba(31,41,55,0.05); }
body.theme-light .service-health .btn-refresh:hover { background: #e0f2fe; }
body.theme-light .service-health .pin-panel { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 1px 3px rgba(31,41,55,0.06); }
body.theme-light .service-health .pin-panel h4 { color: #1f2937; }
body.theme-light .service-health .pin-row { color: #1f2937; }
body.theme-light .service-health .section { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 1px 3px rgba(31,41,55,0.06), 0 1px 2px rgba(31,41,55,0.04); }
body.theme-light .service-health .section h3 { color: #1f2937; }
body.theme-light .service-health .service-card { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 1px 2px rgba(31,41,55,0.04); }
body.theme-light .service-health .service-card:hover { border-color: #d1d5db; box-shadow: 0 4px 6px rgba(31,41,55,0.06); }
body.theme-light .service-health .service-card.is-degraded { border-color: rgba(220,38,38,0.3); box-shadow: 0 4px 6px rgba(220,38,38,0.08); }
body.theme-light .service-health .service-card.is-operational { border-color: rgba(16,124,65,0.3); box-shadow: 0 4px 6px rgba(16,124,65,0.08); }
body.theme-light .service-health .service-card.is-restored { border-color: rgba(0,120,212,0.3); box-shadow: 0 4px 6px rgba(0,120,212,0.08); }
body.theme-light .service-health .service-name { color: #1f2937; }
body.theme-light .service-health .incident-badge { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; border-color: #d97706; box-shadow: 0 2px 4px rgba(217,119,6,0.15); font-weight: 800; }
body.theme-light .service-health .pin-icon { color: #d97706; }
body.theme-light .service-health .pin-icon:hover { background: rgba(217,119,6,0.1); }
body.theme-light .service-health .sh-pill { background: linear-gradient(135deg, #0078d4, #005a9e); color: #ffffff; border-color: #005a9e; box-shadow: 0 2px 4px rgba(0,120,212,0.2); font-weight: 800; }
body.theme-light .service-health .sh-pill.degraded { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #ffffff; border-color: #991b1b; box-shadow: 0 2px 4px rgba(220,38,38,0.3); }
body.theme-light .service-health .sh-pill.interrupted { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #ffffff; border-color: #991b1b; box-shadow: 0 2px 4px rgba(220,38,38,0.3); }
body.theme-light .service-health .sh-pill.operational { background: linear-gradient(135deg, #107c41, #0b6a34); color: #ffffff; border-color: #0b6a34; box-shadow: 0 2px 4px rgba(16,124,65,0.3); }
body.theme-light .service-health .sh-pill.restored { background: linear-gradient(135deg, #0078d4, #005a9e); color: #ffffff; border-color: #005a9e; box-shadow: 0 2px 4px rgba(0,120,212,0.25); }
body.theme-light .service-health .issue-card { background: linear-gradient(145deg, #fff7ed, #ffedd5); border-color: #fed7aa; box-shadow: 0 2px 4px rgba(249,115,22,0.08); }
body.theme-light .service-health .issue-title { color: #9a3412; }
body.theme-light .service-health .issue-meta { color: #78350f; }
body.theme-light .service-health .details-list li { color: #78350f; }
body.theme-light .service-health .modal-backdrop { background: rgba(31,41,55,0.5); }
body.theme-light .service-health .modal-card { background: #ffffff; border-color: #e5e7eb; box-shadow: 0 20px 25px rgba(31,41,55,0.1), 0 10px 10px rgba(31,41,55,0.04); }
body.theme-light .service-health .modal-header { background: linear-gradient(135deg, #f9fafb, #f3f4f6); border-bottom-color: #e5e7eb; }
body.theme-light .service-health .modal-title { color: #1f2937; }
body.theme-light .service-health .modal-body { color: #1f2937; }
body.theme-light .service-health .modal-footer { background: #f9fafb; border-top-color: #e5e7eb; }
body.theme-light .service-health .btn-close-modal { color: #1f2937; }
body.theme-light .service-health .issue-title-line { color: #1f2937; }
body.theme-light .service-health .issue-meta-row { color: #6b7280; }
body.theme-light .service-health .issue-meta-row span { background: #f9fafb; border-color: #e5e7eb; }
body.theme-light .service-health .update-post { background: #f9fafb; border-color: #e5e7eb; }
body.theme-light .service-health .badge-status.degraded { box-shadow: 0 2px 4px rgba(220,38,38,0.12); }
body.theme-light .service-health .badge-status.operational { color: #ffffff; }
body.theme-light .service-health .badge-status.restored { color: #ffffff; }
body.theme-light .service-health .timeline-dot { background: #0078d4; box-shadow: 0 0 0 4px rgba(0,120,212,0.1); }
body.theme-light .service-health .timeline-date { color: #1f2937; }
body.theme-light .service-health .timeline-body { color: #6b7280; }
body.theme-light .service-health .empty-updates { color: #9ca3af; }
body.theme-light .service-health .issue-chip { background: #f0f9ff; border-color: #e0f2fe; color: #0078d4; font-weight: 700; }
body.theme-light .service-health .issue-chip.active { background: linear-gradient(135deg, #e0f2fe, #bae6fd); border-color: rgba(0,120,212,0.3); box-shadow: 0 2px 4px rgba(0,120,212,0.15); }

/* Modal Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal styles */
.modal { display: none; position: fixed; z-index: 1050; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; outline: 0; background-color: rgba(0, 0, 0, 0.5); }
.modal.show { display: block; }
.modal-dialog { position: relative; width: auto; margin: 1.75rem auto; max-width: 500px; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 3.5rem); }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto; background-color: var(--card-bg); border-radius: 12px; outline: 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; border-bottom: 1px solid var(--border-subtle); }
.modal-title { margin-bottom: 0; line-height: 1.5; font-size: 1.125rem; font-weight: 600; }
.modal-body { position: relative; flex: 1 1 auto; padding: 1.25rem; }
.modal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; padding: 1rem; border-top: 1px solid var(--border-subtle); gap: 0.5rem; }
.btn-close { box-sizing: content-box; width: 1em; height: 1em; padding: 0.25em; color: currentColor; background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; border: 0; border-radius: 0.25rem; opacity: 0.5; cursor: pointer; }
.btn-close:hover { opacity: 1; }
body.theme-light .btn-close { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e"); }

@media (max-width: 768px) {
  .service-health { padding: 0; }
  .service-health .hero { padding: 16px; }
  .service-health .service-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* Footer Styles */
.footer-link:hover {
  opacity: 0.8;
}

/* Dashboard KB Card Hover Effect */
.kb-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kb-card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
body.theme-light .kb-card-hover:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* Global UI override: dropdowns + modals always dark blue */
:root {
  --ui-dropdown-bg: #0b1b3b;
  --ui-dropdown-bg-hover: #123066;
  --ui-dropdown-border: rgba(125, 173, 255, 0.35);
  --ui-dropdown-text: #ffffff;
  --ui-modal-bg: #081a3a;
  --ui-modal-bg-soft: #0b2248;
  --ui-modal-border: rgba(125, 173, 255, 0.32);
  --ui-modal-text: #ffffff;
}

select,
.form-select,
.form-control[list],
.dropdown-menu {
  background: var(--ui-dropdown-bg) !important;
  color: var(--ui-dropdown-text) !important;
  border-color: var(--ui-dropdown-border) !important;
}

select:focus,
.form-select:focus {
  background: var(--ui-dropdown-bg) !important;
  color: var(--ui-dropdown-text) !important;
  border-color: rgba(103, 232, 249, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.2) !important;
}

select option,
.form-select option {
  background: var(--ui-dropdown-bg) !important;
  color: var(--ui-dropdown-text) !important;
}

select option:checked,
.form-select option:checked,
select option:hover,
.form-select option:hover {
  background: var(--ui-dropdown-bg-hover) !important;
  color: #ffffff !important;
}

.dropdown-menu {
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.55) !important;
}

.dropdown-item,
.dropdown-item-text {
  color: #e2ecff !important;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active,
.dropdown-item:active {
  background: var(--ui-dropdown-bg-hover) !important;
  color: #ffffff !important;
}

.modal-content,
.week-modal-content,
.announcement-modal-content,
.announcement-modal-form,
#announcementModal > div,
#previewModal > div,
#confirmActionModal > div,
[id$="Modal"] > div {
  background: linear-gradient(165deg, var(--ui-modal-bg) 0%, var(--ui-modal-bg-soft) 100%) !important;
  color: var(--ui-modal-text) !important;
  border: 1px solid var(--ui-modal-border) !important;
}

.modal-header,
.modal-body,
.modal-footer,
.week-modal-header,
.week-modal-body,
.settings-modal-header,
.settings-modal-body {
  color: var(--ui-modal-text) !important;
}

.modal-title,
.week-modal-title,
[id$="Modal"] h1,
[id$="Modal"] h2,
[id$="Modal"] h3,
[id$="Modal"] h4,
[id$="Modal"] h5,
[id$="Modal"] h6,
[id$="Modal"] label,
[id$="Modal"] .text-muted {
  color: var(--ui-modal-text) !important;
}

/* ============================================================
   Dark mode: neutralize hardcoded Tailwind light-mode colors
   ============================================================ */

/* Outline cancel/back buttons that use border-gray-* + text-gray-* Tailwind classes */
body:not(.theme-light) a[class*="border-gray-"][class*="text-gray-"],
body:not(.theme-light) button[class*="border-gray-"][class*="text-gray-"] {
  color: var(--ink) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}
body:not(.theme-light) a[class*="border-gray-"][class*="text-gray-"]:hover,
body:not(.theme-light) button[class*="border-gray-"][class*="text-gray-"]:hover {
  background-color: rgba(148, 163, 184, 0.1) !important;
}

/* Card section headers with bg-white — reset to transparent so parent card gradient shows */
body:not(.theme-light) .card-header.bg-white {
  background-color: transparent !important;
}

/* Muted/secondary text — gray-500/600 map to --muted for better readability on dark */
body:not(.theme-light) [class~="text-gray-500"],
body:not(.theme-light) [class~="text-gray-600"] {
  color: var(--muted) !important;
}

/* ============================================================
   Ngenix / DigiOnline admin design system
   Central presentation layer; existing functional selectors stay intact.
   ============================================================ */
:root {
  color-scheme: dark;
  --ngenix-dark-900: #030712;
  --ngenix-dark-800: #0a0f1e;
  --ngenix-dark-700: #111827;
  --ngenix-neon-blue: #0066ff;
  --ngenix-neon-cyan: #00f0ff;
  --ngenix-neon-purple: #8b5cf6;
  --ngenix-text-primary: #ffffff;
  --ngenix-text-secondary: #d1d5db;
  --ngenix-text-muted: #9ca3af;
  --ngenix-text-soft: #6b7280;
  --ngenix-panel-bg: rgba(255, 255, 255, 0.03);
  --ngenix-panel-bg-strong: rgba(255, 255, 255, 0.06);
  --ngenix-panel-border: rgba(255, 255, 255, 0.06);
  --ngenix-panel-border-strong: rgba(255, 255, 255, 0.1);
  --ngenix-hover-bg: rgba(255, 255, 255, 0.05);
  --ngenix-active-bg: rgba(0, 102, 255, 0.1);
  --ngenix-active-border: rgba(0, 102, 255, 0.2);
  --ngenix-success: #34d399;
  --ngenix-warning: #fbbf24;
  --ngenix-danger: #f87171;
  --ngenix-info: #38bdf8;
  --shell-sidebar-width: 256px;
  --shell-header-height: 64px;
  --ink: var(--ngenix-text-primary);
  --sand: var(--ngenix-dark-900);
  --paper: rgba(10, 15, 30, 0.82);
  --card-bg: rgba(10, 15, 30, 0.88);
  --surface: var(--ngenix-panel-bg-strong);
  --muted: var(--ngenix-text-muted);
  --stroke: var(--ngenix-panel-border);
  --border-subtle: var(--ngenix-panel-border);
  --border-color: var(--ngenix-panel-border-strong);
  --accent: var(--ngenix-neon-cyan);
  --accent-strong: var(--ngenix-neon-blue);
  --clay: var(--ngenix-neon-purple);
  --moss: var(--ngenix-success);
  --hover-bg: var(--ngenix-hover-bg);
  --ui-dropdown-bg: #0a0f1e;
  --ui-dropdown-bg-hover: rgba(0, 102, 255, 0.16);
  --ui-dropdown-border: var(--ngenix-panel-border-strong);
  --ui-modal-bg: #080d1a;
  --ui-modal-bg-soft: #0a0f1e;
  --ui-modal-border: var(--ngenix-panel-border-strong);
}

html {
  background: var(--ngenix-dark-900);
  scrollbar-color: rgba(0, 240, 255, 0.35) rgba(255, 255, 255, 0.03);
}

body,
button,
input,
select,
textarea {
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body,
body.theme-light {
  color-scheme: dark;
  color: var(--ngenix-text-primary);
  background:
    radial-gradient(circle at 15% 0%, rgba(0, 102, 255, 0.1), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(0, 240, 255, 0.05), transparent 25rem),
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px),
    var(--ngenix-dark-900);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(0, 102, 255, 0.42); color: #fff; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--ngenix-neon-cyan) !important;
  outline-offset: 3px;
}

.sidebar-header {
  background: rgba(3, 7, 18, 0.9);
  border-color: var(--ngenix-panel-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.topbar,
body.theme-light .topbar {
  height: var(--shell-header-height);
  background: rgba(3, 7, 18, 0.76);
  border-color: var(--ngenix-panel-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(0, 102, 255, 0.035), transparent 35%),
    rgba(3, 7, 18, 0.92);
  border-right: 1px solid var(--ngenix-panel-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.sidebar-inner { gap: 6px; padding: 18px 14px; }
.nav-link {
  min-height: 46px;
  padding: 8px 10px;
  color: var(--ngenix-text-secondary);
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: none;
}
.nav-link i,
.nav-link[class] i[class*="bi-"] {
  width: 30px;
  height: 30px;
  color: var(--ngenix-text-muted);
  background: rgba(255,255,255,.035);
  box-shadow: none;
}
.nav-link:hover {
  color: #fff;
  background: var(--ngenix-hover-bg);
  border-color: var(--ngenix-panel-border);
  transform: translateX(1px);
  box-shadow: none;
}
.nav-link:hover i { color: var(--ngenix-neon-cyan); background: rgba(0,240,255,.07); box-shadow: none; }
.nav-link.is-active {
  color: #dffcff;
  background: linear-gradient(90deg, rgba(0,102,255,.15), rgba(0,240,255,.035));
  border-color: var(--ngenix-active-border);
  box-shadow: inset 3px 0 0 var(--ngenix-neon-cyan), 0 10px 28px rgba(0,102,255,.08);
}
.nav-link.is-active i,
.nav-link.is-active[class] i[class*="bi-"] {
  color: var(--ngenix-neon-cyan);
  background: rgba(0,102,255,.14);
  box-shadow: none;
  transform: none;
}
.nav-section {
  color: var(--ngenix-text-soft);
  font-size: .69rem !important;
  letter-spacing: .2em !important;
  margin: 15px 10px 4px;
}

.user-btn { border-radius: 12px; padding: 5px 8px; }
.user-btn:hover,
.user-btn.is-open { background: var(--ngenix-hover-bg); border-color: var(--ngenix-panel-border-strong); box-shadow: none; }
.user-avatar,
.dropdown-avatar {
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--ngenix-neon-blue), var(--ngenix-neon-purple));
  box-shadow: 0 0 0 2px rgba(0,240,255,.12);
}
.user-name-label, .dropdown-user-name { color: #fff; }
.user-role-label, .dropdown-user-role { color: var(--ngenix-text-muted); letter-spacing: .12em; }
.user-dropdown-panel,
.dropdown-menu {
  background: rgba(6, 11, 24, .97) !important;
  border-color: var(--ngenix-panel-border-strong) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(0,102,255,.08) !important;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}
.dropdown-user-card { background: rgba(0,102,255,.07); border-color: rgba(0,102,255,.16); }
.dropdown-link { background: transparent; border-color: transparent; color: var(--ngenix-text-secondary); }
.dropdown-link:hover { background: var(--ngenix-active-bg); border-color: var(--ngenix-active-border); transform: none; box-shadow: none; }

.content {
  width: auto;
  min-width: 0;
  padding: 24px !important;
}
.app-shell { min-width: 0; }

/* Reusable component aliases and broad compatibility with existing views. */
.glass-panel,
.content-card,
.table-container,
.tabs,
.card,
.panel,
section[class*="rounded"][class*="border"],
div[class*="rounded"][class*="shadow"] {
  background: var(--ngenix-panel-bg);
  border-color: var(--ngenix-panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}
.glass-panel-strong,
.header-card,
.modal-content {
  background: var(--ngenix-panel-bg-strong);
  border: 1px solid var(--ngenix-panel-border-strong);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .24);
}
.card,
.content-card,
.header-card,
.stat-card { border-radius: 16px; }
.card {
  background:
    linear-gradient(145deg, rgba(0,102,255,.025), transparent 45%),
    rgba(255,255,255,.03);
  border: 1px solid var(--ngenix-panel-border);
}
.card:hover { transform: translateY(-1px); border-color: var(--ngenix-panel-border-strong); box-shadow: 0 20px 50px rgba(0,0,0,.22); }

h1, h2, h3, h4, h5, h6 { color: var(--ngenix-text-primary); letter-spacing: -.015em; }
h1, .page-title { font-size: clamp(1.45rem, 2vw, 1.7rem); font-weight: 800; }
h2 { font-weight: 700; }
p, .text-secondary { color: var(--ngenix-text-secondary); }
.text-muted, small { color: var(--ngenix-text-muted) !important; }

.page-header,
.header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 22px 24px;
  background: linear-gradient(115deg, rgba(0,102,255,.09), rgba(255,255,255,.025) 55%, rgba(0,240,255,.025));
  border: 1px solid var(--ngenix-panel-border);
  border-radius: 16px;
}
.page-header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.stat-card,
[class*="stat-card"],
[class*="stats-card"] {
  border: 1px solid var(--ngenix-panel-border);
  background: linear-gradient(145deg, rgba(0,102,255,.075), rgba(255,255,255,.025));
  box-shadow: 0 16px 38px rgba(0,0,0,.17);
}
.stat-card__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--ngenix-neon-cyan); background: rgba(0,102,255,.12); }
.stat-card__value { color: #fff; font-size: 1.65rem; line-height: 1.1; font-weight: 800; }
.stat-card__label { color: var(--ngenix-text-muted); font-size: .82rem; }

.btn,
button[class*="bg-"],
a[class*="bg-"] {
  min-height: 40px;
  border-radius: 10px;
  font-weight: 700;
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.btn-primary,
button.bg-blue-600,
a.bg-blue-600,
button[class*="bg-indigo"],
a[class*="bg-indigo"] {
  color: #fff !important;
  background: linear-gradient(135deg, #0066ff, #0055dd) !important;
  border-color: rgba(0,240,255,.22) !important;
  box-shadow: 0 8px 24px rgba(0,102,255,.18);
}
.btn-primary:hover,
button.bg-blue-600:hover,
a.bg-blue-600:hover {
  border-color: rgba(0,240,255,.5) !important;
  box-shadow: 0 0 20px rgba(0,102,255,.28), 0 0 35px rgba(0,240,255,.08);
  transform: translateY(-1px);
}
.btn-secondary,
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-dark {
  color: var(--ngenix-text-secondary);
  background: rgba(255,255,255,.035);
  border-color: var(--ngenix-panel-border-strong);
  box-shadow: none;
}
.btn-danger,
button[class*="bg-red"],
a[class*="bg-red"] {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(220,38,38,.95), rgba(185,28,28,.95)) !important;
  border-color: rgba(248,113,113,.38) !important;
  box-shadow: none;
}
.btn-icon { min-width: 40px; padding: 8px; display: inline-grid; place-items: center; }

.form-group { display: grid; gap: 7px; }
.form-label,
label { color: var(--ngenix-text-secondary); font-weight: 700; }
.form-control,
.form-select,
.input-futuristic,
.select-futuristic,
.textarea-futuristic,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
  color: #fff !important;
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 10px;
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.form-control:hover,
.form-select:hover,
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover { border-color: rgba(255,255,255,.14) !important; }
.form-control:focus,
.form-select:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: none;
  color: #fff !important;
  border-color: rgba(0,240,255,.4) !important;
  background: rgba(255,255,255,.05) !important;
  box-shadow: 0 0 0 3px rgba(0,102,255,.1), 0 0 15px rgba(0,102,255,.16), inset 0 0 15px rgba(0,102,255,.04) !important;
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.3) !important; }
input:disabled, select:disabled, textarea:disabled,
input[readonly], textarea[readonly] { opacity: .55; cursor: not-allowed; background: rgba(255,255,255,.015) !important; }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #0a0f1e inset;
  caret-color: #fff;
}
select option { color: #fff !important; background: var(--ngenix-dark-800) !important; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ngenix-neon-blue); }

.table-responsive,
.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ngenix-panel-border);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
}
.table,
table {
  color: var(--ngenix-text-secondary);
  background: transparent !important;
}
.table th, .table td,
table th, table td {
  color: var(--ngenix-text-secondary) !important;
  border-color: var(--ngenix-panel-border) !important;
}
.table thead th,
table thead th {
  color: var(--ngenix-text-muted) !important;
  background: rgba(255,255,255,.035) !important;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.table tbody,
.table tbody tr,
table tbody,
table tbody tr { background: transparent !important; }
.table tbody tr:hover,
table tbody tr:hover { background: rgba(255,255,255,.025) !important; }

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(56,189,248,.23);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(56,189,248,.1);
}
.bg-success, .badge-success { color: #a7f3d0 !important; background: rgba(52,211,153,.12) !important; border-color: rgba(52,211,153,.24) !important; }
.bg-warning, .badge-warning { color: #fde68a !important; background: rgba(251,191,36,.12) !important; border-color: rgba(251,191,36,.24) !important; }
.bg-danger, .badge-danger { color: #fecaca !important; background: rgba(248,113,113,.12) !important; border-color: rgba(248,113,113,.24) !important; }
.bg-secondary, .badge-secondary { color: #d1d5db !important; background: rgba(156,163,175,.11) !important; border-color: rgba(156,163,175,.2) !important; }

.alert {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(56,189,248,.24);
  color: #bae6fd;
  background: rgba(56,189,248,.08);
}
.alert-success { color: #a7f3d0; background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.24); }
.alert-warning { color: #fde68a; background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.24); }
.alert-danger, .alert-error { color: #fecaca; background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.24); }

.nav-tabs,
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--ngenix-panel-border);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.nav-tabs .nav-link,
.tab-item { min-height: 38px; border-radius: 9px; white-space: nowrap; color: var(--ngenix-text-muted); }
.nav-tabs .nav-link.active,
.tab-item.active,
.tab-item.is-active { color: #dffcff; background: var(--ngenix-active-bg); border-color: var(--ngenix-active-border); }

.modal { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.modal-dialog { padding: 12px; }
.modal-content,
.week-modal-content,
.announcement-modal-content,
[id$="Modal"] > div {
  border-radius: 16px !important;
  background: linear-gradient(155deg, rgba(17,24,39,.98), rgba(3,7,18,.98)) !important;
  border-color: var(--ngenix-panel-border-strong) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.6) !important;
}
.modal-header, .modal-footer { border-color: var(--ngenix-panel-border) !important; }

.pagination { display: flex; flex-wrap: wrap; gap: 5px; }
.pagination a, .pagination button, .page-link {
  min-width: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  color: var(--ngenix-text-secondary);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--ngenix-panel-border);
  border-radius: 9px;
}
.pagination .active, .page-item.active .page-link { color: #fff; background: var(--ngenix-active-bg); border-color: var(--ngenix-active-border); }

.empty-state { padding: 38px 24px; text-align: center; color: var(--ngenix-text-muted); }

footer {
  color: var(--ngenix-text-muted) !important;
  background: rgba(3,7,18,.75) !important;
  border-color: var(--ngenix-panel-border) !important;
}
footer a { color: var(--ngenix-neon-cyan) !important; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar, .sidebar, .glass-panel, .glass-panel-strong, .card, .modal-content {
    background-color: rgba(10, 15, 30, .98);
  }
}

@media (max-width: 1023px) {
  :root { --shell-sidebar-width: 256px; }
  .content { padding: 20px !important; }
  .sidebar-header { display: none; }
  .topbar { left: 0; width: 100%; margin-left: 0; }
  .topbar-brand-mobile { display: flex; }
  .header-layout { justify-content: space-between; }
  .nav-hamburger { display: flex; }
  .nav-backdrop { display: block; }
  .sidebar-mobile-header { display: flex; }
  .app-shell { flex-direction: column; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(86vw, 304px);
    max-width: 86vw;
    height: 100vh;
    min-height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 200ms cubic-bezier(.4, 0, .2, 1);
    border-right: 1px solid var(--ngenix-panel-border);
    border-bottom: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .sidebar.is-open { transform: translateX(0); box-shadow: 30px 0 80px rgba(0,0,0,.65); }
  .sidebar-inner { grid-template-columns: 1fr; padding: 12px 14px 24px; overflow: visible; }
  .nav-link { justify-content: flex-start; padding: 8px 10px; font-size: .9rem; }
  .app-shell { margin-top: var(--shell-header-height); }
}

@media (max-width: 767px) {
  .topbar-wrapper { padding: 0 14px; }
  .content { width: 100%; margin-left: 0 !important; padding: 16px !important; }
  .sidebar {
    background: rgba(3,7,18,.98);
  }
  .nav-backdrop.is-visible { background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }
  .user-info { display: none; }
  .user-dropdown-panel { position: fixed; top: 72px; right: 12px; left: 12px; min-width: 0; max-height: calc(100vh - 84px); overflow-y: auto; }
  .page-header, .header-card { align-items: flex-start; flex-direction: column; padding: 18px; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { flex: 1 1 auto; }
  .modal-dialog { width: auto; margin: 12px auto; }
  .modal-content { max-height: calc(100vh - 24px); overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
