/* Shared professional theme overrides for Eventide portal + staff dashboard.
   Intentionally written to restyle existing templates without changing JS hooks.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

:root {
  --ev-bg-0: #020617; /* slate-950 */
  --ev-bg-1: #04081a;
  --ev-panel: rgba(2, 6, 23, 0.72);
  --ev-panel-2: rgba(2, 6, 23, 0.88);
  --ev-border: rgba(148, 163, 184, 0.12);
  --ev-border-strong: rgba(124, 58, 237, 0.45);

  --ev-radius-sm: 14px;
  --ev-radius-md: 18px;
  --ev-radius-lg: 24px;
  --ev-radius-pill: 999px;

  --ev-shadow-1: 0 16px 40px -26px rgba(0,0,0,0.92);
  --ev-shadow-2: 0 36px 90px -52px rgba(0,0,0,0.94);

  --ev-text: #e5e7eb;
  --ev-text-dim: rgba(226, 232, 240, 0.62);

  --ev-primary: #7c3aed; /* purple-600 */
  --ev-primary-2: #a78bfa; /* purple-300 */
  --ev-accent: #38bdf8; /* sky-400 */
  --ev-danger: #fb7185; /* rose-400 */
  --ev-success: #22c55e; /* green-500 */

  /* Back-compat for existing templates that refer to OSRS variables */
  --osrs-gold: var(--ev-primary);
  --osrs-gold-bright: var(--ev-accent);
  --osrs-stone: rgba(2, 6, 23, 0.75);
  --osrs-stone-dark: rgba(2, 6, 23, 0.92);
  --osrs-parchment: rgba(2, 6, 23, 0.78);
  --osrs-red: var(--ev-danger);
  --accent-orange: var(--ev-accent);
  --bg-dark: var(--ev-bg-0);
}

html, body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
  background: radial-gradient(1200px 900px at 20% 0%, rgba(124, 58, 237, 0.22) 0%, rgba(124, 58, 237, 0.0) 55%),
              radial-gradient(1000px 800px at 90% 25%, rgba(56, 189, 248, 0.14) 0%, rgba(56, 189, 248, 0.0) 60%),
              linear-gradient(180deg, var(--ev-bg-1), var(--ev-bg-0) 40%, #01030c) !important;
  color: var(--ev-text) !important;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Tailwind radius remap: move the whole UI toward soft-rounded */
.rounded-sm { border-radius: var(--ev-radius-md) !important; }
.rounded, .rounded-md { border-radius: var(--ev-radius-md) !important; }
.rounded-lg { border-radius: var(--ev-radius-lg) !important; }
.rounded-full { border-radius: var(--ev-radius-pill) !important; }

/* Remove novelty cursor for a more professional feel */
html, body, a, button, input, textarea, select {
  cursor: default !important;
}
a, button {
  cursor: pointer !important;
}

/* Pirate/sailing ambience layer (ship + waves + vignette) */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -10;
}

/* Faded sailing backdrop (ship silhouette vibe via existing asset) */
body::before {
  background: url('/static/sailing.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 18%;
  opacity: 0.09;
  filter: grayscale(1) contrast(1.10) brightness(0.70) blur(0.35px);
  transform: scale(1.02);
}

/* Mist + shimmer + vignette (subtle; no animated waves, no parallax) */
@keyframes ev-mist-breathe {
  0%   { opacity: 0.40; }
  50%  { opacity: 0.58; }
  100% { opacity: 0.42; }
}

@keyframes ev-shimmer-drift {
  0%   { background-position: 0% 0%, 50% 115%, center, center; }
  100% { background-position: 100% 0%, 50% 115%, center, center; }
}

body::after {
  z-index: -9;
  background:
    /* Shimmer band near the bottom (very subtle) */
    linear-gradient(90deg,
      rgba(56, 189, 248, 0.00) 0%,
      rgba(56, 189, 248, 0.07) 20%,
      rgba(124, 58, 237, 0.06) 50%,
      rgba(56, 189, 248, 0.07) 80%,
      rgba(56, 189, 248, 0.00) 100%),
    /* Mist pockets */
    radial-gradient(900px 520px at 50% 115%, rgba(56, 189, 248, 0.10) 0%, rgba(56, 189, 248, 0) 62%),
    /* Vignette */
    radial-gradient(1100px 760px at 50% 40%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 86%),
    /* Gentle top glaze */
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.10));
  opacity: 0.12;
  animation:
    ev-mist-breathe 14s ease-in-out infinite,
    ev-shimmer-drift 28s linear infinite;
}

/* Stronger effect specifically on the index landing page */
body.ev-index::before {
  opacity: 0.18;
  filter: grayscale(1) contrast(1.14) brightness(0.66) blur(0.6px);
  background-position: center 12%;
}
body.ev-index::after {
  opacity: 0.16;
}

