/* FIX-58A original EWM theme
   Purpose: replace copied-looking purple/pink identity with a unique slate/blue/teal palette.
   This file is loaded after app.css and is safe to extend in later cleanup phases.
*/

:root {
  --ewm-primary-dark: #071827;
  --ewm-primary-dark-2: #0B2A3C;
  --ewm-primary: #008BB8;
  --ewm-accent: #0D9488;
  --ewm-warning: #D97706;
  --ewm-danger: #DC2626;
  --ewm-success: #16A34A;
  --ewm-bg: #F8FAFC;
  --ewm-surface: #FFFFFF;
  --ewm-border: #CBD5E1;
  --ewm-text-main: #111827;
  --ewm-text-muted: #64748B;
}

body {
  background: var(--ewm-bg);
  color: var(--ewm-text-main);
}

.btn-primary {
  background: var(--ewm-primary) !important;
  border-color: var(--ewm-primary) !important;
  color: #fff !important;
}

.btn-primary:hover {
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

.ewm-sidebar,
.staff-top,
.staff-bottom,
.g18-topbar,
.g18-bottom-nav {
  background-color: var(--ewm-primary-dark);
}

.alert-info,
.event-master-notice,
#event-uses-venue-master-notice {
  border-color: #BFDBFE;
}

.badge.bg-primary,
.bg-primary {
  background-color: var(--ewm-primary) !important;
}

.text-primary {
  color: var(--ewm-primary) !important;
}

/* FIX-58B neutral naming compatibility */
:root {
  --ewm-highlight: #00A7D8;
  --staff-primary: var(--ewm-primary);
  --staff-accent: var(--ewm-accent);
  --staff-highlight: #00A7D8;

  /* Temporary legacy aliases: keep during template migration. */
  --ewm-pink: var(--ewm-highlight);
  --g18-pink: var(--ewm-highlight);
  --pink: var(--staff-highlight);
}

.btn-primary-action,
.btn-pink,
.task-primary-action,
.task-pink-btn,
.ops-icon-btn.primary,
.ops-icon-btn.pink {
  background: var(--ewm-primary) !important;
  border-color: var(--ewm-primary) !important;
  color: #fff !important;
}

.btn-primary-action:hover,
.btn-pink:hover,
.task-primary-action:hover,
.task-pink-btn:hover,
.ops-icon-btn.primary:hover,
.ops-icon-btn.pink:hover {
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

/* FIX-58C central legacy aliases only.
   These names are retained here temporarily so older pages still render,
   but template files should use neutral names going forward. */
.btn-pink,
.task-pink-btn,
.ops-icon-btn.pink {
  background: var(--ewm-primary) !important;
  border-color: var(--ewm-primary) !important;
  color: #fff !important;
}

.btn-pink:hover,
.task-pink-btn:hover,
.ops-icon-btn.pink:hover {
  background: #1D4ED8 !important;
  border-color: #1D4ED8 !important;
}

/* FIX-67B Provide-style blue/light-blue theme start */
:root {
  --provide-navy: #071827;
  --provide-navy-2: #0B2A3C;
  --provide-cyan: #008BB8;
  --provide-cyan-2: #00A7D8;
  --provide-light-blue: #E8F7FC;
  --provide-soft-blue: #F3FBFE;
  --provide-border: #C9EAF5;

  --ewm-primary-dark: var(--provide-navy);
  --ewm-primary-dark-2: var(--provide-navy-2);
  --ewm-primary: var(--provide-cyan);
  --ewm-highlight: var(--provide-cyan-2);
  --staff-primary: var(--provide-cyan);
  --staff-highlight: var(--provide-cyan-2);
  --bs-primary: var(--provide-cyan);
}

body {
  background:
    radial-gradient(circle at top left, rgba(0, 167, 216, .12), transparent 34rem),
    linear-gradient(180deg, #F7FCFE 0%, #EFF8FC 100%) !important;
  color: #172033 !important;
}

.app-shell,
.ewm-shell {
  background: transparent !important;
}

.app-topbar,
.ewm-topbar,
.topbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--provide-border) !important;
  color: var(--provide-navy) !important;
  box-shadow: 0 10px 30px rgba(7, 24, 39, .06) !important;
}

.app-sidebar,
.ewm-sidebar,
.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #F3FBFE 100%) !important;
  border-right: 1px solid var(--provide-border) !important;
  color: var(--provide-navy) !important;
  box-shadow: 12px 0 30px rgba(7, 24, 39, .06) !important;
}

