/* ============================================================
   PredictDocs Enterprise Platform — Design System
   ============================================================ */

/* ── Design Tokens ── */
:root {
  /* Brand */
  --brand-primary:       #0ea5e9;
  --brand-primary-dark:  #0284c7;
  --brand-primary-light: #e0f2fe;
  --brand-accent:        #6366f1;

  /* Sidebar */
  --sidebar-bg:          #0f172a;
  --sidebar-border:      rgba(255,255,255,0.06);
  --sidebar-text:        #94a3b8;
  --sidebar-text-hover:  #e2e8f0;
  --sidebar-text-active: #ffffff;
  --sidebar-item-hover:  rgba(255,255,255,0.06);
  --sidebar-item-active: rgba(14,165,233,0.18);
  --sidebar-width:       248px;
  --sidebar-collapsed:   60px;
  --sidebar-section-label: #475569;

  /* Header */
  --header-height:       56px;
  --header-bg:           #ffffff;
  --header-border:       #e2e8f0;
  --header-text:         #0f172a;

  /* Content */
  --content-bg:          #f1f5f9;
  --card-bg:             #ffffff;
  --card-border:         #e2e8f0;
  --card-radius:         8px;
  --card-shadow:         0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover:   0 4px 12px rgba(0,0,0,0.08);

  /* Typography */
  --text-primary:        #0f172a;
  --text-secondary:      #475569;
  --text-muted:          #94a3b8;
  --font-sans:           -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:           "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* Status colors */
  --status-success:      #16a34a;
  --status-success-bg:   #f0fdf4;
  --status-success-border:#bbf7d0;
  --status-warning:      #d97706;
  --status-warning-bg:   #fffbeb;
  --status-warning-border:#fed7aa;
  --status-error:        #dc2626;
  --status-error-bg:     #fef2f2;
  --status-error-border: #fecaca;
  --status-info:         #0ea5e9;
  --status-info-bg:      #f0f9ff;
  --status-info-border:  #bae6fd;
  --status-neutral:      #64748b;
  --status-neutral-bg:   #f8fafc;
  --status-neutral-border:#e2e8f0;

  /* Spacing */
  --content-padding:     24px;
  --footer-height:       44px;
}

/* ── Dark theme (opt-in via data-theme="dark") ── */
[data-theme="dark"] {
  --sidebar-bg:          #0a0e1a;
  --header-bg:           #1e293b;
  --header-border:       #334155;
  --header-text:         #f1f5f9;
  --content-bg:          #0f172a;
  --card-bg:             #1e293b;
  --card-border:         #334155;
  --text-primary:        #f1f5f9;
  --text-secondary:      #94a3b8;
  --text-muted:          #64748b;
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--content-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: width 0.2s ease;
  overflow: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  min-height: var(--header-height);
  text-decoration: none;
  color: var(--sidebar-text-active);
  white-space: nowrap;
}

.sidebar-brand-icon {
  width: 28px;
  height: 28px;
  background: var(--brand-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: white;
}

.sidebar-brand-logo-full {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.15s ease, max-width 0.2s ease;
}

.sidebar-brand-logo-icon {
  height: 32px;
  width: 0;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.15s ease, width 0.2s ease;
}

.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 16px 0; }
.sidebar.collapsed .sidebar-brand-logo-full { opacity: 0; max-width: 0; }
.sidebar.collapsed .sidebar-brand-logo-icon { opacity: 1; width: 32px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-section {
  margin-top: 4px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-section-label);
  padding: 10px 16px 4px;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.15s;
}

.sidebar.collapsed .sidebar-section-label { opacity: 0; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 450;
  border-radius: 0;
  transition: background 0.1s, color 0.1s;
  white-space: nowrap;
  position: relative;
}

.sidebar-item:hover {
  background: var(--sidebar-item-hover);
  color: var(--sidebar-text-hover);
}

.sidebar-item.active {
  background: var(--sidebar-item-active);
  color: var(--sidebar-text-active);
  font-weight: 500;
}

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

.sidebar-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.sidebar-item-text {
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.15s;
}

.sidebar.collapsed .sidebar-item-text { opacity: 0; width: 0; }

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

/* ── Main area ── */
.main-area {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.2s ease;
}

.sidebar.collapsed ~ .main-area {
  margin-left: var(--sidebar-collapsed);
}

/* ── Header ── */
.app-header {
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-toggle {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 6px;
  display: flex;
  align-items: center;
}

.header-toggle:hover { background: var(--content-bg); }

.header-breadcrumb {
  flex: 1;
  min-width: 0;
}

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

.header-icon-btn {
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  font-size: 16px;
}

.header-icon-btn:hover {
  background: var(--content-bg);
  color: var(--text-primary);
}

#notif-badge-wrap {
  position: absolute;
  top: 3px;
  right: 3px;
  line-height: 1;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  background: var(--status-error);
  border-radius: 8px;
  border: 1.5px solid var(--header-bg);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 0 3px;
  line-height: 1;
  pointer-events: none;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}

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

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Page Content ── */
.page-content {
  flex: 1;
  padding: var(--content-padding);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Breadcrumbs ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--text-muted);
  margin: 0 6px;
}

.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-item a:hover { color: var(--brand-primary); }

.breadcrumb-item.active { color: var(--text-primary); font-weight: 500; }

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

.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body { padding: 18px; }

.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--card-border);
  background: #fafafa;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}

