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

/* ─────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────── */
:root {
  --bg:           #f7f5f2;
  --surface:      #ffffff;
  --surface-2:    #f0ede8;
  --surface-3:    #e8e4de;
  --text:         #141210;
  --text-2:       #4a4540;
  --text-3:       #8c857d;
  --line:         rgba(20,18,16,.10);
  --line-2:       rgba(20,18,16,.18);

  --ink:          #141210;
  --ink-inv:      #ffffff;

  --accent:       #c9420e;
  --accent-soft:  #f9ece6;
  --accent-mid:   #e8602a;
  --accent-dark:  #8c2b07;

  --teal:         #0e7c72;
  --teal-soft:    #e3f4f2;
  --green:        #1a6e3c;
  --green-soft:   #e6f5ec;
  --amber:        #a05c00;
  --amber-soft:   #fdf3e3;
  --red:          #b91c1c;
  --red-soft:     #fef2f2;
  --blue:         #1d4ed8;
  --blue-soft:    #eff6ff;

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --radius-full:  999px;

  --shadow-sm:    0 1px 3px rgba(20,18,16,.06), 0 1px 2px rgba(20,18,16,.04);
  --shadow:       0 4px 12px rgba(20,18,16,.07), 0 2px 4px rgba(20,18,16,.04);
  --shadow-lg:    0 12px 32px rgba(20,18,16,.10), 0 4px 8px rgba(20,18,16,.05);
  --shadow-xl:    0 20px 40px rgba(20,18,16,.12), 0 8px 16px rgba(20,18,16,.08);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --sidebar-w:    256px;
  --topbar-h:     64px;
  
  /* Spacing scale */
  --sp-xs:        4px;
  --sp-sm:        8px;
  --sp-md:        12px;
  --sp-lg:        16px;
  --sp-xl:        24px;
  --sp-2xl:       32px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
textarea { resize: none; }

/* ─────────────────────────────────────────
   LAYOUT PRIMITIVES
───────────────────────────────────────── */
.container {
  width: min(1160px, 94%);
  margin-inline: auto;
}

.main { padding-bottom: 48px; }

.wrapper {
  min-height: calc(100vh - var(--topbar-h));
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.content { display: grid; gap: 18px; }

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

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* ─────────────────────────────────────────
   PUBLIC NAVBAR (index, login, register)
───────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,245,242,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  height: var(--topbar-h);
}

.logo-link {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 2px;
}
.logo-link span { color: var(--accent); }

.nav-links, .nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link, .nav-btn {
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: background .15s, color .15s;
  border: 1px solid transparent;
}

.nav-link:hover, .nav-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-link.active, .nav-btn.active {
  background: var(--ink);
  color: var(--ink-inv);
  border-color: var(--ink);
}

/* ─────────────────────────────────────────
   CARDS / SURFACES
───────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(20,18,16,.15);
}

.card h1, .card h2, .card h3, .card h4 {
  font-family: var(--font-display);
  margin-bottom: var(--sp-md);
  color: var(--text);
}

.card h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.card h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.card h3 { font-size: 1.125rem; font-weight: 700; }
.card h4 { font-size: 1rem; font-weight: 600; }

.card p {
  margin-bottom: var(--sp-md);
  color: var(--text-2);
  line-height: 1.6;
}

.card p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn, .submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  transition: background .2s ease, border-color .2s ease, transform .1s ease, box-shadow .2s ease;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.btn:hover {
  background: var(--surface-2);
  border-color: rgba(20,18,16,.25);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn:active { 
  transform: translateY(0);
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary, .submit-btn {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ink-inv);
}

.btn-primary:hover, .submit-btn:hover {
  background: #2d2820;
  border-color: #2d2820;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.btn-primary:active, .submit-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn-accent:hover {
  background: var(--accent-mid);
  border-color: var(--accent-mid);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.btn-accent:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.submit-btn {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
}

.danger-btn {
  background: var(--red-soft);
  border-color: #fca5a5;
  color: var(--red);
  font-weight: 600;
}
.danger-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

button[disabled] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─────────────────────────────────────────
   FORM CONTROLS
───────────────────────────────────────── */
.field { margin-bottom: var(--sp-lg); }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-sm);
  letter-spacing: .02em;
}

form {
  width: 100%;
}

.service-form,
.event-edit-form,
.modal-form {
  display: grid;
  gap: var(--sp-xl);
  width: 100%;
}

