/* Final staff glassmorphism authority layer.
   Loaded last to override legacy staff theme rules in shared stylesheets. */

body.ev-staff-core {
  --staff-glass-bg: rgba(255, 255, 255, 0.08);
  --staff-glass-bg-strong: rgba(255, 255, 255, 0.04);
  --staff-glass-border: rgba(255, 255, 255, 0.18);
  --staff-gold-border: rgba(255, 232, 208, 0.2);
  --staff-text: rgba(245, 240, 233, 0.88);
  --staff-title: rgba(255, 249, 243, 0.96);
  --staff-topbar-height: 4.85rem;
  --staff-glass-blur: 18px;
  --staff-shadow: 0 24px 54px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  /* Override legacy globals from eventide-pro/overhaul */
  --ev-primary: #f0e7dc;
  --ev-primary-2: #fff8ef;
  --ev-accent: #f0e7dc;
  --crimson: #2d2622;
  --crimson-dark: #191512;
  --crimson-light: #443a34;
  --gold: #f2ddc8;
  --gold-light: #fff7ed;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.07), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(255, 228, 196, 0.06), transparent 22%),
    radial-gradient(circle at 52% 100%, rgba(255, 255, 255, 0.04), transparent 32%),
    linear-gradient(180deg, rgba(8, 8, 8, 0.56) 0%, rgba(10, 10, 10, 0.7) 48%, rgba(7, 7, 7, 0.84) 100%),
    url("/static/background.png") center center / cover no-repeat fixed !important;
}

body.ev-staff-core::before,
body.ev-staff-core::after {
  pointer-events: none;
}

/* Main shell spacing + centering */
body.ev-staff-core main.app-main,
body.ev-staff-core main.dashboard-main,
body.ev-staff-core main.dashboard-home-main,
body.ev-staff-core main.cases-main,
body.ev-staff-core main.account-main,
body.ev-staff-core main.hierarchy-shell,
body.ev-staff-core main[class*="ml-64"] {
  padding-top: calc(var(--staff-topbar-height) + 1rem) !important;
  padding-left: clamp(0.85rem, 1.7vw, 1.6rem) !important;
  padding-right: clamp(0.85rem, 1.7vw, 1.6rem) !important;
  overflow-x: hidden !important;
}

body.ev-staff-core main.app-main > *,
body.ev-staff-core main.dashboard-main > *,
body.ev-staff-core main.dashboard-home-main > *,
body.ev-staff-core main.cases-main > *,
body.ev-staff-core main.account-main > *,
body.ev-staff-core main.hierarchy-shell > *,
body.ev-staff-core main[class*="ml-64"] > * {
  max-width: min(88rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

/* Shared structural wrappers for rewritten staff pages */
body.ev-staff-core .staff-page-shell {
  width: 100%;
  max-width: min(84rem, 100%);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.ev-staff-core .staff-page-shell--wide {
  max-width: min(88rem, 100%);
}

body.ev-staff-core .staff-page-main {
  position: relative;
}

body.ev-staff-core .staff-page-main .staff-page-hero {
  border-radius: 1.25rem !important;
  padding: clamp(1rem, 2.4vw, 1.6rem) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: var(--staff-shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

body.ev-staff-core .staff-page-main .staff-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

@media (min-width: 1100px) {
  body.ev-staff-core .staff-page-main .staff-page-grid.staff-page-grid--2 {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
  }
}

/* Dashboard home layout normalization */
body.ev-staff-core .dashboard-home-main .dashboard-home-shell {
  width: 100%;
  max-width: min(88rem, 100%) !important;
  margin-left: auto;
  margin-right: auto;
}

body.ev-staff-core .dashboard-home-main .dashboard-home-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start;
}

body.ev-staff-core .dashboard-home-main .dashboard-home-center-grid {
  grid-template-columns: 1fr !important;
}

body.ev-staff-core .dashboard-home-main .dashboard-home-split-grid {
  grid-template-columns: 1fr !important;
}

body.ev-staff-core .dashboard-home-main .staff-duty-grid {
  grid-template-columns: 1fr !important;
}

body.ev-staff-core .dashboard-home-main .dashboard-home-col,
body.ev-staff-core .dashboard-home-main .dashboard-home-col > * {
  min-width: 0;
}

body.ev-staff-core main.app-main,
body.ev-staff-core main.dashboard-main,
body.ev-staff-core main.dashboard-home-main,
body.ev-staff-core main.cases-main,
body.ev-staff-core main.account-main,
body.ev-staff-core main.hierarchy-shell,
body.ev-staff-core main[class*="ml-64"] {
  width: calc(100% - 16rem);
  margin-left: 16rem !important;
}

/* Dashboard database page polish */
body.ev-staff-core .dashboard-main .dashboard-hero,
body.ev-staff-core .dashboard-main .dashboard-command-bar,
body.ev-staff-core .dashboard-main .dashboard-table-wrap,
body.ev-staff-core .dashboard-main .osrs-stone-panel {
  border-radius: 1.25rem !important;
}

/* Cases + account + calendar + rota consistency */
body.ev-staff-core .cases-main .case-hero,
body.ev-staff-core .cases-main .case-panel,
body.ev-staff-core .account-main .osrs-stone-panel,
body.ev-staff-core .account-main .account-note-card,
body.ev-staff-core .staff-calendar .calendar-shell,
body.ev-staff-core .app-main .calendar-shell,
body.ev-staff-core .app-main .rota-shell,
body.ev-staff-core .app-main .calendar-shell-card {
  border-radius: 1.2rem !important;
}

body.ev-staff-core .account-main .account-bounty-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 1rem;
  margin-bottom: 1.1rem;
}

body.ev-staff-core .account-main .account-bounty-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(255, 235, 214, 0.14);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.ev-staff-core .account-main .account-bounty-console {
  align-content: start;
}

body.ev-staff-core .account-main .account-bounty-console-head,
body.ev-staff-core .account-main .account-bounty-console-foot,
body.ev-staff-core .account-main .account-bounty-toolbar,
body.ev-staff-core .account-main .account-bounty-slot-head,
body.ev-staff-core .account-main .account-bounty-slot-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

body.ev-staff-core .account-main .account-bounty-hero-pills,
body.ev-staff-core .account-main .account-bounty-action-stack,
body.ev-staff-core .account-main .account-bounty-rail-list {
  display: grid;
  gap: 0.65rem;
}

body.ev-staff-core .account-main .account-bounty-publish-rail {
  align-content: start;
}

body.ev-staff-core .account-main .account-bounty-board-grid,
body.ev-staff-core .account-main .account-bounty-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
}

body.ev-staff-core .account-main .account-bounty-entry,
body.ev-staff-core .account-main .account-bounty-slot-card {
  min-width: 0;
}

body.ev-staff-core .account-main .account-preview-card,
body.ev-staff-core .account-main .account-bounty-slot-card {
  padding: 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.ev-staff-core .account-main .account-bounty-field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.7fr);
  gap: 0.75rem;
}

body.ev-staff-core .account-main .account-bounty-title {
  margin: 0;
  color: rgba(255, 249, 243, 0.98) !important;
  font-size: 1rem;
  font-weight: 800;
}

body.ev-staff-core .account-main .account-bounty-copy,
body.ev-staff-core .account-main .account-bounty-meta,
body.ev-staff-core .account-main .account-accent-soft {
  margin: 0;
  color: rgba(220, 231, 244, 0.78) !important;
  line-height: 1.55;
}

body.ev-staff-core .account-main .account-bounty-meta {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

body.ev-staff-core .account-main .account-microheading,
body.ev-staff-core .account-main .account-form-label {
  color: rgba(191, 214, 237, 0.72) !important;
}

body.ev-staff-core .account-main .account-status-pill,
body.ev-staff-core .account-main .account-channel-pill,
body.ev-staff-core .account-main .account-points-pill,
body.ev-staff-core .account-main .account-bounty-rail-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(246, 239, 230, 0.92) !important;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.ev-staff-core .account-main .account-status-pill.is-claimed {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.24);
  color: rgba(254, 226, 226, 0.96) !important;
}

body.ev-staff-core .account-main .account-status-pill.is-live {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(22, 101, 52, 0.22);
  color: rgba(220, 252, 231, 0.96) !important;
}

body.ev-staff-core .account-main .account-channel-pill,
body.ev-staff-core .account-main .account-points-pill {
  border-color: rgba(250, 204, 21, 0.32);
  background: rgba(120, 53, 15, 0.22);
  color: rgba(254, 240, 138, 0.96) !important;
}

body.ev-staff-core .account-main .account-bounty-rail-item {
  justify-content: space-between;
  width: 100%;
  border-radius: 0.95rem;
  padding: 0.8rem 0.9rem;
  letter-spacing: 0.06em;
  text-transform: none;
  font-weight: 700;
}

body.ev-staff-core .account-main .account-bounty-rail-item strong {
  color: rgba(255, 247, 220, 0.98);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ev-staff-core .account-main .account-bounty-action-stack button {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1100px) {
  body.ev-staff-core .account-main .account-bounty-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.ev-staff-core .account-main .account-bounty-board-grid,
  body.ev-staff-core .account-main .account-bounty-editor-grid,
  body.ev-staff-core .account-main .account-bounty-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1400px) {
  body.ev-staff-core .dashboard-home-main .dashboard-home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1180px) {
  body.ev-staff-core .dashboard-home-main .dashboard-home-hero,
  body.ev-staff-core .dashboard-home-main .dashboard-home-grid,
  body.ev-staff-core .dashboard-home-main .dashboard-home-center-grid,
  body.ev-staff-core .dashboard-home-main .dashboard-home-split-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  body.ev-staff-core .dashboard-home-main .dashboard-home-command-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Primary surface rewrite */
body.ev-staff-core main .glass-card,
body.ev-staff-core main .pirate-panel,
body.ev-staff-core main .parchment-panel,
body.ev-staff-core main .osrs-panel,
body.ev-staff-core main .osrs-stone-panel,
body.ev-staff-core main .portal-card,
body.ev-staff-core main .banner,
body.ev-staff-core main .card,
body.ev-staff-core main .panel,
body.ev-staff-core main section[class*="rounded-2xl"],
body.ev-staff-core main section[class*="rounded-3xl"],
body.ev-staff-core main article[class*="rounded-2xl"],
body.ev-staff-core main article[class*="rounded-3xl"],
body.ev-staff-core main div[class*="rounded-2xl"][class*="p-"],
body.ev-staff-core main div[class*="rounded-3xl"][class*="p-"] {
  background: linear-gradient(145deg, var(--staff-glass-bg), var(--staff-glass-bg-strong)) !important;
  border: 1px solid var(--staff-glass-border) !important;
  box-shadow: var(--staff-shadow) !important;
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
}

body.ev-staff-core #staffSidebar .sidebar-brand-mark,
body.ev-staff-core #staffSidebar .sidebar-nav-item,
body.ev-staff-core #staffSidebar .sidebar-icon-wrap,
body.ev-staff-core .staff-sidebar-close,
body.ev-staff-core .staff-shell-nav-toggle,
body.ev-staff-core .staff-shell-topbar,
body.ev-staff-core .staff-shell-topbar-profile,
body.ev-staff-core .staff-shell-duty,
body.ev-staff-core .staff-shell-topbar-chip,
body.ev-staff-core .staff-shell-topbar-action,
body.ev-staff-core .ticket-toast,
body.ev-staff-core .staff-friends-bubble,
body.ev-staff-core .staff-friends-panel,
body.ev-staff-core .staff-toast,
body.ev-staff-core main .calendar-day-event,
body.ev-staff-core main .rota-day-card,
body.ev-staff-core main .rota-agenda-entry,
body.ev-staff-core .rota-modal-box,
body.ev-staff-core .rota-modal-row,
body.ev-staff-core .calendar-modal-panel,
body.ev-staff-core .calendar-modal-card,
body.ev-staff-core main .case-item,
body.ev-staff-core main .msg,
body.ev-staff-core main .shop-preview-metric,
body.ev-staff-core main .shop-preview-panel,
body.ev-staff-core main .queue-list,
body.ev-staff-core main .chat-log,
body.ev-staff-core .dashboard-home-main .live-feed-board,
body.ev-staff-core .dashboard-home-main .live-feed-sidepanel,
body.ev-staff-core .dashboard-home-main .staff-bounty-board {
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
}

/* Remove legacy wood/parchment texture pseudo layers */
body.ev-staff-core main .glass-card::before,
body.ev-staff-core main .pirate-panel::before,
body.ev-staff-core main .parchment-panel::before,
body.ev-staff-core main .osrs-panel::before,
body.ev-staff-core main .osrs-stone-panel::before,
body.ev-staff-core main .portal-card::before,
body.ev-staff-core main .banner::before,
body.ev-staff-core main .card::before,
body.ev-staff-core main .panel::before {
  content: none !important;
  background: none !important;
  opacity: 0 !important;
}

/* Typography rewrite */
body.ev-staff-core main h1,
body.ev-staff-core main h2,
body.ev-staff-core main h3,
body.ev-staff-core main .panel-title,
body.ev-staff-core main .section-title,
body.ev-staff-core main .hero-title {
  color: var(--staff-title) !important;
  text-shadow: none !important;
}

body.ev-staff-core main p,
body.ev-staff-core main span,
body.ev-staff-core main li,
body.ev-staff-core main small,
body.ev-staff-core main label {
  color: var(--staff-text) !important;
  text-shadow: none !important;
}

/* Buttons rewrite */
body.ev-staff-core main .btn,
body.ev-staff-core main button,
body.ev-staff-core main .btn-action,
body.ev-staff-core main .btn-osrs,
body.ev-staff-core main .btn-portal,
body.ev-staff-core main .btn-gold,
body.ev-staff-core main .panel-link-btn,
body.ev-staff-core main .staff-duty-cta,
body.ev-staff-core main input[type="submit"],
body.ev-staff-core main input[type="button"] {
  border: 1px solid var(--staff-gold-border) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)) !important;
  color: rgba(255, 248, 241, 0.96) !important;
  text-shadow: none !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18) !important;
}