.app-sidebar a,
.ewm-sidebar a,
.sidebar a {
  color: #13293D !important;
  border-radius: 12px !important;
}

.app-sidebar a:hover,
.ewm-sidebar a:hover,
.sidebar a:hover,
.app-sidebar a.active,
.ewm-sidebar a.active,
.sidebar a.active,
.app-sidebar .active > a,
.ewm-sidebar .active > a,
.sidebar .active > a {
  background: var(--provide-light-blue) !important;
  color: var(--provide-cyan) !important;
}

.btn-primary,
.btn-primary-action,
.btn-pink,
.task-pink-btn,
.task-primary-action,
.ops-icon-btn.primary,
.ops-icon-btn.pink {
  background: var(--provide-cyan) !important;
  border-color: var(--provide-cyan) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(0, 139, 184, .22) !important;
}

.btn-primary:hover,
.btn-primary-action:hover,
.btn-pink:hover,
.task-pink-btn:hover,
.task-primary-action:hover,
.ops-icon-btn.primary:hover,
.ops-icon-btn.pink:hover {
  background: #00779E !important;
  border-color: #00779E !important;
  color: #fff !important;
}

.btn-outline-primary {
  color: var(--provide-cyan) !important;
  border-color: var(--provide-cyan) !important;
}

.btn-outline-primary:hover {
  background: var(--provide-cyan) !important;
  border-color: var(--provide-cyan) !important;
  color: #fff !important;
}

.bg-primary,
.badge.bg-primary,
.text-bg-primary {
  background-color: var(--provide-cyan) !important;
}

.text-primary {
  color: var(--provide-cyan) !important;
}

.border-primary {
  border-color: var(--provide-cyan) !important;
}

.card {
  border: 1px solid rgba(201, 234, 245, .9) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 45px rgba(7, 24, 39, .07) !important;
}

