/*
 * Cactus Jack's Backstage Booking
 * Cinematic Modern Western Hospitality design system — v6.7.0
 * Loaded after app.css so functionality stays untouched while the full UI adopts
 * the shared Cactus Jack's visual language.
 */

:root {
  --deep-ink: #0B0907;
  --warm-charcoal: #201A14;
  --dark-saddle: #17110D;
  --warm-cream: #F0E8D7;
  --soft-ivory: #F4EEE4;
  --cj-orange: #F28B24;
  --burnt-rust: #85341E;
  --light-amber: #FFC476;
  --white: #FFFFFF;

  --orange: var(--cj-orange);
  --orange-2: #D96E16;
  --orange-soft: #FBE3CC;
  --brown: var(--warm-charcoal);
  --brown-2: var(--dark-saddle);
  --ink: var(--deep-ink);
  --cream: var(--warm-cream);
  --paper: var(--soft-ivory);
  --muted: #6F655B;
  --line: #D8CCBC;
  --green: #286447;
  --green-soft: #E7F2EA;
  --red: #9A3428;
  --red-soft: #F7E6E2;
  --blue: #315C70;
  --blue-soft: #E6EFF2;
  --yellow: #8A6418;
  --yellow-soft: #F7EDCF;
  --shadow: 0 20px 52px rgba(11, 9, 7, .13);
  --shadow-sm: 0 8px 24px rgba(11, 9, 7, .08);
  --radius: 10px;
  --radius-sm: 6px;
  --font-display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font-condensed: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-cinematic: cubic-bezier(.2, .75, .25, 1);
}

html {
  background: var(--deep-ink);
  color-scheme: light;
  scroll-padding-top: 88px;
}

body {
  background: var(--soft-ivory);
  color: var(--deep-ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(242, 139, 36, .28); color: var(--deep-ink); }

h1, h2, .hero-command h2, .application-intro h1, .form-topline h2,
.portal-show h1, .legal-shell h1, .public-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .025em;
  line-height: .98;
}

h3, h4, h5, h6, .btn, .icon-btn, .nav-btn, .status, .chip, th,
.field > label, .field legend, .eyebrow, .form-kicker, .intro-kicker,
.stat-label, .progress-copy, .progress-step-list, .agenda-date,
.public-calendar-link, .manager-signin-link, .text-button {
  font-family: var(--font-condensed);
}

h2, h3, h4 { color: var(--deep-ink); }

p { text-wrap: pretty; }

/* Focus, interaction, loading, success, and disabled states */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(242, 139, 36, .5);
  outline-offset: 3px;
}

.btn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 17px;
  background: #E7DDD0;
  color: var(--deep-ink);
  box-shadow: none;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .075em;
  line-height: 1;
  text-transform: uppercase;
  transition: transform 210ms var(--ease-cinematic), box-shadow 210ms var(--ease-cinematic),
              background-color 210ms ease, border-color 210ms ease, color 210ms ease, opacity 210ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: none;
  box-shadow: 0 10px 24px rgba(11, 9, 7, .14);
}

.btn:active:not(:disabled) { transform: translateY(0) scale(.985); box-shadow: none; }