body.ev-staff-core main .btn:hover,
body.ev-staff-core main button:hover,
body.ev-staff-core main .btn-action:hover,
body.ev-staff-core main .btn-osrs:hover,
body.ev-staff-core main .panel-link-btn:hover {
  border-color: rgba(255, 232, 190, 0.62) !important;
  filter: brightness(1.08);
  transform: none !important;
}

/* Inputs rewrite */
body.ev-staff-core main input,
body.ev-staff-core main textarea,
body.ev-staff-core main select {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 249, 243, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.ev-staff-core main input::placeholder,
body.ev-staff-core main textarea::placeholder,
body.ev-staff-core main select::placeholder {
  color: rgba(255, 244, 232, 0.48) !important;
}

body.ev-staff-core main .dashboard-rail-copy,
body.ev-staff-core main .live-feed-empty,
body.ev-staff-core main .staff-bounty-empty,
body.ev-staff-core main .command-preview-copy {
  color: rgba(212, 224, 241, 0.74) !important;
}

/* Utility accent controls */
body.ev-staff-core main .stat-pill {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: rgba(255, 247, 239, 0.92) !important;
}

/* Gold trim designated surfaces */
body.ev-staff-core main .staff-theme-gold,
body.ev-staff-core main #weather-banner,
body.ev-staff-core main #bountyPanel,
body.ev-staff-core main #promoPanel,
body.ev-staff-core main #ghostPanel,
body.ev-staff-core main #supportPanel {
  border-color: var(--staff-gold-border) !important;
  box-shadow: 0 20px 42px rgba(3, 8, 18, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 236, 214, 0.16) !important;
}

/* Sidebar rewrite */
body.ev-staff-core #staffSidebar.sidebar-glass {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 16rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 0.9rem 0.8rem 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.08), transparent 34%),
    radial-gradient(circle at 70% 45%, rgba(255, 232, 208, 0.06), transparent 34%),
    linear-gradient(180deg, rgba(24, 24, 24, 0.58), rgba(12, 12, 12, 0.34)) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05), 18px 0 36px rgba(0, 0, 0, 0.24) !important;
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
}

body.ev-staff-core #staffSidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.ev-staff-core #staffSidebar .sidebar-brand {
  display: grid;
  gap: 0.45rem;
  padding: 0.15rem 0.15rem 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.ev-staff-core #staffSidebar .sidebar-brand-mark {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.ev-staff-core #staffSidebar .sidebar-brand-title {
  color: rgba(255, 248, 241, 0.96) !important;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ev-staff-core #staffSidebar .sidebar-brand-copy {
  color: rgba(255, 243, 231, 0.7) !important;
  font-size: 0.72rem;
  line-height: 1.55;
}

body.ev-staff-core #staffSidebar .sidebar-nav-item {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-height: 4rem;
  padding: 0.72rem 0.78rem;
  border-radius: 1rem;
  text-decoration: none;
}

body.ev-staff-core #staffSidebar .sidebar-icon-wrap {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.ev-staff-core #staffSidebar .sidebar-copy {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

body.ev-staff-core #staffSidebar .sidebar-nav-item {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.ev-staff-core #staffSidebar .sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

body.ev-staff-core #staffSidebar .nav-item-active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%) !important;
  border-left: 3px solid rgba(255, 249, 243, 0.9) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 0 12px rgba(255, 255, 255, 0.06), 0 0 16px rgba(255, 255, 255, 0.04) !important;
}

body.ev-staff-core #staffSidebar .sidebar-label {
  color: rgba(255, 246, 236, 0.9) !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ev-staff-core #staffSidebar .sidebar-hint {
  color: rgba(255, 239, 226, 0.66) !important;
  font-size: 0.68rem;
  line-height: 1.45;
}