.form-field,
.field {
  display: grid;
  gap: var(--sp-sm);
  min-width: 0;
}

.form-field label,
.field label {
  margin-bottom: 0;
}

.form-field-input,
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field select,
.form-field textarea,
.field input,
.field select,
.field textarea,
.page-card input,
.page-card select,
.page-card textarea,
.auth-card input,
.auth-card select,
.auth-card textarea {
  width: 100%;
  max-width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  outline: none;
}

.form-field-input:focus,
.form-field input[type="text"]:focus,
.form-field input[type="email"]:focus,
.form-field input[type="password"]:focus,
.form-field input[type="number"]:focus,
.form-field input[type="date"]:focus,
.form-field select:focus,
.form-field textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.page-card input:focus,
.page-card select:focus,
.page-card textarea:focus,
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,66,14,.12);
  background: #fffbf8;
}

/* Form validation states */
.form-field input:invalid,
.form-field select:invalid,
.form-field textarea:invalid {
  border-color: var(--red);
}

.form-field input:invalid:focus,
.form-field select:invalid:focus,
.form-field textarea:invalid:focus {
  box-shadow: 0 0 0 3px rgba(185,28,28,.12);
}

.form-field textarea,
.field textarea,
.page-card textarea,
.auth-card textarea {
  min-height: 120px;
  resize: vertical;
}

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

.form-help {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

.form-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  flex-wrap: wrap;
  margin-top: var(--sp-lg);
}

.form-actions .btn,
.modal-actions .btn {
  flex: 1 1 160px;
  justify-content: center;
  min-width: 120px;
}

.event-own-venue-field {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-2);
}

.event-own-venue-field input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
.input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,66,14,.12);
  background: #fffbf8;
}

.select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,66,14,.12);
}

.textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  min-height: 100px;
  resize: none;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  font-family: inherit;
}

.textarea:focus { 
  border-color: var(--accent); 
  box-shadow: 0 0 0 3px rgba(201,66,14,.12);
  background: #fffbf8;
}

