/* Global Interpreting Services - Onboarding Platform */
/* Professional Admin Design System */

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

:root {
  /* Brand Colors */
  --brand-blue: #115198;
  --brand-blue-light: #116ACA;
  --brand-blue-dark: #0d3f78;
  --brand-yellow: #FFDE26;
  --brand-black: #000000;
  --brand-gray: #EDEDED;

  /* Neutral Palette */
  --neutral-50: #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  /* Semantic */
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --error: #dc2626;
  --error-light: #fee2e2;
  --info: #0369a1;
  --info-light: #e0f2fe;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Layout */
  --sidebar-width: 240px;
  --header-height: 60px;
  --content-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--neutral-800);
  background: var(--neutral-50);
  -webkit-font-smoothing: antialiased;
}

/* ── Admin Shell (sidebar + content) ────────────────────────────────────── */

.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--brand-blue);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform 0.25s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255 255 255 / 0.12);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.sidebar-logo-text {
  font-size: 13px;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  opacity: 0.9;
}

.sidebar-user {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255 255 255 / 0.12);
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.sidebar-user-role {
  font-size: 11px;
  color: rgba(255 255 255 / 0.65);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255 255 255 / 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: rgba(255 255 255 / 0.8);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  background: rgba(255 255 255 / 0.08);
  color: white;
}

.sidebar-link.active {
  background: rgba(255 255 255 / 0.12);
  color: white;
  border-left-color: var(--brand-yellow);
  font-weight: 600;
}

.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.sidebar-link.active svg {
  opacity: 1;
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255 255 255 / 0.12);
  flex-shrink: 0;
}

.sidebar-footer .btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255 255 255 / 0.1);
  color: rgba(255 255 255 / 0.85);
  border: 1px solid rgba(255 255 255 / 0.15);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  text-decoration: none;
}

.sidebar-footer .btn-logout:hover {
  background: rgba(255 255 255 / 0.18);
  color: white;
}

/* Main content area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Top bar (inside main content) */
.topbar {
  background: white;
  border-bottom: 1px solid var(--neutral-200);
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--neutral-700);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Page content */
.page-content {
  padding: 24px;
  flex: 1;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.45);
  z-index: 190;
}

/* ── Interpreter Portal Header (no sidebar) ─────────────────────────────── */

.header {
  background: var(--brand-blue);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.logo-text {
  font-size: 15px;
  font-weight: 600;
  color: white;
  opacity: 0.9;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255 255 255 / 0.85);
}

.btn-logout {
  padding: 6px 14px;
  background: rgba(255 255 255 / 0.12);
  color: rgba(255 255 255 / 0.9);
  border: 1px solid rgba(255 255 255 / 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-logout:hover {
  background: rgba(255 255 255 / 0.2);
  color: white;
}

/* Container (for interpreter/login pages) */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--neutral-100);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-900);
}

.card-header p {
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 3px;
}

/* ── Stats Grid ─────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.15s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.stat-icon.blue { background: #eff6ff; color: var(--brand-blue); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.yellow { background: #fffbeb; color: var(--warning); }
.stat-icon.red { background: var(--error-light); color: var(--error); }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--neutral-900);
  line-height: 1;
  margin-bottom: 6px;
}

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

/* ── Progress ───────────────────────────────────────────────────────────── */

.progress-container {
  background: var(--brand-gray);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 20px 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-700);
}

.progress-percent {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-blue);
}

.progress-bar-container {
  width: 100%;
  height: 10px;
  background: var(--neutral-200);
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--brand-blue);
  border-radius: 5px;
  transition: width 0.5s ease;
}

.progress-bar-fill.complete {
  background: var(--success);
}

/* ── Document List ──────────────────────────────────────────────────────── */

.document-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.document-item {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.document-item:hover {
  border-color: var(--brand-blue-light);
  box-shadow: var(--shadow-sm);
}

.document-item.status-approved {
  border-left: 3px solid var(--success);
}

.document-item.status-rejected {
  border-left: 3px solid var(--error);
}

.document-item.status-pending {
  border-left: 3px solid var(--warning);
}

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

.document-info h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: 3px;
}