/* ── Stat Cards ── */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-change {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-change.up   { color: var(--status-success); }
.stat-change.down { color: var(--status-error); }
.stat-change.neutral { color: var(--text-muted); }

.stat-icon {
  float: right;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-top: -4px;
}

/* ── Status Badges ── */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success  { background: var(--status-success-bg);  color: var(--status-success);  border: 1px solid var(--status-success-border); }
.badge-warning  { background: var(--status-warning-bg);  color: var(--status-warning);  border: 1px solid var(--status-warning-border); }
.badge-danger   { background: var(--status-error-bg);    color: var(--status-error);    border: 1px solid var(--status-error-border); }
.badge-info     { background: var(--status-info-bg);     color: var(--status-info);     border: 1px solid var(--status-info-border); }
.badge-secondary{ background: var(--status-neutral-bg);  color: var(--status-neutral);  border: 1px solid var(--status-neutral-border); }

/* ── Tables ── */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border);
  gap: 12px;
  flex-wrap: wrap;
}

.table-toolbar-left, .table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.data-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }

.data-table td {
  padding: 10px 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table .text-muted { color: var(--text-muted); }

.table-overflow { overflow-x: auto; }

/* ── Pagination ── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--card-border);
  background: #fafafa;
  font-size: 13px;
  color: var(--text-secondary);
  gap: 12px;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 2px;
}

.page-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  background: white;
  transition: all 0.1s;
}

.page-link-btn:hover:not(.disabled):not(.active) {
  background: var(--content-bg);
  color: var(--text-primary);
}

.page-link-btn.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  font-weight: 600;
}

.page-link-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── Forms ── */
.form-section {
  margin-bottom: 24px;
}

.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--card-border);
}

.form-control, .form-select {
  font-size: 13.5px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Buttons ── */
.btn {
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sm {
  font-size: 12px;
  padding: 4px 10px;
}

.btn-primary {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
  color: white;
}

.btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--card-border);
}

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

/* ── Alerts / Toasts ── */
.alert { font-size: 13.5px; border-radius: 6px; }

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--brand-primary);
  border-radius: 6px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 280px;
  max-width: 400px;
  font-size: 13.5px;
  animation: slideInRight 0.2s ease;
}

.toast-item.success { border-left-color: var(--status-success); }
.toast-item.error   { border-left-color: var(--status-error); }
.toast-item.warning { border-left-color: var(--status-warning); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ── Loading indicator ── */
.htmx-request .htmx-indicator { display: inline-block; }
.htmx-indicator { display: none; }

.global-loading {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-primary);
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.htmx-request .global-loading { transform: scaleX(0.7); }

/* ── Footer ── */
.app-footer {
  height: var(--footer-height);
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-padding);
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: white;
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.login-brand-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-brand-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-primary);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.login-brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.login-brand-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ── Coming soon ── */
.coming-soon-card {
  background: var(--card-bg);
  border: 2px dashed var(--card-border);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-area { margin-left: 0 !important; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 640px) {
  :root { --content-padding: 14px; }
  .page-header { flex-direction: column; }
  .table-toolbar { flex-direction: column; align-items: stretch; }
  .stat-grid { grid-template-columns: 1fr !important; }
}

/* ── Utility ── */
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-mono { font-family: var(--font-mono); }
.fw-600 { font-weight: 600; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.action-btn {
  background: none;
  border: none;
  padding: 3px 6px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.action-btn:hover { background: var(--content-bg); color: var(--text-primary); }

/* ── Detail panels ── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.detail-item { }
.detail-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 3px; }
.detail-value { font-size: 14px; color: var(--text-primary); font-weight: 500; }

/* ── Nav toggle (sidebar collapse) ── */
#sidebar-toggle { cursor: pointer; }

/* ── Notification Dropdown ── */
.notif-dropdown {
  width: 380px;
  max-height: 500px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  flex-direction: column;
}

.notif-dropdown.show {
  display: flex !important;
}

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

.notif-dropdown-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.notif-dropdown-action {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--brand-primary);
  cursor: pointer;
}

.notif-dropdown-action:hover { text-decoration: underline; }

.notif-dropdown-list {
  flex: 1;
  overflow-y: auto;
  background: var(--card-bg);
}

.notif-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--card-border);
  cursor: pointer;
  transition: background 0.12s;
}

.notif-dropdown-item:last-child { border-bottom: none; }
.notif-dropdown-item:hover { background: var(--content-bg); }
.notif-dropdown-item.unread { background: var(--status-info-bg); }
.notif-dropdown-item.unread:hover { filter: brightness(0.97); }

.notif-dropdown-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.notif-dropdown-empty i {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
  opacity: 0.4;
}

.notif-dropdown-footer {
  padding: 10px 16px;
  text-align: center;
  border-top: 1px solid var(--card-border);
  background: var(--card-bg);
  flex-shrink: 0;
}

.notif-dropdown-footer a {
  font-size: 12px;
  color: var(--brand-primary);
  text-decoration: none;
}

.notif-dropdown-footer a:hover { text-decoration: underline; }

/* ── Notification shared elements ── */
.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.notif-icon.error   { background: var(--status-error-bg);   color: var(--status-error); }
.notif-icon.warning { background: var(--status-warning-bg); color: var(--status-warning); }
.notif-icon.success { background: var(--status-success-bg); color: var(--status-success); }
.notif-icon.info    { background: var(--status-info-bg);    color: var(--status-info); }

.notif-body { flex: 1; min-width: 0; }

.notif-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  background: var(--brand-primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── Notification full-page rows ── */
.notif-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--card-border);
  transition: background 0.12s;
}

.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--content-bg); }
.notif-row.unread { background: var(--status-info-bg); }
.notif-row.unread:hover { filter: brightness(0.97); }

.notif-message {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}
