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

:root {
  --bg: #050313;
  --bg-soft: #0b061f;
  --bg-base: #050313;
  --border-soft: #231a3d;
  --accent: #a855f7;           /* purple accent (default) */
  --accent-dark: #9333ea;
  --accent-rgb: 168, 85, 247;
  --accent-soft: rgba(var(--accent-rgb), 0.2);
  --gradient-center: #151030;
  --gradient-center-rgb: 21, 16, 48;
  --text: #f9fafb;
  --text-muted: #9ca3af;
  --radius-xl: 18px;
  --radius-full: 999px;
  --shadow-soft: 0 24px 55px rgba(0, 0, 0, 0.8);
  --surface-raised: rgba(15, 23, 42, 0.9);
  --surface-raised-solid: rgba(15, 23, 42, 1);
  --surface-muted-95: rgba(15, 23, 42, 0.95);
  --surface-muted-80: rgba(15, 23, 42, 0.8);
  --surface-muted-85: rgba(15, 23, 42, 0.85);
  --surface-muted-75: rgba(15, 23, 42, 0.75);
  --surface-muted-65: rgba(15, 23, 42, 0.65);
  --surface-muted-60: rgba(15, 23, 42, 0.6);
  --surface-bar-top: rgba(10, 10, 24, 0.95);
  --surface-bar-bottom: rgba(5, 3, 19, 0.9);
  --surface-deep: rgba(5, 3, 19, 0.98);
  --surface-deep-90: rgba(5, 3, 19, 0.9);
  --surface-deep-45: rgba(5, 3, 19, 0.45);
  --hero-scrim-1: rgba(5, 3, 19, 0.96);
  --hero-scrim-2: rgba(5, 3, 19, 0.8);
  --hero-scrim-3: rgba(5, 3, 19, 0.35);
  --hero-scrim-4: rgba(5, 3, 19, 0.05);
  --hero-inset: rgba(5, 3, 19, 0.95);
  --table-bg: rgba(8, 10, 22, 0.98);
  --table-head-bg: rgba(12, 18, 35, 0.98);
  --table-row: rgba(10, 14, 28, 0.88);
  --table-row-alt: rgba(13, 18, 34, 0.96);
  --table-row-hover: rgba(var(--accent-rgb), 0.1);
  --table-border: rgba(148, 163, 184, 0.28);
}

/* Theme overrides: accent + gradient center (gradient always fades to same dark) */
.theme-green { --accent: #10b981; --accent-dark: #059669; --accent-rgb: 16, 185, 129; --gradient-center: #0c1810; --gradient-center-rgb: 12, 24, 16; }
.theme-blue { --accent: #3b82f6; --accent-dark: #2563eb; --accent-rgb: 59, 130, 246; --gradient-center: #0f1729; --gradient-center-rgb: 15, 23, 41; }
.theme-pink { --accent: #ec4899; --accent-dark: #db2777; --accent-rgb: 236, 72, 153; --gradient-center: #1c0a18; --gradient-center-rgb: 28, 10, 24; }
.theme-purple { --accent: #a855f7; --accent-dark: #9333ea; --accent-rgb: 168, 85, 247; --gradient-center: #151030; --gradient-center-rgb: 21, 16, 48; }
.theme-orange { --accent: #f97316; --accent-dark: #ea580c; --accent-rgb: 249, 115, 22; --gradient-center: #181008; --gradient-center-rgb: 24, 16, 8; }
.theme-red { --accent: #b91c1c; --accent-dark: #991b1b; --accent-rgb: 185, 28, 28; --gradient-center: #1a0808; --gradient-center-rgb: 26, 8, 8; }

body.page {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  background: radial-gradient(circle at top, var(--gradient-center), var(--bg-base) 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.top-bar {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.25);
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    var(--surface-bar-top),
    var(--surface-bar-bottom)
  );
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-bar-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

a.brand.brand-home-link {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

a.brand.brand-home-link:hover .brand-text {
  color: var(--text);
  opacity: 0.92;
}

a.brand.brand-home-link:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb, 129, 140, 248), 0.65);
  outline-offset: 3px;
  border-radius: 6px;
}

.brand-logo {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.brand-logo-img {
  height: 1.65rem;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  vertical-align: middle;
}

.brand-text {
  font-size: 0.95rem;
  color: var(--text);
}

/* Top actions (sign in / logout) */
.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-signin {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

.top-actions .logout-form .btn-secondary {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.35rem 1rem 2rem;
}

/* Inner layout container */
.main-inner {
  width: 100%;
  max-width: 2560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: flex-start;
  align-items: stretch;
}

/* Generic card */
.card {
  width: 100%;
  padding: 2rem 1.75rem 1.75rem;
  background: radial-gradient(circle at top, var(--gradient-center), #050313 60%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--shadow-soft);
}

.card-title {
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}

.card-subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

/* Primary button – uses theme accent */
.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-dark) 0%, var(--accent) 100%);
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Secondary (logout) */
.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.btn-danger {
  background: #b91c1c;
  color: #fff;
  border: none;
}

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

.btn-secondary:hover {
  color: var(--text);
  border-color: #e5e7eb;
}

/* Small variant */
.btn-small {
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
  background: var(--surface-muted-80);
  color: var(--text);
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.btn-small:hover {
  transform: translateY(-1px);
  background: var(--surface-raised);
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  color: var(--text);
}

.btn-small.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  box-shadow: none;
}

.btn-small.btn-secondary:hover {
  background: var(--surface-muted-75);
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.btn-small:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* btn-small with btn-primary */
.btn-small.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-small.btn-primary:hover {
  background: linear-gradient(180deg, var(--accent-dark) 0%, var(--accent) 100%);
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* btn-small with btn-danger - red destructive button */
.btn-small.btn-danger {
  background: #b91c1c;
  color: #fff;
  border: none;
  box-shadow: 0 2px 4px rgba(185, 28, 28, 0.4);
}

.btn-small.btn-danger:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  box-shadow: 0 4px 8px rgba(185, 28, 28, 0.5);
}

/* Inline link */
.link-inline {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
  overflow-wrap: break-word;
  display: inline-block;
  max-width: 100%;
}

.link-inline:hover {
  text-decoration: underline;
  color: var(--accent);
}

.user-overview-card .link-inline {
  color: #60a5fa;
  font-size: 0.85rem;
}

.user-overview-card .link-inline:hover {
  color: #93c5fd;
}

/* Dashboard info grid */
.info-grid {
  margin: 1.5rem 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.9rem;
}

.info-item {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: var(--surface-muted-80);
  border: 1px solid var(--border-soft);
}

.info-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.info-value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

/* Misc */
.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: 0 0 1rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 0.75rem 1rem 1.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* Notification dropdown – theme styling */
.notification-dropdown {
  border-color: rgba(var(--accent-rgb), 0.35) !important;
}
.notification-dropdown > div:first-child {
  border-bottom-color: rgba(var(--accent-rgb), 0.25) !important;
}
.notification-item {
  transition: background 0.15s ease;
}
.notification-item:hover {
  background: rgba(var(--accent-rgb), 0.08) !important;
}
.notification-item:last-child {
  border-bottom: none !important;
}

/* Forms */
.logout-form {
  margin: 0;
}

/* Small screens */
@media (max-width: 600px) {
  .card {
    padding: 1.75rem 1.25rem 1.5rem;
  }
}

/* Top nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  margin-right: 0.75rem;
  min-width: 0; /* Allow flex shrinking */
  overflow-x: auto; /* Allow horizontal scroll on very small screens */
  -webkit-overflow-scrolling: touch;
}

.nav-link {
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.admin-nav-pills {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.nav-pill {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.nav-pill-warning {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.nav-pill-info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}

.nav-pill-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Content blocks */
.section-block {
  margin-bottom: 1.3rem;
}

.section-heading {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.section-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.bullet-list {
  padding-left: 1.1rem;
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.bullet-list li {
  margin-bottom: 0.15rem;
}

/* Simple form */
.simple-form {
  margin-top: 0.6rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
}

.form-row label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea,
.form-row select {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  padding: 0.55rem 0.65rem;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.65);
  background: var(--surface-raised-solid);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.button-row {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: flex-start;
}

.button-row form {
  display: flex;
  flex: 1;
}

.button-row button {
  width: 100%;
}

.tiny {
  font-size: 0.75rem;
}

/* Socials */
.social-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.social-card {
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-muted-75);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    border-color 0.12s ease, background 0.12s ease;
}

.social-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(var(--accent-rgb), 0.5);
  background: var(--surface-raised);
}

.social-icon {
  font-size: 1.4rem;
  margin-top: 0.1rem;
}

.social-content h2 {
  font-size: 0.95rem;
  margin: 0 0 0.1rem;
  color: var(--text);
}

.social-content p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.social-tag {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  color: var(--text-muted);
}

/* Mobile tweaks */
@media (max-width: 720px) {
  .main-nav {
    display: none; /* keep it simple for now */
  }
}

/* Hero enhancements + carousel */
.card-hero {
  padding: 2rem 1.75rem 1.75rem;
}

.card-hero .card-header-row {
  padding: 0;
  margin-bottom: 0;
}

/* Accent rim glow on homepage hero (carousel + live stream) */
.card.card-hero.hero-carousel,
.card.card-hero.hero-live-stream {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow:
    var(--shadow-soft),
    0 0 0 1px rgba(var(--accent-rgb), 0.12),
    0 0 28px rgba(var(--accent-rgb), 0.42),
    0 0 64px rgba(var(--accent-rgb), 0.2);
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  min-height: 280px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;

  background:
    radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.35), transparent 55%),
    linear-gradient(
      to right,
      rgba(5, 3, 19, 0.96),
      rgba(5, 3, 19, 0.8) 38%,
      rgba(5, 3, 19, 0.35) 62%,
      rgba(5, 3, 19, 0.05) 100%
    ),
    var(--hero-bg-image);
  background-size: cover;
  background-position: center;
}

/* inward fade from border */
.hero-carousel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 40px rgba(5, 3, 19, 0.95);
  pointer-events: none;
}

.hero-carousel-inner {
  position: relative;
  z-index: 1;
  padding: 2.1rem 2.2rem 1.9rem;
  max-width: 430px;
}

/* tighten text spacing */
.hero-carousel-inner .card-title {
  margin-bottom: 0.35rem;
}

.hero-carousel-inner .card-subtitle {
  margin-bottom: 1.1rem;
}

/* Highlight chips */
.hero-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.highlight-item {
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
}

.highlight-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.highlight-value {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

/* Live stream hero section */
.hero-live-stream {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #000;
}

.hero-live-stream-welcome {
  position: relative;
  z-index: 1;
  padding: 2.1rem 2.2rem 1.5rem;
  background: radial-gradient(circle at top, var(--gradient-center), #050313 60%);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.2);
}

.hero-live-stream-welcome .card-title {
  margin-bottom: 0.35rem;
}

.hero-live-stream-welcome .card-subtitle {
  margin-bottom: 1.1rem;
}

.hero-live-stream-embed-wrapper {
  flex: 1;
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.hero-live-stream-header {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 2;
  padding: 0.9rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.8);
  max-width: 520px;
  transform: translate3d(0, 0, 0);
  transition: top 220ms ease, left 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.hero-live-stream-embed-wrapper:hover .hero-live-stream-header {
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.95);
}

/* Twitch gradient (purple) */
.hero-live-stream-header[data-platform="twitch"] {
  background: linear-gradient(
    to right,
    rgba(10, 10, 24, 0.95),
    rgba(15, 23, 42, 0.85),
    rgba(138, 43, 226, 0.6)
  );
  border-color: rgba(138, 43, 226, 0.5);
}

/* Kick gradient (green) */
.hero-live-stream-header[data-platform="kick"] {
  background: linear-gradient(
    to right,
    rgba(10, 10, 24, 0.95),
    rgba(15, 23, 42, 0.85),
    rgba(34, 197, 94, 0.6)
  );
  border-color: rgba(34, 197, 94, 0.5);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.5);
  border-radius: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.live-text {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ef4444;
}

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

.live-stream-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-stream-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.live-stream-user {
  font-weight: 500;
  color: var(--text);
}

.live-stream-platform {
  padding: 0.2rem 0.5rem;
  background: rgba(var(--accent-rgb), 0.2);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.live-stream-viewers {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.live-stream-viewers::before {
  content: '👁';
  font-size: 0.9rem;
}


.hero-live-stream-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

.hero-live-stream-embed a {
  display: block;
  width: 100%;
  height: 100%;
}

.live-stream-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.stream-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.9);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.stream-nav-btn:hover {
  background: rgba(var(--accent-rgb), 1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.5);
}

.stream-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.stream-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.stream-nav-left {
  left: 1rem;
}

.stream-nav-right {
  right: 1rem;
}

.live-stream-counter {
  margin-left: auto;
  padding: 0.25rem 0.7rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(248, 250, 252, 0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e5e7eb;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8);
}

.hero-live-stream-footer {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(5, 3, 19, 0.4);
}

.hero-live-stream-footer .btn-primary {
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

/* Home top layout: hero + side cards */
.home-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 1.2rem;
  width: 100%;
}

.home-top-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-side {
  padding: 1.4rem 1.5rem 1.35rem;
}

/* Server Stats Widget – same card border/background language as .card */
.server-stats-widget {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.server-stat-item {
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(var(--gradient-center-rgb), 0.5);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  text-align: center;
}

.server-stats-widget .stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.server-stats-widget .stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
}

.server-stats-widget .stat-value.stat-online {
  color: #22c55e;
}

.server-stats-widget .stat-value.stat-offline {
  color: #ef4444;
}

/* Home bottom grid: Connect With Us + Need Help side by side */
.home-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  width: 100%;
}

@media (max-width: 900px) {
  .home-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* Social Links Grid */
.social-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(15, 23, 42, 0.8);
}

.social-link svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.social-link-discord:hover {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.1);
  color: #5865f2;
}

.social-link-twitter:hover {
  border-color: #1da1f2;
  background: rgba(29, 161, 242, 0.1);
  color: #1da1f2;
}

.social-link-youtube:hover {
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.1);
  color: #ff0000;
}

.social-link-twitch:hover {
  border-color: #9146ff;
  background: rgba(145, 70, 255, 0.1);
  color: #9146ff;
}

.social-link-kick:hover {
  border-color: #53fc18;
  background: rgba(83, 252, 24, 0.1);
  color: #53fc18;
}

.social-link-instagram:hover {
  border-color: #e4405f;
  background: rgba(228, 64, 95, 0.1);
  color: #e4405f;
}

.social-link-tiktok:hover {
  border-color: #000000;
  background: rgba(0, 0, 0, 0.2);
  color: #000000;
}

.social-link-facebook:hover {
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.1);
  color: #1877f2;
}

/* Multi-column cards */
.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.2rem;
  margin-top: 0.3rem;
}

.card-column {
  min-width: 0;
}

/* Queue page */
.queue-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.queue-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.queue-hero {
  position: relative;
  padding: 1.75rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-muted-95), var(--surface-muted-80));
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--shadow-soft);
}

.queue-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.4), transparent 45%);
  opacity: 0.5;
  pointer-events: none;
}