/* Index-only: faded ship-in-mist overlay derived from sailing.jpg */
body.ev-index .main-content {
  position: relative;
}

body.ev-index .ev-index-ship {
  position: absolute;
  inset: -40px 0 -20px 0;
  pointer-events: none;
  z-index: 0;
}

body.ev-index .ev-index-ship::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 50% 72%, rgba(56, 189, 248, 0.11) 0%, rgba(56, 189, 248, 0) 62%),
    radial-gradient(900px 520px at 50% 72%, rgba(124, 58, 237, 0.11) 0%, rgba(124, 58, 237, 0) 60%),
    url('/static/sailing.jpg') center 16% / cover no-repeat;

  /* Simpler + more reliable than mask-composite across browsers */
  opacity: 0.34;
  filter: grayscale(1) contrast(1.30) brightness(0.74) blur(0.35px);
  transform: scale(1.035);
  mix-blend-mode: soft-light;

  /* Gentle fade so the ship reads as “in mist” */
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.95) 18%, rgba(0,0,0,1) 58%, rgba(0,0,0,0.0) 100%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.95) 18%, rgba(0,0,0,1) 58%, rgba(0,0,0,0.0) 100%);
}

body.ev-index .main-content > :not(.ev-index-ship) {
  position: relative;
  z-index: 2;
}

/* Shared staff content centering */
body.ev-staff-core main[class*='ml-64'] {
  box-sizing: border-box;
  width: calc(100% - 16rem);
  margin-left: 16rem !important;
  padding-left: clamp(1rem, 2vw, 2rem) !important;
  padding-right: clamp(1rem, 2vw, 2rem) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.ev-staff-core main[class*='ml-64'] > * {
  width: min(100%, 1440px);
}

body.ev-staff-core .max-w-7xl,
body.ev-staff-core .max-w-6xl,
body.ev-staff-core .max-w-5xl,
body.ev-staff-core .max-w-4xl,
body.ev-staff-core .max-w-3xl,
body.ev-staff-core .max-w-2xl,
body.ev-staff-core .max-w-xl {
  width: min(100%, 1440px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 1024px) {
  body.ev-staff-core main[class*='ml-64'] {
    width: 100%;
    margin-left: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}



/* Sailing-themed UI touches (CSS-only): rope separators + compass glints */
.portal-card,
.osrs-stone-panel,
.osrs-panel,
.osrs-parchment-bg,
.osrs-parchment,
.osrs-parchment-item,
.modal-glass,
.weather-banner-glass,
#weather-banner {
  position: relative;
}

/* Rope-like top separator (static) */
.portal-card::after,
.osrs-stone-panel::after,
.osrs-panel::after,
.osrs-parchment-bg::after,
.osrs-parchment::after,
.osrs-parchment-item::after,
.modal-glass::after,
.weather-banner-glass::after,
#weather-banner::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background:
    repeating-linear-gradient(90deg,
      rgba(56, 189, 248, 0.00) 0px,
      rgba(56, 189, 248, 0.20) 6px,
      rgba(124, 58, 237, 0.18) 12px,
      rgba(56, 189, 248, 0.00) 18px);
  opacity: 0.55;
  pointer-events: none;
}

/* Compass-corner glints (static, very subtle) */
.osrs-stone-panel::before,
.osrs-panel::before,
.modal-glass::before,
.weather-banner-glass::before,
#weather-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16px 16px, rgba(56, 189, 248, 0.16) 0%, rgba(56, 189, 248, 0) 42px),
    radial-gradient(circle at calc(100% - 16px) 16px, rgba(124, 58, 237, 0.14) 0%, rgba(124, 58, 237, 0) 46px),
    radial-gradient(circle at 16px calc(100% - 16px), rgba(124, 58, 237, 0.10) 0%, rgba(124, 58, 237, 0) 48px),
    radial-gradient(circle at calc(100% - 16px) calc(100% - 16px), rgba(56, 189, 248, 0.10) 0%, rgba(56, 189, 248, 0) 52px);
  opacity: 0.42;
  pointer-events: none;
}

/* Brand logo sizing (index + sidebar + any hero/logo spots) */
.ev-brand-logo {
  width: 96px !important;
  height: auto !important;
  max-width: 96px !important;
}

/* Landing page logo: bigger than sidebar/header */
body.ev-index .ev-index-logo {
  width: 168px !important;
  height: auto !important;
  max-width: 168px !important;
}

@media (max-width: 768px) {
  .ev-brand-logo {
    width: 88px !important;
    max-width: 88px !important;
  }

  body.ev-index .ev-index-logo {
    width: 142px !important;
    max-width: 142px !important;
  }
}

