/* ============================================================
   CSS Variables & Reset
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #1a1b1e;
  --bg-secondary: #25262b;
  --bg-tertiary: #2c2e33;
  --bg-card: #2c2e33;
  --bg-input: #1a1b1e;

  --accent: #5865F2;
  --accent-hover: #4752c4;
  --accent-dim: rgba(88, 101, 242, 0.15);

  --success: #57F287;
  --success-dim: rgba(87, 242, 135, 0.15);
  --warning: #FEE75C;
  --warning-dim: rgba(254, 231, 92, 0.15);
  --danger: #ED4245;
  --danger-dim: rgba(237, 66, 69, 0.15);
  --info: #00B0F4;
  --info-dim: rgba(0, 176, 244, 0.15);

  --text-primary: #FFFFFF;
  --text-secondary: #B9BBBE;
  --text-muted: #72767D;

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  --shadow-sm: 0 2px 8px rgba(0,0,0,.35);
  --shadow-md: 0 4px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.55);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: .18s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; }
img { max-width: 100%; display: block; }

/* ============================================================
   Layout
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 800px; }
.container--wide { max-width: 1400px; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(26,27,30,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav__inner {
  max-width: 1200px; margin: 0 auto;
  height: 64px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.nav__logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 800;
  color: var(--text-primary); text-decoration: none;
}
.nav__logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), #7289DA);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav__links a {
  color: var(--text-secondary); padding: 8px 12px;
  border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500;
  transition: all var(--transition);
}
.nav__links a:hover, .nav__links a.active {
  color: var(--text-primary); background: var(--bg-tertiary);
}
.nav__right { display: flex; align-items: center; gap: 10px; }
.nav__avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  cursor: pointer; border: 2px solid var(--border);
  transition: border-color var(--transition); object-fit: cover;
  background: var(--bg-tertiary);
}
.nav__avatar:hover { border-color: var(--accent); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 20px; border-radius: var(--radius-md);
  font-family: var(--font); font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  border: none; text-decoration: none; white-space: nowrap; user-select: none;
}
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(88,101,242,.45); }

.btn--secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--bg-card); border-color: var(--border-hover); color: var(--text-primary); }

.btn--success { background: var(--success); color: #1a1b1e; }
.btn--success:hover { background: #45d97a; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(87,242,135,.35); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #d93d40; transform: translateY(-1px); }

.btn--warning { background: var(--warning); color: #1a1b1e; }
.btn--warning:hover { background: #f0d847; transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-hover); }

.btn--discord { background: #5865F2; color: #fff; font-size: 1rem; padding: 14px 32px; border-radius: var(--radius-lg); }
.btn--discord:hover { background: #4752c4; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(88,101,242,.55); }

.btn--icon { padding: 8px; width: 36px; height: 36px; }
.btn--sm { padding: 6px 14px; font-size: .8rem; }
.btn--lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: border-color var(--transition);
}
.card--hover { cursor: pointer; }
.card--hover:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card__title { font-size: 1.1rem; font-weight: 700; }
.card__subtitle { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   Badges / Status
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

.badge--pending  { background: var(--warning-dim); color: var(--warning); }
.badge--pending::before { background: var(--warning); }
.badge--accepted { background: var(--success-dim); color: var(--success); }
.badge--accepted::before { background: var(--success); }
.badge--rejected { background: var(--danger-dim); color: var(--danger); }
.badge--rejected::before { background: var(--danger); }
.badge--clarification { background: var(--info-dim); color: var(--info); }
.badge--clarification::before { background: var(--info); }
.badge--withdrawn { background: rgba(114,118,125,.15); color: var(--text-muted); }
.badge--withdrawn::before { background: var(--text-muted); }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-size: .82rem; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .06em;
}
.form-label .req { color: var(--danger); margin-left: 3px; }

.form-input, .form-textarea, .form-select {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-primary); font-family: var(--font); font-size: .95rem;
  padding: 10px 14px; transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B9BBBE' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px;
}
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 6px; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: 6px; }

.input-group { display: flex; gap: 0; }
.input-group .form-input { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; white-space: nowrap; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
  opacity: 0; visibility: hidden; transition: all .3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 100%; max-width: 620px;
  max-height: 90vh; overflow-y: auto;
  transform: scale(.95) translateY(20px); transition: transform .3s ease;
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal--lg { max-width: 840px; }
.modal__header {
  padding: 24px 24px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; background: var(--bg-secondary);
  padding-bottom: 16px; border-bottom: 1px solid var(--border); z-index: 1;
}
.modal__title { font-size: 1.2rem; font-weight: 700; }
.modal__close {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--bg-tertiary); border: none; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: all var(--transition); flex-shrink: 0;
}
.modal__close:hover { background: var(--danger-dim); color: var(--danger); }
.modal__body { padding: 24px; }
.modal__footer {
  padding: 16px 24px 24px; display: flex; align-items: center;
  justify-content: flex-end; gap: 12px;
  border-top: 1px solid var(--border);
}

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast-container {
  position: fixed; top: 80px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;
}
.toast {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 18px;
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 380px; box-shadow: var(--shadow-lg);
  pointer-events: all;
  transform: translateX(120%); transition: transform .3s ease;
}
.toast.show { transform: translateX(0); }
.toast--success { border-left: 4px solid var(--success); }
.toast--error   { border-left: 4px solid var(--danger); }
.toast--warning { border-left: 4px solid var(--warning); }
.toast--info    { border-left: 4px solid var(--info); }
.toast__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast__content { flex: 1; }
.toast__title { font-weight: 600; font-size: .9rem; }
.toast__message { font-size: .85rem; color: var(--text-secondary); margin-top: 2px; }

/* ============================================================
   Stats
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.stat-card__value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.stat-card__label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.stat-card__icon { font-size: 1.4rem; margin-bottom: 10px; }

/* ============================================================
   Landing Page
   ============================================================ */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 80px 24px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(88,101,242,.18) 0%, transparent 65%);
  pointer-events: none;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-dim); border: 1px solid rgba(88,101,242,.3);
  color: #a5b4fc; padding: 6px 16px; border-radius: var(--radius-full);
  font-size: .85rem; font-weight: 600; margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900; margin-bottom: 20px; line-height: 1.1;
}
.hero__title .gradient {
  background: linear-gradient(135deg, #5865F2, #a78bfa, #7289DA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle {
  font-size: 1.15rem; color: var(--text-secondary);
  max-width: 580px; margin: 0 auto 40px; line-height: 1.75;
}
.hero__actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero__features {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap; margin-top: 48px;
  color: var(--text-muted); font-size: .88rem;
}
.hero__feature { display: flex; align-items: center; gap: 8px; }

.features { padding: 80px 24px; }
.features__header { text-align: center; margin-bottom: 56px; }
.features__header h2 { font-size: 2rem; margin-bottom: 12px; }
.features__header p { color: var(--text-muted); font-size: 1rem; }
.features__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; max-width: 1100px; margin: 0 auto; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card__icon {
  width: 48px; height: 48px; background: var(--accent-dim);
  border-radius: var(--radius-md); display: flex; align-items: center;
  justify-content: center; font-size: 1.4rem; margin-bottom: 16px;
}
.feature-card__title { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card__desc { font-size: .9rem; color: var(--text-secondary); line-height: 1.65; }

/* ============================================================
   Page Layout
   ============================================================ */
.page { padding: 32px 24px; max-width: 1200px; margin: 0 auto; }
.page__header { margin-bottom: 32px; }
.page__title { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.page__subtitle { color: var(--text-muted); font-size: .95rem; }

.section { margin-bottom: 40px; }
.section__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.section__title { font-size: 1.1rem; font-weight: 700; }

/* ============================================================
   Panel Cards (Dashboard)
   ============================================================ */
.panels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px,1fr)); gap: 20px; }
.panel-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition); cursor: pointer;
}
.panel-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.panel-card__banner { height: 5px; }
.panel-card__body { padding: 20px; }
.panel-card__header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.panel-card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.panel-card__name { font-size: 1rem; font-weight: 700; }
.panel-card__owner { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.panel-card__desc {
  font-size: .85rem; color: var(--text-secondary); margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.panel-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-card__stats { display: flex; gap: 16px; }
.panel-card__stat { font-size: .8rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

/* ============================================================
   Table
   ============================================================ */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  background: var(--bg-secondary); padding: 12px 16px;
  text-align: left; font-size: .78rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .07em; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--transition); cursor: pointer; }
.table tbody tr:hover { background: var(--bg-secondary); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; background: var(--bg-tertiary);
}

/* ============================================================
   Wizard (Create Panel)
   ============================================================ */
.wizard { max-width: 820px; margin: 0 auto; }
.wizard__steps {
  display: flex; align-items: center; margin-bottom: 36px;
  overflow-x: auto; padding-bottom: 4px;
}
.wizard__step { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.wizard__step-connector { flex: 1; height: 2px; background: var(--border); margin: 0 8px; min-width: 20px; transition: background var(--transition); }
.wizard__step-connector.done { background: var(--accent); }
.wizard__step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-tertiary); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; transition: all var(--transition); flex-shrink: 0;
}
.wizard__step.active .wizard__step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard__step.done .wizard__step-num { background: var(--success); border-color: var(--success); color: #1a1b1e; }
.wizard__step-label { font-size: .85rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.wizard__step.active .wizard__step-label { color: var(--text-primary); }
.wizard__step.done .wizard__step-label { color: var(--success); }
.wizard__card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 36px; }
.wizard__heading { font-size: 1.4rem; margin-bottom: 6px; }
.wizard__sub { color: var(--text-muted); margin-bottom: 28px; font-size: .95rem; }
.wizard__nav {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border);
}

