/* Import Modern Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================================
   CEREDA SYSTEMS - MODERN IT DESIGN - CSS VARIABLES
   ============================================================================ */
:root {
  /* Cereda Colors - Modern IT Palette */
  --cereda-primary: #3fa3a3;
  --cereda-primary-dark: #008487;
  --cereda-primary-light: #5eb8b8;
  --cereda-accent: #00a3a6;

  /* Dark Mode Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;

  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Border Colors */
  --border-color: #334155;
  --border-accent: #3fa3a3;

  /* Status Colors */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Shadows - Modern */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(63, 163, 163, 0.3);

  /* Border Radius - Modern */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   THEME: simDesk (Violet / Ultra-Dark)
   ============================================================================ */
[data-theme="cereda-desk"] {
  --cereda-primary: #7c5cf6;
  --cereda-primary-dark: #6d46f5;
  --cereda-primary-light: #9b7ff8;
  --cereda-accent: #0ea5e9;
  --cereda-primary-rgb: 124, 92, 246;

  --bg-primary: #030712;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: #111827;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --border-color: #1e293b;
  --border-accent: #7c5cf6;

  --shadow-glow: 0 0 20px rgba(124, 92, 246, 0.3);
}

[data-theme="cereda-desk"] body {
  background:
    radial-gradient(ellipse at 15% 15%, rgba(124, 92, 246, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(14, 165, 233, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 40%, rgba(124, 92, 246, 0.05) 0%, transparent 45%),
    linear-gradient(145deg, #030712 0%, #080d1e 40%, #0a1020 70%, #030712 100%);
  background-attachment: fixed;
}

/* ============================================================================
   GLOBAL STYLES - MODERN IT DESIGN
   ============================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(63, 163, 163, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(59, 130, 246, 0.09) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 40%, rgba(99, 102, 241, 0.07) 0%, transparent 45%),
    linear-gradient(145deg, #050d1e 0%, #0b1628 40%, #0d1f2d 70%, #060f1c 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* ============================================================================
   LAYOUT - MODERN IT DESIGN
   ============================================================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.main-content {
  flex: 1;
  padding: 32px 24px;
  background: transparent;
}

/* ============================================================================
   SIDEBAR LAYOUT
   ============================================================================ */
:root {
  --sidebar-width: 220px;
  --topbar-height: 56px;
}

.app-layout {
  min-height: 100vh;
}

.app-layout-main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding-top: var(--topbar-height);
}

.app-layout-content {
  background: transparent;
  padding: 28px 28px 40px;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: rgba(8, 15, 30, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5), inset -1px 0 0 rgba(255, 255, 255, 0.04);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 90;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-logo {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

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

.sidebar-group {
  padding: 4px 0;
}

.sidebar-group + .sidebar-group {
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
  padding-top: 8px;
}

.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 20px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.sidebar-link:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sidebar-link--active {
  color: var(--cereda-primary) !important;
  background: rgba(63, 163, 163, 0.10) !important;
  font-weight: 600;
}

.sidebar-link--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cereda-primary);
  border-radius: 0 2px 2px 0;
}

.sidebar-link-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- TOPBAR ---- */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: rgba(8, 15, 30, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  gap: 12px;
}

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

.topbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  text-decoration: none;
}

.topbar-icon-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--cereda-primary);
}

.topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  transition: var(--transition);
}

.topbar-user:hover {
  border-color: var(--cereda-primary);
}

/* Notification dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 1000;
  overflow: hidden;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

/* User dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  z-index: 1000;
  overflow: hidden;
  padding: 4px 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  font-family: inherit;
}

.user-dropdown-item:hover {
  background: var(--bg-secondary);
}

.user-dropdown-item--danger {
  color: #ef4444;
}

.user-dropdown-item--danger:hover {
  background: rgba(239, 68, 68, 0.07);
}

/* page-container für Seiten ohne eigene Klasse */
.page-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================================================
   NAVBAR - MODERN IT DESIGN
   ============================================================================ */
.navbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 0.75rem 2rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: var(--transition);
}

.navbar-brand:hover {
  color: var(--cereda-primary);
}

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

.navbar-menu {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  list-style: none;
}

.navbar-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-weight: 500;
  font-size: 0.875rem;
  position: relative;
}

.navbar-link:hover {
  background-color: var(--bg-tertiary);
  color: var(--cereda-primary);
}

.navbar-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: var(--cereda-primary);
  transition: transform 0.2s;
}

