@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════
   جامعة التراث — Brand Identity
   Primary: #135796 (Royal Blue) | Dark: #04194e (Navy)
   Accent: #ffd400 (Gold)         | Highlight: #8B051C (Maroon)
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --brand-primary: #135796;
  --brand-primary-dark: #0e4378;
  --brand-primary-darker: #04194e;
  --brand-primary-light: #1a6bb8;
  --brand-primary-soft: #e8f0f9;
  --brand-primary-50: #f3f8fc;

  --brand-gold: #ffd400;
  --brand-gold-dark: #e6bd00;
  --brand-gold-soft: #fff8d4;

  --brand-maroon: #8B051C;
  --brand-maroon-dark: #6d0316;
  --brand-maroon-soft: #fce8eb;

  /* Surfaces */
  --surface-base: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-muted: #f2f5f9;
  --surface-elevated: #ffffff;
  --surface-overlay: rgba(4, 25, 78, 0.55);

  /* Text */
  --text-primary: #0a1724;
  --text-secondary: #2c3e50;
  --text-tertiary: #5a6776;
  --text-muted: #8a96a4;
  --text-disabled: #c5cbd0;
  --text-on-dark: #ffffff;
  --text-on-gold: #0a1724;

  /* Borders */
  --border-subtle: #e8ebf0;
  --border-default: #d8dde4;
  --border-strong: #b8c1cc;
  --border-focus: var(--brand-primary);

  /* Semantic */
  --success: #16a34a;
  --success-soft: #dcfce7;
  --success-text: #15803d;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --warning-text: #92400e;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --danger-text: #b91c1c;
  --info: #0284c7;
  --info-soft: #e0f2fe;
  --info-text: #075985;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(10, 23, 36, 0.05);
  --shadow-sm: 0 2px 4px rgba(10, 23, 36, 0.06), 0 1px 2px rgba(10, 23, 36, 0.04);
  --shadow: 0 4px 12px rgba(10, 23, 36, 0.08), 0 2px 4px rgba(10, 23, 36, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 23, 36, 0.10), 0 4px 8px rgba(10, 23, 36, 0.05);
  --shadow-lg: 0 16px 40px rgba(10, 23, 36, 0.12), 0 8px 16px rgba(10, 23, 36, 0.06);
  --shadow-focus: 0 0 0 3px rgba(19, 87, 150, 0.18);
  --shadow-focus-gold: 0 0 0 3px rgba(255, 212, 0, 0.32);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms var(--ease);
  --transition-fast: 120ms var(--ease);
  --transition-slow: 320ms var(--ease);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
}

/* ═══════════════════════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
  background: var(--surface-soft);
  color: var(--text-primary);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga";
}

::selection { background: var(--brand-primary); color: white; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface-muted); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); border: 2px solid var(--surface-muted); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h3 { font-size: 1.125rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-secondary); }

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

/* ═══════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════ */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.skip-link {
  position: absolute;
  top: -100px;
  right: 0;
  background: var(--brand-primary);
  color: white;
  padding: 12px 20px;
  z-index: 9999;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ═══════════════════════════════════════════════════════════
   HEADER (Top bar + Main nav)
   ═══════════════════════════════════════════════════════════ */
.site-header {
  background: var(--surface-base);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Top thin gold strip - brand accent */
.site-header::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-gold) 0%, var(--brand-gold-dark) 50%, var(--brand-gold) 100%);
}

