/* ============================================================
   KAIROS HR PLATFORM — Design System
   Fonts: Bebas Neue (headings) + DM Sans (body/UI)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */

:root {
  --indigo:          #6123FE;
  --pink:            #FA44AB;
  --lime:            #7AE82E;
  --navy:            #1E1B4B;
  --light-bg:        #F9F8FD;
  --border:          #EBE8F4;
  --text:            #1E1B4B;
  --muted:           #7E7A9A;
  --white:           #FFFFFF;
  --surface:         #FFFFFF;
  --danger:          #EF4444;
  --warning:         #F59E0B;
  --success:         #10B981;

  /* Per-org overrides — applied by applyOrgBranding() */
  --brand-primary:   #6123FE;
  --brand-secondary: #FA44AB;

  --sidebar-width:   240px;
  --radius:          8px;
  --radius-lg:       12px;
  --shadow:          0 1px 3px rgba(30, 27, 75, 0.08), 0 1px 2px rgba(30, 27, 75, 0.04);
  --shadow-md:       0 4px 6px rgba(30, 27, 75, 0.07), 0 2px 4px rgba(30, 27, 75, 0.05);
  --shadow-lg:       0 10px 15px rgba(30, 27, 75, 0.08), 0 4px 6px rgba(30, 27, 75, 0.04);
}

/* ── Reset + Base ───────────────────────────────────────────── */

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

html { font-size: 16px; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--light-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

h4, h5, h6 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
}

h4 { font-size: 1rem; }
h5 { font-size: 0.9375rem; }

a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

p { line-height: 1.6; }

/* ── Layout ─────────────────────────────────────────────────── */

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

/* ── Sidebar ────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--light-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

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

.org-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
}

.org-logo-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
}

.org-name-display {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.3;
}

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

.nav-section {
  padding: 0 8px;
}

.nav-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 8px 4px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  margin-bottom: 1px;
}

.nav-item:hover {
  background: rgba(97, 35, 254, 0.06);
  color: var(--brand-primary);
  text-decoration: none;
}

.nav-item.active {
  background: rgba(97, 35, 254, 0.1);
  color: var(--brand-primary);
  font-weight: 600;
}

.nav-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active svg,
.nav-item:hover svg {
  opacity: 1;
}

.nav-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
}

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

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: capitalize;
}

/* ── Main Content ───────────────────────────────────────────── */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.page-header {
  padding: 28px 32px 0;
  background: var(--white);
}

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

.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 2px;
}

.page-body {
  padding: 24px 32px 40px;
  flex: 1;
}

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

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.card-body {
  padding: 20px 24px 24px;
}

.card + .card {
  margin-top: 16px;
}

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

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

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.25rem;
  color: var(--text);
  line-height: 1;
  letter-spacing: 0.02em;
}

.stat-change {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }

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

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--light-bg);
}

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

.btn-ghost:hover {
  background: rgba(97, 35, 254, 0.06);
}

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

.btn-danger:hover {
  filter: brightness(1.08);
}

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

.btn-lg {
  padding: 11px 24px;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn svg { flex-shrink: 0; }

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

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

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

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(97, 35, 254, 0.1);
}

.form-control::placeholder { color: var(--muted); }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237E7A9A' 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");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 4px;
}

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

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

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

textarea.form-control { resize: vertical; min-height: 100px; }

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

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

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: var(--light-bg);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

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

tbody tr:hover { background: rgba(97, 35, 254, 0.02); }