.navbar-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.role-badge {
  background: linear-gradient(135deg, var(--cereda-primary) 0%, var(--cereda-accent) 100%);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  margin-left: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

/* ============================================================================
   BUTTONS - GLASSMORPHISM
   ============================================================================ */
.btn {
  padding: 0.625rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* PRIMARY — Teal glass */
.btn-primary {
  background: rgba(63, 163, 163, 0.55);
  color: #e0fafa;
  border-color: rgba(63, 163, 163, 0.70);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
  background: rgba(63, 163, 163, 0.68);
  border-color: rgba(63, 163, 163, 0.85);
  box-shadow: 0 2px 12px rgba(63, 163, 163, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }

/* SUCCESS — Green glass */
.btn-success {
  background: rgba(16, 185, 129, 0.50);
  color: #d1fae5;
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-success:hover {
  background: rgba(16, 185, 129, 0.62);
  border-color: rgba(16, 185, 129, 0.80);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-success:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }

/* DANGER — Red glass */
.btn-danger {
  background: rgba(239, 68, 68, 0.50);
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.62);
  border-color: rgba(239, 68, 68, 0.80);
  box-shadow: 0 2px 12px rgba(239, 68, 68, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-danger:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }

/* SECONDARY — Dark glass */
.btn-secondary {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(63, 163, 163, 0.45);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn-secondary:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

/* ============================================================================
   FORMS - MODERN IT DESIGN
   ============================================================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  transition: var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(63, 163, 163, 0.60);
  background: rgba(63, 163, 163, 0.06);
  box-shadow: 0 0 0 3px rgba(63, 163, 163, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Dark dropdown options */
.form-select option {
  background-color: #1e293b;
  color: var(--text-primary);
}

.form-select option:hover,
.form-select option:checked {
  background-color: #334155;
}

.form-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ============================================================================
   CARDS - GLASSMORPHISM + 3D EFFECT
   ============================================================================ */
.card {
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.04) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-color: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Helle Oberkante — simuliert Licht von oben */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 5%,
    rgba(255, 255, 255, 0.65) 30%,
    rgba(255, 255, 255, 0.65) 70%,
    transparent 95%
  );
  pointer-events: none;
}

/* Linke Kante */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.50),
    rgba(255, 255, 255, 0.10),
    transparent
  );
  pointer-events: none;
}

.card:hover {
  border-color: rgba(63, 163, 163, 0.35);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.30),
    0 12px 28px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 0 0 1px rgba(63, 163, 163, 0.12);
}

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ============================================================================
   TABLES - MODERN IT DESIGN
   ============================================================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.table th,