/* ─────────────────────────────────────────
   BADGES / STATUS
───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
}

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

.badge.pending    { background: var(--amber-soft); color: var(--amber); }
.badge.pending::before { background: var(--amber); }
.badge.confirmed  { background: var(--green-soft); color: var(--green); }
.badge.confirmed::before { background: var(--green); }
.badge.rejected   { background: var(--red-soft); color: var(--red); }
.badge.rejected::before { background: var(--red); }
.badge.info-tag   { background: var(--blue-soft); color: var(--blue); }
.badge.info-tag::before { background: var(--blue); }
.badge.draft-tag  { background: var(--surface-2); color: var(--text-3); }
.badge.draft-tag::before { background: var(--text-3); }

/* ─────────────────────────────────────────
   STATUS / HELPER TEXT
───────────────────────────────────────── */
.status-text {
  margin-top: 10px;
  font-size: 13px;
  color: var(--teal);
  font-weight: 500;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 20% 20%, #ffedd5 0%, transparent 45%),
              radial-gradient(circle at 80% 0%, #ccfbf1 0%, transparent 35%),
              var(--bg);
  padding: 16px;
}

.page-card {
  width: min(480px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(31, 41, 55, 0.08);
}

.page-card h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.page-card p {
  margin: 0 0 12px;
  color: var(--text-3);
}

.page-card label {
  display: block;
  margin: 8px 0 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.page-card input {
  width: 100%;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.page-card button,
.page-link-btn {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  background: linear-gradient(135deg, var(--accent), #ea580c);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.page-card .secondary-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--teal);
  font-weight: 600;
}

.page-center {
  text-align: center;
}

.muted { color: var(--text-3); }

/* ─────────────────────────────────────────
   HERO (public homepage)
───────────────────────────────────────── */
.hero {
  background: var(--ink);
  color: var(--ink-inv);
  border-radius: var(--radius-xl);
  padding: 72px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-top: 28px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(201,66,14,.28) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(14,124,114,.20) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  position: relative;
  margin-bottom: 14px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-mid);
}

.hero p {
  color: rgba(255,255,255,.65);
  max-width: 540px;
  margin: 0 auto 28px;
  font-size: 16px;
  position: relative;
}

.hero .btn-accent {
  position: relative;
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 600;
}

/* ─────────────────────────────────────────
   AUTH LAYOUT
───────────────────────────────────────── */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.auth-brand {
  background: linear-gradient(145deg, #141210 0%, #1f1b16 100%);
  color: #fff;
  padding: 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
}

.auth-brand::before {
  width: 440px;
  height: 440px;
  top: -120px;
  right: -120px;
  background: radial-gradient(circle, rgba(201, 66, 14, 0.34) 0%, transparent 70%);
}

.auth-brand::after {
  width: 360px;
  height: 360px;
  left: -140px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(14, 124, 114, 0.24) 0%, transparent 70%);
}

.auth-brand-top,
.auth-brand-bottom {
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.auth-brand-logo span { color: var(--accent-mid); }

.auth-brand-copy {
  max-width: 420px;
  margin-top: 88px;
}

.auth-brand-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin-bottom: 14px;
}

.auth-brand-copy p {
  color: rgba(255, 255, 255, 0.68);
  max-width: 420px;
  font-size: 15px;
}

.auth-brand-metrics {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.auth-metric {
  min-width: 118px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.auth-metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.auth-metric span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card { width: min(520px, 100%); }

.auth-mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-bottom: 18px;
}

.auth-mode-switch a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
}

.auth-mode-switch a.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.auth-tab {
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
}

.auth-tab.active {
  background: var(--ink);
  color: var(--ink-inv);
  border-color: var(--ink);
}

.auth-intro {
  margin-top: 6px;
  margin-bottom: 10px;
  color: var(--text-3);
}

.auth-socials {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.social-btn {
  width: 100%;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--text);
}

.social-btn .social-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: conic-gradient(from 180deg, #ea4335 0 25%, #fbbc05 25% 50%, #34a853 50% 75%, #4285f4 75% 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-role-panel { display: none; }
.auth-role-panel.active { display: block; }

.auth-footer {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
}

.auth-footer a {
  color: var(--accent-dark);
  font-weight: 700;
}

.field-grid-2 {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-3);
}

.auth-row-utility { margin-bottom: 16px; }
.remember-no-margin { margin-bottom: 0; }

.password-toggle-wrap { 
  position: relative; 
}

.password-toggle-wrap input { 
  padding-right: 52px; 
}

.password-toggle-wrap .input { 
  padding-right: 52px; 
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: 8px;
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.password-toggle-btn svg { pointer-events: none; }

/* ─────────────────────────────────────────
   TOAST
───────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 260px;
  max-width: 420px;
  background: #111827;
  color: #f9fafb;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid #9ca3af;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ef4444; }
.toast-info { border-left-color: #38bdf8; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 320px; }
  .auth-brand-copy { margin-top: 42px; }
}

@media (max-width: 640px) {
  .auth-brand { display: none; }
  .auth-panel { padding: 20px 12px; }
  .auth-card { width: 100%; padding: 22px; }
  .field-grid-2 { grid-template-columns: 1fr; }
  .form-actions,
  .modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .form-actions .btn,
  .modal-actions .btn {
    width: 100%;
    flex: 1 1 auto;
  }
  .row-between,
  .row {
    align-items: stretch;
  }
  .toast-wrap {
    right: 10px;
    left: 10px;
    top: 10px;
  }
  .toast { min-width: 0; max-width: 100%; }
  .container { width: min(1160px, 92%); }
}

/* ─────────────────────────────────────────
   SECTION
───────────────────────────────────────── */
.section { margin-top: 24px; }
.section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ─────────────────────────────────────────
   IMAGE PLACEHOLDER
───────────────────────────────────────── */
.image-placeholder {
  height: 160px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 12px;
}

/* ─────────────────────────────────────────
   TOOLBAR (services page)
───────────────────────────────────────── */
.toolbar {
  display: grid;
  gap: 10px;
  grid-template-columns: 2fr 1fr 1fr;
  margin-top: 14px;
}

/* ─────────────────────────────────────────
   TABS (login/register)
───────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s, box-shadow .15s;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.panel { display: none; }
.panel.active { display: block; }

/* ─────────────────────────────────────────
   AUTH CARD (login/register)
───────────────────────────────────────── */
.auth-card {
  width: min(480px, 100%);
  padding: 32px;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--text-3);
  font-size: 14px;
  margin-bottom: 22px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}

.bottom-link {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

.bottom-link a {
  color: var(--accent);
  font-weight: 500;
}

/* ─────────────────────────────────────────
   TABLE
───────────────────────────────────────── */
.table-wrap { 
  overflow-x: auto; 
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: linear-gradient(to right, var(--surface-2), var(--surface-2));
  border-bottom: 1px solid var(--line);
}

th {
  padding: 14px var(--sp-lg);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

th:first-child { padding-left: var(--sp-xl); }
th:last-child { padding-right: var(--sp-xl); }

tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background .15s ease;
}

tbody tr:hover {
  background: rgba(201,66,14,.02);
}

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

td {
  padding: 14px var(--sp-lg);
  color: var(--text);
  white-space: nowrap;
  vertical-align: middle;
}

td:first-child { padding-left: var(--sp-xl); }
td:last-child { padding-right: var(--sp-xl); }

/* Table responsive */
@media (max-width: 768px) {
  table {
    font-size: 13px;
  }
  th, td {
    padding: 12px 10px;
  }
  th:first-child, td:first-child { padding-left: 12px; }
  th:last-child, td:last-child { padding-right: 12px; }
}

/* ─────────────────────────────────────────
   FOOTER (public)
───────────────────────────────────────── */
.footer {
  padding: 24px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

/* ─────────────────────────────────────────
   STAT CARDS
───────────────────────────────────────── */
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-2);
  opacity: .6;
}

.stat-card h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: var(--font-body);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  line-height: 1;
  margin: 0;
}

/* ─────────────────────────────────────────
   DROPDOWN / NOTIFICATIONS
───────────────────────────────────────── */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 200;
}

.dropdown.open .dropdown-menu {
  display: grid;
  gap: 4px;
  animation: fadeDown .15s ease;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-menu a,
.dropdown-action {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-2);
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .1s;
}

.dropdown-menu a:hover,
.dropdown-action:hover {
  background: var(--surface-2);
  color: var(--text);
}

.dropdown-menu p {
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

/* ─────────────────────────────────────────
   ICON BUTTON / AVATAR
───────────────────────────────────────── */
.icon-btn {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }

.avatar-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--ink-inv);
  font-weight: 700;
  font-size: 14px;
  border-color: var(--ink);
}

/* ─────────────────────────────────────────
   DATE LABEL
───────────────────────────────────────── */
.date-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  padding: 5px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
}

