/* ─────────────────────────────────────────────────────────
   Helixia Staff Portal — Design tokens
   Color:    #0A0C14 base / #12141F panel / #1B1E2C panel-raised
             #8B5CF6 violet strand / #22D3B8 teal strand
             #EDEEF5 text-high / #A6AABD text-mid / #6B6F86 text-low
   Type:     Space Grotesk (display) / Inter (body, UI)
   Layout:   Centered single column, generous vertical rhythm
   ───────────────────────────────────────────────────────── */

:root {
  --bg: #0a0c14;
  --panel: #12141f;
  --panel-raised: #191c2a;
  --border: #262a3d;
  --border-soft: #1e2130;

  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.16);
  --teal: #22d3b8;
  --teal-soft: rgba(34, 211, 184, 0.16);

  --text-high: #edeef5;
  --text-mid: #a6aabd;
  --text-low: #6b6f86;

  --danger: #f16565;
  --danger-soft: rgba(241, 101, 101, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-high);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ── Landing page ─────────────────────────────────────── */

body.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 48px 24px;
}

.helix-field {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.helix-svg {
  width: min(90vw, 480px);
  height: auto;
  opacity: 0.5;
  filter: blur(0.3px);
}

.strand {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw-strand 2.4s var(--ease) forwards;
}

.strand-b {
  animation-delay: 0.15s;
}

@keyframes draw-strand {
  to {
    stroke-dashoffset: 0;
  }
}

.landing-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--text-mid);
  text-decoration: none;
  margin-bottom: 40px;
}

.landing-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  background: linear-gradient(180deg, #ffffff 0%, #c9cbe0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-tagline {
  font-size: 1.15rem;
  color: var(--text-mid);
  margin: 0 0 28px;
}

.landing-copy {
  max-width: 460px;
  color: var(--text-mid);
  font-size: 0.98rem;
  margin: 0 0 32px;
}

.notice {
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.9rem;
  margin: 0 0 24px;
  border: 1px solid transparent;
  text-align: left;
}

.notice-warn {
  background: var(--violet-soft);
  border-color: rgba(139, 92, 246, 0.35);
  color: #d8c9ff;
}

.notice-error {
  background: var(--danger-soft);
  border-color: rgba(241, 101, 101, 0.35);
  color: #ffc4c4;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--violet) 0%, #6d3fd6 100%);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px -8px rgba(139, 92, 246, 0.55);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.discord-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(139, 92, 246, 0.7);
}

.discord-btn:active {
  transform: translateY(0);
}

.landing-footnote {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-low);
}

/* ── Apply page: topbar ───────────────────────────────── */

body.apply {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(10, 12, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.brand-mark-sm {
  margin-bottom: 0;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-high);
}

.profile-sub {
  font-size: 0.72rem;
  color: var(--teal);
}

.logout-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.logout-btn:hover {
  border-color: var(--text-mid);
  color: var(--text-high);
}

/* ── Apply page: main ─────────────────────────────────── */

.apply-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  position: relative;
  z-index: 1;
}

.form-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  font-weight: 600;
  margin: 0 0 8px;
}

.form-intro p {
  color: var(--text-mid);
  margin: 0 0 32px;
  font-size: 0.98rem;
}

.progress-track {
  height: 4px;
  border-radius: 999px;
  background: var(--border-soft);
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--teal));
  transition: width 0.4s var(--ease);
}

.progress-label {
  font-size: 0.78rem;
  color: var(--text-low);
  margin: 0 0 36px;
}

/* ── Question panels ──────────────────────────────────── */

.question-panel {
  padding: 24px 0;
  border-top: 1px solid var(--border-soft);
}

.question-panel:last-of-type {
  border-bottom: 1px solid var(--border-soft);
}

.question-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
}

.question-number {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-low);
  flex-shrink: 0;
  padding-top: 2px;
}

.question-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-high);
}

.req-mark {
  color: var(--teal);
  margin-left: 4px;
}

.question-body {
  margin-left: 34px;
}

.text-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-high);
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 8px 2px;
  transition: border-color 0.2s var(--ease);
}

.text-input::placeholder {
  color: var(--text-low);
}

.text-input:focus {
  border-color: var(--teal);
  outline: none;
}

.number-input {
  max-width: 140px;
}

.number-input::-webkit-inner-spin-button {
  opacity: 0.6;
}

.textarea-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-high);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.textarea-input::placeholder {
  color: var(--text-low);
}

.textarea-input:focus {
  border-color: var(--teal);
  background: var(--panel-raised);
  outline: none;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-low);
  margin-top: 6px;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-option {
  position: relative;
  cursor: pointer;
}