.table td {
  padding: 1rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: linear-gradient(135deg, var(--cereda-primary) 0%, var(--cereda-accent) 100%);
  color: white;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.table tr:hover {
  background-color: var(--bg-tertiary);
}

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

.table-actions {
  display: flex;
  gap: 0.5rem;
}

/* ============================================================================
   STATUS BADGES - MODERN IT DESIGN
   ============================================================================ */
.status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-aktiv {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-aktiv::before {
  background-color: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.status-inaktiv {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-inaktiv::before {
  background-color: var(--danger);
}

/* Asset Status Badges */
.status-verfuegbar {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-verfuegbar::before {
  background-color: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.status-zugewiesen {
  background-color: rgba(63, 163, 163, 0.15);
  color: var(--cereda-primary);
  border: 1px solid rgba(63, 163, 163, 0.3);
}

.status-zugewiesen::before {
  background-color: var(--cereda-primary);
  box-shadow: 0 0 6px var(--cereda-primary);
}

.status-beschaedigt {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-beschaedigt::before {
  background-color: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

/* Workflow Status Badges (Onboarding/Offboarding) */
.status-pending {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pending::before {
  background-color: var(--warning);
  box-shadow: 0 0 6px var(--warning);
}

.status-in_progress {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-in_progress::before {
  background-color: var(--info);
  box-shadow: 0 0 6px var(--info);
}

.status-completed {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-completed::before {
  background-color: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.status-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-warning::before {
  background-color: var(--warning);
  box-shadow: 0 0 6px var(--warning);
}

/* ============================================================================
   CHECKLIST EDITOR - MODERN IT DESIGN
   ============================================================================ */
.checklist-editor {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.checklist-item:hover {
  border-color: var(--cereda-primary);
  background: var(--bg-tertiary);
}

.checklist-item:last-child {
  margin-bottom: 0;
}

.checklist-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.checklist-item.disabled:hover {
  border-color: var(--border-color);
  background: var(--bg-card);
}

.checklist-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  transition: var(--transition);
  cursor: pointer;
}

.checklist-checkbox.checked {
  background: linear-gradient(135deg, var(--cereda-primary) 0%, var(--cereda-accent) 100%);
  border-color: var(--cereda-primary);
}

.checklist-checkbox.checked::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.checklist-text {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  user-select: none;
}

.checklist-item.disabled .checklist-text {
  color: var(--text-muted);
}

/* ============================================================================
   LOGIN PAGE - MODERN IT DESIGN
   ============================================================================ */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(63, 163, 163, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 75%, rgba(59, 130, 246, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 55% 45%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
    linear-gradient(145deg, #050d1e 0%, #0b1628 40%, #0d1f2d 70%, #060f1c 100%);
  background-attachment: fixed;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(63, 163, 163, 0.06) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.login-card {
  background: linear-gradient(160deg, rgba(30, 45, 80, 0.75) 0%, rgba(12, 20, 42, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-top-color: rgba(63, 163, 163, 0.65);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.3),
    0 32px 64px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  overflow: hidden;
}

/* Teal top line */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 163, 163, 0.9), transparent);
  pointer-events: none;
}

/* Left edge */
.login-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 60%;
  background: linear-gradient(180deg, rgba(63, 163, 163, 0.35), transparent);
  pointer-events: none;
}

.login-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 1.5rem;
}

.login-title {
  color: var(--text-primary);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 400;
}

/* ============================================================================
   DASHBOARD - MODERN IT DESIGN
   ============================================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition-slow);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--cereda-primary) 0%, var(--cereda-accent) 100%);
}

.stat-card:hover {
  border-color: var(--cereda-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cereda-primary) 0%, var(--cereda-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Dashboard Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.dashboard-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-top: 0.5rem;
  font-weight: 400;
}

.dashboard-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Dashboard Welcome - Simple Design */
.dashboard-welcome {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.welcome-header {
  margin-bottom: 2rem;
  text-align: center;
}

.welcome-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.welcome-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.welcome-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.dashboard-info-box {
  background: linear-gradient(135deg, rgba(63, 163, 163, 0.1) 0%, rgba(0, 164, 166, 0.05) 100%);
  border: 1px solid rgba(63, 163, 163, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.info-box-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.info-box-content h3 {
  font-size: 1.1rem;
  color: var(--cereda-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.info-box-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Stats Section */
.stats-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--cereda-primary) 0%, var(--cereda-accent) 100%);
  border-radius: 2px;
}

/* Enhanced Stat Cards with Icons */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  font-size: 2.5rem;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
  background: var(--bg-tertiary);
}

.stat-content {
  flex: 1;
}

/* Stat Card Variants */
.stat-card-primary .stat-icon {
  background: rgba(63, 163, 163, 0.1);
  border: 1px solid rgba(63, 163, 163, 0.3);
}

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

.stat-card-success .stat-icon {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-card-success .stat-value {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-success:hover {
  border-color: #10b981;
}

.stat-card-danger .stat-icon {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.stat-card-danger .stat-value {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-danger:hover {
  border-color: #ef4444;
}

.stat-card-info .stat-icon {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-card-info .stat-value {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-info:hover {
  border-color: #3b82f6;
}

.stat-card-warning .stat-icon {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-card-warning .stat-value {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-warning:hover {
  border-color: #f59e0b;
}

/* Asset Types Grid */
.asset-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.asset-type-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.asset-type-card:hover {
  border-color: var(--cereda-primary);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.asset-type-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius-md);
}

.asset-type-info {
  flex: 1;
}

.asset-type-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--cereda-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.asset-type-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Quick Actions Grid */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.quick-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  text-decoration: none;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--cereda-primary) 0%, var(--cereda-accent) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.quick-action-card:hover::before {
  transform: scaleX(1);
}

.quick-action-card:hover {
  border-color: var(--cereda-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.quick-action-icon {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(63, 163, 163, 0.1) 0%, rgba(63, 163, 163, 0.05) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 163, 163, 0.2);
  transition: var(--transition);
}

.quick-action-card:hover .quick-action-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, rgba(63, 163, 163, 0.2) 0%, rgba(63, 163, 163, 0.1) 100%);
}

.quick-action-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.quick-action-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Activity Badges */
.user-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: rgba(63, 163, 163, 0.1);
  border: 1px solid rgba(63, 163, 163, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cereda-primary);
}

.action-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* ============================================================================
   SEARCH AND FILTER - MODERN IT DESIGN
   ============================================================================ */
.search-container {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--cereda-primary);
  background: var(--bg-tertiary);
  box-shadow: 0 0 0 3px rgba(63, 163, 163, 0.15);
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ============================================================================
   LOADING SPINNER - MODERN IT DESIGN
   ============================================================================ */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.spinner {
  border: 3px solid var(--bg-tertiary);
  border-top: 3px solid var(--cereda-primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 20px rgba(63, 163, 163, 0.2);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================================================
   MODAL - MODERN IT DESIGN
   ============================================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: linear-gradient(160deg, rgba(30, 45, 80, 0.80) 0%, rgba(15, 25, 50, 0.85) 100%);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top-color: rgba(63, 163, 163, 0.70);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.25),
    0 32px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(63, 163, 163, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Teal top-accent glow */
.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(63, 163, 163, 0.9),
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

/* Subtle left edge */
.modal-content::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 60%;
  background: linear-gradient(
    180deg,
    rgba(63, 163, 163, 0.3),
    transparent
  );
  pointer-events: none;
}

.modal-content.modal-large {
  max-width: 800px;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Stretch edge-to-edge despite modal-content padding */
  margin: -2rem -2rem 1.75rem -2rem;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(63, 163, 163, 0.05);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-body {
  padding: 0; /* padding comes from modal-content */
}

.modal-footer {
  /* Stretch edge-to-edge */
  margin: 1.75rem -2rem -2rem -2rem;
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  flex-shrink: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--text-secondary);
  transition: var(--transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  backdrop-filter: blur(8px);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.20);
  border-color: rgba(239, 68, 68, 0.40);
  color: #fca5a5;
}

/* ============================================================================
   PAGE HEADERS - MODERN IT DESIGN
   ============================================================================ */
.page-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--cereda-primary) 0%, var(--cereda-accent) 100%);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.items-center {
  align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

.text-primary {
  color: var(--cereda-primary);
}

/* ============================================================================
   RESPONSIVE - MODERN IT DESIGN
   ============================================================================ */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    gap: 1rem;
  }

  .navbar-menu {
    flex-direction: column;
    width: 100%;
  }

  .navbar-link {
    width: 100%;
    text-align: center;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .search-container {
    flex-direction: column;
  }

  .search-input {
    width: 100%;
  }

  .login-card {
    padding: 2rem 1.5rem;
  }

  .page-title {
    font-size: 1.5rem;
  }
}


/* ============================================================================
   DOCS PAGE - Markdown Rendering
   ============================================================================ */
.docs-content {
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
}

.docs-content h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--cereda-primary);
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--cereda-primary);
}

.docs-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 12px;
  padding-top: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.docs-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--cereda-primary-light);
  margin: 24px 0 8px;
}

.docs-content p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.docs-content ul, .docs-content ol {
  margin: 0 0 12px 20px;
  color: var(--text-secondary);
}

.docs-content li {
  margin-bottom: 4px;
}

.docs-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.docs-content code {
  background: var(--bg-tertiary);
  color: var(--cereda-primary-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.docs-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0 20px;
}

.docs-content pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: 14px;
}

.docs-content th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border-color);
}

.docs-content td {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.docs-content tr:nth-child(even) td {
  background: var(--bg-secondary);
}

.docs-content blockquote {
  border-left: 3px solid var(--cereda-primary);
  margin: 0 0 12px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
}

.docs-content hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 32px 0;
}

mark {
  background: var(--cereda-primary);
  color: #fff;
  padding: 1px 3px;
  border-radius: 3px;
}

/* ── Chat Markdown Rendering ── */
.md-content { line-height: 1.6; font-size: inherit; }
.md-content p { margin: 0 0 8px; }
.md-content p:last-child { margin-bottom: 0; }
.md-content strong { font-weight: 700; }
.md-content em { font-style: italic; }
.md-content ul, .md-content ol { margin: 6px 0 8px 20px; padding: 0; }
.md-content li { margin-bottom: 3px; }
.md-content h1, .md-content h2, .md-content h3 { margin: 10px 0 6px; font-weight: 700; line-height: 1.3; }
.md-content h1 { font-size: 1.1rem; }
.md-content h2 { font-size: 1rem; }
.md-content h3 { font-size: 0.9rem; }
.md-content code { background: rgba(0,0,0,0.15); padding: 1px 5px; border-radius: 4px; font-family: monospace; font-size: 0.85em; }
.md-content pre { background: rgba(0,0,0,0.2); padding: 10px 14px; border-radius: 6px; overflow-x: auto; margin: 8px 0; }
.md-content pre code { background: none; padding: 0; }
.md-content hr { border: none; border-top: 1px solid rgba(255,255,255,0.2); margin: 10px 0; }

/* ============================================================================
   CUSTOM SCROLLBARS
   ============================================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
::-webkit-scrollbar-corner { background: transparent; }
