* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; margin: 0 !important; padding: 0 !important; }
:root {
  --sidebar-width: 240px;
  --sidebar-bg: #1a1b2e;
  --sidebar-text: #a0a3b5;
  --sidebar-active: #6366f1;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #0f1117;
  --white: #1a1b26;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #1e2030;
  --radius: 8px;
}

body.dark {
  --bg: #0f1117;
  --white: #1a1b26;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #2d2f3e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
  margin: 0;
  padding: 0;
}

/* ===== AUTH PAGES ===== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h1 { font-size: 24px; margin-bottom: 4px; }
.auth-header p { color: var(--text-muted); font-size: 14px; }

.auth-form { margin-top: 24px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--primary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ===== FLASH MESSAGES ===== */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
}
.flash-success { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.flash-error { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }

/* ===== ADMIN LAYOUT ===== */
.admin-layout {
  display: flex;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header h2 {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.sidebar-subtitle {
  font-size: 12px;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.sidebar-nav a.active {
  background: rgba(99,102,241,0.15);
  color: #fff;
  border-left-color: var(--sidebar-active);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-info {
  margin-bottom: 12px;
}
.user-name {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.user-role {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sidebar-text);
}
.btn-logout {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  width: 100%;
  transition: background 0.15s;
}
.btn-logout:hover { background: rgba(255,255,255,0.18); }

.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px 40px;
  max-width: none;
  margin-top: 0;
}

.admin-header {
  margin-top: 0 !important;
  margin-bottom: 28px;
}
.admin-header h1 {
  font-size: 24px;
  font-weight: 700;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid var(--border);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.card-header-row h2 {
  font-size: 18px;
  font-weight: 600;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid var(--border);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { color: #fff; }
.stat-pages { background: #6366f1; }
.stat-components { background: #8b5cf6; }
.stat-operational { background: #10b981; }
.stat-incidents { background: #ef4444; }
.stat-total-incidents { background: #f59e0b; }
.stat-users { background: #0ea5e9; }
.stat-info { min-width: 0; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-muted); }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.dashboard-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid var(--border);
}
.dashboard-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.page-status-list, .incident-list { display: flex; flex-direction: column; gap: 10px; }
.page-status-item, .incident-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.page-status-item:last-child, .incident-item:last-child { border-bottom: none; }
.page-status-name { font-weight: 500; }
.page-status-badge {
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}
.incident-name { font-weight: 500; font-size: 14px; }
.incident-meta { font-size: 12px; color: var(--text-muted); }
.incident-status {
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

/* ===== TABLES ===== */
.table-container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: #161722;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .empty-cell {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}
.admin-table .actions {
  white-space: nowrap;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ===== BADGES ===== */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}
.status-operational { background: rgba(16,185,129,0.15); color: #34d399; }
.status-under_maintenance { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-degraded_performance { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-partial_outage { background: rgba(249,115,22,0.15); color: #fb923c; }
.status-major_outage { background: rgba(239,68,68,0.15); color: #f87171; }
.status-investigating { background: rgba(239,68,68,0.15); color: #f87171; }
.status-identified { background: rgba(249,115,22,0.15); color: #fb923c; }
.status-monitoring { background: rgba(245,158,11,0.15); color: #fbbf24; }
.status-resolved { background: rgba(16,185,129,0.15); color: #34d399; }

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}
.role-admin { background: rgba(139,92,246,0.15); color: #a78bfa; }
.role-user { background: rgba(56,189,248,0.15); color: #38bdf8; }

.yes { color: var(--success); font-weight: 600; }
.no { color: var(--danger); font-weight: 600; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.empty-state { color: var(--text-muted); text-align: center; padding: 20px; }

code {
  background: #161722;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.btn:hover { background: rgba(255,255,255,0.05); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-danger { color: #f87171; border-color: #7f1d1d; }
.btn-danger:hover { background: #7f1d1d; }
.btn-full { width: 100%; justify-content: center; padding: 10px; }

/* ===== FORMS ===== */
.admin-form { margin-top: 8px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
  background: var(--white);
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.code-textarea {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
  font-size: 14px;
}
.checkbox-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.delete-form { display: inline; }

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease-out;
  max-width: 360px;
}
.toast-success { background: #10b981; color: #fff; }
.toast-error { background: #ef4444; color: #fff; }
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
    overflow: hidden;
  }
  .sidebar-header, .sidebar-nav span, .sidebar-subtitle, .sidebar-footer { display: none; }
  .sidebar-nav a {
    justify-content: center;
    padding: 12px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .sidebar-nav a.active { border-bottom-color: var(--sidebar-active); }
  .admin-main { margin-left: 60px; padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== API DOCS ===== */
.doc-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.doc-tab-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  font-family: inherit;
}
.doc-tab-btn:hover { background: rgba(139,92,246,0.1); color: #e2e8f0; }
.doc-tab-btn.active { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.doc-tab-content { display: none !important; }
.doc-tab-content.active { display: block !important; }
.doc-section-title { font-size: 20px; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.doc-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 14px;
}
.doc-method {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  min-width: 55px;
  text-align: center;
}
.method-get { background: rgba(59,130,246,0.15); color: #60a5fa; }
.method-post { background: rgba(16,185,129,0.15); color: #34d399; }
.method-put { background: rgba(245,158,11,0.15); color: #fbbf24; }
.method-delete { background: rgba(239,68,68,0.15); color: #f87171; }
.doc-path { color: #cbd5e1; }
.doc-desc { font-size: 13px; color: #94a3b8 !important; margin-bottom: 10px; margin-top: 2px; }
.doc-desc code { background: rgba(139,92,246,0.2); color: #c4b5fd !important; padding: 1px 5px; border-radius: 3px; font-size: 12px; }
.doc-params-label { font-size: 13px; font-weight: 600; color: #e2e8f0 !important; margin: 12px 0 6px; }
.doc-code-block {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
  margin-bottom: 16px;
}
.doc-code-block code {
  display: block;
  white-space: pre;
  color: #e2e8f0 !important;
}
.doc-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.doc-copy-btn:hover { background: rgba(255,255,255,0.2); }
.doc-auth-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
  margin-left: 8px;
}
.doc-perm-badge { font-size: 11px; font-weight: 600; }
.perm-write { color: #34d399; }
.perm-admin { color: #f87171; }
.doc-key-selector {
  background: #1e293b;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}
.doc-key-selector label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 8px;
}
.doc-key-selector select,
.doc-key-selector input[type="text"] {
  width: 100%;
  max-width: 500px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  margin-bottom: 8px;
}
.doc-key-hint { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.doc-h1 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; color: #e2e8f0; }
.doc-h2 { font-size: 14px; font-weight: 700; margin: 16px 0 6px; color: #e2e8f0; }

/* ===== VISIT BUTTON ===== */
.btn-visit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  margin-left: 6px;
  text-decoration: none;
  color: var(--primary);
  background: rgba(99,102,241,0.08);
  border-radius: 4px;
  transition: all 0.15s ease;
  vertical-align: middle;
}
.btn-visit:hover {
  background: rgba(99,102,241,0.18);
  color: var(--primary-hover);
}

/* ===== TEMPLATE SELECTOR ===== */
.template-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.template-option {
  display: block;
  cursor: pointer;
  position: relative;
}

.template-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.template-option .template-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
}

.template-option input[type="radio"]:checked + .template-card,
.template-option.selected .template-card {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.template-card-header {
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.template-card-preview {
  padding: 0;
  min-height: 0;
  background: var(--white);
  overflow: hidden;
}

.template-card-preview svg {
  width: 100%;
  height: auto;
  max-height: 180px;
  display: block;
}

/* Default template preview */
/* SVG-based - no extra CSS needed */

/* ===== TEMPLATE BADGE ===== */
.template-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
}

.template-badge.template-default {
  background: rgba(148,163,184,0.15);
  color: #94a3b8;
}

.template-badge.template-grid {
  background: rgba(139,92,246,0.15);
  color: #a78bfa;
}

.template-badge.template-dark {
  background: rgba(30,41,59,0.8);
  color: #e2e8f0;
}

/* ===== DARK MODE ===== */
body.dark .auth-card,
body.dark .card,
body.dark .table-container,
body.dark .doc-code-block,
body.dark .template-card-preview {
  background: var(--white);
}

body.dark .admin-table {
  background: var(--white);
}

body.dark .admin-table th {
  background: #161722;
  color: #e2e8f0;
}

body.dark .admin-table td {
  border-color: var(--border);
}

body.dark .admin-table tbody tr:hover {
  background: rgba(99,102,241,0.05);
}

body.dark .btn {
  background: #2d2f3e;
  color: var(--text);
  border-color: var(--border);
}

body.dark .btn:hover {
  background: #3d3f4e;
}

body.dark .btn-visit {
  background: rgba(99,102,241,0.15);
}

body.dark input[type="text"],
body.dark input[type="email"],
body.dark input[type="password"],
body.dark textarea,
body.dark select {
  background: #161722;
  color: var(--text);
  border-color: var(--border);
}

body.dark input[type="text"]:focus,
body.dark input[type="email"]:focus,
body.dark input[type="password"]:focus,
body.dark textarea:focus,
body.dark select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.2);
}

body.dark .card-header-row h2,
body.dark .card h3,
body.dark h1,
body.dark h2,
body.dark h3,
body.dark label,
body.dark .template-card-name {
  color: var(--text);
}

body.dark .status-badge {
  color: var(--text);
}

body.dark .flash-success {
  background: rgba(16,185,129,0.15);
  color: #6ee7b7;
  border-color: rgba(16,185,129,0.3);
}

body.dark .flash-error {
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border-color: rgba(239,68,68,0.3);
}

body.dark .template-card-preview {
  background: #161722;
}

body.dark .doc-tab-content {
  background: var(--bg);
}

body.dark .doc-code-block {
  background: #161722;
  border-color: var(--border);
}

body.dark code {
  background: #161722;
  color: #e2e8f0;
}

body.dark .template-option .template-card {
  background: #161722;
}

body.dark .template-card-header {
  background: #161722;
}

body.dark .template-badge.template-default {
  background: #2d2f3e;
  color: #94a3b8;
}

body.dark .template-badge.template-grid {
  background: rgba(109,40,217,0.2);
  color: #a78bfa;
}

body.dark .template-badge.template-dark {
  background: #2d2f3e;
  color: #e2e8f0;
}

body.dark .sidebar-header h2 {
  color: #e2e8f0;
}

body.dark .user-name {
  color: #e2e8f0;
}

body.dark .yes {
  color: #6ee7b7;
}

body.dark .no {
  color: #fca5a5;
}

body.dark select option {
  background: #1a1b26;
  color: #e2e8f0;
}

/* ===== NOTIFICATIONS ===== */
.unread { background: rgba(99,102,241,0.05); }
.notif-badge { background: #ef4444; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 10px; margin-left: 8px; }
.notif-type { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.notif-status_change { background: rgba(16,185,129,0.15); color: #34d399; }
.notif-incident_created, .notif-incident_updated { background: rgba(239,68,68,0.15); color: #f87171; }
.notif-component_created, .notif-component_updated { background: rgba(99,102,241,0.15); color: #818cf8; }
.notif-component_deleted { background: rgba(239,68,68,0.15); color: #f87171; }
.notif-page_created, .notif-page_updated { background: rgba(14,165,233,0.15); color: #38bdf8; }
.notif-page_deleted { background: rgba(239,68,68,0.15); color: #f87171; }
.notif-maintenance_created, .notif-maintenance_updated { background: rgba(245,158,11,0.15); color: #fbbf24; }
.notif-maintenance_deleted { background: rgba(239,68,68,0.15); color: #f87171; }
.sidebar-nav .notif-badge { position: absolute; right: 16px; }
.sidebar-nav a { position: relative; }

/* ===== SUBMENU ===== */
.sidebar-parent {
  justify-content: space-between;
}
.sidebar-parent .submenu-arrow {
  margin-left: auto;
  transition: transform 0.2s ease;
  opacity: 0.5;
}
.sidebar-parent.open .submenu-arrow {
  transform: rotate(90deg);
  opacity: 1;
}
.sidebar-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: rgba(0,0,0,0.15);
}
.sidebar-submenu.open {
  max-height: 300px;
}
.sidebar-submenu a {
  padding: 8px 20px 8px 52px;
  font-size: 13px;
  border-left: none;
  color: rgba(160,163,181,0.7);
}
.sidebar-submenu a:hover {
  background: rgba(255,255,255,0.03);
  color: #fff;
}
.sidebar-submenu a.active {
  background: rgba(99,102,241,0.1);
  color: #fff;
  border-left-color: transparent;
}

/* ===== RESPONSIVE SUBMENU ===== */
@media (max-width: 768px) {
  .sidebar-submenu a {
    padding-left: 52px;
  }
}
