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

/* ─── Design Tokens (Crisp Modern White Theme) ──────────────────────────── */
:root {
  --bg-primary:     #f8fafc;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8fafc;
  --bg-input:       #f8fafc;
  --bg-input-focus: #ffffff;

  --border:         #e2e8f0;
  --border-focus:   #7c3aed;
  --border-error:   #ef4444;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --purple:   #7c3aed;
  --blue:     #0284c7;
  --green:    #10b981;
  --orange:   #ea580c;
  --red:      #ef4444;

  --grad-primary: linear-gradient(135deg, #7c3aed 0%, #0284c7 100%);
  --grad-btn:     linear-gradient(135deg, #7c3aed 0%, #0284c7 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.02), 0 0 0 1px #e2e8f0;
  --shadow-btn:  0 4px 14px rgba(124, 58, 237, 0.3);
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─── Animated Background Blobs (Soft Ambient Glow) ─────────────────────── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.12;
  animation: float 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.blob-1 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, #a78bfa, transparent 70%);
  top: -150px; left: -150px;
  animation-duration: 12s;
}
.blob-2 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #38bdf8, transparent 70%);
  bottom: -100px; right: -100px;
  animation-duration: 14s;
  animation-delay: -4s;
}
.blob-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #c084fc, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 16s;
  animation-delay: -7s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.04); }
  66%       { transform: translate(-20px, 30px) scale(0.97); }
}

/* ─── Auth Page Layout (Clean White) ────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.auth-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-card--wide { max-width: 560px; }

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

/* ─── Logo ───────────────────────────────────────────────────────────────── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.logo-icon {
  width: 40px; height: 40px;
  filter: drop-shadow(0 4px 10px rgba(124,58,237,0.2));
}
.logo-icon--sm { width: 32px; height: 32px; }
.logo-text {
  font-size: 22px;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

/* ─── Auth Headings ──────────────────────────────────────────────────────── */
.auth-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ─── Error / Success Banner ─────────────────────────────────────────────── */
.error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--red);
  margin-bottom: 18px;
}
.success-banner {
  background: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #16a34a !important;
}

/* ─── Form ───────────────────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 6px; position: relative; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-link {
  font-size: 12px;
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 0.8; }

/* ─── Input Wrapper ──────────────────────────────────────────────────────── */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 40px 11px 40px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
}
.input-wrapper input::placeholder { color: var(--text-muted); }
.input-wrapper input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.has-error .input-wrapper input {
  border-color: var(--border-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  font-size: 13px;
  pointer-events: none;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color 0.2s;
}
.toggle-password:hover { color: var(--purple); }

.field-error {
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Password Strength ──────────────────────────────────────────────────── */
.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}
.strength-bar {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: #e2e8f0;
  transition: background 0.3s;
}
.strength-bar.weak   { background: var(--red); }
.strength-bar.fair   { background: var(--orange); }
.strength-bar.good   { background: #ca8a04; }
.strength-bar.strong { background: var(--green); }

.strength-label {
  font-size: 11px;
  font-weight: 700;
  min-width: 44px;
  text-align: right;
}
.strength-label.weak   { color: var(--red); }
.strength-label.fair   { color: var(--orange); }
.strength-label.good   { color: #ca8a04; }
.strength-label.strong { color: var(--green); }

/* ─── Auth Button ────────────────────────────────────────────────────────── */
.auth-btn {
  width: 100%;
  padding: 13px;
  background: var(--grad-btn);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: var(--shadow-btn);
  margin-top: 4px;
  letter-spacing: 0.2px;
}
.auth-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.45);
}
.auth-btn:active:not(:disabled) { transform: translateY(0); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Auth Switch ────────────────────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 22px;
}
.auth-link {
  color: var(--purple);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-link:hover { color: var(--blue); }

/* ─── Loading Screen ─────────────────────────────────────────────────────── */
.loading-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ─── Stats Grid ─────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  animation: fadeIn 0.5s ease forwards;
}
.stat-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08);
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-info { display: flex; flex-direction: column; overflow: hidden; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 2px; }
.stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Section Card (White Theme) ─────────────────────────────────────────── */
.section-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  animation: fadeIn 0.6s 0.4s ease forwards;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}
.section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.section-desc { font-size: 13px; color: var(--text-muted); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--grad-btn);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  padding: 10px 20px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-ghost:hover:not(:disabled) {
  background: #e2e8f0;
  color: var(--text-primary);
}
.btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Users Table (Crisp White) ──────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; background: #ffffff; }

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.users-table thead tr {
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.users-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.users-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.users-table tbody tr:last-child { border-bottom: none; }
.users-table tbody tr:hover { background: #f8fafc; }
.users-table td { padding: 10px 12px; vertical-align: middle; }

.td-num { color: var(--text-muted); font-size: 13px; width: 40px; font-weight: 500; }

.td-user { display: flex; align-items: center; gap: 12px; }
.td-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.td-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.td-email { font-size: 12px; color: var(--text-muted); }

.td-phone { font-size: 13px; color: var(--text-secondary); }
.td-na { color: var(--text-muted); font-style: italic; }

.td-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}

.table-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 56px;
  color: var(--text-muted);
}
.table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 56px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ─── Modal (Crisp Modern White Theme) ──────────────────────────────────── */
.modal-overlay,
.modern-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.38) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 16px !important;
  box-sizing: border-box !important;
}