.site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.site-brand:hover { text-decoration: none; }
.site-brand img { height: 48px; width: auto; }
.site-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.site-brand__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-primary-darker);
}
.site-brand__subtitle {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.site-nav a, .site-nav button {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav button:hover {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  text-decoration: none;
}
.site-nav a.is-active {
  background: var(--brand-primary);
  color: white;
}
.site-nav a.is-active:hover {
  background: var(--brand-primary-dark);
  color: white;
}

.nav-toggle {
  display: none;
  background: var(--surface-muted);
  border: 1px solid var(--border-default);
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */
.container { max-width: 1280px; margin: 0 auto; padding: var(--space-6) var(--space-5); }
.container-narrow { max-width: 760px; margin: 0 auto; padding: var(--space-6) var(--space-5); }
.container-medium { max-width: 980px; margin: 0 auto; padding: var(--space-6) var(--space-5); }

/* Page hero */
.page-hero {
  background: linear-gradient(135deg, var(--brand-primary-darker) 0%, var(--brand-primary) 100%);
  color: white;
  padding: var(--space-7) var(--space-5);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand-gold);
}
.page-hero__inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}
.page-hero h1 {
  color: white;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-bottom: var(--space-2);
}
.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  max-width: 640px;
}
.page-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  font-size: 1.6rem;
  margin-bottom: var(--space-3);
}

/* ═══════════════════════════════════════════════════════════
   CARD
   ═══════════════════════════════════════════════════════════ */
.card {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-xs);
}
.card--padded { padding: var(--space-7); }
.card--compact { padding: var(--space-4); }
.card--elevated { box-shadow: var(--shadow); }

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}
.card__header h2, .card__header h3 { margin: 0; }

.card__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════
   STATS CARDS
   ═══════════════════════════════════════════════════════════ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 4px;
  height: 100%;
  background: var(--brand-primary);
  opacity: 0.85;
}
.stat--blue::before { background: var(--brand-primary); }
.stat--gold::before { background: var(--brand-gold); }
.stat--maroon::before { background: var(--brand-maroon); }
.stat--success::before { background: var(--success); }
.stat--warning::before { background: var(--warning); }
.stat--danger::before { background: var(--danger); }
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-default);
}

.stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  font-size: 1.4rem;
  margin-bottom: var(--space-3);
}
.stat__number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat__label {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 4px;
}

.stat--blue .stat__icon { background: var(--brand-primary-soft); color: var(--brand-primary); }
.stat--gold .stat__icon { background: var(--brand-gold-soft); color: var(--brand-gold-dark); }
.stat--maroon .stat__icon { background: var(--brand-maroon-soft); color: var(--brand-maroon); }
.stat--success .stat__icon { background: var(--success-soft); color: var(--success-text); }
.stat--warning .stat__icon { background: var(--warning-soft); color: var(--warning-text); }
.stat--danger .stat__icon { background: var(--danger-soft); color: var(--danger-text); }

/* ═══════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════ */
.field { margin-bottom: var(--space-4); }
.field__label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.field__label .req { color: var(--brand-maroon); margin-inline-start: 2px; font-weight: 700; }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: var(--transition);
  direction: rtl;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-focus);
}

.select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%235a6776' viewBox='0 0 16 16'%3E%3Cpath d='M3.204 5L8 10.481 12.796 5H3.204z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-inline-end: 36px;
}
.textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.field--error .input,
.field--error .select,
.field--error .textarea {
  border-color: var(--danger);
  background: var(--danger-soft);
}
.field--error .input:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15); }

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--danger-text);
  font-weight: 500;
}
.field--error .field__error { display: flex; align-items: center; gap: 4px; }
.field__hint {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand-primary);
  color: white;
  box-shadow: var(--shadow-xs);
}
.btn--primary:not(:disabled):hover {
  background: var(--brand-primary-dark);
  box-shadow: var(--shadow-sm);
  color: white;
  text-decoration: none;
}
.btn--gold {
  background: var(--brand-gold);
  color: var(--text-on-gold);
  box-shadow: var(--shadow-xs);
}
.btn--gold:not(:disabled):hover {
  background: var(--brand-gold-dark);
  box-shadow: var(--shadow-sm);
  color: var(--text-on-gold);
  text-decoration: none;
}
.btn--secondary {
  background: var(--surface-base);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn--secondary:not(:disabled):hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--text-primary);
  text-decoration: none;
}
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn--ghost:not(:disabled):hover {
  background: var(--surface-muted);
  color: var(--text-primary);
}
.btn--success {
  background: var(--success);
  color: white;
}
.btn--success:not(:disabled):hover {
  background: var(--success-text);
  color: white;
  text-decoration: none;
}
.btn--danger {
  background: var(--brand-maroon);
  color: white;
}
.btn--danger:not(:disabled):hover {
  background: var(--brand-maroon-dark);
  color: white;
  text-decoration: none;
}
.btn--warning {
  background: var(--warning);
  color: white;
}
.btn--warning:not(:disabled):hover {
  background: var(--warning-text);
  color: white;
  text-decoration: none;
}