body.ev-staff-core #staffSidebar #ticket-count-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.2rem;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5d27d;
  color: #122133 !important;
  font-size: 0.66rem;
  font-weight: 900;
  border: 2px solid rgba(10, 18, 32, 0.94);
}

body.ev-staff-core .staff-sidebar-close,
body.ev-staff-core .staff-shell-nav-toggle {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.9rem;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 248, 241, 0.96) !important;
}

body.ev-staff-core .staff-sidebar-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
}

body.ev-staff-core .staff-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: none;
  background: rgba(5, 10, 18, 0.54);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* Topbar rewrite */
body.ev-staff-core .staff-shell-topbar {
  position: fixed;
  top: 0;
  left: 16rem;
  right: 0;
  z-index: 88;
  min-height: var(--staff-topbar-height);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.06), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 232, 208, 0.05), transparent 28%),
    linear-gradient(135deg, rgba(26, 26, 26, 0.42), rgba(14, 14, 14, 0.24)) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
}

body.ev-staff-core .staff-shell-topbar-page {
  display: none;
}

body.ev-staff-core .staff-shell-topbar-kicker {
  color: rgba(184, 210, 236, 0.72) !important;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

body.ev-staff-core .staff-shell-topbar-title {
  color: #ecf5ff !important;
  font-size: clamp(1.05rem, 1.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.01em;
}

body.ev-staff-core .staff-shell-topbar-subtitle {
  color: rgba(204, 220, 239, 0.68) !important;
  font-size: 0.72rem;
  line-height: 1.45;
}

body.ev-staff-core .staff-shell-topbar-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
}

body.ev-staff-core .staff-shell-topbar-profile,
body.ev-staff-core .staff-shell-duty {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.42rem 0.56rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.ev-staff-core .staff-shell-topbar-profile {
  margin-right: auto;
  min-width: 0;
}

body.ev-staff-core .staff-shell-topbar-avatar {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body.ev-staff-core .staff-shell-topbar-identity,
body.ev-staff-core .staff-shell-duty-copy {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

body.ev-staff-core .staff-shell-topbar-name,
body.ev-staff-core .staff-shell-duty-state {
  color: rgba(255, 249, 243, 0.96) !important;
  font-size: 0.76rem;
  font-weight: 800;
}

body.ev-staff-core .staff-shell-topbar-rsn,
body.ev-staff-core .staff-shell-duty-label,
body.ev-staff-core .staff-shell-duty-meta {
  color: rgba(255, 239, 226, 0.62) !important;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ev-staff-core .staff-shell-duty-btn {
  min-height: 2.3rem;
  padding: 0 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}

body.ev-staff-core .staff-shell-topbar-chip,
body.ev-staff-core .staff-shell-topbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 248, 241, 0.94) !important;
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
}

/* Crewlink shared shell */
body.ev-staff-core .staff-friends-bubble {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 118;
  width: 4.7rem;
  height: 4.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  box-shadow: 0 22px 44px rgba(2, 8, 18, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  color: rgba(255, 248, 241, 0.96);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
}

body.ev-staff-core .staff-friends-bubble:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 26px 48px rgba(2, 8, 18, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.ev-staff-core .staff-friends-bubble.has-unread {
  box-shadow: 0 24px 48px rgba(2, 8, 18, 0.48), 0 0 0 4px rgba(74, 222, 128, 0.18), 0 0 36px rgba(74, 222, 128, 0.28);
  animation: crewlinkBubblePulse 1.45s ease-in-out infinite;
}

body.ev-staff-core .staff-friends-bubble.has-activity:not(.has-unread) {
  box-shadow: 0 24px 46px rgba(2, 8, 18, 0.48), 0 0 0 4px rgba(255, 224, 146, 0.16), 0 0 30px rgba(255, 224, 146, 0.22);
}

body.ev-staff-core .staff-friends-bubble-count {
  position: absolute;
  top: -0.25rem;
  right: -0.2rem;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #22c55e;
  color: #04110a;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(8, 16, 28, 0.96);
}

body.ev-staff-core .staff-friends-bubble.has-unread .staff-friends-bubble-count {
  background: #facc15;
  color: #281400;
}

body.ev-staff-core .staff-friends-bubble-label {
  font-size: 0.53rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

body.ev-staff-core .staff-friends-backdrop {
  z-index: 117;
}

body.ev-staff-core .staff-friends-drawer {
  position: fixed;
  top: 0.85rem;
  right: 0;
  bottom: 0.85rem;
  width: min(96vw, 980px);
  z-index: 119;
  padding-left: 0.8rem;
  pointer-events: none;
}

body.ev-staff-core .staff-friends-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 24%),
    radial-gradient(circle at 72% 16%, rgba(255, 232, 208, 0.06), transparent 22%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.94), rgba(10, 10, 10, 0.97));
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.52);
  transform: translateX(108%);
  transition: transform 0.28s ease;
  pointer-events: auto;
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%);
}

body.staff-friends-open .staff-friends-panel {
  transform: translateX(0);
}

body.ev-staff-core .staff-friends-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
}

body.ev-staff-core .staff-friends-roster,
body.ev-staff-core .staff-friends-thread {
  min-height: 0;
}

body.ev-staff-core .staff-friends-roster {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

body.ev-staff-core .staff-friends-search,
body.ev-staff-core #staffFriendsMessage {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(10, 19, 32, 0.72) !important;
  color: #eef7ff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.ev-staff-core .staff-friends-search::placeholder,
body.ev-staff-core #staffFriendsMessage::placeholder {
  color: rgba(192, 210, 230, 0.48) !important;
}

body.ev-staff-core .staff-roster-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

body.ev-staff-core .staff-roster-entry:hover,
body.ev-staff-core .staff-roster-entry.is-active {
  border-color: rgba(163, 203, 244, 0.42);
  background: rgba(74, 120, 172, 0.16);
  transform: translateX(-1px);
}

