/* ===========================
   Design Tokens
=========================== */
:root {
  --primary:        #2563eb;
  --primary-hover:  #1d4ed8;
  --primary-muted:  #eff6ff;

  --sidebar-bg:     #0f172a;
  --sidebar-hover:  #1e293b;
  --sidebar-active: #172554;
  --sidebar-accent: #3b82f6;
  --sidebar-text:   #94a3b8;
  --sidebar-text-h: #e2e8f0;
  --sidebar-text-a: #ffffff;
  --sidebar-border: rgba(255,255,255,0.06);

  --body-bg:   #f1f5f9;
  --surface:   #ffffff;
  --surface-2: #f8fafc;

  --text-1:   #0f172a;
  --text-2:   #334155;
  --text-3:   #64748b;
  --text-muted: #94a3b8;

  --border:    #e2e8f0;
  --border-2:  #f1f5f9;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-dropdown: 0 8px 24px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.08);

  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --ease: 150ms ease;
  --ease-out: 200ms cubic-bezier(0.16,1,0.3,1);
}

/* ===========================
   Reset & Base
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-1);
  background: var(--body-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }

/* ===========================
   Layout
=========================== */
.layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  background-image: linear-gradient(180deg, #0d1b2e 0%, #0f172a 60%, #080f1a 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--sidebar-border);
}
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--body-bg);
}

/* ===========================
   Sidebar
=========================== */
.sidebar-brand {
  padding: 20px 22px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 3px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sidebar-brand span { color: var(--sidebar-accent); }
.sidebar-brand-sub {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--sidebar-text);
  margin-left: auto;
  text-transform: uppercase;
}