.btn--sm { padding: 6px 12px; font-size: 0.82rem; }
.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }

.btn-group { display: inline-flex; gap: var(--space-2); flex-wrap: wrap; }

.btn .spinner {
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Icon button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border-default);
  background: var(--surface-base);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}
.icon-btn:hover {
  background: var(--surface-muted);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ═══════════════════════════════════════════════════════════
   STEPS INDICATOR (Multi-step form)
   ═══════════════════════════════════════════════════════════ */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin: 0 auto var(--space-6);
  padding: var(--space-4) 0;
  max-width: 540px;
  position: relative;
}
.steps__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  background: var(--surface-base);
  padding: 0 12px;
}
.steps__circle {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-base);
  border: 2px solid var(--border-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.steps__step.is-active .steps__circle {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  box-shadow: 0 0 0 6px rgba(19, 87, 150, 0.12);
  transform: scale(1.05);
}
.steps__step.is-done .steps__circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.steps__step.is-done .steps__circle::before { content: '✓'; font-size: 1.1rem; }
.steps__step.is-done .steps__num { display: none; }
.steps__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.steps__step.is-active .steps__name { color: var(--brand-primary); font-weight: 700; }
.steps__step.is-done .steps__name { color: var(--success-text); }
.steps__line {
  flex: 1;
  height: 2px;
  background: var(--border-default);
  margin: 22px -8px 0;
  transition: var(--transition);
  z-index: 1;
}
.steps__line.is-done { background: var(--success); }

/* ═══════════════════════════════════════════════════════════
   FORM STEPS
   ═══════════════════════════════════════════════════════════ */
.form-step { display: none; }
.form-step.is-active {
  display: block;
  animation: fadeUp 0.3s var(--ease);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step__title {
  margin-bottom: var(--space-2);
}
.form-step__sub {
  color: var(--text-tertiary);
  margin-bottom: var(--space-5);
  font-size: 0.92rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

/* ═══════════════════════════════════════════════════════════
   TYPE SWITCHER (Choice cards)
   ═══════════════════════════════════════════════════════════ */
.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.choice__card {
  padding: var(--space-6) var(--space-5);
  background: var(--surface-base);
  border: 2px solid var(--border-default);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  outline: none;
}
.choice__card:hover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.choice__card.is-active {
  border-color: var(--brand-primary);
  background: var(--brand-primary-soft);
  box-shadow: 0 0 0 3px rgba(19, 87, 150, 0.10);
}
.choice__card.is-active::after {
  content: '✓';
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  width: 26px; height: 26px;
  background: var(--brand-primary);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(19, 87, 150, 0.32);
}
.choice__icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--brand-primary-soft);
  border-radius: 50%;
  transition: var(--transition);
  line-height: 1;
}
.choice__card.is-active .choice__icon {
  background: var(--brand-primary-soft);
  transform: scale(1.05);
}
.choice__title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.choice__desc {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   FILE UPLOAD
   ═══════════════════════════════════════════════════════════ */
.upload {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  cursor: pointer;
  background: var(--surface-soft);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.upload:hover, .upload.is-dragover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-50);
}
.upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload__icon {
  font-size: 2.4rem;
  display: block;
  color: var(--brand-primary);
  margin-bottom: var(--space-2);
}
.upload__text {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}
.upload__hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 6px;
}
.upload.has-file {
  border-color: var(--success);
  background: var(--success-soft);
  border-style: solid;
}
.upload.has-file .upload__icon { color: var(--success); }
.upload.has-file .upload__text { color: var(--success-text); }