body.ev-staff-core .staff-roster-avatar {
  position: relative;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.ev-staff-core .staff-roster-avatar img,
body.ev-staff-core .crewlink-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.ev-staff-core .staff-presence-dot {
  position: absolute;
  right: 0.1rem;
  bottom: 0.1rem;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  border: 2px solid rgba(8, 16, 28, 0.95);
  background: #8b98a8;
}

body.ev-staff-core .staff-presence-dot.is-online { background: #22c55e; }
body.ev-staff-core .staff-presence-dot.is-idle { background: #f59e0b; }
body.ev-staff-core .staff-presence-dot.is-dnd { background: #ef4444; }
body.ev-staff-core .staff-presence-dot.is-offline { background: #64748b; }

body.ev-staff-core .staff-roster-favorite {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 217, 173, 0.6);
  font-size: 0.88rem;
}

body.ev-staff-core .staff-roster-favorite.is-favorite {
  color: #ffcf70;
  border-color: rgba(255, 219, 158, 0.34);
  background: rgba(255, 219, 158, 0.12);
}

body.ev-staff-core .staff-roster-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.28rem;
}

body.ev-staff-core .staff-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.36rem;
  border-radius: 999px;
  background: #22c55e;
  color: #04110a;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

body.ev-staff-core .staff-latest-snippet {
  margin-top: 0.32rem;
  font-size: 0.72rem;
  line-height: 1.25;
  color: rgba(214, 224, 238, 0.56);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.ev-staff-core .staff-thread-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

body.ev-staff-core .staff-chat-message {
  max-width: min(84%, 33rem);
  padding: 0.8rem 0.95rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

body.ev-staff-core .staff-chat-message.is-mine {
  margin-left: auto;
  background: linear-gradient(180deg, rgba(47, 78, 112, 0.92), rgba(24, 44, 70, 0.96));
  border-color: rgba(209, 228, 248, 0.28);
}

body.ev-staff-core .staff-chat-message.is-theirs {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.045);
}

body.ev-staff-core .crewlink-preview-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 2px solid rgba(8, 16, 28, 0.9);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

body.ev-staff-core .staff-toast-stack {
  position: fixed;
  top: 6rem;
  right: 1.25rem;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  pointer-events: none;
}

body.ev-staff-core .staff-toast {
  width: min(24rem, calc(100vw - 2rem));
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.94), rgba(10, 10, 10, 0.98));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
  padding: 0.95rem 1rem;
  pointer-events: auto;
  cursor: pointer;
  animation: crewlinkToastIn 0.22s ease;
}

body.ev-staff-core .staff-toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

body.ev-staff-core .staff-toast-copy {
  margin-top: 0.45rem;
  color: rgba(245, 240, 233, 0.76);
  font-size: 0.82rem;
  line-height: 1.35;
}

@keyframes crewlinkToastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes crewlinkBubblePulse {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

@keyframes crewlinkBubbleFlash {
  0% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-2px) scale(1.06);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  body.ev-staff-core {
    --staff-topbar-height: 4rem;
  }

  body.ev-staff-core main.app-main,
  body.ev-staff-core main.dashboard-main,
  body.ev-staff-core main.dashboard-home-main,
  body.ev-staff-core main.cases-main,
  body.ev-staff-core main.account-main,
  body.ev-staff-core main.hierarchy-shell,
  body.ev-staff-core main[class*="ml-64"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
  }

  body.ev-staff-core #staffSidebar.sidebar-glass {
    transform: translateX(calc(-100% - 2rem));
    transition: transform 0.22s ease;
    visibility: hidden;
    pointer-events: none;
    box-shadow: none !important;
    border-right-color: transparent !important;
  }

  body.ev-staff-core #staffSidebar.sidebar-glass.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05), 18px 0 36px rgba(0, 0, 0, 0.24) !important;
    border-right-color: rgba(255, 255, 255, 0.14) !important;
  }

  body.ev-staff-core .staff-shell-topbar {
    left: 0;
    width: 100%;
    max-width: 100%;
    padding-inline: 0.8rem;
    flex-wrap: wrap;
  }

  body.ev-staff-core .staff-shell-nav-toggle,
  body.ev-staff-core .staff-sidebar-close {
    display: inline-flex;
  }

  body.ev-staff-core .staff-friends-drawer {
    width: 100vw;
    top: 0;
    bottom: 0;
    padding: 0;
  }

  body.ev-staff-core .staff-friends-shell {
    grid-template-columns: 1fr;
  }

  body.ev-staff-core .staff-friends-roster {
    max-height: 38vh;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  body.ev-staff-core .staff-toast-stack {
    left: 0.75rem;
    right: 0.75rem;
    top: 5.5rem;
  }

  body.ev-staff-core .staff-toast {
    width: 100%;
  }
}

/* Legacy palette neutralizer: remove crimson/gold/purple bleed on staff pages. */
body.ev-staff-core main [class*="text-amber"],
body.ev-staff-core main [class*="text-yellow"],
body.ev-staff-core main [class*="text-purple"],
body.ev-staff-core #staffSidebar [class*="text-amber"],
body.ev-staff-core .staff-shell-topbar [class*="text-amber"],
body.ev-staff-core .staff-shell-topbar [class*="text-yellow"],
body.ev-staff-core .staff-shell-topbar [class*="text-purple"] {
  color: var(--staff-text) !important;
}

body.ev-staff-core main [class*="border-amber"],
body.ev-staff-core main [class*="border-yellow"],
body.ev-staff-core main [class*="border-purple"],
body.ev-staff-core main [class*="border-red"],
body.ev-staff-core #staffSidebar [class*="border-amber"],
body.ev-staff-core #staffSidebar [class*="border-yellow"],
body.ev-staff-core #staffSidebar [class*="border-purple"],
body.ev-staff-core .staff-shell-topbar [class*="border-amber"],
body.ev-staff-core .staff-shell-topbar [class*="border-yellow"],
body.ev-staff-core .staff-shell-topbar [class*="border-purple"] {
  border-color: rgba(190, 205, 230, 0.24) !important;
}

body.ev-staff-core main [class*="bg-yellow"],
body.ev-staff-core main [class*="bg-amber"],
body.ev-staff-core main [class*="bg-purple"],
body.ev-staff-core main [class*="bg-red"],
body.ev-staff-core #staffSidebar [class*="bg-yellow"],
body.ev-staff-core #staffSidebar [class*="bg-amber"],
body.ev-staff-core #staffSidebar [class*="bg-purple"],
body.ev-staff-core .staff-shell-topbar [class*="bg-yellow"],
body.ev-staff-core .staff-shell-topbar [class*="bg-amber"],
body.ev-staff-core .staff-shell-topbar [class*="bg-purple"] {
  background: rgba(255, 255, 255, 0.08) !important;
}

body.ev-staff-core main [class*="from-yellow"],
body.ev-staff-core main [class*="to-yellow"],
body.ev-staff-core main [class*="from-amber"],
body.ev-staff-core main [class*="to-amber"],
body.ev-staff-core main [class*="from-purple"],
body.ev-staff-core main [class*="to-purple"],
body.ev-staff-core main [class*="from-red"],
body.ev-staff-core main [class*="to-red"] {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)) !important;
}

body.ev-staff-core main [style*="#ce1212"],
body.ev-staff-core main [style*="#8b0000"],
body.ev-staff-core main [style*="#ffb347"],
body.ev-staff-core main [style*="#d4af37"],
body.ev-staff-core main [style*="#7c3aed"],
body.ev-staff-core main [style*="#a78bfa"] {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
}

body.ev-staff-core main [style*="#f1e0ac"],
body.ev-staff-core main [style*="#ffe7c3"],
body.ev-staff-core main [style*="#f4c66c"],
body.ev-staff-core #staffSidebar [style*="#f1e0ac"],
body.ev-staff-core .staff-shell-topbar [style*="#f1e0ac"] {
  color: rgba(255, 244, 228, 0.92) !important;
}

body.ev-staff-core main .text-red-500,
body.ev-staff-core main .text-red-300,
body.ev-staff-core main .text-red-400,
body.ev-staff-core #staffSidebar .text-red-500,
body.ev-staff-core #staffSidebar .text-red-400 {
  color: rgba(237, 113, 113, 0.9) !important;
}

body.ev-staff-core main .text-green-300,
body.ev-staff-core main .text-emerald-300 {
  color: rgba(120, 224, 181, 0.92) !important;
}

body.ev-staff-core main .text-sky-300,
body.ev-staff-core main .text-blue-300 {
  color: rgba(255, 244, 228, 0.9) !important;
}

/* Page-level legacy theme neutralizer for templates that still define custom OSRS/crimson blocks. */
body.ev-staff-core::before {
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 236, 214, 0.08), transparent 34%),
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.05), transparent 30%),
    linear-gradient(180deg, rgba(8, 10, 12, 0.12), rgba(8, 10, 12, 0.28)) !important;
  filter: none !important;
  opacity: 0.46 !important;
}

body.ev-staff-core::after {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.04), transparent 48%),
    radial-gradient(circle at 78% 82%, rgba(255, 228, 196, 0.03), transparent 42%),
    linear-gradient(160deg, rgba(6, 8, 10, 0.08) 0%, rgba(4, 5, 7, 0.14) 100%) !important;
  opacity: 0.18 !important;
}

body.ev-staff-core main .calendar-shell,
body.ev-staff-core main .calendar-hero,
body.ev-staff-core main .war-hero,
body.ev-staff-core main .shop-preview-parchment,
body.ev-staff-core main .shop-preview-panel,
body.ev-staff-core main .shop-preview-card,
body.ev-staff-core main .shop-preview-metric,
body.ev-staff-core main .dashboard-hero,
body.ev-staff-core main .dashboard-command-bar,
body.ev-staff-core main .osrs-stone-panel,
body.ev-staff-core main .osrs-panel,
body.ev-staff-core main .modal-glass,
body.ev-staff-core main .modal-overlay,
body.ev-staff-core main .osrs-parchment-bg,
body.ev-staff-core main .osrs-parchment,
body.ev-staff-core main .osrs-parchment-item {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 248, 241, 0.94) !important;
  box-shadow: var(--staff-shadow) !important;
}

body.ev-staff-core main .calendar-hero-tag,
body.ev-staff-core main .war-hero-tag,
body.ev-staff-core main .shop-preview-kicker,
body.ev-staff-core main .shop-preview-badge,
body.ev-staff-core main .intel-pill,
body.ev-staff-core main .accent-gold {
  color: rgba(244, 229, 207, 0.9) !important;
  border-color: rgba(255, 236, 214, 0.2) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

body.ev-staff-core main .calendar-action-btn,
body.ev-staff-core main .shop-toolbar-btn > div,
body.ev-staff-core main .shop-card-pagination button,
body.ev-staff-core main .shop-spotlight-btn,
body.ev-staff-core main .tab-btn.active,
body.ev-staff-core main #step-progress {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 249, 243, 0.96) !important;
}

body.ev-staff-core main .shop-preview-title,
body.ev-staff-core main .shop-preview-copy,
body.ev-staff-core main .shop-preview-metric-value,
body.ev-staff-core main .shop-preview-panel-title,
body.ev-staff-core main .shop-preview-panel-copy,
body.ev-staff-core main .shop-preview-card-name,
body.ev-staff-core main .shop-preview-card-copy,
body.ev-staff-core main .shop-preview-card-price,
body.ev-staff-core main #calendarMonthLabel,
body.ev-staff-core main .calendar-day-event-title {
  color: rgba(255, 249, 243, 0.96) !important;
}

body.ev-staff-core main [class*="weather-banner-glass"],
body.ev-staff-core main [class*="dashboard-weather-banner"] {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}

body.ev-staff-core main .shop-preview-parchment::before,
body.ev-staff-core main .shop-preview-panel::before,
body.ev-staff-core main .shop-preview-card::before {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body.ev-staff-core main .custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(17, 30, 46, 0.92) !important;
}

