/* ============================================================
   PlanIt — Styles
   ============================================================ */

/* Google Fonts loaded via <link> tag in index.html for CSP compliance */

:root {
  --primary: #5b52e5;
  --primary-light: #8b83f0;
  --primary-dark: #4338ca;
  --primary-bg: #f0eeff;
  --accent: #f59e0b;
  --accent-light: #fde68a;
  --accent-dark: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --text: #2d2b3d;
  --text-light: #9794ab;
  --border: #e8e6ef;
  --bg: #faf9f7;
  --white: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.08);
  --input-bg: #ffffff;
  --input-disabled: #f3f2f0;
  --gradient-header: linear-gradient(135deg, #5b52e5 0%, #7c5ce5 50%, #9b6deb 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #faf9f7 100%);
  --card-border: rgba(0,0,0,0.05);
  --glow-primary: rgba(91,82,229,0.12);
  --glow-accent: rgba(245,158,11,0.18);
}

[data-theme="dark"] {
  --primary: #8b83f0;
  --primary-light: #a5b4fc;
  --primary-dark: #6366f1;
  --primary-bg: #1c1a35;
  --accent: #fbbf24;
  --accent-light: #78350f;
  --accent-dark: #f59e0b;
  --text: #e4e2ee;
  --text-light: #9794ab;
  --border: #2e2c45;
  --bg: #141220;
  --white: #1c1a35;
  --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.25);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.3), 0 8px 32px rgba(0,0,0,0.35);
  --input-bg: #1c1a35;
  --input-disabled: #2e2c45;
  --gradient-header: linear-gradient(135deg, #1c1a35 0%, #2d2660 50%, #3d3280 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-card: linear-gradient(180deg, #1c1a35 0%, #141220 100%);
  --card-border: rgba(255,255,255,0.06);
  --glow-primary: rgba(139,131,240,0.1);
  --glow-accent: rgba(251,191,36,0.15);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Header ---------- */
header {
  background: var(--gradient-header);
  color: #ffffff;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 16px rgba(91,82,229,0.15);
  position: relative;
  z-index: 10;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

header h1 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 0.82rem;
  opacity: 0.75;
  margin-top: 3px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #ffffff;
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}
.icon-btn:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ---------- Main ---------- */
main {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ---------- Steps ---------- */
.step {
  display: none;
  background: var(--gradient-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 1px solid var(--card-border);
  animation: stepFadeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.step.active {
  display: block;
}

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

.step-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--white) 0%, var(--primary-bg) 100%);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--gradient-header);
  color: #ffffff;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px var(--glow-primary);
}

.step-header h2 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step-body {
  padding: 1.5rem;
}

/* ---------- Forms ---------- */
.form-row {
  margin-bottom: 1.15rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

select, input[type="text"], input[type="date"], input[type="password"], textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--input-bg);
  transition: all 0.2s ease;
}

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--glow-primary), 0 2px 8px var(--glow-primary);
}

select:disabled {
  background: var(--input-disabled);
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

/* ---------- TEKS List ---------- */
.teks-list {
  margin-bottom: 1rem;
  max-height: 320px;
  overflow-y: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  background: var(--input-bg);
}

.placeholder-text {
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  padding: 1.5rem 0;
}

.teks-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
}
.teks-item:hover {
  background: var(--primary-bg);
  border-color: var(--border);
}

.teks-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.teks-item label {
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
}

.teks-item .teks-code {
  font-weight: 700;
  color: var(--primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
  font-family: inherit;
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--gradient-header);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--glow-primary);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 20px var(--glow-primary);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: #d8d6e0;
  transform: translateY(-1px);
}

.btn-ai {
  background: var(--gradient-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--glow-accent);
}
.btn-ai:hover:not(:disabled) {
  box-shadow: 0 4px 20px var(--glow-accent);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  border-radius: 8px;
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ---------- Lesson Sections ---------- */
.lesson-sections {
  margin-top: 1.25rem;
}

.lesson-section {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.25s ease;
}
.lesson-section:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(238,242,255,0.4) 100%);
  padding: 0.85rem 1rem;
}