/* Unified dashboard background (staff + player) */
body.ev-staff-core,
body.ev-player-core {
  background: url('/static/background.png') center center / cover no-repeat fixed !important;
  background-color: #000 !important;
}

body.ev-staff-core::before,
body.ev-player-core::before {
  content: '' !important;
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: -10 !important;
  background: url('/static/background.png') center center / cover no-repeat fixed !important;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  animation: none !important;
}

body.ev-staff-core::after,
body.ev-player-core::after {
  content: '' !important;
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: -9 !important;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.56)) !important,
    radial-gradient(circle at 16% 12%, rgba(212, 175, 55, 0.14), transparent 24%) !important,
    radial-gradient(circle at 84% 18%, rgba(156, 44, 44, 0.16), transparent 28%) !important,
    url('/static/map.png') center center / cover no-repeat !important;
  opacity: 1 !important;
  animation: none !important;
}

/* Global Audio UI (volume button + drawer) */
.ev-audio-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 2500;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.95rem;
  border-radius: var(--ev-radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(135deg, rgba(2,6,23,0.92), rgba(2,6,23,0.74));
  color: var(--ev-text);
  box-shadow: 0 18px 55px -34px rgba(0,0,0,0.92);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 11px;
}

.ev-audio-fab:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.ev-audio-fab-icon {
  filter: drop-shadow(0 0 10px rgba(56,189,248,0.20));
}

.ev-audio-fab-vol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--ev-radius-pill);
  border: 1px solid rgba(148,163,184,0.12);
  background: rgba(0,0,0,0.22);
  color: rgba(226,232,240,0.88);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.ev-audio-drawer {
  position: fixed;
  right: 1.25rem;
  bottom: 4.4rem;
  z-index: 2500;
  width: min(360px, calc(100vw - 2.5rem));
  border-radius: var(--ev-radius-lg);
  border: 1px solid rgba(124, 58, 237, 0.26);
  background: linear-gradient(135deg, rgba(2,6,23,0.94), rgba(2,6,23,0.78));
  box-shadow: 0 36px 90px -55px rgba(0,0,0,0.92);
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ev-audio-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ev-audio-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.ev-audio-drawer-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: rgba(226, 232, 240, 0.86);
}

.ev-audio-close {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(0,0,0,0.25);
  color: rgba(226,232,240,0.88);
  border-radius: var(--ev-radius-pill);
  padding: 0.25rem 0.55rem;
  font-weight: 900;
}

.ev-audio-drawer-body {
  padding: 0.95rem 1rem 1.05rem;
}

.ev-audio-status {
  color: var(--ev-text-dim);
  font-size: 12px;
  margin-bottom: 0.65rem;
}

.ev-audio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.ev-audio-row-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(226, 232, 240, 0.80);
}

.ev-audio-row-value {
  font-size: 12px;
  font-weight: 900;
  color: rgba(226, 232, 240, 0.90);
}

.ev-audio-slider {
  width: 100%;
  accent-color: var(--ev-accent);
}

.ev-audio-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.ev-audio-action {
  flex: 0 0 auto;
  border-radius: var(--ev-radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.20);
  background: rgba(255,255,255,0.03);
  color: rgba(226,232,240,0.92);
  padding: 0.55rem 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
}

.ev-audio-action:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

/* Portal (templates/index.html) */
.sentinel-header {
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.62) 100%) !important;
  border: 1px solid var(--ev-border-strong) !important;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.75) !important;
  border-radius: var(--ev-radius-lg) !important;
}
.sentinel-label {
  color: rgba(226, 232, 240, 0.75) !important;
}
.sentinel-title {
  background: linear-gradient(to bottom, #ffffff 10%, var(--ev-primary-2) 45%, var(--ev-accent) 100%) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 0 22px rgba(124, 58, 237, 0.22)) !important;
}
.portal-card {
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.64) 100%) !important;
  border: 1px solid rgba(124, 58, 237, 0.28) !important;
  border-radius: var(--ev-radius-lg) !important;
  box-shadow: var(--ev-shadow-2) !important;
  position: relative;
  overflow: hidden;
}
.portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(680px 380px at 15% 25%, rgba(124, 58, 237, 0.22) 0%, rgba(124,58,237,0) 65%),
    radial-gradient(520px 320px at 86% 38%, rgba(56, 189, 248, 0.14) 0%, rgba(56,189,248,0) 72%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  pointer-events: none;
}
.portal-card:hover {
  border-color: rgba(56, 189, 248, 0.5) !important;
  transform: translateY(-10px) !important;
  box-shadow: 0 55px 90px -55px rgba(0,0,0,0.9) !important;
}
.portal-icon {
  color: var(--ev-primary-2) !important;
}
.portal-card:hover .portal-icon {
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.35)) !important;
}
.btn-portal {
  background: linear-gradient(90deg, var(--ev-primary) 0%, #6d28d9 45%, rgba(56, 189, 248, 0.85) 115%) !important;
  color: #070a16 !important;
  border-radius: var(--ev-radius-pill) !important;
  box-shadow: 0 14px 34px rgba(124,58,237,0.22) !important;
  letter-spacing: 0.18em !important;
}
.btn-portal:hover {
  filter: brightness(1.08) !important;
}
#entry-modal .bg-zinc-900 {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.82)) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: var(--ev-radius-lg) !important;
  box-shadow: var(--ev-shadow-2) !important;
}