.preview {
  margin-top: var(--space-3);
  max-width: 100%;
  max-height: 320px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--new { background: var(--brand-primary-soft); color: var(--brand-primary); border-color: rgba(19,87,150,0.18); }
.badge--reviewing { background: var(--warning-soft); color: var(--warning-text); border-color: rgba(217,119,6,0.18); }
.badge--approved { background: var(--success-soft); color: var(--success-text); border-color: rgba(22,163,74,0.18); }
.badge--rejected { background: var(--danger-soft); color: var(--danger-text); border-color: rgba(220,38,38,0.18); }
.badge--pending { background: var(--warning-soft); color: var(--warning-text); border-color: rgba(217,119,6,0.18); }
.badge--generated { background: var(--success-soft); color: var(--success-text); border-color: rgba(22,163,74,0.18); }
.badge--student { background: var(--brand-primary-soft); color: var(--brand-primary); border-color: rgba(19,87,150,0.18); }
.badge--staff { background: var(--brand-gold-soft); color: var(--brand-maroon); border-color: rgba(139,5,28,0.18); }
.badge--open { background: var(--info-soft); color: var(--info-text); border-color: rgba(2,132,199,0.18); }
.badge--in_progress { background: var(--warning-soft); color: var(--warning-text); border-color: rgba(217,119,6,0.18); }
.badge--resolved { background: var(--success-soft); color: var(--success-text); border-color: rgba(22,163,74,0.18); }
.badge--closed { background: var(--surface-muted); color: var(--text-muted); border-color: var(--border-default); }
.badge--draft { background: var(--surface-muted); color: var(--text-muted); border-color: var(--border-default); }
.badge--published { background: var(--success-soft); color: var(--success-text); border-color: rgba(22,163,74,0.18); }

/* ═══════════════════════════════════════════════════════════
   TABLE (responsive)
   ═══════════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface-base);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
thead {
  background: var(--surface-muted);
}
th {
  padding: 12px 16px;
  text-align: right;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}
tbody tr {
  transition: background var(--transition-fast);
}
tbody tr:hover { background: var(--surface-soft); }
tbody tr:last-child td { border-bottom: none; }

/* Mobile: convert table to cards */
@media (max-width: 768px) {
  .table-wrap.is-responsive table thead { display: none; }
  .table-wrap.is-responsive table,
  .table-wrap.is-responsive table tbody,
  .table-wrap.is-responsive table tr,
  .table-wrap.is-responsive table td { display: block; width: 100%; }
  .table-wrap.is-responsive table tr {
    background: var(--surface-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    padding: var(--space-3);
  }
  .table-wrap.is-responsive table td {
    padding: 6px 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: end;
    white-space: normal;
  }
  .table-wrap.is-responsive table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .table-wrap.is-responsive table td:first-child { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════════════════════ */
.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  align-items: center;
}
.filter-bar .input { padding: 10px 16px 10px 38px; }
.search-wrap { position: relative; }
.search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--surface-base);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(0.96);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.modal-close {
  width: 36px; height: 36px;
  background: var(--surface-muted);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--brand-maroon-soft); color: var(--brand-maroon); }

/* ═══════════════════════════════════════════════════════════
   DETAIL ROWS
   ═══════════════════════════════════════════════════════════ */
.detail-list {
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 4px var(--space-4);
}
.detail-list__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.detail-list__row:last-child { border-bottom: none; }
.detail-list__label {
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 0.85rem;
}
.detail-list__value {
  font-weight: 600;
  color: var(--text-primary);
  text-align: end;
  word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════
   CREDENTIALS BOX
   ═══════════════════════════════════════════════════════════ */
.creds {
  background: linear-gradient(135deg, var(--brand-primary-darker) 0%, var(--brand-primary) 100%);
  color: white;
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-top: var(--space-4);
  position: relative;
  overflow: hidden;
}
.creds::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  background: var(--brand-gold);
}
.creds h3 { color: white; margin-bottom: var(--space-3); font-size: 1.05rem; }
.creds__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  direction: ltr;
}
.creds__label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  min-width: 100px;
  text-align: left;
}
.creds__value {
  color: var(--brand-gold);
  font-family: 'Courier New', monospace;
  font-weight: 700;
  flex: 1;
  text-align: left;
  user-select: all;
  word-break: break-all;
}
.creds__copy {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.9rem;
}
.creds__copy:hover { background: rgba(255, 255, 255, 0.2); }
.creds__warning {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--brand-gold);
  font-size: 0.82rem;
}