.queue-hero-grid {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  z-index: 1;
}

.queue-hero-main {
  flex: 1 1 380px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.queue-rank {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.queue-rank-circle {
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.28), var(--surface-raised));
  border: 2px solid rgba(var(--accent-rgb), 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(var(--accent-rgb), 0.15);
}

.queue-rank-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.queue-rank-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.queue-meta {
  margin: 0.15rem 0 0.35rem;
  font-size: 1rem;
  color: var(--text-muted);
}

.queue-meta span {
  font-weight: 600;
  color: var(--text);
}

.queue-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.queue-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.queue-metric-card {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.queue-metric-label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.queue-metric-value {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}

.queue-metric-sub {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.queue-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.queue-chip-ready {
  background: rgba(34, 197, 94, 0.2);
  color: #34d399;
  border: 1px solid rgba(34, 197, 94, 0.45);
}

.queue-chip-waiting {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.queue-hero-side {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.queue-ready-tray {
  min-height: 90px;
}

.queue-ready-tray.queue-ready-flash .queue-ready-alert {
  animation: readyPulse 0.9s ease-in-out infinite alternate;
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.45);
}

.queue-ready-alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.queue-ready-alert p {
  margin: 0;
  color: #22c55e;
  font-size: 0.95rem;
}

.queue-ready-alert strong {
  display: block;
  margin-bottom: 0.25rem;
}

.queue-actions-panel {
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.queue-actions-panel h3 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  color: var(--text);
}

.queue-actions-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.queue-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.queue-actions .btn-secondary + .btn-secondary {
  margin-top: 0;
}

.queue-timestamp {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  text-align: center;
}

.queue-messages {
  margin-top: 1rem;
  min-height: 1.25rem;
  text-align: center;
}

.queue-messages p {
  margin: 0;
}

.queue-flow {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
}

.queue-flow h3 {
  margin: 0;
  color: var(--text);
}

.queue-flow-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.queue-flow-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-muted-80);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.queue-flow-item.is-active {
  border-color: rgba(var(--accent-rgb), 0.7);
  transform: translateY(-2px);
}

.queue-flow-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.queue-flow-title {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.queue-flow-desc {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

@keyframes readyPulse {
  0% {
    transform: scale(1);
    border-color: rgba(34, 197, 94, 0.4);
  }
  100% {
    transform: scale(1.015);
    border-color: rgba(251, 191, 36, 0.8);
  }
}

.queue-overview-card {
  margin-top: 0;
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
}

.queue-overview-card h2 {
  color: var(--text);
}

.queue-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.queue-overview-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.queue-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}

.queue-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-raised);
  table-layout: auto;
}

.queue-table th,
.queue-table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.9rem;
  vertical-align: middle;
  color: var(--text);
}

.queue-table th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.queue-col-position {
  width: 80px;
}

.queue-col-type {
  width: 150px;
}

.queue-col-user {
  width: auto;
}

.queue-col-priority {
  width: 220px;
}

.queue-table td:first-child,
.queue-table th:first-child {
  text-align: center;
  font-weight: 600;
}

.queue-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.queue-pill-web {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.queue-pill-ingame {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.queue-empty {
  text-align: center;
  padding: 1rem 0;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 600px) {
  .queue-hero-grid {
    flex-direction: column;
  }

  .queue-hero-side {
    flex: 1 1 auto;
  }

  .queue-flow-list {
    grid-template-columns: 1fr;
  }

  .queue-secondary-grid {
    grid-template-columns: 1fr;
  }
}

/* Status + stats (dashboard) */
.status-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.4rem 0 0.8rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
}

.status-dot.online {
  background: #22c55e;
}

.status-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}

.status-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* FiveM server name color codes (^0–^9) – dark theme */
.server-name-ch {
  font-weight: 600;
}
.server-name-ch-0,
.server-name-ch-7 { color: var(--text); }
.server-name-ch-1 { color: #f44336; }
.server-name-ch-2 { color: #4caf50; }
.server-name-ch-3 { color: #ffeb3b; }
.server-name-ch-4 { color: #42a5f5; }
.server-name-ch-5 { color: #03a9f4; }
.server-name-ch-6 { color: #9c27b0; }
.server-name-ch-8 { color: #ff5722; }
.server-name-ch-9 { color: #9e9e9e; }

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.stats-grid[style*="grid-template-columns"] {
  display: grid;
}

.stat-pill {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 100px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.stat-pill .stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-pill .stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 0.4rem;
}

.stat-value {
  font-size: 0.9rem;
}

/* Discord announcements box */
.discord-announcement-box {
  margin-top: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.discord-announcement-box.compact {
  margin-top: 0.9rem;
}

.home-announcement-item {
  margin-bottom: 0.75rem;
}

.home-announcement-item:last-child {
  margin-bottom: 0;
}

.home-announcement-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.home-announcement-title {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

.home-announcement-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.home-announcement-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.home-announcement-content {
  font-size: 0.85rem;
  margin: 0;
}

.btn-full {
  display: block;
  text-align: center;
  width: 100%;
}

/* Announcements */
.announcement-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  max-height: 260px;
  overflow: auto;
}

/* Public /announcements page */
.announcement-list-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.announcement-card {
  padding: 1.25rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.announcement-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.announcement-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.announcement-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.announcement-card-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.75rem;
}

.announcement-card-author {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.announcement-card-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}

.announcement-card-body p,
.announcement-card-body li,
.announcement-card-body h1,
.announcement-card-body h2,
.announcement-card-body h3,
.announcement-card-body h4,
.announcement-card-body strong,
.announcement-card-body em,
.announcement-card-body blockquote {
  color: inherit;
}

.announcement-card-body a {
  color: var(--accent);
}

.announcement-card-body a:hover {
  color: var(--accent-dark);
}

.announcement-list-page-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.announcement-list-page-pagination-info {
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Admin announcements styling */
.announcement-item {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.announcement-item:hover {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
}

.announcement-item:last-child {
  margin-bottom: 0;
}

.announcement-item h4 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.announcement-item .announcement-content-wrapper {
  position: relative;
}

.announcement-item .announcement-content {
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0.75rem 0 0 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
}

/* Only apply max-height and fade to collapsible announcements */
.announcement-item .announcement-content.collapsible {
  max-height: 150px;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.announcement-item .announcement-content.collapsible.expanded {
  max-height: none;
}

/* Fade effect ONLY for collapsible announcements that are NOT expanded */
.announcement-item .announcement-content-wrapper:has(.announcement-expand-btn[style*="inline-flex"]) .announcement-content.collapsible:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.95));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.announcement-expand-btn {
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.announcement-expand-btn:hover {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: rgba(var(--accent-rgb), 0.5);
}

.announcement-expand-btn:active {
  transform: scale(0.98);
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Announcement List Scrollbar Styling */
.announcement-list::-webkit-scrollbar {
  width: 10px;
}

.announcement-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
}

.announcement-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  border: 2px solid rgba(15, 23, 42, 0.6);
}

.announcement-list::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.5);
}

/* Firefox scrollbar styling for announcement list */
.announcement-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) rgba(15, 23, 42, 0.6);
}

/* User notes styling */
.user-notes-section {
  padding: 0;
}

.user-note-form {
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.user-note-form .meta-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.user-note-form-field {
  margin-bottom: 1.25rem;
}

.user-note-form-footer {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-soft);
}

.user-note-form-footer label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  margin: 0;
}

.user-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-note-item {
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s, background 0.2s;
}

.user-note-item:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--surface-muted-80);
}

.user-note-item strong {
  color: var(--text);
  font-weight: 600;
}

.user-note-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.user-note-item .session-id {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.user-note-item > div:last-child {
  margin-top: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Announcement create/edit modals – Quill */
.announcement-modal-panel .announcement-quill-wrap .ql-toolbar {
  border: 1px solid var(--border-soft);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: var(--surface-muted-75);
}
.announcement-modal-panel .announcement-quill-wrap .ql-container {
  border: 1px solid var(--border-soft);
  border-radius: 0 0 12px 12px;
  background: var(--bg-soft);
  font-size: 0.95rem;
}
.announcement-modal-panel .announcement-quill-wrap .ql-editor {
  min-height: 200px;
  color: var(--text);
}
.announcement-modal-panel .announcement-quill-wrap .ql-editor.ql-blank::before {
  color: var(--text-muted);
}
.announcement-modal-panel .announcement-quill-wrap .ql-toolbar .ql-stroke {
  stroke: var(--text-muted);
}
.announcement-modal-panel .announcement-quill-wrap .ql-toolbar .ql-fill {
  fill: rgba(148, 163, 184, 0.5);
}
.announcement-modal-panel .announcement-quill-wrap .ql-toolbar button:hover .ql-stroke {
  stroke: var(--accent);
}
.announcement-modal-panel .announcement-quill-wrap .ql-toolbar button:hover .ql-fill {
  fill: var(--accent);
}

/* Form controls for announcements and notes modals */
.user-modal-content .form-control,
#announcement-modal .form-control,
#edit-announcement-modal .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.2s, background 0.2s;
}

.user-modal-content .form-control:focus,
#announcement-modal .form-control:focus,
#edit-announcement-modal .form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-raised-solid);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.user-modal-content textarea.form-control,
#announcement-modal textarea.form-control,
#edit-announcement-modal textarea.form-control {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.user-modal-content select.form-control,
#announcement-modal select.form-control,
#edit-announcement-modal select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.user-modal-content input[type="datetime-local"].form-control,
#announcement-modal input[type="datetime-local"].form-control,
#edit-announcement-modal input[type="datetime-local"].form-control {
  cursor: text;
}

.user-modal-content input[type="checkbox"],
#announcement-modal input[type="checkbox"],
#edit-announcement-modal input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
  margin: 0;
}

.user-note-form .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.2s, background 0.2s;
}

.user-note-form .form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.user-note-form textarea.form-control {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

/* Meta label styling */
.meta-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

/* Announcement toggle buttons */
.announcement-toggle-btn {
  flex: 1;
  min-width: 70px;
  padding: 0.5rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.announcement-toggle-btn:hover {
  background: var(--surface-raised) !important;
  border-color: var(--border-soft) !important;
  color: var(--text) !important;
}

.announcement-toggle-btn.is-active {
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: rgba(59, 130, 246, 0.5) !important;
  color: var(--text) !important;
}

.announcement-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  margin-bottom: 0.18rem;
  color: var(--text-muted);
}

.announcement-author {
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-block;
  letter-spacing: 0.02em;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.announcement-date {
  opacity: 0.7;
}

.announcement-content {
  margin: 0;
  font-size: 0.82rem;
  white-space: pre-wrap;
  line-height: 1.4;
}

/* Animated gradient sweep for staff names */
.gradient-sweep {
  background-size: 260% 260%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-sweep 2.4s ease-in-out infinite alternate;
}

@keyframes gradient-sweep {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Updates – overview/header opens modal; each update is a separated block */
.updates-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.updates-item {
  padding: 0;
  background: rgba(var(--gradient-center-rgb), 0.45);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: var(--radius-xl, 18px);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.updates-item:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--gradient-center-rgb), 0.6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Posted less than 48 hours ago – more prominent, uses theme */
.updates-item-recent {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--gradient-center-rgb), 0.6);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.25), 0 4px 16px rgba(0, 0, 0, 0.25);
}
.updates-item-recent:hover {
  border-color: rgba(var(--accent-rgb), 0.6);
  background: rgba(var(--gradient-center-rgb), 0.75);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 6px 20px rgba(0, 0, 0, 0.3);
}
.updates-badge-new {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(var(--accent-rgb), 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Clickable overview/header */
.updates-overview {
  display: block;
  width: 100%;
  padding: 1rem 1.1rem 1rem 1rem;
  margin: 0;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
  position: relative;
  border-radius: 12px;
  transition: background 0.15s;
}
.updates-overview:hover {
  background: rgba(var(--accent-rgb), 0.08);
}
.updates-overview:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.updates-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.updates-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

.updates-meta {
  display: inline-flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.updates-tag {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  background: rgba(var(--accent-rgb), 0.25);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.95);
}

/* Section pills (Additions 💚, Changes 🔨, etc.) on update cards */
.updates-section-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.updates-section-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(var(--accent-rgb), 0.18);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
}
.updates-section-pill .updates-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
  margin-left: 0.15rem;
}

.updates-teaser {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
  padding-right: 2rem;
}

.updates-detail-source {
  display: none !important;
}

.updates-body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.updates-detail-inner {
  margin-bottom: 0;
}

/* Section-based updates (Discord-style) – larger text */
.updates-section {
  margin-top: 1rem;
}
.updates-section:first-child {
  margin-top: 0.5rem;
}
.updates-section-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
/* Ensure emoji render (system emoji fonts) */
.updates-section-title-emoji,
.updates-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
}
.updates-section-list {
  margin: 0 0 0 1.5rem;
  padding-left: 0.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.updates-section-list li {
  margin-bottom: 0.35rem;
}

/* Intro text in Recent Updates card */
.card-side .section-heading {
  font-size: 1.15rem;
}
.card-side .section-text {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Update detail pop-out modal – distinctive styling */
.update-detail-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1.5rem;
}
.update-detail-modal[aria-hidden="false"] {
  display: flex;
}
.update-detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.update-detail-modal-panel {
  position: relative;
  width: min(600px, 100%);
  max-height: 88vh;
  background: linear-gradient(180deg, #121a2e 0%, #0d1220 100%);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow:
    0 0 0 1px rgba(59, 130, 246, 0.08),
    0 32px 64px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(59, 130, 246, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.update-detail-modal-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), 0.9));
  border-radius: 20px 20px 0 0;
}
.update-detail-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem 1rem;
  padding-top: 1.25rem;
  flex-shrink: 0;
}
.update-detail-modal-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.update-detail-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.update-detail-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(148, 163, 184, 0.35);
}
.update-detail-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding: 0 1.75rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.update-detail-modal-meta .updates-tag {
  margin: 0;
}
.update-detail-modal-body {
  padding: 0 1.75rem 1.75rem 1.75rem;
  overflow-y: auto;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
}
/* Ensure emojis/icons render in modal */
.update-detail-modal-body .updates-emoji,
.update-detail-modal-body .updates-section-title-emoji .updates-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
  font-style: normal;
}
.update-detail-modal-body .updates-section,
.update-detail-modal-body .updates-body {
  margin-top: 1rem;
}
.update-detail-modal-body .updates-section:first-child {
  margin-top: 0;
}
.update-detail-modal-body .updates-section-title {
  font-size: 1.1rem;
}