.modal-overlay.active,
.modern-modal-overlay.active {
  display: flex !important;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

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

.modal-card,
.modal-container,
.modern-modal-card,
.clean-modal-card {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  border-radius: 20px !important;
  padding: 28px 32px !important;
  width: 100% !important;
  max-width: 520px !important;
  max-height: calc(100vh - 48px) !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.03), 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
  animation: modalCardPop 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  position: relative !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

@keyframes modalCardPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modern-modal-body {
  overflow-y: auto;
  max-height: calc(100vh - 150px);
  padding: 2px;
}

.modal-header,
.modern-modal-header,
.clean-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.modal-title,
.modern-modal-title,
.clean-modal-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.3px !important;
  margin: 0 !important;
}

.modal-subtitle,
.modern-modal-subtitle,
.clean-modal-subtitle {
  font-size: 13px !important;
  color: #64748b !important;
  margin-top: 4px !important;
  margin-bottom: 0 !important;
  line-height: 1.4 !important;
}

.modal-close,
.modern-close-btn,
.modern-modal-close-btn,
.clean-close-btn {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  padding: 0 !important;
  outline: none !important;
}
.modal-close:hover,
.modern-close-btn:hover,
.modern-modal-close-btn:hover,
.clean-close-btn:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #ef4444 !important;
  transform: rotate(90deg) scale(1.06) !important;
}

.modal-form,
.modern-form,
.clean-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form Inputs & Fields */
.form-group,
.modern-form-group {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-bottom: 16px !important;
  position: relative !important;
}

.form-label,
.modern-label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
}

.form-input,
.modern-input,
.clean-field,
.modern-select {
  width: 100% !important;
  height: 44px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  color: #0f172a !important;
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  outline: none !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
  box-sizing: border-box !important;
}

.form-input:hover,
.modern-input:hover,
.clean-field:hover,
.modern-select:hover {
  background: #ffffff !important;
  border-color: #94a3b8 !important;
}

.form-input:focus,
.modern-input:focus,
.clean-field:focus,
.modern-select:focus {
  background: #ffffff !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12) !important;
}

.form-input::placeholder,
.modern-input::placeholder,
.clean-field::placeholder {
  color: #94a3b8 !important;
}

/* Custom styled select dropdown */
select.form-input,
select.modern-input,
select.modern-select,
.modern-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: #f8fafc !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-position: right 14px center !important;
  background-repeat: no-repeat !important;
  background-size: 16px 16px !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}

/* Textarea input */
textarea.form-input,
textarea.modern-input {
  height: auto !important;
  min-height: 84px !important;
  padding: 10px 14px !important;
  line-height: 1.5 !important;
  resize: vertical !important;
}

.form-input--error,
.modern-input--error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.field-error,
.modern-error-text {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #ef4444 !important;
  margin-top: 2px !important;
}