/* ─────────────────────────────────────────
   VERIFIED BADGE
───────────────────────────────────────── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

/* ─────────────────────────────────────────
   CLICKABLE CARD
───────────────────────────────────────── */
.clickable-card {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.clickable-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ─────────────────────────────────────────
   MODAL
───────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20,18,16,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl);
  z-index: 300;
  animation: fadeInBackdrop .25s ease;
}

@keyframes fadeInBackdrop {
  from { 
    background: rgba(20,18,16,0);
    backdrop-filter: blur(0);
  }
  to { 
    background: rgba(20,18,16,.55);
    backdrop-filter: blur(6px);
  }
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(540px, 100%);
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  padding: var(--sp-2xl);
  box-shadow: var(--shadow-xl);
  animation: slideUpModal .25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slideUpModal {
  from { 
    opacity: 0; 
    transform: translateY(20px) scale(.98);
  }
  to { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

.modal-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: var(--sp-lg);
  color: var(--text);
  letter-spacing: -.01em;
}

.modal-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--sp-xl);
  color: var(--text);
  letter-spacing: -.02em;
}

/* Close button for modals */
.modal-close {
  position: absolute;
  top: var(--sp-xl);
  right: var(--sp-xl);
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .2s ease;
}

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

/* ─────────────────────────────────────────
   STEPPER (create event)
───────────────────────────────────────── */
.stepper {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.step {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--surface-2);
}

.step.active {
  background: var(--ink);
  color: var(--ink-inv);
  border-color: var(--ink);
}

.stage { display: none; }
.stage.active { display: block; }

/* ─────────────────────────────────────────
   SERVICE CHIPS (create event)
───────────────────────────────────────── */
.service-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px;
}

.service-chip {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.service-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* ─────────────────────────────────────────
   CHAT BOX (messages)
───────────────────────────────────────── */
.chat-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
}

.chat-box p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* ─────────────────────────────────────────
   FILTER CHIPS
───────────────────────────────────────── */
.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
}
.chip:hover {
  border-color: var(--line-2);
  color: var(--text);
  background: var(--surface-2);
}
.chip.active {
  background: var(--ink);
  color: var(--ink-inv);
  border-color: var(--ink);
}

/* ─────────────────────────────────────────
   VENDOR AVATAR
───────────────────────────────────────── */
.vendor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--ink-inv);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   AVAILABILITY SELECT
───────────────────────────────────────── */
.availability-select { min-width: 160px; }