body.ev-staff-core main .custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28) !important;
}

/* Restore boxed page-specific staff UI elements */
body.ev-staff-core main .recruit-hero,
body.ev-staff-core main .recruit-card,
body.ev-staff-core main .recruit-table-shell,
body.ev-staff-core main .recruitment-main .rounded-xl,
body.ev-staff-core main .cases-head,
body.ev-staff-core main .queue-panel,
body.ev-staff-core main .chat-panel,
body.ev-staff-core main .shop-preview-shell > *,
body.ev-staff-core main .shop-preview-card,
body.ev-staff-core main .shop-product-card,
body.ev-staff-core main .hierarchy-hero,
body.ev-staff-core main .hierarchy-stat,
body.ev-staff-core main .hierarchy-tier,
body.ev-staff-core main .hierarchy-admin-panel,
body.ev-staff-core main .hierarchy-admin-card,
body.ev-staff-core main .hierarchy-member-card,
body.ev-staff-core main .hierarchy-empty-card,
body.ev-staff-core main .hierarchy-preview-card,
body.ev-staff-core main .hierarchy-meta-card,
body.ev-staff-core main .rota-hero,
body.ev-staff-core main .rota-shell,
body.ev-staff-core .rota-modal-box,
body.ev-staff-core .rota-modal-row,
body.ev-staff-core .calendar-modal-panel,
body.ev-staff-core .calendar-modal-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 249, 243, 0.96) !important;
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%) !important;
}

body.ev-staff-core main .hierarchy-hero {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)) !important;
}

body.ev-staff-core main .hierarchy-hero::before {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.12), transparent 22%),
    radial-gradient(circle at 88% 28%, rgba(255, 240, 224, 0.1), transparent 18%) !important;
}

body.ev-staff-core main .recruit-chip,
body.ev-staff-core main .rota-tag,
body.ev-staff-core main .hierarchy-chip,
body.ev-staff-core main .hierarchy-note,
body.ev-staff-core main .case-badge,
body.ev-staff-core .status-pill,
body.ev-staff-core .calendar-swatch {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: rgba(255, 248, 241, 0.92) !important;
}

body.ev-staff-core main .recruit-input,
body.ev-staff-core main .calendar-input,
body.ev-staff-core main .rota-input,
body.ev-staff-core main .rota-textarea,
body.ev-staff-core main .hierarchy-admin-input,
body.ev-staff-core main .queue-search,
body.ev-staff-core main .chat-input {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 249, 243, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.ev-staff-core main .recruit-input::placeholder,
body.ev-staff-core main .calendar-input::placeholder,
body.ev-staff-core main .rota-input::placeholder,
body.ev-staff-core main .rota-textarea::placeholder,
body.ev-staff-core main .hierarchy-admin-input::placeholder,
body.ev-staff-core main .queue-search::placeholder,
body.ev-staff-core main .chat-input::placeholder {
  color: rgba(255, 244, 232, 0.48) !important;
}

body.ev-staff-core main .calendar-action-btn,
body.ev-staff-core main #rotaPrevBtn,
body.ev-staff-core main #rotaTodayBtn,
body.ev-staff-core main #rotaNextBtn,
body.ev-staff-core main #rotaCancelEditBtn,
body.ev-staff-core #rotaModalClose,
body.ev-staff-core main .chat-actions .btn,
body.ev-staff-core main .shop-spotlight-btn,
body.ev-staff-core main .hierarchy-action,
body.ev-staff-core main .hierarchy-admin-btn,
body.ev-staff-core main .hierarchy-remove-btn {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)) !important;
  color: rgba(255, 249, 243, 0.96) !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16) !important;
}

body.ev-staff-core main .hierarchy-action.is-secondary,
body.ev-staff-core main .hierarchy-admin-btn.is-secondary {
  background: rgba(255, 255, 255, 0.07) !important;
}

body.ev-staff-core main .hierarchy-title,
body.ev-staff-core main .hierarchy-tier-title,
body.ev-staff-core main .hierarchy-stat-value,
body.ev-staff-core main .hierarchy-member-name,
body.ev-staff-core main .hierarchy-preview-title,
body.ev-staff-core main .cases-title,
body.ev-staff-core main .case-name,
body.ev-staff-core main #chatTitle,
body.ev-staff-core main .shop-hero h1,
body.ev-staff-core main .shop-preview-title,
body.ev-staff-core main .shop-preview-panel-title,
body.ev-staff-core main .product-name,
body.ev-staff-core main .calendar-day-event-title,
body.ev-staff-core main .rota-day-card-name {
  color: rgba(255, 249, 243, 0.96) !important;
  text-shadow: none !important;
}

body.ev-staff-core main .hierarchy-subtitle,
body.ev-staff-core main .hierarchy-tier-copy,
body.ev-staff-core main .hierarchy-member-sub,
body.ev-staff-core main .hierarchy-preview-sub,
body.ev-staff-core main .hierarchy-admin-status,
body.ev-staff-core main .hierarchy-empty-card,
body.ev-staff-core main .cases-subtitle,
body.ev-staff-core main .case-meta,
body.ev-staff-core main .chat-empty,
body.ev-staff-core main .shop-preview-copy,
body.ev-staff-core main .shop-preview-panel-copy,
body.ev-staff-core main .product-last-synced,
body.ev-staff-core main .rota-day-card-copy,
body.ev-staff-core main .calendar-day-events,
body.ev-staff-core main .recruitment-main .text-white\/70,
body.ev-staff-core main .recruitment-main .text-white\/60,
body.ev-staff-core main .recruitment-main .text-white\/75,
body.ev-staff-core main .shop-main .text-stone-500,
body.ev-staff-core main .shop-main .text-stone-600 {
  color: rgba(255, 242, 231, 0.8) !important;
}

body.ev-staff-core main .hierarchy-kicker,
body.ev-staff-core main .hierarchy-stat-label,
body.ev-staff-core main .hierarchy-admin-label,
body.ev-staff-core main .hierarchy-meta-card dt {
  color: rgba(255, 236, 220, 0.72) !important;
}

body.ev-staff-core main .hierarchy-meta-card dd {
  color: rgba(255, 249, 243, 0.96) !important;
}

body.ev-staff-core .calendar-modal-backdrop,
body.ev-staff-core #rotaDayModal {
  position: fixed;
  inset: 0;
  z-index: 125;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(4, 10, 18, 0.72) !important;
  backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%);
  -webkit-backdrop-filter: blur(var(--staff-glass-blur)) saturate(155%);
}

body.ev-staff-core #rotaDayModal.open {
  display: flex;
}