/* Sidebar (templates/sidebar.html) */
.sidebar-glass {
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.78) 100%) !important;
  border-right: 1px solid rgba(124, 58, 237, 0.20) !important;
}
.sidebar-glass a {
  border-radius: var(--ev-radius-md) !important;
}
.nav-item-active {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.20) 0%, rgba(56, 189, 248, 0.06) 100%) !important;
  border-left: 3px solid var(--ev-accent) !important;
  color: var(--ev-accent) !important;
}
.nav-item-hover:hover {
  background: rgba(255, 255, 255, 0.03) !important;
  border-left: 3px solid rgba(56, 189, 248, 0.25) !important;
}

/* Shared panels across staff templates */
.osrs-stone-panel,
.osrs-panel,
.osrs-parchment-bg,
.osrs-parchment,
.osrs-parchment-item,
.modal-glass,
.modal-overlay,
.weather-banner-glass,
#weather-banner {
  background:
    radial-gradient(980px 520px at 12% 18%, rgba(124, 58, 237, 0.16) 0%, rgba(124, 58, 237, 0) 62%),
    radial-gradient(760px 420px at 88% 28%, rgba(56, 189, 248, 0.10) 0%, rgba(56, 189, 248, 0) 66%),
    linear-gradient(135deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.70) 100%) !important;
  border: 1px solid rgba(124, 58, 237, 0.24) !important;
  border-radius: var(--ev-radius-lg) !important;
  box-shadow: var(--ev-shadow-2), inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

/* Make “module headers” and separators feel consistent */
.osrs-stone-panel > .p-6,
.osrs-stone-panel > .p-8,
.osrs-parchment-bg > .p-6,
.osrs-parchment-bg > .p-8 {
  border-radius: inherit;
}

/* Hero banners (staff) — match player portal vibe */
#weather-banner {
  position: relative;
}
#weather-banner,
.dashboard-hero {
  border-radius: var(--ev-radius-lg) !important;
  border: 1px solid rgba(124, 58, 237, 0.26) !important;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.68) 100%) !important;
}
#weather-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 380px at 20% 35%, rgba(124, 58, 237, 0.28) 0%, rgba(124,58,237,0) 65%),
    radial-gradient(520px 320px at 85% 40%, rgba(56, 189, 248, 0.18) 0%, rgba(56,189,248,0) 70%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  pointer-events: none;
  border-radius: inherit;
}

.dashboard-hero {
  position: relative;
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 420px at 18% 35%, rgba(124, 58, 237, 0.26) 0%, rgba(124,58,237,0) 66%),
    radial-gradient(540px 360px at 88% 40%, rgba(56, 189, 248, 0.16) 0%, rgba(56,189,248,0) 72%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  pointer-events: none;
  border-radius: inherit;
}

.accent-gold {
  color: var(--ev-accent) !important;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.22) !important;
}

/* Inputs */
input, textarea, select {
  color: var(--ev-text) !important;
}
input::placeholder, textarea::placeholder {
  color: rgba(148, 163, 184, 0.55) !important;
}

/* Buttons (common) */
.btn-gold,
.btn-action,
button {
  border-radius: var(--ev-radius-pill) !important;
}

button {
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 10px 26px -18px rgba(0,0,0,0.85);
}

/* Make "gold" buttons read as primary purple */
.btn-gold {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.95), rgba(56, 189, 248, 0.75)) !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  color: #050714 !important;
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.18) !important;
}

/* Inputs */
input, textarea, select {
  border-radius: var(--ev-radius-md) !important;
  border-color: rgba(124, 58, 237, 0.22) !important;
}
input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: rgba(56, 189, 248, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12) !important;
}

/* Tables: improve density + separation without changing markup */
table th, table td {
  padding-top: 0.85rem !important;
  padding-bottom: 0.85rem !important;
}

/* Modals */
.modal-glass {
  border-radius: var(--ev-radius-lg) !important;
}

/* Modal overlay/backdrop (used by #statsModal and other popups) */
#statsModal,
.modal-overlay {
  background: rgba(1, 3, 12, 0.82) !important;
  backdrop-filter: blur(10px) !important;
}