/* Color swatches */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-swatch {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  cursor: pointer; border: 3px solid transparent; transition: all var(--transition);
}
.color-swatch:hover, .color-swatch.selected { border-color: #fff; transform: scale(1.2); }

/* Category/Question list builder */
.item-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.item-row {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.item-row__icon { font-size: 1.3rem; flex-shrink: 0; width: 36px; text-align: center; }
.item-row__info { flex: 1; min-width: 0; }
.item-row__name { font-weight: 600; font-size: .9rem; }
.item-row__meta { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.item-row__actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Role tags */
.tags-input-wrap {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-md); min-height: 46px; cursor: text;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tags-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent-dim); color: #a5b4fc;
  border: 1px solid rgba(88,101,242,.3);
  padding: 3px 8px; border-radius: var(--radius-full);
  font-size: .82rem; font-weight: 600;
}
.tag__remove { cursor: pointer; opacity: .7; transition: opacity var(--transition); }
.tag__remove:hover { opacity: 1; }
.tags-input-field { background: none; border: none; outline: none; color: var(--text-primary); font-family: var(--font); font-size: .9rem; min-width: 120px; flex: 1; }

/* ============================================================
   Public Panel View
   ============================================================ */
.panel-hero {
  padding: 56px 24px 40px; text-align: center;
  border-bottom: 1px solid var(--border); position: relative;
}
.panel-hero__accent { position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.panel-hero__title { font-size: 2.2rem; font-weight: 900; margin-bottom: 12px; }
.panel-hero__desc {
  font-size: 1rem; color: var(--text-secondary);
  max-width: 620px; margin: 0 auto 28px; line-height: 1.75;
}
.panel-hero__meta { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; font-size: .85rem; color: var(--text-muted); }
.panel-hero__meta-item { display: flex; align-items: center; gap: 6px; }

.requirements-box {
  background: var(--bg-card); border: 1px solid rgba(88,101,242,.35);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 32px;
}
.requirements-box__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 700; color: var(--accent); margin-bottom: 14px;
}
.requirements-box__text { font-size: .9rem; color: var(--text-secondary); line-height: 1.75; white-space: pre-line; }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 16px; }
.cat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  cursor: pointer; transition: all var(--transition);
  display: flex; flex-direction: column; gap: 12px;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-card--applied { border-color: var(--success); cursor: default; }