body.ev-staff-core .rota-modal-box {
  width: min(48rem, calc(100vw - 2rem));
  max-height: min(82vh, 44rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.3rem;
}

body.ev-staff-core .rota-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

body.ev-staff-core .rota-modal-body {
  padding: 1rem;
  overflow-y: auto;
}

body.ev-staff-core main .staff-calendar-weekdays > div,
body.ev-staff-core main .rota-weekdays > div,
body.ev-staff-core main .cal-cell,
body.ev-staff-core main .cal-cell-empty,
body.ev-staff-core main .rota-day-cell {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.ev-staff-core main .cal-cell,
body.ev-staff-core main .rota-day-cell {
  min-height: 8.75rem;
  max-height: 8.75rem;
  border-radius: 1rem;
  overflow: hidden;
}

body.ev-staff-core main .rota-day-cell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.55rem;
  cursor: pointer;
}

body.ev-staff-core main .rota-day-cell > .space-y-2 {
  min-height: 0;
  overflow: hidden;
}

body.ev-staff-core main .cal-cell-empty {
  min-height: 8.75rem;
  border-radius: 1rem;
  opacity: 0.42;
}

body.ev-staff-core main .cal-cell-today,
body.ev-staff-core main .rota-day-cell:has(.rota-day-card.duty) {
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.ev-staff-core main .calendar-day-event,
body.ev-staff-core main .rota-day-card,
body.ev-staff-core main .rota-agenda-entry,
body.ev-staff-core .calendar-modal-card,
body.ev-staff-core .rota-modal-row,
body.ev-staff-core main .case-item,
body.ev-staff-core main .msg,
body.ev-staff-core main .shop-preview-metric,
body.ev-staff-core main .shop-preview-panel,
body.ev-staff-core main .shop-main .bg-black\/40,
body.ev-staff-core main .shop-main .bg-black\/60,
body.ev-staff-core main .shop-main .bg-black\/50,
body.ev-staff-core main .shop-main .bg-stone-900\/20 {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 0.95rem;
  color: rgba(255, 249, 243, 0.96) !important;
}

body.ev-staff-core main .calendar-day-event {
  padding: 0.38rem 0.48rem;
}

body.ev-staff-core main .rota-day-card,
body.ev-staff-core main .rota-agenda-entry,
body.ev-staff-core .rota-modal-row,
body.ev-staff-core .calendar-modal-card {
  padding: 0.72rem;
}

body.ev-staff-core main .rota-day-card {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

body.ev-staff-core main .rota-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

body.ev-staff-core main .rota-day-card-name {
  font-size: 0.74rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.ev-staff-core main .rota-day-card-copy {
  margin-top: 0.15rem;
  font-size: 0.68rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.ev-staff-core main .rota-day-card.duty,
body.ev-staff-core .rota-modal-row.duty {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

body.ev-staff-core .rota-modal-row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

body.ev-staff-core main .rota-agenda-scroll {
  max-height: 30rem;
  overflow-y: auto;
}

body.ev-staff-core main .case-shell {
  display: grid;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

body.ev-staff-core main .cases-head,
body.ev-staff-core main .queue-panel,
body.ev-staff-core main .chat-panel {
  border-radius: 1.25rem !important;
}

body.ev-staff-core main .cases-head,
body.ev-staff-core main .queue-top,
body.ev-staff-core main .chat-top,
body.ev-staff-core main .chat-compose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

body.ev-staff-core main .queue-panel,
body.ev-staff-core main .chat-panel {
  min-height: 38rem;
  padding: 1rem;
}

body.ev-staff-core main .queue-panel,
body.ev-staff-core main .chat-panel,
body.ev-staff-core main .shop-preview-grid,
body.ev-staff-core main #shopProductGrid,
body.ev-staff-core main .shop-hero,
body.ev-staff-core main .shop-card-pagination,
body.ev-staff-core main #addProductModal > div,
body.ev-staff-core main #customProductModal > div {
  min-width: 0;
}

body.ev-staff-core main .queue-list,
body.ev-staff-core main .chat-log {
  margin-top: 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  min-height: 0;
  overflow-y: auto;
}

body.ev-staff-core main .queue-list {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  max-height: 42rem;
}

body.ev-staff-core main .chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem;
  height: 28rem;
}

body.ev-staff-core main .case-item {
  padding: 0.85rem 0.9rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

body.ev-staff-core main .case-item:hover,
body.ev-staff-core main .case-item.active {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-1px);
}

body.ev-staff-core main .case-badges {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

body.ev-staff-core main .case-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.ev-staff-core main .msg {
  padding: 0.8rem 0.9rem;
}

body.ev-staff-core main .msg.staff {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

body.ev-staff-core main .msg.user {
  align-self: flex-start;
}

body.ev-staff-core main .msg.system {
  align-self: center;
  background: rgba(255, 255, 255, 0.08) !important;
}

body.ev-staff-core main .msg-meta {
  margin-bottom: 0.35rem;
  color: rgba(255, 239, 226, 0.58) !important;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ev-staff-core main .shop-main {
  max-height: none !important;
  padding-bottom: 2rem !important;
}

body.ev-staff-core main .shop-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

body.ev-staff-core main .shop-preview-card,
body.ev-staff-core main .shop-product-card {
  border-radius: 1.2rem !important;
}

body.ev-staff-core main .shop-product-card {
  align-items: stretch;
}

body.ev-staff-core main .shop-main .border-stone-800,
body.ev-staff-core main .shop-main .border-stone-700,
body.ev-staff-core main .shop-main .border-white\/5 {
  border-color: rgba(255, 255, 255, 0.14) !important;
}

body.ev-staff-core main .shop-main .text-\[#c2a34c\],
body.ev-staff-core main .shop-main .accent-gold {
  color: rgba(255, 244, 232, 0.9) !important;
}

body.ev-staff-core main .shop-main .text-green-500,
body.ev-staff-core main .shop-main .text-yellow-500,
body.ev-staff-core main .shop-main .text-red-500 {
  color: rgba(255, 249, 243, 0.96) !important;
}

/* Neutralize residual blue utility classes used in staff templates. */
body.ev-staff-core [class*="text-sky"],
body.ev-staff-core [class*="text-blue"] {
  color: rgba(255, 244, 232, 0.86) !important;
}

body.ev-staff-core [class*="bg-sky"],
body.ev-staff-core [class*="bg-blue"],
body.ev-staff-core [class*="hover:bg-sky"],
body.ev-staff-core [class*="hover:bg-blue"] {
  background: rgba(255, 255, 255, 0.08) !important;
}

body.ev-staff-core [class*="border-sky"],
body.ev-staff-core [class*="border-blue"],
body.ev-staff-core [class*="hover:border-sky"],
body.ev-staff-core [class*="hover:border-blue"] {
  border-color: rgba(255, 255, 255, 0.16) !important;
}

body.ev-staff-core main .recruitment-main table thead tr,
body.ev-staff-core main .recruitment-main tbody tr:hover {
  background: rgba(34, 54, 82, 0.44) !important;
}

/* Member database profile popup readability and actions */
body.ev-staff-core .dashboard-main #statsModal {
  background:
    radial-gradient(circle at 14% 12%, rgba(131, 225, 197, 0.14), rgba(6, 10, 16, 0.88) 38%),
    radial-gradient(circle at 86% 82%, rgba(255, 191, 125, 0.1), rgba(4, 7, 12, 0.9) 42%),
    rgba(4, 8, 14, 0.72) !important;
}

body.ev-staff-core .dashboard-main #statsModal .modal-glass {
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  background: linear-gradient(150deg, rgba(26, 42, 60, 0.94), rgba(10, 18, 29, 0.96)) !important;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

body.ev-staff-core .dashboard-main #statsModal #modalContent {
  scrollbar-gutter: stable;
  background: rgba(8, 15, 25, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0.8rem;
  padding: 0.8rem;
}

body.ev-staff-core .dashboard-main #statsModal #modalContent,
body.ev-staff-core .dashboard-main #statsModal #modalContent * {
  color: rgba(239, 247, 255, 0.96);
}

body.ev-staff-core .dashboard-main #statsModal #modalContent [class*="text-stone-9"],
body.ev-staff-core .dashboard-main #statsModal #modalContent [class*="text-stone-8"],
body.ev-staff-core .dashboard-main #statsModal #modalContent [class*="text-slate-9"],
body.ev-staff-core .dashboard-main #statsModal #modalContent [class*="text-slate-8"] {
  color: rgba(246, 252, 255, 0.98) !important;
}

body.ev-staff-core .dashboard-main #statsModal #modalContent [class*="text-slate-6"],
body.ev-staff-core .dashboard-main #statsModal #modalContent [class*="text-slate-5"],
body.ev-staff-core .dashboard-main #statsModal #modalContent [class*="text-stone-6"],
body.ev-staff-core .dashboard-main #statsModal #modalContent [class*="text-stone-5"] {
  color: rgba(222, 236, 251, 0.9) !important;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-rail {
  position: sticky;
  top: 0;
  z-index: 2;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-shell {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(122deg, rgba(13, 24, 37, 0.9), rgba(53, 74, 98, 0.68));
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-core {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-avatar {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 220, 170, 0.45);
  object-fit: cover;
  flex-shrink: 0;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(255, 248, 237, 0.92);
  background: rgba(255, 255, 255, 0.1);
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-copy {
  min-width: 0;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-rsn {
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(255, 252, 247, 0.97);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-discord {
  margin-top: 0.2rem;
  color: rgba(224, 237, 255, 0.82);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-meta {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

body.ev-staff-core .dashboard-main #statsModal .stats-inline-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(240, 248, 255, 0.92);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.56rem;
  font-weight: 800;
}

body.ev-staff-core .dashboard-main #statsModal .stats-inline-chip.status.is-approved {
  border-color: rgba(116, 255, 171, 0.45);
  background: rgba(51, 170, 105, 0.2);
  color: rgba(211, 255, 224, 0.98);
}

body.ev-staff-core .dashboard-main #statsModal .stats-inline-chip.status.is-pending {
  border-color: rgba(255, 217, 119, 0.46);
  background: rgba(186, 133, 45, 0.2);
  color: rgba(255, 237, 196, 0.98);
}

body.ev-staff-core .dashboard-main #statsModal .stats-inline-chip.status.is-blocked {
  border-color: rgba(255, 136, 136, 0.46);
  background: rgba(164, 54, 54, 0.23);
  color: rgba(255, 216, 216, 0.98);
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-stat {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(8, 16, 26, 0.45);
  border-radius: 0.7rem;
  padding: 0.5rem 0.55rem;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-stat span {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.52rem;
  color: rgba(220, 233, 248, 0.72);
  font-weight: 700;
}

body.ev-staff-core .dashboard-main #statsModal .stats-identity-stat strong {
  display: block;
  margin-top: 0.22rem;
  color: rgba(251, 254, 255, 0.95);
  font-weight: 900;
  font-size: 0.95rem;
}

body.ev-staff-core .dashboard-main #statsModal .stats-tab-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

body.ev-staff-core .dashboard-main #statsModal .stats-tab-pill {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(229, 241, 255, 0.76);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  white-space: nowrap;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

body.ev-staff-core .dashboard-main #statsModal .stats-tab-pill:hover {
  border-color: rgba(255, 232, 177, 0.42);
  color: rgba(255, 249, 236, 0.96);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

body.ev-staff-core .dashboard-main #statsModal .stats-tab-pill.active {
  border-color: rgba(255, 232, 177, 0.52);
  color: rgba(255, 246, 220, 0.98);
  background: linear-gradient(120deg, rgba(168, 122, 53, 0.24), rgba(69, 102, 134, 0.34));
}

body.ev-staff-core .dashboard-main #statsModal .stats-profile-card,
body.ev-staff-core .dashboard-main #statsModal .stats-history-card,
body.ev-staff-core .dashboard-main #statsModal .stats-audit-metric,
body.ev-staff-core .dashboard-main #statsModal .stats-skill-card,
body.ev-staff-core .dashboard-main #statsModal .stats-boss-card,
body.ev-staff-core .dashboard-main #statsModal .stats-ledger-wrap,
body.ev-staff-core .dashboard-main #statsModal .stats-ledger-row,
body.ev-staff-core .dashboard-main #statsModal .osrs-parchment-bg {
  background: linear-gradient(165deg, rgba(27, 43, 62, 0.92), rgba(16, 27, 40, 0.95)) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  color: rgba(248, 251, 255, 0.95) !important;
}

body.ev-staff-core .dashboard-main #statsModal .stats-profile-card *,
body.ev-staff-core .dashboard-main #statsModal .stats-history-card *,
body.ev-staff-core .dashboard-main #statsModal .stats-audit-metric *,
body.ev-staff-core .dashboard-main #statsModal .stats-skill-card *,
body.ev-staff-core .dashboard-main #statsModal .stats-boss-card *,
body.ev-staff-core .dashboard-main #statsModal .stats-ledger-wrap *,
body.ev-staff-core .dashboard-main #statsModal .stats-ledger-row *,
body.ev-staff-core .dashboard-main #statsModal .osrs-parchment-bg * {
  color: rgba(248, 251, 255, 0.95) !important;
}

body.ev-staff-core .dashboard-main #statsModal .stats-skill-card,
body.ev-staff-core .dashboard-main #statsModal .stats-boss-card,
body.ev-staff-core .dashboard-main #statsModal .stats-ledger-row {
  border-radius: 0.8rem;
}

body.ev-staff-core .dashboard-main #statsModal .stats-skill-card {
  align-items: center;
  min-height: 4.25rem;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

body.ev-staff-core .dashboard-main #statsModal .stats-skill-card:hover,
body.ev-staff-core .dashboard-main #statsModal .stats-boss-card:hover,
body.ev-staff-core .dashboard-main #statsModal .stats-ledger-row:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 232, 177, 0.46) !important;
  background: linear-gradient(165deg, rgba(43, 62, 84, 0.94), rgba(24, 39, 56, 0.96)) !important;
}

body.ev-staff-core .dashboard-main #statsModal .stats-history-card p,
body.ev-staff-core .dashboard-main #statsModal .stats-profile-card li,
body.ev-staff-core .dashboard-main #statsModal .stats-ledger-row,
body.ev-staff-core .dashboard-main #statsModal .stats-boss-card,
body.ev-staff-core .dashboard-main #statsModal .stats-skill-card {
  line-height: 1.45;
}

body.ev-staff-core .dashboard-main #statsModal .stats-skill-card img,
body.ev-staff-core .dashboard-main #statsModal .stats-boss-card img {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

body.ev-staff-core .dashboard-main #statsModal .profile-achievement-chip,
body.ev-staff-core .dashboard-main #statsModal .profile-redemption-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(244, 251, 255, 0.2);
  color: rgba(249, 252, 255, 0.95) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.62rem;
  font-weight: 800;
}

body.ev-staff-core .dashboard-main #statsModal .profile-redemption-chip {
  border-color: rgba(255, 215, 158, 0.34);
  background: linear-gradient(130deg, rgba(187, 129, 63, 0.24), rgba(92, 130, 164, 0.2));
}

body.ev-staff-core .dashboard-main #statsModal #modalContent > .grid,
body.ev-staff-core .dashboard-main #statsModal #modalContent > .stats-history-card,
body.ev-staff-core .dashboard-main #statsModal #modalContent > .osrs-parchment-bg {
  animation: modalSectionFade 0.2s ease;
}

@keyframes modalSectionFade {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.ev-staff-core .dashboard-main #statsModal .stats-action-btn {
  border: 1px solid rgba(162, 252, 205, 0.44) !important;
  color: rgba(225, 255, 241, 0.96) !important;
  background: linear-gradient(140deg, rgba(16, 150, 105, 0.58), rgba(12, 63, 49, 0.54)) !important;
  transition: transform 0.16s ease, filter 0.16s ease;
}

body.ev-staff-core .dashboard-main #statsModal .stats-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

body.ev-staff-core .dashboard-main #statsModal .stats-action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

body.ev-staff-core .dashboard-main #statsModal .tab-btn.active {
  color: rgba(255, 246, 220, 0.98) !important;
}