/* Partners carousel – sliding left, seamless loop (above Staff) */
.partners-section {
  margin-bottom: 0;
}
.partners-carousel {
  margin-top: 0.9rem;
  overflow: hidden;
  width: 100%;
}
.partners-carousel-track {
  display: flex;
  width: 200%;
  animation: partnersSlideLeft 30s linear infinite;
}
.partners-carousel-track:hover {
  animation-play-state: paused;
}
@keyframes partnersSlideLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.partners-carousel-row {
  display: flex;
  flex: 0 0 50%;
  gap: 1rem;
  padding: 0.5rem 0;
  justify-content: flex-start;
}
.partners-carousel-row-dupe {
  flex: 0 0 50%;
}
.partners-carousel .partners-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 120px;
  max-width: 140px;
  padding: 1rem 0.75rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.partners-carousel .partners-item:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: var(--surface-raised);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.partners-carousel .partners-item-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
}
.partners-carousel .partners-item-initial {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.25), rgba(var(--accent-rgb), 0.08));
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
}
.partners-carousel .partners-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  color: var(--text);
}

/* Staff cards */
.staff-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.staff-card {
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(10, 10, 24, 0.95);
}

.staff-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.staff-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.8);
  overflow: hidden;
}

.staff-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  display: block;
}

.staff-text {
  display: flex;
  flex-direction: column;
}

.staff-name {
  font-size: 0.9rem;
  font-weight: 600;
}

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

.staff-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Homepage staff cards only (not admin .staff-note list items) */
.staff-grid .staff-card-note {
  margin-top: 0.4rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
}

.staff-discord {
  margin-bottom: 0.15rem;
}

.staff-card-lead {
  border-color: rgba(249, 250, 251, 0.9);
  box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.6);
}

.staff-name-lead {
  font-size: 1rem;
}

/* Ticket form */
.ticket-block {
  margin-top: 1.1rem;
}

.ticket-form .form-row {
  margin-bottom: 0.6rem;
}

.ticket-status {
  font-size: 0.8rem;
  margin: 0.4rem 0;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
}

.ticket-status.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
}

.ticket-status.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.7);
  color: #fecaca;
}

/* Gallery grid – 3 columns, vertical scroll */
.gallery-scroller {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.gallery-item {
  border-radius: 16px;
  border: 1px solid var(--border-soft);
  background: var(--surface-muted-95);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.gallery-caption {
  padding: 0.35rem 0.5rem 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .gallery-scroller {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 360px;
  }
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .home-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-top-right {
    flex-direction: column;
  }
}

@media (max-width: 800px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  
  /* Ticket detail 2-column layout - stack on mobile */
  .card > div[style*="grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.8fr)"],
  .card > div[style*="grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr)"],
  .card > div[style*="grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr)"] {
    grid-template-columns: 1fr !important;
  }
}

.about-grid .card-column > .card + .card {
  margin-top: 1rem;
}

/* Applications layout */
.applications-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* Left card: navigation + linked accounts */
.applications-sidebar {
  flex: 0 0 410px;
  max-width: 440px;
}

/* Right card: active application */
.applications-content {
  flex: 1;
  min-width: 0;
}

/* Keep the pill-style nav */
.app-type-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  justify-content: space-between; /* text left, badge right */
  gap: 0.5rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text);
  background: var(--surface-muted-80);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease, color 0.2s ease;
}

.app-type-pill:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.app-type-pill.is-active {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.65);
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.92),
    rgba(var(--accent-rgb), 0.55)
  );
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.28);
}

.app-type-label {
  flex: 1 1 auto;
}

.app-type-status {
  flex: 0 0 auto;
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
  /* optional: a little padding if tag-warning doesn't already */
  /* padding: 0.1rem 0.4rem; */
}

/* Application forms */
.app-form .form-row {
  margin-bottom: 0.9rem;
}

.app-form .tiny {
  margin-top: 0.2rem;
}