.cat-card--applied:hover { transform: none; box-shadow: none; }
.cat-card__emoji { font-size: 2.2rem; }
.cat-card__name { font-size: 1.1rem; font-weight: 700; }
.cat-card__desc { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; flex: 1; }
.cat-card__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }

/* ============================================================
   Application Detail
   ============================================================ */
.app-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; max-width: 1100px; margin: 0 auto; }
@media (max-width: 800px) { .app-layout { grid-template-columns: 1fr; } }
.app-main { display: flex; flex-direction: column; gap: 24px; }
.app-sidebar { display: flex; flex-direction: column; gap: 16px; }

.applicant-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
}
.applicant-card__avatar {
  width: 76px; height: 76px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--border); background: var(--bg-tertiary);
}
.applicant-card__name { font-size: 1.1rem; font-weight: 700; }
.applicant-card__tag { font-size: .85rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }

.answers-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.answers-section__title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.qa-list { display: flex; flex-direction: column; gap: 22px; }
.qa-item__q {
  font-size: .82rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.qa-item__a { font-size: .95rem; color: var(--text-primary); line-height: 1.7; white-space: pre-wrap; }

/* Timeline */
.timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.timeline::before { content: ''; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item { display: flex; gap: 14px; padding-bottom: 20px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  width: 30px; height: 30px; border-radius: 50%; background: var(--bg-tertiary);
  border: 2px solid var(--border); display: flex; align-items: center;
  justify-content: center; font-size: .8rem; flex-shrink: 0; position: relative; z-index: 1;
}
.tl-item--pending .tl-dot      { border-color: var(--warning); color: var(--warning); }
.tl-item--accepted .tl-dot     { border-color: var(--success); color: var(--success); }
.tl-item--rejected .tl-dot     { border-color: var(--danger); color: var(--danger); }
.tl-item--clarification .tl-dot{ border-color: var(--info); color: var(--info); }
.tl-content { flex: 1; padding-top: 4px; }
.tl-text { font-size: .9rem; color: var(--text-secondary); }
.tl-time { font-size: .78rem; color: var(--text-muted); margin-top: 3px; }

/* Comments */
.comments-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.comment-item--internal { border-left: 3px solid var(--warning); }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-tertiary); }
.comment-author { font-size: .85rem; font-weight: 600; }
.comment-time { font-size: .78rem; color: var(--text-muted); margin-left: auto; }
.comment-text { font-size: .9rem; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   Manage Panel
   ============================================================ */
.manage-header {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 20px;
}
.manage-header__icon {
  width: 56px; height: 56px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; flex-shrink: 0;
}
.manage-header__info { flex: 1; min-width: 0; }
.manage-header__title { font-size: 1.4rem; font-weight: 800; }
.manage-header__meta { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }
.manage-header__actions { display: flex; gap: 10px; flex-shrink: 0; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.filter-bar .form-input, .filter-bar .form-select { width: auto; }
.filter-search { flex: 2; min-width: 200px; }
.filter-select { min-width: 150px; }

/* ============================================================
   Tabs
   ============================================================ */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px; gap: 4px; overflow-x: auto; }
.tab {
  padding: 10px 16px; font-size: .9rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: all var(--transition); margin-bottom: -1px;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   Dropdown
   ============================================================ */
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 8px; min-width: 200px;
  box-shadow: var(--shadow-lg); z-index: 200;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all var(--transition);
}
.dropdown__menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem;
  color: var(--text-secondary); transition: all var(--transition);
}
.dropdown__item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.dropdown__item--danger { color: var(--danger); }
.dropdown__item--danger:hover { background: var(--danger-dim); }
.dropdown__sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown__label { padding: 8px 12px; font-size: .78rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

/* ============================================================
   Notification Button
   ============================================================ */
.notif-btn {
  position: relative; width: 36px; height: 36px;
  border-radius: var(--radius-sm); background: var(--bg-tertiary);
  border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; cursor: pointer; color: var(--text-muted);
  transition: all var(--transition); font-size: 1.1rem;
}
.notif-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  width: 17px; height: 17px; background: var(--danger);
  border-radius: 50%; font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* ============================================================
   Empty State & Loading
   ============================================================ */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state__icon { font-size: 3rem; margin-bottom: 16px; opacity: .5; }
.empty-state__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.empty-state__desc { color: var(--text-muted); font-size: .9rem; margin-bottom: 24px; max-width: 400px; margin-left: auto; margin-right: auto; }

.page-loader {
  position: fixed; inset: 0; background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .3s ease;
}
.page-loader.hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: var(--bg-tertiary); border-radius: var(--radius-sm); animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 0%,100% { opacity: .6; } 50% { opacity: .3; } }