[data-theme="dark"] .section-header {
  background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(30,27,75,0.3) 100%);
}

.section-header h3 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 700;
}

.time-badge {
  display: inline-block;
  background: var(--gradient-header);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-left: 0.5rem;
  vertical-align: middle;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Lesson section editor styling handled by .lesson-section .rich-editor */

/* ---------- Selected TEKS Summary ---------- */
.selected-summary {
  background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(238,242,255,0.5) 100%);
  border: 1.5px solid rgba(129,140,248,0.3);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.7;
}

.selected-summary .teks-tag {
  display: inline-block;
  background: var(--gradient-header);
  color: #ffffff;
  padding: 0.2rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0.15rem 0.25rem 0.15rem 0;
  box-shadow: 0 1px 4px var(--glow-primary);
  transition: transform 0.15s ease;
}
.selected-summary .teks-tag:hover {
  transform: translateY(-1px);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  max-width: 460px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  animation: modalSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.modal-content h2 {
  font-family: 'Outfit', 'Inter', sans-serif;
  margin-bottom: 0.5rem;
}

.modal-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* ---------- Loading ---------- */
.loading-box {
  text-align: center;
  max-width: 300px;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Rich Text Editor ---------- */
.rich-editor {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--input-bg);
  transition: all 0.2s ease;
}
.rich-editor:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--glow-primary), 0 2px 8px var(--glow-primary);
}

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.toolbar-btn:hover {
  background: var(--primary-bg);
  border-color: var(--border);
}
.toolbar-btn:active {
  background: var(--border);
}
.toolbar-btn-wide {
  width: auto;
  padding: 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}

.editor-content {
  min-height: 60px;
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  line-height: 1.6;
  outline: none;
  overflow-y: auto;
}
.editor-content[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-light);
  pointer-events: none;
  font-style: normal;
}

.form-row .rich-editor .editor-content {
  min-height: 50px;
}

.lesson-section .rich-editor {
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--border);
}
.lesson-section .rich-editor:focus-within {
  box-shadow: inset 0 0 0 2px var(--glow-primary);
}
.lesson-section .editor-content {
  min-height: 120px;
}

/* ---------- Dark mode overrides ---------- */
[data-theme="dark"] .selected-summary {
  border-color: var(--border);
  background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(30,27,75,0.4) 100%);
}

[data-theme="dark"] .modal-backdrop {
  background: rgba(0,0,0,0.65);
}

[data-theme="dark"] .step-number {
  background: var(--gradient-header);
}

[data-theme="dark"] .step-header {
  background: linear-gradient(180deg, var(--white) 0%, var(--primary-bg) 100%);
}

[data-theme="dark"] .teks-item:hover {
  background: var(--primary-bg);
}

[data-theme="dark"] .section-header h3 {
  color: var(--primary-light);
}

[data-theme="dark"] .teks-item .teks-code {
  color: var(--primary-light);
}

[data-theme="dark"] .icon-btn {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

[data-theme="dark"] .btn-secondary {
  background: var(--border);
  color: var(--text);
}
[data-theme="dark"] .btn-secondary:hover {
  background: #475569;
}

/* ---------- Scrollbar ---------- */
.teks-list::-webkit-scrollbar {
  width: 6px;
}
.teks-list::-webkit-scrollbar-track {
  background: transparent;
}
.teks-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.teks-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  header {
    padding: 0.85rem 1rem;
  }
  header h1 {
    font-size: 1.25rem;
  }
  .step-body {
    padding: 1rem;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .btn-row {
    flex-direction: column;
  }
  .btn-row .btn {
    width: 100%;
    justify-content: center;
  }
  .step-progress ol {
    gap: 0.25rem;
  }
  .progress-label {
    font-size: 0.7rem;
  }
}

/* ---------- Step Progress Indicator ---------- */
.step-progress {
  margin-bottom: 1.5rem;
}

.step-progress ol {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  background: var(--white);
  border: 1.5px solid var(--border);
  transition: all 0.3s ease;
  cursor: default;
}

.progress-item.active {
  background: var(--gradient-header);
  border-color: transparent;
  box-shadow: 0 2px 12px var(--glow-primary);
}

.progress-item.completed {
  background: var(--success);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.progress-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--border);
  color: var(--text-light);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.progress-item.active .progress-number,
.progress-item.completed .progress-number {
  background: rgba(255,255,255,0.25);
  color: #ffffff;
}

.progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  transition: color 0.3s ease;
}