/* Optional scenario/helper text below question label */
.app-form .form-question-description {
  margin: 0.25rem 0 0.35rem 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Application inputs/selects */
.app-form input[type="text"],
.app-form input[type="number"],
.app-form input[type="url"],
.app-form input[type="email"],
.app-form textarea,
.app-form select {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, transform 0.05s ease;
}

.app-form input[type="text"]:focus,
.app-form input[type="number"]:focus,
.app-form input[type="url"]:focus,
.app-form input[type="email"]:focus,
.app-form textarea:focus,
.app-form select:focus {
  border-color: rgba(var(--accent-rgb), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
  background: var(--surface-raised-solid);
}

.app-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.25rem;
  background-image: linear-gradient(
      45deg,
      transparent 50%,
      rgba(148, 163, 184, 0.9) 50%
    ),
    linear-gradient(
      135deg,
      rgba(148, 163, 184, 0.9) 50%,
      transparent 50%
    );
  background-position:
    calc(100% - 14px) calc(50% - 3px),
    calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.app-form select option {
  background: #020617;
  color: #e5e7eb;
}

/* Custom question input types */
.app-form .form-row-checkbox .checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.app-form .form-row-checkbox input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.app-form .form-row-checkbox label {
  margin: 0;
  cursor: pointer;
  flex: 1;
}

.app-form .form-row-radio .radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.app-form .form-row-radio .radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.app-form .form-row-radio .radio-option input[type="radio"] {
  width: auto;
  flex-shrink: 0;
}

/* Admin custom questions form styling */
.custom-questions-add-block .custom-question-form-styled .admin-setting-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.custom-question-fields .form-row-stack input.form-control,
.custom-question-fields .form-row-stack select.form-control,
.custom-question-fields .form-row-stack textarea.form-control {
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
}

.custom-question-fields .form-label {
  font-weight: 500;
  font-size: 0.85rem;
}

.custom-question-fields .form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.form-row-inline-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.custom-question-row .edit-question-form .form-control,
.custom-question-row .edit-question-form textarea,
.custom-question-row .edit-question-form select {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.tag-info {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* Question preview modal */
.question-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.question-preview-modal[aria-hidden="false"] {
  display: flex;
}

.question-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.question-preview-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0f1424;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.question-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.question-preview-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.question-preview-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.question-preview-close:hover {
  background: rgba(148, 163, 184, 0.25);
}

.question-preview-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.question-preview-form-wrap.app-form {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.question-preview-form-wrap .form-row {
  margin-bottom: 0.9rem;
}

.question-preview-form-wrap .form-row:last-child {
  margin-bottom: 0;
}

/* Full application preview modal – larger for complete form */
.full-application-preview-modal .full-application-preview-panel {
  width: min(960px, 95vw);
  max-height: 90vh;
}

.full-application-preview-body {
  max-height: calc(90vh - 120px);
  overflow-y: auto;
}

.full-application-preview-body .application-form-preview {
  padding: 0.5rem 0;
}

.full-application-preview-body .application-form-preview .section-block {
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .applications-layout {
    flex-direction: column;
  }

  .applications-sidebar {
    flex: 0 0 auto;
    max-width: 100%;
  }
}

/* ----------------- Dashboard specific ----------------- */

.dashboard-hero {
  /* override card-hero's zero padding */
  padding: 1.6rem 1.6rem 1.4rem;
}

.dashboard-hero-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.6rem;
}

.dashboard-hero-status {
  flex: 0 0 320px;
  max-width: 340px;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.85);
}

.hero-highlights-grid {
  margin-top: 0.75rem;
}

.status-row-large {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.status-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.status-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.server-info-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.stat-pill {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  text-align: left;
  min-width: 0;
  overflow: hidden;
  gap: 0.75rem;
}

.stat-pill .stat-label {
  flex-shrink: 0;
  margin-bottom: 0;
  text-align: left;
}

.stat-pill .stat-value {
  flex: 1;
  text-align: right;
  min-width: 0;
}

.stat-pill-info {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.4);
  flex-direction: column;
  align-items: flex-start;
  padding: 0.6rem 0.8rem;
}

.stat-pill-info .stat-label {
  margin-bottom: 0.1rem;
  width: 100%;
}

.stat-pill-info .stat-value {
  text-align: left;
  width: 100%;
  word-break: break-all;
  line-height: 1.3;
}

.stat-pill-offline {
  opacity: 0.6;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  white-space: nowrap;
  line-height: 1.2;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  line-height: 1.3;
}

.server-address {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  user-select: all;
  transition: color 0.2s;
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
  line-height: 1.3;
  margin-top: 0;
}

.server-address:hover {
  color: var(--accent);
}

.btn-connect-server {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  margin-top: 0;
  font-size: 0.9rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-connect-server:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.2));
  border-color: rgba(34, 197, 94, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-connect-server:active:not(:disabled) {
  transform: translateY(0);
}

.btn-connect-disabled {
  background: rgba(148, 163, 184, 0.1) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-connect-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Generic tag pill (used for whitelist + identity state) */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7ff;
  white-space: nowrap;
}

.tag-success {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.85);
  color: #bbf7d0;
}

.tag-danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.9);
  color: #fecaca;
}

.tag-warning {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.8);
  color: #fef9c3;
}

.tag-info {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.85);
  color: #bfdbfe;
}

.tag-secondary {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.85);
  color: #cbd5e1;
}

.tag-soft {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.8);
  color: #e5e7ff;
}

.tag-neutral {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text-muted);
}

/* Identity list (Discord / Steam / etc) */
.identity-grid {
  margin-top: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  background: var(--surface-muted-80);
  border: 1px solid var(--border-soft);
}

.identity-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.identity-label {
  font-size: 0.85rem;
  font-weight: 500;
}

.identity-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dashboard-cta {
  margin-top: 0.9rem;
}

.whitelist-note {
  margin-top: 0.6rem;
}

/* Dashboard card grid tweaks */
.dashboard-grid {
  margin-top: 1.1rem;
}

.dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Quick action cards */
.quick-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  background: var(--surface-muted-80);
  border: 1px solid var(--border-soft);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    border-color 0.12s ease, background 0.12s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.quick-action-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: var(--surface-raised);
}

.quick-actions--stacked {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
}

.quick-action-icon {
  font-size: 1.4rem;
}

.quick-action-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.quick-action-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.quick-action-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Responsive layout for dashboard hero */
@media (max-width: 960px) {
  .dashboard-hero-main {
    flex-direction: column;
  }

  .dashboard-hero-status {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
  }
}


/* ----------------- City Info / Characters ----------------- */

.city-layout {
  padding: 1.6rem 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
}

/* Top mini stats: total chars, playtime, last seen */
.city-overview-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
}

.city-overview-card {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.city-overview-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.city-overview-value {
  font-size: 1.05rem;
  font-weight: 600;
}

.city-overview-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Three-column layout: My Characters / My Gang / My Workplace */
.city-columns {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  align-items: flex-start;
}

@media (max-width: 1200px) {
  .city-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .city-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Each column card */
.city-column {
  padding: 1.3rem 1.3rem 1.1rem;
  border-radius: 16px;
  background: rgba(11, 15, 30, 0.98);
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
}

.city-column-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.city-column-subtitle {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* List rows inside city columns (characters, gang, workplace) */
.entity-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.entity-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(31, 41, 55, 0.9);
  font-size: 0.82rem;
}

.entity-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.entity-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entity-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* "Primary" badge */
.entity-pill {
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(var(--accent-rgb), 0.9);
  background: var(--accent-soft);
  color: #e5e7ff;
  white-space: nowrap;
}

/* ----------------- Generic pills (used in modal tags) ----------------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.pill-soft {
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.8);
  color: #e5e7ff;
}

.pill-outline {
  border: 1px solid rgba(148, 163, 184, 0.8);
  color: var(--text-muted);
  background: transparent;
}

/* Definition list rows (Overview / Job sections) */
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.meta-row dt {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.meta-row dd {
  margin: 0;
  font-size: 0.8rem;
}

/* Hide modal templates */
.character-modal-template {
  display: none;
}

/* ----------------- Characters modal ----------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

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

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 1020px;              /* wider = less cramped */
  margin: 0 1.2rem;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top, var(--gradient-center), #050313 65%);
  border: 1px solid rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  padding: 1.8rem 1.9rem 1.6rem;
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  max-height: 75vh;
  overflow: auto;
}

/* Modal header */
.char-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}

.char-modal-name {
  margin: 0 0 0.25rem;
  font-size: 1.3rem;
}

.char-modal-subtitle {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.char-modal-subtitle strong {
  font-weight: 600;
}

.char-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

/* Two-column grid inside modal, stacks on mobile */
.char-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .char-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .char-modal-header {
    flex-direction: column;
  }

  .char-modal-tags {
    justify-content: flex-start;
  }
}

.char-modal-section {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.char-modal-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.char-modal-meta {
  margin: 0;
}

.char-modal-meta .meta-row {
  font-size: 0.8rem;
}

.entity-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.inline-form {
  display: inline-block;
  margin: 0;
}

/* Inventory list */
.inv-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 260px;
  overflow: auto;
}

.inv-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.4rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(31, 41, 55, 0.9);
  font-size: 0.8rem;
}

.inv-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.inv-slot {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.inv-name {
  font-weight: 500;
}

.inv-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

/* Vehicles list (already present, keep it) */
.veh-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 260px;
  overflow: auto;           /* scroll when many vehicles */
}

/* Each vehicle row card */
.veh-row {
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(31, 41, 55, 0.9);
  font-size: 0.8rem;
}

.veh-main {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.veh-model {
  font-weight: 500;
}

.veh-plate {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* Stat line: Fuel / Engine / Body */
.veh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.veh-stat {
  display: inline-flex;
  align-items: center;
}

/* Bullet separator between stats */
.veh-meta .veh-stat + .veh-stat::before {
  content: '•';
  margin: 0 0.4rem;
  opacity: 0.6;
}

/* Icon + label/value styling */
.veh-icon {
  font-size: 0.9rem;
  margin-right: 0.25rem;
  opacity: 0.9;
}

.veh-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 0.2rem;
}

.veh-value {
  font-size: 0.8rem;
  font-weight: 500;
}

/* Garage line on its own row */
.veh-garage {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--text-muted);
}

.veh-icon-garage {
  font-size: 0.85rem;
}

.veh-garage-sep {
  opacity: 0.7;
}

/* IN / OUT status pill */
.veh-garage-status {
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.veh-garage-in {
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.8);
  color: #bbf7d0;
}

.veh-garage-out {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.85);
  color: #fecaca;
}

/* ----------------- Admin tables (whitelist list) ----------------- */

.table-wrapper {
  width: 100%;
  max-width: 1760px;              /* keep it compact inside the card */
  margin: 0.4rem auto 0;         /* center in the card */
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table thead {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.table th,
.table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.table-tight th,
.table-tight td {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

/* “Card” look for the table itself */
.table-admin-whitelist {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(11, 15, 30, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
}

.table-admin-whitelist thead {
  background: radial-gradient(circle at top,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.92));
}

.table-admin-whitelist thead th {
  border-bottom: 1px solid rgba(31, 41, 55, 0.95);
}

.table-admin-whitelist tbody tr {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
}

.table-admin-whitelist tbody tr:first-child {
  border-top: none;
}

.table-admin-whitelist tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.96);   /* subtle zebra stripe */
}

.table-admin-whitelist tbody tr:hover {
  background: radial-gradient(circle at top left,
    rgba(var(--accent-rgb), 0.18),
    rgba(15, 23, 42, 0.98));
}

/* Column sizing */
.table-admin-whitelist .col-id {
  width: 70px;
  font-variant-numeric: tabular-nums;
}

.table-admin-whitelist .col-player {
  min-width: 160px;
}

.table-admin-whitelist .col-submitted {
  min-width: 170px;
}

.table-admin-whitelist .col-status-actions {
  width: 210px;
}

/* Status + View grouped and right-aligned */
.status-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.table-admin-whitelist .tag {
  margin-right: 0.05rem;
}

/* Small ghost button for "View" links */
.btn-ghost-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.23rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.76rem;
  text-decoration: none;
  color: var(--accent);
  background: rgba(15, 23, 42, 0.98);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease,
    color 0.12s ease, transform 0.08s ease, box-shadow 0.08s ease;
}