/* ═══════════════════════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════════════════════ */
.timeline { padding: var(--space-2) 0; }
.timeline__item {
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-5);
  position: relative;
}
.timeline__item::before {
  content: '';
  position: absolute;
  right: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border-default);
}
.timeline__item:last-child::before { display: none; }
.timeline__dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-base);
  border: 2px solid var(--brand-primary);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--brand-primary);
  z-index: 1;
}
.timeline__item.is-success .timeline__dot { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.timeline__item.is-warning .timeline__dot { border-color: var(--warning); color: var(--warning); background: var(--warning-soft); }
.timeline__item.is-danger .timeline__dot { border-color: var(--brand-maroon); color: var(--brand-maroon); background: var(--brand-maroon-soft); }
.timeline__content { flex: 1; padding-top: 6px; }
.timeline__action { font-weight: 600; color: var(--text-primary); font-size: 0.92rem; }
.timeline__date { color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 12px 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  transform: translateX(420px);
  transition: transform 0.3s var(--ease);
  max-width: calc(100vw - 48px);
}
.toast.show { transform: translateX(0); }
.toast.success { border-inline-start: 4px solid var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-inline-start: 4px solid var(--danger); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info { border-inline-start: 4px solid var(--info); }
.toast.info .toast-icon { color: var(--info); }
.toast-icon { font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════════════
   ALERT
   ═══════════════════════════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}
.alert--info { background: var(--info-soft); border-color: rgba(2,132,199,0.2); color: var(--info-text); }
.alert--success { background: var(--success-soft); border-color: rgba(22,163,74,0.2); color: var(--success-text); }
.alert--warning { background: var(--warning-soft); border-color: rgba(217,119,6,0.2); color: var(--warning-text); }
.alert--danger { background: var(--danger-soft); border-color: rgba(220,38,38,0.2); color: var(--danger-text); }

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════ */
.empty {
  text-align: center;
  padding: var(--space-7) var(--space-4);
}
.empty__icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
  opacity: 0.4;
}
.empty h3 {
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}
.empty p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════
   SKELETON
   ═══════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--surface-muted) 0%, var(--border-subtle) 50%, var(--surface-muted) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-xs);
  display: inline-block;
}
.skeleton--text { height: 14px; width: 100%; margin-bottom: 8px; }
.skeleton--card { height: 120px; width: 100%; border-radius: var(--radius); margin-bottom: 12px; }
.skeleton--row { display: block; height: 40px; margin-bottom: 8px; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-muted);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-5);
}
.tab {
  flex: 1;
  padding: 10px 14px;
  text-align: center;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  font-family: inherit;
  transition: var(--transition);
}
.tab:hover { color: var(--text-primary); }
.tab.is-active {
  background: var(--surface-base);
  color: var(--brand-primary);
  box-shadow: var(--shadow-xs);
}