.card-header {
  background: linear-gradient(90deg, #F3FBFE 0%, #E8F7FC 100%) !important;
  border-bottom: 1px solid var(--provide-border) !important;
  color: var(--provide-navy) !important;
  font-weight: 800 !important;
}

.table thead th {
  background: #E8F7FC !important;
  color: #0B2A3C !important;
  border-bottom-color: #B8E3F1 !important;
}

.alert-info {
  background: #E8F7FC !important;
  border-color: #B8E3F1 !important;
  color: #0B2A3C !important;
}

/* Override old purple/pink hero strips without editing every template yet */
[class*="hero"],
[class*="banner"],
[class*="summary-card"].primary,
[class*="summary-card"].pink,
.dash-hero,
.hrdb-hero,
.venue-hero,
.roster-hero,
.event-hero {
  background: linear-gradient(135deg, #071827 0%, #0B2A3C 50%, #008BB8 100%) !important;
}

/* Event pages */
.events-page .card,
.event-page .card,
.allocation-page .card,
.rostering-page .card {
  border-color: var(--provide-border) !important;
}

.events-page h1,
.event-page h1,
.allocation-page h1,
.rostering-page h1 {
  color: var(--provide-navy) !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: var(--provide-cyan) !important;
  box-shadow: 0 0 0 .2rem rgba(0, 139, 184, .16) !important;
}

/* Demo notice bar: keep clean but match client colour */
.demo-notice,
.alert-demo,
[class*="demo"] {
  background: #008BB8 !important;
  color: #fff !important;
}
/* FIX-67B Provide-style blue/light-blue theme end */

/* FIX-67D event theme final start */
.events-page {
  --event-navy: #071827;
  --event-cyan: #008BB8;
  --event-cyan-2: #00A7D8;
  --event-soft: #E8F7FC;
  --event-soft-2: #F3FBFE;
  --event-border: #B8E3F1;
}

.event-page-header {
  background: linear-gradient(135deg, rgba(0,139,184,.12), rgba(0,167,216,.05)), #ffffff;
  border: 1px solid var(--event-border);
  border-left: 6px solid var(--event-cyan);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 18px 45px rgba(7,24,39,.07);
}

.event-eyebrow {
  display: inline-flex;
  color: var(--event-cyan);
  background: var(--event-soft);
  border: 1px solid var(--event-border);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.events-page h1,
.events-page h2,
.events-page h3 {
  color: var(--event-navy);
}

.events-page .card,
.event-form-card,
.qc-card {
  border: 1px solid rgba(184,227,241,.95) !important;
  border-radius: 20px !important;
  box-shadow: 0 18px 45px rgba(7,24,39,.07) !important;
  overflow: hidden;
}

.events-page .card-header,
.qc-card .card-header {
  background: linear-gradient(90deg, #E8F7FC 0%, #F3FBFE 100%) !important;
  color: #071827 !important;
  border-bottom: 1px solid #B8E3F1 !important;
  font-weight: 900 !important;
}

.events-page .table thead th {
  background: #E8F7FC !important;
  color: #071827 !important;
  font-weight: 900 !important;
}

.events-page .table-hover tbody tr:hover {
  background: #F3FBFE !important;
}

.event-quick-create-page .qc-dark,
.event-quick-create-page .btn-primary {
  background: #008BB8 !important;
  border-color: #008BB8 !important;
}

.event-quick-create-page .qc-dark:hover,
.event-quick-create-page .btn-primary:hover {
  background: #00779E !important;
  border-color: #00779E !important;
}

.allocation-event-page .allocation-topbar,
.allocation-shell .allocation-topbar {
  background: linear-gradient(135deg, #071827 0%, #0B2A3C 55%, #008BB8 100%) !important;
  color: #fff !important;
  border-radius: 18px !important;
}

.allocation-event-page .allocation-tool,
.allocation-shell .allocation-tool {
  background: rgba(255,255,255,.12) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  color: #fff !important;
}

.allocation-event-page .allocation-stat,
.allocation-shell .allocation-stat {
  background: #ffffff !important;
  border: 1px solid #B8E3F1 !important;
  border-left: 5px solid #008BB8 !important;
  border-radius: 16px !important;
}

.allocation-event-page .side-header,
.allocation-shell .side-header {
  background: linear-gradient(135deg, #E8F7FC, #F3FBFE) !important;
  border-bottom: 1px solid #B8E3F1 !important;
}

.allocation-event-page .candidate-card,
.allocation-shell .candidate-card {
  border: 1px solid #B8E3F1 !important;
  border-radius: 16px !important;
}

.allocation-event-page .candidate-card:hover,
.allocation-shell .candidate-card:hover {
  background: #F3FBFE !important;
  border-color: #008BB8 !important;
}
/* FIX-67D event theme final end */

/* FIX-68A shell polish start */
:root {
  --shell-navy: #071827;
  --shell-navy-2: #0B2A3C;
  --shell-cyan: #008BB8;
  --shell-cyan-2: #00A7D8;
  --shell-soft: #E8F7FC;
  --shell-soft-2: #F3FBFE;
  --shell-border: #B8E3F1;
  --shell-muted: #64748B;
}

/* Overall shell */
.ewm-shell {
  background:
    radial-gradient(circle at top left, rgba(0,167,216,.13), transparent 34rem),
    linear-gradient(180deg, #F7FCFE 0%, #EFF8FC 100%) !important;
}

/* Sidebar container */
.ewm-sidebar {
  background: linear-gradient(180deg, #FFFFFF 0%, #F3FBFE 100%) !important;
  border-right: 1px solid var(--shell-border) !important;
  box-shadow: 12px 0 32px rgba(7,24,39,.07) !important;
}

/* Brand */
.ewm-brand {
  padding: 18px 16px 16px !important;
  border-bottom: 1px solid rgba(184,227,241,.85) !important;
  background:
    radial-gradient(circle at top right, rgba(0,167,216,.14), transparent 12rem),
    #FFFFFF !important;
}

.ewm-brand-name {
  color: var(--shell-navy) !important;
  font-weight: 950 !important;
  letter-spacing: .04em !important;
}

.ewm-brand small {
  color: var(--shell-muted) !important;
  font-weight: 700 !important;
}

/* Topbar */
.ewm-topbar {
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid var(--shell-border) !important;
  box-shadow: 0 12px 30px rgba(7,24,39,.06) !important;
  backdrop-filter: blur(10px);
}

.ewm-topbar strong,
.ewm-topbar .fw-bold,
.ewm-topbar .brand,
.ewm-topbar-title {
  color: var(--shell-navy) !important;
}

/* Menu groups */
.ewm-menu-group {
  margin-bottom: 10px !important;
}

.ewm-menu-section,
.ewm-menu-label {
  color: #0B2A3C !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

/* Main links */
.ewm-menu-link,
.ewm-nav-link,
.ewm-submenu a,
.ewm-menu-toggle {
  color: #13293D !important;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease !important;
}

.ewm-menu-link:hover,
.ewm-nav-link:hover,
.ewm-submenu a:hover,
.ewm-menu-toggle:hover {
  background: #E8F7FC !important;
  border-color: #B8E3F1 !important;
  color: var(--shell-cyan) !important;
  transform: translateX(2px);
}

/* Active states */
.ewm-menu-link.active,
.ewm-nav-link.active,
.ewm-submenu a.active,
.ewm-menu-toggle.active,
.ewm-sidebar a.active,
.ewm-sidebar .active > a {
  background: linear-gradient(135deg, #E8F7FC 0%, #F3FBFE 100%) !important;
  border: 1px solid #B8E3F1 !important;
  border-left: 5px solid var(--shell-cyan) !important;
  color: var(--shell-cyan) !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 22px rgba(0,139,184,.10) !important;
}

/* Icons/badges inside menu */
.ewm-menu-link .icon,
.ewm-nav-link .icon,
.ewm-menu-link span:first-child,
.ewm-nav-link span:first-child {
  color: inherit !important;
}

/* Quick links */
.ewm-nav-link[href*="quick-create"],
a[href="/events/quick-create"] {
  background: linear-gradient(135deg, #008BB8 0%, #00A7D8 100%) !important;
  border-color: #008BB8 !important;
  color: #FFFFFF !important;
  font-weight: 900 !important;
  box-shadow: 0 12px 26px rgba(0,139,184,.22) !important;
}

.ewm-nav-link[href*="quick-create"]:hover,
a[href="/events/quick-create"]:hover {
  background: linear-gradient(135deg, #00779E 0%, #008BB8 100%) !important;
  color: #FFFFFF !important;
}

/* Buttons in shell */
.ewm-top-btn,
.ewm-sidebar-toggle,
.ewm-sidebar-close {
  border: 1px solid #B8E3F1 !important;
  background: #FFFFFF !important;
  color: #0B2A3C !important;
  border-radius: 12px !important;
}

.ewm-top-btn:hover,
.ewm-sidebar-toggle:hover,
.ewm-sidebar-close:hover {
  background: #E8F7FC !important;
  color: #008BB8 !important;
}

/* Content spacing */
.ewm-main {
  background: transparent !important;
}

.ewm-content,
main.ewm-content {
  padding-top: 18px !important;
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
  .ewm-sidebar {
    border-radius: 0 22px 22px 0 !important;
  }

  body.sidebar-open::before {
    background: rgba(7,24,39,.36) !important;
    backdrop-filter: blur(2px);
  }
}

/* Keep old alias classes blue instead of pink */
.btn-pink,
.task-pink-btn,
.ops-icon-btn.pink {
  background: #008BB8 !important;
  border-color: #008BB8 !important;
  color: #FFFFFF !important;
}

.btn-pink:hover,
.task-pink-btn:hover,
.ops-icon-btn.pink:hover {
  background: #00779E !important;
  border-color: #00779E !important;
}
/* FIX-68A shell polish end */

/* FIX-68A-R4 sidebar font consistency start */
.ewm-sidebar,
.ewm-sidebar nav,
.ewm-sidebar a,
.ewm-sidebar summary,
.ewm-menu-link,
.ewm-nav-link,
.ewm-menu-toggle,
.ewm-submenu a {
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  letter-spacing: .005em !important;
}

.ewm-menu-link,
.ewm-nav-link,
.ewm-menu-toggle {
  font-weight: 760 !important;
}

.ewm-submenu a,
.ewm-sidebar details a,
.ewm-sidebar .nav-link {
  font-weight: 720 !important;
}

.ewm-menu-link span:last-child,
.ewm-nav-link span:last-child,
.ewm-menu-toggle span:last-child {
  font-weight: inherit !important;
}

.ewm-menu-link.active,
.ewm-nav-link.active,
.ewm-menu-toggle.active,
.ewm-submenu a.active,
.ewm-sidebar details a.active,
.ewm-sidebar .nav-link.active {
  font-weight: 880 !important;
}

.ewm-sidebar .ewm-menu-section,
.ewm-sidebar .ewm-menu-label,
.ewm-sidebar .small,
.ewm-sidebar small {
  font-weight: 850 !important;
  letter-spacing: .075em !important;
}

.ewm-brand-name {
  font-weight: 950 !important;
  letter-spacing: .035em !important;
}

.ewm-brand small {
  font-weight: 700 !important;
  letter-spacing: .01em !important;
}
/* FIX-68A-R4 sidebar font consistency end */

/* FIX-68B-1 venue/site visual polish start */
body:has(a[href="/venues/"]),
body:has(a[href*="/venues/"]) {
  --venue-navy: #071827;
  --venue-deep: #0B2A3C;
  --venue-blue: #008BB8;
  --venue-sky: #00A7D8;
  --venue-soft: #EEF8FC;
  --venue-border: rgba(11, 42, 60, .12);
}

/* Page heading area */
body:has(a[href="/venues/"]) h1,
body:has(a[href*="/venues/"]) h1,
body:has(a[href="/venues/"]) .h1,
body:has(a[href*="/venues/"]) .h1,
body:has(a[href="/venues/"]) .h3,
body:has(a[href*="/venues/"]) .h3,
body:has(a[href="/venues/"]) .h4,
body:has(a[href*="/venues/"]) .h4 {
  color: var(--venue-navy) !important;
  font-weight: 900 !important;
  letter-spacing: -.025em !important;
}

/* Venue cards */
body:has(a[href="/venues/"]) .card,
body:has(a[href*="/venues/"]) .card,
body:has(a[href="/venues/"]) .settings-card,
body:has(a[href*="/venues/"]) .settings-card,
body:has(a[href="/venues/"]) .g47-attendance-card,
body:has(a[href*="/venues/"]) .g47-attendance-card {
  border: 1px solid var(--venue-border) !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 36px rgba(7, 24, 39, .08) !important;
  overflow: hidden !important;
  background: #fff !important;
}

/* Card headers */
body:has(a[href="/venues/"]) .card-header,
body:has(a[href*="/venues/"]) .card-header,
body:has(a[href="/venues/"]) .settings-card-header,
body:has(a[href*="/venues/"]) .settings-card-header,
body:has(a[href="/venues/"]) .g47-card-title,
body:has(a[href*="/venues/"]) .g47-card-title {
  background: linear-gradient(135deg, rgba(0, 139, 184, .12), rgba(0, 167, 216, .06)) !important;
  color: var(--venue-navy) !important;
  border-bottom: 1px solid var(--venue-border) !important;
  font-weight: 900 !important;
  letter-spacing: -.01em !important;
}

/* Tables */
body:has(a[href="/venues/"]) table,
body:has(a[href*="/venues/"]) table {
  border-radius: 14px !important;
  overflow: hidden !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body:has(a[href="/venues/"]) thead th,
body:has(a[href*="/venues/"]) thead th,
body:has(a[href="/venues/"]) .table thead th,
body:has(a[href*="/venues/"]) .table thead th {
  background: #F2FAFD !important;
  color: var(--venue-deep) !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  font-weight: 900 !important;
  border-bottom: 1px solid var(--venue-border) !important;
}

body:has(a[href="/venues/"]) tbody td,
body:has(a[href*="/venues/"]) tbody td {
  vertical-align: middle !important;
  color: #20313f !important;
}

/* Buttons */
body:has(a[href="/venues/"]) .btn,
body:has(a[href*="/venues/"]) .btn {
  border-radius: 999px !important;
  font-weight: 800 !important;
  letter-spacing: .005em !important;
}

body:has(a[href="/venues/"]) .btn-primary,
body:has(a[href*="/venues/"]) .btn-primary,
body:has(a[href="/venues/"]) .btn-success,
body:has(a[href*="/venues/"]) .btn-success {
  background: linear-gradient(135deg, var(--venue-blue), var(--venue-sky)) !important;
  border-color: transparent !important;
  box-shadow: 0 10px 24px rgba(0, 139, 184, .22) !important;
}

body:has(a[href="/venues/"]) .btn-outline-primary,
body:has(a[href*="/venues/"]) .btn-outline-primary {
  border-color: rgba(0, 139, 184, .45) !important;
  color: var(--venue-blue) !important;
}

body:has(a[href="/venues/"]) .btn-outline-primary:hover,
body:has(a[href*="/venues/"]) .btn-outline-primary:hover {
  background: var(--venue-blue) !important;
  color: #fff !important;
}

/* Tabs / nav pills used on site detail */
body:has(a[href="/venues/"]) .nav-tabs,
body:has(a[href*="/venues/"]) .nav-tabs {
  border-bottom: 1px solid var(--venue-border) !important;
  gap: 6px !important;
}

body:has(a[href="/venues/"]) .nav-tabs .nav-link,
body:has(a[href*="/venues/"]) .nav-tabs .nav-link,
body:has(a[href="/venues/"]) .nav-pills .nav-link,
body:has(a[href*="/venues/"]) .nav-pills .nav-link {
  border-radius: 999px !important;
  font-weight: 850 !important;
  color: var(--venue-deep) !important;
  border: 1px solid transparent !important;
}

body:has(a[href="/venues/"]) .nav-tabs .nav-link.active,
body:has(a[href*="/venues/"]) .nav-tabs .nav-link.active,
body:has(a[href="/venues/"]) .nav-pills .nav-link.active,
body:has(a[href*="/venues/"]) .nav-pills .nav-link.active {
  background: linear-gradient(135deg, var(--venue-blue), var(--venue-sky)) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Forms */
body:has(a[href="/venues/"]) .form-label,
body:has(a[href*="/venues/"]) .form-label,
body:has(a[href="/venues/"]) label,
body:has(a[href*="/venues/"]) label {
  color: var(--venue-deep) !important;
  font-weight: 800 !important;
}

body:has(a[href="/venues/"]) .form-control,
body:has(a[href*="/venues/"]) .form-control,
body:has(a[href="/venues/"]) .form-select,
body:has(a[href*="/venues/"]) .form-select {
  border-radius: 12px !important;
  border-color: rgba(11, 42, 60, .18) !important;
}

body:has(a[href="/venues/"]) .form-control:focus,
body:has(a[href*="/venues/"]) .form-control:focus,
body:has(a[href="/venues/"]) .form-select:focus,
body:has(a[href*="/venues/"]) .form-select:focus {
  border-color: var(--venue-sky) !important;
  box-shadow: 0 0 0 .2rem rgba(0, 167, 216, .16) !important;
}

/* Badges and small meta */
body:has(a[href="/venues/"]) .badge,
body:has(a[href*="/venues/"]) .badge {
  border-radius: 999px !important;
  font-weight: 850 !important;
  letter-spacing: .02em !important;
}

body:has(a[href="/venues/"]) .text-muted,
body:has(a[href*="/venues/"]) .text-muted {
  color: #5d7080 !important;
}

/* Venue detail heavy page spacing */
body:has(a[href*="/venues/"]) .container-fluid,
body:has(a[href*="/venues/"]) .container {
  max-width: none !important;
}

body:has(a[href*="/venues/"]) .tab-content {
  padding-top: 14px !important;
}

body:has(a[href*="/venues/"]) .alert-info,
body:has(a[href*="/venues/"]) .alert-primary {
  border-radius: 16px !important;
  border: 1px solid rgba(0, 139, 184, .18) !important;
  background: linear-gradient(135deg, #F1FAFD, #FFFFFF) !important;
  color: var(--venue-deep) !important;
}

/* Print QR card */
body:has(code) img[alt="Attendance QR"] {
  border-radius: 18px !important;
  border: 10px solid #fff !important;
  box-shadow: 0 18px 45px rgba(7, 24, 39, .16) !important;
}

/* FIX-68B-1 venue/site visual polish end */

/* FIX-68B-1A softer venue highlights start */

/* Softer active tabs / pills */
body:has(a[href="/venues/"]) .nav-tabs .nav-link.active,
body:has(a[href*="/venues/"]) .nav-tabs .nav-link.active,
body:has(a[href="/venues/"]) .nav-pills .nav-link.active,
body:has(a[href*="/venues/"]) .nav-pills .nav-link.active {
  background: linear-gradient(135deg, #EAF8FD, #F7FCFE) !important;
  color: #0B2A3C !important;
  border: 1px solid rgba(0, 139, 184, .28) !important;
  box-shadow: 0 8px 18px rgba(0, 139, 184, .10) !important;
}

/* Softer primary action buttons on venue pages */
body:has(a[href="/venues/"]) .btn-primary,
body:has(a[href*="/venues/"]) .btn-primary,
body:has(a[href="/venues/"]) .btn-success,
body:has(a[href*="/venues/"]) .btn-success {
  background: linear-gradient(135deg, #008BB8, #28B7DE) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(0, 139, 184, .16) !important;
}

/* Softer card header highlight */
body:has(a[href="/venues/"]) .card-header,
body:has(a[href*="/venues/"]) .card-header,
body:has(a[href="/venues/"]) .settings-card-header,
body:has(a[href*="/venues/"]) .settings-card-header,
body:has(a[href="/venues/"]) .g47-card-title,
body:has(a[href*="/venues/"]) .g47-card-title {
  background: linear-gradient(135deg, #F4FBFE, #FFFFFF) !important;
  color: #071827 !important;
  border-bottom: 1px solid rgba(11, 42, 60, .10) !important;
}

/* Softer table heading */
body:has(a[href="/venues/"]) thead th,
body:has(a[href*="/venues/"]) thead th,
body:has(a[href="/venues/"]) .table thead th,
body:has(a[href*="/venues/"]) .table thead th {
  background: #F7FCFE !important;
  color: #0B2A3C !important;
}

/* Non-active tabs should be calm and readable */
body:has(a[href="/venues/"]) .nav-tabs .nav-link,
body:has(a[href*="/venues/"]) .nav-tabs .nav-link,
body:has(a[href="/venues/"]) .nav-pills .nav-link,
body:has(a[href*="/venues/"]) .nav-pills .nav-link {
  background: #FFFFFF !important;
  color: #344B5A !important;
  border: 1px solid rgba(11, 42, 60, .10) !important;
}

body:has(a[href="/venues/"]) .nav-tabs .nav-link:hover,
body:has(a[href*="/venues/"]) .nav-tabs .nav-link:hover,
body:has(a[href="/venues/"]) .nav-pills .nav-link:hover,
body:has(a[href*="/venues/"]) .nav-pills .nav-link:hover {
  background: #F2FAFD !important;
  color: #0B2A3C !important;
  border-color: rgba(0, 139, 184, .22) !important;
}

/* FIX-68B-1A softer venue highlights end */

/* FIX-68B-1B formal C247-style venue start */

/*
  Formal C247-style tuning:
  - restrained corporate blue
  - no flashy active fills
  - flatter buttons
  - white/light-grey card headers
*/

body:has(a[href="/venues/"]),
body:has(a[href*="/venues/"]) {
  --venue-formal-navy: #102A43;
  --venue-formal-text: #243B53;
  --venue-formal-muted: #6B7C93;
  --venue-formal-line: #D9E2EC;
  --venue-formal-soft: #F7FAFC;
  --venue-formal-blue: #1B75BB;
  --venue-formal-blue-dark: #155E95;
}

/* Formal cards: less shadow, less rounded, more corporate */
body:has(a[href="/venues/"]) .card,
body:has(a[href*="/venues/"]) .card,
body:has(a[href="/venues/"]) .settings-card,
body:has(a[href*="/venues/"]) .settings-card,
body:has(a[href="/venues/"]) .g47-attendance-card,
body:has(a[href*="/venues/"]) .g47-attendance-card {
  border: 1px solid var(--venue-formal-line) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(16, 42, 67, .06) !important;
  background: #fff !important;
}

/* Formal headers: mostly white/grey, no blue glow */
body:has(a[href="/venues/"]) .card-header,
body:has(a[href*="/venues/"]) .card-header,
body:has(a[href="/venues/"]) .settings-card-header,
body:has(a[href*="/venues/"]) .settings-card-header,
body:has(a[href="/venues/"]) .g47-card-title,
body:has(a[href*="/venues/"]) .g47-card-title {
  background: #F7FAFC !important;
  color: var(--venue-formal-navy) !important;
  border-bottom: 1px solid var(--venue-formal-line) !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

/* Page titles */
body:has(a[href="/venues/"]) h1,
body:has(a[href*="/venues/"]) h1,
body:has(a[href="/venues/"]) .h1,
body:has(a[href*="/venues/"]) .h1,
body:has(a[href="/venues/"]) .h3,
body:has(a[href*="/venues/"]) .h3,
body:has(a[href="/venues/"]) .h4,
body:has(a[href*="/venues/"]) .h4 {
  color: var(--venue-formal-navy) !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

/* Formal buttons: same shape/style across venue pages */
body:has(a[href="/venues/"]) .btn,
body:has(a[href*="/venues/"]) .btn {
  border-radius: 6px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  padding-left: .85rem !important;
  padding-right: .85rem !important;
}

/* Primary buttons: flat corporate blue, not gradient */
body:has(a[href="/venues/"]) .btn-primary,
body:has(a[href*="/venues/"]) .btn-primary,
body:has(a[href="/venues/"]) .btn-success,
body:has(a[href*="/venues/"]) .btn-success {
  background: var(--venue-formal-blue) !important;
  border-color: var(--venue-formal-blue) !important;
  color: #fff !important;
  box-shadow: none !important;
}

body:has(a[href="/venues/"]) .btn-primary:hover,
body:has(a[href*="/venues/"]) .btn-primary:hover,
body:has(a[href="/venues/"]) .btn-success:hover,
body:has(a[href*="/venues/"]) .btn-success:hover {
  background: var(--venue-formal-blue-dark) !important;
  border-color: var(--venue-formal-blue-dark) !important;
  color: #fff !important;
}

/* Outline buttons: plain and formal */
body:has(a[href="/venues/"]) .btn-outline-primary,
body:has(a[href*="/venues/"]) .btn-outline-primary {
  background: #fff !important;
  border-color: var(--venue-formal-blue) !important;
  color: var(--venue-formal-blue) !important;
}

body:has(a[href="/venues/"]) .btn-outline-primary:hover,
body:has(a[href*="/venues/"]) .btn-outline-primary:hover {
  background: var(--venue-formal-blue) !important;
  border-color: var(--venue-formal-blue) !important;
  color: #fff !important;
}

body:has(a[href="/venues/"]) .btn-outline-secondary,
body:has(a[href*="/venues/"]) .btn-outline-secondary {
  background: #fff !important;
  border-color: #BCCCDC !important;
  color: var(--venue-formal-text) !important;
}

body:has(a[href="/venues/"]) .btn-outline-secondary:hover,
body:has(a[href*="/venues/"]) .btn-outline-secondary:hover {
  background: #F0F4F8 !important;
  color: var(--venue-formal-navy) !important;
}

/* Active tabs: no filled blue; formal underline / border */
body:has(a[href="/venues/"]) .nav-tabs,
body:has(a[href*="/venues/"]) .nav-tabs {
  border-bottom: 1px solid var(--venue-formal-line) !important;
  gap: 0 !important;
}

body:has(a[href="/venues/"]) .nav-tabs .nav-link,
body:has(a[href*="/venues/"]) .nav-tabs .nav-link,
body:has(a[href="/venues/"]) .nav-pills .nav-link,
body:has(a[href*="/venues/"]) .nav-pills .nav-link {
  background: transparent !important;
  color: var(--venue-formal-text) !important;
  border: 1px solid transparent !important;
  border-radius: 6px 6px 0 0 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

body:has(a[href="/venues/"]) .nav-tabs .nav-link:hover,
body:has(a[href*="/venues/"]) .nav-tabs .nav-link:hover,
body:has(a[href="/venues/"]) .nav-pills .nav-link:hover,
body:has(a[href*="/venues/"]) .nav-pills .nav-link:hover {
  background: #F7FAFC !important;
  color: var(--venue-formal-navy) !important;
  border-color: #E6EEF5 !important;
}

/* This is the key: active tab is white, blue top/bottom signal only */
body:has(a[href="/venues/"]) .nav-tabs .nav-link.active,
body:has(a[href*="/venues/"]) .nav-tabs .nav-link.active,
body:has(a[href="/venues/"]) .nav-pills .nav-link.active,
body:has(a[href*="/venues/"]) .nav-pills .nav-link.active {
  background: #FFFFFF !important;
  color: var(--venue-formal-blue-dark) !important;
  border-color: var(--venue-formal-line) var(--venue-formal-line) #FFFFFF !important;
  border-top: 3px solid var(--venue-formal-blue) !important;
  box-shadow: none !important;
}

/* Tables: formal grey header */
body:has(a[href="/venues/"]) thead th,
body:has(a[href*="/venues/"]) thead th,
body:has(a[href="/venues/"]) .table thead th,
body:has(a[href*="/venues/"]) .table thead th {
  background: #F0F4F8 !important;
  color: var(--venue-formal-navy) !important;
  border-bottom: 1px solid var(--venue-formal-line) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .025em !important;
}

/* Forms */
body:has(a[href="/venues/"]) .form-control,
body:has(a[href*="/venues/"]) .form-control,
body:has(a[href="/venues/"]) .form-select,
body:has(a[href*="/venues/"]) .form-select {
  border-radius: 6px !important;
  border-color: #BCCCDC !important;
}

body:has(a[href="/venues/"]) .form-control:focus,
body:has(a[href*="/venues/"]) .form-control:focus,
body:has(a[href="/venues/"]) .form-select:focus,
body:has(a[href*="/venues/"]) .form-select:focus {
  border-color: var(--venue-formal-blue) !important;
  box-shadow: 0 0 0 .15rem rgba(27, 117, 187, .15) !important;
}

/* Muted text */
body:has(a[href="/venues/"]) .text-muted,
body:has(a[href*="/venues/"]) .text-muted {
  color: var(--venue-formal-muted) !important;
}

/* Alerts: formal info panel */
body:has(a[href*="/venues/"]) .alert-info,
body:has(a[href*="/venues/"]) .alert-primary {
  background: #F7FAFC !important;
  border: 1px solid var(--venue-formal-line) !important;
  color: var(--venue-formal-text) !important;
  border-radius: 8px !important;
}

/* FIX-68B-1B formal C247-style venue end */