.btn-ghost-small:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.9);
  color: #e5e7ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.7);
}

/* Page header / card header used on admin pages */

.page-header {
  margin-bottom: 0.5rem;
}

.page-title {
  margin: 0 0 0.15rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.page-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header-row > div {
  flex: 1;
}

.activity-filter-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.activity-filter-select {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
}

.activity-filter-select:hover {
  border-color: rgba(148, 163, 184, 0.5);
}

.activity-filter-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Announcement filter field styling - override general filter-field */
#announcement-filters .filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#announcement-filters .filter-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}

#announcement-filters .filter-field .form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

#announcement-filters .filter-field .form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-raised-solid);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.activity-filter-input {
  padding: 0.45rem 0.65rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}

.activity-filter-input:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.activity-export {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  justify-content: center;
}

.activity-export .btn-link {
  font-size: 0.8rem;
}

.activity-export.compact {
  align-items: flex-start;
}

.btn-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-link.danger {
  color: #f87272;
}

.btn-link.danger:hover {
  color: #fecaca;
}

.staff-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

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

.staff-note-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.staff-note-form textarea {
  width: 100%;
  min-height: 80px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  padding: 0.5rem 0.6rem;
}

.staff-note-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.staff-note-list .staff-note {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(15, 23, 42, 0.8);
}

.staff-note-list .staff-note.empty {
  text-align: center;
  color: var(--text-muted);
}

.staff-note-content {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
}

.staff-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  align-items: center;
}

.staff-note-meta .inline-form {
  margin: 0;
}

.table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn {
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.pagination-btn:hover {
  border-color: rgba(148, 163, 184, 0.8);
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: default;
  border-color: rgba(148, 163, 184, 0.2);
}

.pagination-current {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Application filters */
/* Filter Panel Animation */
#announcement-filters {
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
  overflow: hidden;
  padding: 1.25rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-top: 1rem;
}

.app-filters,
.admin-analytics-filters {
  margin-bottom: 1.5rem;
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
  overflow: hidden;
  padding: 1.25rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-top: 1rem;
}

.admin-chart-panel {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.app-filters .filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 0;
}

.app-filters .filter-field {
  flex: 1;
  min-width: 150px;
}

.app-filters .filter-field-button {
  flex: 0 0 auto;
}

.app-filters .filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.app-filters .filter-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.app-filters .filter-field .form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.app-filters .filter-field .form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-raised-solid);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.app-filters .filter-field-button {
  min-width: auto;
  max-width: fit-content;
}

@media (max-width: 768px) {
  .app-filters .filter-row {
    flex-direction: column;
  }
  
  .app-filters .filter-field {
    min-width: 100%;
  }
  
  .app-filters .filter-field-button {
    width: 100%;
  }
}

/* Announcement filter row styling */
#announcement-filters .filter-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

#announcement-filters .filter-field-button {
  min-width: auto;
  max-width: fit-content;
}

@media (max-width: 1024px) {
  #announcement-filters .filter-row {
    grid-template-columns: repeat(2, 1fr) auto;
  }
}

@media (max-width: 768px) {
  #announcement-filters .filter-row {
    grid-template-columns: 1fr;
  }
  
  #announcement-filters .filter-field-button {
    max-width: 100%;
  }
}

#announcement-filters .filter-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

#announcement-filters .filter-actions button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* User filter row styling */
#user-filters .filter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

#user-filters .filter-field-button {
  min-width: auto;
  max-width: fit-content;
}

@media (max-width: 1024px) {
  #user-filters .filter-row {
    grid-template-columns: repeat(2, 1fr) auto;
  }
}

@media (max-width: 768px) {
  #user-filters .filter-row {
    grid-template-columns: 1fr;
  }
  
  #user-filters .filter-field-button {
    max-width: 100%;
  }
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.9);
}

.filter-field .form-control {
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.filter-field .form-control:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-field select.form-control {
  cursor: pointer;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.filter-row .form-row {
  flex: 1;
  min-width: 150px;
}

.filter-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.export-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

/* Application comments */
.comments-list {
  max-height: 500px;
  overflow-y: auto;
}

.comment-item {
  transition: background-color 0.2s;
}

.comment-item:hover {
  background: rgba(15, 23, 42, 0.7) !important;
}

/* Pagination for applications */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

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

/* QA cards for admin application view */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.qa-card {
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.qa-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.qa-value {
  font-size: 0.88rem;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.45;
}

/* Admin application view – two-column layout: content | actions */
.admin-app-view-layout {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 360px);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-app-view-layout {
    grid-template-columns: 1fr;
  }
}

.admin-app-content-card {
  /* Read-only application content – distinct from action panel */
}

.admin-app-action-panel {
  position: sticky;
  top: 1rem;
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 16px;
  background: rgba(11, 15, 30, 0.98);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.admin-app-action-panel .panel-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.admin-app-action-panel .panel-section {
  margin-bottom: 1.25rem;
}

.admin-app-action-panel .panel-section:last-child {
  margin-bottom: 0;
}

.admin-app-action-panel .panel-section-heading {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.admin-app-action-panel .panel-section-heading:not(:first-child) {
  margin-top: 1rem;
}

.admin-app-action-panel .approve-deny-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.admin-app-action-panel .approve-deny-row form {
  display: block;
}

.admin-app-action-panel .approve-deny-row button {
  width: 100%;
  justify-content: center;
}

.admin-app-action-panel .comment-item {
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.5rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  border-left: 3px solid rgba(148, 163, 184, 0.4);
}

.admin-app-action-panel .comment-item:last-child {
  margin-bottom: 0;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 200px;
}

.admin-table td {
  vertical-align: middle;
}

.admin-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: rgba(var(--gradient-center-rgb), 0.95);
  z-index: 1;
}

.admin-table tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.08);
}

.admin-table-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.admin-table .cell-actions {
  text-align: right;
  white-space: nowrap;
  max-width: none;
}

.admin-table td:last-child {
  max-width: none;
}

.admin-table td:first-child {
  max-width: 150px;
}

.app-type-list.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.app-type-pill.admin-pill {
  padding-inline: 0.9rem 0.9rem;
  min-width: 0;
}

/* Admin Applications Hub – tab strip (switch queue) */
.admin-applications-tab-strip {
  margin: 1.5rem 0;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 16px;
  background: rgba(var(--accent-rgb), 0.06);
  overflow: hidden;
}

.admin-applications-tab-strip-inner {
  padding: 1.25rem 1.5rem;
}

.admin-applications-tab-heading {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.admin-applications-tab-hint {
  margin: 0 0 1rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-applications-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-application-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.admin-application-tab:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
  transform: translateY(-1px);
}

.admin-application-tab.is-active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.08));
  color: var(--text);
  font-weight: 600;
}

.admin-application-tab-label {
  white-space: nowrap;
}

/* Admin hub layout */
.admin-shell {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.admin-sidebar {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-overline {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0;
}

.sidebar-title {
  margin: 0;
  font-size: 1.3rem;
}

.sidebar-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  text-decoration: none;
  color: inherit;
  background: rgba(15, 23, 42, 0.6);
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.admin-nav-item:hover {
  border-color: rgba(var(--accent-rgb), 0.8);
  transform: translateX(2px);
}

.admin-nav-item.is-active {
  border-color: rgba(var(--accent-rgb), 0.9);
  background: rgba(var(--accent-rgb), 0.15);
}

.admin-nav-item.is-disabled {
  opacity: 0.55;
  cursor: default;
}

.admin-nav-item.is-disabled:hover {
  border-color: rgba(148, 163, 184, 0.2);
  transform: none;
}

.admin-nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.admin-nav-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav-label {
  font-weight: 600;
}

.admin-nav-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-nav-coming {
  font-size: 0.75rem;
  color: #facc15;
}

.admin-subscriber-alert {
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #eab308;
  font-size: 0.85rem;
  line-height: 1.4;
}

.admin-subscriber-alert strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.admin-subscriber-alert p {
  margin: 0.25rem 0;
  font-size: 0.8rem;
}

.admin-subscriber-alert-detail {
  font-style: italic;
  opacity: 0.95;
}

.admin-subscriber-alert-meta {
  font-size: 0.75rem !important;
  opacity: 0.85;
  margin-top: 0.4rem !important;
}

.admin-subscriber-alert-hint {
  font-size: 0.75rem !important;
  margin-top: 0.5rem !important;
  color: var(--text-muted, #94a3b8);
}

.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-comms-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  margin-bottom: -0.25rem;
  padding-bottom: 0;
}

.admin-comms-tab {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: var(--radius, 8px) var(--radius, 8px) 0 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.admin-comms-tab:hover {
  color: var(--text);
  text-decoration: none;
}

.admin-comms-tab.is-active {
  color: var(--text);
  border-bottom-color: rgba(var(--accent-rgb), 0.9);
  background: rgba(var(--accent-rgb), 0.08);
  text-decoration: none;
}

.admin-metrics {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}

.admin-metric {
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-metric-value {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Staff settings block – contained panel in staff toolkit */
.staff-settings-block {
  margin-bottom: 1.5rem;
}

.staff-settings-panel {
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.5);
}

.staff-settings-form-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.staff-setting-row {
  margin-bottom: 0;
}

.staff-setting-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}

.staff-setting-label input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.staff-setting-label-text {
  line-height: 1.4;
}

.staff-setting-description {
  margin: 0.35rem 0 0 1.85rem;
  max-width: 42rem;
}

.staff-settings-actions {
  padding-top: 0.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* Admin form controls (availability, form builder, filters, etc.) */
.admin-main-card .form-control,
.admin-main-card input.form-control,
.admin-main-card select.form-control,
.admin-main-card textarea.form-control,
.admin-main-card .form-row-inline select,
.admin-main-card .form-row-stack textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.admin-main-card .form-control:focus,
.admin-main-card .form-row-inline select:focus,
.admin-main-card .form-row-stack textarea:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.admin-main-card .form-control::placeholder,
.admin-main-card .form-row-stack textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.admin-main-card .btn-small.btn-secondary {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.admin-main-card .btn-small.btn-secondary:hover {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text);
}

.admin-main-card .form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-main-card select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.admin-main-card .form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.admin-main-card .form-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

.admin-main-card .form-check input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.admin-main-card .section-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.admin-main-card .section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.45;
}

/* Admin ticket detail – reply Quill editor (dark theme) */
.admin-shell .ticket-reply-quill {
  min-height: 10rem;
  width: 100%;
}
.admin-shell .ticket-reply-quill .ql-container {
  min-height: 10rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0 0 10px 10px;
  background: rgba(15, 23, 42, 0.6);
  font-size: 0.9rem;
}
.admin-shell .ticket-reply-quill .ql-toolbar {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: rgba(15, 23, 42, 0.5);
}
.admin-shell .ticket-reply-quill .ql-editor {
  min-height: 10rem;
  color: var(--text, #f9fafb);
}
.admin-shell .ticket-reply-quill .ql-editor.ql-blank::before {
  color: rgba(148, 163, 184, 0.6);
}
.admin-shell .ticket-reply-quill .ql-toolbar .ql-stroke {
  stroke: rgba(148, 163, 184, 0.4);
}
.admin-shell .ticket-reply-quill .ql-toolbar .ql-fill {
  fill: rgba(148, 163, 184, 0.5);
}
.admin-shell .ticket-reply-quill .ql-toolbar button:hover .ql-stroke {
  stroke: var(--accent);
}
.admin-shell .ticket-reply-quill .ql-toolbar button:hover .ql-fill {
  fill: var(--accent);
}

/* User ticket detail – reply Quill */
.ticket-reply-quill .ql-container {
  min-height: 8rem;
  border: 1px solid var(--border-soft);
  border-radius: 0 0 10px 10px;
  background: var(--surface-raised);
  font-size: 0.9rem;
}
.ticket-reply-quill .ql-toolbar {
  border: 1px solid var(--border-soft);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: var(--surface-muted-75);
}
.ticket-reply-quill .ql-editor {
  min-height: 8rem;
  color: var(--text);
}
.ticket-reply-quill .ql-editor.ql-blank::before {
  color: var(--text-muted);
}
.ticket-reply-quill .ql-toolbar .ql-stroke {
  stroke: var(--text-muted);
}
.ticket-reply-quill .ql-toolbar .ql-fill {
  fill: rgba(148, 163, 184, 0.5);
}
.ticket-reply-quill .ql-toolbar button:hover .ql-stroke {
  stroke: var(--accent);
}
.ticket-reply-quill .ql-toolbar button:hover .ql-fill {
  fill: var(--accent);
}

/* Admin ticket detail – tag input & add button */
#ticket-tags-section .ticket-tag-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
#ticket-tags-section #ticket-tag-input {
  flex: 1;
  min-width: 100px;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s;
}
#ticket-tags-section #ticket-tag-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}
#ticket-tags-section #ticket-tag-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}
#ticket-tags-section #ticket-tag-add {
  flex-shrink: 0;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

/* Admin ticket detail – participants search & dropdown */
#ticket-participants-section .participant-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}
#ticket-participants-section .participant-add-row .participant-search-wrap {
  flex: 1;
  min-width: 160px;
  position: relative;
}
#ticket-participants-section #participant-search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s;
}
#ticket-participants-section #participant-search::placeholder {
  color: rgba(148, 163, 184, 0.5);
}
#ticket-participants-section #participant-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}
#ticket-participants-section #participant-permission-new {
  min-width: 130px;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
}
#ticket-participants-section #participant-permission-new:focus {
  outline: none;
  border-color: var(--accent);
}
#ticket-participants-section .participant-permission-select {
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  min-width: 110px;
}
#ticket-participants-section #participant-search-results {
  background: rgba(5, 3, 19, 0.98) !important;
  backdrop-filter: blur(8px);
}
#ticket-participants-section .participant-search-item:hover {
  background: rgba(148, 163, 184, 0.1);
}
.admin-shell .ticket-action-btn-hover:hover {
  background: rgba(148, 163, 184, 0.1) !important;
}