/* ═══════════════════════════════════════════════════════════
   AUTH (Hero login)
   ═══════════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--brand-primary-darker) 0%, var(--brand-primary) 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.auth-screen::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 6px;
  background: var(--brand-gold);
}
.auth-card {
  background: var(--surface-base);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-card__logo {
  text-align: center;
  margin-bottom: var(--space-5);
}
.auth-card__logo img { height: 70px; width: auto; }
.auth-card h1 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-2);
}
.auth-card p {
  text-align: center;
  color: var(--text-tertiary);
  margin-bottom: var(--space-5);
  font-size: 0.92rem;
}

/* ═══════════════════════════════════════════════════════════
   SEARCH HERO (Track / KB)
   ═══════════════════════════════════════════════════════════ */
.search-hero {
  background: linear-gradient(135deg, var(--brand-primary-darker) 0%, var(--brand-primary) 100%);
  color: white;
  padding: var(--space-7) var(--space-5);
  text-align: center;
  position: relative;
  border-bottom: 4px solid var(--brand-gold);
}
.search-hero h1 { color: white; margin-bottom: var(--space-2); }
.search-hero p { color: rgba(255, 255, 255, 0.85); margin-bottom: var(--space-5); }
.search-hero__form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-2);
}
.search-hero__form .input {
  flex: 1;
  background: white;
  font-size: 1.05rem;
  padding: 14px 18px;
}

/* ═══════════════════════════════════════════════════════════
   KB
   ═══════════════════════════════════════════════════════════ */