.btn-primary {
  background: var(--cj-orange);
  color: var(--deep-ink);
  border-color: var(--cj-orange);
  box-shadow: 0 8px 20px rgba(242, 139, 36, .22);
}
.btn-primary:hover:not(:disabled) { background: #FF9A32; border-color: #FF9A32; }

.btn-dark {
  background: var(--deep-ink);
  color: var(--warm-cream);
  border-color: #3A3028;
}
.btn-dark:hover:not(:disabled) { background: var(--warm-charcoal); }

.btn-outline {
  background: transparent;
  color: #3B3028;
  border-color: #9E8F80;
}
.btn-outline:hover:not(:disabled) { background: var(--warm-cream); border-color: #6F5E50; }

.btn-light { background: var(--white); color: var(--deep-ink); border-color: #D9CCBC; }
.btn-success { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-danger { background: var(--burnt-rust); color: var(--white); border-color: var(--burnt-rust); }
.btn-sm { min-height: 36px; padding: 8px 12px; border-radius: 5px; font-size: .78rem; }
.btn-xs { min-height: 30px; padding: 6px 9px; border-radius: 4px; font-size: .7rem; }
.btn-lg { min-height: 50px; padding: 14px 22px; font-size: .98rem; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .43; cursor: not-allowed; box-shadow: none; transform: none; }
.btn[aria-busy='true'], .btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn[aria-busy='true']::after, .btn.is-loading::after {
  content: '';
  position: absolute;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  color: var(--deep-ink);
  animation: cjSpin .65s linear infinite;
}
.btn.is-success { background: var(--green); border-color: var(--green); color: var(--white); }

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #D0C3B4;
  border-radius: var(--radius-sm);
  background: #E9DFD2;
  color: var(--deep-ink);
  transition: transform 200ms var(--ease-cinematic), background-color 200ms ease, border-color 200ms ease;
}
.icon-btn:hover { background: var(--warm-cream); border-color: #9C8B7B; transform: translateY(-1px); }
.icon-btn:active { transform: scale(.97); }

/* Brand system */
.brand { gap: 13px; }
.brand img, .brand-mark {
  border: 1px solid rgba(255, 196, 118, .48);
  border-radius: 50%;
  background: var(--deep-ink);
  box-shadow: 0 0 0 3px rgba(242, 139, 36, .13);
}
.brand-copy strong, .public-brand-copy strong {
  font-family: var(--font-condensed);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.brand-copy span, .public-brand-copy small {
  font-family: var(--font-condensed);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* Shared surfaces */
.card {
  background: var(--soft-ivory);
  border: 1px solid #D8CCBC;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-title { gap: 18px; margin-bottom: 17px; }
.card-title h2 { font-size: 1.85rem; }
.card-title h3 { font-size: 1.32rem; font-weight: 800; letter-spacing: .02em; }
.card-title p { color: var(--muted); font-size: .84rem; }

.field { gap: 7px; }
.field label, .field legend {
  color: #4D4036;
  font-size: .79rem;
  font-weight: 800;
  letter-spacing: .065em;
  text-transform: uppercase;
}
.field input, .field select, .field textarea {
  min-height: 46px;
  border: 1px solid #BDAE9D;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--deep-ink);
  padding: 11px 13px;
  box-shadow: inset 0 1px 0 rgba(11, 9, 7, .025);
  transition: border-color 190ms ease, box-shadow 190ms ease, background-color 190ms ease;
}
.field textarea { min-height: 104px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #8F7D6C; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cj-orange);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(242, 139, 36, .16);
}
.field input:disabled, .field select:disabled, .field textarea:disabled,
.read-only-value { background: #EAE1D5; color: #6D6258; border-color: #D2C6B8; }
.field-hint, .field-help { color: var(--muted); line-height: 1.45; }
.required::after { color: var(--burnt-rust); }

.check-row input[type='checkbox'], .check-row input[type='radio'] {
  width: 18px;
  height: 18px;
  accent-color: var(--cj-orange);
}

.chip, .status {
  min-height: 25px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.status.orange { background: #FBE3CC; color: #8A430B; border-color: #EFC191; }
.status.dark { background: var(--warm-charcoal); color: var(--warm-cream); border-color: #45382E; }
.status.green { background: var(--green-soft); color: #1F5A3D; border-color: #AED0BA; }
.status.red { background: var(--red-soft); color: #7E271F; border-color: #E1ADA5; }
.status.blue { background: var(--blue-soft); color: #274D60; border-color: #B8CFD9; }
.status.yellow { background: var(--yellow-soft); color: #765313; border-color: #D9C68E; }

.divider { background: #D8CCBC; }
.empty { color: var(--muted); }
.skeleton { background: linear-gradient(90deg, #E7DED2 20%, #F4EEE4 40%, #E7DED2 60%); }

.alert {
  border-radius: 7px;
  border-width: 1px;
  box-shadow: none;
}
.alert-success { background: var(--green-soft); border-color: #A7CCB5; color: #214F37; }
.alert-danger { background: var(--red-soft); border-color: #E0ABA2; color: #75251E; }
.alert-warning { background: var(--yellow-soft); border-color: #D7C286; color: #6F5014; }
.alert-info { background: var(--blue-soft); border-color: #B5CED9; color: #294E61; }

/* Management shell */
body.admin-page, body:has(.app-shell) { background: var(--soft-ivory); }
.app-shell { grid-template-columns: 276px minmax(0, 1fr); background: var(--soft-ivory); }
.sidebar {
  width: 276px;
  background:
    radial-gradient(circle at 18% 4%, rgba(242, 139, 36, .12), transparent 25%),
    linear-gradient(180deg, var(--deep-ink) 0%, var(--dark-saddle) 100%);
  color: var(--warm-cream);
  padding: 18px 14px 16px;
  border-right: 1px solid rgba(255, 196, 118, .13);
  box-shadow: 10px 0 28px rgba(11, 9, 7, .08);
}
.sidebar .brand { min-height: 76px; padding: 5px 8px 18px; border-bottom-color: rgba(240, 232, 215, .13); }
.sidebar .brand img { width: 52px; height: 52px; }
.sidebar .brand-copy strong { color: var(--white); font-size: .88rem; }
.sidebar .brand-copy span { color: var(--light-amber); font-size: .67rem; }

.mobile-nav-close {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(240, 232, 215, .23);
  border-radius: 6px;
  background: var(--warm-charcoal);
  color: var(--warm-cream);
  font-size: 1.25rem;
}

.nav { gap: 5px; margin-top: 17px; }
.nav-btn {
  min-height: 43px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 12px;
  background: transparent;
  color: #D8CFC3;
  font-size: .91rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
  transition: background-color 190ms ease, border-color 190ms ease, color 190ms ease, transform 190ms var(--ease-cinematic);
}
.nav-btn > span:first-child { width: 21px; color: var(--light-amber); text-align: center; }
.nav-btn:hover { background: rgba(240, 232, 215, .07); border-color: rgba(240, 232, 215, .08); color: var(--white); transform: translateX(2px); }
.nav-btn.active {
  background: var(--warm-charcoal);
  border-color: rgba(242, 139, 36, .32);
  color: var(--white);
  box-shadow: inset 3px 0 0 var(--cj-orange);
}
.nav-btn.active > span:first-child { color: var(--cj-orange); }
.nav-btn .badge { background: var(--cj-orange); color: var(--deep-ink); }
.sidebar-foot { color: #AFA397; border-top: 1px solid rgba(240, 232, 215, .1); }
.sidebar-foot p { line-height: 1.45; }

.main { grid-column: 2; background: var(--soft-ivory); }
.topbar {
  height: 78px;
  background: rgba(11, 9, 7, .98);
  color: var(--warm-cream);
  border-bottom: 1px solid rgba(255, 196, 118, .2);
  box-shadow: 0 8px 22px rgba(11, 9, 7, .12);
  backdrop-filter: blur(14px);
  padding: 0 26px;
}
.topbar h1 { color: var(--white); font-family: var(--font-condensed); font-size: 1.35rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.topbar .subtitle { color: #BFB2A4; }
.topbar .icon-btn { background: var(--warm-charcoal); border-color: #3B3028; color: var(--warm-cream); }
.topbar .icon-btn:hover { background: #2C241E; border-color: rgba(242, 139, 36, .55); }
.topbar .current-user span { color: var(--white); }
.topbar .current-user small { color: #BAADA0; }
.topbar-actions .btn-primary { box-shadow: none; }

.content { max-width: 1660px; padding: 28px clamp(18px, 2.3vw, 34px) 56px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(2.3rem, 4vw, 3.25rem); text-transform: uppercase; }
.page-head p { max-width: 760px; }

.hero-command {
  min-height: 158px;
  padding: 29px 31px;
  border: 1px solid rgba(255, 196, 118, .18);
  border-radius: 10px;
  background:
    radial-gradient(circle at 78% 16%, rgba(242, 139, 36, .19), transparent 28%),
    linear-gradient(120deg, var(--deep-ink) 0%, var(--warm-charcoal) 66%, #321E13 100%);
  box-shadow: 0 18px 42px rgba(11, 9, 7, .16);
}
.hero-command::after {
  content: '';
  right: 31px;
  top: 30px;
  width: 124px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cj-orange));
  opacity: .75;
}
.hero-command h2 { color: var(--white); font-size: clamp(2.15rem, 3.5vw, 3.35rem); letter-spacing: .035em; }
.hero-command p { color: #D1C5B8; font-size: .92rem; }

.stat-grid { gap: 13px; }
.stat {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 19px;
  background: var(--white);
  border-radius: 8px;
}
.stat::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--cj-orange); }
.stat-value { color: var(--deep-ink); font-family: var(--font-condensed); font-size: 2.25rem; font-weight: 800; line-height: .95; }
.stat-label { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.stat-icon { width: 40px; height: 40px; border-radius: 6px; background: #FBE3CC; color: #7D3C0A; }

.priority-item, .workflow-card, .new-application-item, .selection-item,
.automation-card, .portal-task, .reservation-table-card, .reservation-manager-row,
.reservation-mini-row, .document-card, .decision-option {
  border-radius: 7px;
}
.priority-item { background: var(--white); padding: 13px; }
.priority-icon { border-radius: 6px; background: #FBE3CC; color: #7D3C0A; }
.priority-item.urgent { border-color: #D6A097; background: #FFF9F7; }
.priority-title, .workflow-band, .agenda-band, .band-name { color: var(--deep-ink); }

.workflow-card { background: var(--white); }
.workflow-head { border-bottom-color: #DED3C5; }
.workflow-steps { scrollbar-color: #9E8A77 #E8DED1; }
.step-dot { border-radius: 50%; }
.step.current .step-dot { background: var(--cj-orange); color: var(--deep-ink); }
.next-action strong { color: #7C3B09; }

/* Tables */
.table-wrap {
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
table { background: var(--white); }
th, td { padding: 13px 14px; border-bottom-color: #E1D7CA; }
th {
  z-index: 2;
  background: var(--warm-charcoal);
  color: var(--warm-cream);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
tr.clickable:hover td { background: #FFF7EE; }
.avatar { border-radius: 6px; }

/* Calendar */
.calendar { background: var(--white); border-radius: 8px; }
.calendar-toolbar { background: var(--soft-ivory); }
.cal-day-name { background: var(--warm-charcoal); color: var(--warm-cream); font-family: var(--font-condensed); letter-spacing: .07em; text-transform: uppercase; }
.cal-cell { background: var(--white); }
.cal-cell.out { background: #ECE4D9; color: #9A8F84; }
.cal-event {
  border-left-color: var(--cj-orange);
  border-radius: 5px;
  background: var(--dark-saddle);
  color: var(--warm-cream);
  box-shadow: 0 4px 10px rgba(11, 9, 7, .11);
  transition: transform 190ms var(--ease-cinematic), background-color 190ms ease;
}
.cal-event:hover { filter: none; background: var(--warm-charcoal); transform: translateY(-1px); }
.cal-event strong { color: var(--light-amber); }
button.cal-event { display: block; width: 100%; text-align: left; font-family: inherit; line-height: 1.45; border-top: 0; border-right: 0; border-bottom: 0; }
.cal-event .cal-detail, .cal-event .sports { display: block; }
.calendar-history-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0 0 14px; font-size: .875rem; color: var(--deep-ink); cursor: pointer; }
.calendar-history-toggle input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--cj-orange); }

/* Compact manager month view; all details remain in the linked show or agenda. */
.admin-page .calendar-layout { grid-template-columns: minmax(0, 1fr); }
.admin-page .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 0; }
.admin-page .cal-cell { min-width: 0; min-height: 0; height: 136px; padding: 5px; display: flex; flex-direction: column; }
.admin-page .cal-date { flex: none; margin-bottom: 3px; }
.admin-page .cal-events { min-height: 0; overflow-y: auto; overflow-x: hidden; }
.admin-page button.cal-event { min-width: 0; min-height: 44px; padding: 4px 5px; margin-bottom: 3px; border-left-width: 3px; border-radius: 5px; line-height: 1.2; }
.admin-page .cal-event strong, .admin-page .cal-time, .admin-page .cal-flag { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-page .cal-event strong { font-size: .72rem; }
.admin-page .cal-time { font-size: .66rem; color: var(--soft-ivory); margin-top: 3px; }
.admin-page .cal-flag { color: var(--light-amber); font-size: .62rem; margin-top: 2px; }
.admin-page button.cal-sport { background: var(--warm-charcoal); border-left-color: var(--burnt-rust, #85341E); }
.admin-page button.cal-event:focus-visible { outline: 2px solid var(--cj-orange); outline-offset: -2px; }
.admin-page .agenda-card > summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-weight: 700; }
.admin-page .cal-title-short { display: none; }
@media (max-width: 600px) {
  .admin-page .cal-title-full { display: none; }
  .admin-page .cal-title-short { display: inline; }
  .admin-page .cal-cell { height: 126px; padding: 3px; }
  .admin-page .cal-day-name { padding: 7px 0; font-size: .6rem; }
  .admin-page button.cal-event { padding: 4px 2px; border-left-width: 2px; }
}
.agenda-date { color: #7C3D0C; }

/* Modals and dialogs */
.modal-backdrop { background: rgba(11, 9, 7, .78); backdrop-filter: blur(5px); }
.modal {
  border: 1px solid rgba(255, 196, 118, .2);
  border-radius: 10px;
  background: var(--soft-ivory);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .43);
}
.modal-head {
  background: var(--deep-ink);
  color: var(--warm-cream);
  border-bottom-color: rgba(255, 196, 118, .2);
}
.modal-head h2 { color: var(--white); font-size: 2rem; text-transform: uppercase; }
.modal-head p { color: #BFAF9F; }
.modal-close { background: var(--warm-charcoal); color: var(--warm-cream); border: 1px solid #40342B; border-radius: 5px; }
.modal-body, .modal-foot { background: var(--soft-ivory); }
.modal-foot { border-top-color: #D8CCBC; box-shadow: 0 -8px 22px rgba(11, 9, 7, .06); }
.wizard-step { border-radius: 2px; background: #D8CCBC; }
.wizard-step.active, .wizard-step.done { background: var(--cj-orange); }

/* Login is intentionally strong and unmistakable */
#loginGate {
  background:
    radial-gradient(circle at 70% 15%, rgba(242, 139, 36, .16), transparent 29%),
    var(--deep-ink);
}
#loginGate .modal { max-width: 450px !important; border-color: rgba(255, 196, 118, .22); }
#loginGate .modal-body { padding: 34px !important; }
#loginGate .brand { padding-bottom: 20px; border-bottom: 1px solid #D8CCBC; }
#loginGate h2 { font-family: var(--font-display); font-size: 2.65rem; text-transform: uppercase; }

/* Show workspace and operations */
.show-header, .profile-banner, .portal-show {
  border-radius: 9px;
  background:
    radial-gradient(circle at 85% 5%, rgba(242, 139, 36, .18), transparent 28%),
    linear-gradient(120deg, var(--deep-ink), var(--warm-charcoal));
  color: var(--warm-cream);
  border: 1px solid rgba(255, 196, 118, .18);
}
.show-header h1, .profile-banner h1, .portal-show h1 { color: var(--white); }
.show-header p, .profile-banner p, .portal-show p { color: #CFC2B6; }
/* Keep the band photo, name, and score in separate tracks at every width. */
.profile-banner { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 20px; }
.profile-banner > img { display: block; width: 96px; height: 96px; max-width: 100%; object-fit: contain; background: var(--deep-ink); }
.profile-banner > .grow { min-width: 0; }
.profile-banner h2 { color: var(--white); line-height: 1.15; overflow-wrap: anywhere; }
.profile-banner .profile-meta { color: #CFC2B6; font-size: .875rem; overflow-wrap: anywhere; }
.profile-banner .stat-value { color: var(--white); }
.profile-banner .stat-label { color: #CFC2B6; }
.profile-banner [data-action="set-tier"] { color: #FFF9F0; background: #302820; border-color: #CFC2B6; min-height: 44px; }
.profile-banner [data-action="set-tier"]:hover { color: #FFF9F0; background: #4A3A2B; border-color: #FFF9F0; }
.profile-banner [data-action="set-tier"][aria-pressed="true"] { color: #120E0A; background: #F5A34F; border-color: #F5A34F; box-shadow: inset 0 -3px 0 #120E0A; }
.profile-banner [data-action="set-tier"]:focus-visible { outline: 3px solid #FFF9F0; outline-offset: 3px; }
.profile-banner.dnb [data-action="set-tier"]:focus-visible { outline-color: #120E0A; }
.profile-banner.dnb h2, .profile-banner.dnb .stat-value { color: var(--deep-ink); }
.profile-banner.dnb .profile-meta, .profile-banner.dnb .stat-label { color: var(--muted); }
@media (max-width: 700px) {
  .profile-banner { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; }
  .profile-banner > img { width: 72px; height: 72px; align-self: start; }
  .profile-banner > .right { grid-column: 1 / -1; text-align: left; }
}
.show-quick > div { border-radius: 6px; background: rgba(244, 238, 228, .065); border: 1px solid rgba(240, 232, 215, .11); }
.document-card { background: var(--white); }
.document-title { font-family: var(--font-condensed); font-weight: 800; letter-spacing: .02em; }

.rating-grid { align-items: center; }
.score-buttons { gap: 7px; }
.score-btn {
  border-radius: 5px;
  border-color: #AFA091;
  background: var(--white);
  color: var(--deep-ink);
  font-family: var(--font-condensed);
  font-weight: 800;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.score-btn:hover { border-color: var(--cj-orange); background: #FFF6EB; transform: translateY(-1px); }
.score-btn.selected { background: var(--cj-orange); border-color: var(--cj-orange); color: var(--deep-ink); box-shadow: 0 0 0 3px rgba(242, 139, 36, .16); }

.decision-option { background: var(--white); }
.decision-option.selected { border-color: var(--cj-orange); box-shadow: inset 3px 0 0 var(--cj-orange); }
.reason-chip { border-radius: 4px; }

/* Reservation and legal-document views */
.document-review-scroll { background: #E8DFD3; border-radius: 8px; }
.document-review-scroll .digital-contract { border-radius: 6px; }
.document-review-banner, .reservation-total, .reservation-total-box,
.reservation-manager-summary, .dayof-reservation-block { border-radius: 7px; }
.reservation-total-box { background: linear-gradient(125deg, var(--deep-ink), var(--warm-charcoal)); }
.reservation-total-box > strong { color: var(--light-amber); }
.reservation-manager-number { background: var(--warm-charcoal); }
.digital-contract { border-radius: 6px; }
.digital-contract h3 { color: var(--deep-ink); font-family: var(--font-condensed); font-size: 1.18rem; font-weight: 800; }
.document-end-marker { border-radius: 5px; background: var(--warm-cream); }

/* Public performer application */
.application-page {
  background: var(--soft-ivory);
  color: var(--deep-ink);
}
.application-page .public-header {
  min-height: 78px;
  background: rgba(11, 9, 7, .985);
  border-bottom: 1px solid rgba(255, 196, 118, .26);
  box-shadow: 0 10px 28px rgba(11, 9, 7, .16);
}
.application-page .brand-lockup { color: var(--warm-cream); }
.application-page .brand-mark { width: 52px; height: 52px; border-color: rgba(255, 196, 118, .55); }
.application-page .public-brand-copy small { color: var(--light-amber); font-size: .66rem; }
.application-page .public-brand-copy strong { color: var(--white); font-size: 1rem; }
.application-page .public-header-actions { gap: 10px; }
.application-page .public-calendar-link,
.application-page .manager-signin-link {
  min-height: 40px;
  border-radius: 5px;
  padding: 9px 14px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .065em;
  text-transform: uppercase;
  transition: transform 190ms var(--ease-cinematic), background-color 190ms ease, border-color 190ms ease;
}
.application-page .public-calendar-link { background: var(--cj-orange); color: var(--deep-ink); border: 1px solid var(--cj-orange); }
.application-page .manager-signin-link { background: var(--warm-charcoal); color: var(--warm-cream); border: 1px solid #544438; }
.application-page .public-calendar-link:hover,
.application-page .manager-signin-link:hover { transform: translateY(-1px); }

.application-page .application-shell {
  min-height: calc(100vh - 78px);
  grid-template-columns: minmax(330px, 31vw) minmax(0, 1fr);
  background: var(--soft-ivory);
}
.application-page .application-intro {
  position: sticky;
  top: 78px;
  min-height: calc(100vh - 78px);
  padding: clamp(42px, 5vw, 72px) clamp(28px, 4vw, 58px);
  background:
    radial-gradient(circle at 23% 12%, rgba(242, 139, 36, .18), transparent 26%),
    radial-gradient(circle at 95% 92%, rgba(133, 52, 30, .25), transparent 34%),
    linear-gradient(155deg, var(--deep-ink) 0%, var(--warm-charcoal) 68%, var(--dark-saddle) 100%);
  color: var(--warm-cream);
  overflow: hidden;
}
.application-page .application-intro::after {
  content: '';
  position: absolute;
  right: -95px;
  bottom: -95px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(255, 196, 118, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 196, 118, .035), 0 0 0 70px rgba(255, 196, 118, .025);
  pointer-events: none;
}
.application-page .intro-logo-wrap { width: 92px; height: 92px; border-radius: 50%; border: 1px solid rgba(255, 196, 118, .44); box-shadow: 0 0 0 5px rgba(242, 139, 36, .08); }
.application-page .intro-kicker { color: var(--light-amber); font-size: .78rem; letter-spacing: .17em; }
.application-page .application-intro h1 { max-width: 10ch; color: var(--white); font-size: clamp(3.5rem, 6.3vw, 6.9rem); text-shadow: 0 4px 20px rgba(0, 0, 0, .28); }
.application-page .intro-lead { color: #D3C7BA; font-size: .95rem; line-height: 1.65; }
.application-page .quick-facts { gap: 9px; }
.application-page .quick-fact {
  border: 1px solid rgba(240, 232, 215, .12);
  border-radius: 7px;
  background: rgba(244, 238, 228, .055);
  backdrop-filter: blur(5px);
}
.application-page .quick-fact-icon { border-radius: 5px; background: var(--cj-orange); color: var(--deep-ink); }
.application-page .quick-fact strong { color: var(--white); font-family: var(--font-condensed); letter-spacing: .02em; }
.application-page .quick-fact span { color: #BFB2A6; }
.application-page .house-gear { border-left-color: var(--cj-orange); border-radius: 0 7px 7px 0; background: rgba(244, 238, 228, .07); }
.application-page .house-gear strong { color: var(--white); font-family: var(--font-condensed); font-size: 1.05rem; }
.application-page .house-gear p { color: #C5B8AC; }

.application-page .application-card {
  width: min(940px, calc(100% - 64px));
  max-width: 940px;
  margin: clamp(34px, 5vw, 64px) auto 70px;
  padding: clamp(29px, 4.2vw, 52px);
  border: 1px solid #D4C7B8;
  border-radius: 10px;
  background: var(--soft-ivory);
  box-shadow: 0 24px 58px rgba(11, 9, 7, .12);
}
.application-page .form-kicker { color: #8A430B; font-size: .76rem; letter-spacing: .14em; }
.application-page .form-topline h2 { max-width: 14ch; color: var(--deep-ink); font-size: clamp(3rem, 5vw, 5rem); }
.application-page .form-topline > p:last-child { color: var(--muted); }
.application-page .time-estimate { border-radius: 5px; background: var(--warm-cream); border-color: #D8C19F; color: #71370A; }

.easy-apply-page .application-progress {
  top: 78px;
  background: rgba(244, 238, 228, .97);
  border-bottom-color: #D8CCBC;
}
.easy-apply-page .progress-copy strong { color: #7D3B09; }
.easy-apply-page .progress-track { height: 6px; border-radius: 2px; background: #DCCFC0; }
.easy-apply-page .progress-track span { border-radius: 2px; background: var(--cj-orange); }
.easy-apply-page .progress-step-list { color: #8B7D70; letter-spacing: .035em; text-transform: uppercase; }
.easy-apply-page .progress-step-list li.active { color: #7D3B09; }

.application-page .form-section-number { border-radius: 5px; background: var(--cj-orange); color: var(--deep-ink); }
.application-page .form-section-heading h3 { font-family: var(--font-condensed); font-size: 1.65rem; font-weight: 800; }
.easy-apply-page .returning-band-note,
.easy-apply-page .optional-details,
.easy-apply-page .easy-photo-grid,
.easy-apply-page .review-summary,
.application-page .reservation-fieldset,
.application-page .cover-question,
.application-page .confirm-list .check-row {
  border-radius: 7px;
  background: #F9F4EC;
}
.easy-apply-page .choice-card span { border-radius: 6px; background: var(--white); }
.easy-apply-page .choice-card input:checked + span { border-color: var(--cj-orange); background: #FFF4E8; box-shadow: inset 3px 0 0 var(--cj-orange); }
.easy-apply-page #coverSummary { border-radius: 5px; }
.easy-apply-page .money-input { border-radius: 6px; }
.easy-apply-page .selected-date-list { border-radius: 6px; }
.easy-apply-page .selected-date-chip { border-radius: 5px; }
.easy-apply-page .selected-date-chip button { border-radius: 4px; }
.application-page .photo-preview-wrap, .application-page .upload-box { border-radius: 7px; }
.application-page .submit-button { box-shadow: 0 10px 24px rgba(242, 139, 36, .22); }
.application-page .sms-consent-box { border-radius: 7px; background: #FFF8EE; }
.application-page .public-footer { background: var(--deep-ink); }

/* Portal and availability */
.portal-page, .availability-page, .public-body { background: var(--soft-ivory); color: var(--deep-ink); }
.portal-shell { max-width: 1160px; padding: 24px; }
.portal-head {
  position: sticky;
  top: 0;
  z-index: 18;
  min-height: 78px;
  border: 1px solid rgba(255, 196, 118, .18);
  border-radius: 8px;
  background: var(--deep-ink);
  color: var(--warm-cream);
  box-shadow: 0 10px 26px rgba(11, 9, 7, .14);
}
.portal-head .brand-copy strong { color: var(--white); }
.portal-head .brand-copy span { color: var(--light-amber); }
.portal-task { background: var(--white); }
.portal-task.complete { border-color: #9CC1A9; box-shadow: inset 3px 0 0 var(--green); }
.availability-page .public-wrap, .public-body .public-wrap { color: var(--deep-ink); }
.availability-page .brand { padding: 15px 17px; border-radius: 8px; background: var(--deep-ink); color: var(--warm-cream); }
.availability-page .brand-copy strong { color: var(--white); }
.availability-page .brand-copy span { color: var(--light-amber); }

/* Legal pages */
.legal-page { background: var(--soft-ivory); }
.legal-header {
  background: var(--deep-ink);
  border-bottom: 1px solid rgba(255, 196, 118, .28);
}
.legal-header > a:last-child { color: var(--light-amber); font-family: var(--font-condensed); font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.legal-shell { border-radius: 8px; background: var(--white); }
.legal-shell h1 { font-size: clamp(3rem, 6vw, 5rem); text-transform: uppercase; }
.legal-shell h2 { font-family: var(--font-condensed); font-size: 1.45rem; font-weight: 800; }
.legal-shell .legal-kicker { color: #7D3B09; font-family: var(--font-condensed); }
.legal-shell .legal-summary { border-left-color: var(--cj-orange); border-radius: 0 6px 6px 0; background: #FFF4E7; }
.legal-shell a { color: #7D3B09; }

/* Toasts */
.toast-wrap { z-index: 500; }
.toast { border-radius: 7px; border: 1px solid #42362D; background: var(--deep-ink); color: var(--warm-cream); box-shadow: 0 16px 40px rgba(11, 9, 7, .3); }
.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid var(--burnt-rust); }

/* Mobile navigation and thumb-first actions */
.mobile-book-button { display: none; }

@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .sidebar { width: 250px; }
}

@media (max-width: 820px) {
  body.nav-open { overflow: hidden; }
  .app-shell { display: block; }
  .main { min-height: 100vh; }
  .sidebar {
    inset: 0;
    width: 100%;
    max-width: none;
    transform: translateY(-104%);
    padding: 16px 18px max(26px, env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 78% 10%, rgba(242, 139, 36, .14), transparent 27%),
      var(--deep-ink);
    z-index: 300;
    transition: transform 230ms var(--ease-cinematic), visibility 230ms ease;
    visibility: hidden;
  }
  .sidebar.open { transform: translateY(0); visibility: visible; }
  .sidebar .brand { position: sticky; top: 0; z-index: 2; min-height: 70px; padding: 4px 2px 14px; background: var(--deep-ink); }
  .mobile-nav-close { display: inline-grid; place-items: center; }
  .nav { display: grid; gap: 8px; margin-top: 13px; }
  .nav-btn {
    min-height: 52px;
    padding: 13px 15px;
    border-color: #342A23;
    background: var(--dark-saddle);
    font-size: 1rem;
  }
  .nav-btn:hover { transform: none; background: var(--warm-charcoal); }
  .nav-btn.active { background: #2A211B; border-color: rgba(242, 139, 36, .5); }
  .sidebar-foot { margin-top: 16px; }

  .topbar { height: 70px; padding: 0 12px; }
  .topbar-actions { gap: 7px; }
  .topbar-actions > .btn[data-action='book'] { display: none; }
  .content { padding: 18px 14px 92px; }
  .mobile-book-button {
    position: fixed;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 90;
    display: inline-flex;
    min-height: 50px;
    padding: 14px 18px;
    border: 1px solid #F5A24B;
    border-radius: 7px;
    background: var(--cj-orange);
    color: var(--deep-ink);
    box-shadow: 0 15px 34px rgba(11, 9, 7, .28);
    font-family: var(--font-condensed);
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
  }
  .hero-command { padding: 24px; }
  .modal { border-radius: 0; }
  .modal-head { min-height: 72px; }
}

@media (max-width: 760px) {
  .application-page .public-header { position: sticky; min-height: 70px; }
  .application-page .application-shell { display: block; }
  .application-page .application-intro {
    position: relative;
    top: auto;
    min-height: auto;
    padding: 25px 22px 22px;
  }
  .application-page .application-card { width: calc(100% - 24px); margin: 14px auto 44px; }
  .easy-apply-page .application-progress { top: 70px; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .topbar h1 { font-size: 1.05rem; }
  .topbar .current-user { display: none; }
  .topbar-actions .icon-btn { width: 40px; height: 40px; }
  .page-head h1 { font-size: 2.4rem; }
  .card-pad { padding: 17px; }
  .card-title { align-items: flex-start; }
  .stat-grid { gap: 9px; }
  .stat { min-height: 98px; padding: 15px; }
  .stat-value { font-size: 1.8rem; }

  .application-page .public-header { padding: 9px 10px; }
  .application-page .brand-mark { width: 43px; height: 43px; }
  .application-page .public-brand-copy strong { max-width: 120px; }
  .application-page .public-calendar-link,
  .application-page .manager-signin-link { min-height: 42px; padding: 8px 9px; font-size: .68rem; }
  .application-page .application-card { padding: 22px 16px 28px; }
  .application-page .form-topline h2 { font-size: 2.5rem; }
  .application-page .step-actions {
    position: sticky;
    bottom: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: minmax(92px, .55fr) minmax(0, 1.45fr);
    gap: 8px;
    margin: 18px -16px -28px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #D7CAB9;
    background: rgba(244, 238, 228, .97);
    backdrop-filter: blur(12px);
    box-shadow: 0 -10px 24px rgba(11, 9, 7, .07);
  }
  .application-page .step-actions .btn { width: 100%; min-width: 0; grid-row: 1; }
  .application-page .step-actions .btn-outline { grid-column: 1; }
  .application-page .step-actions .btn-primary { grid-column: 2; }
  .application-page .step-actions-right { display: block; }
  .application-page .step-actions-right .btn-primary { width: 100%; }
  .application-page .final-step-actions { grid-template-columns: minmax(92px, .55fr) minmax(0, 1.45fr); }
  .application-page .selected-date-chip { border-radius: 5px; }

  .portal-shell { padding: 10px; }
  .portal-head { border-radius: 6px; }
  .legal-shell { border-radius: 6px; }
}

/* Motion: cinematic but operationally restrained */
@keyframes cjSpin { to { transform: rotate(360deg); } }
@keyframes cjRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  .card, .hero-command, .portal-show, .show-header, .profile-banner,
  .application-step.is-active, .modal { animation: cjRise 230ms var(--ease-cinematic) both; }
  .card, .workflow-card, .portal-task, .cal-event { transition: transform 210ms var(--ease-cinematic), box-shadow 210ms var(--ease-cinematic), border-color 210ms ease; }
  .card.clickable:hover, tr.clickable:hover .card, .portal-task:hover { transform: translateY(-2px); box-shadow: 0 15px 34px rgba(11, 9, 7, .12); }
}

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

@media print {
  body { background: var(--white); color: #000; }
  .card, .table-wrap { box-shadow: none; }
  .mobile-book-button, .mobile-nav-close { display: none !important; }
  .digital-contract { font-family: Arial, sans-serif; }
}

/* Final specificity and responsive containment audit */
:root {
  --font-display: 'Bebas Neue', 'Liberation Sans Narrow', 'Arial Narrow', Impact, sans-serif;
  --font-condensed: 'Barlow Condensed', 'Liberation Sans Narrow', 'Arial Narrow', sans-serif;
}

.application-page .application-intro h1,
.application-page .form-topline h2,
.application-page .public-success h2,
.admin-page .hero-command h2,
.admin-page .page-head h1,
.portal-page .portal-show h1,
.legal-page .legal-shell h1 {
  font-family: var(--font-display) !important;
  font-weight: 400;
}

.admin-page,
.admin-page .app-shell,
.admin-page .main,
.admin-page .content,
.admin-page .two-col,
.admin-page .two-col > *,
.admin-page .stack,
.admin-page .card,
.admin-page .table-wrap {
  min-width: 0;
  max-width: 100%;
}

.admin-page { overflow-x: clip; }
.admin-page .table-wrap { overflow-x: auto; overscroll-behavior-inline: contain; }

@media (max-width: 820px) {
  .admin-page .two-col,
  .admin-page .calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  .admin-page .content { width: 100%; overflow-x: clip; }
  .admin-page .card-title { min-width: 0; flex-wrap: wrap; }
  .admin-page .card-title > * { min-width: 0; }
  .admin-page .priority-item { grid-template-columns: 38px minmax(0, 1fr); }
  .admin-page .priority-item > .btn,
  .admin-page .priority-item > .row-wrap { grid-column: 1 / -1; width: 100%; }
}

/* Keep the existing navigation usable when all four public links are present. */
@media (max-width: 760px) {
  .application-page .public-header { position: relative; flex-wrap: wrap; }
  .application-page .public-header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    gap: 8px;
  }
  .application-page .public-header-actions > * {
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    text-align: center;
  }
  .easy-apply-page .application-progress { position: static; }
  :is(.admin-page, .application-page, .portal-page) .field :is(input, select, textarea) { font-size: 16px; }
  .modal-head > div { min-width: 0; }
  .modal-head h2 { overflow-wrap: anywhere; }
  .modal-close { flex-shrink: 0; }
  .modal-foot { flex-wrap: wrap; }
}