td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text);
  vertical-align: middle;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active    { background: #D1FAE5; color: #065F46; }
.badge-onboarding { background: #EDE9FE; color: #5B21B6; }
.badge-offboarding { background: #FEF3C7; color: #92400E; }
.badge-terminated { background: #FEE2E2; color: #991B1B; }
.badge-pending   { background: #EDE9FE; color: #5B21B6; }
.badge-sent      { background: #D1FAE5; color: #065F46; }
.badge-failed    { background: #FEE2E2; color: #991B1B; }
.badge-draft     { background: var(--light-bg); color: var(--muted); border: 1px solid var(--border); }
.badge-complete  { background: #D1FAE5; color: #065F46; }
.badge-in-progress { background: #EDE9FE; color: #5B21B6; }

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

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover { color: var(--text); }

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

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Search / Filter bar ────────────────────────────────────── */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input input {
  padding-left: 36px;
}

/* ── Avatar ─────────────────────────────────────────────────── */

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 1.25rem;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.6875rem;
}

/* ── Employee name cell ─────────────────────────────────────── */

.employee-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.progress {
  height: 6px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 100px;
  transition: width 0.3s;
}

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

/* ── Onboarding timeline ────────────────────────────────────── */

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-phase {
  margin-bottom: 32px;
}

.timeline-phase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -32px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-dot.complete {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.timeline-dot.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

.timeline-phase-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
}

.timeline-phase-date {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Task item ──────────────────────────────────────────────── */

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.task-item:last-child { border-bottom: none; }

.task-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  transition: all 0.15s;
  margin-top: 1px;
}

.task-check.checked {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.task-check:hover { border-color: var(--brand-primary); }

.task-content { flex: 1; min-width: 0; }

.task-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.task-title.done {
  text-decoration: line-through;
  color: var(--muted);
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Role badge for tasks ───────────────────────────────────── */

.role-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-badge.employee  { background: #EDE9FE; color: #5B21B6; }
.role-badge.manager   { background: #DBEAFE; color: #1E40AF; }
.role-badge.hr        { background: #FCE7F3; color: #9D174D; }
.role-badge.it        { background: #D1FAE5; color: #065F46; }
.role-badge.payroll   { background: #FEF3C7; color: #92400E; }

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

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-danger  { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

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

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 0.875rem;
}

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

/* ── Empty state ────────────────────────────────────────────── */

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

.empty-state svg {
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

/* ── Multi-step wizard ──────────────────────────────────────── */

.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}

.wizard-step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-left: 8px;
}

.wizard-step.done:not(:last-child)::after {
  background: var(--brand-primary);
}

.wizard-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--white);
  flex-shrink: 0;
}

.wizard-step.active .wizard-step-num {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

.wizard-step.done .wizard-step-num {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.wizard-step-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.wizard-step.active .wizard-step-label { color: var(--text); font-weight: 600; }
.wizard-step.done .wizard-step-label { color: var(--success); }

.wizard-pane { display: none; }
.wizard-pane.active { display: block; }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── Section divider ────────────────────────────────────────── */

.section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 20px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

/* ── Dropdown menu ──────────────────────────────────────────── */

.dropdown {
  position: relative;
  display: inline-block;
}

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

.dropdown-menu.open { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.dropdown-item:hover { background: var(--light-bg); text-decoration: none; }
.dropdown-item.danger { color: var(--danger); }

/* ── Login page ─────────────────────────────────────────────── */

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

.login-left {
  width: 420px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 48px;
}

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

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

.login-brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  color: var(--brand-primary);
  letter-spacing: 0.04em;
}

.login-form {
  width: 100%;
}

.login-form h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  color: var(--text);
  margin-bottom: 6px;
}

.login-form p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 28px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text);
  justify-content: center;
  font-weight: 600;
}

.btn-google:hover { background: var(--light-bg); }

.login-right {
  flex: 1;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #4A0FDB 60%, var(--brand-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-right-content {
  position: relative;
  z-index: 1;
  color: white;
  max-width: 400px;
}

.login-right-content h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.95;
}

.login-right-content p {
  font-size: 1rem;
  opacity: 0.8;
  line-height: 1.6;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 75, 0.4);
  backdrop-filter: blur(2px);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover { color: var(--text); background: var(--light-bg); }

.modal-body { padding: 20px 24px 24px; }

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

/* ── Utility ────────────────────────────────────────────────── */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

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

@media (max-width: 1024px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
  .col-span-2 { grid-column: span 1; }
  .col-span-3 { grid-column: span 2; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .login-left { width: 100%; border-right: none; }
  .login-right { display: none; }
  .page-body { padding: 16px 20px 32px; }
  .page-header { padding: 20px 20px 0; }
}