.staff-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1.4rem;
}

.insight-card {
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1rem;
  background: var(--surface-muted-75);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.insight-label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.insight-value {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.insight-desc,
.insight-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.insight-breakdown {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.insight-breakdown li + li {
  margin-top: 0.15rem;
}

.profile-meta {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-line {
  margin: 0;
}

.with-tight-gap {
  margin-bottom: 0.5rem;
}

.empty-state {
  padding: 1.5rem;
  border: 1px dashed var(--border-soft);
  border-radius: 16px;
  background: var(--surface-muted-75);
}

@media (max-width: 1100px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
  }
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.admin-setting-card {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.admin-setting-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.admin-setting-label {
  margin: 0;
  font-weight: 600;
}

.admin-setting-meta {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-pill {
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill-success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.pill-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.pill-warning {
  background: rgba(251, 191, 36, 0.25);
  color: #fcd34d;
}

.collapsible-card {
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
}

.collapsible-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  background: transparent;
  border: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.collapsible-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.collapsible-icon {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.collapsible-card.is-open .collapsible-icon {
  transform: rotate(180deg);
}

.collapsible-trigger-subtle {
  padding: 0.75rem 1rem;
}

.collapsible-trigger-subtle .section-heading {
  font-weight: 600;
}

.collapsible-nested {
  border-radius: 12px;
  border-color: rgba(var(--accent-rgb), 0.15);
  background: rgba(0, 0, 0, 0.18);
}

.collapsible-nested .collapsible-trigger-subtle {
  padding: 0.6rem 1rem;
}

.collapsible-nested .collapsible-body {
  padding: 0 1rem 1rem;
}

.collapsible-body {
  padding: 0 1.4rem 1.2rem;
}

.admin-setting-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.form-row-inline select {
  flex: 0 0 140px;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
}

body.modal-open {
  overflow: hidden;
}

.form-row-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.form-row-stack textarea {
  min-height: 60px;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  resize: vertical;
}

.admin-setting-actions {
  display: flex;
  justify-content: flex-end;
}

.app-disabled-box {
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px dashed rgba(248, 250, 252, 0.4);
  background: rgba(15, 23, 42, 0.4);
  color: var(--text);
  line-height: 1.5;
  margin-top: 1rem;
}

.staff-name {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.inline-form select {
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  color: var(--text);
  margin-right: 0.4rem;
}

.tabletop-action {
  margin-left: 0.35rem;
}

.btn-small.danger {
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

.btn-small.danger:hover {
  border-color: rgba(248, 113, 113, 0.9);
  color: #fecaca;
}

.btn-small.warning {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
}

.btn-small.warning:hover {
  border-color: rgba(251, 191, 36, 0.9);
  color: #fcd34d;
}

.staff-add-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.staff-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.staff-add-grid label,
.staff-add-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.staff-add-grid input,
.staff-add-grid select,
.staff-add-form textarea {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  color: var(--text);
  padding: 0.45rem 0.55rem;
}

.staff-add-form textarea {
  min-height: 60px;
  resize: vertical;
}

.tabs-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tab-buttons {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-button {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.12s ease;
  text-decoration: none;
  display: inline-block;
}

.tab-button:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.8);
  text-decoration: none;
}

.tab-button.is-active {
  background: rgba(var(--accent-rgb), 0.25);
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.8);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4);
  text-decoration: none;
}

.session-table-wrapper {
  margin-top: 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-raised);
}

.session-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.session-table th,
.session-table td {
  padding: 0.75rem 0.95rem;
  text-align: left;
}

.session-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-soft);
}

.session-table tbody tr + tr {
  border-top: 1px solid var(--border-soft);
}

.session-table td {
  color: var(--text);
}

.session-table tbody tr.is-current-session {
  background: rgba(56, 189, 248, 0.05);
}

.session-device {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.session-device-name {
  font-weight: 600;
}

.session-device-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.session-id {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
}

.session-ip {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
}

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

.session-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.session-actions form {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.session-actions button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.admin-modal.is-visible {
  display: flex;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.65);
}

.admin-modal-panel {
  position: relative;
  background: var(--surface-deep);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  width: min(960px, 95vw);
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.admin-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

.admin-modal-close:hover {
  background: var(--surface-muted-60);
  color: var(--text);
}

/* --- Add/Edit Update modal --- */
.update-modal-panel {
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.update-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-muted-75);
  flex-shrink: 0;
}

.update-modal-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.update-modal-content {
  padding: 1.5rem 1.75rem 1.75rem;
}

.update-form-row {
  margin-bottom: 1.1rem;
}

.update-form-row:last-of-type {
  margin-bottom: 0;
}

.update-form-row .meta-label {
  display: block;
  margin-bottom: 0.35rem;
}

.update-form-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0;
}

.update-form-check input[type="checkbox"] {
  flex-shrink: 0;
}

.update-sections-container {
  margin-top: 1rem;
  padding: 1.1rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.update-sections-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.update-sections-container #sections-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.update-section-block {
  padding: 1rem 1.1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  transition: border-color 0.2s, background 0.2s;
}

.update-section-block:focus-within {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--surface-raised-solid);
}

.update-section-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.update-section-block-fields {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.update-section-block .section-title-input {
  padding: 0.5rem 0.65rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  min-width: 0;
  max-width: 160px;
}

.update-section-block .section-title-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.section-emoji-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.section-emoji-wrap .section-emoji-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
}
.emoji-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  padding: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.emoji-picker-trigger:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: var(--surface-raised-solid);
}
.emoji-picker-trigger:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}
.emoji-picker-value {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
  line-height: 1;
}
.emoji-picker-value:empty::after {
  content: '⋯';
}

/* Emoji picker popover */
.emoji-picker-popover {
  position: fixed;
  z-index: 1000;
  min-width: 200px;
  padding: 0.6rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.emoji-picker-popover[hidden] {
  display: none !important;
}
.emoji-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.emoji-picker-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--surface-muted-75);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.emoji-picker-option:hover {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.35);
}
.emoji-picker-clear {
  display: block;
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  cursor: pointer;
}
.emoji-picker-clear:hover {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.update-product-content-container {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.product-content-block {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.product-content-block:last-child { margin-bottom: 0; }
.product-content-block-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--accent, #818cf8);
}
.update-section-block .section-products-row {
  margin-top: 0.75rem;
}
.update-section-block .section-products-row .meta-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.update-section-block .add-item-btn {
  margin-top: 0.5rem;
}

.update-section-block .section-items-wrap {
  margin-top: 0.75rem;
}

.section-item-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.section-item-row .section-item-tag {
  flex-shrink: 0;
  padding: 0.5rem 0.5rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.section-item-row .section-item-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.section-item-row .section-item-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.update-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
}

.update-modal-actions .btn-primary {
  min-width: 100px;
}

/* Admin Homepage Updates list – each update as a separate card */
.admin-updates-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-update-item {
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.admin-update-item:hover {
  border-color: rgba(var(--accent-rgb), 0.3);
  background: var(--surface-muted-65);
}

.admin-update-item-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}

.admin-update-item-content {
  flex: 1;
  min-width: 0;
}

.admin-update-item-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.admin-update-item-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.admin-update-section-pills {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.admin-update-item-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.admin-update-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Form controls inside update modal (reuse modal form styling) */
.update-modal-content .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.2s, background 0.2s;
}

.update-modal-content .form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-raised-solid);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.update-modal-content textarea.form-control {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.update-modal-content input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.user-modal-content {
  padding: 1.75rem 2rem 2rem;
  overflow-y: auto;
}

.user-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.user-modal-heading h2 {
  margin: 0.2rem 0;
}

.user-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.user-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.user-summary-grid > * {
  min-width: 0;
}

.user-summary-card {
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
}

.summary-label {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.summary-value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
}

.user-modal-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.user-modal-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.user-modal-tab.is-active {
  color: var(--text);
  border-color: var(--accent);
}

.user-tab-panel {
  display: none;
  animation: fadeSlide 0.2s ease;
  min-width: 0;
  overflow: hidden;
}

.user-tab-panel.is-active {
  display: block;
}

.user-tab-panel .table-scroll {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: auto;
}

.user-meta-grid,
.user-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-overview-grid > * {
  min-width: 0;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.user-overview-card {
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
}

.meta-label {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.meta-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.4;
  max-width: 100%;
  overflow: hidden;
}

.meta-value > * {
  display: inline-block;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.user-linked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.user-linked-grid > * {
  min-width: 0;
}

.user-security-panel h4 {
  margin-bottom: 0.6rem;
}

.user-security-panel .table-scroll {
  max-height: 260px;
}

.user-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  text-align: center;
}

.user-modal-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

/* Button Loading Spinner */
.button-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

button.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

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

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

.linked-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.linked-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.linked-list li:last-child {
  border-bottom: none;
}

.password-strength {
  margin-top: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface-muted-60);
}

.password-strength-meter {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-muted-75);
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  transition: width 0.2s ease, background 0.2s ease;
  background: #ef4444;
}

.password-strength-bar[data-level='weak'] {
  background: #f97316;
}

.password-strength-bar[data-level='fair'] {
  background: #fbbf24;
}

.password-strength-bar[data-level='good'] {
  background: #34d399;
}

.password-strength-bar[data-level='strong'] {
  background: #14b8a6;
}

.password-strength-label {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.password-strength-label span {
  font-weight: 600;
  color: var(--text);
}

.password-strength-requirements {
  list-style: none;
  padding: 0;
  margin: 0.55rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.password-strength-requirements li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.password-strength-requirements li::before {
  content: '○';
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.8);
}

.password-strength-requirements li.met {
  color: #34d399;
}

.password-strength-requirements li.met::before {
  content: '✓';
  color: #34d399;
}

.password-strength-message {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}


.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease;
}

.tab-panel.is-active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsiveness for Admin Interface */
/* Announcement Content Expand/Collapse */
.announcement-content-wrapper {
  position: relative;
}

.announcement-content {
  max-height: 150px;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  position: relative;
}

.announcement-content.expanded {
  max-height: none;
}

.announcement-expand-btn {
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.announcement-expand-btn:hover {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: rgba(var(--accent-rgb), 0.5);
}

.announcement-expand-btn:active {
  transform: scale(0.98);
}

/* Announcement Modal Scrollbar Styling */
.announcement-modal-panel {
  max-height: 90vh;
  overflow-y: auto;
}

.announcement-modal-panel::-webkit-scrollbar {
  width: 10px;
}

.announcement-modal-panel::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 10px;
}

.announcement-modal-panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  border: 2px solid rgba(15, 23, 42, 0.6);
}