/* ─────────────────────────────────────────
   WRAP MOBILE UTILITY
───────────────────────────────────────── */
.wrap-mobile { flex-wrap: wrap; }

/* ─────────────────────────────────────────
   SESSION BAR (home page)
───────────────────────────────────────── */
[data-session-bar] {
  padding: 14px 20px;
  justify-content: space-between;
  margin-top: 24px;
}

/* ─────────────────────────────────────────
   APP SHELL (logged-in pages)
   sidebar layout
───────────────────────────────────────── */
body[data-require-role] {
  background:
    radial-gradient(circle at 0% 0%, rgba(201,66,14,.06) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(14,124,114,.05) 0%, transparent 40%),
    var(--bg);
}

/* The navbar becomes a vertical sidebar */
body[data-require-role] .navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  border-right: 1px solid var(--line);
  border-bottom: none;
  background: var(--surface);
  border-radius: 0;
  backdrop-filter: none;
  z-index: 100;
  overflow-y: auto;
}

body[data-require-role] .nav-inner {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  height: 100%;
  padding: 20px 14px;
  gap: 0;
}

body[data-require-role] .logo-link {
  padding: 8px 8px 20px;
  font-size: 1.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

body[data-require-role] .nav-links,
body[data-require-role] .nav-center {
  flex-direction: column;
  gap: 2px;
  width: 100%;
  flex: 1;
}

body[data-require-role] .nav-link {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: var(--radius);
  justify-content: flex-start;
  border: 1px solid transparent;
}

body[data-require-role] .nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: transparent;
}

body[data-require-role] .nav-link.active {
  background: var(--ink);
  color: var(--ink-inv);
  border-color: var(--ink);
}

body[data-require-role] .nav-tools {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* Dropdowns and buttons in sidebar tools */
body[data-require-role] .dropdown,
body[data-require-role] .nav-tools > .btn {
  width: 100%;
}

body[data-require-role] .icon-btn,
body[data-require-role] .avatar-btn {
  width: 100%;
  border-radius: var(--radius);
  text-align: left;
  justify-content: flex-start;
  padding: 9px 12px;
  height: auto;
}

body[data-require-role] .avatar-btn {
  width: 100%;
  border-radius: var(--radius);
}

body[data-require-role] .dropdown-menu {
  left: calc(100% + 10px);
  right: auto;
  top: 0;
  bottom: auto;
}

body[data-require-role] .nav-tools > .btn {
  width: 100%;
  justify-content: center;
}

/* Main content area */
body[data-require-role] .main.container {
  margin-left: calc(var(--sidebar-w) + 20px);
  margin-right: 20px;
  margin-top: 24px;
  width: auto;
  max-width: none;
  min-height: 100vh;
}

/* Sidebar profile + bottom blocks */
body[data-require-role] .sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

body[data-require-role] .sidebar-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink) 0%, #3a3329 100%);
  flex-shrink: 0;
}

body[data-require-role] .sidebar-user-name {
  font-size: 14px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--text);
}

body[data-require-role] .sidebar-user-role {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

body[data-require-role] .sidebar-notification {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 10px;
}

body[data-require-role] .sidebar-notification-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

body[data-require-role] .sidebar-notification-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}

/* WhatsApp/Telegram-style page layout */
.message-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.message-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.chat-thread-template {
  display: none;
}

.message-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message-list-head h2 {
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.message-search .input {
  border-radius: var(--radius-full);
  background: var(--surface-2);
}

.chat-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}

/* ─────────────────────────────────────────
   FORM HELP & ALERTS
───────────────────────────────────────── */
.form-help {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
}

.alert {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.alert h2 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.alert p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-2);
}

.alert-error {
  background: var(--red-soft);
  border-color: #fca5a5;
  color: var(--red);
}

.alert-error h2,
.alert-error p {
  color: var(--red);
}

.chat-item:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

.chat-item.active {
  background: var(--ink);
  color: var(--ink-inv);
  border-color: var(--ink);
}

.chat-item.active p,
.chat-item.active time {
  color: rgba(255,255,255,.72);
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  flex-shrink: 0;
}