.pill-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-option span {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-size: 0.9rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.pill-option input:checked + span {
  border-color: var(--violet);
  background: var(--violet-soft);
  color: #e6dcff;
}

.pill-option:hover span {
  border-color: var(--text-mid);
}

.select-wrap {
  position: relative;
  max-width: 320px;
}

.select-wrap select {
  width: 100%;
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-high);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 40px 12px 16px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}

.select-wrap select:focus {
  border-color: var(--teal);
  outline: none;
}

.select-chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-low);
  pointer-events: none;
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin: 8px 0 0;
}

/* ── Confirm + submit ──────────────────────────────────── */

.confirm-box {
  margin: 36px 0 24px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border-soft);
}

.confirm-box p {
  margin: 0;
  color: var(--text-mid);
  font-size: 0.88rem;
}

.submit-btn {
  width: 100%;
  position: relative;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--violet) 0%, var(--teal) 130%);
  color: #0a0c14;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
  box-shadow: 0 10px 28px -10px rgba(139, 92, 246, 0.5);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(139, 92, 246, 0.6);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.submit-btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 12, 20, 0.3);
  border-top-color: #0a0c14;
  border-radius: 50%;
  margin-left: 10px;
  vertical-align: -3px;
  animation: spin 0.7s linear infinite;
}

.submit-btn.is-loading .submit-btn-spinner {
  display: inline-block;
}

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

/* ── Success / already-submitted state ────────────────── */

.state-panel {
  text-align: center;
  padding: 64px 24px;
  animation: state-in 0.5s var(--ease);
}

@keyframes state-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--teal-soft);
  margin-bottom: 20px;
}

.state-panel h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.state-panel p {
  max-width: 420px;
  margin: 0 auto;
  color: var(--text-mid);
  font-size: 0.95rem;
}

.state-locked {
  overflow: hidden;
  position: relative;
}

.state-locked .state-icon {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.cooldown-countdown {
  display: block;
  margin-top: 18px;
  color: #f0c46a;
  font-size: 0.9rem;
}

.state-locked.state-pending {
  color: #e2b04a;
}

.state-locked.state-accepted {
  color: var(--teal);
}

.state-locked.state-rejected {
  color: var(--danger);
}

.state-locked h1,
.state-locked p {
  color: inherit;
}

.state-locked.state-pending .state-icon {
  background: rgba(226, 176, 74, 0.1);
}

.state-locked.state-accepted .state-icon {
  background: var(--teal-soft);
}

.state-locked.state-rejected .state-icon {
  background: var(--danger-soft);
}

.state-locked.state-pending .cooldown-countdown {
  color: #f0c46a;
}

.state-locked.state-accepted .state-icon,
.state-locked.state-accepted .cooldown-countdown {
  color: var(--teal);
}

.state-locked.state-rejected .state-icon,
.state-locked.state-rejected .cooldown-countdown {
  color: var(--danger);
}

.locked-preview {
  display: grid;
  gap: 10px;
  margin: 30px auto -8px;
  max-width: 620px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  filter: blur(4px);
  opacity: 0.55;
  user-select: none;
  pointer-events: none;
  text-align: left;
}

.locked-preview-row {
  display: grid;
  grid-template-columns: 28px 1fr 90px;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  color: var(--text-mid);
  font-size: 0.82rem;
}

.locked-preview-row span {
  color: var(--violet);
  font-family: var(--font-display);
}

.locked-preview-row b {
  font-weight: 500;
}

.locked-preview-row i {
  display: block;
  height: 10px;
  border-radius: 4px;
  background: var(--border);
}

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

@media (max-width: 640px) {
  .apply-main {
    padding: 32px 18px 80px;
  }

  .question-body {
    margin-left: 0;
    margin-top: 4px;
  }

  .question-head {
    gap: 10px;
  }

  .topbar {
    padding: 12px 16px;
  }

  .profile-info {
    display: none;
  }

  .profile-chip {
    padding: 4px;
  }

  .landing-content {
    padding: 0 4px;
  }
}

/* ─────────────────────────────────────────────────────────
   Extra polish — ambient background, entrances, micro-detail
   ───────────────────────────────────────────────────────── */

body {
  animation: page-fade-in 0.5s var(--ease) both;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-glow::before,
.ambient-glow::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  animation: drift 26s ease-in-out infinite alternate;
}

.ambient-glow::before {
  top: -180px;
  left: -160px;
  background: var(--violet);
}

.ambient-glow::after {
  bottom: -200px;
  right: -160px;
  background: var(--teal);
  animation-delay: -8s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.08); }
}

body.landing .landing-content,
body.landing .brand-mark {
  animation: hero-in 0.7s var(--ease) both;
}

.landing-title { animation: hero-in 0.7s var(--ease) 0.05s both; }
.landing-tagline { animation: hero-in 0.7s var(--ease) 0.1s both; }
.landing-copy { animation: hero-in 0.7s var(--ease) 0.15s both; }
.discord-btn { animation: hero-in 0.7s var(--ease) 0.2s both; }
.landing-footnote, .staff-link { animation: hero-in 0.7s var(--ease) 0.25s both; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.discord-btn {
  position: relative;
  overflow: hidden;
}

.discord-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease);
}