.document-info p {
  font-size: 12px;
  color: var(--neutral-500);
}

.document-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Status Badges ──────────────────────────────────────────────────────── */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.pending {
  background: var(--neutral-100);
  color: var(--neutral-600);
}
.status-badge.pending::before { background: var(--neutral-400); }

.status-badge.pending-review {
  background: var(--warning-light);
  color: #92400e;
}
.status-badge.pending-review::before { background: var(--warning); }

.status-badge.rejected {
  background: var(--error-light);
  color: #991b1b;
}
.status-badge.rejected::before { background: var(--error); }

.status-badge.completed, .status-badge.approved {
  background: var(--success-light);
  color: #14532d;
}
.status-badge.completed::before, .status-badge.approved::before { background: var(--success); }

.status-badge.active { background: #eff6ff; color: var(--brand-blue); }
.status-badge.active::before { background: var(--brand-blue); }

.status-badge.inactive { background: var(--neutral-100); color: var(--neutral-500); }
.status-badge.inactive::before { background: var(--neutral-400); }

/* ── Role Badges ────────────────────────────────────────────────────────── */

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-badge.coordinator {
  background: #eff6ff;
  color: var(--brand-blue);
  border: 1px solid #bfdbfe;
}

.role-badge.interpreter {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
  line-height: 1;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

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

.btn-secondary {
  background: white;
  color: var(--neutral-700);
  border-color: var(--neutral-300);
}
.btn-secondary:hover { background: var(--neutral-50); border-color: var(--neutral-400); }

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover { background: #15803d; }

.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover { background: #b91c1c; }

.btn-warning {
  background: var(--warning);
  color: white;
}
.btn-warning:hover { background: #b45309; }

.btn-ghost {
  background: transparent;
  color: var(--neutral-600);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--neutral-100); }

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

.btn-lg {
  padding: 11px 22px;
  font-size: 15px;
}

.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--neutral-700);
  font-size: 13px;
}

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--neutral-800);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgb(17 81 152 / 0.1);
}

.form-input::placeholder { color: var(--neutral-400); }

.form-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--neutral-500);
}

.form-error {
  margin-top: 4px;
  font-size: 12px;
  color: var(--error);
}

/* File upload */
.file-input { display: none; }

.file-input-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--brand-blue);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.15s;
  font-family: inherit;
}

.file-input-label:hover { background: var(--brand-blue-light); }
.file-input-label.disabled { background: var(--neutral-300); cursor: not-allowed; }

.upload-info {
  font-size: 12px;
  color: var(--neutral-500);
  margin-top: 4px;
}

.uploaded-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--success-light);
  border-radius: var(--radius-sm);
  color: #14532d;
  font-size: 13px;
}

/* ── Tables ─────────────────────────────────────────────────────────────── */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
}

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

.table thead {
  background: var(--neutral-50);
  border-bottom: 1px solid var(--neutral-200);
}

.table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.table th:hover { color: var(--brand-blue); }

.table td {
  padding: 12px 14px;
  color: var(--neutral-700);
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}

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

.table tbody tr:hover { background: var(--neutral-50); }

/* Sort indicators */
.sort-indicator { color: var(--neutral-400); margin-left: 4px; }
.sort-indicator.asc::after { content: ' ↑'; color: var(--brand-blue); }
.sort-indicator.desc::after { content: ' ↓'; color: var(--brand-blue); }
.sort-indicator::after { content: ''; }

/* ── Filter Bar ─────────────────────────────────────────────────────────── */

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: white;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgb(17 81 152 / 0.1);
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: white;
  cursor: pointer;
  font-family: inherit;
}

.filter-select:focus {
  outline: none;
  border-color: var(--brand-blue);
}

/* ── Alerts ─────────────────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
}

.alert-success {
  background: var(--success-light);
  border-color: #86efac;
  color: #14532d;
}

.alert-error {
  background: var(--error-light);
  border-color: #fca5a5;
  color: #7f1d1d;
}

.alert-warning {
  background: var(--warning-light);
  border-color: #fcd34d;
  color: #78350f;
}

.alert-info {
  background: var(--info-light);
  border-color: #7dd3fc;
  color: #0c4a6e;
}

/* ── Modal ──────────────────────────────────────────────────────────────── */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.modal.active { display: flex; }

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 560px;
  margin: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.2s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--neutral-100);
}

.modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-900);
}

.modal-close {
  width: 28px;
  height: 28px;
  background: var(--neutral-100);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  color: var(--neutral-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.modal-close:hover { background: var(--neutral-200); }

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-100);
}

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

/* ── Tabs ───────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--neutral-200);
  margin-bottom: 20px;
}

.tab-link {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.tab-link:hover { color: var(--brand-blue); }
.tab-link.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); font-weight: 600; }

/* ── Login Page ─────────────────────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--brand-blue);
}

.login-left {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--brand-blue-dark);
}

.login-brand-img {
  max-width: 260px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  margin-bottom: 32px;
}

.login-tagline {
  font-size: 22px;
  font-weight: 700;
  color: white;
  text-align: center;
  line-height: 1.4;
  opacity: 0.9;
}

.login-right {
  flex: 0 0 420px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.login-card {
  width: 100%;
  max-width: 360px;
}

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

.login-logo img {
  max-width: 200px;
  height: auto;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--neutral-500);
  margin-bottom: 28px;
}

/* ── 2FA Step ───────────────────────────────────────────────────────────── */

.totp-input {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 20px 0;
}

.totp-digit {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-md);
  color: var(--neutral-900);
  background: white;
  font-family: monospace;
}

.totp-digit:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgb(17 81 152 / 0.1);
}

/* ── QR Code block ──────────────────────────────────────────────────────── */

.qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}

.secret-code {
  font-family: monospace;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--brand-blue);
  background: var(--neutral-100);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  word-break: break-all;
  text-align: center;
}

/* ── Backup Codes ───────────────────────────────────────────────────────── */

.backup-codes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.backup-code {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--neutral-800);
  letter-spacing: 0.08em;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 0;
  border-top: 1px solid var(--neutral-100);
  margin-top: 14px;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: var(--neutral-500);
}

.pagination-controls {
  display: flex;
  gap: 4px;
}

.page-btn {
  padding: 5px 10px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 13px;
  color: var(--neutral-700);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.page-btn:hover { background: var(--neutral-50); border-color: var(--neutral-300); }
.page-btn.active { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Loading ────────────────────────────────────────────────────────────── */

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--neutral-200);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  flex-direction: column;
  gap: 12px;
  color: var(--neutral-500);
  font-size: 14px;
}

/* ── Empty State ────────────────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--neutral-400);
}

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

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-600);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  color: var(--neutral-400);
}

/* ── Toast Notifications ────────────────────────────────────────────────── */

#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-left: 3px solid;
  pointer-events: auto;
  animation: toastIn 0.25s ease;
  min-width: 280px;
}

@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

.toast-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-content { flex: 1; min-width: 0; }
.toast-title { font-weight: 600; font-size: 13px; color: var(--neutral-900); }
.toast-message { font-size: 12px; color: var(--neutral-600); margin-top: 2px; }

.toast-close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--neutral-400);
  font-size: 16px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.toast-close:hover { color: var(--neutral-700); }

/* ── Confirm Dialog ─────────────────────────────────────────────────────── */

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.confirm-modal.active { display: flex; }

.confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.5);
}

.confirm-content {
  position: relative;
  background: white;
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.2s ease;
}

.confirm-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--neutral-100);
}

.confirm-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-900);
}

.confirm-body {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--neutral-600);
  line-height: 1.6;
}

.confirm-footer {
  padding: 12px 20px 20px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Kanban Board ───────────────────────────────────────────────────────── */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 1100px) {
  .kanban-board { grid-template-columns: repeat(4, 1fr); }
}

.kanban-column {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 12px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid;
}

.kanban-column.not-started .kanban-column-header { border-bottom-color: var(--neutral-400); }
.kanban-column.pending-review .kanban-column-header { border-bottom-color: var(--warning); }
.kanban-column.approved .kanban-column-header { border-bottom-color: var(--brand-blue); }
.kanban-column.completed .kanban-column-header { border-bottom-color: var(--success); }

