:root {
  --bg: #060708;
  --paper: rgba(17, 20, 23, 0.94);
  --paper-solid: #111417;
  --ink: #f4f3ef;
  --muted: #a4acb8;
  --accent: #10b981;
  --accent-strong: #5eead4;
  --warn: #fb923c;
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.12);
  --line: rgba(244, 243, 239, 0.12);
  --shadow: none;
  --sidebar: #d60000;
  --sidebar-active: #991b1b;
  --button-selected: #d4af37;
  --button-selected-text: #111111;
  --button-unselected: #10b981;
  --button-unselected-text: #050505;
}

.card.applicants-panel {
  gap: 14px;
  padding: 18px;
}

.applicants-panel > .section-heading {
  gap: 12px;
  margin-bottom: 2px;
}

.applicants-panel > .section-heading h2 {
  margin-bottom: 6px;
  font-size: 1.5rem;
}

.applicants-panel > .section-heading p {
  margin: 0;
  font-size: 0.92rem;
}

.applicants-panel .applicant-password-form {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 8px 12px;
  padding: 12px 14px;
  margin-bottom: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.applicants-panel .applicant-password-field {
  display: grid;
  gap: 5px;
}

.applicants-panel .applicant-password-form input {
  height: 40px;
  min-height: 40px;
  padding: 8px 10px;
  font-family: var(--font-mono);
}

.applicants-panel .applicant-password-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-items: end;
  gap: 5px;
}

.applicants-panel .applicant-password-actions .button {
  width: auto;
  height: 40px;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.82rem;
}

.applicants-panel .applicant-password-help {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  line-height: 1.3;
}

.applicants-panel .applicant-action-message {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
}

.applicants-panel .applicant-follow-up-panel {
  padding: 10px 12px;
  margin-top: 0;
  border-radius: 8px;
}

.applicants-panel .applicant-follow-up-panel > summary {
  min-height: 42px;
  gap: 10px;
}

.applicants-panel .applicant-follow-up-panel > summary strong {
  font-size: 0.98rem;
}

.applicants-panel .applicant-follow-up-panel > summary small,
.applicants-panel .applicant-follow-up-panel > summary .pill {
  font-size: 0.78rem;
}

.applicants-panel .applicant-follow-up-list {
  gap: 5px;
  padding-top: 8px;
}

.applicants-panel .applicant-card-compact {
  gap: 0;
  padding: 4px 7px;
  border-radius: 4px;
}

.applicants-panel .applicant-card-compact summary {
  grid-template-columns: minmax(180px, 1fr) auto minmax(125px, auto);
  gap: 6px;
  min-height: 32px;
  font-size: 0.74rem;
}

.applicants-panel .applicant-card-compact summary > .pill {
  padding: 2px 5px;
  font-size: 0.62rem;
}

.applicants-panel .applicant-card-compact summary > .muted {
  font-size: 0.66rem;
}

.applicants-panel .applicant-summary-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 4px 10px;
  padding-top: 6px;
  font-size: 0.78rem;
}

.applicants-panel .applicant-record-body {
  display: grid;
  gap: 6px;
  padding: 6px 0 2px;
}

.applicants-panel .applicant-controls {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 250px);
  gap: 5px;
}

.applicants-panel .applicant-controls label {
  font-size: 0.68rem;
}

.applicants-panel .applicant-controls input {
  height: 30px;
  min-height: 30px;
  padding: 4px 6px;
  font-size: 0.72rem;
}

.applicants-panel .applicant-action-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.35fr) repeat(2, minmax(80px, 0.75fr)) minmax(160px, 1.2fr);
  gap: 4px;
}

.applicants-panel .applicant-action-row .button {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  font-size: 0.68rem;
}

.applicant-action-error {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.15;
}

.applicants-panel .applicant-card-compact > .muted {
  margin: 0;
  font-size: 0.68rem;
}

@media (max-width: 720px) {
  .card.applicants-panel {
    padding: 12px;
  }

  .applicants-panel .applicant-follow-up-panel {
    padding: 9px;
  }

  .applicants-panel .applicant-card-compact {
    padding: 5px 7px;
  }

  .applicants-panel .applicant-password-form,
  .applicants-panel .applicant-card-compact summary,
  .applicants-panel .applicant-summary-grid,
  .applicants-panel .applicant-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .applicants-panel .applicant-action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .applicants-panel .applicant-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .applicants-panel .applicant-password-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .applicants-panel .applicant-password-actions .button {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

/* Responsive published schedule editor: the active editor stays inside its day. */
.published-responsive-week {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.published-responsive-week > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.published-responsive-week > summary span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.published-responsive-location {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.published-responsive-location-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 14px;
  min-width: 0;
}

.published-responsive-location-heading > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.published-responsive-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  align-items: start;
  gap: 9px;
  min-width: 0;
}

.published-responsive-day {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper-solid) 92%, transparent);
}

.published-responsive-day.is-editing {
  grid-column: 1 / -1;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}

.published-responsive-day-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  font-size: 0.82rem;
}

.published-responsive-day-heading span {
  color: var(--muted);
  font-size: 0.7rem;
  white-space: nowrap;
}

.published-responsive-day-content,
.published-responsive-day-content .schedule-day-split,
.published-responsive-day-content .schedule-day-split-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
}

.published-responsive-shift {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper-solid) 88%, transparent);
  overflow-wrap: anywhere;
}

.published-responsive-shift.is-selected {
  border-color: var(--accent);
}

.published-responsive-shift .schedule-cell-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.published-responsive-shift .schedule-cell-actions .button {
  min-width: 0;
  padding: 7px 8px;
  white-space: normal;
}

.published-responsive-empty {
  min-height: 34px;
  padding: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.published-inline-editor {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
}

.published-inline-editor #schedule-shift-form {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin: 0;
}

.published-inline-editor .field-row,
.published-inline-editor .field-row-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 8px;
}

.published-inline-editor label,
.published-inline-editor input,
.published-inline-editor select,
.published-inline-editor textarea {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.published-inline-editor .schedule-member-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 7px;
  max-height: 260px;
  overflow: auto;
}

.final-schedule-keyboard-hint {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.final-schedule-location-keyboard-hint {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-weight: 500;
}

.final-schedule-shift:focus-within {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .published-responsive-days {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  }

  .published-responsive-location {
    padding: 10px;
  }
}

@media (max-width: 640px) {
  .published-edit-list {
    padding: 0;
    overflow: visible;
  }

  .published-edit-list > h3 {
    padding-inline: 4px;
    font-size: 0.94rem;
    overflow-wrap: anywhere;
  }

  .published-responsive-week > summary,
  .published-responsive-location-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .published-responsive-week > summary {
    display: grid;
    padding: 10px;
  }

  .published-responsive-week > summary span {
    text-align: left;
  }

  .published-responsive-location {
    padding: 8px;
  }

  .published-responsive-days,
  .published-inline-editor .field-row,
  .published-inline-editor .field-row-3,
  .published-inline-editor .schedule-member-picker {
    grid-template-columns: minmax(0, 1fr);
  }

  .published-responsive-day {
    padding: 8px;
  }

  .published-responsive-day.is-editing {
    grid-column: auto;
  }

  .published-inline-editor .button-row,
  .published-inline-editor .schedule-cell-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compact Valet-style editing for a published shift. */
.published-inline-editor {
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper-solid) 94%, #000);
}

.published-inline-editor > h3 {
  margin: 0 0 8px;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
}

.published-inline-editor .schedule-shift-form-compact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px 10px;
}

.published-inline-editor .schedule-shift-form-compact > * {
  grid-column: 1 / -1;
  min-width: 0;
  margin-block: 0;
}

.published-inline-editor .schedule-shift-form-compact > .field-row,
.published-inline-editor .schedule-shift-form-compact > .field-row-3 {
  display: grid;
  gap: 8px 10px;
}

.published-inline-editor .schedule-shift-form-compact > .field-row {
  grid-template-columns: minmax(110px, 0.38fr) minmax(190px, 1fr);
}

.published-inline-editor .schedule-shift-form-compact > .field-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.published-inline-editor .schedule-shift-form-compact label {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 750;
  line-height: 1.15;
}

.published-inline-editor .schedule-shift-form-compact input:not([type="checkbox"]):not([type="radio"]),
.published-inline-editor .schedule-shift-form-compact select {
  display: block;
  width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  margin: 0;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 0.88rem;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.published-inline-editor .schedule-shift-form-compact textarea {
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 8px 9px;
  border-radius: 9px;
  font-size: 0.86rem;
}

.published-inline-editor .schedule-shift-form-compact .checkbox-row {
  align-self: end;
  min-height: 40px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.published-inline-editor .schedule-shift-form-compact .checkbox-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
}

.published-inline-editor .schedule-shift-form-compact .field-help {
  margin: -3px 0 1px;
  padding: 6px 8px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.3;
}

.published-inline-editor .schedule-shift-form-compact .schedule-member-dropdown {
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
}

.published-inline-editor .schedule-shift-form-compact .schedule-member-dropdown > summary {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.78rem;
}

.published-inline-editor .schedule-shift-form-compact .schedule-member-tools,
.published-inline-editor .schedule-shift-form-compact .schedule-member-picker,
.published-inline-editor .schedule-shift-form-compact #schedule-member-search {
  margin: 7px;
}

.published-inline-editor .schedule-shift-form-compact .schedule-member-picker {
  max-height: 180px;
  padding: 7px;
}

.published-inline-editor .schedule-shift-form-compact .schedule-builder-filter-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.published-inline-editor .schedule-shift-form-compact .schedule-already-scheduled-control {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.published-inline-editor .schedule-shift-form-compact .schedule-already-scheduled-control .button {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 0.72rem;
}

.published-inline-editor .schedule-shift-form-compact .schedule-already-scheduled-control span {
  font-size: 0.64rem;
  line-height: 1.25;
}

.published-inline-editor .schedule-shift-form-compact .schedule-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.published-inline-editor .schedule-shift-form-compact .schedule-form-actions .button {
  flex: 0 1 auto;
  width: auto;
  min-height: 40px;
  padding: 7px 13px;
}

@media (max-width: 700px) {
  .published-inline-editor {
    padding: 8px;
  }

  .published-inline-editor .schedule-shift-form-compact {
    gap: 7px;
  }

  .published-inline-editor .schedule-shift-form-compact > .field-row-3:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .published-inline-editor .schedule-shift-form-compact > .field-row-3:first-child > :first-child {
    grid-column: 1 / -1;
  }

  .published-inline-editor .schedule-shift-form-compact > .field-row {
    grid-template-columns: minmax(90px, 0.42fr) minmax(0, 1fr);
  }

  .published-inline-editor .schedule-shift-form-compact > .field-row-3:not(:first-child),
  .published-inline-editor .schedule-shift-form-compact .schedule-builder-filter-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .published-inline-editor .schedule-shift-form-compact input:not([type="checkbox"]):not([type="radio"]),
  .published-inline-editor .schedule-shift-form-compact select {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 6px 8px;
    font-size: 16px;
  }

  .published-inline-editor .schedule-shift-form-compact .schedule-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .published-inline-editor .schedule-shift-form-compact .schedule-form-actions .button {
    width: 100%;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 35%),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 32%),
    linear-gradient(180deg, var(--paper-solid) 0%, var(--bg) 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell,
#app {
  min-height: 100vh;
  min-height: 100dvh;
}

body.valet-page,
body.public-valet-page,
html:has(body.valet-page),
html:has(body.public-valet-page) {
  background-color: var(--bg);
  overscroll-behavior-y: none;
}

body.login-page,
html:has(body.login-page) {
  background-color: #000000 !important;
  background-image: none !important;
  overscroll-behavior-y: none;
}

body.login-page .page-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: #000000;
}

body.login-page #app {
  min-height: 100vh;
  min-height: 100dvh;
  background: #000000;
}

button,
summary {
  touch-action: manipulation;
}

.page-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 72px 24px 24px;
}

body.schedule-page .page-shell {
  max-width: none;
  padding: 0;
}

.global-busy-overlay {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  display: none;
  pointer-events: none;
}

body.is-global-busy .global-busy-overlay {
  display: block;
}

.global-busy-panel {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  max-width: min(calc(100vw - 24px), 190px);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 20, 23, 0.92);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 700;
}

.global-busy-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: globalBusySpin 0.8s linear infinite;
}

@keyframes globalBusySpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-busy-spinner {
    animation: none;
  }
}

.app-shell,
#app {
  display: grid;
  gap: 0;
}

.card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 20px;
}

.location-billing-section {
  display: grid;
  gap: 18px;
}

.location-billing-profile,
.location-billing-settings-form,
.location-billing-rule-panel,
.location-billing-explanation {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  padding: 18px;
}

.location-billing-explanation summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.location-billing-explanation summary h3 {
  margin: 0;
}

.location-billing-explanation summary span {
  color: var(--muted);
  font-size: 0.9rem;
}

.location-billing-explanation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.location-billing-explanation-grid section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.location-billing-explanation-grid h4 {
  margin: 0;
}

.location-billing-explanation-grid dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.location-billing-explanation-grid dl > div {
  display: grid;
  gap: 3px;
}

.location-billing-explanation-grid dt {
  color: var(--ink);
  font-weight: 700;
}

.location-billing-explanation-grid dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.location-billing-profile-table {
  display: grid;
  border: 1px solid var(--line);
}

.location-billing-profile-table > div {
  display: grid;
  grid-template-columns: minmax(90px, 170px) minmax(0, 1fr);
  gap: 12px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

.location-billing-profile-table > div:last-child {
  border-bottom: 0;
}

.location-billing-profile-table strong {
  color: var(--ink);
}

.location-billing-profile-table span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.location-billing-rules-table .button {
  padding: 6px 10px;
}

@media (max-width: 760px) {
  .location-billing-explanation summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .location-billing-explanation-grid {
    grid-template-columns: 1fr;
  }
}

.auth-card {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 520px);
  gap: 24px;
  align-content: center;
  justify-content: center;
  justify-items: stretch;
}

body.login-page .login-auth-card {
  width: min(calc(100% - 32px), 680px);
  min-height: 0;
  margin: clamp(16px, 4vh, 40px) auto;
  padding: clamp(22px, 4vw, 40px);
  align-content: start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: #080808;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: none;
}

@media (max-width: 640px) {
  body.login-page .login-auth-card {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 18px 14px 22px;
    gap: 16px;
    border-radius: 22px;
  }
}

.auth-copy {
  display: grid;
  gap: 0;
  justify-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--accent-strong);
  margin-bottom: 10px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 0.95;
}

.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  width: 100%;
}

.brand-mark {
  width: min(460px, 100%);
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-mark-small {
  width: 150px;
}

.brand-text-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 10px 16px;
  color: #111417;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 900;
  text-align: center;
}

.brand-home-button,
.brand-lockup > .brand-mark {
  display: inline-flex;
  padding: 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
}

.brand-mark[src$="/logo_500_red.png"] {
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.5))
    drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
}

.auth-action-stack,
.auth-form {
  display: grid;
  gap: 12px;
}

.auth-action-stack {
  width: 100%;
  margin-top: 6px;
}

.saas-storefront {
  display: grid;
  gap: 38px;
}

.saas-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 24px;
}

.saas-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.saas-wordmark-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: #04110e;
  font-weight: 900;
}

.saas-nav-actions,
.saas-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.saas-hero {
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: 34px;
}

.saas-hero-copy,
.saas-signup-section > div {
  display: grid;
  gap: 16px;
}

.saas-hero-copy h1 {
  max-width: 920px;
}

.saas-hero-copy > .muted {
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.65;
}

.saas-ownership-note {
  max-width: 760px;
  margin: 0;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  background: rgba(16, 185, 129, 0.1);
  color: var(--ink);
  line-height: 1.5;
}

.saas-product-preview {
  display: grid;
  gap: 14px;
  min-height: 420px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 243, 239, 0.06);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.saas-preview-topbar {
  display: flex;
  gap: 7px;
  align-items: center;
  height: 34px;
  border-bottom: 1px solid var(--line);
}

.saas-preview-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.saas-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.saas-preview-grid > div,
.saas-feature {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 20, 23, 0.74);
}

.saas-preview-grid p,
.saas-feature p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.saas-feature-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.saas-company-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
}

.saas-company-section > div {
  display: grid;
  gap: 12px;
}

.saas-company-section h2,
.saas-company-section p {
  margin: 0;
}

.saas-company-section p {
  color: var(--muted);
  line-height: 1.6;
}

.saas-contact-details {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 20, 23, 0.54);
  color: var(--muted);
  font-style: normal;
}

.saas-contact-details a,
.saas-footer a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

.saas-contact-details .button {
  color: var(--ink);
}

.saas-feature h2,
.saas-signup-section h2,
.saas-account-section h2 {
  font-size: 1.3rem;
  line-height: 1.15;
}

.saas-signup-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.9fr);
  gap: 26px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 20, 23, 0.62);
}

.saas-plan-section,
.saas-account-section,
.saas-manage-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 1fr);
  gap: 26px;
  align-items: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 20, 23, 0.48);
}

.saas-account-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 243, 239, 0.06);
}

.saas-account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.saas-account-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 20, 23, 0.48);
}

.saas-account-summary strong {
  font-size: 1.05rem;
}

.saas-account-summary span,
.saas-account-summary small {
  color: var(--muted);
  line-height: 1.35;
}

.saas-plan-grid {
  display: grid;
  gap: 12px;
}

.saas-plan-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 243, 239, 0.06);
  cursor: pointer;
}

.saas-plan-card:has(input:checked) {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.12);
}

.saas-plan-card:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.68;
}

.saas-plan-card span {
  display: grid;
  gap: 6px;
}

.saas-plan-card small {
  color: var(--muted);
  line-height: 1.45;
}

.saas-signup-form {
  display: grid;
  gap: 12px;
}

.saas-verification-status,
.platform-verification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.auth-help-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.saas-logo-preview {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(244, 243, 239, 0.06);
  color: var(--muted);
  text-align: center;
}

.saas-logo-preview img {
  display: block;
  max-width: min(260px, 100%);
  max-height: 86px;
  object-fit: contain;
  object-position: center;
}

.saas-logo-preview span {
  overflow-wrap: anywhere;
}

.saas-terms-page {
  display: grid;
  gap: 18px;
  max-width: 920px;
  padding: 58px 0 80px;
}

.saas-terms-page h1 {
  max-width: 780px;
}

.saas-legal-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 243, 239, 0.08);
}

.saas-legal-panel h2,
.saas-legal-panel h3 {
  font-size: 1rem;
}

.saas-legal-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.saas-signup-terms a {
  color: var(--accent);
  font-weight: 700;
}

.saas-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.saas-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Public 7urr Valet product showcase. All interface examples use fictional data. */
.saas-storefront {
  --saas-radius: 20px;
}

.saas-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin-bottom: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 243, 239, 0.1);
  border-radius: 14px;
  background: rgba(6, 7, 8, 0.82);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.saas-hero-visual {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1fr);
  min-height: min(730px, calc(100vh - 120px));
  padding: clamp(30px, 6vw, 80px);
  overflow: hidden;
  border: 1px solid rgba(244, 243, 239, 0.12);
  border-radius: var(--saas-radius);
  background: #050708;
}

.saas-hero-image,
.saas-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.saas-hero-image {
  z-index: -2;
  object-fit: cover;
  object-position: center;
}

.saas-hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.96) 0%, rgba(3, 5, 6, 0.78) 42%, rgba(3, 5, 6, 0.08) 78%),
    linear-gradient(0deg, rgba(3, 5, 6, 0.72) 0%, transparent 42%);
}

.saas-hero-visual .saas-hero-copy {
  width: min(720px, 62%);
  align-content: center;
}

.saas-hero-visual .saas-hero-copy h1 {
  max-width: 760px;
  font-size: clamp(3rem, 6vw, 6.2rem);
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.saas-hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 8px;
}

.saas-hero-proof span {
  padding: 8px 11px;
  border: 1px solid rgba(244, 243, 239, 0.18);
  border-radius: 999px;
  background: rgba(6, 7, 8, 0.56);
  color: #e7e9e7;
  font-size: 0.78rem;
  backdrop-filter: blur(10px);
}

.saas-trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.saas-trust-strip > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.saas-trust-strip > div:last-child {
  border-right: 0;
}

.saas-trust-strip strong {
  font-size: 0.92rem;
}

.saas-trust-strip span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.saas-section-intro {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.saas-section-intro h2,
.saas-difference-copy h2,
.saas-final-cta h2 {
  font-size: clamp(2.1rem, 4.5vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.saas-section-intro > p:last-child,
.saas-difference-copy > p,
.saas-final-cta > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.saas-workflow-section,
.saas-feature-section {
  display: grid;
  gap: 28px;
  padding-block: clamp(42px, 7vw, 92px);
}

.saas-workflow-demo {
  display: grid;
  grid-template-columns: minmax(190px, 0.55fr) minmax(270px, 0.72fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--saas-radius);
  background:
    radial-gradient(circle at 45% 20%, rgba(16, 185, 129, 0.12), transparent 30%),
    rgba(11, 13, 15, 0.9);
}

.saas-workflow-tabs {
  display: grid;
  align-content: center;
  gap: 8px;
}

.saas-workflow-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.saas-workflow-tab span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
}

.saas-workflow-tab:hover,
.saas-workflow-tab:focus-visible,
.saas-workflow-tab.is-active {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.1);
  color: var(--ink);
  outline: none;
}

.saas-workflow-tab.is-active span {
  border-color: var(--accent);
  background: var(--accent);
  color: #04130f;
}

.saas-demo-phone {
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 470px;
  padding: 25px;
  border: 7px solid #252a2d;
  border-radius: 34px;
  background:
    radial-gradient(circle at top, rgba(16, 185, 129, 0.18), transparent 35%),
    #f3f4f1;
  color: #101416;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.saas-demo-phone .eyebrow {
  margin: 0;
  color: #08775a;
}

.saas-demo-phone h3 {
  margin: 0;
  font-size: 1.8rem;
}

.saas-demo-phone > p:not(.eyebrow) {
  min-height: 48px;
  margin: 0;
  color: #556067;
  line-height: 1.5;
}

.saas-demo-phone-top,
.saas-demo-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.saas-demo-phone-top {
  align-items: center;
  margin-bottom: auto;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.saas-demo-live {
  padding: 5px 8px;
  border-radius: 999px;
  background: #dcebe6;
  color: #08775a;
}

.saas-demo-ticket-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: auto;
  border-radius: 16px;
  background: #0d1514;
  color: #5eead4;
  font-weight: 900;
}

.saas-demo-meta {
  padding: 13px 0;
  border-block: 1px solid #d4d9d6;
}

.saas-demo-meta span {
  display: grid;
  gap: 3px;
}

.saas-demo-meta small {
  color: #66716f;
}

.saas-demo-phone .button {
  width: 100%;
  min-height: 48px;
  background: #0d1514;
  color: #ffffff;
}

.saas-workflow-detail {
  display: grid;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: clamp(20px, 4vw, 46px);
  border-radius: 12px;
  background: rgba(244, 243, 239, 0.035);
}

.saas-workflow-detail h3 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.02;
}

.saas-workflow-detail > p,
.saas-workflow-detail li {
  color: var(--muted);
  line-height: 1.55;
}

.saas-workflow-detail ul {
  display: grid;
  gap: 9px;
  margin: 4px 0;
  padding-left: 20px;
}

.saas-workflow-detail .saas-demo-disclaimer {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #7f898f;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.saas-feature-section .saas-feature-band {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saas-feature-section .saas-feature {
  position: relative;
  min-height: 230px;
  padding: 22px;
  overflow: hidden;
  border-radius: 14px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.saas-feature-section .saas-feature:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.07);
}

.saas-feature-number {
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.65rem;
}

.saas-feature-section .saas-feature h2 {
  margin-top: auto;
  font-size: 1.45rem;
}

.saas-difference-section {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(24px, 5vw, 68px);
  align-items: center;
  padding-block: clamp(42px, 7vw, 92px);
}

.saas-growth-section {
  display: grid;
  gap: 30px;
  padding-block: clamp(42px, 7vw, 92px);
}

.saas-growth-grid {
  display: grid;
  gap: 22px;
}

.saas-growth-story {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  min-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--saas-radius);
  background: rgba(17, 20, 23, 0.72);
}

.saas-growth-story-reverse {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
}

.saas-growth-story-reverse img {
  order: 2;
}

.saas-growth-story img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.saas-growth-story > div {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: clamp(24px, 5vw, 60px);
}

.saas-growth-story h3 {
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.saas-growth-story p,
.saas-growth-story li {
  color: var(--muted);
  line-height: 1.55;
}

.saas-growth-story p {
  margin: 0;
}

.saas-growth-story ul {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
  padding-left: 20px;
}

.saas-emoji {
  font-size: 2.4rem;
}

.saas-outcome-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.saas-outcome-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 165px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244, 243, 239, 0.035);
}

.saas-outcome-grid article > span {
  font-size: 1.7rem;
}

.saas-outcome-grid h3,
.saas-outcome-grid p {
  margin: 0;
}

.saas-outcome-grid p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.saas-outcome-note {
  margin: -10px 0 0;
  color: #7f898f;
  font-size: 0.76rem;
  line-height: 1.5;
}

.saas-difference-image-wrap {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: var(--saas-radius);
}

.saas-difference-image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.saas-image-caption {
  position: absolute;
  inset: auto 18px 18px;
  display: grid;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(6, 7, 8, 0.78);
  backdrop-filter: blur(14px);
}

.saas-image-caption span {
  color: var(--accent-strong);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.saas-difference-copy {
  display: grid;
  gap: 15px;
}

.saas-difference-list {
  display: grid;
  margin-block: 6px;
  border-top: 1px solid var(--line);
}

.saas-difference-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.saas-difference-list span {
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}

.saas-difference-list p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.saas-difference-list strong {
  color: var(--ink);
}

.saas-final-cta {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(44px, 8vw, 100px) clamp(18px, 6vw, 76px);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--saas-radius);
  background:
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.22), transparent 48%),
    rgba(17, 20, 23, 0.72);
  text-align: center;
}

.saas-final-cta > p {
  max-width: 700px;
}

.saas-about-visual {
  position: relative;
  display: grid;
  min-height: 390px;
  margin: 8px 0 12px;
  overflow: hidden;
  border-radius: var(--saas-radius);
}

.saas-about-visual img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
}