.announcement-modal-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.5);
}

/* Firefox scrollbar styling */
.announcement-modal-panel {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) rgba(15, 23, 42, 0.6);
}

/* Add role from Discord modal */
.add-role-modal-panel {
  padding: 1.75rem 2rem 2rem;
}

.add-role-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.add-role-modal-desc {
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.85);
  margin: 0 0 1.25rem 0;
  line-height: 1.45;
}

.add-role-form-group {
  margin-bottom: 1.125rem;
}

.add-role-form-group:last-of-type.add-role-checkbox-group {
  margin-bottom: 0;
}

.add-role-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: rgba(148, 163, 184, 0.95);
}

.add-role-form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color 0.2s, background 0.2s;
}

.add-role-form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.add-role-form-control::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.add-role-form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.add-role-form-group select.add-role-form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(148,163,184,0.8)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.25rem;
}

.add-role-checkbox-group {
  margin-bottom: 0.75rem;
}

.add-role-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.95);
}

.add-role-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.add-role-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.add-role-modal-actions .btn-primary {
  min-width: 5rem;
}

/* Quill Editor Dark Theme Override */
html:not(.appearance-light) .ql-toolbar {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 12px 12px 0 0 !important;
  border-bottom: none !important;
}

html:not(.appearance-light) .ql-container {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 0 0 12px 12px !important;
  color: var(--text) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

html:not(.appearance-light) .ql-editor {
  color: var(--text) !important;
  min-height: 200px !important;
}

html:not(.appearance-light) .ql-editor.ql-blank::before {
  color: var(--text-muted) !important;
  font-style: normal !important;
}

html:not(.appearance-light) .ql-stroke {
  stroke: var(--text-muted) !important;
}

html:not(.appearance-light) .ql-fill {
  fill: var(--text-muted) !important;
}

html:not(.appearance-light) .ql-picker-label {
  color: var(--text) !important;
}

html:not(.appearance-light) .ql-snow .ql-picker-options {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 8px !important;
}

html:not(.appearance-light) .ql-snow .ql-picker-item:hover {
  background: rgba(var(--accent-rgb), 0.2) !important;
}

html:not(.appearance-light) .ql-snow .ql-picker-item.ql-selected {
  background: rgba(var(--accent-rgb), 0.3) !important;
  color: var(--accent) !important;
}

html:not(.appearance-light) .ql-snow .ql-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
}

html:not(.appearance-light) .ql-snow .ql-tooltip input {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  color: var(--text) !important;
  border-radius: 6px !important;
}

@media (max-width: 768px) {
  /* Admin shell layout */
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    margin-bottom: 1rem;
  }

  .admin-main {
    width: 100%;
  }

  /* Filter row - stack on mobile */
  .filter-row {
    flex-direction: column;
  }

  .filter-row .form-row {
    min-width: 100%;
  }

  .filter-actions {
    width: 100%;
    flex-direction: column;
  }

  .filter-actions button,
  .filter-actions a {
    width: 100%;
  }

  /* Export actions */
  .export-actions {
    flex-direction: column;
  }

  .export-actions a {
    width: 100%;
  }

  /* Admin metrics - stack on mobile */
  .admin-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Table scroll on mobile */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 600px;
  }

  /* Pagination - stack on mobile */
  .pagination {
    flex-direction: column;
    gap: 0.75rem;
  }

  .pagination .btn-small {
    width: 100%;
  }

  /* Comments - full width on mobile */
  .comment-item {
    margin-left: 0 !important;
  }

  /* Button row - stack on mobile */
  .button-row {
    flex-direction: column;
  }

  .button-row form {
    width: 100%;
  }

  .button-row button {
    width: 100%;
  }

  /* Card header actions */
  .card-header-actions {
    margin-top: 0.5rem;
  }

  /* Form controls */
  .form-row select,
  .form-row input,
  .form-row textarea {
    width: 100%;
  }

  /* Assignment form */
  .form-row form {
    flex-direction: column;
    width: 100%;
  }

  .form-row form select {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  /* QA grid - single column on mobile */
  .qa-grid {
    grid-template-columns: 1fr;
  }

  /* Info grid - stack on mobile */
  .info-grid {
    grid-template-columns: 1fr;
  }

  /* Admin nav - full width items */
  .admin-nav-item {
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* Even smaller screens */
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .section-heading {
    font-size: 1rem;
  }
}

/* Notification dropdown mobile responsiveness */
@media (max-width: 768px) {
  .notification-dropdown {
    width: calc(100vw - 2rem) !important;
    right: -1rem !important;
    max-width: 90vw !important;
  }
  
  .top-actions {
    gap: 0.5rem !important;
  }
  
  .notification-bell {
    font-size: 1.1rem !important;
    padding: 0.4rem !important;
  }
}

/* Top bar mobile */
@media (max-width: 768px) {
  .top-bar {
    padding: 0.5rem 1rem;
  }
  
  .top-bar-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .brand {
    flex-shrink: 0;
  }
  
  .main-nav {
    order: 3;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    justify-content: flex-start;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    flex: none;
  }
  
  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }
  
  .brand-text {
    font-size: 0.85rem;
  }
  
  .top-actions {
    margin-left: auto;
    flex-shrink: 0;
  }
}

/* Admin panels mobile improvements */
@media (max-width: 1024px) {
  .admin-shell {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    flex: none;
  }
  
  .admin-main {
    width: 100%;
  }
  
  /* Tables - make scrollable on mobile */
  .admin-main-card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Filter rows - stack on tablet */
  .filter-row {
    grid-template-columns: 1fr !important;
  }
  
  .filter-field-button {
    max-width: 100% !important;
  }
}

/* Mobile-specific admin improvements */
@media (max-width: 768px) {
  /* Admin modals - full width on mobile */
  .admin-modal-panel {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 1rem auto !important;
    max-height: 90vh !important;
  }
  
  /* Card header rows - stack on mobile */
  .card-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  
  /* Button groups - stack on mobile */
  .card-header-row .btn-primary {
    width: 100%;
  }
  
  /* Tables - hide less important columns on mobile */
  .admin-main-card table th:nth-child(n+4),
  .admin-main-card table td:nth-child(n+4) {
    display: none;
  }
  
  /* Pagination - smaller on mobile */
  .pagination {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .pagination .btn-secondary {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .notification-dropdown {
    width: calc(100vw - 1rem) !important;
    right: -0.5rem !important;
  }
  
  .main {
    padding: 1rem 0.75rem 1rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .admin-sidebar-header {
    padding: 1rem;
  }
  
  .admin-nav-item {
    padding: 0.75rem;
  }
  
  /* Hide some table columns on very small screens */
  .admin-main-card table th:nth-child(n+3),
  .admin-main-card table td:nth-child(n+3) {
    display: none;
  }
  
  /* Mobile improvements for admin dashboard */
  .admin-metrics {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .admin-metric {
    font-size: 0.875rem;
  }
  
  .card-header-row {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start !important;
  }
  
  .card-header-row > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .card-header-row > div:last-child > * {
    flex: 1;
    min-width: 120px;
  }
}

/* Loading states */
.button-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

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

.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Page loading overlay */
.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 3, 19, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.page-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(var(--accent-rgb), 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Quick Actions cards */
.admin-quick-action {
  padding: 1rem;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
  color: var(--text);
  border: 1px solid var(--border-soft);
}

.admin-quick-action:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.05);
  color: var(--text);
  text-decoration: none;
}

.admin-quick-action:visited {
  color: var(--text);
}

.admin-quick-action-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.admin-quick-action-desc {
  font-size: 0.875rem;
  color: rgba(148, 163, 184, 0.8);
}

/* Ticket detail page */
.ticket-detail-section-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.ticket-detail-field-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.ticket-detail-field-value {
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 500;
}

.ticket-section-heading {
  margin: 0 0 1rem 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket-online-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
}

.ticket-online-dot.is-online {
  background: #22c55e;
}

.ticket-last-seen {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.ticket-original-message-body {
  line-height: 1.5;
  font-size: 0.85rem;
  margin: 0;
  padding: 0.25rem 0 0 0;
}

.ticket-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.ticket-activity-item {
  padding: 0.5rem 0.6rem;
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 6px;
  border-left: 2px solid rgba(var(--accent-rgb), 0.45);
  font-size: 0.8rem;
}

.ticket-activity-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.ticket-activity-item-title {
  font-weight: 600;
  color: var(--text);
}

.ticket-activity-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.ticket-activity-item-desc,
.ticket-activity-item-by {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ticket-activity-item-by {
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

.ticket-original-message-box {
  padding: 0.75rem;
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 6px;
  border-left: 2px solid rgba(var(--accent-rgb), 0.35);
}

.ticket-original-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-soft);
}

.ticket-original-message-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}

.ticket-original-message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ticket-empty-replies {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(var(--accent-rgb), 0.06);
  border-radius: 8px;
  border: 1px dashed rgba(var(--accent-rgb), 0.25);
}

.ticket-empty-replies-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.55;
}

.ticket-empty-replies-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.ticket-participant-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  font-size: 0.85rem;
}

.ticket-task-item {
  padding: 0.75rem;
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 6px;
  border-left: 2px solid rgba(var(--accent-rgb), 0.35);
}

.ticket-task-item--pending {
  background: rgba(34, 197, 94, 0.08);
  border-left-color: rgba(34, 197, 94, 0.5);
}

.ticket-task-merge-preview {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  font-size: 0.8rem;
}

.ticket-contact-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
}