/* Tabs: turn underline tabs into compact pill segments */
.tab-btn {
  border-bottom: none !important;
  border-radius: var(--ev-radius-pill) !important;
  padding: 0.55rem 0.9rem !important;
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(148, 163, 184, 0.10) !important;
  color: rgba(226, 232, 240, 0.70) !important;
}
.tab-btn.active {
  color: rgba(255,255,255,0.95) !important;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.35), rgba(56, 189, 248, 0.14)) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 18px 40px -30px rgba(0,0,0,0.9) !important;
}

/* Common “command bar” panels */
.dashboard-command-bar {
  border-left: none !important;
  border-radius: var(--ev-radius-lg) !important;
  border: 1px solid rgba(124, 58, 237, 0.22) !important;
  background: rgba(0, 0, 0, 0.18) !important;
  box-shadow: var(--ev-shadow-1) !important;
}

/* Tables */
thead th {
  color: rgba(226, 232, 240, 0.82) !important;
}
.osrs-stone-panel thead th,
.osrs-panel thead th,
.osrs-parchment-bg thead th,
.osrs-parchment-item thead th,
.osrs-parchment thead th {
  color: var(--ev-accent) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.28) !important;
}

/* Reduce harsh forced text-shadow from older readability patches */
.osrs-stone-panel *,
.osrs-panel *,
.osrs-parchment-bg *,
.osrs-parchment *,
.osrs-parchment-item * {
  text-shadow: none !important;
}

/* Keep scrollbars consistent */
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.8) !important;
}

/* Tailwind "gold" remap (used heavily across staff pages) */
.text-yellow-600,
.text-yellow-500,
.text-yellow-400,
.text-yellow-300 {
  color: var(--ev-accent) !important;
}

.bg-yellow-500 {
  background-color: var(--ev-accent) !important;
}

.bg-yellow-600 {
  background-color: var(--ev-primary) !important;
}

/* Slash variants need escaping in CSS selectors */
.bg-yellow-600\/20 {
  background-color: rgba(124, 58, 237, 0.20) !important;
}

.border-yellow-600\/30,
.border-yellow-600\/40,
.border-yellow-500\/60 {
  border-color: rgba(124, 58, 237, 0.45) !important;
}