.kb-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
@media (min-width: 1024px) {
  .kb-categories { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 600px) {
  .kb-categories { grid-template-columns: repeat(2, 1fr); }
}
.kb-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) var(--space-3);
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.kb-category:hover {
  border-color: var(--brand-primary);
  color: inherit;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.kb-category.is-active {
  border-color: var(--brand-primary);
  background: var(--brand-primary-soft);
}
.kb-category.is-active .kb-category__icon {
  background: var(--brand-primary);
  color: white;
}
.kb-category__icon {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  margin-bottom: var(--space-3);
  font-size: 1.3rem;
  transition: var(--transition);
}
.kb-category__title { font-weight: 700; color: var(--text-primary); margin-bottom: 4px; font-size: 0.92rem; }
.kb-category__count { color: var(--text-muted); font-size: 0.78rem; }

.kb-list { display: flex; flex-direction: column; gap: var(--space-3); }
.kb-article {
  padding: var(--space-4) var(--space-5);
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.kb-article:hover {
  border-color: var(--brand-primary);
  transform: translateX(-3px);
  box-shadow: var(--shadow-sm);
}
.kb-article__title {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}
.kb-article__excerpt {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════
   TICKETS
   ═══════════════════════════════════════════════════════════ */
.ticket-list { display: flex; flex-direction: column; gap: var(--space-3); }
.ticket-card {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.ticket-card:hover {
  border-color: var(--brand-primary);
  transform: translateX(-3px);
  box-shadow: var(--shadow-sm);
}
.ticket-priority {
  width: 4px;
  align-self: stretch;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.ticket-priority--low { background: var(--info); }
.ticket-priority--medium { background: var(--warning); }
.ticket-priority--high { background: var(--brand-maroon); }
.ticket-card__body { flex: 1; min-width: 0; }
.ticket-card__title {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--text-primary);
}
.ticket-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.ticket-card__meta strong { color: var(--text-secondary); font-weight: 600; }

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.ticket-message {
  padding: var(--space-4);
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}
.ticket-message.is-admin {
  background: var(--brand-primary-50);
  border-color: rgba(19, 87, 150, 0.18);
  margin-inline-start: var(--space-5);
}
.ticket-message__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: 0.82rem;
}
.ticket-message__author { font-weight: 700; color: var(--text-primary); }
.ticket-message__author.is-admin { color: var(--brand-primary); }
.ticket-message__date { color: var(--text-muted); }
.ticket-message__body {
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════
   QR CODE
   ═══════════════════════════════════════════════════════════ */
.qr {
  display: inline-block;
  padding: var(--space-3);
  background: white;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}
.qr canvas, .qr img { display: block; max-width: 160px; }

/* ═══════════════════════════════════════════════════════════
   TRACKING CODE BOX
   ═══════════════════════════════════════════════════════════ */
.code-box {
  background: var(--brand-primary-50);
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  text-align: center;
}
.code-box__label {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  margin-bottom: 6px;
  font-weight: 500;
}
.code-box__value {
  font-family: 'Courier New', monospace;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-primary);
  letter-spacing: 3px;
  direction: ltr;
  user-select: all;
}

/* ═══════════════════════════════════════════════════════════
   CHART
   ═══════════════════════════════════════════════════════════ */
.chart-wrap {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.chart-wrap canvas { max-height: 280px; }

/* ═══════════════════════════════════════════════════════════
   SETUP STEPS
   ═══════════════════════════════════════════════════════════ */
.setup-steps { display: flex; flex-direction: column; gap: var(--space-3); }
.setup-step {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}
.setup-step__num {
  width: 32px; height: 32px;
  background: var(--brand-primary);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.setup-step__content h4 { margin-bottom: 4px; color: var(--text-primary); }
.setup-step__content p, .setup-step__content li { color: var(--text-tertiary); font-size: 0.88rem; line-height: 1.7; }
.setup-step__content ul { padding-inline-start: 1.2rem; margin-top: 4px; }
.setup-step__content code {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  direction: ltr;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--success-text); }
.text-danger { color: var(--danger-text); }
.text-primary { color: var(--brand-primary); }
.text-bold { font-weight: 700; }
.font-mono { font-family: 'Courier New', monospace; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); } .mt-3 { margin-top: var(--space-3); } .mt-4 { margin-top: var(--space-4); } .mt-5 { margin-top: var(--space-5); } .mt-6 { margin-top: var(--space-6); }
.mb-1 { margin-bottom: var(--space-1); } .mb-2 { margin-bottom: var(--space-2); } .mb-3 { margin-bottom: var(--space-3); } .mb-4 { margin-bottom: var(--space-4); } .mb-5 { margin-bottom: var(--space-5); } .mb-6 { margin-bottom: var(--space-6); }

kbd {
  background: var(--surface-muted);
  border: 1px solid var(--border-default);
  border-bottom-width: 2px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.4s var(--ease) forwards; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .site-nav a, .site-nav button { padding: 8px 12px; font-size: 0.85rem; }
  .site-brand__title { font-size: 0.95rem; }
  .site-brand__subtitle { display: none; }
}

@media (max-width: 768px) {
  .container, .container-narrow, .container-medium { padding: var(--space-4); }
  .site-header__inner { padding: var(--space-3) var(--space-4); flex-wrap: wrap; gap: var(--space-2); }
  .site-brand img { height: 40px; }
  .site-brand__title { font-size: 1rem; }
  .site-nav { width: 100%; justify-content: center; flex-wrap: wrap; gap: 4px; padding-top: 10px; border-top: 1px solid var(--border-subtle); margin-top: 4px; overflow-x: auto; }
  .site-nav a, .site-nav button { padding: 8px 12px; font-size: 0.82rem; }
  .field-row { grid-template-columns: 1fr; }
  .choice { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .select { width: 100%; }
  .form-actions { flex-direction: column-reverse; gap: var(--space-2); }
  .form-actions .btn { width: 100%; }
  .form-actions > span { display: none; }
  .modal { padding: var(--space-5); }
  .steps { max-width: 100%; }
  .steps__name { display: none; }
  .steps__circle { width: 38px; height: 38px; font-size: 0.9rem; }
  .ticket-message.is-admin { margin-inline-start: var(--space-3); }
  .search-hero__form { flex-direction: column; }
  .search-hero { padding: var(--space-6) var(--space-4); }
  .page-hero { padding: var(--space-6) var(--space-4); }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .auth-card { padding: var(--space-5); }
}