/* ============================================================
   Interview Card
   ============================================================ */
.interview-card {
  background: var(--accent-dim); border: 1px solid rgba(88,101,242,.3);
  border-radius: var(--radius-lg); padding: 18px;
}
.interview-card__title { font-size: .85rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.interview-card__date { font-size: 1.05rem; font-weight: 700; }
.interview-card__time { font-size: .85rem; color: var(--text-secondary); margin-top: 3px; }

/* ============================================================
   Discord Server Card
   ============================================================ */
.discord-card {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.discord-card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.discord-card__name { font-weight: 600; font-size: .95rem; }
.discord-card__id { font-size: .78rem; color: var(--text-muted); font-family: monospace; margin-top: 2px; }

/* ============================================================
   Members List
   ============================================================ */
.members-list { display: flex; flex-direction: column; gap: 10px; }
.member-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 14px;
}
.member-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-tertiary); object-fit: cover; flex-shrink: 0; }
.member-name { font-weight: 600; font-size: .9rem; }
.member-tag { font-size: .8rem; color: var(--text-muted); }
.member-role { margin-left: auto; }
.role-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .78rem; font-weight: 700;
}
.role-pill--admin { background: rgba(88,101,242,.2); color: #a5b4fc; }
.role-pill--reviewer { background: rgba(0,176,244,.15); color: var(--info); }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 40px 24px; margin-top: 80px; }
.footer__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer__logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1rem; }
.footer__text { font-size: .85rem; color: var(--text-muted); }

/* ============================================================
   Utilities
   ============================================================ */
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.w-full { width: 100%; }
.ml-auto { margin-left: auto; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-accent  { color: var(--accent); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .page { padding: 20px 16px; }
  .wizard__card { padding: 20px; }
  .hero__title { font-size: 2rem; }
  .manage-header { flex-direction: column; align-items: flex-start; }
  .manage-header__actions { width: 100%; }
}