/* Tailwind arbitrary-value classes that hardcode the old gold palette */
.bg-\[\#c2a34c\],
.bg-\[\#a68a3d\] {
  background-color: var(--ev-primary) !important;
}

.bg-\[\#c2a34c\]\/10 { background-color: rgba(124, 58, 237, 0.10) !important; }
.bg-\[\#c2a34c\]\/20 { background-color: rgba(124, 58, 237, 0.20) !important; }
.bg-\[\#c2a34c\]\/30 { background-color: rgba(124, 58, 237, 0.30) !important; }
.bg-\[\#c2a34c\]\/40 { background-color: rgba(124, 58, 237, 0.40) !important; }

.border-\[\#c2a34c\]\/10 { border-color: rgba(124, 58, 237, 0.18) !important; }
.border-\[\#c2a34c\]\/20 { border-color: rgba(124, 58, 237, 0.25) !important; }

.text-\[\#c2a34c\] {
  color: var(--ev-accent) !important;
}

.text-\[\#c2a34c\]\/70,
.text-\[\#c2a34c\]\/60,
.text-\[\#c2a34c\]\/50 {
  color: rgba(56, 189, 248, 0.75) !important;
}

.border-\[\#c2a34c\]\/30,
.border-\[\#c2a34c\]\/40,
.border-\[\#c2a34c\]\/50 {
  border-color: rgba(124, 58, 237, 0.35) !important;
}

.hover\:border-\[\#c2a34c\]:hover {
  border-color: rgba(56, 189, 248, 0.55) !important;
}

.focus\:border-\[\#c2a34c\]:focus {
  border-color: rgba(56, 189, 248, 0.55) !important;
}

.hover\:bg-\[\#a68a3d\]:hover {
  background-color: rgba(124, 58, 237, 0.88) !important;
}

@media (max-width: 1024px) {
  .app-main,
  .dashboard-main,
  .account-main,
  .main-container,
  main.ml-64,
  main[class*="ml-"] {
    margin-left: 0 !important;
    padding: 1.3rem 1rem 1.8rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    background-attachment: scroll !important;
  }

  .app-main,
  .dashboard-main,
  .account-main,
  .main-container,
  main.ml-64,
  main[class*="ml-"] {
    margin-left: 0 !important;
    padding: 1rem 0.85rem 1.5rem !important;
  }

  .osrs-stone-panel,
  .osrs-panel,
  .osrs-parchment-bg,
  .osrs-parchment,
  .osrs-parchment-item,
  .modal-glass,
  .weather-banner-glass,
  .portal-card,
  #weather-banner {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
  }

  .grid.grid-cols-2,
  .grid.grid-cols-3,
  .grid.grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  .ev-audio-fab {
    right: 0.75rem !important;
    bottom: 0.75rem !important;
  }

  .ev-audio-drawer {
    right: 0.75rem !important;
    bottom: 4rem !important;
    width: min(360px, calc(100vw - 1.5rem)) !important;
  }
}

body.ev-staff-core {
  --crimson-dark: #4a0404;
  --crimson-light: #8b0000;
  --gold: #d4af37;
  --gold-light: #f1e5ac;
  --osrs-stone: #5b5b5b;
  --osrs-stone-light: #7a7a7a;
  --osrs-stone-dark: #3a3a3a;
  --parchment: #e8dcc4;
}

body.ev-staff-core .pirate-panel,
body.ev-staff-core .glass-card,
body.ev-staff-core .osrs-panel,
body.ev-staff-core .osrs-stone-panel,
body.ev-staff-core .portal-card,
body.ev-staff-core .banner,
body.ev-staff-core .card,
body.ev-staff-core .panel,
body.ev-staff-core section[class*="rounded"],
body.ev-staff-core div[class*="rounded-2xl"],
body.ev-staff-core div[class*="rounded-3xl"] {
  background: linear-gradient(145deg, rgba(74, 4, 4, 0.95), rgba(40, 2, 2, 0.98)) !important;
  border: 2px solid var(--gold) !important;

}

/* Final staff shell authority: neutralize stale blue and keep content centered. */
body.ev-staff-core {
  --ev-staff-final-panel: rgba(55, 18, 12, 0.92);
  --ev-staff-final-panel-strong: rgba(36, 11, 8, 0.97);
  --ev-staff-final-border: rgba(212, 175, 55, 0.34);
  --ev-staff-final-text: #f4ead6;
  --ev-staff-final-text-dim: rgba(232, 214, 176, 0.8);
  background:
    radial-gradient(circle at 14% 0%, rgba(212, 175, 55, 0.14), transparent 30%),
    radial-gradient(circle at 82% 20%, rgba(139, 0, 0, 0.16), transparent 28%),
    linear-gradient(180deg, #120606 0%, #060202 100%) !important;
}

body.ev-staff-core .glass-card,
body.ev-staff-core .portal-card,
body.ev-staff-core .banner,
body.ev-staff-core .card,
body.ev-staff-core .panel,
body.ev-staff-core .section-shell,
body.ev-staff-core .hero,
body.ev-staff-core .guide-section,
body.ev-staff-core .registry-card,
body.ev-staff-core .step-card,
body.ev-staff-core .osrs-stone-panel,
body.ev-staff-core .osrs-panel,
body.ev-staff-core .osrs-parchment,
body.ev-staff-core .osrs-parchment-item,
body.ev-staff-core .osrs-parchment-bg,
body.ev-staff-core .weather-banner-glass,
body.ev-staff-core .modal-glass,
body.ev-staff-core #weather-banner {
  background:
    radial-gradient(circle at 0% 0%, rgba(212, 175, 55, 0.08), transparent 42%),
    linear-gradient(180deg, var(--ev-staff-final-panel), var(--ev-staff-final-panel-strong)) !important;
  border: 1px solid var(--ev-staff-final-border) !important;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 232, 181, 0.04) !important;
}

body.ev-staff-core h1,
body.ev-staff-core h2,
body.ev-staff-core h3,
body.ev-staff-core h4,
body.ev-staff-core .hero-title,
body.ev-staff-core .section-title,
body.ev-staff-core .panel-title,
body.ev-staff-core .banner-title,
body.ev-staff-core .accent-gold {
  color: #f2dd9a !important;
  text-shadow: none !important;
}

body.ev-staff-core p,
body.ev-staff-core span,
body.ev-staff-core small,
body.ev-staff-core label,
body.ev-staff-core li,
body.ev-staff-core .section-subtitle,
body.ev-staff-core .panel-desc,
body.ev-staff-core .banner-subtitle,
body.ev-staff-core .hero-sub,
body.ev-staff-core .hero-meta {
  color: var(--ev-staff-final-text-dim) !important;
}

body.ev-staff-core button,
body.ev-staff-core .btn,
body.ev-staff-core .btn-action,
body.ev-staff-core .btn-portal,
body.ev-staff-core .btn-gold,
body.ev-staff-core .btn-discord,
body.ev-staff-core input[type="submit"],
body.ev-staff-core input[type="button"] {
  background: linear-gradient(180deg, rgba(156, 26, 26, 0.98), rgba(103, 13, 13, 0.98)) !important;
  border: 1px solid rgba(212, 175, 55, 0.52) !important;
  color: #fff8ee !important;
  box-shadow: 0 14px 28px rgba(60, 8, 8, 0.34) !important;
  text-shadow: none !important;
}

body.ev-staff-core button:hover,
body.ev-staff-core .btn:hover,
body.ev-staff-core .btn-action:hover,
body.ev-staff-core .btn-portal:hover,
body.ev-staff-core .btn-gold:hover,
body.ev-staff-core .btn-discord:hover,
body.ev-staff-core input[type="submit"]:hover,
body.ev-staff-core input[type="button"]:hover {
  background: linear-gradient(180deg, rgba(181, 34, 34, 0.98), rgba(128, 19, 19, 0.98)) !important;
  border-color: rgba(245, 221, 154, 0.9) !important;
}

body.ev-staff-core #sidebar,
body.ev-staff-core .sidebar,
body.ev-staff-core .sidebar-glass,
body.ev-staff-core nav,
body.ev-staff-core .side-nav {
  background:
    radial-gradient(circle at 0% 0%, rgba(212, 175, 55, 0.08), transparent 46%),
    linear-gradient(180deg, rgba(20, 9, 8, 0.98), rgba(31, 10, 8, 0.99)) !important;
  border-right: 1px solid rgba(212, 175, 55, 0.34) !important;
  box-shadow: inset -1px 0 0 rgba(255, 221, 173, 0.08), 18px 0 40px rgba(0, 0, 0, 0.45) !important;
}

body.ev-staff-core .sidebar-link.active,
body.ev-staff-core .nav-item-active {
  background: linear-gradient(90deg, rgba(139, 0, 0, 0.36), rgba(212, 175, 55, 0.12)) !important;
  border-left-color: rgba(212, 175, 55, 0.92) !important;
}

body.ev-staff-core main[class*="ml-64"],
body.ev-staff-core .dashboard-main,
body.ev-staff-core .dashboard-home-main {
  box-sizing: border-box !important;
}

body.ev-staff-core h1,
body.ev-staff-core h2,
body.ev-staff-core h3,
body.ev-staff-core h4,
body.ev-staff-core .hero-title,
body.ev-staff-core .panel-title,
body.ev-staff-core .section-title {
  color: var(--gold-light) !important;
}

body.ev-staff-core p,
body.ev-staff-core span,
body.ev-staff-core small,
body.ev-staff-core label,
body.ev-staff-core li {
  color: rgba(255, 244, 226, 0.82) !important;
}

body.ev-staff-core .stat-pill {
  background: rgba(139, 0, 0, 0.34) !important;
  border: 1px solid rgba(212, 175, 55, 0.55) !important;
  color: var(--gold-light) !important;
}

body.ev-staff-core .btn-osrs,
body.ev-staff-core button,
body.ev-staff-core .btn,
body.ev-staff-core .btn-action,
body.ev-staff-core .btn-gold,
body.ev-staff-core .btn-portal,
body.ev-staff-core .panel-link-btn,
body.ev-staff-core .wax-seal-btn,
body.ev-staff-core input[type="submit"],
body.ev-staff-core input[type="button"] {
  background: var(--osrs-stone) !important;
  border: 2px solid !important;
  border-color: var(--osrs-stone-light) var(--osrs-stone-dark) var(--osrs-stone-dark) var(--osrs-stone-light) !important;
  color: #ff981f !important;
  text-shadow: 1px 1px 0 #000 !important;
  font-family: 'Space Grotesk', sans-serif !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  box-shadow: none !important;
}

body.ev-staff-core .btn-osrs:hover,
body.ev-staff-core button:hover,
body.ev-staff-core .btn:hover,
body.ev-staff-core .btn-action:hover,
body.ev-staff-core .btn-gold:hover,
body.ev-staff-core .btn-portal:hover,
body.ev-staff-core .panel-link-btn:hover,
body.ev-staff-core .wax-seal-btn:hover,
body.ev-staff-core input[type="submit"]:hover,
body.ev-staff-core input[type="button"]:hover {
  color: #ffffff !important;
  filter: brightness(1.08);
}

body.ev-staff-core .wax-seal-gold,
body.ev-staff-core .wax-seal {
  width: 122px;
  height: 122px;
  background: radial-gradient(circle at 30% 30%, #f9f1aa, #d4af37, #8a6d1c) !important;
  border-radius: 50%;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6), 5px 5px 15px rgba(0, 0, 0, 0.7), 0 0 0 2px #544111 !important;
  border: 3px solid #fff5c2 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.ev-staff-core .wax-seal-gold::after,
body.ev-staff-core .wax-seal::after {
  content: "E";
  font-size: 3.3rem;
  color: rgba(100, 70, 10, 0.7) !important;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4), -1px -1px 0 rgba(0, 0, 0, 0.3);
}

body.ev-staff-core .compass-container,
body.ev-staff-core .radar-container {
  position: relative;
  width: 170px;
  height: 170px;
  background: radial-gradient(circle, #2a1f1a, #0a0705) !important;
  border-radius: 50%;
  border: 6px solid var(--gold) !important;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.9), 0 0 20px rgba(212, 175, 55, 0.3) !important;
}

body.ev-staff-core .compass-sweep,
body.ev-staff-core .radar-sweep {
  position: absolute;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, transparent 75%, rgba(212, 175, 55, 0.6)) !important;
  border-radius: 50%;
  animation: sweep 4s linear infinite;
}

body.ev-staff-core .parchment-panel,
body.ev-staff-core .osrs-parchment,
body.ev-staff-core .osrs-parchment-bg {
  background-color: var(--parchment) !important;
  background-image: url('https://www.transparenttextures.com/patterns/old-wall.png') !important;
  border: 2px solid #8c6b4a !important;
  box-shadow: inset 0 0 40px rgba(139, 69, 19, 0.3), 5px 5px 15px rgba(0, 0, 0, 0.5) !important;
}

body.ev-staff-core .parchment-text,
body.ev-staff-core .parchment-panel p,
body.ev-staff-core .parchment-panel h1,
body.ev-staff-core .parchment-panel h2,
body.ev-staff-core .parchment-panel h3,
body.ev-staff-core .parchment-panel span {
  color: #3b2818 !important;
  font-family: 'Playfair Display', serif !important;
  text-shadow: none !important;
}

body.ev-staff-core .sidebar-glass {
  background: linear-gradient(180deg, rgba(48, 8, 8, 0.98), rgba(26, 8, 8, 0.99)) !important;
  border-right: 2px solid rgba(212, 175, 55, 0.46) !important;
}

body.ev-staff-core .sidebar-glass a,
body.ev-staff-core .sidebar-glass .sidebar-label,
body.ev-staff-core .sidebar-glass [data-lucide] {
  color: var(--gold-light) !important;
}

body.ev-staff-core .nav-item-active {
  background: linear-gradient(90deg, rgba(139, 0, 0, 0.54), rgba(212, 175, 55, 0.12)) !important;
  border-left: 3px solid var(--gold) !important;
}

@media (max-width: 1024px) {
  body.ev-staff-core .grid.grid-cols-2,
  body.ev-staff-core .grid.grid-cols-3,
  body.ev-staff-core .grid.grid-cols-4,
  body.ev-staff-core [class*="lg:grid-cols-"] {
    grid-template-columns: 1fr !important;
  }

  body.ev-staff-core main,
  body.ev-staff-core .app-main,
  body.ev-staff-core .dashboard-main,
  body.ev-staff-core .dashboard-home-main {
    padding: 1.25rem 1rem 1.75rem !important;
  }
}

@media (max-width: 768px) {
  body.ev-staff-core .pirate-panel,
  body.ev-staff-core .glass-card,
  body.ev-staff-core .osrs-panel,
  body.ev-staff-core .osrs-stone-panel,
  body.ev-staff-core .parchment-panel,
  body.ev-staff-core .osrs-parchment,
  body.ev-staff-core .osrs-parchment-bg,
  body.ev-staff-core #weather-banner {
    padding: 1rem !important;
    border-radius: 16px !important;
  }

  body.ev-staff-core .wax-seal,
  body.ev-staff-core .wax-seal-gold {
    width: 86px !important;
    height: 86px !important;
  }

  body.ev-staff-core .wax-seal::after,
  body.ev-staff-core .wax-seal-gold::after {
    font-size: 2.3rem !important;
  }

  body.ev-staff-core .compass-container,
  body.ev-staff-core .radar-container {
    width: 142px !important;
    height: 142px !important;
  }

  body.ev-staff-core .btn-osrs,
  body.ev-staff-core .btn,
  body.ev-staff-core .btn-action,
  body.ev-staff-core .btn-gold,
  body.ev-staff-core .btn-portal,
  body.ev-staff-core .panel-link-btn,
  body.ev-staff-core button {
    width: 100% !important;
    justify-content: center !important;
  }

  body.ev-staff-core .dashboard-home-greeting,
  body.ev-staff-core .hero-title {
    font-size: 2rem !important;
    line-height: 1.1 !important;
  }

  body.ev-staff-core .dashboard-pagination,
  body.ev-staff-core .dashboard-command-bar,
  body.ev-staff-core .banner-content,
  body.ev-staff-core .profile-banner-inner,
  body.ev-staff-core .section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  body.ev-staff-core table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }
}