.sidebar-nav { padding: 8px 0; flex: 1; }
.nav-section {
  padding: 18px 20px 5px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #475569;
  font-weight: 700;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--ease);
  border-left: 3px solid transparent;
  margin: 1px 0;
}
.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-h);
  border-left-color: rgba(59,130,246,0.4);
}
.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-a);
  border-left-color: var(--sidebar-accent);
}
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--ease);
}
.sidebar-nav a:hover .nav-dot,
.sidebar-nav a.active .nav-dot { opacity: 1; }

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-radius: var(--radius);
}
.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-email {
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-role { color: #64748b; font-size: 11px; margin-top: 1px; }

/* ===========================
   Header
=========================== */
.header {
  background: var(--surface);
  padding: 0 28px;
  height: 60px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}
.header-left { display: flex; flex-direction: column; gap: 1px; }
.header h1 { font-size: 17px; font-weight: 600; color: var(--text-1); line-height: 1.2; }
.breadcrumb { font-size: 12px; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }

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

/* ===========================
   Profile Dropdown
=========================== */
.profile-dropdown { position: relative; }

.profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--ease);
  color: var(--text-1);
}
.profile-btn:hover { background: var(--surface-2); border-color: #cbd5e1; }
.profile-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

.profile-avatar-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-label { display: flex; flex-direction: column; align-items: flex-start; }
.profile-label-name { font-size: 13px; font-weight: 500; color: var(--text-1); line-height: 1.2; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-label-role { font-size: 11px; color: var(--text-muted); line-height: 1.2; }
.profile-caret {
  color: var(--text-muted);
  transition: transform var(--ease);
  flex-shrink: 0;
}
.profile-dropdown.open .profile-caret { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
  padding: 6px;
  z-index: 200;
  transform: translateY(-6px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--ease-out), opacity var(--ease-out), visibility var(--ease-out);
  transform-origin: top right;
}
.profile-dropdown.open .dropdown-menu {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

.dropdown-header {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border-2);
  margin-bottom: 4px;
}
.dropdown-header-email {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-header-role {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  text-align: left;
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text-1); }
.dropdown-item-danger { color: #ef4444; }
.dropdown-item-danger:hover { background: #fef2f2; color: #dc2626; }

.dropdown-divider {
  height: 1px;
  background: var(--border-2);
  margin: 4px 0;
}

/* ===========================
   Cards
=========================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}
.card-header h2 { font-size: 14px; font-weight: 600; color: var(--text-1); }
.card-body { padding: 20px; }

/* ===========================
   Tables
=========================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--surface-2);
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
  color: var(--text-2);
  vertical-align: middle;
}
tbody tr { transition: background var(--ease); }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
.table-actions { display: flex; gap: 6px; }

/* ===========================
   Buttons
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--ease);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn:focus { outline: none; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,0.2); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 2px 8px rgba(37,99,235,0.3); transform: translateY(-1px); }
.btn-primary:focus { box-shadow: 0 0 0 3px rgba(37,99,235,0.25); }

.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

.btn-secondary { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f1f5f9; color: var(--text-1); }

.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; transform: translateY(-1px); }

.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-outline:hover { background: var(--surface-2); border-color: #cbd5e1; color: var(--text-1); }

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 4px; }
.btn-lg { padding: 12px 24px; font-size: 14px; border-radius: var(--radius); }
.w-100 { width: 100%; }

/* ===========================
   Forms
=========================== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.form-label .required { color: #ef4444; margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-1);
  background: var(--surface);
  transition: border-color var(--ease), box-shadow var(--ease);
  font-family: inherit;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-control.is-invalid { border-color: #ef4444; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-error { color: #ef4444; font-size: 12px; margin-top: 4px; display: block; }
.form-hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-2); }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.form-check input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }
.form-check label { cursor: pointer; font-size: 13px; color: var(--text-2); }

/* ===========================
   Badges
=========================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.badge-active, .badge-success  { background: #dcfce7; color: #166534; }
.badge-revoked, .badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-expired, .badge-warning { background: #ffedd5; color: #9a3412; }
.badge-changed, .badge-info    { background: #dbeafe; color: #1e40af; }
.badge-secondary               { background: #f1f5f9; color: #475569; }
.badge-dark                    { background: #1e293b; color: #e2e8f0; }

/* Audit action badges */
.badge-login, .badge-create, .badge-verify_success { background: #dcfce7; color: #166534; }
.badge-logout, .badge-view   { background: #f1f5f9; color: #475569; }
.badge-update, .badge-verify_request, .badge-pdf_export { background: #dbeafe; color: #1e40af; }
.badge-delete, .badge-verify_fail, .badge-error { background: #fee2e2; color: #991b1b; }
.badge-otp_send              { background: #f3e8ff; color: #6b21a8; }

/* Error level badges */
.badge-level-warning  { background: #ffedd5; color: #9a3412; }
.badge-level-error    { background: #fee2e2; color: #991b1b; }
.badge-level-critical { background: #450a0a; color: #fca5a5; }

/* ===========================
   Alerts
=========================== */
.messages { margin-bottom: 4px; }
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
}
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-error, .alert-danger { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.alert-close {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 16px;
  color: inherit;
  opacity: 0.5;
  padding: 0 2px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: -1px;
}
.alert-close:hover { opacity: 1; }

/* ===========================
   Login Page
=========================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  background: #f1f5f9;
}
.login-panel-left {
  width: 42%;
  min-height: 100vh;
  background: linear-gradient(145deg, #0d1b2e 0%, #0f2044 40%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.login-panel-left::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.login-panel-left::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.login-brand-area { position: relative; z-index: 1; }
.login-logo {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.login-logo span { color: #3b82f6; }
.login-tagline {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 400;
  letter-spacing: 0.5px;
}
.login-features { position: relative; z-index: 1; margin-top: auto; padding-top: 40px; }
.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}
.login-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.login-feature-text strong { display: block; font-size: 13px; font-weight: 600; color: #e2e8f0; }
.login-feature-text span { font-size: 12px; color: #64748b; }
.login-left-footer {
  position: relative;
  z-index: 1;
  font-size: 11px;
  color: #334155;
}

.login-panel-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--surface);
}
.login-form-wrap { width: 100%; max-width: 400px; }
.login-form-title { font-size: 24px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.login-form-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 32px; }
.login-form-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* Password toggle */
.input-wrap { position: relative; }
.input-wrap .form-control { padding-right: 40px; }
.input-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 4px;
  font-size: 12px;
  transition: color var(--ease);
  line-height: 1;
}
.input-toggle-btn:hover { color: var(--text-2); }

/* ===========================
   Logout Page
=========================== */
.logout-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.logout-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.logout-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}
.logout-title { font-size: 22px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.logout-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }
.logout-brand { font-size: 12px; color: var(--text-muted); margin-top: 24px; }
.logout-brand strong { font-size: 16px; font-weight: 800; color: var(--text-3); letter-spacing: 2px; }
.logout-brand strong span { color: #3b82f6; }

/* ===========================
   Stats Grid
=========================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  transition: box-shadow var(--ease), transform var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card.green  { border-top-color: #10b981; }
.stat-card.red    { border-top-color: #ef4444; }
.stat-card.yellow { border-top-color: #f59e0b; }
.stat-card.purple { border-top-color: #8b5cf6; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--text-1); line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }

/* ===========================
   Empty State
=========================== */
.empty-state { text-align: center; padding: 56px 24px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; margin-top: 6px; color: var(--text-3); }

/* ===========================
   Danger Box / Delete Confirm
=========================== */
.danger-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.danger-box strong { color: #991b1b; }

/* ===========================
   Detail Grid / Rows
=========================== */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-row {
  display: flex;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-2);
  align-items: flex-start;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  width: 160px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-top: 2px;
}
.detail-value { font-size: 13px; color: var(--text-1); word-break: break-word; }

/* Detail List (dl/dt/dd) */
.detail-list { display: grid; grid-template-columns: 160px 1fr; }
.detail-list dt { padding: 10px 0; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-2); }
.detail-list dd { padding: 10px 0; font-size: 13px; color: var(--text-1); border-bottom: 1px solid var(--border-2); word-break: break-word; }
.detail-list dt:last-of-type,
.detail-list dd:last-of-type { border-bottom: none; }

/* ===========================
   Filter Bar
=========================== */
.filter-form { width: 100%; }
.filter-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.filter-group label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.filter-group select,
.filter-group input { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-1); background: var(--surface); font-family: inherit; }
.filter-group select:focus,
.filter-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.filter-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.filter-actions { display: flex; gap: 6px; }

/* ===========================
   Avatar
=========================== */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #6366f1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ===========================
   Pagination
=========================== */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border-2);
}
.page-link {
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--ease);
  text-decoration: none;
}
.page-link:hover { background: var(--surface-2); border-color: #cbd5e1; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===========================
   Code Blocks
=========================== */
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.code-block-traceback { max-height: 480px; overflow-y: auto; }

/* ===========================
   Utilities
=========================== */
.text-muted   { color: var(--text-muted) !important; }
.text-danger  { color: #ef4444 !important; }
.text-success { color: #10b981 !important; }
.text-center  { text-align: center; }
.text-mono    { font-family: 'SFMono-Regular', Consolas, monospace; }
.text-sm      { font-size: 12px; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.flex-1       { flex: 1; }
.w-100        { width: 100%; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.img-logo { max-width: 80px; max-height: 80px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--border); }