.ticket-contact-row--discord {
  background: rgba(88, 101, 242, 0.12);
  border-left: 2px solid rgba(88, 101, 242, 0.5);
}

.ticket-contact-row--cfx {
  background: rgba(34, 197, 94, 0.12);
  border-left: 2px solid rgba(34, 197, 94, 0.5);
}

.ticket-contact-row--steam {
  background: rgba(27, 40, 56, 0.1);
  border-left: 2px solid rgba(27, 40, 56, 0.45);
}

.ticket-contact-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.ticket-contact-value {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

.ticket-quote-preview {
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-left: 2px solid var(--accent);
  color: var(--text-muted);
}

.ticket-quote-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  gap: 0.5rem;
}

.ticket-quote-preview-header strong {
  color: var(--text);
  font-weight: 600;
}

.ticket-quote-preview-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.15rem 0.35rem;
  line-height: 1;
}

.ticket-quote-preview-close:hover {
  color: var(--text);
}

.ticket-quote-preview-body {
  color: var(--text-muted);
  white-space: pre-line;
}

/* Ticket reply cards – professional conversation styling */
.ticket-reply-card {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.ticket-reply-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
}
.ticket-reply-card--staff {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14) 0%, rgba(0, 0, 0, 0.28) 100%);
  border-left: 3px solid rgba(59, 130, 246, 0.55);
}
.ticket-reply-card--internal {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.14) 0%, rgba(0, 0, 0, 0.28) 100%);
  border-left: 3px solid var(--accent);
}
.ticket-reply-card--user {
  background: rgba(0, 0, 0, 0.22);
  border-left: 3px solid rgba(var(--accent-rgb), 0.2);
}
.ticket-reply-card--deleted {
  opacity: 0.6;
}
.ticket-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.15);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ticket-reply-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.ticket-reply-author {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ticket-reply-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.ticket-reply-quote {
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(var(--accent-rgb), 0.08);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.ticket-reply-quote strong {
  color: var(--text);
}

/* Ticket reply content - remove any indentation */
.ticket-reply-content,
[style*="white-space: pre-wrap"][style*="line-height: 1.5"][style*="font-size: 0.85rem"] {
  margin-left: 0 !important;
  padding-left: 0 !important;
  text-indent: 0 !important;
  display: block;
  width: 100%;
}

/* @mention in ticket replies – style by class, data-user-id, or data-id */
.ticket-reply-content .ticket-mention,
.ticket-reply-content span[data-user-id],
.ticket-reply-content span[data-id] {
  background: rgba(var(--accent-rgb), 0.25) !important;
  color: var(--accent) !important;
  padding: 0.2em 0.45em !important;
  border-radius: 5px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3em !important;
  cursor: default !important;
  white-space: nowrap !important;
}
.ticket-reply-content .ticket-mention[data-user-id]::after,
.ticket-reply-content .ticket-mention[data-id]::after,
.ticket-reply-content span[data-user-id]::after,
.ticket-reply-content span[data-id]::after {
  content: "✓" !important;
  font-size: 0.8em !important;
  font-weight: 700 !important;
  color: #22c55e !important;
  margin-left: 0.1em !important;
}

/* Mention dropdown – ensures visibility when appended to body */
#mention-dropdown.mention-dropdown-visible {
  display: block !important;
  position: fixed !important;
  z-index: 2147483647 !important;
  background: #0f172a !important;
  background-color: #0f172a !important;
  border: 2px solid rgba(var(--accent-rgb), 0.5) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
  min-width: 220px !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  color: #f1f5f9 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
#mention-dropdown .mention-item {
  color: #f1f5f9 !important;
  padding: 0.5rem 0.75rem !important;
  cursor: pointer !important;
  font-size: 0.9rem !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
}
#mention-dropdown .mention-item:last-child {
  border-bottom: none !important;
}
#mention-dropdown .mention-item:hover,
#mention-dropdown .mention-item[data-selected="1"] {
  background: rgba(var(--accent-rgb), 0.25) !important;
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease-out;
  position: relative;
  backdrop-filter: blur(10px);
  min-width: 300px;
  max-width: 400px;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.toast-exit {
  animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

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

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.toast-message {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  word-wrap: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
  margin-top: -0.25rem;
  margin-right: -0.25rem;
}

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

/* Toast Types */
.toast-success {
  border-left: 4px solid #22c55e;
}

.toast-success .toast-icon {
  color: #22c55e;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

/* MDT Roster Command Level Styling */
.roster-row-high-command {
  background: rgba(239, 68, 68, 0.08) !important;
  border-left: 3px solid #ef4444;
}

.roster-row-high-command:hover {
  background: rgba(239, 68, 68, 0.12) !important;
}

.roster-row-command {
  background: rgba(251, 191, 36, 0.08) !important;
  border-left: 3px solid #fbbf24;
}

.roster-row-command:hover {
  background: rgba(251, 191, 36, 0.12) !important;
}

/* Confirmation Modal */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 3, 19, 0.9);
  backdrop-filter: blur(8px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

.confirm-modal.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.confirm-modal-content {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-soft);
  animation: modalSlideIn 0.3s ease-out;
}

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

.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.confirm-modal-message {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.confirm-modal-actions button {
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.confirm-modal-cancel {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text);
}

.confirm-modal-cancel:hover {
  background: rgba(148, 163, 184, 0.3);
}

.confirm-modal-confirm {
  background: var(--accent);
  color: #fff;
}

.confirm-modal-confirm:hover {
  background: #9333ea;
  transform: translateY(-1px);
}

.confirm-modal-confirm.danger {
  background: #ef4444;
}

.confirm-modal-confirm.danger:hover {
  background: #dc2626;
}

/* Mobile toast adjustments */
@media (max-width: 768px) {
  .toast-container {
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
  
  .confirm-modal-content {
    padding: 1.5rem;
  }
  
  .confirm-modal-actions {
    flex-direction: column;
  }
  
  .confirm-modal-actions button {
    width: 100%;
  }
}

/* Global search styles */
.global-search-container {
  position: relative;
  margin: 1rem 0;
}

.global-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-raised);
  color: var(--text);
}

.global-search-input::placeholder {
  color: var(--text-muted);
}

.global-search-input:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}

.global-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  z-index: 1000;
  max-height: 500px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.global-search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  transition: background 0.2s;
}

.global-search-result-item:hover {
  background: rgba(var(--accent-rgb), 0.1);
}

.global-search-result-item:last-child {
  border-bottom: none;
}

.global-search-result-type {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

/* ============================================
   Showcase mode (product demo / promotional)
   ============================================ */

.showcase-demo-banner {
  display: flex;
  align-items: center;
  position: relative;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0.08));
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: var(--radius-xl);
  position: relative;
}

.showcase-demo-banner.showcase-demo-banner-hidden {
  display: none;
}

.showcase-demo-badge {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}

.showcase-demo-banner-text {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.showcase-demo-banner-cta {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.showcase-demo-banner-cta:hover {
  text-decoration: underline;
}

.showcase-demo-banner-dismiss {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.showcase-demo-banner-dismiss:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

@media (max-width: 640px) {
  .showcase-demo-banner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .showcase-demo-banner-text {
    order: 2;
    flex-basis: 100%;
    padding-right: 2rem;
  }

  .showcase-demo-banner-dismiss {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Cancellation scheduled notice – shown when site env has cancellation_scheduled_at */
.cancellation-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.18), rgba(234, 179, 8, 0.06));
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: var(--radius-xl);
}

.cancellation-notice-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
}

.cancellation-notice-text {
  flex: 1;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.4;
}

.cancellation-notice-text strong {
  color: #eab308;
}

/* Legacy banner (kept for backwards compatibility if needed) */
.showcase-banner {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0.06));
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: var(--radius-xl);
  margin-bottom: 1rem;
}

.showcase-banner-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

.showcase-banner-cta {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.35rem;
}

.showcase-banner-cta:hover {
  text-decoration: underline;
}

.showcase-feature-badge {
  padding: 0.4rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(var(--accent-rgb), 0.08);
  border-radius: 8px;
  display: inline-block;
}

.showcase-feature-badge-text {
  color: var(--text-muted);
}

.showcase-feature-badge-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.showcase-feature-badge-link:hover {
  text-decoration: underline;
}

.footer-showcase-link {
  color: var(--accent);
  text-decoration: none;
}

.footer-showcase-link:hover {
  text-decoration: underline;
}

.nav-link-showcase {
  color: var(--accent);
}

/* Subscribe page */
.subscribe-page {
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}

.subscribe-card {
  width: 100%;
  max-width: 960px;
  padding: 2.5rem 2.25rem;
}

.subscribe-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.subscribe-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.subscribe-intro {
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.6;
}

.subscribe-features-block {
  margin-bottom: 2rem;
}

.subscribe-features-block .section-heading {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.subscribe-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.subscribe-feature-item {
  display: flex;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--surface-muted-75);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.subscribe-feature-item:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.08);
}

.subscribe-feature-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}

.subscribe-feature-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.subscribe-feature-content strong {
  font-size: 0.95rem;
  color: var(--text);
}

.subscribe-feature-content span {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.subscribe-actions {
  margin-top: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}

.subscribe-actions .btn-large {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35);
}

.subscribe-actions .btn-large:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.45);
}

.subscribe-note {
  margin: 1rem auto 0;
  max-width: 36rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.subscribe-actions-fallback .subscribe-note {
  margin-top: 0;
}

.subscribe-code {
  padding: 0.15rem 0.4rem;
  font-size: 0.85em;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

@media (max-width: 640px) {
  .subscribe-card {
    padding: 1.75rem 1.25rem;
  }

  .subscribe-title {
    font-size: 1.45rem;
  }

  .subscribe-features-grid {
    grid-template-columns: 1fr;
  }

  .subscribe-feature-item {
    padding: 0.9rem 1rem;
  }
}

/* Forgot / reset password */
.auth-password-card.login-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.auth-password-card .login-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.auth-password-card .login-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: radial-gradient(
    circle at top left,
    rgba(var(--accent-rgb), 0.35),
    var(--surface-muted-95)
  );
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.auth-password-card .login-title-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auth-password-card .login-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.auth-password-card .login-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-password-card .login-form-panel {
  background: var(--surface-muted-80);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.auth-password-card .form-group {
  margin-bottom: 1.25rem;
}

.auth-password-card .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.auth-password-card .form-control {
  width: 100%;
  padding: 0.75rem;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-password-card .form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-raised-solid);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.auth-password-card .btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

.auth-password-card .btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.35);
}

.auth-password-card .btn-secondary {
  width: 100%;
  padding: 0.75rem;
  background: var(--surface-muted-75);
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
  margin-top: 0.75rem;
}

.auth-password-card .btn-secondary:hover {
  background: var(--surface-raised);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.auth-password-card .info-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
  line-height: 1.5;
}

.auth-password-card .password-requirements {
  background: var(--surface-muted-75);
  border-left: 3px solid var(--accent);
  padding: 0.75rem;
  margin-top: 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-password-card .password-requirements ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.auth-password-card .password-requirements li {
  margin-bottom: 0.25rem;
}

.auth-password-card .password-requirements strong {
  color: var(--text);
}