.modal-actions,
.modern-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}
.clean-field:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.clean-field::placeholder { color: #94a3b8; }

.has-error .clean-field,
.clean-dropdown-trigger.has-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.clean-field--has-action { padding-right: 40px; }

.clean-optional {
  font-size: 12px;
  font-weight: 400;
  color: #94a3b8;
  margin-left: 4px;
}

.clean-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.clean-toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}
.clean-toggle-pwd:hover { color: #475569; }

/* Clean Role Dropdown */
.clean-dropdown-trigger {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  text-align: left;
  box-sizing: border-box;
}
.clean-dropdown-trigger:hover,
.clean-dropdown-trigger--open {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.clean-dropdown-value { font-weight: 600; color: #0f172a; }
.clean-dropdown-placeholder { color: #94a3b8; }
.clean-dropdown-chevron { color: #64748b; transition: transform 0.2s ease; flex-shrink: 0; }

.clean-dropdown-panel {
  position: absolute;
  z-index: 1000;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 5px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  animation: slideUp 0.15s ease;
}
.clean-dropdown-item {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}
.clean-dropdown-item:hover { background: #f1f5f9; color: #0f172a; }
.clean-dropdown-item--active { background: #eef2ff; color: #4f46e5; font-weight: 600; }
.clean-dropdown-check { color: #6366f1; flex-shrink: 0; }

/* Password Strength */
.clean-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.clean-strength-bars { display: flex; gap: 3px; flex: 1; }
.clean-strength-bar { height: 3px; flex: 1; border-radius: 2px; transition: background 0.25s ease; }
.clean-strength-label { font-size: 11px; font-weight: 600; min-width: 40px; text-align: right; }

/* Clean Modal Actions */
.clean-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.clean-btn-cancel {
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.clean-btn-cancel:hover { background: #f8fafc; border-color: #94a3b8; color: #0f172a; }

.clean-btn-submit {
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #6366f1;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.15s ease;
}
.clean-btn-submit:hover:not(:disabled) {
  background: #4f46e5;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}
.clean-btn-submit:active:not(:disabled) { transform: translateY(0); }
.clean-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* ─── Sidebar & App Layout (Clean White) ─────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  transition: grid-template-columns 0.3s cubic-bezier(0.16,1,0.3,1);
  background: #ffffff;
}
.app-layout--collapsed { grid-template-columns: 68px 1fr; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  z-index: 200;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  min-height: 64px;
  background: #ffffff;
}
.sidebar-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.sidebar-brand-link:hover {
  opacity: 0.85;
}
.sidebar-brand-img {
  height: 28px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
}
.sidebar-logo-icon { width: 32px; height: 32px; flex-shrink: 0; filter: drop-shadow(0 2px 8px rgba(124,58,237,0.25)); }
.sidebar-logo-text {
  font-size: 19px; font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.4px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.sidebar--collapsed .sidebar-logo-text,
.sidebar--collapsed .sidebar-brand-img { opacity: 0; width: 0; overflow: hidden; }

.sidebar-toggle {
  margin-left: auto; flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  transition: all 0.2s;
}
.sidebar-toggle:hover { background: #f1f5f9; color: var(--purple); border-color: #cbd5e1; }

.sidebar-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 0; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.sidebar-group { padding: 4px 0 8px; }
.sidebar-group-label {
  display: block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 20px 4px;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.sidebar--collapsed .sidebar-group-label { opacity: 0; height: 0; padding: 0; overflow: hidden; }

.sidebar-link {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  margin: 3px 10px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap; overflow: hidden;
}
.sidebar-link:hover { background: #f8fafc; color: var(--text-primary); }
.sidebar-link--active {
  background: rgba(124, 58, 237, 0.08);
  color: var(--purple);
  font-weight: 600;
}
.sidebar-link--active::before {
  content: '';
  position: absolute; left: 0; top: 20%; height: 60%; width: 3px;
  background: var(--purple);
  border-radius: 0 3px 3px 0;
}
.sidebar-link-icon { flex-shrink: 0; display: flex; align-items: center; color: var(--text-muted); transition: color 0.18s; }
.sidebar-link:hover .sidebar-link-icon, .sidebar-link--active .sidebar-link-icon { color: var(--purple); }
.sidebar-link-label { flex: 1; transition: opacity 0.15s; }
.sidebar--collapsed .sidebar-link-label { opacity: 0; width: 0; overflow: hidden; }

.sidebar-tooltip {
  position: absolute;
  left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: #0f172a;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 999;
}
.sidebar--collapsed .sidebar-link:hover .sidebar-tooltip { opacity: 1; }

.sidebar-footer { border-top: 1px solid var(--border); padding: 14px 12px; display: flex; align-items: center; gap: 8px; background: #ffffff; }
.sidebar-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: white; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(124,58,237,0.25);
}
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; transition: opacity 0.15s; }
.sidebar--collapsed .sidebar-user-info { opacity: 0; width: 0; overflow: hidden; }
.sidebar-user-name { font-size: 13px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 12px; font-weight: 600; text-transform: capitalize; }

.sidebar-logout {
  flex-shrink: 0;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 8px; color: var(--red);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  transition: all 0.2s;
}
.sidebar-logout:hover { background: #fee2e2; border-color: #fecaca; transform: scale(1.05); }

/* ─── App Content & Pages (Clean White Background) ──────────────────────── */
.app-content {
  min-height: 100vh;
  overflow-y: auto;
  background: #ffffff;
  position: relative;
}

.page-wrapper {
  padding: 32px 32px 60px;
  max-width: 1320px;
  margin: 0 auto;
  animation: fadeIn 0.25s ease forwards;
}
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 32px; }
.page-title { font-size: 28px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.6px; margin-bottom: 4px; }
.page-desc { font-size: 14px; color: var(--text-secondary); }

.page-header-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 99px;
  font-size: 12px; font-weight: 600; color: #059669;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

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

@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .page-wrapper { padding: 16px 12px 48px; }
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }
  .page-title {
    font-size: 22px;
    line-height: 1.25;
  }
  .page-desc {
    font-size: 13px;
  }
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .users-page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }
}

/* ─── Placeholder Page ───────────────────────────────────────────────────── */
.placeholder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 40px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.placeholder-icon { font-size: 52px; }
.placeholder-title { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.placeholder-desc { font-size: 14px; color: var(--text-muted); max-width: 340px; }
.placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 99px;
  font-size: 12px;
  color: #c2410c;
  font-weight: 600;
  margin-top: 4px;
}

/* ─── Role Stats Filter Bar (White Theme) ────────────────────────────────── */
.role-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.role-stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.role-stat-chip:hover {
  background: #f8fafc;
  color: var(--text-primary);
  border-color: #cbd5e1;
}
.role-stat-chip--active {
  background: #ffffff;
  border-color: var(--chip-col, var(--purple));
  color: var(--chip-col, var(--purple));
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--chip-col, var(--purple));
}
.role-stat-count {
  background: #f1f5f9;
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}
.role-stat-chip--active .role-stat-count {
  background: rgba(124, 58, 237, 0.12);
  color: var(--chip-col, var(--purple));
}

/* ─── Table Toolbar ──────────────────────────────────────────────────────── */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 380px;
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 36px;
  font-size: 13px;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--border-focus);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color 0.2s;
}
.search-clear:hover { color: var(--red); }
.table-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.table-toolbar .form-input,
.table-toolbar select,
.table-filter-select {
  width: auto !important;
  height: 38px !important;
  min-width: 120px !important;
  max-width: 170px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  color: #1e293b !important;
  background-color: #f8fafc !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  outline: none !important;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.table-toolbar .form-input:hover,
.table-toolbar select:hover,
.table-filter-select:hover {
  border-color: #cbd5e1 !important;
  background-color: #ffffff !important;
}
.table-toolbar .form-input:focus,
.table-toolbar select:focus,
.table-filter-select:focus {
  border-color: var(--purple) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
}
.td-phone-val {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Ultra Modern Modal & Form System ───────────────────────────────────── */
.modern-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.38) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 99999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 16px !important;
  box-sizing: border-box !important;
}

.modern-modal-overlay.active {
  display: flex !important;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.modern-modal-card {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  border-radius: 20px !important;
  padding: 28px 32px !important;
  width: 100% !important;
  max-width: 520px !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.03), 0 10px 25px -5px rgba(0, 0, 0, 0.05) !important;
  animation: modalCardPop 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  position: relative !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.modern-modal-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  margin-bottom: 22px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  gap: 16px !important;
}

.modern-modal-header-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.modern-modal-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.4px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.modern-modal-subtitle {
  font-size: 13px !important;
  color: #64748b !important;
  margin: 0 !important;
  font-weight: 400 !important;
}

.modern-modal-icon-badge {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  background: #eef2ff !important;
  color: #4f46e5 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.modern-modal-close-btn,
.modern-close-btn {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  outline: none !important;
}

.modern-modal-close-btn:hover,
.modern-close-btn:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #ef4444 !important;
  transform: rotate(90deg) scale(1.06) !important;
}
.modern-close-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.modern-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modern-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.modern-form-group {
  display: flex;
  flex-direction: column;
}

.modern-label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 6px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modern-input {
  width: 100% !important;
  height: 44px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  outline: none !important;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  box-sizing: border-box !important;
}
.modern-input:hover {
  border-color: #94a3b8 !important;
}
.modern-input:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
}
.modern-input::placeholder {
  color: #94a3b8 !important;
}

.modern-input--error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.modern-error-text {
  font-size: 12px;
  font-weight: 500;
  color: #ef4444;
  margin-top: 5px;
}

.modern-error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #ef4444;
  margin-bottom: 12px;
}

/* Modern Dropdown */
.modern-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}
.modern-dropdown-trigger--open {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
}

.modern-dropdown-menu {
  position: absolute;
  z-index: 1000;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  animation: slideUp 0.15s ease;
  box-sizing: border-box;
}

.modern-dropdown-item {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
  box-sizing: border-box;
}
.modern-dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}
.modern-dropdown-item--active {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
}

/* Modern Eye Button */
.modern-eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease;
}
.modern-eye-btn:hover {
  color: #475569;
}

/* Modern Action Buttons */
.modern-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.modern-btn {
  height: 42px !important;
  padding: 0 22px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  border-radius: 10px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.modern-btn--secondary {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #475569 !important;
}
.modern-btn--secondary:hover:not(:disabled) {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.modern-btn--primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35) !important;
}
.modern-btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45) !important;
}
.modern-btn--primary:active:not(:disabled) {
  transform: translateY(0);
}
.modern-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Operational Lifecycle Status Badges ───────────────────────────────────── */
.lifecycle-badge {
  display: inline-flex;
  align-items: center;
  gap: 5.5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.lifecycle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Not Scheduled */
.lifecycle-badge--not_scheduled {
  background: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}
.lifecycle-badge--not_scheduled .lifecycle-dot {
  background: #94a3b8;
}

/* Scheduled */
.lifecycle-badge--scheduled {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.lifecycle-badge--scheduled .lifecycle-dot {
  background: #3b82f6;
}

/* Code Letter Added */
.lifecycle-badge--code_letter_added {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.lifecycle-badge--code_letter_added .lifecycle-dot {
  background: #f59e0b;
}

/* Marks Entered */
.lifecycle-badge--marks_entered {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.lifecycle-badge--marks_entered .lifecycle-dot {
  background: #8b5cf6;
}

/* Verified */
.lifecycle-badge--verified {
  background: #ecfeff;
  color: #0e7490;
  border-color: #a5f3fc;
}
.lifecycle-badge--verified .lifecycle-dot {
  background: #06b6d4;
}

/* Published */
.lifecycle-badge--published {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.lifecycle-badge--published .lifecycle-dot {
  background: #10b981;
}

/* ─── Django Messages / Flash Alerts ─────────────────────────────────────── */
.django-alerts-container {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 420px;
}

.django-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.django-alert--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.django-alert--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.django-alert--warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.django-alert-close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
  padding: 0 4px;
  line-height: 1;
}