.saas-about-visual figcaption {
  position: absolute;
  inset: auto 14px 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(6, 7, 8, 0.8);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.saas-review-page {
  display: grid;
  gap: 20px;
  padding-block: clamp(30px, 6vw, 76px);
}

.saas-review-page-intro {
  display: grid;
  gap: 10px;
  max-width: 850px;
  padding: clamp(18px, 5vw, 54px) 0 10px;
}

.saas-review-page-intro h1 {
  max-width: 820px;
  font-size: clamp(2.8rem, 6vw, 6rem);
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.saas-review-page-intro > p:last-child {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.saas-reviews-section {
  display: grid;
  gap: 26px;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid rgba(244, 243, 239, 0.12);
  border-radius: var(--saas-radius);
  background:
    radial-gradient(circle at 88% 5%, rgba(16, 185, 129, 0.13), transparent 28%),
    rgba(11, 13, 15, 0.9);
}

.saas-review-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 70px);
  align-items: end;
}

.saas-review-summary > div:first-child {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.saas-review-summary h2,
.saas-review-form-wrap h2 {
  font-size: clamp(2rem, 4.5vw, 4.4rem);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.saas-review-summary p,
.saas-review-form-wrap > div > p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.saas-review-score {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 150px;
  padding: 16px 18px;
  border: 1px solid rgba(245, 196, 81, 0.28);
  border-radius: 14px;
  background: rgba(245, 196, 81, 0.06);
}

.saas-review-score strong {
  font-size: 2.6rem;
  line-height: 1;
}

.saas-review-score span,
.saas-review-score small {
  color: var(--muted);
}

.saas-review-score-new {
  justify-items: start;
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.06);
}

.saas-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.saas-review-card,
.saas-review-empty {
  position: relative;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 285px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(244, 243, 239, 0.04);
}

.saas-review-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
  transition: transform 180ms ease, border-color 180ms ease;
}

.saas-review-quote {
  position: absolute;
  top: -15px;
  right: 14px;
  color: rgba(16, 185, 129, 0.12);
  font-family: Georgia, serif;
  font-size: 8rem;
  line-height: 1;
}

.saas-review-stars {
  position: relative;
  z-index: 1;
  color: #f5c451;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.saas-review-card blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #f3f4f1;
  font-size: 1.03rem;
  line-height: 1.65;
}

.saas-review-card footer {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.saas-review-card footer span,
.saas-review-card footer small,
.saas-review-empty p {
  color: var(--muted);
  line-height: 1.45;
}

.saas-review-empty {
  grid-column: 1 / -1;
  justify-items: center;
  align-content: center;
  min-height: 220px;
  text-align: center;
}

.saas-review-empty p {
  max-width: 520px;
  margin: 0;
}

.saas-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.saas-review-form-wrap {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(26px, 6vw, 82px);
  align-items: start;
  padding-top: clamp(24px, 5vw, 60px);
  border-top: 1px solid var(--line);
}

.saas-review-form-wrap > div {
  display: grid;
  gap: 10px;
}

.saas-review-form {
  position: relative;
  display: grid;
  gap: 12px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(244, 243, 239, 0.04);
}

.saas-review-form textarea {
  min-height: 150px;
  resize: vertical;
}

.saas-review-form .button {
  min-height: 48px;
}

.review-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.platform-review-list {
  margin-top: 14px;
}

.platform-review-item {
  display: grid;
  gap: 10px;
}

.platform-review-item p {
  margin: 0;
  line-height: 1.55;
}

.platform-review-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

  .saas-review-form-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .saas-reviews-section {
    padding: 24px 16px;
  }

  .saas-review-summary,
  .saas-review-grid {
    grid-template-columns: 1fr;
  }

  .saas-review-score {
    justify-items: start;
  }

  .saas-review-actions .button {
    width: 100%;
  }
}

.brand-home-button {
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.brand-home-button:hover,
.brand-home-button:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

.mobile-president-valet-shortcut,
.mobile-president-date {
  display: none;
}

.muted {
  color: var(--muted);
}

.topbar,
.section-heading,
.button-row,
.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  position: relative;
}

.topbar > div:first-child {
  grid-column: 2;
  display: grid;
  justify-items: center;
  text-align: center;
}

.topbar .brand-lockup {
  justify-content: center;
  margin-bottom: 4px;
}

.topbar .brand-mark-small {
  width: 100%;
  height: 96px;
  max-height: 96px;
  object-fit: contain;
}

.topbar .brand-home-button {
  width: min(300px, 34vw);
  height: 124px;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.topbar-actions {
  grid-column: 3;
  justify-self: end;
}

.ledger-filter {
  min-width: 250px;
  max-width: 250px;
  width: 250px;
}

.lowered-filter {
  margin-bottom: 0;
}

.grid-4,
.field-row,
.field-row-3,
.dashboard-grid,
.summary-grid {
  display: grid;
  gap: 18px;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-grid.compact {
  grid-template-columns: repeat(3, minmax(220px, 280px));
  justify-content: center;
}

.field-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.span-6 {
  grid-column: span 6;
}

.span-12 {
  grid-column: span 12;
}

.stat {
  padding: 18px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-size: 2rem;
  margin-top: 8px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  font-weight: 500;
  font-size: 0.94rem;
}

.field-help {
  display: block;
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  padding: 10px 12px;
  background: #f8fafc;
  color: #111827;
}

select {
  color-scheme: light;
}

select option {
  color: #000000;
  background: #ffffff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

.button {
  background: #f4f3ef;
  color: #111417;
  border: 0;
  border-radius: 0;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-secondary {
  background: var(--accent);
  color: #04130f;
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-danger {
  background: var(--danger);
  color: #ffffff;
}

.danger-zone {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

th {
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-family: "IBM Plex Mono", monospace;
  background: rgba(30, 29, 26, 0.08);
}

.pill.minor {
  background: rgba(14, 116, 144, 0.12);
  color: #155e75;
}

.pill.medium {
  background: rgba(194, 65, 12, 0.12);
  color: #9a3412;
}

.pill.major {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}

.warning-list,
.credential-list,
.document-list,
.shift-list {
  display: grid;
  gap: 12px;
}

.shift-section {
  margin-top: 18px;
}

.schedule-builder-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.schedule-builder-choice {
  min-height: 128px;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  white-space: normal;
}

.schedule-builder-choice strong,
.schedule-builder-choice span,
.schedule-builder-choice em {
  display: block;
}

.schedule-builder-choice span {
  color: var(--muted);
  font-weight: 600;
}

.schedule-builder-choice em {
  margin-top: 8px;
  font-style: normal;
  font-size: 0.82rem;
}

.dealership-menu-card {
  display: grid;
  gap: 18px;
}

.dealership-menu-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.dealership-location-panel,
.dealership-position-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dealership-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dealership-panel-heading h3 {
  margin: 0;
}

.dealership-panel-heading span {
  min-width: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-align: center;
}

.dealership-location-list,
.dealership-position-list {
  display: grid;
  gap: 8px;
}

.dealership-location-list {
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.dealership-location-button {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dealership-location-button:hover,
.dealership-location-button:focus-visible {
  border-color: rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.08);
  transform: translateY(-1px);
}

.dealership-location-button.is-selected {
  border-color: rgba(220, 38, 38, 0.78);
  background: rgba(220, 38, 38, 0.12);
}

.dealership-location-button strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.dealership-location-button span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.dealership-position-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.dealership-position-create-form .error-message {
  grid-column: 1 / -1;
}

.dealership-position-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dealership-position-row.is-selected {
  border-color: rgba(16, 185, 129, 0.48);
  background: rgba(16, 185, 129, 0.08);
}

.dealership-position-row.is-inactive {
  opacity: 0.72;
}

.dealership-position-row strong,
.dealership-position-row span {
  display: block;
}

.dealership-position-row strong {
  line-height: 1.2;
}

.dealership-position-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.dealership-position-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dealership-position-actions .button {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

.dealership-position-configure {
  margin-top: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dealership-position-configure > summary {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.dealership-position-configure > summary span {
  color: var(--muted);
  font-size: 0.84rem;
}

.dealership-position-configure-form {
  padding-top: 14px;
}

.dealership-position-config-top,
.dealership-position-config-grid {
  display: grid;
  gap: 12px;
}

.dealership-position-config-top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.dealership-position-config-grid {
  grid-template-columns: minmax(220px, 1.4fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr);
}

.dealership-position-toggles,
.dealership-position-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dealership-position-toggles {
  justify-content: flex-end;
  padding-bottom: 2px;
}

.dealership-position-toggles .checkbox-row,
.dealership-position-days .checkbox-row {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 980px) {
  .saas-hero,
  .saas-signup-section,
  .saas-account-section,
  .saas-plan-section,
  .saas-manage-section,
  .saas-company-section {
    grid-template-columns: 1fr;
  }

  .saas-hero {
    min-height: auto;
  }

  .saas-feature-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dealership-menu-layout {
    grid-template-columns: 1fr;
  }

  .dealership-location-list {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .dealership-position-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dealership-position-config-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .saas-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .saas-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .saas-nav-actions,
  .saas-hero-actions {
    width: 100%;
  }

  .saas-nav-actions .button,
  .saas-hero-actions .button {
    width: 100%;
  }

  .saas-preview-grid,
  .saas-feature-band {
    grid-template-columns: 1fr;
  }

  .saas-product-preview {
    min-height: auto;
  }

  .saas-signup-section {
    padding: 16px;
  }

  .dealership-position-create-form,
  .dealership-position-row,
  .dealership-position-config-top,
  .dealership-position-config-grid {
    grid-template-columns: 1fr;
  }

  .dealership-position-create-form .button,
  .dealership-position-actions,
  .dealership-position-actions .button {
    width: 100%;
  }

  .dealership-position-actions {
    justify-content: stretch;
  }

  .dealership-position-toggles {
    justify-content: flex-start;
  }

  .dealership-position-toggles .checkbox-row,
  .dealership-position-days .checkbox-row {
    flex: 1 1 120px;
  }
}

.support-guide-item summary {
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.support-guide-item summary span {
  color: var(--muted);
}

.support-guide-steps {
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--text);
}

.support-guide-steps li + li {
  margin-top: 8px;
}

.text-status-grid {
  margin-top: 12px;
}

.text-day-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.good-pill {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-strong);
}

.warning-pill {
  background: rgba(251, 146, 60, 0.18);
  color: var(--warn);
}

.text-log-heading {
  display: grid;
  gap: 44px;
  margin-bottom: 18px;
}

.text-log-heading p {
  margin: 0;
}

.text-log-table-wrap {
  max-height: 680px;
  overflow: auto;
}

.text-log-table {
  background: #e5e7eb;
  color: #050505;
  font-size: 0.82rem;
}

.text-log-table th,
.text-log-table td {
  border: 1px solid #c3c7cc;
  padding: 8px 10px;
  vertical-align: top;
  font-weight: 700;
}

.text-log-table th {
  background: #cfd3d8;
}

.text-sent-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #ffffff;
}

.text-sent-icon.sent {
  background: #07810f;
}

.text-sent-icon.failed {
  background: #b91c1c;
}

.shift-item {
  display: grid;
  gap: 8px;
}

.shift-item .button {
  justify-self: start;
}

.shift-crew-list {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  line-height: 1.25;
}

.shift-crew-list span {
  display: block;
  padding: 2px 0;
  overflow-wrap: anywhere;
}

.shift-time-heading {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
}

.shift-time-heading strong {
  margin: 0;
}

.shift-time-heading span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}

.schedule-cell-shift .shift-crew-list,
.location-schedule-shift .shift-crew-list {
  gap: 3px;
  margin-top: 2px;
}

.default-schedule-form {
  display: grid;
  gap: 18px;
}

.default-schedule-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  padding: 12px;
}

.default-schedule-days legend {
  padding: 0 6px;
  color: var(--muted);
}

.default-schedule-infinite {
  align-self: end;
  min-height: 44px;
}

.schedule-person-filter {
  min-width: min(320px, 100%);
  margin-bottom: 16px;
}

.schedule-workspace {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-height: calc(100vh - 115px);
}

.schedule-navigation {
  position: sticky;
  top: 0;
  align-self: start;
  min-width: 0;
  min-height: 100vh;
  background: var(--sidebar);
}

.schedule-menu-toggle {
  display: none;
}

.schedule-sidebar {
  position: static;
  display: grid;
  gap: 0;
  align-content: start;
  align-self: start;
  min-height: 100vh;
  background: var(--sidebar);
}

.schedule-sidebar-folder {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  overflow: hidden;
  background: var(--sidebar);
}

.schedule-sidebar-folder summary {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  padding: 9px 12px;
  cursor: pointer;
  background: color-mix(in srgb, var(--sidebar) 88%, #000);
  font-size: 0.84rem;
}

.schedule-sidebar-folder summary strong,
.schedule-sidebar-folder summary span {
  overflow-wrap: anywhere;
}

.schedule-sidebar-folder summary span {
  display: none;
}

.schedule-sidebar-folder summary .schedule-notification-badge {
  display: inline-grid;
  place-items: center;
  grid-column: 2;
  grid-row: 1;
  min-width: 22px;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
}

.schedule-sidebar-folder-items {
  display: grid;
  gap: 0;
}

.schedule-sidebar-button {
  width: 100%;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid transparent;
  border-radius: 0;
  padding: 9px 12px 9px 18px;
  background: color-mix(in srgb, var(--sidebar) 88%, #fff);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  font-size: 0.82rem;
}

.schedule-sidebar-button strong,
.schedule-sidebar-button span {
  overflow-wrap: anywhere;
}

.schedule-sidebar-button span {
  display: none;
}

.schedule-sidebar-button .schedule-notification-badge {
  display: inline-grid;
  place-items: center;
  grid-column: 2;
  grid-row: 1;
  min-width: 22px;
  min-height: 22px;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.schedule-sidebar-button.active {
  border-left-color: #f4f3ef;
  background: var(--sidebar-active);
}

.schedule-sidebar-direct {
  min-height: 42px;
  padding-left: 12px;
  background: color-mix(in srgb, var(--sidebar) 88%, #fff);
}

.schedule-panel {
  min-width: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  align-self: start;
  padding: 14px;
}

.schedule-panel-heading {
  padding: 4px 2px 0;
}

.schedule-panel-heading h2,
.schedule-panel-heading p {
  margin-bottom: 8px;
}

.published-edit-list {
  gap: 10px;
}

.published-edit-list > h3 {
  margin-bottom: 0;
}

.schedule-type-switch {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.schedule-type-switch .button {
  min-width: 120px;
}

.selection-toggle-button.is-active {
  border-color: var(--button-selected);
  color: var(--button-selected-text);
  background: var(--button-selected);
}

.selection-toggle-button.is-inactive {
  border-color: var(--button-unselected);
  color: var(--button-unselected-text);
  background: var(--button-unselected);
}

.selection-toggle-button:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

.group-text-filter-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.employee-schedule-lookup-filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.employee-schedule-lookup-filters .ledger-filter,
.employee-schedule-lookup-filters .schedule-week-filter {
  min-width: min(280px, 100%);
}

.group-text-location-filter {
  width: min(440px, 100%);
}

.group-text-schedule-scroll {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.group-text-schedule-grid {
  display: grid;
  grid-template-columns: minmax(118px, 0.85fr) repeat(7, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.group-text-grid-heading,
.group-text-location-cell,
.group-text-day-cell {
  min-width: 0;
  padding: clamp(5px, 0.6vw, 10px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.group-text-grid-heading {
  display: grid;
  gap: 2px;
  background: rgba(255, 255, 255, 0.06);
}

.group-text-location-cell {
  display: grid;
  align-content: start;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.group-text-day-cell {
  min-height: 120px;
  background: rgba(0, 0, 0, 0.14);
}

.group-text-shift-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: clamp(5px, 0.55vw, 9px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-solid);
}

.group-text-shift-card + .group-text-shift-card {
  margin-top: 8px;
}

.group-text-shift-card .button {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 5px;
  font-size: clamp(0.62rem, 0.7vw, 0.76rem);
  white-space: normal;
}

.group-text-shift-card .shift-time-heading {
  flex-wrap: wrap;
  gap: 4px;
}

.group-text-shift-card .shift-time-heading strong,
.group-text-shift-card .shift-crew-list,
.group-text-shift-card .pill {
  font-size: clamp(0.62rem, 0.7vw, 0.76rem);
  line-height: 1.15;
}

.group-text-shift-card .pill {
  width: fit-content;
  max-width: 100%;
  white-space: normal;
}

.group-text-empty-day {
  display: grid;
  min-height: 126px;
  place-items: center;
  color: var(--danger);
  font-size: 1.5rem;
  font-weight: 800;
}

@media (max-width: 700px) {
  .group-texts-card .section-heading {
    gap: 6px;
    margin-bottom: 8px;
  }

  .group-texts-card .section-heading p,
  .group-texts-card > .field-help {
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .group-text-filter-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
  }

  .group-text-filter-bar .schedule-type-switch,
  .group-text-filter-bar .schedule-type-switch .button,
  .group-text-location-filter {
    width: 100%;
  }

  .group-text-filter-bar .schedule-type-switch .button {
    min-width: 0;
    min-height: 30px;
    padding: 5px 7px;
    font-size: 0.72rem;
  }

  .group-text-location-filter {
    gap: 3px;
  }

  .group-text-location-filter label {
    font-size: 0.68rem;
  }

  .group-text-location-filter select {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 0.78rem;
  }

  .employee-schedule-lookup-filters,
  .employee-schedule-lookup-filters .ledger-filter,
  .employee-schedule-lookup-filters .schedule-week-filter {
    width: 100%;
  }

  .group-text-location-cell strong {
    font-size: 0.78rem;
    line-height: 1.1;
  }

  .group-text-location-cell .location-address {
    display: none;
  }

  .group-text-day-cell.is-empty {
    display: none;
  }

  .group-text-shift-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 5px;
    padding: 5px;
    border-radius: 6px;
  }

  .group-text-shift-card .shift-time-heading,
  .group-text-shift-card .shift-crew-list {
    grid-column: 1 / -1;
  }

  .group-text-shift-card .shift-time-heading {
    align-items: center;
    gap: 3px;
  }

  .group-text-shift-card .shift-time-heading strong,
  .group-text-shift-card .shift-time-heading span,
  .group-text-shift-card .shift-crew-list,
  .group-text-shift-card .pill {
    font-size: 0.62rem;
    line-height: 1.08;
  }

  .group-text-shift-card .shift-time-heading span,
  .group-text-shift-card .pill {
    padding: 2px 5px;
  }

  .group-text-shift-card .shift-crew-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1px 4px;
    margin-top: 0;
  }

  .group-text-shift-card .shift-crew-list span {
    display: inline;
    padding: 0;
  }

  .group-text-shift-card .shift-crew-list span:not(:last-child)::after {
    content: ",";
  }

  .group-text-shift-card > .pill {
    align-self: center;
    margin: 0;
  }

  .group-text-shift-card .button {
    width: auto;
    min-height: 26px;
    padding: 3px 6px;
    font-size: 0.62rem;
  }
}

/* Phone-first shift reports: employee rows become manageable labeled cards. */
@media (max-width: 640px) {
  .shift-report-section {
    gap: 8px;
  }

  .shift-report-section > .section-heading {
    gap: 8px;
  }

  .shift-report-toolbar,
  .shift-report-location-filter,
  .shift-report-location-filter select {
    width: 100%;
    min-width: 0;
  }

  .schedule-report-day-group {
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
  }

  .schedule-report-day-group .schedule-day-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-report-day-group .schedule-day-split-column {
    width: 100%;
    padding: 7px;
  }

  .schedule-report.notice-item {
    padding: 0;
    border-radius: 10px;
  }

  .schedule-report > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: start;
    min-height: 52px;
    padding: 10px;
  }

  .schedule-report-summary-main {
    gap: 2px;
  }

  .schedule-report-summary-main strong,
  .schedule-report-summary-main span,
  .schedule-report-summary-address .location-address {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .schedule-report-summary-address {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .schedule-report-status {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    max-width: 120px;
    padding: 5px 7px;
    white-space: normal;
    text-align: right;
    font-size: 0.66rem;
    line-height: 1.15;
  }

  .schedule-report-form,
  .president-report-correction-form {
    gap: 9px;
    padding: 9px;
  }

  .schedule-report-form > p,
  .president-report-correction-form > p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .schedule-report-form .table-wrap,
  .president-report-correction-form .table-wrap,
  .schedule-report > .table-wrap {
    width: 100%;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .shift-report-table,
  .shift-report-table tbody {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .shift-report-table thead {
    display: none;
  }

  .shift-report-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    width: 100%;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.12);
  }

  .shift-report-table td {
    display: grid;
    grid-template-columns: minmax(84px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 6px 0;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    text-align: right;
    overflow-wrap: anywhere;
  }

  .shift-report-table td:last-child {
    border-bottom: 0;
  }

  .shift-report-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-align: left;
    text-transform: uppercase;
  }

  .shift-report-table td[data-label="Member"] {
    min-height: 34px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
  }

  .shift-report-table input,
  .shift-report-table select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    font-size: 16px;
  }

  .shift-report-table .settings-hint {
    margin-top: 4px;
    text-align: left;
    white-space: normal;
  }

  .schedule-report-form > .button,
  .president-report-correction-form > .button,
  .president-report-correction-form > .button-row,
  .president-report-correction-form > .button-row .button {
    width: 100%;
  }

  .president-report-correction-form > .button-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .schedule-report-form > .button,
  .president-report-correction-form > .button,
  .president-report-correction-form > .button-row .button {
    min-height: 46px;
  }
}

@media (max-width: 1100px) {
  .group-text-schedule-grid {
    display: block;
    border-top: 0;
  }

  .group-text-grid-heading {
    display: none;
  }

  .group-text-location-cell {
    padding: 9px;
    border-top: 1px solid var(--line);
  }

  .group-text-day-cell {
    display: grid;
    grid-template-columns: minmax(82px, 0.22fr) minmax(0, 1fr);
    gap: 7px;
    min-height: 0;
    padding: 7px;
  }

  .group-text-day-cell::before {
    content: attr(data-day-label);
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    display: grid;
    place-items: start center;
    padding: 6px;
    border-right: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
  }

  .group-text-day-cell > * {
    grid-column: 2;
  }

  .group-text-shift-card + .group-text-shift-card {
    margin-top: 0;
  }

  .group-text-empty-day {
    min-height: 42px;
  }
}

@media (max-width: 700px) {
  .group-text-location-cell {
    gap: 2px;
    padding: 6px 7px;
  }

  .group-text-day-cell {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 4px;
    padding: 4px;
  }

  .group-text-day-cell::before {
    padding: 3px;
    font-size: 0.58rem;
    line-height: 1.05;
  }
}

@media (max-width: 420px) {
  .group-text-day-cell {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 3px;
    padding: 3px;
  }

  .group-text-day-cell::before {
    padding: 2px;
    font-size: 0.54rem;
  }
}

.schedule-location-filter-below {
  justify-self: end;
  width: min(420px, 100%);
  margin-top: -4px;
}

.schedule-form-actions {
  align-items: center;
  padding-top: 4px;
}

.location-schedule-list {
  display: grid;
  gap: 28px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.location-schedule-row {
  display: grid;
  grid-template-columns: 96px minmax(840px, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 8px 8px 10px rgba(0, 0, 0, 0.32);
  background: rgba(226, 232, 240, 0.9);
  color: #050505;
}

.location-schedule-label {
  min-height: 172px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 10px;
  border-right: 2px solid #a9adb2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-weight: 700;
}

.location-schedule-label span {
  font-size: 0.78rem;
  font-weight: 600;
}

.location-address {
  display: block;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.location-schedule-label .location-address {
  color: #374151;
  font-size: 0.7rem;
}

.location-schedule-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.location-schedule-day {
  min-height: 172px;
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 0 10px 10px;
  border-right: 2px solid #b4b8bd;
  background: #e7ebef;
}

.location-schedule-day:last-child {
  border-right: 0;
}

.location-schedule-date {
  margin: 0 -10px;
  padding: 8px 6px;
  text-align: center;
  background: #d1d5db;
  color: #000000;
  font-size: 0.8rem;
}

.location-schedule-date span {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
}

.location-schedule-x {
  position: absolute;
  inset: 34px 0 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 2.9rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.location-schedule-shift {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid #111827;
  padding-bottom: 6px;
  font-size: 0.78rem;
  text-align: center;
}

.location-schedule-shift strong {
  color: #dc2626;
}

.location-schedule-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.location-schedule-actions .button {
  padding: 5px 8px;
  font-size: 0.72rem;
}

.schedule-archive-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.schedule-archive-overview > div,
.schedule-archive-location {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.schedule-archive-overview > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.schedule-archive-overview span,
.schedule-archive-location-meta,
.schedule-archive-shift-meta,
.schedule-archive-manager,
.schedule-archive-day-total,
.schedule-archive-shift-total,
.schedule-archive-entry-stats,
.schedule-archive-empty-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.schedule-archive-overview strong {
  font-size: 1rem;
}

.schedule-ledger-card-grid {
  display: grid;
  gap: 16px;
}

.schedule-ledger-location-section {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.schedule-ledger-location-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.schedule-ledger-location-header > div:first-child,
.schedule-ledger-location-stats {
  display: grid;
  gap: 5px;
}

.schedule-ledger-location-header strong {
  font-size: 1rem;
}

.schedule-ledger-location-header span,
.schedule-ledger-location-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

.schedule-ledger-location-stats {
  justify-items: end;
  text-align: right;
}

.schedule-ledger-location-shifts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.schedule-ledger-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.schedule-ledger-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.schedule-ledger-card header > div,
.schedule-ledger-card dl,
.schedule-ledger-entry-list {
  display: grid;
  gap: 6px;
}

.schedule-ledger-card dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.schedule-ledger-card dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.schedule-ledger-card dd {
  margin: 0;
  font-weight: 700;
}

.schedule-ledger-entry-list span {
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.8rem;
}

.final-schedule-remove-shift-button {
  padding: 6px 9px;
  border-color: #fca5a5;
  background: #ffffff;
  color: #991b1b;
  font-size: 0.78rem;
}

.final-schedule-shift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.final-schedule-shift-actions .button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 0.78rem;
}

.schedule-archive-list {
  display: grid;
  gap: 16px;
}

.schedule-archive-location {
  overflow: hidden;
}

.schedule-archive-location-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, #000);
}

.schedule-archive-location-header > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.schedule-archive-location-header strong {
  font-size: 1rem;
}

.schedule-archive-location-meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.schedule-archive-location-meta span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.schedule-archive-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(185px, 1fr));
  gap: 0;
  overflow-x: auto;
}

.schedule-archive-day {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 220px;
  min-width: 0;
  padding: 0;
  border-right: 1px solid var(--line);
  background: #e9edf2;
  color: #050505;
}

.schedule-archive-day:last-child {
  border-right: 0;
}

.schedule-archive-day.empty {
  place-items: stretch;
  background:
    linear-gradient(135deg, transparent calc(50% - 1px), rgba(15, 23, 42, 0.62) 50%, transparent calc(50% + 1px)),
    #e9edf2;
}

.schedule-archive-day-heading,
.schedule-archive-shift-top,
.schedule-archive-day-total,
.schedule-archive-shift-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.schedule-archive-day-heading {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
  background: #dfe4ea;
}

.schedule-archive-day-heading span {
  color: #334155;
  font-size: 0.75rem;
}

.schedule-archive-empty-label {
  align-self: center;
  justify-self: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #050505;
}

.schedule-archive-shift {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px 10px 12px;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid rgba(15, 23, 42, 0.22);
  background: transparent;
  color: #050505;
  font-size: 0.78rem;
  text-align: center;
}

.schedule-archive-shift.reported {
  border-bottom-color: rgba(15, 23, 42, 0.22);
}

.schedule-archive-shift.pending {
  border-bottom-color: rgba(15, 23, 42, 0.22);
}

.schedule-archive-shift-top span {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #050505;
  font-size: 0.75rem;
  font-weight: 800;
}

.schedule-archive-shift-top {
  justify-content: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.22);
  padding-bottom: 5px;
}

.schedule-archive-shift-top strong,
.schedule-archive-shift-meta,
.schedule-archive-shift-total span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-archive-shift-meta {
  display: block;
  color: #111827;
  font-weight: 800;
}

.schedule-archive-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.schedule-archive-entries {
  display: grid;
  gap: 0;
}

.schedule-archive-entry {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.16);
}

.schedule-archive-entry strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #16a34a;
}

.schedule-archive-entry-stats {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #050505;
  font-size: 0.73rem;
  font-weight: 800;
}

.schedule-archive-entry-stats span,
.schedule-archive-shift-total span {
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-archive-shift-total {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(15, 23, 42, 0.16);
  padding-top: 6px;
  color: #050505;
  font-weight: 800;
}

.schedule-archive-day .schedule-day-split {
  grid-template-columns: 1fr;
}

.schedule-archive-actions .button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 0.72rem;
}

.schedule-archive-remove-button {
  border-color: rgba(239, 68, 68, 0.74);
  background: #ef5260;
  color: #ffffff;
}

.schedule-week-filter {
  display: grid;
  gap: 5px;
  width: min(320px, 100%);
  margin: 0;
}

.schedule-week-filter span,
.schedule-day-split-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.published-schedule-heading-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 320px)) auto;
  align-items: start;
  justify-content: start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.published-schedule-heading-filters .schedule-week-filter,
.published-schedule-heading-filters .published-schedule-location-filter {
  width: min(320px, 100%);
  min-width: 250px;
  max-width: 320px;
  margin: 0;
}

#published-schedule-type-switch {
  justify-content: flex-start;
}

.published-schedule-delete-control {
  display: grid;
  grid-template-rows: auto 44px auto;
  justify-items: start;
  gap: 5px;
  width: min(320px, 100%);
  min-width: 250px;
  max-width: 320px;
  margin: 0;
}

.published-schedule-delete-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: normal;
  text-transform: uppercase;
}

.published-schedule-delete-control .button {
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0;
  white-space: normal;
}

.published-schedule-delete-control small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
}

.schedule-day-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.schedule-day-split-column {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.location-schedule-day .schedule-day-split-column {
  border-color: rgba(17, 24, 39, 0.32);
  background: rgba(255, 255, 255, 0.45);
}

.location-schedule-day .schedule-day-split-label {
  color: #111827;
}

.schedule-report-day-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.schedule-report-day-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-location-admin-actions {
  align-items: end;
}

.schedule-location-admin-actions label {
  min-width: 180px;
}

.directory-card {
  max-width: 760px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.directory-card.employee-directory-admin-card {
  width: 100%;
  max-width: none;
}

.directory-table-wrap {
  overflow: auto;
  box-shadow: 8px 8px 10px rgba(0, 0, 0, 0.32);
}

.location-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.location-directory-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.location-directory-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.location-directory-card-heading > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.location-directory-card-heading strong,
.location-directory-card-heading span {
  overflow-wrap: anywhere;
}

.location-directory-card-heading span:not(.pill),
.location-directory-meta span {
  color: var(--muted);
  font-size: 0.84rem;
}

.location-directory-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.location-directory-meta div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
}

.location-directory-block {
  display: grid;
  gap: 8px;
}

.location-directory-block h3 {
  margin: 0;
  font-size: 0.95rem;
}

.location-files {
  display: grid;
  gap: 8px;
}

.location-file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.location-file-item a {
  overflow-wrap: anywhere;
}

.location-file-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.location-banishment-block {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.employee-records-table {
  min-width: 1180px;
}

.employee-records-table .button {
  min-width: 72px;
  padding: 7px 10px;
}

.employee-records-table td:nth-child(3) {
  max-width: 170px;
  overflow-wrap: anywhere;
}

.employee-record-panel {
  width: 100%;
}

.employee-record-screen > .section-heading {
  align-items: flex-start;
  gap: 14px;
}

.employee-record-back-button {
  flex: 0 0 auto;
}

.employee-detail-table-wrap {
  width: min(100%, 620px);
  margin-bottom: 28px;
}

.employee-detail-table th {
  width: 42%;
}

.employee-detail-table td {
  overflow-wrap: anywhere;
}

.employee-profile-edit-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.employee-sensitive-data-panel {
  display: grid;
  gap: 12px;
  width: min(100%, 620px);
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.08);
}

.employee-sensitive-data-panel h3 {
  margin: 0 0 4px;
}

.employee-sensitive-data-panel .employee-sensitive-value {
  margin: 6px 0;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.employee-sensitive-data-panel .button {
  justify-self: start;
}

.employee-availability-edit-box {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.employee-activation-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.employee-activation-counts,
.employee-activation-form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.employee-activation-form > div {
  display: grid;
  gap: 6px;
  min-width: min(100%, 230px);
}

.employee-create-panel form {
  display: grid;
  gap: 14px;
}

.employee-active-pill {
  color: #176b3a;
  background: #e7f7ed;
}

.employee-inactive-pill {
  color: #8a2635;
  background: #fdecef;
}

.employee-availability-table {
  min-width: 560px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.settings-grid .site-toggle-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.settings-grid .site-toggle-control > span {
  min-width: 0;
  line-height: 1.35;
}

.settings-grid .site-toggle-control select {
  width: 92px;
  min-width: 92px;
  margin: 0;
  font-weight: 800;
  text-align: center;
}

.settings-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.template-field {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.template-field textarea {
  min-height: 70px;
  resize: vertical;
}

.clock-panel,
.clock-review-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.clock-panel {
  padding: 8px;
  border: 1px solid rgba(94, 234, 212, 0.24);
  border-radius: 8px;
  background: rgba(94, 234, 212, 0.08);
  font-size: 0.76rem;
}

.clock-review-panel {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.president-clock-override-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 640px) {
  .overview-notification,
  .employee-banishment-item,
  .location-directory-card-heading,
  .location-file-item,
  .location-file-upload-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .location-directory-meta {
    grid-template-columns: 1fr;
  }

  .time-off-request-collapsed > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .time-off-person-folder > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .availability-person-folder > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .time-off-person-folder-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .availability-person-folder-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .time-off-mini-reason,
  .time-off-mini-reviewed,
  .time-off-person-folder-latest,
  .availability-person-folder-latest {
    grid-column: 1 / -1;
  }

  .time-off-person-folder-latest,
  .availability-person-folder-latest {
    text-align: left;
  }

  .overview-notification time,
  .employee-banishment-item .button,
  .schedule-report summary > span {
    justify-self: stretch;
    text-align: left;
  }

  .mfa-setup-block form {
    grid-template-columns: 1fr;
  }

  .schedule-report summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .schedule-report {
    padding: 0;
  }

  .shift-report-section > .section-heading {
    grid-template-columns: 1fr;
  }

  .schedule-report-status {
    justify-self: stretch;
    min-width: 0;
    text-align: left;
  }

  .schedule-report-form > .button,
  .president-report-correction-form > .button {
    justify-self: stretch;
  }

  .availability-request-collapsed > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .availability-request-collapsed > summary span:last-child,
  .availability-person-folder-latest {
    grid-column: 1 / -1;
  }

  .shift-report-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .shift-report-toolbar .button,
  .shift-report-toolbar .schedule-person-filter {
    width: 100%;
  }

  .schedule-report-reminder .button,
  .confirmed-report-status .button {
    width: 100%;
  }

  .employee-records-table thead {
    display: none;
  }

  .employee-records-table {
    display: block;
    min-width: 0;
    background: transparent;
  }

  .employee-records-table tbody {
    display: grid;
    gap: 12px;
  }

  .employee-records-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #c1c7cf;
    border-radius: 10px;
    background: #e5e7eb;
  }

  .employee-records-table td {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 38px;
    border-width: 0 0 1px;
    padding: 7px;
    font-size: 0.72rem;
    text-align: right;
  }

  .employee-records-table td::before {
    content: attr(data-label);
    color: #4b5563;
    font-size: 0.62rem;
    text-align: left;
    text-transform: uppercase;
  }

  .employee-records-table td:first-child,
  .employee-records-table td:nth-child(2) {
    grid-column: auto;
    grid-template-columns: 1fr;
    border-bottom: 0;
    padding: 8px 5px;
  }

  .employee-records-table td:first-child::before,
  .employee-records-table td:nth-child(2)::before {
    display: none;
  }

  .employee-records-table td:last-child {
    border-bottom: 0;
  }

  .employee-records-table .button,
  .employee-record-back-button,
  .employee-record-screen .button-row .button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
  }

  .employee-record-screen > .section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .employee-detail-table-wrap {
    width: 100%;
  }

  .employee-detail-table {
    font-size: 0.72rem;
  }

  .employee-detail-table th,
  .employee-detail-table td {
    padding: 7px 6px;
  }

  .employee-availability-table {
    min-width: 0;
    font-size: 0.66rem;
  }

  .employee-availability-table th,
  .employee-availability-table td {
    padding: 6px 3px;
  }
}

.directory-table {
  width: 100%;
  border-collapse: collapse;
  background: #e5e7eb;
  color: #050505;
  font-size: 0.86rem;
}

.directory-table th,
.directory-table td {
  border: 1px solid #c1c7cf;
  padding: 8px 10px;
  text-align: left;
  font-weight: 700;
}

.directory-table th {
  background: #cfd3d8;
  color: #111111;
}

.directory-table tbody tr:nth-child(even) {
  background: #dfe3e8;
}

.location-files,
.location-file-item,
.location-file-upload-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.president-topbar-actions {
  flex-direction: column;
  align-items: flex-end;
}

.president-account-actions,
.president-quick-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.president-update-stack {
  display: grid;
  gap: 6px;
}

.president-quick-tab {
  position: relative;
  min-width: 118px;
  min-height: 38px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  overflow: visible;
}

.president-quick-tab summary {
  min-height: 36px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.president-quick-tab summary::-webkit-details-marker {
  display: none;
}

.president-quick-icon {
  font-size: 1rem;
  line-height: 1;
}

.president-quick-count {
  min-width: 20px;
  padding: 2px 5px;
  background: var(--sidebar);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.president-quick-label {
  white-space: nowrap;
}

.president-quick-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  width: min(360px, 85vw);
  display: none;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper-solid);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.president-quick-popover span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.president-quick-popover small {
  color: var(--accent-strong);
}

.president-valet-shortcut {
  width: 100%;
  min-height: 34px;
  text-decoration: none;
}

.president-updates-tab[open] .president-quick-popover,
.president-updates-tab:hover .president-quick-popover {
  display: grid;
}

.location-files {
  display: grid;
}

.location-file-upload-form input {
  max-width: 240px;
}

.employee-directory-wrap {
  max-height: 760px;
}

.employee-directory-wrap.employee-directory-admin {
  width: 100%;
  overflow-x: hidden;
}

.employee-directory-table.employee-directory-admin {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.employee-directory-table.employee-directory-admin th,
.employee-directory-table.employee-directory-admin td {
  padding: 7px 8px;
  overflow-wrap: anywhere;
}

.employee-directory-table.employee-directory-admin th:first-child,
.employee-directory-table.employee-directory-admin td:first-child {
  width: 24%;
}

.employee-directory-table.employee-directory-admin th:nth-child(2),
.employee-directory-table.employee-directory-admin td:nth-child(2) {
  width: 17%;
}

.employee-directory-table.employee-directory-admin th:nth-child(3),
.employee-directory-table.employee-directory-admin td:nth-child(3) {
  width: 37%;
}

.employee-directory-table.employee-directory-admin th:last-child,
.employee-directory-table.employee-directory-admin td:last-child {
  width: 22%;
}

.employee-directory-wrap.employee-directory-compact {
  width: 100%;
  max-width: 480px;
  overflow-x: hidden;
}

.employee-directory-table.employee-directory-compact {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 0.78rem;
}

.employee-directory-table.employee-directory-compact th,
.employee-directory-table.employee-directory-compact td {
  padding: 6px 8px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.employee-directory-table.employee-directory-compact th:first-child,
.employee-directory-table.employee-directory-compact td:first-child {
  width: 56%;
}

.employee-directory-table.employee-directory-compact th:last-child,
.employee-directory-table.employee-directory-compact td:last-child {
  width: 44%;
}

.phone-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.phone-number {
  flex-basis: 100%;
  user-select: text;
  white-space: nowrap;
}

.phone-action-link {
  border: 0;
  border-radius: 999px;
  padding: 3px 7px;
  background: #ffffff;
  color: #111111;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.phone-action-link:hover,
.phone-action-link:focus-visible {
  background: var(--accent);
  color: #050505;
}

.employee-records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.employee-record-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.employee-record-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.employee-record-card-heading > div,
.employee-record-card-details div {
  min-width: 0;
}

.employee-record-card-heading span {
  display: block;
  color: var(--muted);
}

.employee-record-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  margin: 0;
}

.employee-record-card-details dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.employee-record-card-details dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .employee-record-card-details {
    grid-template-columns: 1fr;
  }

  .employee-directory-table.employee-directory-admin {
    font-size: 0.64rem;
  }

  .employee-directory-table.employee-directory-admin th,
  .employee-directory-table.employee-directory-admin td {
    padding: 5px 4px;
  }

  .phone-action-link {
    padding: 3px 5px;
    font-size: 0.62rem;
  }
}

.schedule-sidebar-button-like {
  min-height: 64px;
  justify-content: center;
}

.availability-editor {
  display: grid;
  gap: 14px;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.availability-day {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.availability-day strong {
  font-size: 1rem;
}

.application-card {
  width: min(100%, 980px);
  margin: 0 auto;
}

.application-card > .section-heading {
  margin-bottom: 16px;
}

.application-card #job-application-form {
  gap: 12px;
}

.application-card .application-sms-consent-panel,
.checkbox-row.employee-sms-consent-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 4px 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  line-height: 1.5;
  cursor: pointer;
}

.sms-consent-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.sms-consent-copy > strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.sms-consent-copy > span {
  min-width: 0;
}

.sms-consent-links {
  color: var(--muted);
}

.sms-consent-links a {
  display: inline-block;
  font-weight: 800;
  white-space: nowrap;
}

.application-card textarea {
  min-height: 84px;
}

.application-card .availability-editor {
  border-block: 1px solid var(--line);
  padding-block: 14px;
}

.application-card .availability-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.application-card .availability-day {
  gap: 7px;
  padding: 9px;
}

.application-card .availability-day.is-unavailable .checkbox-row,
.application-card .availability-day.is-unavailable .field-row {
  display: none;
}

.application-card .availability-day.is-any-time .field-row {
  display: none;
}

.application-card #job-application-form > .button-secondary {
  min-height: 48px;
}

.application-received-screen {
  display: grid;
  gap: 8px;
  max-width: 680px;
  padding: 18px 0 6px;
}

.application-received-screen h2,
.application-received-screen p {
  margin: 0;
}

.inline-settings-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.applicant-list-compact {
  gap: 8px;
}

.applicant-follow-up-panel {
  margin-top: 12px;
}

.applicant-follow-up-panel > summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.applicant-follow-up-panel > summary span:first-child {
  display: grid;
  gap: 2px;
}

.applicant-follow-up-panel > summary small {
  color: var(--muted);
  font-size: 0.82rem;
}

.applicant-follow-up-list {
  padding-top: 10px;
}

.manager-assignment-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.manager-assignment-panel h3 {
  margin: 0;
}

.applicant-card-compact {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
}

.applicant-card-compact details {
  display: grid;
  gap: 8px;
}

.applicant-card-compact summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(140px, auto);
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.applicant-card-compact summary span:first-child {
  display: grid;
  gap: 2px;
}

.applicant-card-compact summary small {
  color: var(--muted);
  font-size: 0.82rem;
}

.applicant-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 6px 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.applicant-summary-grid p {
  margin: 0;
}

.applicant-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 240px);
  gap: 10px;
}

@media (max-width: 720px) {
  .inline-settings-form,
  .applicant-follow-up-panel > summary,
  .applicant-card-compact summary,
  .applicant-summary-grid,
  .applicant-controls {
    grid-template-columns: 1fr;
  }

  .applicant-card-compact .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.availability-request-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.availability-request-list {
  gap: 8px;
}

.availability-request-card {
  gap: 10px;
  padding: 12px 14px;
  font-size: 0.88rem;
}

.availability-request-collapsed {
  padding: 0;
}

.availability-request-collapsed > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  cursor: pointer;
}

.availability-request-collapsed > summary span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
}

.availability-request-collapsed > :not(summary) {
  margin: 0 12px 10px;
}

.availability-person-folder {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.availability-person-folder > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(140px, auto);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 0.8rem;
}

.availability-person-folder-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.availability-person-folder-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-person-folder-main small,
.availability-person-folder-latest {
  color: var(--muted);
  font-size: 0.76rem;
}

.availability-person-folder-latest {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.availability-person-folder-list {
  display: grid;
  gap: 6px;
  padding: 6px;
  border-top: 1px solid var(--line);
}

.availability-person-folder-list .availability-request-collapsed {
  border-radius: 6px;
}

.availability-person-folder-list .availability-request-collapsed > summary {
  min-height: 34px;
  padding: 6px 8px;
}

.availability-request-card.availability-status-denied {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.availability-status-denied .availability-status-pill {
  background: var(--danger);
  color: #ffffff;
}

.availability-request-card .document-actions {
  gap: 6px;
  margin: 4px 0 0;
}

.availability-request-card .button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.availability-request-card .availability-request-comparison h3 {
  margin: 0 0 6px;
  font-size: 0.86rem;
}

.availability-review-days {
  display: grid;
  gap: 5px;
}

.availability-review-days div {
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
}

.availability-review-days span {
  color: var(--muted);
  font-size: 0.86rem;
}

.shift-report-section > .section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: start;
  gap: 16px;
}

.shift-report-section > .section-heading > div:first-child {
  min-width: 0;
}

.shift-report-toolbar {
  display: grid;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.shift-report-toolbar .button,
.shift-report-location-filter,
.shift-report-location-filter select {
  width: 100%;
}

.shift-report-toolbar .button {
  min-height: 40px;
  justify-content: center;
}

.shift-report-location-filter {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.shift-report-location-filter span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shift-report-location-filter select {
  min-height: 40px;
  margin: 0;
}

.shift-report-audit {
  gap: 8px;
  margin-bottom: 12px;
}

.shift-report-audit-list {
  display: grid;
  gap: 6px;
}

.shift-report-audit-list div {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.shift-report-audit-list span {
  color: var(--muted);
  font-size: 0.82rem;
}

.president-schedule-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 12px;
  overflow-x: auto;
  margin-top: 22px;
}

.schedule-location-import-form {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.private-event-location-details {
  margin-top: 10px;
}

.schedule-member-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.schedule-member-dropdown {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.schedule-member-dropdown summary {
  cursor: pointer;
  font-weight: 600;
}

.schedule-member-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
}

.schedule-member-tools span {
  color: var(--muted);
  font-size: 0.86rem;
}

.schedule-member-tools .button {
  min-height: 34px;
  padding: 7px 12px;
}

.schedule-member-option {
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.schedule-member-option.is-selected {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.12);
}

.schedule-member-dropdown.is-editing .schedule-member-picker {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-height: 320px;
}

.schedule-manager-reassign {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.president-schedule-strip section {
  min-width: 140px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.president-schedule-strip h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.president-schedule-strip h3 span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.schedule-key {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.schedule-key.no-shift,
.schedule-cell.no-shift {
  background: rgba(185, 28, 28, 0.14);
  border-color: rgba(239, 68, 68, 0.45);
}

.schedule-key.working,
.schedule-cell.working {
  background: rgba(22, 163, 74, 0.16);
  border-color: rgba(34, 197, 94, 0.5);
}

.schedule-key.manager,
.schedule-cell.manager {
  background: rgba(202, 138, 4, 0.2);
  border-color: rgba(234, 179, 8, 0.62);
}

.schedule-week-table-wrap {
  overflow-x: auto;
}

.schedule-week-table {
  min-width: 1040px;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 8px;
}

.schedule-week-table th,
.schedule-week-table td {
  vertical-align: top;
  height: 1px;
  padding: 0;
}

.schedule-week-table thead th {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.15;
}

.schedule-week-table thead th span,
.schedule-member-heading span,
.schedule-cell span,
.schedule-cell small,
.schedule-report summary span {
  display: block;
}

.schedule-member-heading {
  min-width: 150px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  line-height: 1.2;
}

.schedule-member-heading span,
.schedule-cell small {
  color: var(--muted);
  font-weight: 500;
}

.schedule-cell {
  height: 100%;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  font-size: 0.86rem;
  line-height: 1.24;
}

.schedule-cell.no-shift {
  display: grid;
  place-items: center;
}

.schedule-x {
  color: var(--danger);
  font-size: 1.4rem;
  font-weight: 800;
}

.schedule-cell-shift {
  display: grid;
  gap: 5px;
}

.schedule-cell-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.schedule-cell-actions .button {
  padding: 7px 10px;
  font-size: 0.8rem;
}

.schedule-week-table.compact .schedule-cell {
  min-height: 58px;
}

.schedule-report {
  display: block;
}

.schedule-report-reminder,
.confirmed-report-status,
.submitted-report-status {
  gap: 8px;
}

.schedule-report-reminder .button,
.confirmed-report-status .button {
  width: fit-content;
  min-height: 32px;
  padding: 7px 12px;
  font-size: 0.78rem;
}

.schedule-admin-details,
.schedule-location-week,
.schedule-tally-details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.schedule-admin-details summary,
.schedule-location-week summary,
.schedule-tally-details summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-admin-details summary h3 {
  margin: 0;
}

.location-settings-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.location-settings-guide-grid div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.location-settings-guide-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.schedule-editable-week {
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 94%, #000);
}

.schedule-editable-week > summary {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--sidebar) 82%, #000);
}

.schedule-editable-week-draft > summary {
  box-shadow: inset 4px 0 0 var(--warn);
}

.schedule-editable-week-published > summary {
  box-shadow: inset 4px 0 0 var(--accent);
}

.schedule-editable-week .schedule-week-table-wrap {
  padding: 10px;
}

.schedule-editable-week .schedule-cell {
  min-height: 118px;
}

.schedule-editable-week .schedule-cell-shift {
  padding: 7px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
}

.schedule-editable-week .published-schedule-day {
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.schedule-editable-week .published-schedule-day .schedule-day-split {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.schedule-editable-week .published-schedule-day .schedule-day-split-column {
  width: 100%;
  padding: 8px;
  border-width: 2px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.schedule-editable-week .published-schedule-day .schedule-day-split-column:first-child {
  border-color: color-mix(in srgb, #f59e0b 68%, var(--line));
}

.schedule-editable-week .published-schedule-day .schedule-day-split-column:last-child {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
}

.schedule-editable-week .published-schedule-day .schedule-day-split-label {
  display: block;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.published-schedule-shift-card {
  min-width: 0;
  padding: 8px !important;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--panel) 94%, #000) !important;
}

.published-shift-report-status {
  padding: 5px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 800;
}

.published-shift-report-status.is-pending {
  background: color-mix(in srgb, var(--warn) 17%, transparent);
  color: var(--muted);
}

.published-shift-report-summary {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.published-shift-report-summary > strong {
  font-size: 0.7rem;
}

.published-shift-report-person {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 0.66rem;
  line-height: 1.2;
}

.published-shift-report-person span:first-child {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.published-shift-report-person span:not(:first-child) {
  min-width: 0;
  color: var(--muted);
}

.published-shift-report-person span:last-child {
  text-align: right;
}

.final-schedule-manager-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-top: 4px;
}

.final-schedule-manager-panel label {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-size: 0.72rem;
}

.final-schedule-manager-panel label:first-child {
  grid-column: 1 / -1;
}

.final-schedule-manager-panel span {
  color: #374151;
}

.final-schedule-manager-panel select,
.final-schedule-manager-panel input {
  width: 100%;
  min-width: 0;
  padding: 6px;
  font-size: 0.78rem;
}

.schedule-created-week {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.schedule-template-builder,
.final-schedule-layout {
  display: grid;
  gap: 14px;
}

.schedule-template-location-row {
  display: grid;
  gap: 6px;
  max-width: 520px;
}

.schedule-template-location-sections {
  display: grid;
  gap: 18px;
}

.schedule-template-location-section {
  display: grid;
  gap: 8px;
}

.schedule-template-grid-wrap,
.final-schedule-grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, #fff);
}

.schedule-template-grid {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.schedule-template-grid th,
.schedule-template-grid td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

.schedule-template-grid thead th {
  background: color-mix(in srgb, var(--sidebar) 82%, #fff);
}

.schedule-template-location-heading {
  width: 145px;
}

.schedule-template-location-heading span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.schedule-template-cell {
  min-width: 118px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 2px transparent;
}

.schedule-template-cell label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.15;
}

.schedule-template-cell input,
.schedule-template-cell select,
.final-schedule-shift input,
.final-schedule-shift select {
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 0;
}

.schedule-template-time {
  width: 150px;
  min-width: 150px;
}

.schedule-template-cell-controls,
.final-schedule-time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.schedule-template-count {
  width: 54px;
}

.schedule-template-type {
  width: 44px;
}

.schedule-template-cell.is-complete {
  box-shadow: inset 0 0 0 3px #15803d;
}

.schedule-template-cell.is-invalid {
  background: rgba(239, 68, 68, 0.35);
  box-shadow: inset 0 0 0 3px #b91c1c;
}

.schedule-template-submit {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  text-align: center;
}

.schedule-template-submit-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.schedule-template-submit .button {
  width: min(220px, 100%);
}

.final-schedule-layout {
  grid-template-columns: minmax(0, 1fr) minmax(154px, 176px);
  align-items: start;
  justify-content: center;
}

.final-schedule-grid-wrap {
  min-width: 0;
}

.final-schedule-table {
  width: 100%;
  table-layout: fixed;
  min-width: 0;
}

.final-schedule-table th,
.final-schedule-table td {
  min-width: 0;
  overflow: visible;
}

.final-schedule-location-heading {
  width: 132px;
}

.final-schedule-day {
  min-height: 130px;
  padding: 0;
  border-radius: 0;
  background: linear-gradient(135deg, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px));
}

.final-schedule-day .schedule-day-split {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-items: center;
  gap: 9px;
}

.final-schedule-day .schedule-day-split-column {
  justify-items: stretch;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.final-schedule-day .schedule-day-split-label {
  padding: 0 2px;
}

.final-schedule-day .schedule-day-split-column > .final-schedule-shift {
  width: 100%;
}

.final-schedule-shift {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: min(100%, 160px);
  justify-self: center;
  padding: 7px;
  border: 2px solid #b91c1c;
  background: rgba(255, 255, 255, 0.74);
  color: #111827;
}

.final-schedule-shift-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.12;
}

.final-schedule-shift-summary span {
  display: inline-flex;
  align-items: center;
}

.final-schedule-shift-summary span + span::before {
  content: "|";
  margin-right: 4px;
  color: #4b5563;
  font-weight: 700;
}

.final-schedule-shift.is-saved {
  border-color: #15803d;
}

.final-schedule-shift.is-saving {
  border-color: #f59e0b;
}

.final-schedule-shift.is-error {
  border-color: #dc2626;
  background: rgba(254, 226, 226, 0.95);
}

.final-schedule-time-row {
  grid-template-columns: minmax(48px, 1fr) 8px minmax(48px, 1fr);
  gap: 4px;
  align-items: center;
  justify-items: stretch;
}

.final-schedule-member-select,
.final-schedule-manager-select,
.final-schedule-manager-pay-type {
  width: 100%;
}

.final-schedule-shift input,
.final-schedule-shift select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 27px;
  padding: 4px 5px;
  font-size: 0.66rem;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.final-schedule-shift input[type="time"] {
  width: 100%;
  min-width: 0;
  padding-inline: 4px;
  font-size: 0.62rem;
}

.final-schedule-save-state {
  min-height: 16px;
  color: #991b1b;
  font-size: 0.72rem;
}

.final-schedule-shift.is-saved .final-schedule-save-state {
  color: #166534;
}

.final-schedule-filters {
  display: grid;
  gap: 8px;
  font-size: 0.82rem;
}

.final-schedule-employee-list {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
}

.final-schedule-list-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.final-schedule-list-modes .button {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.72rem;
}

.final-schedule-employee-row {
  display: grid;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.final-schedule-employee-row:last-child {
  border-bottom: 0;
}

.final-schedule-employee-row strong {
  color: var(--text);
  font-size: 0.82rem;
}

.final-schedule-employee-row span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.schedule-final-actions {
  justify-content: end;
}

.schedule-builder-filter-controls {
  display: grid;
  gap: 8px;
}

.schedule-already-scheduled-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-already-scheduled-control span {
  color: var(--muted);
  font-size: 0.84rem;
}

.schedule-member-option.is-already-scheduled {
  border-left: 3px solid var(--warn);
  padding-left: 8px;
}

.schedule-member-option.is-unavailable {
  border-left: 3px solid var(--danger);
  padding-left: 8px;
  background: rgba(185, 28, 28, 0.08);
}

.schedule-member-option.is-already-scheduled.is-unavailable {
  border-left-color: var(--warn);
}

.schedule-created-week-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.schedule-created-week-heading > div,
.schedule-created-week-heading label {
  display: grid;
  gap: 5px;
}

.schedule-created-week-heading span {
  color: var(--muted);
  font-size: 0.82rem;
}

.schedule-created-week-heading label {
  width: min(360px, 100%);
}

.schedule-location-week-table .schedule-member-heading {
  width: 160px;
}

.schedule-location-week-table .schedule-cell {
  min-height: 150px;
}

.schedule-location-week-table .schedule-cell-shift + .schedule-cell-shift {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.president-location-schedule {
  display: grid;
  gap: 12px;
}

.schedule-report summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) minmax(160px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.schedule-report-form input {
  min-width: 80px;
}

.overview-notification-strip {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.overview-notification {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.045);
}

.overview-notification div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.overview-notification strong,
.overview-notification span {
  overflow-wrap: anywhere;
}

.overview-notification span,
.overview-notification time {
  color: var(--muted);
  font-size: 0.82rem;
}

.overview-notification-dismiss {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.overview-notification-dismiss:hover,
.overview-notification-dismiss:focus-visible {
  border-color: var(--accent);
  color: var(--accent-strong);
  outline: none;
}

.overview-notification-request {
  border-left-color: var(--warn);
}

.overview-notification-shift-exchange {
  border-left-color: #38bdf8;
}

.employee-banishment-panel {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.compact-heading {
  margin-bottom: 0;
}

.employee-banishment-list {
  display: grid;
  gap: 8px;
}

.employee-banishment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(239, 68, 68, 0.08);
}

.employee-banishment-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.employee-banishment-item span,
.employee-banishment-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.time-off-request-collapsed,
.availability-request-collapsed {
  min-height: 38px;
}

.time-off-request-collapsed {
  padding: 0;
  border-radius: 7px;
}

.time-off-request-collapsed > summary {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(120px, 1fr) minmax(150px, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 0.78rem;
}

.time-off-mini-main,
.time-off-mini-reason,
.time-off-mini-reviewed {
  min-width: 0;
}

.time-off-mini-main {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-off-mini-main strong,
.time-off-mini-main span,
.time-off-mini-reason,
.time-off-mini-reviewed {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-off-mini-main span,
.time-off-mini-reason,
.time-off-mini-reviewed {
  color: var(--muted);
  font-size: 0.78rem;
}

.time-off-request-collapsed > :not(summary) {
  margin: 0 8px 8px;
}

.time-off-person-folder {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.time-off-person-folder > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(140px, auto);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  cursor: pointer;
  font-size: 0.8rem;
}

.time-off-person-folder-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.time-off-person-folder-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-off-person-folder-main small,
.time-off-person-folder-latest {
  color: var(--muted);
  font-size: 0.76rem;
}

.time-off-person-folder-latest {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-off-person-folder-list {
  display: grid;
  gap: 6px;
  padding: 6px;
  border-top: 1px solid var(--line);
}

.time-off-person-folder-list .time-off-request-collapsed {
  border-radius: 6px;
}

.time-off-person-folder-list .time-off-request-collapsed > summary {
  min-height: 32px;
  padding: 5px 7px;
}

.mfa-setup-block {
  display: grid;
  gap: 12px;
}

.mfa-setup-block-overview {
  margin-top: 22px;
}

.mfa-setup-block .section-heading {
  margin-bottom: 0;
}

.mfa-setup-block .notice-item {
  margin: 0;
}

.mfa-setup-block form {
  display: grid;
  grid-template-columns: minmax(150px, 220px) auto;
  align-items: end;
  gap: 10px;
}

.security-secret {
  display: block;
  overflow-wrap: anywhere;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.schedule-report {
  padding: 0;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.schedule-report.notice-item {
  padding: 0;
}

.schedule-report summary {
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid transparent;
  list-style: none;
}

.schedule-report[open] summary {
  border-bottom-color: var(--line);
}

.schedule-report summary::-webkit-details-marker {
  display: none;
}

.schedule-report-summary-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.schedule-report-summary-main strong,
.schedule-report-summary-main span,
.schedule-report-summary-address .location-address {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-report-summary-main span,
.schedule-report-summary-address .location-address {
  color: var(--muted);
  font-size: 0.82rem;
}

.schedule-report-summary-address {
  min-width: 0;
}

.schedule-report-status {
  justify-self: end;
  min-width: 118px;
  border-color: rgba(255, 255, 255, 0.18);
  text-align: right;
  white-space: nowrap;
}

.schedule-report-form,
.president-report-correction-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.schedule-report-form .table-wrap,
.president-report-correction-form .table-wrap {
  margin: 0;
}

.schedule-report-form .button,
.president-report-correction-form .button,
.submitted-report-status .button,
.confirmed-report-status .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  line-height: 1;
}

.schedule-report-form > .button,
.president-report-correction-form > .button {
  justify-self: end;
}

.warning-row td {
  color: var(--warn);
  background: rgba(251, 146, 60, 0.09);
}

.document-folder-form,
.document-upload-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 16px;
}

.document-upload-form {
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr) auto;
}

.document-upload-wide {
  grid-column: 1 / -1;
}

.document-folder-group {
  display: grid;
  gap: 10px;
}

.document-folder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.document-folder-heading h3,
.document-folder-heading p {
  margin: 0;
}

.document-folder-files {
  display: grid;
  gap: 12px;
}

.document-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 14px;
}

.document-item summary {
  cursor: pointer;
  font-weight: 500;
}

.document-meta {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.document-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0;
}

.document-actions a {
  text-decoration: none;
}

.document-folder-move {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.document-frame {
  width: 100%;
  min-height: 620px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.warning-item,
.notice-item {
  border-left: 4px solid var(--warn);
  background: rgba(251, 146, 60, 0.09);
  padding: 12px 14px;
  border-radius: 12px;
}

.notice-item.good {
  border-left-color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
}

.valet-dismissible-notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.valet-dismissible-notice > span {
  min-width: 0;
}

.valet-notice-dismiss {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin: -6px -8px -6px 0;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.payroll-tool > summary,
.payroll-employee-stat > summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.payroll-tool > summary span,
.payroll-employee-stat > summary span {
  color: var(--muted);
  font-size: 0.86rem;
}

.payroll-employee-stats,
.payroll-equation-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.payroll-test-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.payroll-test-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.payroll-test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.payroll-test-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.payroll-test-results,
.payroll-test-card-grid {
  display: grid;
  gap: 12px;
}

.payroll-test-summary {
  display: grid;
  gap: 10px;
}

.payroll-test-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.payroll-test-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.payroll-test-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.payroll-test-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payroll-test-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.payroll-export-actions {
  display: grid;
  gap: 12px;
  align-items: start;
  grid-template-columns: minmax(240px, 1fr) auto;
}

.payroll-options-panel {
  max-width: 260px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #ffffff;
  color: #111827;
}

.payroll-options-panel h3 {
  margin: 0 0 12px;
  font-size: 0.98rem;
  color: #111827;
}

.payroll-options-panel ul {
  margin: 0;
  padding-left: 16px;
}

.payroll-options-panel li {
  margin: 3px 0;
}

.link-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--accent);
}

.payroll-week-viewer {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(220px, 320px) minmax(180px, 1fr);
  gap: 14px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
}

.payroll-week-viewer > div:last-child {
  display: grid;
  gap: 4px;
}

.payroll-week-viewer span {
  color: #374151;
  font-size: 0.82rem;
  font-weight: 700;
}

.payroll-week-viewer label,
.payroll-week-viewer strong {
  color: #111827;
}

.payroll-week-viewer select {
  background: #f8fafc;
  color: #111827;
}

.payroll-week-status {
  display: grid;
  gap: 12px;
}

.payroll-week-status h3 {
  margin: 8px 0 0;
}

.payroll-status-table th,
.payroll-status-table td {
  white-space: nowrap;
}

.payroll-status-table td[colspan] {
  white-space: normal;
  font-weight: 700;
}

.payroll-week-picker {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payroll-week-picker legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.payroll-week-picker label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

@media (max-width: 760px) {
  .payroll-export-actions {
    grid-template-columns: 1fr;
  }

  .payroll-week-viewer {
    grid-template-columns: 1fr;
  }

  .payroll-test-toolbar {
    grid-template-columns: 1fr;
  }
}

.payroll-equation-list > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.payroll-equation-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.payroll-equation-total {
  color: var(--accent-strong);
  font-size: 1.02rem;
}

.state-wage-table input,
.state-wage-table select {
  min-width: 120px;
}

.state-wage-table th:last-child,
.state-wage-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.state-wage-add-row {
  align-items: end;
}

#schedule-time-off-warning {
  display: grid;
  gap: 5px;
}

#schedule-time-off-warning.hidden {
  display: none;
}

#schedule-time-off-warning strong {
  color: var(--warn);
}

.time-off-group {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.time-off-group-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.time-off-group-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.time-off-request-list {
  gap: 8px;
}

.time-off-request-card {
  gap: 10px;
  padding: 12px 14px;
  font-size: 0.88rem;
}

.time-off-request-collapsed.time-off-request-card {
  gap: 0;
  padding: 0;
}

.time-off-request-card.time-off-status-denied {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.time-off-request-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.time-off-status-denied .time-off-status-pill {
  background: var(--danger);
  color: #ffffff;
}

.time-off-request-details {
  display: grid;
  gap: 7px;
}

.time-off-request-details div {
  display: grid;
  grid-template-columns: minmax(82px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
}

.time-off-request-details div > strong {
  color: var(--muted);
}

.time-off-request-card .document-actions {
  gap: 6px;
  margin: 4px 0 0;
}

.time-off-request-card .button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.president-report-correction-form {
  display: grid;
  gap: 10px;
}

.site-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.site-color-field {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.site-color-field input[type="color"] {
  width: 52px;
  min-height: 38px;
  padding: 3px;
  cursor: pointer;
}

.site-metrics-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.site-metric-group {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.site-metric-group h4 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.site-metric-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.site-metric-card {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  min-height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.site-metric-card > span {
  min-height: 34px;
  line-height: 1.25;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-metric-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.site-metric-input-row input {
  width: 100%;
  min-height: 42px;
  text-align: right;
  font-size: 1.05rem;
  font-weight: 700;
}

.site-metric-input-row small {
  min-width: 58px;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-metric-card em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

@media (max-width: 820px) {
  .site-metrics-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-metric-group-grid,
  .site-metric-input-row {
    grid-template-columns: 1fr;
  }

  .site-metric-card {
    min-height: auto;
  }

  .site-metric-card > span {
    min-height: 0;
  }

  .site-metric-input-row input {
    text-align: left;
  }

  .site-metric-input-row small {
    min-width: 0;
  }
}

/* Ticket tiles stay square; the selected ticket renders in its own panel. */
.valet-board.valet-tile-board {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
  box-sizing: border-box;
  padding: 6px;
  overflow: visible;
}

.valet-board.valet-tile-board .valet-ticket-tile {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 5px 2px;
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  appearance: none;
}

.valet-board.valet-tile-board .valet-manual-transmission-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: clamp(0.66rem, 2.5vw, 0.9rem);
  line-height: 1;
  filter: saturate(0.9);
}

.valet-board.valet-tile-board .valet-ticket-tile .valet-tile-number {
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(0.76rem, 3.4vw, 1.08rem);
  font-weight: 900;
  text-overflow: ellipsis;
}

.valet-board.valet-tile-board .valet-ticket-tile .valet-tile-elapsed {
  max-width: 100%;
  overflow: hidden;
  color: var(--accent-strong, #facc15);
  font-size: clamp(0.58rem, 2.5vw, 0.78rem);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.valet-board.valet-tile-board .valet-ticket-tile.is-selected {
  z-index: 2;
  outline: none;
  box-shadow:
    0 0 0 3px var(--valet-focus-edge, #f8fafc),
    0 0 0 5px var(--valet-focus-contrast, rgba(15, 23, 42, 0.96)) !important;
}

.valet-board.valet-tile-board .valet-ticket-tile.requested {
  background: rgba(37, 99, 235, 0.5);
  color: #fff;
}

.valet-board.valet-tile-board .valet-ticket-tile.retrieving {
  background: #facc15;
  color: #111827;
}

.valet-board.valet-tile-board .valet-ticket-tile.retrieving .valet-tile-number,
.valet-board.valet-tile-board .valet-ticket-tile.retrieving .valet-tile-elapsed,
.valet-board.valet-tile-board .valet-ticket-tile.retrieving .valet-manual-transmission-badge {
  color: #111827;
  text-shadow: none;
}

.valet-selected-ticket-panel {
  display: grid;
  gap: 14px;
  margin-top: 10px;
  padding: 14px 0 0;
  border-top: 2px solid var(--line);
  scroll-margin-top: 76px;
}

.valet-selected-ticket-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.08rem;
}

.valet-selected-ticket-close {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.valet-selected-ticket-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
  margin: 0;
}

.valet-selected-ticket-facts > div {
  display: grid;
  grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
  gap: 8px;
}

.valet-selected-ticket-facts dt {
  font-weight: 800;
}

.valet-selected-ticket-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.valet-selected-ticket-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(100px, 1fr);
  grid-template-rows: 1fr;
  gap: 4px;
  overflow-x: auto;
  padding: 3px 3px 5px;
  scroll-padding-inline: 3px;
}

.valet-forgotten-item-alert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.valet-forgotten-item-copy {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.3rem;
}

.valet-forgotten-item-dismiss {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.valet-forgotten-item-dismiss:hover,
.valet-forgotten-item-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(1.05);
}

.valet-forgotten-item-dismiss:disabled {
  cursor: wait;
  opacity: 0.55;
}

.valet-crew-alerts {
  position: fixed;
  z-index: 1300;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  width: min(520px, calc(100vw - 24px));
  gap: 8px;
  pointer-events: none;
  transform: translateX(-50%);
}

.valet-crew-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 10px 11px 12px;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  background: #2a1b08;
  color: #fff7ed;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48);
  pointer-events: auto;
  animation: valet-forgotten-alert-expire 5s linear forwards;
}

@keyframes valet-forgotten-alert-expire {
  0%,
  92% {
    visibility: visible;
    opacity: 1;
  }

  100% {
    visibility: hidden;
    opacity: 0;
  }
}

.valet-crew-alert > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.valet-crew-alert strong,
.valet-crew-alert span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.valet-crew-alert > div > span {
  color: #fde68a;
  font-size: 0.82rem;
}

.valet-crew-alert-icon {
  font-size: 1.35rem;
}

.valet-crew-alert-dismiss {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.valet-selected-ticket-actions .button {
  min-width: 100px;
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 8px 5px;
  text-align: center;
}

.valet-repark-button {
  border-color: #a78bfa;
  color: #ede9fe;
}

.valet-theme-light .valet-repark-button {
  border-color: #7c3aed;
  background: #ffffff;
  color: #4c1d95;
  -webkit-text-fill-color: #4c1d95;
}

.valet-warning-button {
  border-color: #f59e0b;
  background: #f59e0b;
  color: #111827;
}

.valet-void-button {
  border-color: #ef4444;
  background: #b91c1c;
  color: #ffffff;
}

.valet-theme-light .valet-void-button {
  border-color: #991b1b;
  background: #b91c1c;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

.valet-report-ticket-box.is-voided {
  border-color: color-mix(in srgb, #ef4444 62%, var(--line));
  opacity: 0.88;
}

.valet-action-required {
  position: relative;
  z-index: 3;
  outline: none !important;
  box-shadow:
    inset 0 0 0 3px var(--valet-focus-edge, #f8fafc),
    inset 0 0 0 5px var(--valet-focus-contrast, rgba(15, 23, 42, 0.96)),
    0 0 0 2px var(--valet-focus-edge, #f8fafc) !important;
}

.valet-selected-ticket-editor {
  border: 1px solid var(--line);
}

.valet-selected-ticket-editor > summary {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 14px 14px;
  cursor: pointer;
  font-weight: 800;
}

.valet-selected-ticket-editor .valet-update-button {
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 900;
}

.valet-ticket-quick-actions-help {
  margin: 0;
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  .valet-board.valet-tile-board {
    gap: 4px;
  }

  .valet-selected-ticket-facts {
    grid-template-columns: minmax(0, 1fr);
    font-size: 0.9rem;
  }
}

/* Compact live valet board: five tickets remain visible across a phone row. */
.valet-tile-board {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.valet-ticket-tile > summary {
  min-height: 58px;
  gap: 5px;
  padding: 6px 3px;
}

.valet-ticket-tile > summary .valet-tile-number {
  max-width: 100%;
  font-size: clamp(0.82rem, 3.5vw, 1.08rem);
  text-align: center;
}

.valet-ticket-tile > summary .valet-tile-elapsed {
  align-self: end;
  color: var(--accent-strong, #facc15);
  font-size: clamp(0.68rem, 2.8vw, 0.82rem);
  line-height: 1;
}

.valet-ticket-primary-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.valet-ticket-primary-fields > div,
.valet-ticket-secondary-fields {
  display: grid;
  gap: 7px;
}

.valet-ticket-primary-notes {
  grid-column: 1 / -1;
}

.valet-ticket-secondary-fields {
  grid-template-columns: minmax(0, 1fr);
}

/* Freeze the page behind Arrival while iOS resizes its visual viewport. */
body.valet-arrival-viewport-lock {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html:has(body.valet-arrival-viewport-lock) {
  overflow: hidden;
  overscroll-behavior: none;
}

body.valet-arrival-viewport-lock .valet-arrival-modal {
  top: var(--valet-arrival-visual-top, 50%);
  max-height: var(--valet-arrival-visual-height, calc(100dvh - 12px));
  scroll-padding-block: 64px 56px;
}

body.valet-arrival-keyboard-open .valet-arrival-modal {
  height: var(--valet-arrival-visual-height, auto);
}

@media (max-width: 420px) {
  .valet-tile-board {
    gap: 4px;
  }

  .valet-ticket-tile > summary {
    min-height: 54px;
    padding-inline: 2px;
  }

  .valet-ticket-detail {
    padding: 9px;
  }
}

.site-settings-actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.portal-access-settings {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.portal-access-level-list {
  display: grid;
  gap: 12px;
}

.portal-access-editor {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.portal-access-editor > summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  font-weight: 800;
}

.portal-access-level-form {
  padding: 0 12px 14px;
}

.portal-access-section-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.portal-access-section-groups fieldset {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
}

.portal-access-section-groups legend {
  padding: 0 5px;
  font-weight: 800;
}

.portal-access-section-groups .checkbox-row {
  margin: 0;
}

.portal-assignment-heading {
  margin-top: 10px;
}

.portal-access-assignment-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.portal-access-assignment-row > div {
  display: grid;
  gap: 3px;
}

.portal-access-assignment-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.portal-access-assignment-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.portal-access-search {
  display: grid;
  gap: 6px;
}

.portal-access-employee-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.portal-access-employee-option {
  align-items: start;
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.portal-access-employee-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
}

.portal-access-employee-option span,
.portal-access-employee-option small {
  display: grid;
  gap: 2px;
}

.portal-access-assignment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-access-removal-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.portal-access-removal-panel form {
  display: grid;
  gap: 12px;
}

.portal-access-removal-panel .button {
  width: fit-content;
}

.portal-access-overview-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.portal-access-overview-panel > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

.portal-access-overview-panel > summary::-webkit-details-marker {
  display: none;
}

.portal-access-overview-panel > summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.portal-access-overview-panel > summary small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.portal-access-overview-panel[open] > summary .pill {
  background: rgba(255, 255, 255, 0.12);
}

.portal-access-overview-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.portal-access-overview-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
}

.portal-access-overview-group header,
.portal-access-overview-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.portal-access-overview-group h4 {
  margin: 0;
}

.portal-access-overview-list {
  display: grid;
  gap: 8px;
}

.portal-access-overview-item {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.portal-access-overview-item > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.portal-access-overview-item span,
.portal-access-overview-item small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.portal-access-overview-item > div:last-child {
  text-align: right;
}

.valet-module {
  --valet-arrival-background: #111417;
  --valet-focus-edge: #f8fafc;
  --valet-focus-contrast: rgba(15, 23, 42, 0.96);
  display: grid;
  gap: 18px;
}

.valet-module.valet-theme-dark {
  --accent: #e7c91a;
  --accent-strong: #ffe33d;
  --panel: #101214;
}

.valet-module.valet-theme-dark .valet-command-header h2,
.valet-module.valet-theme-dark .valet-overlay-panel h3,
.valet-module.valet-theme-dark .valet-fast-heading h3 {
  color: #ffe33d;
}

.valet-scan-pill {
  background: rgba(94, 234, 212, 0.15);
  color: var(--accent-strong);
}

.valet-workflow,
.valet-board {
  display: grid;
  gap: 14px;
}

.valet-workflow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.valet-workflow-step,
.valet-ticket {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 14px;
}

.valet-workflow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.valet-workflow-step p {
  margin: 6px 0 0;
}

.valet-workflow-dot {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.valet-checkin-form {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.valet-fast-heading {
  border: 1px solid rgba(94, 234, 212, 0.42);
  background: rgba(94, 234, 212, 0.08);
  border-radius: 8px;
  padding: 16px;
}

.valet-fast-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.valet-fast-heading h3,
.valet-fast-heading p {
  margin: 0;
}

.valet-qr-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 16px;
}

.valet-qr-panel h3,
.valet-qr-panel p {
  margin: 0;
}

.valet-qr-actions {
  display: flex;
  align-items: end;
}

.valet-qr-output {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.valet-qr-output img {
  width: 160px;
  height: 160px;
  padding: 8px;
  border-radius: 12px;
  background: #ffffff;
}

.valet-scan-assignment {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(94, 234, 212, 0.42);
  background: rgba(94, 234, 212, 0.08);
  border-radius: 18px;
  padding: 16px;
}

.valet-scan-assignment h3,
.valet-scan-assignment p {
  margin: 0;
}

.valet-board {
  grid-template-columns: repeat(auto-fill, minmax(88px, 112px));
  align-items: start;
}

.valet-ticket,
.valet-ticket-tile {
  display: grid;
  gap: 12px;
}

.valet-ticket-tile {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
  transition: none;
}

.valet-ticket-tile:active {
  transform: none;
  filter: none;
  opacity: 1;
}

.valet-ticket-tile:focus:not(:focus-visible) {
  outline: none;
}

.valet-ticket-tile[open] {
  grid-column: 1 / -1;
}

.valet-ticket-tile summary {
  min-height: 72px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px;
  cursor: pointer;
  list-style: none;
}

.valet-ticket-tile summary::-webkit-details-marker {
  display: none;
}

.valet-ticket-tile summary span {
  font-size: 1.1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.valet-ticket-tile .valet-tile-number {
  font-size: 1.28rem;
  line-height: 1;
}

.valet-ticket-tile .valet-tile-elapsed {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.valet-ticket-tile.payment-complete {
  border: 2px solid #22c55e !important;
  box-shadow: none;
}

.valet-ticket-tile.payment-unpaid {
  border: 2px solid #ef4444 !important;
  box-shadow: none;
}

.valet-ticket-tile.payment-tipped {
  border: 2px solid #facc15 !important;
  box-shadow: none;
}

.valet-ticket-tile.payment-complimentary {
  border: 2px solid #94a3b8 !important;
  box-shadow: none;
}

.valet-inline-shift-history {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}

.valet-inline-shift-history h3,
.valet-inline-shift-history p {
  margin: 0;
}

.valet-inline-shift-history details {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.valet-ticket-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.valet-ticket-facts > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  background: var(--panel);
}

.valet-ticket-facts dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; }
.valet-ticket-facts dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }

.valet-ticket-detail {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px;
}

.valet-ticket.requested,
.valet-ticket.retrieving,
.valet-ticket-tile.requested,
.valet-ticket-tile.retrieving {
  border-color: rgba(96, 165, 250, 0.58);
}

.valet-ticket.ready,
.valet-ticket-tile.ready {
  background: linear-gradient(145deg, #6d28d9, #4c1d95);
  color: #fff;
}

.valet-board.valet-tile-board .valet-ticket-tile.ready {
  box-shadow: none;
}

.valet-ticket-tile.ready .valet-tile-elapsed {
  color: #ede9fe;
}

.valet-ticket-tile.requested > summary { background: rgba(37, 99, 235, 0.5); color: #fff; }
.valet-ticket-tile.retrieving > summary { background: #facc15; color: #111827; }
.valet-ready-checkmark {
  position: absolute;
  top: 5px;
  left: 7px;
  color: #f5f3ff;
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.35);
}

.valet-ticket-number-attention {
  animation: valet-ticket-number-attention 1.2s ease-in-out infinite;
}

.valet-ticket-tile.parking-overdue {
  animation: valet-parking-overdue 1s ease-in-out infinite;
  border-color: #ef4444 !important;
}

@keyframes valet-ticket-number-attention {
  0%, 100% { color: inherit; text-shadow: none; }
  50% { color: #fff; text-shadow: 0 0 10px #facc15, 0 0 18px #facc15; }
}

@keyframes valet-parking-overdue {
  0%, 100% { background: rgba(127, 29, 29, 0.2); box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3); }
  50% { background: rgba(220, 38, 38, 0.72); box-shadow: 0 0 18px rgba(239, 68, 68, 0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .valet-ticket-number-attention,
  .valet-ticket-tile.parking-overdue {
    animation: none;
  }
}

.app-confirmation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.76);
}

.app-confirmation-sheet {
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel, #151719);
  color: var(--ink, #f8fafc);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.app-confirmation-sheet h2,
.app-confirmation-sheet p {
  margin: 0;
  white-space: pre-line;
}

.app-confirmation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app-confirmation-actions .button {
  min-height: 52px;
  font-size: 1rem;
}

.app-confirmation-actions .app-confirmation-accept:only-child {
  grid-column: 1 / -1;
}

.valet-checkout-tip-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
}

.valet-checkout-tip-input input {
  min-height: 52px;
  font-size: 1.2rem;
}

@media (max-width: 540px) {
  .app-confirmation-backdrop {
    align-items: end;
    padding: 0;
  }

  .app-confirmation-sheet {
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  }
}

.valet-ticket-heading,
.valet-ticket-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.valet-ticket-heading h3 {
  margin: 8px 0 0;
}

.valet-ticket p {
  margin: 0;
}

.valet-ticket textarea {
  min-height: 78px;
}

.valet-save-message {
  margin: 0;
}

.pill.valet-status-neutral {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
}

.pill.valet-status-parked {
  background: rgba(124, 58, 237, 0.16);
  color: #c4b5fd;
}

.pill.valet-status-requested {
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
}

.pill.valet-status-ready {
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}

.danger-text {
  color: var(--danger);
}

.dropped-row {
  background: var(--danger-soft);
  color: #7f1d1d;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: auto;
}

.auth-form {
  align-self: center;
}

.public-valet-card {
  max-width: 720px;
  margin: 0 auto;
}

.public-valet-card[class*="public-valet-theme-"] {
  color: var(--guest-text);
  border-color: color-mix(in srgb, var(--guest-accent) 55%, transparent);
  background: linear-gradient(145deg, var(--guest-surface), var(--guest-background));
  box-shadow: 0 28px 80px color-mix(in srgb, var(--guest-background) 72%, transparent);
}

.public-valet-card[class*="public-valet-theme-"] .muted { color: color-mix(in srgb, var(--guest-text) 68%, transparent); }
.public-valet-card[class*="public-valet-theme-"] .button { border-color: color-mix(in srgb, var(--guest-accent) 50%, transparent); }
.public-valet-card[class*="public-valet-theme-"] .button-secondary { background: var(--guest-accent); color: var(--guest-background); }
.public-valet-theme-classic { font-family: Georgia, "Times New Roman", serif; }
.public-valet-theme-editorial { font-family: "Palatino Linotype", Palatino, Georgia, serif; letter-spacing: 0.01em; }
.public-valet-theme-minimal { font-family: Arial, Helvetica, sans-serif; letter-spacing: -0.01em; }
.public-valet-theme-modern { font-family: Inter, "Segoe UI", sans-serif; }
.public-valet-card .brand-lockup {
  min-width: 0;
  overflow: hidden;
}

.public-valet-logo {
  display: block;
  width: min(100%, 420px);
  height: clamp(72px, 18vw, 148px);
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.public-valet-location-name {
  width: 100%;
  margin: 14px 0 8px;
  color: var(--guest-text);
  font-family: "Great Vibes", "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(2.75rem, 7.5vw, 5rem);
  font-style: normal;
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: 0.015em;
  text-align: center;
  text-wrap: balance;
}

.public-valet-status,
.public-valet-details {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.public-valet-status h1,
.public-valet-status p,
.public-valet-details p {
  margin: 0;
}

.public-valet-status h1 {
  width: 100%;
  text-align: center;
}

.public-valet-journey {
  display: grid;
  gap: 16px;
  margin: 22px 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--guest-accent) 38%, transparent);
  border-radius: 22px;
  background: color-mix(in srgb, var(--guest-surface) 78%, transparent);
  text-align: center;
}

.public-valet-journey > strong {
  font-size: clamp(1.05rem, 4vw, 1.35rem);
  line-height: 1.35;
}

.public-valet-journey > .public-valet-ready-message {
  font-size: clamp(2rem, 8vw, 3.25rem);
  line-height: 1.05;
  text-wrap: balance;
}

.public-valet-road {
  position: relative;
  min-height: 104px;
  margin-inline: clamp(6px, 3vw, 18px);
  overflow: hidden;
  border: 3px solid #d1d5db;
  border-radius: 26px;
  background:
    repeating-linear-gradient(90deg, transparent 0 34px, #facc15 34px 62px, transparent 62px 94px) 0 50% / auto 7px no-repeat,
    linear-gradient(180deg, #374151 0 16%, #20252d 16% 84%, #374151 84% 100%);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.5),
    inset 0 12px 20px rgba(255, 255, 255, 0.08),
    0 14px 28px rgba(0, 0, 0, 0.28);
  font-size: 2.15rem;
}

.public-valet-road-line {
  position: absolute;
  bottom: 9px;
  left: 14px;
  right: 58px;
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--guest-accent) 0 var(--valet-progress), rgba(255, 255, 255, 0.18) var(--valet-progress) 100%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.public-valet-car {
  position: absolute;
  top: 50%;
  z-index: 2;
  left: clamp(30px, calc(var(--valet-progress) - 0.3rem), calc(100% - 56px));
  display: grid;
  width: 56px;
  height: 50px;
  padding: 0;
  place-items: center;
  font-size: 3rem !important;
  line-height: 1;
  filter: drop-shadow(0 9px 7px rgba(0, 0, 0, 0.58));
  transform: translate(-50%, -50%) scaleX(-1);
  transition: left 1.15s cubic-bezier(0.22, 0.75, 0.2, 1);
}

.public-valet-road-finish {
  position: absolute;
  top: 50%;
  right: 2px;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 50px;
  place-items: center;
  font-size: 2.75rem !important;
  line-height: 1;
  filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.55));
  transform: translateY(-50%);
}

.public-valet-car.is-moving {
  animation: public-valet-car-drive 1.1s ease-in-out infinite alternate;
}

@keyframes public-valet-car-drive {
  from { transform: translate(-50%, -47%) scaleX(-1) rotate(-2deg); }
  to { transform: translate(-50%, -57%) scaleX(-1) rotate(2deg); }
}

.public-valet-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  font-size: 0.72rem;
}

.public-valet-steps span {
  opacity: 0.42;
}

.public-valet-steps span.complete {
  opacity: 1;
  color: var(--guest-accent);
  font-weight: 800;
}

.public-valet-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.public-valet-action {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 158px;
  padding: 18px 12px;
  border: 2px solid color-mix(in srgb, var(--guest-accent) 38%, transparent);
  border-radius: 22px;
  color: var(--guest-text);
  background: color-mix(in srgb, var(--guest-surface) 86%, transparent);
  text-align: center;
  cursor: pointer;
}

.public-valet-action > span {
  font-size: 2.7rem;
}

.public-valet-action-primary,
.public-valet-action-comic {
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.public-valet-action-primary:hover,
.public-valet-action-primary:focus-visible,
.public-valet-action-comic:hover,
.public-valet-action-comic:focus-visible {
  box-shadow: 0 12px 32px color-mix(in srgb, var(--guest-accent) 32%, transparent);
  transform: translateY(-3px) rotate(-0.35deg);
}

.public-valet-action-primary:active,
.public-valet-action-primary.is-clicked,
.public-valet-action-comic:active,
.public-valet-action-comic.is-clicked {
  filter: brightness(1.08);
  transform: scale(0.94) rotate(0.5deg);
}

.public-valet-action .public-valet-click-burst {
  position: absolute;
  z-index: 3;
  opacity: 0;
  color: var(--guest-background);
  font-size: clamp(0.8rem, 3vw, 1.15rem);
  font-weight: 1000;
  font-style: italic;
  letter-spacing: 0.06em;
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--guest-text) 48%, transparent);
  pointer-events: none;
}

.public-valet-click-burst.burst-left { top: 14px; left: 14px; transform: rotate(-13deg); }
.public-valet-click-burst.burst-right { right: 14px; bottom: 12px; transform: rotate(10deg); }
.public-valet-action-primary:hover .public-valet-click-burst,
.public-valet-action-primary:focus-visible .public-valet-click-burst,
.public-valet-action-primary.is-clicked .public-valet-click-burst,
.public-valet-action-comic:hover .public-valet-click-burst,
.public-valet-action-comic:focus-visible .public-valet-click-burst,
.public-valet-action-comic.is-clicked .public-valet-click-burst {
  opacity: 1;
  animation: public-valet-click-pop 420ms ease both;
}

@keyframes public-valet-click-pop {
  0% { opacity: 0; scale: 0.45; }
  55% { opacity: 1; scale: 1.2; }
  100% { opacity: 1; scale: 1; }
}

.public-valet-action strong {
  font-size: clamp(1rem, 4vw, 1.25rem);
}

.public-valet-action small {
  color: color-mix(in srgb, var(--guest-text) 70%, transparent);
}

.public-valet-action-primary {
  color: var(--guest-background);
  border-color: var(--guest-accent);
  background: var(--guest-accent);
}

.public-valet-action-primary small {
  color: color-mix(in srgb, var(--guest-background) 75%, transparent);
}

.public-valet-action-disabled {
  cursor: default;
}

.public-valet-payment {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--guest-text) 18%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--guest-surface) 86%, transparent);
}

.public-valet-payment-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-valet-payment-heading > span {
  font-size: 2rem;
}

.public-valet-payment-heading h2,
.public-valet-payment-heading p {
  margin: 0;
}

.public-valet-payment select,
.public-valet-payment input {
  min-height: 54px;
  font-size: 1rem;
}

.public-valet-tip-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--guest-text) 24%, transparent);
  border-radius: 12px;
  background: #f8fafc;
}

.public-valet-tip-input > span {
  padding-left: 16px;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
}

.public-valet-tip-input input {
  width: 100%;
  border: 0;
  color: #0f172a;
  background: transparent;
  font-size: 1.2rem;
  box-shadow: none;
}

.public-valet-tip-options {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.public-valet-tip-options legend {
  margin-bottom: 8px;
  font-weight: 700;
}

.public-valet-tip-options > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.public-valet-tip-choice {
  min-height: 48px;
  padding: 8px;
  border: 2px solid color-mix(in srgb, var(--guest-accent) 42%, transparent);
  border-radius: 12px;
  color: var(--guest-text);
  background: color-mix(in srgb, var(--guest-surface) 82%, transparent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.public-valet-tip-choice:hover,
.public-valet-tip-choice:focus-visible,
.public-valet-tip-choice.active {
  border-color: var(--guest-accent);
  color: var(--guest-background);
  background: var(--guest-accent);
}

.public-valet-payment-summary {
  display: grid;
  gap: 7px;
  margin: 2px 0;
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--guest-background) 52%, transparent);
}

.public-valet-payment-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.public-valet-payment-summary dt,
.public-valet-payment-summary dd {
  margin: 0;
}

.public-valet-payment-summary dd {
  font-weight: 700;
}

.public-valet-payment-summary .public-valet-payment-total {
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--guest-text) 22%, transparent);
  font-size: 1.08rem;
  font-weight: 800;
}

.public-valet-side-ad {
  position: fixed;
  z-index: 5;
  top: 50%;
  width: min(250px, calc((100vw - 780px) / 2 - 28px));
  max-height: 72vh;
  overflow-y: auto;
  transform: translateY(-50%);
}

.public-valet-side-ad.is-left { left: 16px; }
.public-valet-side-ad.is-right { right: 16px; }
.public-valet-side-ad .public-valet-ad {
  margin: 0;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.38);
}

.public-valet-mobile-ad { display: none; }

@media (max-width: 1180px) {
  .public-valet-side-ad { display: none; }
  .public-valet-mobile-ad { display: block; margin-bottom: 18px; }
}

.public-valet-pay-button {
  width: 100%;
  min-height: 56px;
  justify-content: center;
  font-size: 1.05rem;
}

.public-valet-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.public-valet-links .button {
  justify-content: center;
}

.public-valet-confirmation-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(5px);
}

.public-valet-confirmation {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  padding: 24px;
  border: 3px solid var(--guest-accent);
  border-radius: 28px;
  color: var(--guest-text);
  background: var(--guest-surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
  text-align: center;
}

.public-valet-confirmation h2,
.public-valet-confirmation p {
  margin: 0;
}

.public-valet-confirmation textarea {
  min-height: 110px;
  font-size: 16px;
  text-align: left;
}

@media (max-width: 640px) {
  .public-valet-confirmation textarea {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
  }
}

.public-valet-confirmation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.public-valet-confirm-choice {
  min-height: 108px;
  border: 0;
  border-radius: 24px;
  color: #fff;
  font-size: 3.4rem;
  font-weight: 1000;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.public-valet-confirm-choice:hover,
.public-valet-confirm-choice:focus-visible { filter: brightness(1.12); transform: translateY(-3px); }
.public-valet-confirm-choice:active { transform: scale(0.94); }
.public-valet-confirm-choice.is-cancel { background: #dc2626; }
.public-valet-confirm-choice.is-accept { background: #16a34a; }

.valet-message-thread {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 280px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.valet-message-bubble {
  display: grid;
  gap: 3px;
  width: min(86%, 430px);
  padding: 10px 12px;
  border-radius: 14px;
}

.valet-message-bubble.is-inbound { align-self: flex-start; background: rgba(148, 163, 184, 0.2); }
.valet-message-bubble.is-outbound { align-self: flex-end; background: rgba(37, 99, 235, 0.32); }
.valet-message-bubble.is-forgotten-item {
  border: 2px solid #f59e0b;
  background: rgba(245, 158, 11, 0.18);
}
.valet-message-bubble span,
.valet-message-bubble time { color: var(--muted); font-size: 0.72rem; }
.valet-message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.valet-message-empty { margin: 0; text-align: center; }

@media (max-width: 560px) {
  .public-valet-card {
    width: calc(100% - 12px);
    padding: 18px 14px;
    border-radius: 22px;
  }

  .public-valet-actions {
    grid-template-columns: 1fr;
  }

  .public-valet-action {
    min-height: 128px;
  }

  .public-valet-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }

  .public-valet-links {
    grid-template-columns: 1fr;
  }
}

.shared-login-card {
  max-width: 460px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.shared-login-card h2,
.shared-login-card p {
  margin: 0 0 10px;
}

.shared-login-card p:last-child {
  margin-bottom: 0;
}

.error-message {
  color: var(--danger);
  margin: 0;
}

.hidden {
  display: none;
}

.card,
.stat,
.button,
.pill,
.table-wrap,
input,
select,
textarea,
.notice-item,
.warning-item,
.availability-day,
.schedule-member-dropdown,
.schedule-tally-details,
.schedule-report,
.document-frame,
.shared-login-card,
.valet-ticket,
.valet-ticket-tile,
.valet-qr-panel,
.valet-scan-assignment,
.valet-public-ticket,
.text-sent-icon {
  border-radius: 0;
}

@media (max-width: 980px) {
  .auth-card,
  .grid-4,
  .field-row,
  .field-row-3,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .document-upload-form {
    grid-template-columns: 1fr;
  }

  .portal-access-section-groups,
  .portal-access-assignment-row {
    grid-template-columns: 1fr;
  }

  .portal-access-editor > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-access-assignment-row .button,
  .portal-access-level-form .button {
    width: 100%;
  }

  .summary-grid,
  .summary-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .availability-request-comparison {
    grid-template-columns: 1fr;
  }

  .schedule-workspace {
    grid-template-columns: 1fr;
  }

  .schedule-navigation {
    width: 100%;
    position: static;
    min-height: 0;
  }

  .schedule-sidebar {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .location-schedule-row {
    grid-template-columns: 84px minmax(760px, 1fr);
  }

  .document-folder-form {
    grid-template-columns: 1fr;
  }

  .valet-workflow,
  .valet-board,
  .valet-qr-output {
    grid-template-columns: 1fr;
  }

  .span-6,
  .span-12 {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .page-shell {
    width: 100%;
    padding: 8px;
  }

  body.schedule-page .page-shell {
    padding: 0;
  }

  h1 {
    font-size: clamp(2rem, 13vw, 3rem);
    overflow-wrap: anywhere;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.08rem;
  }

  .card {
    padding: 14px;
  }

  .topbar {
    gap: 16px;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .topbar > *,
  .topbar-actions,
  .section-heading > *,
  .button-row > * {
    min-width: 0;
  }

  .topbar > div:first-child,
  .topbar-actions {
    grid-column: 1;
    justify-self: center;
  }

  .topbar .brand-mark-small {
    width: 100%;
    height: 82px;
    max-height: 82px;
  }

  .topbar .brand-home-button {
    width: min(260px, 72vw);
    height: 108px;
  }

  .auth-card {
    min-height: auto;
    gap: 16px;
  }

  .auth-copy {
    justify-items: center;
    text-align: center;
  }

  .brand-lockup {
    align-items: center;
    width: 100%;
  }

  .brand-mark {
    width: min(300px, 92vw);
  }

  .brand-mark-small {
    width: 128px;
  }

  .brand-lockup > .brand-mark {
    padding: 10px 12px;
  }

  .auth-action-stack,
  .auth-form {
    width: 100%;
  }

  .eyebrow {
    letter-spacing: 0.12em;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    padding: 11px 12px;
    font-size: 16px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 22px;
    min-height: 22px;
  }

  input[type="file"] {
    max-width: 100%;
    overflow: hidden;
  }

  .button {
    min-height: 44px;
    padding: 11px 14px;
  }

  summary {
    min-height: 44px;
  }

  .ledger-filter,
  .schedule-person-filter {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  form,
  .dashboard-grid,
  .field-row,
  .field-row-3,
  .shift-list,
  .document-list {
    gap: 16px;
  }

  .grid-4,
  .summary-grid,
  .summary-grid.compact,
  .schedule-builder-choice-grid,
  .availability-grid,
  .site-color-grid,
  .text-day-picker,
  .schedule-member-picker {
    grid-template-columns: 1fr;
  }

  .stat {
    padding: 14px;
  }

  .stat strong {
    font-size: 1.65rem;
  }

  .button-row,
  .topbar-actions,
  .section-heading,
  .document-actions,
  .time-off-group-heading,
  .valet-fast-heading,
  .valet-ticket-heading,
  .valet-ticket-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .president-topbar-actions,
  .president-account-actions {
    width: 100%;
    align-items: stretch;
  }

  .president-quick-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .president-quick-tab {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 7px 4px;
    gap: 4px;
  }

  .president-quick-tab summary {
    width: 100%;
    padding: 7px 4px;
    gap: 4px;
  }

  .president-quick-label {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .president-quick-popover {
    position: fixed;
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .button-row .button,
  .topbar-actions .button,
  .section-heading .button,
  .document-actions .button,
  .document-actions a {
    width: 100%;
  }

  .pill {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .table-wrap,
  .directory-table-wrap,
  .schedule-week-table-wrap,
  .location-schedule-list,
  .president-schedule-strip,
  .text-log-table-wrap {
    width: 100%;
    max-width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: var(--sidebar) rgba(255, 255, 255, 0.08);
  }

  table {
    min-width: 760px;
    font-size: 0.82rem;
  }

  th,
  td {
    padding: 10px;
  }

  .schedule-week-table {
    min-width: 820px;
  }

  .schedule-member-heading {
    min-width: 130px;
  }

  .schedule-cell {
    min-height: 82px;
    padding: 7px;
  }

  .schedule-panel {
    gap: 12px;
    padding: 10px;
  }

  .schedule-panel-heading {
    padding-top: 2px;
  }

  .schedule-menu-toggle {
    width: 100%;
    min-height: 48px;
    border: 0;
    padding: 12px 14px;
    background: var(--sidebar);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: inherit;
    font-weight: 700;
    text-align: left;
  }

  .schedule-menu-toggle-icon {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
  }

  .schedule-sidebar {
    display: none;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .schedule-navigation.menu-expanded .schedule-sidebar {
    display: grid;
  }

  .schedule-sidebar-folder {
    min-width: 0;
  }

  .schedule-sidebar-button {
    min-width: 0;
    min-height: 44px;
    padding-top: 11px;
    padding-bottom: 11px;
  }

  .location-schedule-row {
    grid-template-columns: 56px minmax(672px, 1fr);
  }

  .location-schedule-days {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
  }

  .location-schedule-label {
    min-height: 150px;
    font-size: 0.86rem;
  }

  .location-schedule-day {
    min-height: 150px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .location-schedule-date {
    margin-right: -7px;
    margin-left: -7px;
  }

  .location-schedule-actions .button,
  .schedule-cell-actions .button,
  .time-off-request-card .button {
    min-height: 40px;
  }

  .schedule-location-admin-actions,
  .location-files,
  .location-file-item,
  .location-file-upload-form {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-location-admin-actions label,
  .location-file-upload-form input,
  .document-folder-move {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .document-frame {
    min-height: 70vh;
  }

  .president-schedule-strip {
    grid-template-columns: repeat(7, minmax(118px, 1fr));
  }

  .president-schedule-strip section {
    min-width: 118px;
  }

  .schedule-admin-details,
  .schedule-location-week,
  .schedule-tally-details,
  .schedule-report {
    padding: 10px;
  }

  .schedule-admin-details summary,
  .schedule-location-week summary,
  .schedule-tally-details summary,
  .schedule-report summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-created-week-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .valet-qr-output img {
    width: min(160px, 100%);
    height: auto;
    justify-self: center;
  }

  .valet-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .valet-ticket-tile summary {
    min-height: 64px;
  }

  .warning-item,
  .notice-item {
    padding: 11px 12px;
  }

  .shared-login-card {
    padding: 14px;
  }
}

.valet-employee-gate,
.valet-location-gate {
  width: min(680px, 100%);
  margin-inline: auto;
}

.valet-saved-location-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(145px, 100%), 1fr));
  align-items: stretch;
  gap: clamp(10px, 2.5vw, 16px);
  margin-bottom: 18px;
}

.valet-saved-location-button {
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 2 / 1;
  padding: clamp(12px, 3vw, 20px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  overflow: hidden;
  text-align: center;
}

.valet-saved-location-button strong {
  display: -webkit-box;
  width: 100%;
  min-width: 0;
  max-height: 3.45em;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  line-height: 1.15;
}

.valet-saved-location-button span {
  display: block;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--muted);
  font-size: 0.78rem;
}

#deactivate-valet-employee-button {
  width: 100%;
  min-height: 76px;
  padding: 18px 24px;
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  font-weight: 800;
}

@media (max-width: 640px) {
  .valet-employee-gate,
  .valet-location-gate {
    padding: 16px;
  }
}

/* Compact phone layout and keep the navigation from shifting page content. */
@media (max-width: 640px) {
  :root {
    font-size: 15px;
  }

  .page-shell {
    padding: 6px;
  }

  h1 {
    font-size: clamp(1.75rem, 9vw, 2.35rem);
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1rem;
  }

  .card {
    padding: 10px;
  }

  .application-card {
    padding: 9px;
  }

  .application-card > .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 10px;
  }

  .application-card > .section-heading .brand-lockup {
    margin-bottom: 3px;
  }

  .application-card > .section-heading .brand-mark-small {
    width: 96px;
  }

  .application-card > .section-heading h1 {
    margin-bottom: 5px;
    font-size: 1.65rem;
  }

  .application-card > .section-heading p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .application-card > .section-heading .button {
    width: auto;
    min-width: 0;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .application-card #job-application-form {
    gap: 9px;
  }

  .application-card label {
    font-size: 0.86rem;
  }

  .application-card input,
  .application-card select,
  .application-card textarea {
    margin-top: 3px;
  }

  .application-card textarea {
    min-height: 68px;
  }

  .application-card .availability-editor {
    gap: 8px;
    padding-block: 10px;
  }

  .application-card .availability-editor .section-heading {
    display: block;
  }

  .application-card .availability-editor h3 {
    margin-bottom: 3px;
  }

  .application-card .availability-editor p {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .application-card .availability-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .application-card .availability-day {
    grid-template-columns: minmax(72px, 0.7fr) minmax(0, 1fr);
    gap: 5px 8px;
    padding: 7px 8px;
  }

  .application-card .availability-day > strong {
    grid-column: 1 / -1;
  }

  .application-card .availability-day > .checkbox-row,
  .application-card .availability-day > .field-row {
    grid-column: 1 / -1;
  }

  .application-card .availability-day > label:not(.checkbox-row) {
    align-self: center;
  }

  .application-card .availability-day input,
  .application-card .availability-day select {
    min-height: 38px;
    margin: 0;
    padding: 7px 8px;
  }

  .application-card .availability-day .field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .application-card .availability-day .checkbox-row {
    min-height: 34px;
  }

  .application-card #job-application-form > .button-secondary {
    position: sticky;
    bottom: 6px;
    z-index: 5;
    width: 100%;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.35);
  }

  .topbar,
  .topbar-actions {
    gap: 7px;
  }

  .brand-lockup {
    gap: 5px;
    margin-bottom: 6px;
  }

  .brand-mark {
    width: 140px;
  }

  .brand-mark-small {
    width: 120px;
  }

  .topbar .brand-mark-small {
    width: 100%;
    height: 74px;
    max-height: 74px;
  }

  .topbar .brand-home-button {
    width: min(230px, 70vw);
    height: 90px;
  }

  .brand-home-button,
  .brand-lockup > .brand-mark {
    padding: 6px 9px;
  }

  .topbar h1,
  .topbar p {
    margin-bottom: 6px;
  }

  .topbar .muted {
    font-size: 0.8rem;
  }

  .eyebrow {
    margin-bottom: 5px;
    letter-spacing: 0.1em;
    font-size: 0.68rem;
  }

  .president-account-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .president-account-actions .pill {
    justify-content: center;
  }

  input,
  select,
  textarea {
    min-height: 42px;
    padding: 9px 10px;
  }

  textarea {
    min-height: 90px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    width: 20px;
    min-height: 20px;
  }

  .button {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 0.9rem;
  }

  summary {
    min-height: 40px;
  }

  form,
  .dashboard-grid,
  .field-row,
  .field-row-3,
  .shift-list,
  .document-list,
  .grid-4,
  .summary-grid,
  .summary-grid.compact,
  .schedule-builder-choice-grid,
  .availability-grid,
  .site-color-grid,
  .text-day-picker,
  .schedule-member-picker {
    gap: 10px;
  }

  .stat {
    padding: 10px;
  }

  .stat strong {
    margin-top: 4px;
    font-size: 1.45rem;
  }

  .section-heading {
    gap: 8px;
    flex-direction: row;
    align-items: flex-start;
  }

  .section-heading .button {
    width: auto;
    min-width: min(150px, 100%);
  }

  .president-quick-tabs {
    gap: 5px;
  }

  .president-quick-tab {
    min-height: 42px;
    padding: 5px 3px;
    gap: 3px;
  }

  .president-quick-tab summary {
    min-height: 40px;
    padding: 5px 3px;
    gap: 3px;
  }

  .president-quick-label {
    font-size: 0.66rem;
    line-height: 1.1;
  }

  .president-quick-count {
    min-width: 18px;
    padding: 1px 4px;
  }

  .pill {
    padding: 3px 8px;
    font-size: 0.74rem;
  }

  table {
    min-width: 680px;
    font-size: 0.78rem;
  }

  th,
  td {
    padding: 8px;
  }

  .schedule-week-table {
    min-width: 760px;
  }

  .schedule-member-heading {
    min-width: 120px;
  }

  .schedule-cell {
    min-height: 74px;
    padding: 6px;
  }

  .schedule-panel {
    gap: 9px;
    padding: 7px;
  }

  .schedule-panel-heading {
    padding-top: 0;
  }

  .schedule-panel-heading h2,
  .schedule-panel-heading p {
    margin-bottom: 5px;
  }

  .schedule-navigation {
    position: sticky;
    z-index: 30;
    top: 0;
    min-height: 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  }

  .schedule-menu-toggle {
    min-height: 42px;
    padding: 9px 11px;
  }

  .schedule-menu-toggle-icon {
    font-size: 1.25rem;
  }

  .schedule-sidebar {
    position: absolute;
    z-index: 31;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    min-height: 0;
    max-height: min(70vh, 560px);
    max-height: min(calc(100dvh - 58px - env(safe-area-inset-bottom)), 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 120ms ease, visibility 0s linear 120ms;
    overscroll-behavior-y: contain;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.42);
  }

  .schedule-navigation.menu-expanded .schedule-sidebar {
    display: grid;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .schedule-sidebar-folder summary {
    min-height: 40px;
    padding: 9px 11px;
  }

  .schedule-sidebar-button {
    min-height: 40px;
    padding: 9px 11px 9px 16px;
  }

  .location-schedule-row {
    grid-template-columns: 48px minmax(616px, 1fr);
  }

  .location-schedule-days {
    grid-template-columns: repeat(7, minmax(88px, 1fr));
  }

  .location-schedule-label,
  .location-schedule-day {
    min-height: 138px;
  }

  .location-schedule-label {
    padding: 7px;
    font-size: 0.78rem;
  }

  .location-schedule-day {
    padding-right: 6px;
    padding-left: 6px;
  }

  .location-schedule-date {
    margin-right: -6px;
    margin-left: -6px;
    padding: 6px 4px;
  }

  .location-schedule-actions .button,
  .schedule-cell-actions .button,
  .time-off-request-card .button {
    min-height: 36px;
  }

  .document-frame {
    min-height: 65vh;
  }

  .president-schedule-strip {
    grid-template-columns: repeat(7, minmax(108px, 1fr));
    gap: 8px;
  }

  .president-schedule-strip section {
    min-width: 108px;
  }

  .schedule-admin-details,
  .schedule-location-week,
  .schedule-tally-details,
  .schedule-report {
    padding: 8px;
  }

  .valet-qr-output img {
    width: min(140px, 100%);
  }

  .valet-ticket-tile summary {
    min-height: 56px;
  }

  .warning-item,
  .notice-item,
  .shared-login-card {
    padding: 9px 10px;
  }
}

@media (max-width: 380px) {
  .president-quick-tabs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .schedule-sidebar {
    transition: none;
  }
}

/* Final phone fit: prevent wide portal sections from widening the page. */
@media (max-width: 640px) {
  :root {
    font-size: 14px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  #app,
  .page-shell,
  .app-shell,
  .schedule-portal-shell,
  .schedule-workspace,
  .schedule-panel,
  .schedule-panel > *,
  .dashboard-grid,
  .card,
  section,
  form,
  fieldset,
  details {
    min-width: 0;
    max-width: 100%;
  }

  .page-shell {
    padding: 4px;
  }

  .topbar {
    padding: 8px;
  }

  .schedule-panel {
    padding: 5px;
  }

  h1 {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  h2 {
    font-size: 1.15rem;
  }

  h3 {
    font-size: 0.95rem;
  }

  p {
    overflow-wrap: anywhere;
  }

  .card {
    padding: 8px;
  }

  .grid-4,
  .summary-grid,
  .summary-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .stat {
    padding: 8px;
  }

  .stat strong {
    font-size: 1.2rem;
  }

  .stat p,
  .stat span {
    font-size: 0.78rem;
  }

  .button {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  input,
  select,
  textarea {
    min-width: 0;
    max-width: 100%;
    min-height: 38px;
    padding: 7px 8px;
    font-size: 16px;
  }

  label,
  .field-help,
  .muted {
    font-size: 0.8rem;
  }

  .section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .section-heading .button {
    width: 100%;
    min-width: 0;
  }

  .president-account-actions {
    grid-template-columns: 1fr 1fr;
  }

  .president-quick-tab {
    min-height: 38px;
  }

  .president-quick-icon {
    font-size: 0.85rem;
  }

  .table-wrap,
  .directory-table-wrap,
  .schedule-week-table-wrap,
  .location-schedule-list,
  .president-schedule-strip,
  .text-log-table-wrap {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: auto;
    touch-action: pan-x pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  .employee-directory-wrap,
  .text-log-table-wrap {
    max-height: min(68vh, 560px);
  }

  .directory-table-wrap:focus-within,
  .table-wrap:focus-within,
  .schedule-week-table-wrap:focus-within {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
    outline-offset: -2px;
  }

  table {
    min-width: 580px;
    font-size: 0.72rem;
  }

  th,
  td {
    padding: 6px;
  }

  .schedule-week-table {
    min-width: 660px;
  }

  .schedule-member-heading {
    min-width: 100px;
  }

  .schedule-cell {
    min-height: 62px;
    padding: 5px;
  }

  .schedule-cell-actions,
  .location-schedule-actions {
    gap: 3px;
  }

  .schedule-cell-actions .button,
  .location-schedule-actions .button,
  .time-off-request-card .button {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 0.7rem;
  }

  .location-schedule-row {
    grid-template-columns: 42px minmax(560px, 1fr);
  }

  .location-schedule-days {
    grid-template-columns: repeat(7, minmax(80px, 1fr));
  }

  .location-schedule-label,
  .location-schedule-day {
    min-height: 122px;
  }

  .location-schedule-label {
    padding: 5px;
    font-size: 0.7rem;
  }

  .location-schedule-day {
    gap: 5px;
    padding: 0 5px 6px;
  }

  .location-schedule-date {
    margin: 0 -5px;
    padding: 5px 3px;
    font-size: 0.7rem;
  }

  .location-schedule-shift {
    font-size: 0.68rem;
  }

  .president-schedule-strip {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
    gap: 6px;
  }

  .president-schedule-strip section {
    min-width: 96px;
  }

  .document-item,
  .availability-day,
  .schedule-admin-details,
  .schedule-location-week,
  .schedule-tally-details,
  .schedule-report {
    padding: 7px;
  }

  .document-actions,
  .location-files,
  .location-file-item,
  .location-file-upload-form {
    min-width: 0;
    max-width: 100%;
  }

  .document-actions a,
  .document-actions .button {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .schedule-menu-toggle {
    min-height: 38px;
    padding: 7px 9px;
  }

  .schedule-sidebar {
    max-width: 100vw;
  }
}

@media (max-width: 360px) {
  .grid-4,
  .summary-grid,
  .summary-grid.compact,
  .president-account-actions {
    grid-template-columns: 1fr;
  }
}

/* Compact, phone-safe employee messaging unlock. */
.valet-overlay-panel.valet-message-overlay > .valet-message-verification {
  align-self: center;
  justify-self: center;
  align-content: start;
  width: min(440px, calc(100% - 32px));
  height: auto;
  max-height: calc(100% - 96px);
  overflow-y: auto;
  gap: 18px;
  padding: 24px;
  border: 1px solid #334b5b;
  border-radius: 20px;
  background: #111b21;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
  text-align: left;
}

.valet-message-verification-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.valet-message-verification-heading span {
  color: #facc15;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.valet-message-verification-heading h3 {
  margin-top: 3px;
  padding: 0;
  color: #f8fafc;
  font-size: clamp(1.15rem, 5vw, 1.45rem);
}

.valet-message-verification-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(250, 204, 21, 0.12);
  font-size: 1.6rem;
}

.valet-message-verification form {
  gap: 9px;
}

.valet-message-verification input {
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  font-size: 1.25rem;
  letter-spacing: 0.18em;
  text-align: center;
}

.valet-message-verification small {
  color: #aebac1;
  line-height: 1.35;
}

.valet-message-verification .button {
  width: 100%;
  min-height: 54px;
  margin-top: 5px;
}

.president-valet-message-archive,
.valet-end-shift-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, #07111c);
}

.president-valet-message-archive h4,
.president-valet-message-archive p {
  margin: 0;
}

.president-valet-message-results:empty {
  display: none;
}

.president-valet-message-archive-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block: 10px 14px;
}

.president-valet-ticket-conversations {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.president-valet-ticket-conversation {
  min-height: 0;
  grid-template-rows: auto minmax(150px, auto);
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24);
}

.president-valet-ticket-conversation .valet-chat-header {
  position: static;
  min-width: 0;
}

.president-valet-ticket-conversation-identity {
  min-width: 0;
}

.president-valet-ticket-conversation .valet-chat-header h4 {
  margin: 0;
  color: #f8fafc;
  font-size: 1rem;
}

.president-valet-ticket-conversation .valet-message-thread {
  min-height: 150px;
  max-height: 440px;
}

.president-valet-ticket-csv {
  min-height: 40px;
  padding: 7px 10px;
  white-space: nowrap;
}

.president-valet-conversation-downloads {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 10px;
}

.president-valet-conversation-downloads .button {
  min-height: 40px;
  padding: 7px 10px;
}

.president-valet-message-table td {
  min-width: 130px;
  vertical-align: top;
  white-space: normal;
}

.president-valet-message-table td:last-child {
  min-width: 260px;
  overflow-wrap: anywhere;
}

.valet-clock-out-all-row {
  align-items: flex-start;
  padding: 14px;
  border: 1px solid color-mix(in srgb, #facc15 45%, var(--line));
  border-radius: 12px;
  background: rgba(250, 204, 21, 0.08);
}

.valet-clock-out-all-row span {
  display: grid;
  gap: 3px;
}

.valet-clock-out-all-row small {
  color: var(--muted);
  line-height: 1.35;
}

.valet-end-shift-submit {
  min-height: 58px;
}

@media (max-width: 640px) {
  .valet-overlay-panel.valet-message-overlay > .valet-message-verification {
    width: calc(100% - 24px);
    max-height: calc(100% - 80px);
    padding: 18px;
  }

  .president-valet-message-archive {
    padding: 12px;
  }

  .president-valet-message-archive .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .president-valet-message-archive-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .president-valet-ticket-conversation .valet-chat-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .president-valet-ticket-csv {
    grid-column: 1 / -1;
    width: 100%;
  }

  .president-valet-ticket-conversation .valet-message-bubble {
    width: min(92%, 430px);
  }
}

/* Messaging is a fixed workspace: only the conversation thread scrolls. */
.valet-overlay-panel:not(.valet-message-overlay) {
  padding-top: 72px;
}

body.valet-message-viewport-lock {
  overscroll-behavior: none;
}

.valet-overlay-backdrop.valet-message-overlay {
  overflow: hidden;
  overscroll-behavior: none;
}

.valet-overlay-panel.valet-message-overlay {
  width: min(620px, 100%);
  height: min(760px, calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: hidden;
  padding: 0;
  border-color: #263b4b;
  background: #0b141a;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.valet-message-overlay > .valet-overlay-close {
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: 1px solid #536570;
  background: #111b21;
  color: #f8fafc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.36);
  touch-action: manipulation;
}

.valet-message-overlay > .valet-overlay-close:active {
  background: #263b4b;
}

.valet-message-overlay .valet-chat-portal {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
}

.valet-message-overlay .valet-chat-header {
  min-width: 0;
  padding-right: 64px;
}

.valet-message-overlay .valet-chat-live {
  margin-right: 0;
}

.valet-message-overlay .valet-message-templates {
  flex: none;
}

.valet-message-overlay .valet-message-thread {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.valet-message-overlay .valet-message-empty {
  align-self: center;
  margin: auto;
  padding: 24px 16px;
  color: #aebac1;
  line-height: 1.45;
}

.valet-message-overlay .valet-chat-composer {
  position: relative;
  z-index: 2;
  flex: none;
  padding-bottom: max(9px, env(safe-area-inset-bottom));
}

.valet-message-overlay .valet-chat-composer textarea {
  overflow-y: hidden;
  overscroll-behavior: contain;
  touch-action: manipulation;
}

.valet-message-overlay .valet-chat-composer textarea::placeholder {
  color: #8696a0;
  opacity: 1;
}

@media (max-width: 640px) {
  .valet-overlay-panel.valet-message-overlay {
    width: 100%;
    height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 0;
    border-radius: 14px;
  }

  .valet-message-overlay .valet-chat-portal {
    min-height: 0;
    border-radius: 13px;
  }

  .valet-message-overlay .valet-chat-header {
    min-height: 62px;
    padding: 10px 62px 10px 10px;
  }

  .valet-message-overlay .valet-chat-avatar {
    width: 38px;
    height: 38px;
  }

  .valet-message-overlay .valet-message-templates {
    gap: 5px;
    padding: 7px;
  }

  .valet-message-overlay .valet-message-template-button {
    min-height: 40px;
    padding: 5px 3px;
    font-size: 0.68rem;
  }
}

.public-valet-platform-mark {
  position: static;
  justify-self: start;
  margin: 14px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 128px;
  color: var(--guest-text);
  font-size: 0.58rem;
  line-height: 1;
  opacity: 0.34;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.public-valet-platform-mark:hover,
.public-valet-platform-mark:focus-visible {
  opacity: 0.72;
}

.public-valet-platform-mark img {
  width: 34px;
  height: 22px;
  object-fit: contain;
}

/* Compact public ticket: keep the complete core guest workflow visible on a
   phone while preserving comfortable controls and the client's visual brand. */
@media (max-width: 640px) {
  body.public-valet-page .page-shell {
    padding:
      max(2px, env(safe-area-inset-top))
      max(2px, env(safe-area-inset-right))
      max(2px, env(safe-area-inset-bottom))
      max(2px, env(safe-area-inset-left));
  }

  .public-valet-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100dvh - 12px);
    padding: 7px 9px 10px;
    border-radius: 16px;
  }

  .public-valet-card .brand-lockup {
    gap: 0;
    margin: 0;
  }

  .public-valet-logo {
    height: 58px;
  }

  .public-valet-location-name {
    margin: 4px 0 2px;
    font-family: "Dancing Script", "Great Vibes", "Brush Script MT", cursive;
    font-size: clamp(2.5rem, 11.5vw, 4rem) !important;
    font-weight: 600;
    line-height: 0.84;
  }

  .public-valet-status {
    gap: 2px;
    margin-top: 0;
  }

  .public-valet-status h1 {
    font-size: clamp(2.15rem, 9vw, 3.4rem);
    line-height: 1;
  }

  .public-valet-status p {
    font-size: 0.72rem;
  }

  .public-valet-journey {
    gap: 5px;
    margin: 7px 0;
    padding: 7px 8px;
    border-radius: 14px;
  }

  .public-valet-road {
    min-height: 68px;
    margin-inline: 0;
    border-width: 2px;
    border-radius: 18px;
  }

  .public-valet-road-line {
    bottom: 5px;
    height: 4px;
  }

  .public-valet-journey > strong {
    font-size: 0.84rem;
    line-height: 1.15;
  }

  .public-valet-journey > .public-valet-ready-message {
    font-size: 1.5rem;
  }

  .public-valet-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    font-size: 0.56rem;
    text-align: center;
  }

  .public-valet-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 5px;
    font-size: 0.72rem;
  }

  .public-valet-details p {
    min-width: 0;
  }

  .public-valet-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 7px 0;
  }

  .public-valet-action {
    min-height: 72px;
    gap: 2px;
    padding: 6px 5px;
    border-radius: 13px;
  }

  .public-valet-action > span {
    font-size: 1.45rem;
  }

  .public-valet-action strong {
    font-size: 0.78rem;
  }

  .public-valet-action small {
    font-size: 0.61rem;
  }

  .public-valet-payment {
    gap: 5px;
    margin: 7px 0;
    padding: 7px 8px;
    border-radius: 13px;
  }

  .public-valet-payment-heading {
    gap: 6px;
  }

  .public-valet-payment-heading > span {
    font-size: 1.15rem;
  }

  .public-valet-payment-heading h2 {
    font-size: 0.92rem;
  }

  .public-valet-payment-heading p,
  #public-valet-tip-help {
    display: none;
  }

  .public-valet-payment > label {
    font-size: 0.64rem;
  }

  .public-valet-payment input,
  .public-valet-payment select {
    min-height: 38px;
    font-size: 16px;
  }

  .public-valet-tip-input > span {
    padding-left: 10px;
    font-size: 1rem;
  }

  .public-valet-tip-options legend,
  .public-valet-payment > label {
    font-size: 0.64rem;
  }

  .public-valet-tip-options > div {
    gap: 4px;
  }

  .public-valet-tip-choice {
    min-height: 34px;
    padding: 4px 2px;
    border-radius: 8px;
    font-size: 0.68rem;
  }

  .public-valet-payment-summary {
    gap: 3px;
    padding: 5px 7px;
    font-size: 0.68rem;
  }

  .public-valet-payment-summary .public-valet-payment-total {
    padding-top: 3px;
    font-size: 0.74rem;
  }

  .public-valet-pay-button {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.72rem;
  }

  .public-valet-payment .notice-item {
    gap: 2px;
    padding: 6px 8px;
    font-size: 0.65rem;
  }

  .public-valet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
  }

  .public-valet-links .button {
    flex: 1 1 auto;
    min-height: 32px;
    padding: 5px 7px;
    font-size: 0.63rem;
  }

  .public-valet-platform-mark {
    align-self: flex-start;
    margin-top: auto;
    padding-top: 12px;
  }
}

/* Reliable phone overlays and a conversation-first guest messaging portal. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.valet-more-menu .button {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  touch-action: manipulation;
  transition: transform 100ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.valet-more-menu .button:hover,
.valet-more-menu .button:focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent);
}

.valet-more-menu .button:active {
  transform: translateY(2px) scale(0.985);
  filter: brightness(0.9);
}

.valet-ticket-transfer,
.valet-ticket-transfer form {
  display: grid;
  gap: 14px;
}

.valet-ticket-transfer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.valet-ticket-transfer-heading .button {
  min-height: 42px;
  padding: 8px 14px;
}

.valet-ticket-transfer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 10px;
  max-height: min(44vh, 440px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px;
}

.valet-ticket-transfer-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 66px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent));
  cursor: pointer;
}

.valet-ticket-transfer-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}

.valet-ticket-transfer-option input {
  width: 22px;
  height: 22px;
  margin: 0;
}

.valet-ticket-transfer-option span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.valet-ticket-transfer-option small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .valet-ticket-transfer-list {
    grid-template-columns: minmax(0, 1fr);
    max-height: 40vh;
  }
}

.valet-message-verification {
  display: grid;
  justify-items: stretch;
  gap: 12px;
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel) 88%, #07111c);
  text-align: center;
}

.valet-message-verification h3,
.valet-message-verification p {
  margin: 0;
}

.valet-message-verification-icon {
  font-size: 2rem;
}

.valet-message-verification form {
  display: grid;
  gap: 10px;
  text-align: left;
}

.valet-chat-portal {
  min-height: min(650px, 74dvh);
  display: grid;
  grid-template-rows: auto auto minmax(220px, 1fr) auto;
  overflow: hidden;
  border: 1px solid #263b4b;
  border-radius: 18px;
  background: #0b141a;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.valet-chat-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #202c33;
}

.valet-chat-header h3,
.valet-chat-header p {
  margin: 0;
  padding: 0;
}

.valet-chat-header h3 {
  color: #f8fafc;
  font-size: 1rem;
}

.valet-chat-header p {
  overflow: hidden;
  color: #aebac1;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.valet-chat-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #334155;
  font-size: 1.2rem;
}

.valet-chat-live {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  font-size: 0.68rem;
  font-weight: 800;
}

.valet-message-templates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid #263b4b;
  background: #111b21;
}

.valet-message-template-button {
  min-width: 0;
  min-height: 38px;
  padding: 6px 5px;
  border: 1px solid #3b4a54;
  border-radius: 999px;
  background: #202c33;
  color: #e9edef;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  touch-action: manipulation;
}

.valet-message-template-button:hover,
.valet-message-template-button:focus-visible,
.valet-message-template-button.is-selected {
  border-color: #00a884;
  background: #005c4b;
  color: #fff;
}

.valet-chat-portal .valet-message-thread {
  max-height: none;
  min-height: 0;
  gap: 7px;
  padding: 14px 12px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 24px 24px,
    #0b141a;
}

.valet-chat-portal .valet-message-bubble {
  width: min(84%, 430px);
  gap: 2px;
  padding: 8px 10px 6px;
  border-radius: 9px;
  color: #e9edef;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.valet-chat-portal .valet-message-bubble.is-inbound {
  border-top-left-radius: 2px;
  background: #202c33;
}

.valet-chat-portal .valet-message-bubble.is-outbound {
  border-top-right-radius: 2px;
  background: #005c4b;
}

.valet-chat-portal .valet-message-bubble span {
  color: #53bdeb;
  font-size: 0.66rem;
  font-weight: 800;
}

.valet-chat-portal .valet-message-bubble time {
  justify-self: end;
  color: #aebac1;
  font-size: 0.62rem;
}

.valet-chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: end;
  gap: 8px;
  padding: 9px;
  background: #202c33;
}

.valet-chat-composer textarea {
  width: 100%;
  height: 46px;
  min-height: 46px;
  max-height: min(38dvh, 260px);
  margin: 0;
  padding: 12px 14px;
  resize: none;
  border: 0;
  border-radius: 22px;
  background: #2a3942;
  color: #f8fafc;
  font-size: 16px !important;
  line-height: 1.35;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
}

.valet-chat-send {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #00a884;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 100ms ease, filter 120ms ease;
}

.valet-chat-send:hover,
.valet-chat-send:focus-visible {
  filter: brightness(1.12);
}

.valet-chat-send:active {
  transform: scale(0.9);
}

.valet-chat-send:disabled {
  opacity: 0.55;
}

.valet-chat-composer .error-message {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 640px) {
  .valet-overlay-panel {
    gap: 8px;
    padding: 60px 10px 10px;
  }

  .valet-overlay-close {
    top: 9px;
    right: 9px;
    width: 42px;
    height: 42px;
    font-size: 1.65rem;
  }

  .valet-more-menu {
    gap: 8px;
  }

  .valet-more-menu .button {
    min-height: 54px;
    padding: 10px 14px;
  }

  .valet-chat-portal {
    min-height: calc(100dvh - 86px);
    border-radius: 14px;
  }

  .valet-message-templates {
    gap: 4px;
    padding: 7px 6px;
  }

  .valet-message-template-button {
    min-height: 42px;
    padding-inline: 3px;
    font-size: 0.62rem;
  }

  .valet-chat-portal .valet-message-thread {
    padding: 10px 8px;
  }

  .valet-message-verification {
    padding: 18px 14px;
  }
}

@media (max-width: 640px) {
  .employee-directory-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 0.66rem;
  }

  .employee-directory-table th,
  .employee-directory-table td {
    padding: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .employee-directory-table th:first-child,
  .employee-directory-table td:first-child {
    width: 28%;
  }

  .employee-directory-table th:nth-child(2),
  .employee-directory-table td:nth-child(2) {
    width: 22%;
  }

  .employee-directory-table th:last-child,
  .employee-directory-table td:last-child {
    width: 28%;
  }
}

/* Phone-only no-horizontal-scroll layout across every portal section. */
@media (max-width: 640px) {
  html,
  body,
  #app,
  .page-shell,
  .app-shell,
  .schedule-portal-shell,
  .schedule-workspace,
  .schedule-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .schedule-panel > *,
  .card > *,
  .dashboard-grid > *,
  .field-row > *,
  .field-row-3 > *,
  .section-heading > *,
  .topbar > * {
    min-width: 0;
    max-width: 100%;
  }

  .table-wrap,
  .directory-table-wrap,
  .schedule-week-table-wrap,
  .location-schedule-list,
  .president-schedule-strip,
  .text-log-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    touch-action: pan-y;
    scrollbar-gutter: auto;
  }

  table,
  .directory-table,
  .employee-directory-table,
  .schedule-week-table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
    font-size: 0.58rem;
  }

  th,
  td,
  .schedule-week-table th,
  .schedule-week-table td {
    min-width: 0;
    padding: 3px 2px;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  th {
    font-size: 0.57rem;
  }

  table input,
  table select,
  table .button {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    padding: 3px;
    font-size: 0.58rem;
  }

  .schedule-member-heading {
    width: 18%;
    min-width: 0;
  }

  .schedule-cell {
    min-width: 0;
    min-height: 52px;
    padding: 3px;
    font-size: 0.58rem;
  }

  .schedule-cell-shift {
    gap: 2px;
  }

  .schedule-cell-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .schedule-cell-actions .button {
    width: 100%;
    min-height: 26px;
    padding: 3px 2px;
    font-size: 0.56rem;
  }

  .location-schedule-list {
    gap: 10px;
  }

  .location-schedule-row {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr;
    box-shadow: none;
  }

  .location-schedule-label {
    min-height: 0;
    padding: 6px;
    border-right: 0;
    border-bottom: 1px solid #a9adb2;
    writing-mode: horizontal-tb;
    transform: none;
    text-align: left;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    font-size: 0.68rem;
  }

  .location-schedule-label strong {
    grid-column: 1 / -1;
  }

  .location-schedule-label .location-address {
    grid-column: 1 / -1;
    font-size: 0.62rem;
  }

  .location-schedule-days {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .location-schedule-day {
    min-width: 0;
    min-height: 92px;
    gap: 2px;
    padding: 0 2px 3px;
    border-right-width: 1px;
  }

  .location-schedule-date {
    margin: 0 -2px;
    padding: 3px 1px;
    font-size: 0.52rem;
    overflow-wrap: anywhere;
  }

  .location-schedule-date span {
    font-size: 0.48rem;
  }

  .location-schedule-x {
    inset: 25px 0 0;
    font-size: 1.2rem;
  }

  .location-schedule-shift {
    gap: 1px;
    padding-bottom: 2px;
    font-size: 0.5rem;
  }

  .location-schedule-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .location-schedule-actions .button {
    width: 100%;
    min-height: 24px;
    padding: 2px 1px;
    font-size: 0.5rem;
  }

  .president-schedule-strip {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    overflow: hidden;
    margin-top: 8px;
  }

  .president-schedule-strip section {
    min-width: 0;
    padding: 3px;
    font-size: 0.55rem;
    overflow-wrap: anywhere;
  }

  .president-schedule-strip h3 {
    margin-bottom: 3px;
    font-size: 0.58rem;
  }

  .document-frame,
  iframe,
  img,
  video,
  canvas {
    width: 100%;
    max-width: 100%;
  }

  .document-actions,
  .location-file-item,
  .schedule-location-admin-actions,
  .button-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .document-actions,
  .location-file-item,
  .schedule-location-admin-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pill,
  code,
  .mono,
  strong,
  span,
  a {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .time-off-request-card {
    padding: 10px;
    font-size: 0.8rem;
  }

  .time-off-request-heading {
    align-items: flex-start;
  }

  .time-off-request-details div {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 6px;
  }

  .time-off-request-card .document-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final readability pass for the public login and phone schedule grids. */
@media (max-width: 640px) {
  .auth-card {
    min-height: auto;
    gap: 14px;
    padding: 12px;
  }

  .auth-copy {
    justify-items: center;
  }

  .auth-form,
  .auth-action-stack {
    width: 100%;
  }

  .brand-lockup {
    align-items: center;
    width: 100%;
  }

  .brand-mark {
    width: min(320px, 92vw);
  }

  .brand-lockup > .brand-mark {
    padding: 10px 12px;
  }

  .default-schedule-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .final-schedule-layout {
    grid-template-columns: 1fr;
  }

  .final-schedule-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-archive-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-archive-location-header {
    display: grid;
  }

  .schedule-archive-location-meta {
    justify-content: flex-start;
  }

  .schedule-archive-days {
    grid-template-columns: repeat(7, minmax(220px, 1fr));
  }

  .schedule-day-split {
    grid-template-columns: 1fr;
  }

  .schedule-week-filter {
    width: 100%;
  }

  .published-schedule-heading-filters,
  .published-schedule-heading-filters .schedule-week-filter,
  .published-schedule-heading-filters .published-schedule-location-filter {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .published-schedule-heading-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  table,
  .directory-table,
  .employee-directory-table,
  .schedule-week-table {
    font-size: 0.72rem;
  }

  th {
    font-size: 0.68rem;
  }

  .schedule-cell {
    min-height: 76px;
    padding: 5px;
    font-size: 0.72rem;
  }

  .schedule-cell-shift {
    gap: 4px;
  }

  .shift-crew-list {
    gap: 3px;
    font-size: 0.72rem;
  }

  .shift-time-heading {
    gap: 4px;
  }

  .shift-time-heading span {
    padding: 2px 4px;
    font-size: 0.6rem;
    white-space: normal;
  }

  .schedule-cell-actions .button,
  .location-schedule-actions .button {
    min-height: 30px;
    font-size: 0.64rem;
  }

  .location-schedule-day {
    min-height: 112px;
  }

  .location-schedule-shift {
    font-size: 0.66rem;
  }
}

/* Phone schedule readability: stack week views Monday through Sunday. */
@media (max-width: 640px) {
  .schedule-week-table-wrap,
  .location-schedule-list,
  .president-schedule-strip {
    overflow: visible;
    touch-action: pan-y;
  }

  .schedule-week-table,
  .schedule-week-table thead,
  .schedule-week-table tbody,
  .schedule-week-table tr,
  .schedule-week-table th,
  .schedule-week-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .schedule-week-table {
    border-spacing: 0;
    table-layout: auto;
    font-size: 0.92rem;
  }

  .schedule-week-table thead {
    display: none;
  }

  .schedule-week-table tr {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
  }

  .schedule-week-table tr + tr {
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .schedule-week-table th,
  .schedule-week-table td {
    height: auto;
    padding: 0;
    border: 0;
  }

  .schedule-member-heading {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--sidebar) 82%, #000);
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .schedule-member-heading span {
    margin-top: 3px;
    font-size: 0.78rem;
  }

  .schedule-week-table td::before {
    content: "";
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .schedule-week-table td:nth-of-type(1)::before { content: "Monday"; }
  .schedule-week-table td:nth-of-type(2)::before { content: "Tuesday"; }
  .schedule-week-table td:nth-of-type(3)::before { content: "Wednesday"; }
  .schedule-week-table td:nth-of-type(4)::before { content: "Thursday"; }
  .schedule-week-table td:nth-of-type(5)::before { content: "Friday"; }
  .schedule-week-table td:nth-of-type(6)::before { content: "Saturday"; }
  .schedule-week-table td:nth-of-type(7)::before { content: "Sunday"; }
  .schedule-week-table td:nth-of-type(n + 8) {
    display: none;
  }

  .schedule-cell {
    min-height: 0;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .schedule-cell.no-shift {
    min-height: 58px;
  }

  .schedule-week-table.compact .schedule-cell,
  .schedule-editable-week .schedule-cell,
  .schedule-location-week-table .schedule-cell {
    min-height: 0;
  }

  .schedule-cell-shift {
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
  }

  .schedule-cell-shift + .schedule-cell-shift {
    margin-top: 10px;
  }

  .shift-time-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .shift-time-heading strong {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .shift-time-heading span {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .shift-crew-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    font-size: 0.9rem;
  }

  .shift-crew-list span {
    width: 100%;
    padding: 5px 7px;
  }

  .schedule-cell-actions,
  .location-schedule-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .schedule-cell-actions .button,
  .location-schedule-actions .button {
    min-height: 40px;
    padding: 8px 6px;
    font-size: 0.76rem;
  }

  .schedule-manager-reassign {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
  }

  .president-schedule-strip {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
  }

  .president-schedule-strip section {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.92rem;
  }

  .president-schedule-strip h3 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
  }

  .president-schedule-strip h3 span {
    font-size: 0.75rem;
  }

  .location-schedule-list {
    gap: 14px;
  }

  .location-schedule-row {
    grid-template-columns: 1fr;
    border-radius: 12px;
  }

  .location-schedule-label {
    display: grid;
    gap: 5px;
    min-height: 0;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
  }

  .location-schedule-label .location-address {
    font-size: 0.78rem;
  }

  .location-schedule-days {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .location-schedule-day {
    min-height: 0;
    padding: 0 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
  }

  .location-schedule-date {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 0 -10px 10px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  .location-schedule-date span {
    font-size: 0.72rem;
  }

  .location-schedule-x {
    position: static;
    display: grid;
    min-height: 48px;
    place-items: center;
    font-size: 1.45rem;
  }

  .location-schedule-shift {
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .shift-item,
  .schedule-shift {
    gap: 10px;
    padding: 12px;
    font-size: 0.92rem;
    line-height: 1.35;
  }
}

/* Final phone schedule layout: keep each day header and its status in one card. */
@media (max-width: 640px) {
  .schedule-week-table-wrap,
  .location-schedule-list,
  .president-schedule-strip {
    overflow: visible;
    touch-action: pan-y;
  }

  .schedule-week-table,
  .schedule-week-table thead,
  .schedule-week-table tbody,
  .schedule-week-table tr,
  .schedule-week-table th,
  .schedule-week-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .schedule-week-table {
    border-spacing: 0;
    table-layout: auto;
    font-size: 0.92rem;
  }

  .schedule-week-table thead {
    display: none;
  }

  .schedule-week-table tr {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
  }

  .schedule-week-table th,
  .schedule-week-table td {
    height: auto;
    padding: 0;
    border: 0;
    overflow: visible;
  }

  .schedule-member-heading {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--sidebar) 82%, #000);
    font-size: 0.95rem;
  }

  .schedule-week-table td::before {
    display: block;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .schedule-week-table td:nth-of-type(1)::before { content: "Monday"; }
  .schedule-week-table td:nth-of-type(2)::before { content: "Tuesday"; }
  .schedule-week-table td:nth-of-type(3)::before { content: "Wednesday"; }
  .schedule-week-table td:nth-of-type(4)::before { content: "Thursday"; }
  .schedule-week-table td:nth-of-type(5)::before { content: "Friday"; }
  .schedule-week-table td:nth-of-type(6)::before { content: "Saturday"; }
  .schedule-week-table td:nth-of-type(7)::before { content: "Sunday"; }

  .schedule-cell {
    min-height: 0;
    padding: 12px;
    border-radius: 0 0 10px 10px;
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .schedule-cell.no-shift {
    min-height: 64px;
  }

  .schedule-cell-shift {
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
  }
}

/* Phone portal density pass. Does not target .schedule-week-table current schedule. */
@media (max-width: 640px) {
  html,
  body,
  #app,
  .page-shell,
  .app-shell,
  .schedule-portal-shell,
  .schedule-workspace,
  .schedule-panel {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.schedule-page .page-shell,
  .page-shell {
    padding: 0;
  }

  .schedule-portal-shell {
    gap: 0;
  }

  .topbar {
    padding: 8px 10px;
    gap: 8px;
  }

  .schedule-workspace {
    gap: 0;
    min-height: 0;
  }

  .schedule-navigation {
    min-height: 0;
    padding: 6px 8px;
  }

  .schedule-menu-toggle {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 0.84rem;
  }

  .schedule-sidebar {
    gap: 6px;
    max-height: min(58vh, 460px);
    max-height: min(calc(100dvh - 54px - env(safe-area-inset-bottom)), 460px);
    padding: 6px;
    overflow-y: auto;
  }

  .schedule-sidebar-folder {
    border-radius: 8px;
  }

  .schedule-sidebar-folder summary {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .schedule-sidebar-folder summary span,
  .schedule-sidebar-button span {
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .schedule-sidebar-folder-items {
    gap: 4px;
    padding: 5px;
  }

  .schedule-sidebar-button {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 0.76rem;
  }

  .schedule-panel {
    gap: 8px;
    padding: 8px;
  }

  .schedule-panel-heading,
  .section-heading {
    gap: 6px;
    margin-bottom: 8px;
  }

  .schedule-panel-heading h2,
  .section-heading h2 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .schedule-panel-heading p,
  .section-heading p,
  .muted,
  .field-help {
    font-size: 0.74rem;
    line-height: 1.25;
  }

  .card,
  .notice-item,
  .shift-section,
  .schedule-admin-details,
  .schedule-location-week,
  .schedule-tally-details,
  .schedule-report {
    padding: 9px;
    border-radius: 8px;
  }

  .dashboard-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .summary-grid,
  .field-row,
  .field-row-3 {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  label {
    margin-bottom: 3px;
    font-size: 0.76rem;
  }

  input,
  select,
  textarea {
    min-height: 36px;
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 16px;
  }

  .button,
  button {
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 7px;
    font-size: 0.78rem;
  }

  .button-row {
    gap: 6px;
  }

  .stat {
    min-height: 0;
    padding: 8px;
    border-radius: 8px;
  }

  .stat strong {
    font-size: 1.05rem;
  }

  .stat span,
  .stat p {
    font-size: 0.72rem;
  }

  .table-wrap,
  .directory-table-wrap,
  .text-log-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .location-schedule-list,
  .president-schedule-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
  }

  .location-schedule-row,
  .president-schedule-strip section {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 8px;
    overflow: hidden;
  }

  .location-schedule-label {
    min-height: 0;
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
    line-height: 1.18;
  }

  .location-schedule-label .location-address {
    margin-top: 3px;
    font-size: 0.7rem;
  }

  .location-schedule-days {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 7px;
  }

  .location-schedule-day {
    display: grid;
    grid-template-columns: minmax(74px, 0.34fr) minmax(0, 1fr);
    min-height: 0;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
  }

  .location-schedule-date {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    margin: 0;
    padding: 7px 5px;
    border-right: 1px solid var(--line);
    font-size: 0.66rem;
    line-height: 1.08;
    text-align: center;
  }

  .location-schedule-date span {
    font-size: 0.56rem;
  }

  .location-schedule-x {
    position: static;
    display: grid;
    min-height: 38px;
    place-items: center;
    font-size: 1.1rem;
    line-height: 1;
  }

  .location-schedule-shift {
    padding: 7px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.78rem;
    line-height: 1.2;
  }
}

/* Final phone schedule and phone-action sizing overrides. */
@media (max-width: 640px) {
  .schedule-week-table-wrap {
    overflow: visible;
    touch-action: pan-y;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .schedule-week-table,
  .schedule-week-table thead,
  .schedule-week-table tbody,
  .schedule-week-table tr,
  .schedule-week-table th,
  .schedule-week-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .schedule-week-table {
    border-spacing: 0;
    table-layout: auto;
    font-size: 0.82rem;
  }

  .schedule-week-table thead {
    display: none;
  }

  .schedule-week-table tr {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
  }

  .schedule-week-table th,
  .schedule-week-table td {
    height: auto;
    padding: 0;
    border: 0;
    overflow: hidden;
  }

  .schedule-week-table td {
    display: grid;
    grid-template-columns: minmax(70px, 0.32fr) minmax(0, 1fr);
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
  }

  .schedule-week-table td:nth-of-type(n + 8) {
    display: none;
  }

  .schedule-week-table td::before {
    content: attr(data-day-label);
    display: grid;
    place-items: center;
    margin: 0;
    padding: 7px 5px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
  }

  .schedule-member-heading {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: color-mix(in srgb, var(--sidebar) 76%, #000);
    font-size: 0.88rem;
    line-height: 1.15;
  }

  .schedule-member-heading span {
    margin-top: 2px;
    font-size: 0.7rem;
  }

  .schedule-cell {
    min-height: 0;
    height: auto;
    padding: 8px;
    border: 0;
    border-radius: 0;
    font-size: 0.82rem;
    line-height: 1.24;
  }

  .schedule-cell.no-shift {
    min-height: 42px;
  }

  .schedule-x {
    font-size: 1.2rem;
    line-height: 1;
  }

  .schedule-cell-shift {
    gap: 4px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .phone-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .phone-number {
    grid-column: 1 / -1;
  }

  .phone-actions .phone-action-link,
  .phone-actions button.phone-action-link {
    appearance: none;
    display: grid;
    min-width: 0;
    min-height: 30px;
    width: 100%;
    place-items: center;
    padding: 5px 6px;
    border: 0;
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1;
    text-align: center;
  }
}

/* Phone form polish. Keep schedule-week cards untouched. */
@media (max-width: 640px) {
  .schedule-panel,
  .card,
  .notice-item,
  .shift-section,
  form,
  .dashboard-grid,
  .field-row,
  .field-row-3 {
    min-width: 0;
    max-width: 100%;
  }

  .field-row,
  .field-row-3,
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-row > *,
  .field-row-3 > *,
  .dashboard-grid > *,
  form > * {
    min-width: 0;
    max-width: 100%;
  }

  label {
    overflow-wrap: anywhere;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 8px;
    line-height: 1.25;
  }

  select {
    white-space: normal;
    text-overflow: ellipsis;
  }

  .checkbox-row,
  .toggle-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .button-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .button-row .button,
  form > .button,
  form > button {
    width: 100%;
  }
}

/* Effective final phone density layer for tab interiors. */
@media (max-width: 640px) {
  .schedule-panel {
    gap: 6px;
    padding: 6px;
  }

  .schedule-panel-heading,
  .section-heading {
    gap: 4px;
    padding: 0;
    margin-bottom: 4px;
  }

  .schedule-panel-heading h2,
  .section-heading h2,
  .section-heading h3 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.12;
  }

  .schedule-panel-heading p,
  .section-heading p,
  .card p,
  .muted,
  .field-help {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.22;
  }

  .card,
  .shift-section,
  .notice-item,
  .schedule-admin-details,
  .schedule-created-week,
  .schedule-template-submit,
  .employee-record-card,
  .location-directory-card,
  .availability-day,
  .availability-request-card,
  .time-off-request-card,
  .president-secure-card {
    gap: 6px;
    padding: 7px;
    border-radius: 7px;
  }

  .dashboard-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .summary-grid,
  .settings-grid,
  .location-directory-grid,
  .employee-records-grid,
  .availability-grid,
  .availability-request-comparison,
  .schedule-builder-choice-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .field-row,
  .field-row-3,
  .dealership-position-config-grid,
  .final-schedule-manager-panel,
  .schedule-form-actions,
  .schedule-final-actions,
  .location-file-upload-form,
  .location-file-item,
  .schedule-location-admin-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .button-row,
  .schedule-template-submit-actions,
  .president-account-actions,
  .schedule-type-switch,
  .location-schedule-actions,
  .schedule-archive-actions,
  .document-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .button-row .button,
  .schedule-template-submit-actions .button,
  .president-account-actions .button,
  .schedule-type-switch .button,
  .location-schedule-actions .button,
  .schedule-archive-actions .button,
  .document-actions .button {
    width: 100%;
    min-width: 0;
  }

  .button,
  button {
    min-height: 32px;
    padding: 6px 8px;
    font-size: 0.76rem;
    line-height: 1.12;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 34px;
    padding: 6px 7px;
    font-size: 16px;
    line-height: 1.18;
  }

  textarea {
    min-height: 70px;
  }

  label,
  legend,
  .checkbox-row,
  .toggle-row {
    gap: 6px;
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .schedule-sidebar {
    max-height: min(45vh, 360px);
    max-height: min(calc(100dvh - 50px - env(safe-area-inset-bottom)), 360px);
    gap: 3px;
    padding: 4px;
  }

  .schedule-sidebar-folder summary,
  .schedule-sidebar-button,
  .schedule-sidebar-direct {
    min-height: 30px;
    padding: 6px 7px;
    font-size: 0.72rem;
    line-height: 1.1;
  }

  .schedule-sidebar-folder-items {
    gap: 3px;
    padding: 3px;
  }

  .president-quick-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .president-quick-tab summary {
    min-height: 34px;
    padding: 6px 7px;
  }

  .stat {
    padding: 6px;
  }

  .stat strong {
    font-size: 0.98rem;
    line-height: 1.05;
  }

  .stat span,
  .stat p {
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .directory-table,
  .employee-directory-table,
  .employee-detail-table,
  .text-log-table {
    font-size: 0.64rem;
    line-height: 1.15;
  }

  .directory-table th,
  .directory-table td,
  .employee-directory-table th,
  .employee-directory-table td,
  .employee-detail-table th,
  .employee-detail-table td,
  .text-log-table th,
  .text-log-table td {
    padding: 4px;
  }

  .employee-record-card-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 7px;
  }

  .employee-record-card-details dt {
    font-size: 0.62rem;
  }

  .employee-record-card-details dd {
    font-size: 0.76rem;
  }

  .availability-day {
    gap: 5px;
  }

  .availability-day strong {
    font-size: 0.86rem;
  }

  .phone-actions {
    gap: 4px;
  }

  .phone-actions .phone-action-link,
  .phone-actions button.phone-action-link {
    min-height: 28px;
    padding: 4px 5px;
    font-size: 0.64rem;
  }
}

@media (max-width: 380px) {
  .button-row,
  .schedule-template-submit-actions,
  .president-account-actions,
  .schedule-type-switch,
  .location-schedule-actions,
  .schedule-archive-actions,
  .document-actions,
  .employee-record-card-details,
  .president-quick-tabs {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Sleeker phone card interiors. */
@media (max-width: 640px) {
  .card,
  .employee-record-card,
  .location-directory-card,
  .availability-day,
  .availability-request-card,
  .time-off-request-card,
  .overview-notification,
  .notice-item,
  .shift-section,
  .schedule-admin-details,
  .schedule-created-week,
  .schedule-template-submit,
  .schedule-editable-week,
  .schedule-archive-location,
  .schedule-archive-shift,
  .schedule-ledger-card,
  .schedule-report,
  .president-secure-card,
  .mfa-setup-block,
  .employee-banishment-item,
  .location-file-item {
    gap: 5px;
    padding: 6px;
    border-radius: 6px;
  }

  .card > *,
  .employee-record-card > *,
  .location-directory-card > *,
  .availability-day > *,
  .availability-request-card > *,
  .time-off-request-card > *,
  .shift-section > *,
  .schedule-admin-details > *,
  .schedule-report > *,
  .schedule-ledger-card > *,
  .schedule-archive-shift > * {
    min-width: 0;
    max-width: 100%;
  }

  .card h3,
  .card h4,
  .employee-record-card h3,
  .employee-record-card h4,
  .location-directory-card h3,
  .location-directory-card h4,
  .shift-section h3,
  .shift-section h4,
  .schedule-ledger-card h3,
  .schedule-ledger-card h4 {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.12;
  }

  .card strong,
  .employee-record-card strong,
  .location-directory-card strong,
  .availability-day strong,
  .schedule-archive-shift strong,
  .schedule-ledger-card strong {
    font-size: 0.82rem;
    line-height: 1.12;
  }

  .card span,
  .card p,
  .card small,
  .employee-record-card span,
  .employee-record-card p,
  .employee-record-card small,
  .location-directory-card span,
  .location-directory-card p,
  .location-directory-card small,
  .schedule-archive-shift-meta,
  .schedule-archive-manager,
  .schedule-archive-entry-stats,
  .schedule-ledger-card dt,
  .schedule-ledger-card dd {
    font-size: 0.68rem;
    line-height: 1.18;
  }

  .employee-record-card-heading,
  .location-directory-card-heading,
  .schedule-ledger-card header,
  .schedule-archive-location-header,
  .schedule-archive-shift-top,
  .availability-request-collapsed > summary,
  .time-off-request-collapsed > summary,
  .time-off-person-folder > summary,
  .availability-person-folder > summary {
    gap: 5px;
    min-height: 0;
    padding: 5px;
  }

  .employee-record-card-details,
  .location-directory-meta,
  .schedule-ledger-card dl,
  .schedule-archive-entry,
  .schedule-archive-entry-stats,
  .schedule-archive-shift-total,
  .time-off-request-details,
  .availability-request-comparison {
    gap: 4px 6px;
  }

  .employee-record-card-details dt,
  .schedule-ledger-card dt,
  .time-off-request-details dt {
    font-size: 0.58rem;
    letter-spacing: 0;
  }

  .employee-record-card-details dd,
  .schedule-ledger-card dd,
  .time-off-request-details dd {
    margin-top: 1px;
    font-size: 0.7rem;
    line-height: 1.16;
  }

  .field-row,
  .field-row-3,
  .settings-grid,
  .availability-grid,
  .schedule-builder-filter-controls,
  .schedule-template-cell-controls,
  .final-schedule-time-row,
  .final-schedule-manager-panel,
  .schedule-report-entry,
  .president-report-correction-form {
    gap: 5px;
  }

  label,
  legend,
  .checkbox-row,
  .toggle-row {
    margin: 0;
    font-size: 0.7rem;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 30px;
    padding: 5px 6px;
    border-radius: 6px;
    line-height: 1.12;
  }

  textarea {
    min-height: 58px;
  }

  .checkbox-row input,
  .toggle-row input,
  input[type="checkbox"],
  input[type="radio"] {
    width: 16px;
    height: 16px;
  }

  .button,
  button,
  .phone-actions .phone-action-link,
  .phone-actions button.phone-action-link {
    min-height: 28px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 0.7rem;
  }

  .phone-actions .phone-action-link,
  .phone-actions button.phone-action-link {
    border-radius: 999px;
    font-size: 0.62rem;
  }

  .stat {
    gap: 2px;
    padding: 5px;
  }

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

  .stat span,
  .stat p {
    font-size: 0.64rem;
  }

  .schedule-cell,
  .location-schedule-shift,
  .final-schedule-shift,
  .schedule-cell-shift,
  .schedule-archive-shift {
    gap: 4px;
    padding: 6px;
  }

  .final-schedule-manager-panel select,
  .final-schedule-manager-panel input,
  .schedule-template-cell input,
  .schedule-template-cell select,
  .final-schedule-shift input,
  .final-schedule-shift select {
    min-height: 28px;
    padding: 4px 5px;
    font-size: 0.72rem;
  }

  .final-schedule-save-state,
  .schedule-day-split-label,
  .shift-crew-list,
  .location-address {
    font-size: 0.64rem;
    line-height: 1.15;
  }
}

/* Phone schedule-building fit: no side scrolling for draft creation or final input. */
@media (max-width: 640px) {
  .schedule-template-builder,
  .schedule-template-location-sections,
  .schedule-template-location-section,
  .schedule-template-location-row,
  .final-schedule-layout,
  .schedule-builder-filter-controls {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
  }

  .schedule-template-grid-wrap,
  .final-schedule-grid-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    border-radius: 7px;
  }

  .schedule-template-grid,
  .schedule-template-grid thead,
  .schedule-template-grid tbody,
  .schedule-template-grid tr,
  .schedule-template-grid th,
  .schedule-template-grid td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .schedule-template-grid {
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  .schedule-template-grid thead tr {
    display: grid;
    gap: 4px;
  }

  .schedule-template-grid thead th {
    display: none;
  }

  .schedule-template-grid thead .schedule-template-location-heading {
    display: block;
    padding: 7px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--sidebar) 80%, #000);
    text-align: left;
  }

  .schedule-template-location-heading strong {
    display: block;
    font-size: 0.84rem;
    line-height: 1.12;
  }

  .schedule-template-location-heading span {
    margin-top: 2px;
    font-size: 0.64rem;
    line-height: 1.15;
  }

  .schedule-template-grid tbody {
    display: grid;
    gap: 6px;
    padding: 6px;
  }

  .schedule-template-grid tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
  }

  .schedule-template-grid tbody th {
    display: grid;
    place-items: start;
    padding: 5px 6px;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
  }

  .schedule-template-cell {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 5px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 3px 0 0 transparent;
  }

  .schedule-template-cell + .schedule-template-cell {
    margin-top: 0;
  }

  .schedule-template-cell::before {
    content: attr(data-date-label);
    display: none;
  }

  .schedule-template-grid tbody td:nth-of-type(1)::before { content: "Mon"; }
  .schedule-template-grid tbody td:nth-of-type(2)::before { content: "Tue"; }
  .schedule-template-grid tbody td:nth-of-type(3)::before { content: "Wed"; }
  .schedule-template-grid tbody td:nth-of-type(4)::before { content: "Thu"; }
  .schedule-template-grid tbody td:nth-of-type(5)::before { content: "Fri"; }
  .schedule-template-grid tbody td:nth-of-type(6)::before { content: "Sat"; }
  .schedule-template-grid tbody td:nth-of-type(7)::before { content: "Sun"; }

  .schedule-template-cell::before {
    display: grid;
    align-self: stretch;
    place-items: center;
    padding: 4px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
  }

  .schedule-template-cell label {
    display: none;
  }

  .schedule-template-time {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-column: 2;
  }

  .schedule-template-cell-controls {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 4px;
    width: 100%;
    min-width: 0;
  }

  .schedule-template-count,
  .schedule-template-type {
    width: 100%;
    min-width: 0;
  }

  .schedule-template-cell.is-complete {
    box-shadow: inset 3px 0 0 #15803d;
  }

  .schedule-template-cell.is-invalid {
    box-shadow: inset 3px 0 0 #b91c1c;
  }

  .schedule-template-submit {
    justify-items: stretch;
    text-align: left;
  }

  .schedule-template-submit p {
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .final-schedule-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .final-schedule-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .final-schedule-employee-list {
    grid-column: 1 / -1;
    max-height: 150px;
    padding: 5px;
    font-size: 0.66rem;
  }

  .final-schedule-list-modes {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .final-schedule-list-modes .button {
    min-height: 30px;
    padding: 5px;
    font-size: 0.62rem;
  }

  .final-schedule-employee-row strong,
  .final-schedule-employee-row span {
    font-size: 0.66rem;
  }

  .final-schedule-shift {
    gap: 7px;
    padding: 8px;
    min-width: 0;
    max-width: 100%;
  }

  .final-schedule-shift-summary {
    font-size: 0.76rem;
    line-height: 1.12;
  }

  .final-schedule-shift-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .final-schedule-shift-actions .button,
  .final-schedule-shift select,
  .final-schedule-shift input,
  .final-schedule-manager-panel label {
    min-width: 0;
    max-width: 100%;
  }

  .final-schedule-time-row {
    grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
    gap: 5px;
  }

  .final-schedule-manager-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .final-schedule-manager-panel label:first-child {
    grid-column: auto;
  }
}

@media (max-width: 380px) {
  .schedule-template-grid tbody tr,
  .schedule-template-cell {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-template-grid tbody th {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .schedule-template-cell::before,
  .schedule-template-time,
  .schedule-template-cell-controls {
    grid-column: auto;
  }

  .final-schedule-filters,
  .final-schedule-shift-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Publish drafted shifts fit pass: keep every editor control visible inside the shift card. */
.final-schedule-shift {
  overflow: visible;
}

.final-schedule-shift-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 4px;
}

.final-schedule-shift-actions .button {
  width: 100%;
  white-space: normal;
  line-height: 1.15;
  min-height: 30px;
  padding: 5px 6px;
  font-size: 0.68rem;
}

.final-schedule-shift-summary {
  flex-wrap: wrap;
  overflow: visible;
  white-space: normal;
  row-gap: 2px;
}

.final-schedule-time-row {
  grid-template-columns: minmax(48px, 1fr) 8px minmax(48px, 1fr);
  align-items: center;
}

.final-schedule-time-row span {
  justify-self: center;
  color: #4b5563;
  font-weight: 800;
}

.final-schedule-manager-panel {
  grid-template-columns: minmax(0, 1fr);
}

.final-schedule-manager-panel label:first-child {
  grid-column: auto;
}

.final-schedule-manager-panel label {
  gap: 4px;
}

.final-schedule-manager-panel span {
  min-height: 14px;
  font-size: 0.72rem;
  line-height: 1.1;
}

.final-schedule-manager-panel select,
.final-schedule-manager-panel input,
.final-schedule-member-select {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.final-schedule-save-state {
  min-height: 18px;
  line-height: 1.2;
}

.final-schedule-day .schedule-day-split {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  gap: 10px;
}

.final-schedule-day .schedule-day-split-column {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.final-schedule-day .schedule-day-split-label {
  padding: 0 2px;
}

.final-schedule-day .schedule-day-split-column > .final-schedule-shift {
  width: 100%;
}

@media (min-width: 900px) {
  .final-schedule-shift {
    min-width: 0;
  }

  .final-schedule-table {
    min-width: 0;
  }

  .final-schedule-manager-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .final-schedule-manager-panel label:first-child,
  .final-schedule-manager-panel label:nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .final-schedule-grid-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .final-schedule-table,
  .final-schedule-table thead,
  .final-schedule-table tbody,
  .final-schedule-table tr,
  .final-schedule-table th,
  .final-schedule-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .final-schedule-table {
    table-layout: auto;
    border-spacing: 0;
  }

  .final-schedule-table thead {
    display: none;
  }

  .final-schedule-table tbody {
    display: grid;
    gap: 10px;
  }

  .final-schedule-table tr {
    display: grid;
    gap: 7px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--panel) 94%, #fff);
  }

  .final-schedule-table th,
  .final-schedule-table td {
    height: auto;
    padding: 0;
    border: 0;
    overflow: visible;
  }

  .final-schedule-location-heading {
    width: 100%;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: color-mix(in srgb, var(--sidebar) 82%, #000);
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .final-schedule-location-heading span {
    margin-top: 3px;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .final-schedule-table td {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
  }

  .final-schedule-table td::before {
    content: attr(data-day-label);
    display: grid;
    place-items: center;
    padding: 5px 4px;
    border-right: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.05;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
  }

  .final-schedule-table td:nth-of-type(n + 8) {
    display: none;
  }

  .final-schedule-day {
    min-height: 0;
    padding: 6px;
    border-radius: 0;
    background: transparent;
  }

  .final-schedule-shift {
    gap: 6px;
    padding: 7px;
    min-width: 0;
    max-width: 100%;
  }

  .final-schedule-shift-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .final-schedule-shift-actions .button {
    min-height: 28px;
    padding: 5px 6px;
    font-size: 0.7rem;
  }

  .final-schedule-shift-summary {
    font-size: 0.72rem;
    line-height: 1.12;
  }

  .final-schedule-time-row {
    grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
    gap: 4px;
  }

  .final-schedule-manager-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .final-schedule-manager-panel select,
  .final-schedule-manager-panel input,
  .final-schedule-member-select,
  .final-schedule-shift input,
  .final-schedule-shift select {
    min-height: 28px;
    padding: 5px 6px;
    font-size: 0.72rem;
  }

  .final-schedule-save-state {
    min-height: 14px;
    font-size: 0.64rem;
  }
}

@media (max-width: 380px) {
  .final-schedule-table td {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .final-schedule-table td::before {
    font-size: 0.52rem;
    padding-inline: 2px;
  }

  .final-schedule-day {
    padding: 5px;
  }
}

/* Global responsive fit layer: keeps card-based views inside every viewport. */
.card,
.notice-item,
.shift-item,
.shift-section,
.schedule-panel,
.schedule-builder-choice,
.schedule-admin-details,
.schedule-created-week,
.schedule-template-submit,
.schedule-editable-week,
.schedule-archive-location,
.schedule-archive-shift,
.schedule-ledger-card,
.schedule-report,
.directory-card,
.location-directory-card,
.employee-record-card,
.applicant-card-compact,
.availability-request-card,
.time-off-request-card,
.president-secure-card,
.saas-account-card,
.saas-plan-card {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.card *,
.notice-item *,
.shift-item *,
.shift-section *,
.schedule-panel *,
.schedule-builder-choice *,
.schedule-admin-details *,
.schedule-created-week *,
.schedule-template-submit *,
.schedule-editable-week *,
.schedule-archive-location *,
.schedule-archive-shift *,
.schedule-ledger-card *,
.schedule-report *,
.directory-card *,
.location-directory-card *,
.employee-record-card *,
.applicant-card-compact *,
.availability-request-card *,
.time-off-request-card *,
.president-secure-card *,
.saas-account-card *,
.saas-plan-card * {
  min-width: 0;
}

.dashboard-grid,
.stat-grid,
.metric-grid,
.portal-card-grid,
.schedule-builder-choice-grid,
.location-directory-grid,
.employee-records-grid,
.field-row,
.field-row-3,
.document-actions,
.button-row,
.schedule-form-actions,
.schedule-final-actions,
.schedule-location-admin-actions,
.location-billing-explanation-grid,
.location-billing-profile-table > div,
.schedule-archive-overview,
.schedule-ledger-location-shifts,
.schedule-report-entry,
.availability-request-comparison {
  max-width: 100%;
}

@supports (grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr))) {
  .dashboard-grid,
  .stat-grid,
  .metric-grid,
  .portal-card-grid,
  .schedule-builder-choice-grid,
  .location-directory-grid,
  .employee-records-grid,
  .schedule-ledger-location-shifts {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  }

  .field-row,
  .field-row-3,
  .document-actions,
  .button-row,
  .schedule-form-actions,
  .schedule-final-actions,
  .schedule-location-admin-actions,
  .availability-request-comparison {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  }
}

img,
svg,
canvas,
video,
table {
  max-width: 100%;
}

.card table,
.notice-item table,
.directory-card table,
.schedule-panel table {
  width: 100%;
}

.responsive-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.responsive-data-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.responsive-data-table th,
.responsive-data-table td {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.schedule-archive-days {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: visible;
}

.valet-ticket-quick-actions {
  overflow-x: visible;
  flex-wrap: wrap;
}

.valet-ticket-quick-actions .button {
  flex: 1 1 128px;
  min-width: 0;
}

@media (max-width: 1100px) {
  .schedule-archive-days {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-archive-day {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.card input:not([type="checkbox"]):not([type="radio"]),
.card select,
.card textarea,
.notice-item input:not([type="checkbox"]):not([type="radio"]),
.notice-item select,
.notice-item textarea,
.schedule-panel input:not([type="checkbox"]):not([type="radio"]),
.schedule-panel select,
.schedule-panel textarea {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .page-shell {
    padding: 18px;
  }

  .card,
  .notice-item,
  .shift-section,
  .schedule-admin-details,
  .schedule-created-week,
  .schedule-template-submit,
  .schedule-editable-week,
  .schedule-archive-location,
  .schedule-ledger-card,
  .schedule-report,
  .directory-card,
  .location-directory-card,
  .employee-record-card,
  .applicant-card-compact,
  .availability-request-card,
  .time-off-request-card,
  .president-secure-card {
    padding: 16px;
  }

  .section-heading,
  .schedule-panel-heading,
  .location-directory-card-heading,
  .employee-record-card-heading,
  .schedule-ledger-location-header,
  .schedule-archive-location-header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 12px;
  }

  .card,
  .notice-item,
  .shift-section,
  .schedule-admin-details,
  .schedule-created-week,
  .schedule-template-submit,
  .schedule-editable-week,
  .schedule-archive-location,
  .schedule-ledger-card,
  .schedule-report,
  .directory-card,
  .location-directory-card,
  .employee-record-card,
  .applicant-card-compact,
  .availability-request-card,
  .time-off-request-card,
  .president-secure-card {
    padding: 12px;
  }

  .field-row,
  .field-row-3,
  .document-actions,
  .button-row,
  .schedule-form-actions,
  .schedule-final-actions,
  .schedule-location-admin-actions,
  .location-billing-profile-table > div,
  .schedule-archive-overview,
  .schedule-report-entry,
  .availability-request-card,
  .availability-request-card summary,
  .time-off-request-card,
  .applicant-card-compact summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .button-row .button,
  .document-actions .button,
  .schedule-form-actions .button,
  .schedule-final-actions .button,
  .schedule-location-admin-actions .button {
    width: 100%;
  }

  .responsive-data-table,
  .responsive-data-table thead,
  .responsive-data-table tbody,
  .responsive-data-table tr,
  .responsive-data-table th,
  .responsive-data-table td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .responsive-data-table {
    border: 0;
    table-layout: auto;
  }

  .responsive-data-table thead {
    display: none;
  }

  .responsive-data-table tbody {
    display: grid;
    gap: 9px;
  }

  .responsive-data-table tbody tr {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
  }

  .responsive-data-table tbody td {
    display: grid;
    grid-template-columns: minmax(88px, 0.38fr) minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 8px;
    border: 0;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }

  .responsive-data-table tbody td:last-child {
    border-bottom: 0;
  }

  .responsive-data-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .responsive-data-table tbody td[colspan] {
    grid-template-columns: minmax(0, 1fr);
  }

  .responsive-data-table tbody td[colspan]::before {
    display: none;
  }
}

@media (max-width: 420px) {
  .page-shell {
    padding: 8px;
  }

  .card,
  .notice-item,
  .shift-section,
  .schedule-admin-details,
  .schedule-created-week,
  .schedule-template-submit,
  .schedule-editable-week,
  .schedule-archive-location,
  .schedule-ledger-card,
  .schedule-report,
  .directory-card,
  .location-directory-card,
  .employee-record-card,
  .applicant-card-compact,
  .availability-request-card,
  .time-off-request-card,
  .president-secure-card {
    padding: 10px;
  }

  .section-heading h2,
  .schedule-panel-heading h2 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .section-heading p,
  .schedule-panel-heading p,
  .card p,
  .muted {
    line-height: 1.25;
  }
}

/* Available-width aware publish schedule layout. */
.schedule-panel {
  font-size: clamp(0.92rem, 0.84rem + 0.18vw, 1.04rem);
}

.final-schedule-layout {
  grid-template-columns: minmax(0, 1fr) clamp(180px, 11vw, 240px);
  gap: clamp(12px, 1.1vw, 22px);
  align-items: start;
}

.final-schedule-grid-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.final-schedule-table {
  min-width: clamp(1040px, 100%, 1680px);
}

.final-schedule-table th,
.final-schedule-table td {
  padding: clamp(5px, 0.42vw, 10px);
}

.final-schedule-location-heading {
  width: clamp(132px, 9vw, 190px);
}

.final-schedule-shift {
  width: min(100%, clamp(150px, 9vw, 220px));
  gap: clamp(5px, 0.34vw, 8px);
  padding: clamp(7px, 0.45vw, 10px);
}

.final-schedule-shift-summary {
  font-size: clamp(0.66rem, 0.56rem + 0.16vw, 0.78rem);
}

.final-schedule-shift input,
.final-schedule-shift select {
  min-height: clamp(27px, 1.8vw, 36px);
  font-size: clamp(0.66rem, 0.56rem + 0.15vw, 0.78rem);
}

.final-schedule-shift-actions .button {
  min-height: clamp(30px, 1.9vw, 38px);
  font-size: clamp(0.68rem, 0.58rem + 0.15vw, 0.78rem);
}

.final-schedule-filters {
  position: sticky;
  top: 12px;
  align-self: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}

.final-schedule-list-mode-panel {
  display: grid;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.final-schedule-list-mode-panel > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.final-schedule-list-modes {
  grid-template-columns: minmax(0, 1fr);
}

.final-schedule-list-modes .button,
#final-schedule-employee-list-toggle {
  width: 100%;
  white-space: normal;
}

@media (max-width: 1320px) {
  .final-schedule-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .final-schedule-filters {
    position: static;
    order: -1;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: center;
  }

  .final-schedule-list-mode-panel {
    grid-column: 1 / -1;
  }

  .final-schedule-list-modes {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .final-schedule-employee-list {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1700px) {
  .schedule-panel {
    gap: 18px;
  }

  .final-schedule-grid-wrap {
    max-width: 1760px;
  }
}

@media (max-width: 640px) {
  .final-schedule-table {
    min-width: 0;
  }

  .final-schedule-table th,
  .final-schedule-table td {
    padding: 0;
  }

  .final-schedule-location-heading {
    width: 100%;
  }

  .final-schedule-filters {
    padding: 8px;
  }
}

/* Split-screen time control fit for publish schedule cards. */
@media (min-width: 641px) and (max-width: 1320px) {
  .final-schedule-table {
    min-width: 1280px;
  }

  .final-schedule-shift {
    width: 100%;
  }

  .final-schedule-time-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .final-schedule-time-row span {
    display: none;
  }

  .final-schedule-shift-actions .button {
    padding-inline: 3px;
    font-size: 0.62rem;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  .final-schedule-shift input[type="time"] {
    min-width: 0;
    max-width: 100%;
    min-height: 26px;
    padding: 3px 4px;
    font-size: 0.6rem;
    line-height: 1;
  }
}

/* Draft review cards respond to the day-column width, not only the viewport. */
.final-schedule-shift {
  container-type: inline-size;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.final-schedule-shift-summary,
.final-schedule-shift-summary span,
.final-schedule-shift-actions .button {
  min-width: 0;
  max-width: 100%;
}

.final-schedule-shift-summary span {
  overflow-wrap: anywhere;
}

.final-schedule-shift-actions .button {
  overflow: hidden;
  padding-inline: clamp(2px, 3cqi, 6px);
  font-size: clamp(0.56rem, 6cqi, 0.72rem);
  text-overflow: ellipsis;
}

.final-schedule-time-row input[type="time"] {
  min-width: 0;
  padding-inline: clamp(2px, 2cqi, 5px);
  font-size: clamp(0.56rem, 5.5cqi, 0.72rem);
}

@container (max-width: 145px) {
  .final-schedule-shift-actions,
  .final-schedule-time-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .final-schedule-time-row span {
    display: none;
  }
}

/* Clearer, roomier portal navigation with responsive sizing. */
@media (min-width: 761px) {
  .schedule-workspace {
    grid-template-columns: clamp(215px, 17vw, 276px) minmax(0, 1fr);
  }
}

.schedule-sidebar-folder summary {
  grid-template-columns: 24px minmax(0, 1fr) auto 14px;
  align-items: center;
  column-gap: 8px;
  min-height: 52px;
  padding: 10px 14px;
}

.schedule-sidebar-button {
  grid-template-columns: 24px minmax(0, 1fr) auto;
  column-gap: 8px;
  min-height: 48px;
  padding: 10px 14px 10px 22px;
}

.schedule-sidebar-direct {
  padding-left: 14px;
}

.schedule-nav-icon {
  display: inline-grid !important;
  place-items: center;
  grid-column: 1;
  grid-row: 1;
  width: 22px;
  height: 22px;
  color: currentColor;
  font-size: 1rem;
  line-height: 1;
}

.schedule-sidebar-folder summary strong,
.schedule-sidebar-button strong {
  grid-column: 2;
  grid-row: 1;
}

.schedule-sidebar-folder summary .schedule-notification-badge,
.schedule-sidebar-button .schedule-notification-badge {
  grid-column: 3;
}

.schedule-sidebar-arrow {
  display: block !important;
  grid-column: 4;
  grid-row: 1;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform 160ms ease;
}

.schedule-sidebar-folder[open] > summary .schedule-sidebar-arrow {
  transform: rotate(225deg) translate(-1px, -1px);
}

@media (min-width: 1321px) {
  .schedule-sidebar-folder summary span:not(.schedule-nav-icon):not(.schedule-notification-badge):not(.schedule-sidebar-arrow),
  .schedule-sidebar-button span:not(.schedule-nav-icon):not(.schedule-notification-badge) {
    display: block;
    grid-column: 2 / -1;
    grid-row: 2;
    margin-top: 3px;
    color: color-mix(in srgb, currentColor 72%, transparent);
    font-size: 0.72rem;
    line-height: 1.25;
  }
}

@media (max-width: 760px) {
  .schedule-workspace {
    grid-template-columns: 1fr;
  }

  .schedule-navigation {
    position: static;
    z-index: auto;
    min-height: 0;
    box-shadow: none;
  }

  .schedule-menu-toggle {
    position: static;
    border-radius: 10px;
  }

  .schedule-sidebar {
    position: static;
    inset: auto;
    display: none;
    width: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 6px 0 0;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
    overscroll-behavior: auto;
    box-shadow: none;
  }

  .schedule-navigation.menu-expanded .schedule-sidebar {
    display: grid;
  }

  .schedule-sidebar-folder summary,
  .schedule-sidebar-button,
  .schedule-sidebar-direct {
    min-height: 46px;
    padding-block: 10px;
    font-size: 0.82rem;
  }
}

/* Scale the left navigation only for genuinely large desktop viewports. */
@media (min-width: 2000px) and (min-height: 900px) {
  .schedule-workspace {
    grid-template-columns: clamp(320px, 14.25vw, 405px) minmax(0, 1fr);
  }

  .schedule-sidebar-folder summary {
    grid-template-columns: 30px minmax(0, 1fr) auto 16px;
    column-gap: clamp(10px, 0.55vw, 14px);
    min-height: clamp(62px, 4.2vh, 74px);
    padding: clamp(13px, 0.8vw, 18px) clamp(18px, 1vw, 24px);
    font-size: clamp(0.94rem, 0.42vw, 1.08rem);
  }

  .schedule-sidebar-button,
  .schedule-sidebar-direct {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    column-gap: clamp(10px, 0.55vw, 14px);
    min-height: clamp(56px, 3.8vh, 68px);
    padding: clamp(12px, 0.72vw, 16px) clamp(18px, 1vw, 24px) clamp(12px, 0.72vw, 16px) clamp(26px, 1.35vw, 34px);
    font-size: clamp(0.9rem, 0.4vw, 1.02rem);
  }

  .schedule-sidebar-direct {
    padding-left: clamp(18px, 1vw, 24px);
  }

  .schedule-nav-icon {
    width: 28px;
    height: 28px;
    font-size: clamp(1.08rem, 0.5vw, 1.24rem);
  }

  .schedule-sidebar-folder summary span:not(.schedule-nav-icon):not(.schedule-notification-badge):not(.schedule-sidebar-arrow),
  .schedule-sidebar-button span:not(.schedule-nav-icon):not(.schedule-notification-badge) {
    margin-top: 5px;
    font-size: clamp(0.78rem, 0.34vw, 0.9rem);
    line-height: 1.3;
  }

  .schedule-sidebar-folder summary .schedule-notification-badge,
  .schedule-sidebar-button .schedule-notification-badge {
    min-width: 26px;
    min-height: 26px;
    padding: 3px 8px;
    font-size: 0.78rem;
  }
}

/* Keep action words intact in compact card controls. */
.button,
button,
.schedule-cell-actions .button,
.location-schedule-actions .button,
.final-schedule-shift-actions .button,
.document-actions .button,
.button-row .button {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.employee-scheduling-summary-card {
  display: grid;
  gap: 16px;
}

.employee-scheduling-summary-tools {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.employee-scheduling-summary-tools .final-schedule-list-modes {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.employee-scheduling-summary-card .final-schedule-employee-list {
  max-height: min(520px, 58vh);
}

.valet-control-center,
.valet-admin-panel,
.valet-integration-guide {
  display: grid;
  gap: 14px;
}

.valet-admin-workspace {
  width: 100%;
  min-width: 0;
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.valet-admin-navigation {
  height: 100%;
}

.valet-admin-content,
.valet-admin-view {
  min-width: 0;
}

.valet-admin-view {
  display: grid;
  gap: 14px;
  align-content: start;
}

.valet-admin-view.hidden {
  display: none;
}

.valet-admin-sidebar-folder[data-active="true"] > summary {
  background: color-mix(in srgb, var(--sidebar-active) 72%, var(--sidebar));
}

.valet-admin-panel-heading {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.valet-admin-panel-heading h2,
.valet-admin-panel-heading p {
  margin-top: 0;
}

.valet-admin-view.dashboard-grid > .valet-admin-panel {
  grid-column: 1 / -1;
}

.valet-admin-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 92%, var(--sidebar));
}

.valet-president-portal {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 14px;
}

.valet-president-portal.valet-theme-light {
  --paper: #ffffff;
  --paper-solid: #ffffff;
  --panel: #f4f5f7;
  --ink: #111827;
  --muted: #4b5563;
  --line: rgba(17, 24, 39, 0.2);
  color: var(--ink);
}

.valet-president-portal.valet-theme-light .valet-portal-landing-header,
.valet-president-portal.valet-theme-light .valet-admin-panel {
  border-color: var(--line);
  background: #ffffff;
}

.valet-president-portal.valet-theme-light .valet-admin-workspace,
.valet-president-portal.valet-theme-light .schedule-panel {
  background: var(--panel);
}

.valet-president-portal.valet-theme-light .valet-admin-navigation {
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.valet-portal-landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.valet-portal-landing-header .button-row {
  align-items: stretch;
  gap: 14px;
}

.valet-portal-landing-header .button-row > .button {
  min-width: 190px;
  min-height: 76px;
  padding: 18px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 800;
  text-align: center;
}

.valet-portal-landing-header h1,
.valet-portal-landing-header p,
.valet-admin-panel h3,
.valet-admin-panel p {
  overflow-wrap: anywhere;
}

.valet-president-portal .dashboard-grid,
.valet-president-portal .field-row,
.valet-president-portal .field-row-3 {
  min-width: 0;
}

.valet-president-portal input,
.valet-president-portal select,
.valet-president-portal textarea,
.valet-president-portal .button {
  max-width: 100%;
}

.valet-tag-preview {
  min-height: 74px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.valet-location-uid-list {
  margin-top: 4px;
}

.valet-guest-experience-panel,
.valet-analytics-panel { margin-top: 4px; }

.valet-theme-color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.valet-theme-color-grid label { display: grid; gap: 6px; }
.valet-theme-color-grid input[type="color"] { width: 100%; min-height: 44px; padding: 3px; }

.valet-dashboard-summary-section {
  display: grid;
  gap: 14px;
}

#valet-dashboard-summary {
  display: grid;
  gap: clamp(20px, 2vw, 28px);
  min-width: 0;
  padding-top: 4px;
}

#valet-dashboard-summary > .summary-grid {
  margin: 0;
}

.valet-dashboard-location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(14px, 1.4vw, 20px);
}

.valet-dashboard-location-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 86%, #000);
}

.valet-dashboard-location-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.valet-dashboard-location-card h4 {
  margin: 0;
}

.valet-dashboard-location-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.valet-dashboard-location-card dl > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.valet-dashboard-location-card dt {
  color: var(--muted);
  font-size: 0.72rem;
}

.valet-dashboard-location-card dd {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.valet-analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.valet-analytics-card { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel) 86%, #000); }
.valet-analytics-card h4, .valet-analytics-card p { margin: 0; }
.valet-analytics-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.valet-analytics-metrics > div { display: grid; gap: 4px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.valet-analytics-metrics span { color: var(--muted); font-size: 0.73rem; }
.valet-analytics-metrics strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.valet-analytics-chart { display: flex; align-items: end; gap: 4px; min-height: 150px; padding: 12px 8px 0; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.valet-analytics-chart > div { display: grid; grid-template-rows: 110px auto; align-items: end; flex: 1 0 22px; min-width: 22px; text-align: center; }
.valet-analytics-chart span { display: block; width: 100%; min-height: 8px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #5eead4, #2563eb); }
.valet-analytics-chart small { padding: 5px 0; color: var(--muted); font-size: 0.6rem; transform: rotate(-45deg); }

.valet-location-uid-list .table-wrap {
  margin: 0;
}

.valet-location-uid-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.valet-location-uid-actions .button {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 6px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.valet-gps-panel {
  grid-column: 1 / -1;
  gap: clamp(18px, 1.8vw, 24px);
}

#valet-gps-content {
  display: grid;
  gap: clamp(20px, 2vw, 28px);
  min-width: 0;
  padding-top: 4px;
}

#valet-gps-content > .summary-grid,
#valet-gps-content > .table-wrap,
#valet-gps-content > section {
  min-width: 0;
  margin: 0;
}

.valet-parking-zone-form {
  display: grid;
  gap: 14px;
  padding: clamp(14px, 1.5vw, 18px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.valet-gps-map {
  width: 100%;
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.valet-gps-table-wrap select {
  min-width: 130px;
}

.valet-gps-table-wrap .valet-tracked-provider,
.valet-gps-table-wrap .valet-tracked-device-id,
.valet-gps-table-wrap .valet-tracked-label,
.valet-gps-table-wrap .valet-find-my-account {
  min-width: 170px;
  margin-bottom: 6px;
}

.valet-gps-table-wrap .valet-tracked-mode,
.valet-gps-table-wrap .valet-tracked-stale,
.valet-gps-table-wrap .valet-find-my-pairing {
  min-width: 170px;
  margin-bottom: 6px;
}

.valet-find-my-directory {
  display: grid;
  gap: 16px;
  padding: clamp(14px, 1.5vw, 18px);
  border: 1px solid color-mix(in srgb, #60a5fa 45%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, #1d4ed8 8%, transparent);
}

.valet-find-my-directory h4,
.valet-find-my-directory p {
  margin-top: 0;
}

.valet-find-my-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.valet-find-my-account-grid .notice-item {
  margin: 0;
}

.valet-find-my-onboarding {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.valet-find-my-onboarding > summary {
  cursor: pointer;
  font-weight: 700;
}

.valet-find-my-onboarding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 14px;
  margin-top: 12px;
}

.valet-find-my-onboarding-grid > section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.valet-find-my-onboarding-grid h5 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.valet-iot-management,
.valet-iot-gateway-form {
  display: grid;
  gap: 12px;
}

.valet-iot-management {
  padding: clamp(14px, 1.5vw, 18px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, #0f766e 8%, transparent);
}

.valet-iot-gateway-form {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pill.valet-iot-online { border-color: #2dd4bf; color: #99f6e4; }
.pill.valet-iot-stale { border-color: #f59e0b; color: #fde68a; }
.pill.valet-iot-low-battery { border-color: #ef4444; color: #fecaca; }

.valet-tag-history-panel {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.valet-location-consent {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid color-mix(in srgb, #5eead4 45%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, #0f766e 12%, transparent);
}

.valet-location-consent p { margin: 3px 0 0; }
.valet-location-consent-status { grid-column: 1 / -1; }

.valet-post-checkout-review {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.valet-post-checkout-review h4,
.valet-post-checkout-review p {
  margin: 0;
}

.valet-integration-guide > summary {
  cursor: pointer;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (max-width: 760px) {
  .valet-admin-workspace {
    border-radius: 12px;
  }
  .valet-portal-landing-header { align-items: stretch; flex-direction: column; }
  .valet-portal-landing-header .button-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valet-portal-landing-header .button-row > .button { min-width: 0; width: 100%; }
  .valet-president-portal .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .valet-president-portal .dashboard-grid > *,
  .valet-president-portal .span-6,
  .valet-president-portal .span-12 { grid-column: 1 / -1; }
  .valet-president-portal .field-row,
  .valet-president-portal .field-row-3 { grid-template-columns: minmax(0, 1fr); }
  .valet-admin-panel { padding: 12px; border-radius: 12px; }
  .valet-control-center .section-heading { align-items: stretch; }
  .valet-control-center .section-heading .button { width: 100%; }
  .valet-theme-color-grid, .valet-analytics-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valet-location-consent { grid-template-columns: 1fr; }
  .valet-location-consent .button { width: 100%; }
  #valet-dashboard-summary,
  #valet-gps-content {
    gap: 16px;
    padding-top: 2px;
  }
  .valet-gps-panel {
    gap: 16px;
  }
}

.valet-command-header {
  padding: 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, #000);
}

.valet-live-totals,
.valet-command-bar,
.valet-ticket-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.valet-live-totals span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums;
}

.valet-sync-health { width: fit-content; margin-top: 8px; padding: 5px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; }
.valet-sync-health.online { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.valet-sync-health.offline { background: rgba(245, 158, 11, 0.2); color: #fde68a; }

.valet-sound-activation-gate {
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.78);
  overscroll-behavior: contain;
  touch-action: manipulation;
}

.valet-sound-activation-card {
  display: grid;
  width: min(430px, 100%);
  gap: 12px;
  padding: 24px 20px;
  border: 2px solid #facc15;
  border-radius: 20px;
  background: #101315;
  color: #f8fafc;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
}

.valet-sound-activation-card h3,
.valet-sound-activation-card p {
  margin: 0;
}

.valet-sound-activation-card p {
  color: #d1d5db;
  line-height: 1.45;
}

.valet-sound-activation-icon {
  font-size: 2.35rem;
}

.valet-sound-activation-card .button {
  width: 100%;
  min-height: 64px;
  font-size: 1rem;
  touch-action: manipulation;
}
.valet-risk-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.valet-ticket-tile.forgotten-item { border-color: #f97316 !important; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.55); }
.valet-board.valet-tile-board .valet-ticket-tile.forgotten-item.is-selected {
  box-shadow:
    0 0 0 3px var(--valet-focus-edge, #f8fafc),
    0 0 0 6px #f97316,
    0 0 18px rgba(249, 115, 22, 0.72) !important;
}
.valet-ticket-tile.has-incident { border-color: #ef4444; box-shadow: inset 0 0 0 3px #ef4444; }
.valet-ticket-tile.is-vip > summary { background: linear-gradient(135deg, rgba(234, 179, 8, 0.32), rgba(168, 85, 247, 0.2)); }

.valet-command-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 8px;
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(12px);
}

.valet-command-bar .button {
  flex: 1 1 120px;
  min-height: 50px;
}

.valet-overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
}

.valet-overlay-panel {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(620px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.valet-overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 12;
  width: 48px;
  height: 48px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.valet-overlay-close-row { display: contents; }

.valet-overlay-panel h3 { padding-right: 0; }
.valet-more-menu { display: grid; gap: 10px; }
.valet-more-menu .button { min-height: 58px; justify-content: flex-start; }
.valet-duty-list { display: grid; gap: 8px; }
.valet-duty-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); }
.valet-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.valet-report-grid > div { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.valet-report-grid strong { font-size: 1.4rem; }

.valet-live-shift-report {
  display: grid;
  gap: 18px;
}

.valet-report-title,
.valet-report-period {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.valet-report-title h3,
.valet-report-section h4 {
  margin: 0;
  color: #facc15;
}

.valet-report-period {
  display: grid;
}

.valet-report-section {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.valet-live-shift-report .valet-report-grid strong {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.valet-report-ticket-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.valet-report-ticket-summary span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.valet-live-shift-report table {
  min-width: 620px;
}

.valet-live-shift-report th,
.valet-live-shift-report td {
  text-align: left;
  white-space: nowrap;
}

/* Valet operations: resilient compact layouts for tablets, split-screen, and desktops. */
.valet-gps-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.valet-gps-table-wrap table {
  table-layout: auto;
  min-width: 1180px;
}

.valet-gps-table-wrap th,
.valet-gps-table-wrap td {
  min-width: 120px;
  word-break: normal;
  overflow-wrap: normal;
}

.valet-gps-table-wrap th:first-child,
.valet-gps-table-wrap td:first-child {
  min-width: 86px;
}

.valet-nfc-card-list,
.valet-nfc-group-list,
.valet-report-ticket-boxes {
  display: grid;
  gap: 0.75rem;
}

.valet-nfc-inventory-group {
  border: 1px solid var(--border-color, #30363d);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.valet-nfc-inventory-group > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-height: 58px;
  padding: 0.9rem 1rem;
  cursor: pointer;
}

.valet-nfc-inventory-group > summary > span:last-child {
  margin-left: auto;
  color: var(--muted-color, #9ca3af);
}

.valet-nfc-folder-icon {
  font-size: 1.2rem;
}

.valet-nfc-group-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.valet-nfc-group-actions p {
  flex: 1 1 220px;
  margin: 0;
}

.valet-nfc-group-assignment {
  display: flex;
  flex: 1 1 360px;
  gap: 0.5rem;
}

.valet-nfc-group-assignment select {
  min-width: 0;
}

.valet-nfc-group-assignment .button {
  flex: 0 0 auto;
}

.valet-nfc-inventory-group > .valet-nfc-card-list {
  padding: 0 1rem 1rem;
}

.valet-nfc-inventory-card,
.valet-report-ticket-box {
  border: 1px solid var(--border-color, #30363d);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.valet-nfc-inventory-card > summary,
.valet-report-ticket-box > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.85rem 1rem;
  cursor: pointer;
}

.valet-nfc-inventory-card > summary > span:last-child,
.valet-report-ticket-box > summary > span:last-child {
  margin-left: auto;
}

.valet-nfc-inventory-facts,
.valet-report-ticket-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
}

.valet-nfc-inventory-facts > div,
.valet-report-ticket-timeline > div,
.valet-employee-performance-grid > article {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--border-color, #30363d);
  border-radius: 8px;
}

.valet-nfc-inventory-facts dt,
.valet-report-ticket-timeline dt {
  color: var(--muted-color, #9ca3af);
  font-size: 0.78rem;
}

.valet-nfc-inventory-facts dd,
.valet-report-ticket-timeline dd {
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}

.valet-nfc-inventory-card > .button-row,
.valet-report-ticket-box > p {
  margin: 0 1rem 1rem;
}

.valet-online-tip-badge {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #12b981;
  color: #03150f;
  font-weight: 900;
}

.valet-ticket-tile .valet-online-tip-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 0.75rem;
}

.valet-report-ticket-box.has-damage {
  border-color: #ef4444;
}

.valet-report-ticket-note {
  padding: 0.75rem;
  border-left: 3px solid #d4af37;
  background: rgba(212, 175, 55, 0.08);
}

.valet-report-ticket-conversation {
  min-height: 0;
  grid-template-rows: auto minmax(140px, auto);
  margin: 0 1rem 1rem;
  text-align: left;
}

.valet-report-ticket-conversation .valet-chat-header {
  position: static;
}

.valet-report-ticket-conversation .valet-chat-live.is-archived {
  background: rgba(148, 163, 184, 0.18);
  color: #dbeafe;
}

.valet-report-ticket-conversation .valet-message-thread {
  min-height: 140px;
  max-height: 380px;
}

.valet-report-ticket-conversation .valet-message-bubble span {
  letter-spacing: 0.01em;
}

.valet-employee-performance {
  margin-top: 1rem;
}

.valet-employee-performance > summary {
  cursor: pointer;
  font-weight: 700;
}

.valet-employee-performance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.valet-employee-performance-grid article {
  display: grid;
  gap: 0.3rem;
}

.president-valet-shift-report {
  margin: 0 0 1rem;
  border: 1px solid var(--border-color, #30363d);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.president-valet-shift-report > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.3rem;
  min-height: 64px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.04);
}

.president-valet-shift-report[open] > summary {
  border-bottom: 1px solid var(--border-color, #30363d);
}

.president-valet-shift-report > .valet-live-shift-report,
.president-valet-shift-report > .president-valet-message-archive,
.president-valet-shift-report > h4,
.president-valet-shift-report > .button-row {
  margin-inline: 1rem;
}

@media (max-width: 760px) {
  .valet-nfc-inventory-card > summary > span:last-child,
  .valet-report-ticket-box > summary > span:last-child {
    width: 100%;
    margin-left: 0;
  }
}

.valet-report-total th,
.valet-report-total td {
  border-top: 2px solid currentColor;
  font-weight: 900;
}

.valet-manager-payroll-report form {
  display: grid;
  gap: 12px;
}

.valet-manager-payroll-report table {
  min-width: 760px;
}

.valet-manager-payroll-report input,
.valet-manager-payroll-report select {
  min-width: 110px;
}
.valet-ticket-quick-actions {
  display: grid;
  width: 100%;
  min-width: 0;
  margin-top: 14px;
  padding: 14px;
  overflow: visible;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 94%, #000);
}

.valet-ticket-quick-actions-heading {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.valet-ticket-quick-actions-heading strong,
.valet-ticket-quick-actions-help {
  min-width: 0;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  writing-mode: horizontal-tb;
}

.valet-ticket-quick-actions-heading strong {
  font-size: 1rem;
}

.valet-ticket-quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  gap: 8px;
}

.valet-ticket-quick-actions-grid .button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  height: auto;
  padding: 10px 8px;
  overflow: hidden;
  text-align: center;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  writing-mode: horizontal-tb;
  line-height: 1.2;
}

@media (min-width: 700px) {
  .valet-ticket-quick-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.valet-theme-light {
  --panel: #f4f5f7;
  --valet-arrival-background: #ffffff;
  --valet-focus-edge: #111827;
  --valet-focus-contrast: rgba(255, 255, 255, 0.98);
  --ink: #111827;
  --muted: #4b5563;
  --line: rgba(17, 24, 39, 0.2);
  color: var(--ink);
}

.valet-arrival-inline { display: none; }

.valet-arrival-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1001;
  width: min(720px, calc(100vw - 24px));
  max-height: 90vh;
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--valet-arrival-background);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.75), 0 22px 70px rgba(0, 0, 0, 0.55);
}

.valet-theme-light .valet-arrival-modal {
  box-shadow: 0 0 0 100vmax rgba(255, 255, 255, 0.78), 0 22px 70px rgba(17, 24, 39, 0.2);
}

.valet-nfc-modal {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1001;
  width: min(720px, calc(100vw - 24px));
  max-height: 90vh;
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: 20px;
  border: 1px solid rgba(94, 234, 212, 0.72);
  background: var(--valet-arrival-background);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.75), 0 22px 70px rgba(0, 0, 0, 0.55);
}

.valet-ticket-tile.valet-nfc-highlight {
  border: 3px solid #5eead4;
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.22), 0 0 28px rgba(94, 234, 212, 0.45);
}

.valet-damage-check {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.12);
}

.valet-damage-check > input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.valet-damage-evidence > input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.valet-damage-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.valet-damage-choice label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.valet-damage-evidence { display: grid; gap: 10px; }
.valet-damage-video-preview video { width: 100%; max-height: 300px; border-radius: 10px; background: #000; }
.valet-voice-field-button { width: 100%; min-height: 42px; margin-top: 7px; }

.valet-damage-photo-preview,
.valet-damage-viewer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.valet-damage-photo-preview figure,
.valet-damage-viewer figure {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.valet-damage-photo-preview img,
.valet-damage-viewer img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.valet-damage-photo-preview figcaption,
.valet-damage-viewer figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.75rem;
}

.valet-sms-consent {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.84rem;
}

.public-valet-ad {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(168, 85, 247, 0.09));
}

.public-valet-ad > span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.2);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-valet-ad img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

.public-valet-ad h2,
.public-valet-ad p {
  margin: 0;
}

.valet-compliance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.valet-compliance-grid > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

@media (max-width: 560px) {
  .valet-compliance-grid { grid-template-columns: 1fr; }
  .valet-damage-photo-preview,
  .valet-damage-viewer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valet-ticket-facts { grid-template-columns: 1fr; }
  .valet-damage-choice { grid-template-columns: 1fr; }
}

.valet-arrival-close {
  width: 48px;
  height: 48px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.valet-manual-toggle {
  align-self: end;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.valet-phone-voice-button {
  width: 100%;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .valet-module { padding: 8px; }
  .valet-command-header { align-items: stretch; }
  .valet-live-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valet-command-bar { flex-wrap: nowrap; }
  .valet-command-bar .button { min-width: 0; padding-inline: 6px; font-size: 0.74rem; }
  .valet-overlay-panel { align-self: end; width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; }
  .valet-arrival-modal,
  .valet-nfc-modal { inset: auto 0 0; width: 100%; max-height: 92vh; transform: none; border-radius: 18px 18px 0 0; }
  .valet-gps-map { min-height: 340px; }
}

/* Compact, phone-first valet workspace. */
.valet-portal-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  gap: 0;
}

.valet-module {
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}

.valet-command-header {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.valet-board-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.valet-board-identity > div:first-child {
  flex: 1 1 180px;
}

.valet-board-identity h2,
.valet-board-identity p {
  margin: 0;
}

.valet-board-identity h2 {
  font-size: clamp(1.05rem, 5vw, 1.4rem);
  line-height: 1.15;
}

.valet-board-identity p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.valet-board-identity .valet-sync-health {
  margin-top: 0;
}

.valet-live-totals {
  display: grid;
  grid-template-columns: minmax(68px, 0.8fr) minmax(58px, 0.65fr) minmax(64px, 0.7fr) minmax(64px, 0.7fr) minmax(116px, 1.35fr);
  gap: 6px;
}

.valet-live-totals span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 9px;
  font-size: 0.76rem;
}

.valet-live-totals b {
  font-size: 1.05rem;
}

.valet-total-requested strong {
  min-width: 0;
  white-space: nowrap;
}

.valet-command-bar {
  display: grid;
  grid-template-columns: 0.75fr 0.85fr 1.2fr 1fr;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.valet-command-bar .button {
  min-width: 0;
  min-height: 48px;
  padding: 8px 6px;
}

.valet-command-bar .valet-arrival-button {
  min-height: 56px;
  font-size: 1rem;
  font-weight: 900;
}

.valet-arrival-modal {
  width: min(860px, calc(100vw - 20px));
  max-height: min(94dvh, 820px);
  gap: 8px;
  padding: 12px;
}

.valet-arrival-modal .valet-fast-heading {
  min-height: 50px;
  padding: 8px 10px;
}

.valet-arrival-modal .valet-fast-heading h3 {
  font-size: 1.1rem;
}

.valet-arrival-modal .valet-fast-heading p {
  font-size: 0.75rem;
}

.valet-arrival-core-grid {
  display: grid;
  grid-template-columns: minmax(88px, 0.28fr) minmax(210px, 1fr);
  gap: 8px;
  align-items: start;
}

.valet-arrival-vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.valet-arrival-core-grid label,
.valet-arrival-vehicle-grid label,
.valet-arrival-optional label {
  margin-bottom: 3px;
  font-size: 0.72rem;
}

.valet-arrival-modal input,
.valet-arrival-modal select,
.valet-arrival-modal textarea {
  min-height: 42px;
  padding: 8px 10px;
}

.valet-arrival-ticket-field input {
  text-align: center;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.valet-arrival-phone-field input {
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.valet-arrival-modal .valet-phone-voice-button {
  min-height: 38px;
  margin-top: 5px;
  padding-block: 6px;
  font-size: 0.78rem;
}

.valet-arrival-modal .valet-damage-check {
  grid-template-columns: auto minmax(240px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.valet-arrival-modal .valet-damage-choice {
  gap: 6px;
}

.valet-arrival-modal .valet-damage-choice label {
  min-height: 40px;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.valet-arrival-modal .valet-damage-evidence,
.valet-arrival-modal .valet-voice-field-button {
  grid-column: 1 / -1;
}

.valet-arrival-optional {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.valet-arrival-optional summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.valet-arrival-optional-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.valet-arrival-notes {
  grid-column: 1 / -1;
}

.valet-arrival-notes textarea {
  min-height: 54px;
  resize: vertical;
}

.valet-arrival-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.74rem;
}

.valet-arrival-footer-meta .valet-sms-consent {
  min-height: 36px;
  align-items: center;
  margin: 0;
  padding: 6px 9px;
}

.valet-arrival-save-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr);
  gap: 6px;
}

.valet-arrival-save-row .button {
  min-height: 58px;
  justify-content: center;
  font-size: 1.08rem;
  font-weight: 900;
}

@media (max-width: 640px) {
  .valet-portal-shell { width: 100%; }
  .valet-module { padding: 8px; border-radius: 0; }
  .valet-command-header { padding: 9px; }
  .valet-live-totals { grid-template-columns: 0.8fr 0.65fr 0.7fr 1.35fr; }
  .valet-command-bar .button { font-size: 0.68rem; }
  .valet-arrival-modal {
    inset: max(6px, env(safe-area-inset-top)) 6px auto;
    width: auto;
    height: auto;
    max-height: none;
    overflow: visible;
    transform: none;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
  }
  .valet-arrival-modal .valet-fast-heading {
    width: 100%;
    flex-direction: row;
    align-items: center;
  }
  .valet-arrival-modal .valet-arrival-close { width: 40px; height: 40px; font-size: 1.6rem; }
  .valet-arrival-core-grid { grid-template-columns: 92px minmax(0, 1fr); }
  .valet-arrival-optional-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valet-arrival-notes { grid-column: 1 / -1; }
  .valet-arrival-modal .valet-damage-check { grid-template-columns: 1fr; }
  .valet-arrival-footer-meta { align-items: stretch; }
  .valet-arrival-save-row {
    position: static;
    padding-top: 0;
  }
}

@media (max-height: 720px) and (max-width: 640px) {
  .valet-arrival-modal { gap: 5px; padding: 6px; }
  .valet-arrival-modal .valet-fast-heading p { display: none; }
  .valet-arrival-modal .valet-fast-heading { min-height: 42px; padding: 5px 8px; }
  .valet-arrival-modal input,
  .valet-arrival-modal select { min-height: 38px; }
  .valet-arrival-modal .valet-damage-check { gap: 5px; padding: 6px 8px; }
  .valet-arrival-modal .valet-damage-choice label { min-height: 36px; padding: 5px 7px; }
  .valet-arrival-optional summary { min-height: 36px; padding: 5px 8px; }
  .valet-arrival-footer-meta .valet-sms-consent { min-height: 32px; padding: 4px 7px; }
  .valet-arrival-save-row .button { min-height: 48px; }
}

/* Keep every valet popup positioned against the visible browser viewport.
   A backdrop filter creates a containing block for fixed descendants, so the
   valet card must not inherit the shared card filter. */
.valet-module {
  backdrop-filter: none;
}

.valet-overlay-backdrop {
  align-items: center;
  justify-items: center;
  overflow: hidden;
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}

.valet-overlay-panel,
.valet-arrival-modal,
.valet-nfc-modal {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.valet-overlay-panel {
  align-self: center;
  width: min(720px, 100%);
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
}

.valet-arrival-modal,
.valet-nfc-modal {
  inset: 50% auto auto 50%;
  width: min(860px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  transform: translate(-50%, -50%);
}

.valet-arrival-modal > .valet-fast-heading,
.valet-nfc-modal > .valet-fast-heading {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--valet-arrival-background);
}

.valet-arrival-modal .valet-arrival-save-row {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding-top: 4px;
  background: var(--valet-arrival-background);
}

@media (max-width: 640px) {
  .valet-overlay-backdrop {
    padding:
      max(6px, env(safe-area-inset-top))
      max(6px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left));
  }

  .valet-overlay-panel {
    align-self: center;
    width: 100%;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 14px;
    padding: 16px;
  }

  .valet-arrival-modal,
  .valet-nfc-modal {
    inset: 50% auto auto 50%;
    width: calc(100vw - 12px);
    height: auto;
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    transform: translate(-50%, -50%);
    border-radius: 14px;
  }
}

/* Dense Arrival workspace: all entry fields stay visible while evidence
   previews remain collapsed until the operator chooses to inspect them. */
.valet-arrival-modal {
  gap: 6px;
  padding: 10px;
}

.valet-arrival-modal .valet-fast-heading {
  min-height: 44px;
  padding: 6px 9px;
}

.valet-arrival-modal input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.valet-arrival-modal select {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 5px 8px;
}

.valet-arrival-modal input[type="radio"],
.valet-arrival-modal input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  padding: 0;
}

.valet-arrival-modal textarea {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 5px 8px;
  resize: none;
}

.valet-arrival-modal .valet-damage-check {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  gap: 5px 8px;
  padding: 5px 8px;
}

.valet-arrival-modal .valet-damage-choice {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.valet-arrival-modal .valet-damage-choice label {
  min-height: 32px;
  padding: 4px 7px;
}

.valet-arrival-modal .valet-damage-evidence {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 5px;
}

.valet-damage-evidence-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.valet-damage-evidence-actions .button {
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 5px 7px;
  justify-content: center;
  font-size: 0.74rem;
}

.valet-arrival-details {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.valet-arrival-details .valet-arrival-optional-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 5px 6px;
  padding: 0;
}

.valet-arrival-field-make,
.valet-arrival-field-model,
.valet-arrival-field-color,
.valet-arrival-field-plate,
.valet-arrival-field-parking,
.valet-arrival-field-key,
.valet-arrival-details .valet-manual-toggle {
  grid-column: span 2;
}

.valet-arrival-field-first-name,
.valet-arrival-field-last-name {
  grid-column: span 3;
}

.valet-arrival-details label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.66rem;
  line-height: 1.1;
}

.valet-arrival-details .valet-manual-toggle {
  display: flex;
  align-self: end;
  align-items: center;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 5px 7px;
}

.valet-arrival-details .valet-arrival-notes {
  grid-column: span 4;
}

.valet-damage-review {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.valet-arrival-modal .valet-damage-evidence.hidden,
.valet-arrival-modal .valet-damage-review.hidden {
  display: none;
}

.valet-damage-review summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 5px 7px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
}

.valet-damage-review > div {
  margin: 0 6px 6px;
}

.valet-damage-photo-preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.valet-damage-photo-preview figure {
  padding: 4px;
}

.valet-damage-photo-preview figcaption {
  margin-top: 2px;
  font-size: 0.62rem;
}

.valet-damage-video-preview video {
  max-height: 150px;
}

.valet-arrival-modal .valet-arrival-save-row .button {
  min-height: 44px;
  padding: 7px 10px;
  font-size: 0.94rem;
}

@media (max-width: 640px) {
  .valet-arrival-modal {
    gap: 4px;
    padding: 6px;
  }

  .valet-arrival-modal .valet-fast-heading {
    min-height: 38px;
    padding: 4px 7px;
  }

  .valet-arrival-modal .valet-fast-heading p {
    display: none;
  }

  .valet-arrival-core-grid {
    grid-template-columns: minmax(72px, 0.32fr) minmax(0, 1fr);
    gap: 5px;
  }

  .valet-arrival-modal input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
  .valet-arrival-modal select,
  .valet-arrival-modal textarea {
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 4px 6px;
    font-size: 16px;
    line-height: 1.1;
  }

  .valet-arrival-ticket-field input {
    font-size: 1rem;
  }

  .valet-arrival-phone-field input {
    font-size: 16px;
  }

  .valet-arrival-modal .valet-damage-check {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 6px;
    padding: 4px 6px;
  }

  .valet-arrival-modal .valet-damage-check > strong {
    font-size: 0.7rem;
  }

  .valet-arrival-modal .valet-damage-choice label {
    min-height: 28px;
    padding: 3px 5px;
    font-size: 0.65rem;
  }

  .valet-arrival-modal .valet-damage-evidence {
    grid-template-columns: 1fr 1fr;
  }

  .valet-damage-evidence-actions {
    grid-column: 1 / -1;
  }

  .valet-damage-evidence-actions .button,
  .valet-damage-review summary {
    min-height: 36px;
    padding: 4px 5px;
    font-size: 0.65rem;
  }

  .valet-arrival-details {
    padding: 4px;
  }

  .valet-arrival-details .valet-arrival-optional-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px 4px;
  }

  .valet-arrival-field-make,
  .valet-arrival-field-model,
  .valet-arrival-field-color,
  .valet-arrival-field-plate,
  .valet-arrival-field-parking,
  .valet-arrival-field-key,
  .valet-arrival-details .valet-manual-toggle {
    grid-column: span 2;
  }

  .valet-arrival-field-first-name,
  .valet-arrival-field-last-name {
    grid-column: span 3;
  }

  .valet-arrival-details label {
    margin-bottom: 1px;
    font-size: 0.58rem;
  }

  .valet-arrival-details .valet-manual-toggle {
    min-height: 36px;
    height: 36px;
    padding: 3px 5px;
    font-size: 0.62rem;
  }

  .valet-arrival-details .valet-arrival-notes {
    grid-column: span 4;
  }

  .valet-arrival-modal textarea {
    font-size: 16px;
  }

  .valet-arrival-footer-meta {
    gap: 4px;
    font-size: 0.62rem;
  }

  .valet-arrival-footer-meta .valet-sms-consent {
    min-height: 28px;
    padding: 3px 5px;
    font-size: 0.62rem;
  }

  .valet-arrival-modal .valet-arrival-save-row .button {
    min-height: 40px;
    padding: 5px 8px;
    font-size: 0.84rem;
  }
}

/* Arrival is an app sheet on phones. Its outer form always matches the
   visual viewport, so Safari's keyboard cannot leave fields beneath a
   scrolling page or under the Save action. */
@media (max-width: 640px) {
  body.valet-arrival-viewport-lock .valet-arrival-modal {
    top: var(--valet-arrival-visual-top, 50%);
    width: calc(100vw - 12px);
    height: var(--valet-arrival-visual-height, calc(100dvh - 12px));
    max-height: var(--valet-arrival-visual-height, calc(100dvh - 12px));
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    overflow: hidden;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    border-radius: 18px;
  }

  body.valet-arrival-viewport-lock .valet-arrival-details {
    min-height: 0;
    align-self: start;
  }

  body.valet-arrival-viewport-lock .valet-arrival-save-row {
    position: static;
    padding-top: 0;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details {
    height: 100%;
    align-self: stretch;
    padding: 8px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details .valet-arrival-optional-grid {
    height: 100%;
    align-content: space-evenly;
    row-gap: 10px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-field,
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-notes {
    display: grid;
    grid-template-rows: auto minmax(48px, 1fr);
    align-self: stretch;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details input:not([type="checkbox"]):not([type="file"]),
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details select,
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details textarea,
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details .valet-manual-toggle {
    height: clamp(48px, 7dvh, 72px);
    min-height: 48px;
    max-height: 72px;
    align-self: stretch;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details label {
    font-size: 0.72rem;
  }
}

/* The compact keyboard state keeps the complete ticket and primary action in
   one visible app frame. All text inputs stay at 16px to prevent iOS zoom. */
@media (max-width: 640px) {
  body.valet-arrival-keyboard-open .valet-arrival-modal {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 3px;
    padding: 5px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-fast-heading {
    min-height: 40px;
    height: 40px;
    padding: 2px 6px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-fast-heading h3 {
    font-size: 0.92rem;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-arrival-close {
    width: 40px;
    height: 40px;
    border-width: 2px;
    font-size: 1.5rem;
  }

  body.valet-arrival-keyboard-open .valet-arrival-core-grid {
    gap: 3px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-core-grid label,
  body.valet-arrival-keyboard-open .valet-arrival-details label {
    margin-bottom: 0;
    font-size: 0.54rem;
    line-height: 1;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
  body.valet-arrival-keyboard-open .valet-arrival-modal select,
  body.valet-arrival-keyboard-open .valet-arrival-modal textarea {
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    padding: 2px 5px;
    font-size: 16px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-damage-check {
    min-height: 30px;
    padding: 2px 5px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-damage-choice label {
    min-height: 26px;
    padding: 2px 4px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details {
    height: 100%;
    padding: 3px;
    overflow: hidden;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details .valet-arrival-optional-grid {
    height: 100%;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 2px 3px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-field,
  body.valet-arrival-keyboard-open .valet-arrival-notes {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.valet-arrival-keyboard-open .valet-arrival-field > input,
  body.valet-arrival-keyboard-open .valet-arrival-field > select,
  body.valet-arrival-keyboard-open .valet-arrival-notes > textarea {
    align-self: stretch;
    height: 100%;
    min-height: 0;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details .valet-manual-toggle {
    min-height: 0;
    height: 100%;
    padding: 2px 4px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-footer-meta {
    display: none;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-arrival-save-row .button {
    min-height: 36px;
    height: 36px;
    padding: 3px 8px;
  }

  body.valet-arrival-short-viewport .valet-arrival-modal {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  body.valet-arrival-short-viewport .valet-arrival-modal > .valet-fast-heading {
    display: none;
  }
}

/* Harsh Weather adds a microphone action to every field. Keep those actions
   inside their field instead of allowing them to create overlapping grid
   rows, and remove them once the keyboard's own dictation control is open. */
@media (max-width: 640px) {
  .valet-arrival-voice-mode .valet-arrival-ticket-field,
  .valet-arrival-voice-mode .valet-arrival-phone-field,
  .valet-arrival-voice-mode .valet-arrival-field,
  .valet-arrival-voice-mode .valet-arrival-notes {
    position: relative;
  }

  .valet-arrival-voice-mode .valet-arrival-ticket-field > input,
  .valet-arrival-voice-mode .valet-arrival-phone-field > input,
  .valet-arrival-voice-mode .valet-arrival-field > input,
  .valet-arrival-voice-mode .valet-arrival-notes > textarea {
    padding-right: 36px;
  }

  .valet-arrival-voice-mode .valet-arrival-field:has(> select) > select {
    padding-left: 34px;
  }

  .valet-arrival-voice-mode .valet-arrival-ticket-field > .valet-voice-field-button,
  .valet-arrival-voice-mode .valet-arrival-phone-field > .valet-voice-field-button,
  .valet-arrival-voice-mode .valet-arrival-field > .valet-voice-field-button,
  .valet-arrival-voice-mode .valet-arrival-notes > .valet-voice-field-button {
    position: absolute;
    right: 3px;
    bottom: 3px;
    z-index: 2;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    font-size: 0;
  }

  .valet-arrival-voice-mode .valet-arrival-field:has(> select) > .valet-voice-field-button {
    right: auto;
    left: 3px;
  }

  .valet-arrival-voice-mode .valet-arrival-ticket-field > .valet-voice-field-button::before,
  .valet-arrival-voice-mode .valet-arrival-phone-field > .valet-voice-field-button::before,
  .valet-arrival-voice-mode .valet-arrival-field > .valet-voice-field-button::before,
  .valet-arrival-voice-mode .valet-arrival-notes > .valet-voice-field-button::before,
  .valet-arrival-voice-mode .valet-damage-check > .valet-voice-field-button::before {
    content: "\1F399";
    font-size: 0.86rem;
    line-height: 1;
  }

  .valet-arrival-voice-mode .valet-damage-check {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .valet-arrival-voice-mode .valet-damage-check > .valet-voice-field-button {
    grid-column: 3;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    font-size: 0;
  }

  .valet-arrival-voice-mode .valet-damage-check > .valet-damage-evidence {
    grid-column: 1 / -1;
  }

  body.valet-arrival-keyboard-open .valet-arrival-voice-mode .valet-voice-field-button,
  body.valet-arrival-keyboard-open .valet-arrival-voice-mode .valet-arrival-voice-message {
    display: none;
  }

  body.valet-arrival-keyboard-open .valet-arrival-voice-mode .valet-arrival-ticket-field > input,
  body.valet-arrival-keyboard-open .valet-arrival-voice-mode .valet-arrival-phone-field > input,
  body.valet-arrival-keyboard-open .valet-arrival-voice-mode .valet-arrival-field > input,
  body.valet-arrival-keyboard-open .valet-arrival-voice-mode .valet-arrival-field > select,
  body.valet-arrival-keyboard-open .valet-arrival-voice-mode .valet-arrival-notes > textarea {
    padding-right: 5px;
    padding-left: 5px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-voice-mode .valet-damage-check {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.valet-arrival-field-plate {
  position: relative;
}

.valet-arrival-field-plate > #valet-license-plate {
  padding-right: 36px;
}

.valet-arrival-plate-scan {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 3;
  width: 28px;
  height: 28px;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 0.9rem !important;
  line-height: 1 !important;
  cursor: pointer;
}

.valet-arrival-plate-scan span,
.valet-plate-ocr-input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.valet-arrival-plate-scan.scanning {
  opacity: 0.65;
  pointer-events: none;
  animation: valet-plate-scan-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes valet-plate-scan-pulse {
  to { transform: scale(0.9); }
}

@media (max-width: 640px) {
  .valet-arrival-modal .valet-arrival-close {
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
  }

  .valet-arrival-voice-mode .valet-arrival-phone-field > .valet-voice-field-button {
    top: 12px;
    bottom: auto;
  }

  .valet-arrival-voice-mode .valet-arrival-field-plate > .valet-voice-field-button {
    display: none;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-arrival-close {
    width: 40px;
    height: 40px;
  }
}

.valet-arrival-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.valet-arrival-auto-voice-status {
  border-color: rgba(250, 204, 21, 0.75);
  background: rgba(250, 204, 21, 0.14);
  color: var(--accent-strong, #ffe33d);
  white-space: nowrap;
}

.valet-arrival-auto-voice-status.listening {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

@media (max-width: 640px) {
  .valet-arrival-modal .valet-arrival-title-row {
    gap: 5px;
    flex-wrap: nowrap;
  }

  .valet-arrival-modal .valet-arrival-auto-voice-status {
    padding: 2px 6px;
    font-size: 0.62rem;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-arrival-title-row h3 {
    font-size: 0.86rem;
  }
}

/* Phone Arrival is a fixed application frame. Only Ticket Number advances to
   Customer Phone; the remaining fields stay visible without a scrolling form. */
@media (max-width: 640px) {
  body.valet-arrival-viewport-lock .valet-arrival-modal {
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: none;
  }

  body.valet-arrival-viewport-lock .valet-arrival-details,
  body.valet-arrival-viewport-lock .valet-arrival-optional-grid {
    min-height: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-modal {
    grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
    gap: 7px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-core-grid {
    grid-template-columns: minmax(112px, 0.38fr) minmax(0, 1fr);
    gap: 7px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-core-grid label {
    margin-bottom: 4px;
    font-size: 0.76rem;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-core-grid input {
    height: clamp(62px, 8dvh, 78px);
    min-height: 62px;
    max-height: 78px;
    padding: 8px 10px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-ticket-field input {
    font-size: 1.55rem;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-phone-field input {
    font-size: 1.12rem;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-damage-check {
    min-height: clamp(82px, 10dvh, 104px);
    grid-template-columns: 74px minmax(0, 1fr);
    padding: 9px 10px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-damage-check > strong {
    font-size: 0.9rem;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-damage-choice {
    gap: 7px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-damage-choice label {
    min-height: 58px;
    padding: 10px;
    font-size: 0.88rem;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details {
    height: auto;
    align-self: start;
    padding: 5px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details .valet-arrival-optional-grid {
    height: auto;
    align-content: start;
    gap: 3px 4px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-field,
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-notes {
    grid-template-rows: auto 40px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details input:not([type="checkbox"]):not([type="file"]),
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details select,
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details textarea {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details label {
    margin-bottom: 1px;
    font-size: 0.62rem;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-footer-meta {
    align-self: end;
  }

  .valet-arrival-modal .valet-damage-check {
    min-height: 62px;
    padding: 7px 8px;
  }

  .valet-arrival-modal .valet-damage-choice label {
    min-height: 44px;
    padding: 8px 9px;
    font-size: 0.78rem;
  }

  .valet-arrival-modal input[type="radio"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    max-width: 20px;
    max-height: 20px;
  }

  .valet-arrival-details .valet-arrival-field-stick {
    grid-column: span 1;
    justify-items: start;
  }

  .valet-arrival-details .valet-arrival-field-stick .valet-manual-toggle {
    grid-column: 1;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details .valet-manual-toggle {
    align-self: start;
    justify-self: start;
    display: flex;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 3px;
    border-radius: 8px;
    font-size: 0.64rem;
    line-height: 1;
    text-align: center;
  }

  .valet-arrival-details .valet-manual-toggle input {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
  }

  .valet-arrival-details .valet-arrival-notes {
    grid-column: span 3;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details .valet-arrival-optional-grid {
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-damage-check {
    min-height: 48px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-damage-choice label {
    min-height: 38px;
    padding: 5px 7px;
    font-size: 0.7rem;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details .valet-manual-toggle {
    align-self: start;
    justify-self: start;
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 2px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-modal .valet-arrival-save-row .button {
    height: 56px;
    min-height: 56px;
    padding: 9px 12px;
    font-size: 1.08rem;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-arrival-save-row .button {
    height: 44px;
    min-height: 44px;
    padding: 6px 10px;
    font-size: 0.94rem;
  }
}

/* Keep the President header actions aligned and consistently sized. */
.president-topbar-actions {
  width: min(430px, 100%);
  gap: 8px;
}

.president-quick-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 44px);
  gap: 8px;
}

.president-update-stack {
  display: contents;
}

.president-updates-tab {
  grid-column: 1;
  grid-row: 1;
  padding: 0;
}

.president-valet-shortcut {
  grid-column: 1;
  grid-row: 2;
}

.president-quick-tab[data-panel="applicants"] {
  grid-column: 2;
  grid-row: 1;
}

.president-quick-tab[data-panel="days-off"] {
  grid-column: 2;
  grid-row: 2;
}

.president-quick-tab,
.president-quick-tab summary {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  justify-content: center;
  border-radius: 10px;
}

.president-quick-tab {
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.president-updates-tab {
  padding: 0;
}

.president-quick-tab summary {
  padding: 8px 10px;
}

.president-quick-tab:hover,
.president-quick-tab:focus-visible {
  border-color: var(--accent);
  background: rgba(27, 197, 154, 0.1);
}

.president-quick-tab:active {
  transform: translateY(1px);
}

.president-account-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.president-account-actions .pill,
.president-account-actions .button {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .president-topbar-actions {
    width: 100%;
  }

  .president-quick-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, 42px);
  }

  .president-quick-tab,
  .president-quick-tab summary {
    min-height: 42px;
    height: 42px;
    padding-inline: 6px;
  }

  .president-updates-tab {
    padding: 0;
  }

  .president-quick-label {
    font-size: 0.78rem;
  }

  .president-quick-popover {
    left: 0;
    right: auto;
    width: min(360px, calc(100vw - 32px));
  }
}
.valet-microphone-permission-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 12, 18, 0.76);
}

.valet-microphone-permission-card {
  width: min(100%, 520px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: var(--surface, #fff);
  color: var(--text, #17202a);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
}

.valet-microphone-permission-card h3 {
  margin-top: 0;
}

.valet-microphone-permission-card ol {
  padding-left: 22px;
}

.valet-microphone-permission-card .button-row {
  margin-top: 18px;
}

.valet-keyboard-dictation-popup .valet-microphone-permission-card {
  width: min(100%, 560px);
}

.valet-keyboard-dictation-input {
  min-height: 64px;
  padding: 14px 16px;
  font-size: 1.35rem;
  font-weight: 700;
}

.valet-keyboard-dictation-popup .button-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.valet-keyboard-dictation-popup .button {
  width: 100%;
  min-height: 76px;
  padding: 18px 22px;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  touch-action: manipulation;
}

@media (max-width: 520px) {
  .valet-keyboard-dictation-popup {
    align-items: start;
    padding: 10px;
  }

  .valet-keyboard-dictation-popup .valet-microphone-permission-card {
    max-height: calc(100dvh - 20px);
    padding: 18px;
  }
}
.platform-tenants-section .stacked-list {
  display: grid;
  gap: 14px;
}

.platform-tenants-section details.card {
  padding: 14px;
}

.platform-tenants-section details.card > summary {
  cursor: pointer;
  font-weight: 700;
}

.platform-company-form,
.platform-messaging-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.platform-company-form input[type="color"] {
  min-height: 48px;
  max-width: 140px;
}

.platform-owner-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 16px auto 48px;
}

.platform-owner-workspace {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.platform-owner-login {
  width: min(900px, calc(100% - 32px));
  margin: clamp(32px, 10vh, 100px) auto;
}

@media (max-width: 700px) {
  .platform-owner-shell,
  .platform-owner-login {
    width: min(100% - 20px, 1500px);
    margin-top: 10px;
  }
}

/* Final shift-report phone controls. */
.shift-report-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(180px, auto) minmax(240px, 1fr);
  align-items: end;
  gap: 10px;
  width: 100%;
  margin-bottom: 12px;
}

.shift-report-filter-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 5px;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.shift-report-filter-control > span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  writing-mode: horizontal-tb;
  white-space: nowrap;
}

.shift-report-filter-control > select,
.shift-report-audit-control {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0;
  writing-mode: horizontal-tb;
}

.shift-report-tip-input {
  min-height: 52px;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.shift-report-apply-all {
  justify-self: start;
  min-height: 42px;
}

@media (max-width: 640px) {
  .shift-report-filter-bar {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    margin-bottom: 8px;
  }

  .shift-report-filter-control,
  .shift-report-filter-control > span,
  .shift-report-filter-control > select,
  .shift-report-audit-control {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    writing-mode: horizontal-tb !important;
  }

  .shift-report-filter-control,
  .shift-report-filter-control > span {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .shift-report-filter-control > select,
  .shift-report-audit-control {
    display: block !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
  }

  .shift-report-toolbar > .schedule-week-filter,
  .shift-report-toolbar > .schedule-week-filter span,
  .shift-report-toolbar > .schedule-week-filter select {
    width: 100%;
    min-width: 0;
    max-width: none;
    writing-mode: horizontal-tb;
  }

  .shift-report-toolbar > .schedule-week-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-self: start;
    align-content: start;
    gap: 5px;
    height: auto;
    min-height: 0;
    margin: 0;
  }

  .shift-report-toolbar > .schedule-week-filter span {
    display: block;
    height: auto;
    line-height: 1.2;
    white-space: nowrap;
  }

  #shift-report-week-filter {
    display: block;
    align-self: start;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    margin: 0;
    padding: 8px 38px 8px 11px;
    font-size: 16px;
    line-height: 1.2;
  }

  .shift-report-tip-input,
  .shift-report-table .shift-report-tip-input {
    min-height: 58px;
    padding: 10px 12px;
    font-size: 1.55rem;
  }

  .shift-report-apply-all,
  .schedule-report-form > .shift-report-apply-all,
  .president-report-correction-form > .shift-report-apply-all {
    width: 100%;
    min-height: 48px;
    justify-self: stretch;
  }
}

/* Final published-schedule polish: neutral cards and collision-proof controls. */
.published-responsive-location {
  background: transparent;
}

.published-responsive-days {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  align-items: stretch;
  gap: 10px;
}

.published-responsive-day {
  height: 100%;
  border-color: var(--line);
  background: color-mix(in srgb, var(--paper-solid) 96%, #000);
  box-shadow: none;
}

.published-responsive-day.is-editing,
.published-responsive-shift.is-selected,
.published-inline-editor {
  border-color: var(--line);
  box-shadow: none;
}

.published-responsive-day.is-editing {
  border-left: 3px solid var(--accent);
}

.published-responsive-day-content,
.published-responsive-day-content .schedule-day-split,
.published-responsive-day-content .schedule-day-split-column {
  align-content: start;
}

.published-responsive-shift {
  grid-template-rows: auto auto auto auto;
  align-content: start;
  border-color: var(--line);
  background: #080a0c;
  box-shadow: none;
}

.published-responsive-shift .shift-time-heading {
  align-items: center;
  justify-content: space-between;
}

.published-responsive-shift .shift-time-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.published-shift-report-status,
.published-shift-report-status.is-pending {
  padding: 5px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
}

.published-shift-report-summary {
  gap: 7px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.published-shift-report-summary > strong {
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.2;
}

.published-shift-report-person {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 5px 8px;
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  font-size: 0.74rem;
  line-height: 1.25;
}

.published-shift-report-person span:first-child {
  grid-column: auto;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.published-shift-report-person span:not(:first-child) {
  white-space: nowrap;
}

.published-inline-editor .schedule-shift-form-compact,
.published-inline-editor .schedule-shift-form-compact > .field-row,
.published-inline-editor .schedule-shift-form-compact > .field-row-3 {
  min-width: 0;
}

.published-inline-editor .schedule-shift-form-compact > .field-row,
.published-inline-editor .schedule-shift-form-compact > .field-row-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.published-inline-editor .schedule-shift-form-compact > .field-row-3:first-child > :first-child {
  grid-column: 1 / -1;
}

.published-inline-editor .schedule-shift-form-compact > .field-row > *,
.published-inline-editor .schedule-shift-form-compact > .field-row-3 > * {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.published-inline-editor .schedule-shift-form-compact input:not([type="checkbox"]):not([type="radio"]),
.published-inline-editor .schedule-shift-form-compact select {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
  font-size: 16px !important;
  line-height: 1.1 !important;
}

.published-inline-editor .schedule-shift-form-compact select {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.published-inline-editor .schedule-shift-form-compact .checkbox-row {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  overflow: hidden;
}

.published-inline-editor .schedule-shift-form-compact .checkbox-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .published-responsive-days {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  }
}

@media (max-width: 640px) {
  .published-responsive-days {
    grid-template-columns: minmax(0, 1fr);
  }

  .published-responsive-day {
    height: auto;
  }

  .published-shift-report-person {
    grid-template-columns: minmax(0, 1fr) auto;
    font-size: 0.78rem;
  }

  .published-shift-report-person span:first-child {
    grid-column: 1 / -1;
  }

  .published-inline-editor .schedule-shift-form-compact > .field-row,
  .published-inline-editor .schedule-shift-form-compact > .field-row-3:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .published-inline-editor .schedule-shift-form-compact > .field-row-3:not(:first-child) {
    grid-template-columns: minmax(0, 1fr);
  }

  .published-inline-editor .schedule-shift-form-compact .schedule-builder-filter-controls,
  .published-inline-editor .schedule-shift-form-compact .schedule-form-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep every published week on one predictable Monday-Sunday row. */
.published-responsive-days {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: start;
  gap: clamp(5px, 0.55vw, 9px);
  overflow: visible;
}

.published-responsive-day {
  height: auto;
  padding: clamp(6px, 0.65vw, 9px);
}

.published-responsive-day.is-editing {
  grid-column: auto;
}

.published-responsive-location > .published-inline-editor {
  width: 100%;
  min-width: 0;
}

.published-responsive-day-heading {
  gap: 4px;
  font-size: clamp(0.68rem, 0.72vw, 0.8rem);
}

.published-responsive-day-heading span {
  font-size: clamp(0.6rem, 0.62vw, 0.7rem);
}

.published-responsive-shift {
  gap: clamp(4px, 0.45vw, 7px);
  padding: clamp(6px, 0.55vw, 8px);
}

.published-responsive-shift .shift-time-heading strong,
.published-responsive-shift .shift-crew-list {
  font-size: clamp(0.66rem, 0.72vw, 0.82rem);
  line-height: 1.22;
}

.published-responsive-shift .shift-time-heading span {
  padding: 2px 5px;
  font-size: clamp(0.56rem, 0.58vw, 0.66rem);
}

.published-responsive-shift .schedule-cell-actions {
  gap: 5px;
}

.published-responsive-shift .schedule-cell-actions .button {
  min-height: 34px;
  padding: 5px 4px;
  font-size: clamp(0.62rem, 0.66vw, 0.74rem);
}

.published-shift-report-summary {
  padding: clamp(7px, 0.55vw, 9px);
}

@media (min-width: 641px) {
  .published-shift-report-person {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .published-shift-report-person span:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .published-responsive-location {
    overflow: visible;
  }

  .published-responsive-days {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .published-responsive-day {
    width: 100%;
  }

  .published-responsive-location > .published-inline-editor {
    position: static;
    width: 100%;
  }
}

/* Published editor date and time controls use a smaller, matched footprint. */
.published-inline-editor .schedule-shift-form-compact #schedule-shift-date,
.published-inline-editor .schedule-shift-form-compact #schedule-shift-start,
.published-inline-editor .schedule-shift-form-compact #schedule-shift-end {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding-block: 4px !important;
  font-size: 0.9rem !important;
}

.published-inline-editor .schedule-shift-form-compact #schedule-shift-date {
  width: min(100%, 240px) !important;
}

.published-inline-editor .schedule-shift-form-compact #schedule-shift-start,
.published-inline-editor .schedule-shift-form-compact #schedule-shift-end {
  width: min(100%, 180px) !important;
}

@media (max-width: 640px) {
  .published-inline-editor .schedule-shift-form-compact #schedule-shift-date,
  .published-inline-editor .schedule-shift-form-compact #schedule-shift-start,
  .published-inline-editor .schedule-shift-form-compact #schedule-shift-end {
    font-size: 16px !important;
  }
}

/* Published schedule surfaces stay neutral without warning-color tinting. */
.published-edit-list .published-responsive-week,
.published-edit-list .published-responsive-location {
  border-left-color: var(--line) !important;
  background: #07090b !important;
  box-shadow: none !important;
}

.published-edit-list .published-responsive-week > summary {
  background: #0b0d0f;
}

/* Phones place the editor immediately after its selected weekday. */
@media (max-width: 700px) {
  .published-responsive-location-heading {
    order: -1;
  }

  .published-responsive-days {
    display: contents;
  }

  .published-responsive-day {
    order: var(--published-day-order, 0);
  }

  .published-responsive-location > .published-inline-editor {
    order: var(--published-editor-order, 1);
  }
}

/* Trim native date/time chrome without shrinking their readable text. */
.published-inline-editor .schedule-shift-form-compact #schedule-shift-date,
.published-inline-editor .schedule-shift-form-compact #schedule-shift-start,
.published-inline-editor .schedule-shift-form-compact #schedule-shift-end {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 1px 6px !important;
  line-height: 1 !important;
}

/* Mid-size and split-screen portal layout. */
@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .topbar > div:first-child,
  .topbar-actions {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .topbar .brand-mark-small {
    width: min(240px, 65vw);
  }

  .president-topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
  }

  .president-quick-tabs,
  .president-account-actions {
    width: min(520px, 100%);
    margin-inline: auto;
  }

  .president-quick-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .president-account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .president-quick-tab,
  .president-account-actions > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .schedule-workspace {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .schedule-navigation {
    position: static;
    min-height: 0;
    width: 100%;
    max-width: 100%;
  }

  .schedule-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    border: 0;
    padding: 9px 12px;
    background: var(--sidebar);
    color: var(--ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }

  .schedule-sidebar {
    position: static;
    display: none;
    width: 100%;
    min-height: 0;
    max-height: none;
  }

  .schedule-navigation.menu-expanded .schedule-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .schedule-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: clamp(8px, 1.8vw, 14px);
    overflow-x: clip;
  }

  .published-responsive-days {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .published-responsive-day,
  .published-responsive-shift,
  .published-shift-report-summary {
    min-width: 0;
    max-width: 100%;
  }

  .published-responsive-shift .shift-time-heading {
    flex-wrap: wrap;
  }

  .published-shift-report-person {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .published-shift-report-person span:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 9px;
  }

  .president-quick-tabs,
  .president-account-actions {
    width: 100%;
  }

  .schedule-navigation.menu-expanded .schedule-sidebar,
  .published-responsive-days {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-panel-heading h2 {
    font-size: clamp(1rem, 5.6vw, 1.3rem);
    overflow-wrap: anywhere;
  }
}

/* Published Start and End controls stay compact instead of filling the row. */
.published-inline-editor .schedule-shift-form-compact #schedule-shift-start,
.published-inline-editor .schedule-shift-form-compact #schedule-shift-end {
  justify-self: start;
  width: min(100%, 110px) !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 4px !important;
}

.published-inline-editor .schedule-shift-form-compact > .field-row-3:first-child > :nth-child(2),
.published-inline-editor .schedule-shift-form-compact > .field-row-3:first-child > :nth-child(3) {
  justify-self: start;
  width: min(100%, 110px);
}

/* Published schedules respond to their panel width, including desktop split-screen. */
.published-edit-list {
  container-type: inline-size;
}

@container (max-width: 1050px) {
  .published-responsive-days {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container (max-width: 720px) {
  .published-responsive-days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 460px) {
  .published-responsive-days {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1100px) {
  .published-schedule-heading-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .published-schedule-delete-control {
    grid-column: 1 / -1;
    width: min(320px, 100%);
  }
}

@media (max-width: 640px) {
  .published-schedule-heading-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .published-schedule-delete-control {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* Employee computer schedule: split shifts stay readable inside fixed day columns. */
.employee-schedule-week-table .schedule-cell,
.employee-schedule-week-table .schedule-cell-shift,
.employee-schedule-week-table .schedule-day-split,
.employee-schedule-week-table .schedule-day-split-column {
  min-width: 0;
  max-width: 100%;
}

.employee-schedule-week-table .schedule-cell {
  overflow: hidden;
}

.employee-schedule-week-table .shift-time-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px 6px;
}

.employee-schedule-week-table .shift-time-heading strong {
  flex: 1 1 90px;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.employee-schedule-week-table .shift-time-heading span {
  flex: 0 0 auto;
  margin-left: auto;
}

.employee-schedule-week-table .schedule-cell-shift > span,
.employee-schedule-week-table .location-address {
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 980px) {
  .saas-hero-visual .saas-hero-copy {
    width: min(760px, 78%);
  }

  .saas-workflow-demo {
    grid-template-columns: minmax(160px, 0.5fr) minmax(260px, 0.8fr);
  }

  .saas-workflow-detail {
    grid-column: 1 / -1;
  }

  .saas-feature-section .saas-feature-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .saas-growth-story,
  .saas-growth-story-reverse {
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-growth-story-reverse img {
    order: initial;
  }

  .saas-outcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .saas-difference-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-difference-image-wrap,
  .saas-difference-image-wrap img {
    min-height: 480px;
  }
}

@media (max-width: 700px) {
  .page-shell {
    padding: 12px;
  }

  .saas-storefront {
    gap: 22px;
  }

  .saas-nav {
    position: static;
  }

  .saas-hero-visual {
    align-items: end;
    min-height: 680px;
    padding: 24px 18px;
  }

  .saas-hero-image {
    object-position: 66% center;
  }

  .saas-hero-shade {
    background:
      linear-gradient(0deg, rgba(3, 5, 6, 0.98) 0%, rgba(3, 5, 6, 0.74) 58%, rgba(3, 5, 6, 0.1) 100%);
  }

  .saas-hero-visual .saas-hero-copy {
    width: 100%;
  }

  .saas-hero-visual .saas-hero-copy h1 {
    font-size: clamp(2.7rem, 13vw, 4.5rem);
  }

  .saas-hero-proof {
    display: none;
  }

  .saas-trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .saas-trust-strip > div:nth-child(2) {
    border-right: 0;
  }

  .saas-trust-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .saas-workflow-demo {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .saas-workflow-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .saas-workflow-tab {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 52px;
    padding: 8px;
    font-size: 0.78rem;
  }

  .saas-demo-phone {
    width: min(100%, 380px);
    min-height: 440px;
    margin-inline: auto;
  }

  .saas-workflow-detail {
    grid-column: auto;
    padding: 22px 16px;
  }

  .saas-feature-section .saas-feature-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-feature-section .saas-feature {
    min-height: 190px;
  }

  .saas-growth-story,
  .saas-growth-story img {
    min-height: 0;
  }

  .saas-growth-story img {
    aspect-ratio: 4 / 3;
  }

  .saas-growth-story > div {
    padding: 24px 18px 30px;
  }

  .saas-outcome-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-outcome-grid article {
    min-height: 0;
  }

  .saas-difference-image-wrap,
  .saas-difference-image-wrap img {
    min-height: 420px;
  }

  .saas-company-section,
  .saas-plan-section,
  .saas-signup-section,
  .saas-account-section,
  .saas-manage-section {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .saas-feature-section .saas-feature {
    transition: none;
  }

  .saas-feature-section .saas-feature:hover {
    transform: none;
  }
}

@media (min-width: 641px) {
  .employee-schedule-week-table {
    border-spacing: 6px;
  }

  .employee-schedule-week-table .schedule-day-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .employee-schedule-week-table .schedule-day-split-column {
    padding: 6px;
  }
}

/* 7urr Valet storefront refresh: calm navigation and consistent content rhythm. */
.saas-storefront {
  gap: 0;
}

.saas-nav {
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 42px);
  min-height: 76px;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-color: rgba(244, 243, 239, 0.12);
  background: rgba(5, 7, 8, 0.9);
}

.saas-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.saas-brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.saas-brand-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.saas-brand-copy strong {
  font-size: 1rem;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.saas-brand-copy small {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.saas-nav-actions {
  justify-content: center;
  gap: clamp(16px, 2.2vw, 30px);
}

.saas-nav-link {
  position: relative;
  padding: 12px 0;
  color: #c9cecb;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.saas-nav-link::after {
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.saas-nav-link:hover,
.saas-nav-link:focus-visible {
  color: var(--ink);
  outline: none;
}

.saas-nav-link:hover::after,
.saas-nav-link:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.saas-nav-cta {
  min-height: 46px;
  padding-inline: 20px;
  border-radius: 10px;
  white-space: nowrap;
}

.saas-hero-visual {
  min-height: min(680px, calc(100vh - 130px));
}

.saas-trust-strip {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(244, 243, 239, 0.025);
}

.saas-workflow-section,
.saas-growth-section,
.saas-feature-section,
.saas-difference-section {
  padding-block: clamp(56px, 7vw, 92px);
}

.saas-company-section,
.saas-plan-section,
.saas-signup-section,
.saas-account-section,
.saas-manage-section,
.saas-reviews-section,
.saas-final-cta {
  margin-block: clamp(16px, 2.4vw, 30px);
  border-radius: var(--saas-radius);
}

.saas-footer {
  align-items: center;
  margin-top: clamp(36px, 6vw, 76px);
  padding-block: 26px 18px;
}

.saas-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 680px;
}

.saas-footer-brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 9px;
  object-fit: cover;
}

@media (max-width: 980px) {
  .saas-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 18px;
  }

  .saas-nav-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
    overflow-x: auto;
    padding: 8px 2px 2px;
    border-top: 1px solid var(--line);
    scrollbar-width: none;
  }

  .saas-nav-actions::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 700px) {
  .saas-nav {
    position: sticky;
    top: 6px;
    min-height: auto;
    padding: 9px;
    border-radius: 12px;
  }

  .saas-brand-logo {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .saas-brand-copy small {
    display: none;
  }

  .saas-nav-actions {
    width: auto;
    flex-wrap: nowrap;
    gap: 22px;
  }

  .saas-nav-cta {
    width: auto;
    min-height: 42px;
    padding-inline: 14px;
    font-size: 0.78rem;
  }

  .saas-hero-visual {
    min-height: 620px;
  }

  .saas-trust-strip > div {
    padding: 14px;
  }

  .saas-workflow-section,
  .saas-growth-section,
  .saas-feature-section,
  .saas-difference-section {
    padding-block: 48px;
  }

  .saas-footer-brand {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .saas-nav-link::after {
    transition: none;
  }
}

/* Client Management: scan-friendly workspace cards and guarded administration. */
.platform-manager-loading,
.platform-manager-header,
.platform-client-card-header,
.platform-client-identity,
.platform-client-section-heading,
.platform-danger-zone {
  display: flex;
  align-items: center;
}

.platform-manager-loading {
  justify-content: center;
  gap: 14px;
  min-height: 220px;
}

.platform-manager-header {
  justify-content: space-between;
  gap: 24px;
  padding: 4px 2px 18px;
}

.platform-manager-header h2,
.platform-client-identity h3,
.platform-client-section-heading h4 {
  margin: 0;
}

.platform-client-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.platform-client-stats > div {
  display: grid;
  gap: 3px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper-solid) 92%, var(--accent));
}

.platform-client-stats strong {
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1;
}

.platform-client-stats span,
.platform-client-overview span,
.platform-client-overview small {
  color: var(--muted);
}

.platform-client-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.platform-client-toolbar label {
  display: grid;
  gap: 6px;
}

.platform-client-toolbar label > span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.platform-client-list {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.platform-onboarding-attention {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--warn) 65%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--warn) 9%, var(--paper-solid));
}

.platform-onboarding-list {
  display: grid;
  gap: 8px;
}

.platform-onboarding-list > div {
  display: grid;
  grid-template-columns: auto minmax(150px, 0.7fr) minmax(220px, 1fr) minmax(260px, 1.3fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-solid);
}

.platform-onboarding-list small {
  color: var(--muted);
}

.platform-onboarding-list > .platform-verification-card {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
}

.platform-verification-card > a {
  width: fit-content;
}

.platform-remove-pending-account {
  border-color: var(--danger);
  background: transparent;
  color: var(--danger);
}

.platform-client-card {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper-solid) 97%, var(--accent));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.platform-client-card-header {
  justify-content: space-between;
  gap: 18px;
  padding: 20px 20px 14px;
}

.platform-client-identity {
  min-width: 0;
  gap: 13px;
}

.platform-client-identity p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-client-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--client-color) 75%, #fff);
  border-radius: 14px;
  background: color-mix(in srgb, var(--client-color) 28%, var(--paper-solid));
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 900;
}

.platform-client-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.platform-client-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 20px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.platform-client-overview > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 13px;
  background: var(--paper-solid);
}

.platform-client-overview strong,
.platform-client-overview small {
  overflow-wrap: anywhere;
}

.platform-auto-setup {
  display: grid;
  gap: 13px;
  margin: 0 20px 20px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, transparent), transparent 58%),
    var(--paper-solid);
}

.platform-auto-setup-heading,
.platform-auto-setup-heading > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.platform-auto-setup-heading {
  justify-content: space-between;
}

.platform-auto-setup-heading h4,
.platform-auto-setup-heading p,
.platform-auto-setup > p,
.platform-auto-setup-result ol,
.platform-auto-setup-result ul {
  margin: 0;
}

.platform-auto-setup-heading p,
.platform-auto-setup > p {
  color: var(--muted);
  font-size: 0.78rem;
}

.platform-auto-setup-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 25%, var(--paper));
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.platform-auto-setup-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.platform-auto-setup-checks span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
}

.platform-auto-setup-checks .ready {
  border-color: color-mix(in srgb, var(--success) 50%, var(--line));
  color: var(--success);
}

.platform-auto-setup-checks .pending {
  color: var(--muted);
}

.platform-auto-setup-result {
  align-items: stretch;
}

.platform-auto-setup-result code {
  overflow-wrap: anywhere;
}

.platform-auto-setup-result ol,
.platform-auto-setup-result ul {
  padding-left: 20px;
}

.platform-sms-meter {
  display: grid;
  gap: 14px;
  margin: 0 20px 20px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 52%),
    var(--paper-solid);
}

.platform-sms-meter-heading,
.platform-sms-meter-heading > div,
.platform-sms-rate-summary,
.platform-sms-rate-editor {
  display: flex;
}

.platform-sms-meter-heading {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.platform-sms-meter-heading > div:first-child {
  align-items: center;
  gap: 11px;
}

.platform-sms-meter-heading h4,
.platform-sms-meter-heading p,
.platform-sms-meter-card p,
.platform-sms-meter-card dl,
.platform-sms-meter-note {
  margin: 0;
}

.platform-sms-meter-heading p,
.platform-sms-meter-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.platform-sms-meter-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 22%, var(--paper));
  color: var(--accent);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.platform-sms-rate-summary {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.platform-sms-rate-summary span,
.platform-sms-rate-summary strong {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.77rem;
}

.platform-sms-meter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform-sms-meter-card {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--paper-solid) 94%, var(--accent));
}

.platform-sms-meter-card > span,
.platform-sms-meter-card > small {
  color: var(--muted);
  font-size: 0.75rem;
}

.platform-sms-meter-card > strong {
  margin-top: 3px;
  font-size: 1.55rem;
  line-height: 1;
}

.platform-sms-meter-card > p {
  min-height: 2.4em;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.platform-sms-meter-card dl {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.platform-sms-meter-card dl > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.73rem;
}

.platform-sms-meter-card dt {
  color: var(--muted);
}

.platform-sms-meter-card dd {
  margin: 0;
  font-weight: 800;
}

.platform-sms-meter .positive {
  color: var(--success);
}

.platform-sms-meter .negative {
  color: var(--danger);
}

.platform-sms-rate-editor {
  gap: 12px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.platform-sms-rate-editor > div {
  display: grid;
  flex: 1 1 0;
  gap: 6px;
}

.platform-sms-rate-editor small {
  color: var(--muted);
  font-size: 0.72rem;
}

.platform-sms-location-rates {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.platform-sms-location-rates-heading,
.platform-sms-location-rate > div,
.platform-sms-location-rate label {
  display: grid;
  gap: 4px;
}

.platform-sms-location-rates-heading small,
.platform-sms-location-rate small {
  color: var(--muted);
}

.platform-sms-location-rate {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(2, minmax(130px, 0.65fr));
  gap: 12px;
  align-items: end;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.platform-client-editor {
  border-top: 1px solid var(--line);
}

.platform-client-editor > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.025);
  font-weight: 800;
  list-style: none;
}

.platform-client-editor > summary::-webkit-details-marker {
  display: none;
}

.platform-client-editor > summary::after {
  content: "+";
  font-size: 1.35rem;
}

.platform-client-editor[open] > summary::after {
  content: "−";
}

.platform-client-editor > summary small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
}

.platform-client-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 20px;
}

.platform-client-management-grid > section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.platform-client-section-heading {
  align-items: flex-start;
  gap: 10px;
}

.platform-client-section-heading > span {
  font-size: 1.3rem;
}

.platform-client-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.platform-client-management-grid .platform-company-form,
.platform-client-management-grid .platform-messaging-form,
.platform-client-management-grid .platform-stripe-connect-form {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}

.platform-stripe-link-row {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.platform-stripe-link-row.hidden {
  display: none;
}

.platform-stripe-link-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.platform-stripe-link-controls input {
  min-width: 0;
}

@media (max-width: 640px) {
  .platform-stripe-link-controls {
    grid-template-columns: 1fr 1fr;
  }

  .platform-stripe-link-controls input {
    grid-column: 1 / -1;
  }
}

.platform-color-field {
  display: grid;
  max-width: 160px;
  gap: 6px;
}

.platform-client-logo-preview {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.platform-client-logo-preview img {
  width: 100%;
  max-height: 70px;
  object-fit: contain;
}

.platform-client-logo-preview > div {
  min-width: 0;
}

.platform-danger-zone {
  justify-content: space-between;
  gap: 16px;
  margin: 0 20px 20px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--danger) 60%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.platform-danger-zone > div {
  display: grid;
  gap: 3px;
}

.platform-danger-zone span {
  color: var(--muted);
  font-size: 0.83rem;
}

.platform-remove-company {
  flex: 0 0 auto;
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.platform-empty-state {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1050px) {
  .platform-client-stats,
  .platform-client-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-sms-meter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-client-management-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-onboarding-list > div {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .platform-onboarding-list > div > span:not(.status-pill),
  .platform-onboarding-list > div > small {
    grid-column: 2;
  }

  .platform-remove-pending-account {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .platform-manager-header,
  .platform-client-card-header,
  .platform-danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-client-stats,
  .platform-client-toolbar,
  .platform-client-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-sms-meter {
    margin-inline: 12px;
    padding: 13px;
  }

  .platform-auto-setup {
    margin-inline: 12px;
    padding: 13px;
  }

  .platform-auto-setup-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-sms-meter-heading,
  .platform-sms-rate-editor {
    flex-direction: column;
  }

  .platform-sms-location-rate {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-sms-rate-summary {
    justify-content: flex-start;
  }

  .platform-sms-meter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .platform-client-badges {
    justify-content: flex-start;
  }

  .platform-client-editor > summary small {
    display: none;
  }

  .platform-client-management-grid {
    padding: 12px;
  }

  .platform-danger-zone {
    margin: 0 12px 12px;
  }

  .platform-remove-company {
    width: 100%;
  }
}

/* Final accessible checkbox sizing and SMS-consent layout. */
.checkbox-row > input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px !important;
  min-width: 20px;
  height: 20px !important;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.application-sms-consent-panel > input[type="checkbox"],
.employee-sms-consent-panel > input[type="checkbox"] {
  flex-basis: 24px;
  width: 24px !important;
  min-width: 24px;
  height: 24px !important;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .application-card .application-sms-consent-panel,
  .checkbox-row.employee-sms-consent-panel {
    gap: 11px;
    padding: 13px;
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .settings-grid .site-toggle-control {
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 9px;
    padding: 10px 11px;
  }

  .settings-grid .site-toggle-control select {
    width: 78px;
    min-width: 78px;
  }
}

/* Mobile-first 7urr storefront and standalone customer account page. */
.saas-nav-account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.saas-account-menu {
  position: relative;
  min-width: 0;
}

.saas-account-menu::after {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 10px;
  content: "";
}

.saas-account-menu-trigger.is-pressed {
  animation: saas-account-button-press 340ms cubic-bezier(0.2, 0.85, 0.3, 1.25);
}

@keyframes saas-account-button-press {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.9);
  }
  68% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.saas-account-menu-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 50;
  display: grid;
  width: min(280px, calc(100vw - 28px));
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111417;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px) scale(0.97);
  transform-origin: top right;
  transition: opacity 150ms ease, visibility 150ms ease, transform 180ms ease;
}

.saas-account-menu.is-open .saas-account-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.saas-account-menu.is-open .saas-account-menu-trigger {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .saas-account-menu:hover .saas-account-menu-panel,
  .saas-account-menu:focus-within .saas-account-menu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .saas-account-menu:hover .saas-account-menu-trigger {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 24%, transparent);
  }
}

.saas-account-menu-panel a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.saas-account-menu-panel a + a {
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}

.saas-account-menu-panel a:hover,
.saas-account-menu-panel a:focus-visible {
  background: rgba(16, 185, 129, 0.11);
  outline: none;
}

.saas-account-menu-panel small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
  .saas-account-menu-trigger.is-pressed {
    animation: none;
  }

  .saas-account-menu-panel,
  .saas-account-menu-trigger {
    transition: none;
  }
}

.saas-account-page {
  display: grid;
  gap: 22px;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) 0;
}

.saas-account-page-intro {
  display: grid;
  gap: 9px;
  max-width: 760px;
}

.saas-account-page-intro h1 {
  font-size: clamp(2.35rem, 5.5vw, 5rem);
  letter-spacing: -0.05em;
}

.saas-account-page-intro > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.saas-account-page .saas-account-section {
  margin: 0;
}

.saas-account-home-link {
  justify-self: start;
}

@media (max-width: 700px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-shell {
    width: 100%;
    padding: 10px;
  }

  .saas-storefront,
  .saas-storefront > *,
  .saas-account-page,
  .saas-account-page > * {
    min-width: 0;
    max-width: 100%;
  }

  .saas-storefront {
    gap: 0;
  }

  .saas-nav {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    margin-bottom: 12px;
    padding: 9px;
  }

  .saas-brand {
    gap: 8px;
  }

  .saas-brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 9px;
    object-fit: contain;
  }

  .saas-brand-copy strong {
    font-size: 0.88rem;
  }

  .saas-nav-account-actions {
    gap: 5px;
  }

  .saas-nav-account-actions .saas-nav-cta {
    width: auto;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .saas-nav-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 8px 2px 1px;
    overflow-x: auto;
  }

  .saas-nav-link {
    flex: 0 0 auto;
    padding: 7px 0;
    font-size: 0.74rem;
  }

  .saas-hero-visual {
    display: grid;
    align-items: start;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  .saas-hero-image {
    position: relative;
    inset: auto;
    z-index: auto;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
    background: #050708;
  }

  .saas-hero-shade {
    display: none;
  }

  .saas-hero-visual .saas-hero-copy {
    width: 100%;
    padding: 22px 16px 24px;
    background:
      radial-gradient(circle at top right, rgba(16, 185, 129, 0.13), transparent 45%),
      #080b0c;
  }

  .saas-hero-visual .saas-hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.15rem, 10vw, 2.8rem);
    line-height: 0.98;
  }

  .saas-hero-copy > .muted {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .saas-hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-hero-actions .button {
    width: 100%;
  }

  .saas-trust-strip {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 12px;
  }

  .saas-trust-strip > div,
  .saas-trust-strip > div:nth-child(2) {
    padding: 13px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .saas-trust-strip > div:last-child {
    border-bottom: 0;
  }

  .saas-workflow-section,
  .saas-growth-section,
  .saas-feature-section,
  .saas-difference-section {
    gap: 20px;
    padding-block: 36px;
  }

  .saas-section-intro h2,
  .saas-difference-copy h2,
  .saas-final-cta h2 {
    font-size: clamp(1.8rem, 8.5vw, 2.25rem);
    line-height: 1.04;
  }

  .saas-section-intro > p:last-child,
  .saas-difference-copy > p,
  .saas-final-cta > p {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .saas-workflow-demo {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .saas-workflow-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .saas-demo-phone {
    width: 100%;
    min-height: 0;
    padding: 18px;
    border-width: 4px;
    border-radius: 22px;
  }

  .saas-demo-phone h3 {
    font-size: 1.45rem;
  }

  .saas-workflow-detail {
    padding: 18px 14px;
  }

  .saas-workflow-detail h3 {
    font-size: 1.55rem;
  }

  .saas-company-section,
  .saas-plan-section,
  .saas-signup-section,
  .saas-account-section,
  .saas-manage-section,
  .saas-reviews-section,
  .saas-final-cta {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-block: 12px;
    padding: 16px;
    border-radius: 14px;
  }

  .saas-growth-story,
  .saas-growth-story-reverse {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .saas-growth-story img,
  .saas-growth-story-reverse img {
    order: initial;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: contain;
  }

  .saas-growth-story > div {
    padding: 20px 16px 24px;
  }

  .saas-growth-story h3 {
    font-size: 1.9rem;
    line-height: 1.02;
  }

  .saas-outcome-grid,
  .saas-feature-section .saas-feature-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-outcome-grid article,
  .saas-feature-section .saas-feature {
    min-height: 0;
    padding: 16px;
  }

  .saas-difference-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-difference-image-wrap {
    display: grid;
    min-height: 0;
    overflow: hidden;
  }

  .saas-difference-image-wrap img {
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
  }

  .saas-image-caption {
    position: static;
    inset: auto;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .saas-final-cta {
    justify-items: stretch;
    text-align: left;
  }

  .saas-final-cta .button-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .saas-terms-page,
  .saas-review-page,
  .saas-account-page {
    width: 100%;
    padding: 24px 0 38px;
  }

  .saas-terms-page h1,
  .saas-review-page-intro h1,
  .saas-account-page-intro h1 {
    font-size: clamp(2rem, 9vw, 2.55rem);
    line-height: 1;
  }

  .saas-about-visual {
    min-height: 0;
    margin: 0;
  }

  .saas-about-visual img {
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
  }

  .saas-about-visual figcaption {
    position: static;
    inset: auto;
    border-radius: 0 0 10px 10px;
  }

  .saas-account-page {
    gap: 16px;
  }

  .saas-account-page-intro > p:last-child {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .saas-account-page .saas-account-section,
  .saas-account-card,
  .saas-signup-form {
    min-width: 0;
    width: 100%;
  }

  .saas-account-card {
    padding: 13px;
  }

  .saas-account-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .saas-account-tabs .button {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
  }

  .saas-storefront input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
  .saas-storefront select,
  .saas-storefront textarea {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    font-size: 16px;
  }

  .saas-storefront input[type="file"] {
    min-height: 48px;
    padding: 8px;
  }

  .saas-legal-panel {
    padding: 13px;
  }

  .saas-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 28px;
    padding: 20px 4px 8px;
    font-size: 0.82rem;
  }

  .saas-footer-brand {
    align-items: flex-start;
  }
}

@media (max-width: 390px) {
  .page-shell {
    padding: 7px;
  }

  .saas-brand-copy {
    display: none;
  }

  .saas-nav-account-actions .saas-nav-cta {
    padding-inline: 8px;
    font-size: 0.68rem;
  }

  .saas-nav-actions {
    gap: 10px;
  }

  .saas-nav-link {
    font-size: 0.7rem;
  }

  .saas-hero-visual .saas-hero-copy {
    padding: 18px 13px 20px;
  }
}

/* Keep the open-shift posting filters aligned, readable, and visually consistent. */
#admin-shift-post-form .admin-shift-post-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
}

#admin-shift-post-form .admin-shift-post-field {
  display: grid;
  grid-template-rows: minmax(42px, auto) 44px;
  align-content: start;
  min-width: 0;
}

#admin-shift-post-form .admin-shift-post-field label {
  display: flex;
  align-items: flex-end;
  min-width: 0;
  margin: 0 0 6px;
  line-height: 1.2;
}

#admin-shift-post-form .admin-shift-post-field select {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 36px 8px 11px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: #f8fafc;
  color: #111827;
  color-scheme: light;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#admin-shift-post-form .admin-shift-post-field select:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 1px;
}

@media (max-width: 1200px) {
  #admin-shift-post-form .admin-shift-post-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #admin-shift-post-form .admin-shift-post-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #admin-shift-post-form .admin-shift-post-field {
    grid-template-rows: auto 44px;
  }
}

/* Cohesive valet viewport: prevent full-height grid stretching and make the
   browser safe-area background match each valet experience. */
body.valet-page,
html:has(body.valet-page) {
  --valet-page-background: #101214;
  background-color: var(--valet-page-background) !important;
  background-image: none !important;
}

body.valet-page.valet-light-page,
html.valet-light-page,
html:has(body.valet-page.valet-light-page) {
  --valet-page-background: #f4f5f7;
}

html.valet-light-page {
  color-scheme: light;
}

html.valet-light-page {
  background-color: #ffffff !important;
  background-image: none !important;
}

html.valet-light-page body.valet-page,
html.valet-light-page body.valet-arrival-viewport-lock {
  background-color: #f4f5f7 !important;
  background-image: none !important;
}

body.public-valet-page,
html:has(body.public-valet-page) {
  background-color: var(--guest-page-background, #08111f) !important;
  background-image: none !important;
}

body.valet-page .page-shell,
body.public-valet-page .page-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
}

body.valet-page .page-shell {
  padding:
    max(12px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
}

body.public-valet-page .page-shell {
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}

body.valet-page #app,
body.public-valet-page #app {
  align-content: start;
  background: transparent;
}

.valet-portal-shell {
  width: min(1180px, 100%);
  min-height: 0;
  align-content: start;
  align-items: start;
  align-self: start;
}

.valet-module {
  width: 100%;
  min-height: 0;
  align-content: start;
  align-self: start;
  padding: clamp(8px, 1.5vw, 16px);
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.valet-command-header {
  align-content: start;
  grid-template-rows: auto auto;
  padding: clamp(12px, 1.8vw, 18px);
  border: 0;
  border-radius: 18px;
}

.valet-live-totals {
  grid-template-columns: minmax(76px, 0.8fr) minmax(70px, 0.7fr) minmax(74px, 0.75fr) minmax(74px, 0.75fr) minmax(132px, 1.35fr);
  align-items: stretch;
}

.valet-live-totals span {
  min-height: 54px;
  align-items: center;
  padding: 10px 12px;
}

.valet-command-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.valet-command-bar .button,
.valet-command-bar .valet-arrival-button {
  width: 100%;
  min-height: 54px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.15;
}

.valet-board.valet-tile-board {
  align-content: start;
}

.valet-board.valet-tile-board > .muted {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}

.public-valet-card {
  width: min(720px, 100%);
  margin: 0 auto;
}

@media (max-width: 640px) {
  body.valet-page .page-shell,
  body.public-valet-page .page-shell {
    padding:
      max(6px, env(safe-area-inset-top))
      max(6px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left));
  }

  .valet-portal-shell {
    width: 100%;
  }

  .valet-module {
    gap: 10px;
    padding: 0;
  }

  .valet-command-header {
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
  }

  .valet-board-identity {
    align-items: center;
  }

  .valet-board-identity > div:first-child {
    flex-basis: 150px;
  }

  .valet-live-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .valet-live-totals span {
    min-height: 48px;
    padding: 8px 10px;
    font-size: 0.76rem;
  }

  .valet-command-bar {
    position: sticky;
    top: max(6px, env(safe-area-inset-top));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
    border-radius: 14px;
  }

  .valet-command-bar .button,
  .valet-command-bar .valet-arrival-button {
    min-height: 52px;
    padding: 8px;
    border-radius: 9px;
    font-size: 0.78rem;
    white-space: normal;
  }

  .public-valet-card {
    width: 100%;
    margin: 0;
  }
}

/* Phone valet board: mirror a purpose-built valet handset with one compact
   header, a single control row, and the ticket board immediately below it. */

@media (max-width: 640px) {
  body.valet-page .page-shell {
    padding:
      max(4px, env(safe-area-inset-top))
      max(4px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(4px, env(safe-area-inset-left));
  }

  .valet-module {
    gap: 5px;
  }

  .valet-command-header {
    gap: 7px;
    padding: 8px 9px;
    border-radius: 7px;
  }

  .valet-board-identity {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .valet-board-identity > div:first-child {
    min-width: 0;
  }

  .valet-board-identity h2 {
    overflow: hidden;
    font-size: clamp(1rem, 5.2vw, 1.25rem);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .valet-board-identity p {
    overflow: hidden;
    font-size: 0.68rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .valet-board-identity .valet-sync-health {
    margin: 0;
    padding: 4px 7px;
    font-size: 0.62rem;
    white-space: nowrap;
  }

  .valet-board-identity .valet-scan-pill {
    grid-column: 1 / -1;
  }

  .valet-live-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 0.72fr)) minmax(104px, 1.45fr);
    gap: 4px;
  }

  .valet-live-totals span {
    min-height: 34px;
    gap: 3px;
    padding: 5px 6px;
    border-radius: 5px;
    font-size: 0.62rem;
  }

  .valet-live-totals b {
    font-size: 0.84rem;
  }

  .valet-total-requested {
    padding-inline: 5px;
  }

  .valet-total-requested strong {
    font-size: 0.82rem;
    letter-spacing: -0.01em;
  }

  .valet-command-bar {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px 0 5px;
    border: 0;
    border-bottom: 2px solid var(--line);
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .valet-command-bar .button,
  .valet-command-bar .valet-arrival-button {
    min-width: 0;
    min-height: 48px;
    padding: 6px 3px;
    border-radius: 5px;
    font-size: clamp(0.58rem, 2.65vw, 0.72rem);
    line-height: 1.05;
    white-space: normal;
    transition:
      transform 100ms ease,
      filter 120ms ease,
      border-color 120ms ease,
      box-shadow 120ms ease,
      background-color 120ms ease;
  }

  .valet-command-bar .button:hover {
    filter: brightness(1.14);
  }

  .valet-command-bar .button:active {
    transform: translateY(2px) scale(0.96);
    filter: brightness(0.9);
  }

  .valet-command-bar .button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
  }

  .valet-command-bar .button.is-active,
  .valet-command-bar .button[aria-pressed="true"] {
    border-color: #fde047;
    background: color-mix(in srgb, var(--accent) 72%, #111);
    color: #111;
    box-shadow:
      inset 0 -4px 0 rgba(0, 0, 0, 0.28),
      0 0 0 2px rgba(253, 224, 71, 0.28);
    filter: brightness(1.08);
  }

  .valet-board.valet-tile-board > .muted {
    margin-top: 3px;
    font-size: 0.76rem;
  }
}

@media (max-width: 360px) {
  .valet-live-totals {
    grid-template-columns: repeat(4, minmax(0, 0.72fr)) minmax(96px, 1.45fr);
  }

  .valet-live-totals span {
    padding-inline: 4px;
    font-size: 0.55rem;
  }

  .valet-command-bar .button,
  .valet-command-bar .valet-arrival-button {
    padding-inline: 2px;
    font-size: 0.56rem;
  }
}

/* Spacious phone Arrival controls. Damage stays opt-in and opens a capture
   sheet so evidence controls never compress the ticket-entry form. */
.valet-damage-assessment-input,
.valet-arrival-modal .valet-damage-evidence > input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.valet-arrival-modal .valet-damage-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 8px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.valet-damage-launch {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-align: left;
}

.valet-damage-launch > span:first-child {
  font-size: 1.45rem;
}

.valet-damage-launch > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.valet-damage-launch strong,
.valet-damage-launch small {
  display: block;
}

.valet-damage-launch small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.valet-damage-launch.is-active {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.16);
}

.valet-damage-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.valet-arrival-modal .valet-damage-evidence:not(.hidden) {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 14px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.82);
}

.valet-damage-capture-sheet {
  display: grid;
  width: min(520px, 100%);
  max-height: 100%;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  border: 2px solid #facc15;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.valet-damage-capture-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.valet-damage-capture-heading h3,
.valet-damage-capture-heading p {
  margin: 0;
}

.valet-damage-capture-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

#valet-damage-capture-close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.7rem;
  line-height: 1;
}

.valet-damage-capture-sheet .valet-damage-evidence-actions,
.valet-damage-capture-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.valet-damage-capture-sheet .valet-damage-evidence-actions .button,
.valet-damage-capture-footer .button {
  min-height: 58px;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-modal {
    gap: 8px;
    padding: 10px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-core-grid {
    grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
    gap: 9px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-core-grid input {
    height: clamp(70px, 9dvh, 88px);
    min-height: 70px;
    max-height: 88px;
    padding: 10px 12px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-ticket-field input {
    font-size: 1.7rem;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-phone-field input {
    font-size: 1.2rem;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-damage-check {
    min-height: 68px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 6px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-damage-launch {
    min-height: 58px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details {
    padding: 8px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details .valet-arrival-optional-grid {
    gap: 7px 8px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-field,
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-notes {
    grid-template-rows: auto 50px;
  }

  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details input:not([type="checkbox"]):not([type="file"]),
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details select,
  body.valet-arrival-viewport-lock:not(.valet-arrival-keyboard-open) .valet-arrival-details textarea {
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    padding: 8px 10px;
    font-size: 16px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal {
    gap: 5px;
    padding: 7px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-core-grid input:not([type="radio"]):not([type="checkbox"]):not([type="file"]) {
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 5px 8px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details .valet-arrival-field,
  body.valet-arrival-keyboard-open .valet-arrival-details .valet-arrival-notes {
    grid-template-rows: auto 30px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details input:not([type="checkbox"]):not([type="file"]),
  body.valet-arrival-keyboard-open .valet-arrival-details select,
  body.valet-arrival-keyboard-open .valet-arrival-details textarea {
    height: 30px;
    min-height: 30px;
    max-height: 30px;
    padding: 2px 6px;
    align-self: start;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details .valet-manual-toggle {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    height: 30px;
    min-height: 30px;
    max-height: 30px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-damage-check {
    min-height: 52px;
    padding: 4px;
  }

  body.valet-arrival-keyboard-open .valet-damage-launch {
    min-height: 44px;
    padding: 5px 9px;
  }

  body.valet-arrival-keyboard-open .valet-damage-launch small,
  body.valet-arrival-keyboard-open .valet-damage-status {
    display: none;
  }

  body.valet-arrival-keyboard-open .valet-arrival-details .valet-arrival-optional-grid {
    gap: 4px 5px;
  }

  body.valet-arrival-keyboard-open .valet-arrival-modal .valet-arrival-save-row .button {
    height: 50px;
    min-height: 50px;
    font-size: 1rem;
  }
}

/* Keep the complete guest ticket inside a phone's visible Safari viewport.
   This is intentionally a small density adjustment; employee Valet Mode is
   unaffected and payment controls retain comfortable touch targets. */
.public-valet-inline-car {
  display: inline-block;
  transform: scaleX(-1);
}

@media (max-width: 640px) {
  body.public-valet-page .page-shell {
    padding:
      max(3px, env(safe-area-inset-top))
      max(3px, env(safe-area-inset-right))
      max(3px, env(safe-area-inset-bottom))
      max(3px, env(safe-area-inset-left));
  }

  .public-valet-card {
    min-height: calc(100dvh - 6px);
    padding: 5px 7px 7px;
  }

  .public-valet-logo {
    height: 52px;
  }

  .public-valet-location-name {
    margin: 2px 0 1px;
    font-size: clamp(2.3rem, 10.7vw, 3.75rem) !important;
  }

  .public-valet-status h1 {
    font-size: clamp(2rem, 8.4vw, 3.15rem);
  }

  .public-valet-journey {
    gap: 4px;
    margin: 5px 0;
    padding: 6px 7px;
  }

  .public-valet-road {
    min-height: 62px;
  }

  .public-valet-details {
    margin-top: 4px;
    font-size: 0.69rem;
  }

  .public-valet-actions {
    gap: 5px;
    margin: 5px 0;
  }

  .public-valet-action {
    min-height: 78px;
    gap: 3px;
    padding: 6px 4px;
  }

  .public-valet-action > span {
    font-size: 1.5rem;
  }

  .public-valet-action strong {
    font-size: 0.84rem;
  }

  .public-valet-action small {
    font-size: 0.64rem;
  }

  .public-valet-payment {
    gap: 3px;
    margin: 4px 0;
    padding: 6px;
    border-radius: 12px;
  }

  .public-valet-payment-heading {
    gap: 5px;
  }

  .public-valet-payment-heading > span {
    font-size: 1rem;
  }

  .public-valet-payment-heading h2 {
    font-size: 0.86rem;
  }

  .public-valet-tip-options legend,
  .public-valet-payment > label {
    margin-bottom: 2px;
    font-size: 0.61rem;
  }

  .public-valet-payment input,
  .public-valet-payment select {
    min-height: 34px;
  }

  .public-valet-tip-choice {
    min-height: 30px;
    padding-block: 3px;
  }

  .public-valet-payment-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px;
    padding: 4px 6px;
    font-size: 0.65rem;
  }

  .public-valet-payment-summary > div {
    gap: 6px;
  }

  .public-valet-payment-summary .public-valet-payment-total {
    padding-top: 0;
    border-top: 0;
    color: var(--guest-accent);
    font-size: 0.7rem;
  }

  .public-valet-payment .notice-item {
    display: grid;
    gap: 1px;
    padding: 5px 7px;
    line-height: 1.2;
  }

  .public-valet-payment .notice-item strong,
  .public-valet-payment .notice-item span {
    display: block;
  }

  .public-valet-links {
    margin-top: 3px;
  }

  .public-valet-platform-mark {
    margin-top: auto;
    padding-top: 6px;
  }
}

/* President phone header: compact corner actions with a centered identity stack. */
@media (max-width: 640px) {
  .schedule-portal-shell {
    grid-template-rows: max-content max-content;
    align-content: start;
  }

  .schedule-portal-shell .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: start;
    align-content: start;
    align-self: start;
    gap: 4px;
    min-height: 0;
    height: fit-content;
    padding: 4px 6px 0;
  }

  .schedule-portal-shell .topbar > .topbar-identity {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    padding-right: 36px;
    display: grid;
    gap: 3px;
    justify-items: center;
    align-content: start;
    text-align: center;
  }

  .schedule-portal-shell .topbar .brand-lockup {
    width: 100%;
    margin: 0;
  }

  .schedule-portal-shell .topbar .brand-home-button {
    width: min(304px, calc(100vw - 72px));
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 2px;
    margin-inline: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .schedule-portal-shell .topbar .brand-mark-small {
    width: 100%;
    height: 74px;
    max-height: 74px;
    object-fit: contain;
  }

  .schedule-portal-shell .mobile-president-valet-shortcut {
    width: min(221px, 100%);
    min-height: 46px;
    display: inline-flex;
    justify-content: center;
    padding: 8px 12px;
    margin-inline: auto;
    overflow-wrap: anywhere;
    font-size: 0.97rem;
    line-height: 1.05;
  }

  .schedule-portal-shell .topbar-identity > p {
    margin: 1px 0 0;
    font-size: 0.95rem;
    line-height: 1.1;
  }

  .schedule-portal-shell .mobile-president-date {
    width: auto;
    min-height: 0;
    display: inline-flex;
    justify-content: center;
    padding: 2px 6px;
    margin: 0;
    border: 0;
    background: transparent;
    font-size: 0.92rem;
    line-height: 1;
  }

  .schedule-portal-shell .president-topbar-actions {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 32px;
    height: 140px;
    display: grid;
    grid-template-columns: 32px;
    grid-template-rows: repeat(4, 32px);
    gap: 4px;
    align-items: start;
    margin: 0;
    z-index: 2;
  }

  .schedule-portal-shell .president-quick-tabs,
  .schedule-portal-shell .president-update-stack,
  .schedule-portal-shell .president-account-actions {
    display: contents;
  }

  .schedule-portal-shell .president-updates-tab {
    position: relative;
    grid-column: 1;
    grid-row: 3;
  }

  .schedule-portal-shell .president-quick-tab[data-panel="days-off"] {
    position: relative;
    grid-column: 1;
    grid-row: 2;
  }

  .schedule-portal-shell .president-quick-tab[data-panel="applicants"] {
    position: relative;
    grid-column: 1;
    grid-row: 1;
  }

  .schedule-portal-shell .president-account-actions #logout-button {
    position: relative;
    grid-column: 1;
    grid-row: 4;
  }

  .schedule-portal-shell .president-valet-shortcut,
  .schedule-portal-shell .president-account-actions .pill {
    display: none;
  }

  .schedule-portal-shell .president-updates-tab,
  .schedule-portal-shell .president-quick-tab[data-panel="days-off"],
  .schedule-portal-shell .president-quick-tab[data-panel="applicants"],
  .schedule-portal-shell .president-account-actions #logout-button,
  .schedule-portal-shell .president-updates-tab > summary {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 2px;
    border-radius: 6px;
    justify-self: center;
    position: relative;
    z-index: 2;
  }

  .schedule-portal-shell .president-updates-tab > summary {
    position: relative;
    border: 0;
  }

  .schedule-portal-shell .president-quick-label {
    display: none;
  }

  .schedule-portal-shell .president-quick-icon {
    font-size: 0.72rem;
  }

  .schedule-portal-shell .president-quick-count {
    position: absolute;
    right: 1px;
    bottom: 1px;
    min-width: 12px;
    padding: 0 2px;
    font-size: 0.48rem;
    line-height: 1.2;
  }

  .schedule-portal-shell .president-account-actions #logout-button {
    font-size: 0;
  }

  .schedule-portal-shell .president-account-actions #logout-button::after {
    content: "Sign\A Out";
    white-space: pre-line;
    font-size: 0.5rem;
    line-height: 1;
    font-weight: 800;
  }

  .schedule-portal-shell .president-quick-popover {
    position: fixed;
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  .schedule-portal-shell > .schedule-workspace {
    margin-top: 0;
  }

  .schedule-portal-shell > .schedule-workspace > .schedule-navigation {
    padding-top: 0;
  }
}

/* Employee management owns its grid so narrower desktop and split-screen
   layouts cannot squeeze adjacent panels into unusable slivers. */
.employee-management-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.employee-management-grid > .employee-management-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.employee-management-grid .employee-management-panel h3 {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.employee-management-grid .employee-management-panel form,
.employee-management-grid .employee-management-panel form > *,
.employee-management-grid .employee-management-panel .danger-zone {
  min-width: 0;
  max-width: 100%;
}

.employee-management-grid input,
.employee-management-grid select,
.employee-management-grid textarea {
  min-width: 0;
  max-width: 100%;
}

.employee-management-grid .button {
  max-width: 100%;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

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

  .employee-management-grid > .span-6,
  .employee-management-grid > .span-12 {
    grid-column: 1;
  }

  .employee-management-grid .field-row,
  .employee-management-grid .field-row-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .employee-management-card {
    padding: 12px;
  }

  .employee-management-grid {
    gap: 10px;
  }

  .employee-management-grid > .employee-management-panel {
    padding: 12px;
  }

  .employee-management-grid .field-row,
  .employee-management-grid .field-row-3,
  .employee-management-grid .inline-settings-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-management-grid .button {
    width: 100%;
  }
}

/* Desktop portal banner: compact, readable, and visually grouped. */
@media (min-width: 1101px) {
  .schedule-portal-shell .topbar {
    min-height: 0;
    padding: 12px 22px;
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.045), transparent 38%),
      linear-gradient(180deg, #050607 0%, #010203 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
      inset 0 -1px 0 rgba(27, 197, 154, 0.12),
      0 8px 26px rgba(0, 0, 0, 0.34);
  }

  .schedule-portal-shell .topbar .brand-lockup {
    margin: 0;
  }

  .schedule-portal-shell .topbar .brand-home-button {
    width: min(300px, 30vw);
    height: 104px;
    padding: 4px 10px;
    border: 0;
    background: transparent;
  }

  .schedule-portal-shell .topbar .brand-mark-small {
    height: 84px;
    max-height: 84px;
  }

  .schedule-portal-shell .topbar-identity > p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .schedule-portal-shell .topbar-identity {
    row-gap: 4px;
  }

  .schedule-portal-shell .mobile-president-valet-shortcut,
  .schedule-portal-shell .mobile-president-date {
    display: none !important;
  }

  .schedule-portal-shell .president-topbar-actions {
    width: min(460px, 100%);
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  }

  .schedule-portal-shell .president-quick-tabs {
    grid-template-rows: repeat(2, 36px);
    gap: 6px;
  }

  .schedule-portal-shell .president-quick-tab,
  .schedule-portal-shell .president-quick-tab summary {
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.84rem;
  }

  .schedule-portal-shell .president-quick-icon {
    font-size: 0.92rem;
  }

  .schedule-portal-shell .president-quick-count {
    min-width: 20px;
    padding: 2px 5px;
    font-size: 0.72rem;
  }

  .schedule-portal-shell .president-account-actions {
    gap: 6px;
  }

  .schedule-portal-shell .president-account-actions .pill,
  .schedule-portal-shell .president-account-actions .button {
    height: 34px;
    min-height: 34px;
    max-height: 34px;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
  }
}