.chat-item.active .chat-avatar {
  background: rgba(255,255,255,.16);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

.chat-copy {
  min-width: 0;
}

.chat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-row h3 {
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-row time {
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
}

.chat-copy p {
  font-size: 13px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-thread {
  padding: 0;
  overflow: hidden;
}

.thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.thread-head h3 {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.1;
}

.thread-head p {
  font-size: 12px;
}

.thread-body {
  background:
    radial-gradient(circle at 15% 15%, rgba(14,124,114,.08), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(201,66,14,.07), transparent 30%),
    var(--surface-2);
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 18px 16px;
  min-height: 300px;
}

.bubble-row {
  display: flex;
  margin-bottom: 8px;
}

.bubble-row-out {
  justify-content: flex-end;
}

.bubble {
  max-width: min(76%, 520px);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}

.bubble-in {
  border-radius: 0 12px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.bubble-out {
  border-radius: 12px 0 12px 12px;
  background: linear-gradient(145deg, #141210 0%, #2f2921 100%);
  color: #fff;
}

.thread-compose {
  border-top: 1px solid var(--line);
  padding: 12px;
  background: var(--surface);
}

.thread-compose .textarea {
  min-height: 82px;
  border-radius: 12px;
}

.thread-compose-actions {
  justify-content: flex-end;
  margin-top: 8px;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .toolbar { grid-template-columns: 1fr; }

  body[data-require-role] .navbar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  body[data-require-role] .nav-inner {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
    height: auto;
  }

  body[data-require-role] .logo-link {
    padding: 0;
    border-bottom: none;
    margin-bottom: 0;
  }

  body[data-require-role] .nav-links,
  body[data-require-role] .nav-center {
    flex-direction: row;
    flex: 0 0 100%;
    flex-wrap: wrap;
  }

  body[data-require-role] .nav-link {
    width: auto;
  }

  body[data-require-role] .nav-tools {
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 0;
    border-top: none;
    margin-top: 0;
  }

  body[data-require-role] .icon-btn,
  body[data-require-role] .avatar-btn,
  body[data-require-role] .dropdown,
  body[data-require-role] .nav-tools > .btn {
    width: auto;
  }

  body[data-require-role] .dropdown-menu {
    left: 0;
    right: auto;
    top: calc(100% + 8px);
  }

  body[data-require-role] .main.container {
    margin: 16px;
  }

  .message-workspace {
    grid-template-columns: 1fr;
  }

  .message-list {
    min-height: auto;
  }

  .thread-body {
    min-height: 220px;
  }
}

@media (max-width: 600px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .tabs { flex-direction: column; }
  .hero { padding: 48px 20px; border-radius: var(--radius-lg); }
  .auth-card { padding: 24px 18px; }
  .toolbar { grid-template-columns: 1fr; }

  .nav-inner { flex-wrap: wrap; gap: 10px; }
}

/* ─────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2xl) var(--sp-xl);
  text-align: center;
  min-height: 280px;
  gap: var(--sp-xl);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 32px;
  opacity: .6;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.empty-state-description {
  color: var(--text-2);
  font-size: 14px;
  margin: 0;
  max-width: 320px;
}

/* ─────────────────────────────────────────
   LOADING STATE
───────────────────────────────────────── */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(201,66,14,.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    var(--surface-3) 50%,
    var(--surface-2) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 12px;
  border-radius: var(--radius-sm);
}

.skeleton-heading {
  height: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-lg);
}

.skeleton-card {
  height: 160px;
  border-radius: var(--radius-lg);
}

/* ─────────────────────────────────────────
   PAGE HEADER STYLING
───────────────────────────────────────── */
.page-head {
  margin-bottom: var(--sp-xl);
}

.page-head h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: var(--sp-sm);
  color: var(--text);
}

.page-head p {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}

/* ─────────────────────────────────────────
   ADVANCED HOVER EFFECTS
───────────────────────────────────────── */
.card.clickable {
  cursor: pointer;
}

.card.clickable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* ─────────────────────────────────────────
   FOCUS STATES FOR ACCESSIBILITY
───────────────────────────────────────── */
.nav-link:focus-visible,
.btn:focus-visible,
.icon-btn:focus-visible,
.card.clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────
   ATTENTION SEEKER
───────────────────────────────────────── */
.attention-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ─────────────────────────────────────────
   FORM SUCCESS/ERROR STATE
───────────────────────────────────────── */
.form-field.success input {
  border-color: var(--green);
  background: rgba(26,110,60,.02);
}

.form-field.success input:focus {
  box-shadow: 0 0 0 3px rgba(26,110,60,.12);
}

.form-field.error input {
  border-color: var(--red);
  background: rgba(185,28,28,.02);
}

.form-field.error input:focus {
  box-shadow: 0 0 0 3px rgba(185,28,28,.12);
}