.discord-btn:hover::after {
  left: 130%;
}

.staff-link {
  display: block;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-low);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.staff-link:hover {
  color: var(--text-mid);
}

.question-panel {
  border-left: 2px solid transparent;
  padding-left: 14px;
  margin-left: -16px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.question-panel:focus-within {
  border-left-color: var(--teal);
  background: rgba(34, 211, 184, 0.03);
}

.staff-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 2px;
}

.staff-panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.staff-panel-link:hover {
  color: var(--teal);
  background: var(--teal-soft);
}

/* ─────────────────────────────────────────────────────────
   Staff dashboard
   ───────────────────────────────────────────────────────── */

.staff-main {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 44px 24px 96px;
}

.staff-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  font-weight: 600;
  margin: 0 0 6px;
}

.staff-header p {
  color: var(--text-mid);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-low);
}

.stat-total { border-left-color: var(--violet); }
.stat-pending { border-left-color: #e2b04a; }
.stat-accepted { border-left-color: var(--teal); }
.stat-rejected { border-left-color: var(--danger); }

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

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-low);
}

.search-wrap input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  color: var(--text-high);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 16px 10px 38px;
  transition: border-color 0.2s var(--ease);
}

.search-wrap input:focus {
  border-color: var(--teal);
  outline: none;
}

.search-wrap input::placeholder {
  color: var(--text-low);
}

.filter-pills {
  display: flex;
  gap: 6px;
}

.filter-pill {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.filter-pill:hover {
  border-color: var(--text-mid);
}

.filter-pill.is-active {
  background: var(--violet-soft);
  border-color: var(--violet);
  color: #e6dcff;
}

.applications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-card {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}

.app-card:hover {
  border-color: var(--border);
}

.app-card-summary {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  color: inherit;
}

.app-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.app-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

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

.app-meta {
  font-size: 0.76rem;
  color: var(--text-low);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-date {
  font-size: 0.78rem;
  color: var(--text-low);
  flex-shrink: 0;
  display: none;
}

.status-badge {
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
}

.status-pending {
  color: #f0c46a;
  background: rgba(226, 176, 74, 0.14);
}

.status-accepted {
  color: var(--teal);
  background: var(--teal-soft);
}

.status-rejected {
  color: var(--danger);
  background: var(--danger-soft);
}

.app-chevron {
  flex-shrink: 0;
  color: var(--text-low);
  transition: transform 0.25s var(--ease);
}

.app-card.is-open .app-chevron {
  transform: rotate(180deg);
}

.app-card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
  border-top: 1px solid transparent;
}

.app-card.is-open .app-card-detail {
  max-height: 3200px;
  border-top-color: var(--border-soft);
}

.app-answers {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.answer-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.answer-question {
  font-size: 0.78rem;
  color: var(--text-low);
}

.answer-value {
  font-size: 0.92rem;
  color: var(--text-high);
  white-space: pre-wrap;
}

.app-actions {
  display: flex;
  gap: 8px;
  padding: 0 18px 18px;
  flex-wrap: wrap;
}

.app-history {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border-soft);
}

.history-heading {
  padding: 16px 0 10px;
  color: var(--text-high);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.history-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--text-mid);
}

.history-dot-accepted { background: var(--teal); }
.history-dot-rejected { background: var(--danger); }
.history-dot-pending { background: #e2b04a; }

.history-content {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.history-action {
  color: var(--text-mid);
  font-size: 0.84rem;
}

.history-action strong { color: var(--text-high); }

.history-meta,
.history-empty {
  color: var(--text-low);
  font-size: 0.72rem;
}

.action-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s var(--ease);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-accept:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.action-reject:hover:not(:disabled) {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.action-reset:hover:not(:disabled) {
  border-color: var(--text-mid);
  color: var(--text-high);
}

.action-delete {
  margin-left: auto;
  color: #d78a8a;
}

.action-delete:hover:not(:disabled) {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.empty-state,
.no-results {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-mid);
}

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 16px 0 6px;
  color: var(--text-high);
}

.empty-state p {
  font-size: 0.9rem;
  margin: 0;
}

.no-results {
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--panel-raised);
  border: 1px solid var(--border);
  color: var(--text-high);
  font-size: 0.85rem;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 50;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.toast-error {
  border-color: rgba(241, 101, 101, 0.4);
  color: #ffc4c4;
}

@media (min-width: 560px) {
  .app-date {
    display: block;
  }
}

@media (max-width: 640px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-meta {
    display: none;
  }

  .staff-main {
    padding: 32px 16px 80px;
  }
}