@media (max-width: 980px) {
  body.ev-staff-core {
    --staff-topbar-height: 4.35rem;
  }

  body.ev-staff-core .staff-sidebar-overlay {
    display: block;
  }

  body.ev-staff-core #staffSidebar.is-open ~ .staff-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.ev-staff-core .staff-shell-topbar-profile {
    margin-right: 0;
    flex: 1 1 100%;
    order: 2;
  }
}

@media (max-width: 1180px) {
  body.ev-staff-core main .case-shell {
    grid-template-columns: 1fr;
  }

  body.ev-staff-core main .shop-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ev-staff-core main.app-main,
  body.ev-staff-core main.dashboard-main,
  body.ev-staff-core main.dashboard-home-main,
  body.ev-staff-core main.cases-main,
  body.ev-staff-core main.account-main,
  body.ev-staff-core main.hierarchy-shell,
  body.ev-staff-core main[class*="ml-64"] {
    padding-top: calc(var(--staff-topbar-height) + 0.95rem) !important;
  }
}

@media (max-width: 900px) {

  body.ev-staff-core .staff-page-shell {
    gap: 1rem;
  }

  body.ev-staff-core .dashboard-main .dashboard-hero,
  body.ev-staff-core .account-main #weather-banner,
  body.ev-staff-core .shop-main .shop-hero,
  body.ev-staff-core .recruitment-main .recruit-hero,
  body.ev-staff-core .war-main .war-hero,
  body.ev-staff-core .calendar-hero,
  body.ev-staff-core .rota-hero,
  body.ev-staff-core .hierarchy-hero {
    padding: 1.15rem !important;
  }

  body.ev-staff-core .dashboard-main .dashboard-hero-title,
  body.ev-staff-core .account-main .account-greeting,
  body.ev-staff-core .shop-main h1,
  body.ev-staff-core .recruitment-main h1,
  body.ev-staff-core .war-main h1,
  body.ev-staff-core .calendar-hero h1,
  body.ev-staff-core .rota-hero h1,
  body.ev-staff-core .hierarchy-title {
    font-size: clamp(1.95rem, 7vw, 3rem) !important;
    line-height: 1.05 !important;
  }

  body.ev-staff-core .calendar-hero,
  body.ev-staff-core .rota-hero,
  body.ev-staff-core .war-main .war-hero,
  body.ev-staff-core .dashboard-main .dashboard-hero .dashboard-hero-layout,
  body.ev-staff-core .shop-main .shop-hero-actions {
    gap: 1rem !important;
  }

  body.ev-staff-core .dashboard-main .dashboard-hero-search {
    width: 100%;
    max-width: none;
  }

  body.ev-staff-core .dashboard-main #memberSearch {
    width: 100% !important;
    min-width: 0;
  }

  body.ev-staff-core .dashboard-main .dashboard-summary-grid {
    gap: 1rem !important;
  }

  body.ev-staff-core .dashboard-main .dashboard-summary-card {
    flex: 1 1 14rem;
    min-width: 0 !important;
  }

  body.ev-staff-core .dashboard-main #womPayoutForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
  }

  body.ev-staff-core .dashboard-main #womPayoutForm > div,
  body.ev-staff-core .dashboard-main #womPayoutForm > button,
  body.ev-staff-core .dashboard-main #womPayoutForm > span {
    width: 100%;
    min-width: 0;
  }

  body.ev-staff-core .dashboard-main .dashboard-command-bar,
  body.ev-staff-core .dashboard-main .dashboard-pagination,
  body.ev-staff-core .account-main .account-toggle-card,
  body.ev-staff-core .account-main .flex.items-center.justify-between.gap-4.mt-5,
  body.ev-staff-core .account-main #privateTextModal .flex.items-center.justify-between {
    flex-direction: column;
    align-items: flex-start !important;
  }

  body.ev-staff-core .dashboard-main .dashboard-pagination > div,
  body.ev-staff-core .account-main .flex.items-center.gap-3 {
    width: 100%;
    flex-wrap: wrap;
  }

  body.ev-staff-core .dashboard-main #statsModal .modal-glass {
    padding: 1rem;
    max-height: calc(100vh - 1rem);
  }

  body.ev-staff-core .dashboard-main #statsModal .stats-identity-shell {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 0.8rem;
  }

  body.ev-staff-core .dashboard-main #statsModal .stats-identity-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ev-staff-core .dashboard-main #statsModal .stats-tab-row {
    gap: 0.45rem;
    margin-bottom: 0.85rem !important;
    padding-bottom: 0.35rem;
  }

  body.ev-staff-core .dashboard-main #statsModal .stats-tab-pill {
    padding: 0.45rem 0.7rem;
    font-size: 0.54rem;
    letter-spacing: 0.14em;
  }

  body.ev-staff-core .account-main .grid[class*="grid-cols-2"] {
    grid-template-columns: 1fr !important;
  }

  body.ev-staff-core .account-main .flex.items-center.gap-6.mb-8 {
    flex-direction: column;
    align-items: flex-start !important;
  }

  body.ev-staff-core .account-main #sticky-note-draggable {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    z-index: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-top: 0.5rem;
    cursor: default !important;
  }

  body.ev-staff-core .account-main .flex.items-center.gap-3 > button {
    flex: 1 1 11rem;
  }

  body.ev-staff-core .calendar-hero,
  body.ev-staff-core .rota-hero {
    flex-direction: column;
    align-items: flex-start !important;
  }

  body.ev-staff-core .calendar-toolbar-actions,
  body.ev-staff-core .rota-hero > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }

  body.ev-staff-core main #staff-calendar-grid-wrapper,
  body.ev-staff-core main #rota-grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  body.ev-staff-core main .staff-calendar-weekdays,
  body.ev-staff-core main #staff-calendar-grid,
  body.ev-staff-core main .rota-weekdays,
  body.ev-staff-core main #rota-grid {
    min-width: 42rem;
  }

  body.ev-staff-core .cases-main .queue-panel,
  body.ev-staff-core .cases-main .chat-panel {
    min-height: auto;
  }

  body.ev-staff-core .cases-main .chat-log {
    height: min(24rem, 50vh);
  }

  body.ev-staff-core .cases-main .chat-compose {
    flex-direction: column;
    align-items: stretch;
  }

  body.ev-staff-core .cases-main .chat-input,
  body.ev-staff-core .cases-main #sendBtn {
    width: 100%;
  }

  body.ev-staff-core .shop-main .shop-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  body.ev-staff-core .shop-main .shop-toolbar-btn {
    width: 100%;
  }

  body.ev-staff-core .shop-main .shop-toolbar-btn > div {
    width: 100%;
    justify-content: center;
  }

  body.ev-staff-core .shop-main .shop-metrics-grid,
  body.ev-staff-core .shop-main .shop-preview-grid,
  body.ev-staff-core .shop-main #shopProductGrid,
  body.ev-staff-core .recruitment-main [class*="grid-cols-2"],
  body.ev-staff-core .war-main [class*="grid-cols-2"],
  body.ev-staff-core .war-main [class*="grid-cols-3"] {
    grid-template-columns: 1fr !important;
  }

  body.ev-staff-core .shop-main .shop-product-card {
    flex-direction: column;
    align-items: stretch !important;
  }

  body.ev-staff-core .shop-main .shop-product-thumb {
    width: 100% !important;
    height: 12rem !important;
  }

  body.ev-staff-core .shop-main .shop-product-card > .flex-1 > .flex.justify-between.items-center {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  body.ev-staff-core .shop-main #addProductModal > div,
  body.ev-staff-core .shop-main #customProductModal > div {
    flex-direction: column;
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
  }

  body.ev-staff-core .shop-main #itemSearchPanel {
    width: 100% !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1rem !important;
  }

  body.ev-staff-core .shop-main #addProductModal > div > div:last-child,
  body.ev-staff-core .shop-main #customProductModal > div > div:last-child {
    width: 100% !important;
    padding: 1rem !important;
  }

  body.ev-staff-core .shop-main #addProductModal [class*="grid-cols-2"],
  body.ev-staff-core .shop-main #customProductModal [class*="grid-cols-2"] {
    grid-template-columns: 1fr !important;
  }

  body.ev-staff-core .recruitment-main #recruitment-form {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body.ev-staff-core .recruitment-main #recruitment-form > div,
  body.ev-staff-core .recruitment-main #recruitment-form > button,
  body.ev-staff-core .war-main .war-hero > button {
    width: 100%;
  }

  body.ev-staff-core .recruitment-main .recruit-table-shell {
    padding: 1rem !important;
    max-height: none !important;
  }

  body.ev-staff-core .recruitment-main table {
    min-width: 40rem;
  }

  body.ev-staff-core .war-main .war-hero {
    align-items: flex-start !important;
  }
}
  body.ev-staff-core main .shop-preview-grid,
  body.ev-staff-core main #shopProductGrid {
    grid-template-columns: 1fr !important;
  }

  body.ev-staff-core main .shop-product-card {
    flex-direction: column;
  }

  body.ev-staff-core .rota-modal-box {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }

  body.ev-staff-core main.app-main,
  body.ev-staff-core main.dashboard-main,
  body.ev-staff-core main.dashboard-home-main,
  body.ev-staff-core main.cases-main,
  body.ev-staff-core main.account-main,
  body.ev-staff-core main.hierarchy-shell,
  body.ev-staff-core main[class*="ml-64"] {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  body.ev-staff-core .calendar-modal-panel,
  body.ev-staff-core .rota-modal-box,
  body.ev-staff-core .dashboard-main #statsModal .modal-glass,
  body.ev-staff-core .account-main #privateTextModal .modal-glass {
    width: calc(100vw - 1rem) !important;
  }

  body.ev-staff-core .dashboard-main #womPayoutForm {
    grid-template-columns: 1fr;
  }

  body.ev-staff-core .dashboard-main #modalContent [class*="grid-cols-2"],
  body.ev-staff-core .dashboard-main #modalContent [class*="grid-cols-3"],
  body.ev-staff-core .dashboard-main #modalContent [class*="grid-cols-4"] {
    grid-template-columns: 1fr !important;
  }

  body.ev-staff-core .dashboard-main .dashboard-summary-card,
  body.ev-staff-core .account-main .flex.items-center.gap-3 > button {
    flex-basis: 100%;
  }

  body.ev-staff-core main .staff-calendar-weekdays,
  body.ev-staff-core main #staff-calendar-grid,
  body.ev-staff-core main .rota-weekdays,
  body.ev-staff-core main #rota-grid,
  body.ev-staff-core .recruitment-main table {
    min-width: 36rem;
  }

  body.ev-staff-core .shop-main .shop-card-pagination,
  body.ev-staff-core .dashboard-main .dashboard-pagination > div {
    flex-direction: column;
    align-items: stretch !important;
  }

  body.ev-staff-core .shop-main .shop-card-pagination > div,
  body.ev-staff-core .dashboard-main .dashboard-pagination > div > * {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.ev-staff-core .staff-shell-topbar {
    padding-inline: 0.65rem;
  }

  body.ev-staff-core .staff-page-shell {
    gap: 0.85rem;
  }

  body.ev-staff-core .dashboard-main .dashboard-hero,
  body.ev-staff-core .account-main #weather-banner,
  body.ev-staff-core .shop-main .shop-hero,
  body.ev-staff-core .recruitment-main .recruit-hero,
  body.ev-staff-core .war-main .war-hero,
  body.ev-staff-core .calendar-hero,
  body.ev-staff-core .rota-hero,
  body.ev-staff-core .hierarchy-hero,
  body.ev-staff-core .cases-main .queue-panel,
  body.ev-staff-core .cases-main .chat-panel {
    padding: 0.9rem !important;
  }

  body.ev-staff-core .dashboard-main .dashboard-hero-title,
  body.ev-staff-core .account-main .account-greeting,
  body.ev-staff-core .shop-main h1,
  body.ev-staff-core .recruitment-main h1,
  body.ev-staff-core .war-main h1,
  body.ev-staff-core .calendar-hero h1,
  body.ev-staff-core .rota-hero h1,
  body.ev-staff-core .hierarchy-title {
    font-size: clamp(1.65rem, 9vw, 2.35rem) !important;
  }

  body.ev-staff-core .dashboard-main .dashboard-command-bar,
  body.ev-staff-core .dashboard-main .osrs-stone-panel > .p-6,
  body.ev-staff-core .account-main .osrs-stone-panel,
  body.ev-staff-core .shop-main .osrs-stone-panel,
  body.ev-staff-core .recruitment-main .recruit-card,
  body.ev-staff-core .war-main .osrs-panel {
    padding: 0.9rem !important;
  }
}