.progress-item.active .progress-label,
.progress-item.completed .progress-label {
  color: #ffffff;
}

.progress-connector {
  display: flex;
  align-items: center;
}

.progress-connector span {
  display: block;
  width: 40px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  transition: background 0.3s ease;
}

.progress-connector.done span {
  background: var(--success);
}

/* ---------- TEKS Actions ---------- */
.teks-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.btn-link:hover {
  color: var(--primary-dark);
}

.teks-actions-divider {
  color: var(--text-light);
}

.cross-strand-badge {
  margin-left: auto;
  color: var(--text-light);
  font-size: 0.78rem;
  font-style: italic;
}

/* ---------- Count Badge ---------- */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: rgba(255,255,255,0.25);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.4rem;
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  font-size: 0.88rem;
  font-weight: 500;
  animation: toastSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 380px;
}

.toast.toast-exit {
  animation: toastSlideOut 0.25s ease forwards;
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--primary); }

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
}
.toast-close:hover {
  color: var(--text);
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ---------- Time Badge (informational hint) ---------- */
.time-badge {
  cursor: default;
}

/* ---------- Print Stylesheet ---------- */
@media print {
  header, .step-progress, .btn-row, .btn, .btn-ai,
  .editor-toolbar, .section-header button,
  .toast-container, #settings-modal, #loading-overlay,
  .header-actions, .teks-actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  main {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .step {
    display: block !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    page-break-inside: avoid;
  }

  .step#step-select {
    display: none !important;
  }

  .step-header {
    background: none;
    border-bottom: 2px solid #333;
    padding: 0.5rem 0;
  }

  .step-number {
    background: #333;
    color: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .lesson-section {
    border: 1px solid #ccc;
    margin-bottom: 0.75rem;
    page-break-inside: avoid;
  }

  .section-header {
    background: #f0f0f0 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .selected-summary {
    background: #f0f0f0 !important;
    border-color: #ccc;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .selected-summary .teks-tag {
    background: #333 !important;
    color: #fff !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .rich-editor {
    border: none;
  }

  .editor-content {
    min-height: auto !important;
    padding: 0.5rem;
  }
}

/* ============================================================
   Authentication Pages — Login & Change Password
   ============================================================ */

.auth-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 160px);
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  animation: modalSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
  border-radius: var(--radius);
}

.auth-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem 0;
}

.auth-subtitle {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0;
}

.auth-form .form-row {
  margin-bottom: 1.25rem;
}

.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.auth-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Password requirements checklist */
.password-requirements {
  background: var(--primary-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.pw-req-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pw-req-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pw-req-item {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 0.2rem 0;
  transition: color 0.2s;
}

.pw-req-item.met {
  color: var(--success);
}

.pw-req-item.unmet {
  color: var(--text-light);
}

.pw-req-icon {
  display: inline-block;
  width: 1rem;
  text-align: center;
  margin-right: 0.25rem;
}

/* ============================================================
   User Menu (Dropdown in Header)
   ============================================================ */

.user-menu {
  position: relative;
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  z-index: 100;
  overflow: hidden;
}

.user-menu-dropdown.open {
  display: block;
  animation: modalSlideIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-menu-header {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: var(--primary-bg);
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  color: var(--text);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.user-menu-item:hover {
  background: var(--primary-bg);
}

.user-menu-item-danger {
  color: var(--danger);
}

.user-menu-item-danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

.user-menu-warning {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #b45309;
  background: #fef3c7;
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .user-menu-warning {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

/* ============================================================
   Inactivity Modal
   ============================================================ */

.inactivity-box {
  text-align: center;
  max-width: 380px;
}

.inactivity-box h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.inactivity-box p {
  margin-bottom: 1.5rem;
}

.inactivity-box strong {
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}