.kanban-column-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--neutral-700);
}

.kanban-column-count {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--neutral-200);
  color: var(--neutral-700);
}

.kanban-column.not-started .kanban-column-count { background: var(--neutral-200); }
.kanban-column.pending-review .kanban-column-count { background: var(--warning-light); color: #92400e; }
.kanban-column.approved .kanban-column-count { background: #eff6ff; color: var(--brand-blue); }
.kanban-column.completed .kanban-column-count { background: var(--success-light); color: #14532d; }

.kanban-cards { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.kanban-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue-light);
}

.kanban-card-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--neutral-900);
  margin-bottom: 3px;
}

.kanban-card-email {
  font-size: 12px;
  color: var(--neutral-500);
  margin-bottom: 10px;
  word-break: break-word;
}

.kanban-card-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kanban-progress-bar { flex: 1; height: 4px; background: var(--neutral-200); border-radius: 2px; overflow: hidden; }
.kanban-progress-fill { height: 100%; background: var(--brand-blue); border-radius: 2px; }
.kanban-progress-text { font-size: 11px; font-weight: 700; color: var(--neutral-500); min-width: 36px; text-align: right; }

.kanban-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--neutral-400);
  padding-top: 6px;
  border-top: 1px solid var(--neutral-100);
}

.empty-column {
  text-align: center;
  color: var(--neutral-400);
  padding: 24px 12px;
  font-size: 13px;
  font-style: italic;
}

/* ── Filter Buttons ─────────────────────────────────────────────────────── */

.filter-section {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-button {
  padding: 6px 14px;
  border: 1px solid var(--neutral-200);
  background: white;
  color: var(--neutral-600);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  font-family: inherit;
}

.filter-button:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.filter-button.active { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }

/* ── Password Notice ────────────────────────────────────────────────────── */

.password-notice {
  background: var(--warning-light);
  border-left: 3px solid var(--warning);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.password-notice p {
  font-size: 13px;
  color: #78350f;
  font-weight: 500;
}

/* ── Legacy CSS variable aliases (inline styles in older pages) ─────────── */
:root {
  --primary-color: #115198;
  --primary-dark: #0d3f78;
  --secondary-color: #64748b;
  --dark-color: #0f172a;
  --light-color: #f8fafc;
  --border-color: #e2e8f0;
  --success-color: #16a34a;
  --warning-color: #d97706;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Compatibility aliases for change-password.html */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--brand-blue);
}

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}

/* ── Utilities ──────────────────────────────────────────────────────────── */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--neutral-500); }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
.font-mono { font-family: monospace; }
.font-bold { font-weight: 700; }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (min-width: 900px) {
  .login-left { display: flex; }
  .login-right { flex: 0 0 460px; }
}

@media (max-width: 768px) {
  /* Sidebar collapses off-screen on mobile */
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger {
    display: flex;
  }

  /* Full-screen modals */
  .modal {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
    overflow-y: auto;
    margin: 0;
    max-width: 100%;
  }

  /* Table → card layout on mobile */
  .table-container {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .table thead { display: none; }
  .table, .table tbody { display: block; }

  .table tbody tr {
    display: block;
    background: white;
    border-bottom: 1px solid var(--neutral-200);
    padding: 12px 16px;
  }

  .table tbody td {
    display: flex;
    padding: 4px 0;
    border-bottom: none;
  }

  .table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--neutral-500);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    width: 100px;
    flex-shrink: 0;
    padding-top: 1px;
  }

  .table tbody td:first-child { display: none; }

  /* Stats stack on mobile */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Filter bar stacks */
  .filter-bar { flex-direction: column; }
  .search-input { min-width: unset; }

  .page-content { padding: 16px; }

  .login-right { flex: 1; padding: 32px 20px; }

  #toast-container { left: 12px; right: 12px; max-width: none; bottom: 12px; }
  .toast { min-width: unset; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .kanban-board { grid-template-columns: 1fr; }
  .backup-codes-grid { grid-template-columns: 1fr 1fr; }
  .totp-input { gap: 5px; }
  .totp-digit { width: 38px; height: 46px; font-size: 18px; }
}
