/* Pulse — Time & attendance */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg-deep: #06120c;
  --bg: #0a1810;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --accent: #22c55e;
  --accent-bright: #4ade80;
  --accent-deep: #15803d;
  --accent-glow: rgba(34, 197, 94, 0.4);
  --accent-secondary: #34d399;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.14);
  --schedule-open-bg: #d1fae5;
  --schedule-open-border: #059669;
  --schedule-open-text: #065f46;
  --warning: #f59e0b;
  --danger: #f87171;
  --border: rgba(148, 163, 184, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.48);
  --shadow-soft: 0 4px 24px -4px rgba(15, 23, 42, 0.12);
  font-family: var(--font);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  background: var(--accent-deep);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.skip-link:focus {
  left: 0.5rem;
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— App shell —— */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(34, 197, 94, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(52, 211, 153, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 60%, rgba(21, 128, 61, 0.1), transparent 45%),
    linear-gradient(180deg, #0a1810 0%, #0f172a 38%, #f0fdf4 38%, #f8fafc 100%);
}

#main-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  color: #334155;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  overflow-x: clip;
}

.app-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  padding: 1.25rem 0 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.25rem;
}

.app-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  width: 100%;
}

.app-header-nav-row {
  width: 100%;
  min-width: 0;
}

.admin-header-nav-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

@media (max-width: 720px) {
  .app-bg {
    background:
      radial-gradient(ellipse 100% 80% at 50% -30%, rgba(34, 197, 94, 0.18), transparent 55%),
      radial-gradient(ellipse 70% 50% at 100% 20%, rgba(52, 211, 153, 0.12), transparent 50%),
      radial-gradient(ellipse 50% 40% at 0% 60%, rgba(21, 128, 61, 0.1), transparent 45%),
      linear-gradient(180deg, #0a1810 0%, #0f172a 48%, #f0fdf4 48%, #f8fafc 100%);
  }

  .app-header-top {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .app-brand {
    justify-content: center;
  }

  .app-brand-text {
    align-items: center;
  }

  .admin-header-nav-shell {
    justify-content: center;
  }
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
}

.app-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  align-items: flex-start;
}

.app-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.22), rgba(52, 211, 153, 0.14));
  color: #ecfdf5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.app-logo-mark--image {
  width: auto;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.35);
}

.app-logo-img {
  display: block;
  height: 26px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.app-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #f8fafc;
  line-height: 1.1;
}

.app-mode-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(167, 243, 208, 0.92);
}

.app-header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-notifications,
.header-profile {
  position: relative;
}

.icon-btn {
  position: relative;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.45);
  color: #e2e8f0;
  cursor: pointer;
}

.icon-btn:hover {
  background: rgba(30, 41, 59, 0.72);
}

.icon-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.8);
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}

.notifications-menu {
  width: 22rem;
  right: 0;
  left: auto;
  top: calc(100% + 0.45rem);
  max-height: min(70vh, 22rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notifications-title {
  margin: 0 0 0.4rem;
  flex-shrink: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
}

#notifications-list {
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 0.15rem;
}

.notifications-section-title {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: #0f172a;
}

.notifications-section-title--muted {
  margin-top: 0.65rem;
  color: #64748b;
}

.notifications-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.65rem 0 0.2rem;
  padding: 0.15rem 0.1rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.notifications-section-toggle .notifications-section-title {
  margin: 0;
}

.notifications-section-caret {
  font-size: 0.78rem;
  color: #64748b;
  transition: transform 0.16s ease;
}

.notifications-section-toggle[aria-expanded="true"] .notifications-section-caret {
  transform: rotate(180deg);
}

.notifications-menu-footer {
  flex-shrink: 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.55rem;
  margin-top: 0.35rem;
}

.btn-notifications-mark-read {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-notifications-mark-read:hover {
  color: #1d4ed8;
}

.notifications-retention-hint {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.35;
}

.notifications-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.15rem;
  border: 0;
  border-top: 1px solid #e2e8f0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  box-sizing: border-box;
  font: inherit;
}

.notifications-section-title + .notifications-item {
  border-top: 0;
}

.notifications-item:hover {
  background: rgba(241, 245, 249, 0.85);
}

.notifications-item--unread .notifications-item-title::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: #2563eb;
  vertical-align: 0.1em;
}

.notifications-item-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.notifications-item-detail {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.35;
}

.audit-filters-grid {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  align-items: end;
}

.audit-filter-search {
  grid-column: span 2;
  min-width: 0;
}

@media (max-width: 720px) {
  .audit-filter-search {
    grid-column: span 1;
  }
}

.audit-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

.audit-retention-hint {
  margin-top: 0.35rem;
}

#audit-type-filter optgroup[hidden] {
  display: none;
}

.notification-detail-body {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  max-height: min(50vh, 16rem);
  overflow: auto;
}

.admin-header-extra {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: stretch;
  align-content: stretch;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}


.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}

.nav-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-pill:active {
  transform: scale(0.98);
}

.nav-pill-icon {
  display: flex;
  opacity: 0.85;
}

/* Avoid clipping stroked SVG icons inside compact nav pills (e.g. App config cog). */
.nav-pill-icon svg {
  overflow: visible;
}

.nav-pill.is-active {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(74, 222, 128, 0.5);
  color: #f0fdf4;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.btn-signout {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-signout:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.mode-admin .app-brand {
  cursor: pointer;
}

body.mode-admin .app-brand:focus-visible {
  outline: 2px solid rgba(74, 222, 128, 0.75);
  outline-offset: 4px;
  border-radius: 12px;
}

#main-app .app-screen {
  animation: admin-screen-in 0.28s ease-out;
}

@keyframes admin-screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-app .app-screen {
    animation: none;
  }
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.app-footer-dot {
  opacity: 0.45;
}

.footer-date {
  color: var(--text-soft);
}

.footer-hint {
  font-size: 0.72rem;
  color: rgba(100, 116, 139, 0.95);
  max-width: 22rem;
  text-align: center;
}

@media (max-width: 560px) {
  .app-footer {
    flex-wrap: wrap;
  }

  .footer-hint {
    width: 100%;
    order: 4;
    margin-top: 0.35rem;
  }
}

/* —— Cards —— */
#main-app .app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-soft);
}

#main-app .app-card-hero {
  padding: 1.6rem 1.6rem 1.75rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(165deg, #ffffff 0%, #fafbfc 100%);
}

#main-app .app-card-panel {
  padding: 1.5rem 1.5rem 1.65rem;
}

#admin-shifts-section {
  min-width: 0;
  max-width: 100%;
}

.panel-head {
  margin-bottom: 1rem;
}

#admin-escape-room-section .escape-room-head-room {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

#admin-escape-room-section .escape-room-head-room--muted {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text-muted);
}

#main-app .card-heading {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.card-heading-hero {
  font-size: 1.5rem;
}

#main-app .card-lead {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.clock-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.status-pill {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  border: 1px solid transparent;
}

.status-pill--out {
  color: var(--text-muted);
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.status-pill--in {
  color: #065f46;
  background: var(--success-bg);
  border-color: rgba(16, 185, 129, 0.35);
  animation: pulse-soft 2.5s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.25);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-pill--in {
    animation: none;
  }
}

.clock-hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.35rem;
}

@media (max-width: 600px) {
  .clock-hero-body {
    grid-template-columns: 1fr;
  }
}

.clock-face {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.clock-face-ring {
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(
    from 200deg,
    rgba(34, 197, 94, 0.18),
    rgba(52, 211, 153, 0.22),
    rgba(21, 128, 61, 0.12)
  );
  opacity: 0.9;
}

.clock-card--in .clock-face-ring {
  animation: ring-pulse 3s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clock-card--in .clock-face-ring {
    animation: none;
  }
}

.clock-face-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 28px -8px rgba(15, 23, 42, 0.15);
}

.clock-face-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  margin-bottom: 0.2rem;
}

.live-shift-elapsed {
  font-variant-numeric: tabular-nums;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.shift-started-at {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 10rem;
  line-height: 1.35;
}

.employee-identity {
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.employee-name {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.employee-id-line {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.employee-id-line .label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
  margin-right: 0.35rem;
}

.employee-id-line code {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.88rem;
  color: #334155;
  background: #fff;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.clock-actions {
  margin-top: 0.25rem;
}

.actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn-clock {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 0.12s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.btn-clock:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-clock-text {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.btn-clock-hint {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
}

.btn-clock-in {
  color: #fff;
  background: linear-gradient(145deg, #22c55e 0%, #16a34a 48%, #15803d 100%);
  box-shadow: 0 10px 28px -8px rgba(22, 163, 74, 0.55);
}

.btn-clock-in:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(21, 128, 61, 0.55);
}

.btn-clock-out {
  color: #1e293b;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.1);
}

.btn-clock-out:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.app-status {
  margin-top: 1.15rem;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #14532d;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  border-left: 4px solid var(--accent-deep);
}

.clock-session-hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-soft);
}

/* —— Forms & inputs (main app) —— */
#main-app .hint {
  color: var(--text-muted);
}

#main-app .muted {
  color: var(--text-soft);
  font-size: 0.9rem;
}

#main-app label {
  display: block;
  margin: 0.65rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.label-opt {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-soft);
}

#main-app .role-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

#main-app .role-pill[data-role="staff"] {
  background: #f1f5f9;
  color: #64748b;
}

#main-app .role-pill[data-role="reporting"] {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}

#main-app .role-pill[data-role="full_admin"] {
  background: rgba(21, 128, 61, 0.18);
  color: #14532d;
}

#main-app .role-pill[data-role="admin_clock"] {
  background: rgba(100, 116, 139, 0.2);
  color: #334155;
}

#main-app .hint-block {
  display: block;
  margin-top: 0.55rem;
  font-weight: 600;
  color: #475569;
}

#main-app .app-input,
#main-app .app-form input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  color: var(--text);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

#main-app .app-input:hover,
#main-app .app-form input:not([type="checkbox"]):not([type="radio"]):hover {
  border-color: #94a3b8;
}

#main-app .app-input:focus,
#main-app .app-form input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

#main-app .app-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem 1rem;
  align-items: end;
}

/* Config section bodies: top-align rows so multi-line hints and intro copy don’t sit on the grid’s bottom edge */
#main-app .cfg-section-body.app-form-grid {
  align-items: start;
  gap: 0.65rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

#main-app .cfg-section-body.app-form-grid > p.hint {
  grid-column: 1 / -1;
  margin: 0;
  max-width: 72ch;
}

#main-app .cfg-section-body.app-form-grid > .cfg-inline-actions {
  grid-column: 1 / -1;
}

#main-app .cfg-section-body.app-form-grid > div:has(> .checkbox-row:first-child) {
  grid-column: 1 / -1;
}

.form-field-span {
  grid-column: 1 / -1;
}

.form-panel {
  padding: 1.15rem 1.2rem;
  margin-bottom: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.cfg-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cfg-section-card {
  padding: 1rem 1rem 1.05rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.3);
}

.cfg-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.cfg-section-head .section-title-sub {
  margin-bottom: 0.25rem;
}

.cfg-summary-line {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.cfg-section-card--collapsed .cfg-section-body {
  display: none;
}

.cfg-section-card--collapsed {
  padding-bottom: 0.9rem;
}

.cfg-summary-line {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.cfg-section-card--collapsed .cfg-section-body {
  display: none;
}

.cfg-section-card--collapsed {
  padding-bottom: 0.9rem;
}

.cfg-admin-health-widget {
  margin-top: 0.35rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.cfg-admin-health-stats {
  display: grid;
  grid-template-columns: minmax(8.5rem, 12rem) 1fr;
  gap: 0.35rem 1rem;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.85rem;
}

.cfg-admin-health-stats dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.cfg-admin-health-stats dd {
  margin: 0;
  color: #0f172a;
}

.cfg-subsection-title {
  margin-top: 0.25rem;
  padding-top: 0.6rem;
  border-top: 1px solid #eef2f7;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.cfg-subsection-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.cfg-sync-live {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.cfg-sync-live-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.cfg-sync-live-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.cfg-sync-live-phase {
  font-size: 0.8rem;
  text-transform: capitalize;
  opacity: 0.85;
}

.cfg-sync-live-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cfg-sync-live-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  transition: width 0.25s ease;
}

.cfg-sync-live-detail {
  margin-top: 8px;
  margin-bottom: 0;
}

.cfg-sync-live-next {
  margin-top: 6px;
  margin-bottom: 0;
}

/* OffTheCouch: one calm summary line; long URL / body live under <details> */
.cfg-external-slots-sync-status.cfg-external-slots-sync-status--rich {
  margin-top: 6px;
  margin-bottom: 0;
}

.cfg-sync-status-summary {
  display: block;
  font-size: 0.88rem;
  line-height: 1.4;
  opacity: 0.9;
}

.cfg-sync-status-details {
  margin-top: 6px;
  font-size: 0.82rem;
}

.cfg-sync-status-details summary {
  cursor: pointer;
  color: inherit;
  opacity: 0.75;
  user-select: none;
  list-style: none;
}

.cfg-sync-status-details summary::-webkit-details-marker {
  display: none;
}

.cfg-sync-status-details summary::before {
  content: "▸ ";
  display: inline-block;
  opacity: 0.65;
  transition: transform 0.15s ease;
}

.cfg-sync-status-details[open] summary::before {
  transform: rotate(90deg);
}

.cfg-sync-status-details-pre {
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 11rem;
  overflow: auto;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cfg-sync-history-panel {
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.cfg-sync-history-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.cfg-external-slots-sync-history {
  margin-top: 0.5rem;
}

.cfg-sync-history-empty {
  margin: 0;
}

.cfg-sync-history-scroll {
  max-height: 20rem;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.cfg-sync-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.cfg-sync-history-table th,
.cfg-sync-history-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
}

.cfg-sync-history-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.cfg-sync-history-table tbody tr:last-child td {
  border-bottom: 0;
}

.cfg-sync-history__notes {
  max-width: 22rem;
  word-break: break-word;
  color: #475569;
}

.cfg-sync-history__pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cfg-sync-history__pill--success {
  background: #dcfce7;
  color: #166534;
}

.cfg-sync-history__pill--partial {
  background: #fef3c7;
  color: #92400e;
}

.cfg-sync-history__pill--failed {
  background: #fee2e2;
  color: #991b1b;
}

.cfg-sync-history__pill--skipped {
  background: #f1f5f9;
  color: #475569;
}

.cfg-sync-history__pill--unknown {
  background: #f1f5f9;
  color: #64748b;
}

.cfg-inline-actions {
  display: flex;
  align-items: flex-end;
}

.cfg-inline-hint {
  margin-left: 0.5rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.cfg-token-helper {
  padding: 0.85rem 0.9rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.cfg-token-helper-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}

@media (max-width: 720px) {
  .cfg-token-helper-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .cfg-inline-actions {
    align-items: stretch;
  }

  .cfg-inline-actions .btn-app-outline {
    width: 100%;
  }
}

.form-actions {
  display: flex;
  align-items: flex-end;
  grid-column: 1 / -1;
  padding-top: 0.25rem;
}

#app-config-form .form-actions {
  display: none;
}

/* Keep the "Add user" submit action visible inside App Config user management. */
#create-user-form .form-actions {
  display: flex;
}

.section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.section-title-sub {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.header-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-with-action:first-of-type {
  margin-top: 0;
}

.users-directory-toolbar {
  align-items: flex-start;
}

.users-directory-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  margin: 0;
}

.checkbox-inline input {
  width: 1rem;
  height: 1rem;
  accent-color: #15803d;
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 0.2rem;
  accent-color: #15803d;
  flex-shrink: 0;
}

.user-row-disabled td {
  opacity: 0.9;
}

.user-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.user-status--active {
  color: #166534;
  background: rgba(34, 197, 94, 0.15);
}

.user-status--disabled {
  color: #64748b;
  background: #f1f5f9;
}

#main-app .btn-app-primary {
  margin-top: 0;
  padding: 0.72rem 1.2rem;
  font-weight: 600;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  box-shadow: 0 8px 22px -6px rgba(22, 163, 74, 0.45);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

#main-app .btn-app-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(21, 128, 61, 0.45);
}

.btn-apply {
  align-self: end;
}

#main-app .btn-app-outline {
  margin-top: 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#main-app .btn-app-outline:hover {
  background: #e2e8f0;
  border-color: rgba(34, 197, 94, 0.35);
  color: #166534;
}

.btn-edit {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.report-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.9rem;
  margin-bottom: 0.7rem;
}

.report-employee-calendar {
  margin: 0.85rem 0 0.95rem;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 0.7rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.report-employee-calendar--collapsed {
  padding-bottom: 0.55rem;
}

.report-employee-calendar__head {
  margin-bottom: 0;
}

.report-employee-calendar__head-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.report-employee-calendar__head-note {
  margin: 0;
}

#main-app .report-employee-calendar-toggle {
  padding: 0.52rem 1.15rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 8px 22px -6px rgba(22, 163, 74, 0.55);
}

#main-app .report-employee-calendar-toggle:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 12px 28px -8px rgba(21, 128, 61, 0.55);
}

#main-app .report-employee-calendar-toggle:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.report-employee-calendar--collapsed .report-employee-calendar__head {
  margin-bottom: 0;
}

.report-employee-calendar__panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.65rem;
}

.report-employee-calendar__toolbar {
  margin-bottom: 0.55rem;
}

.report-employee-view-toggle {
  display: inline-flex;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.report-employee-view-toggle__btn {
  margin: 0;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.38rem 0.72rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  background: rgba(248, 250, 252, 0.95);
  color: #475569;
  box-shadow: none !important;
}

.report-employee-view-toggle__btn + .report-employee-view-toggle__btn {
  border-left: 1px solid rgba(148, 163, 184, 0.4) !important;
}

.report-employee-view-toggle__btn.is-active {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
}

.report-employee-view-toggle__btn:not(.is-active):hover {
  background: rgba(241, 245, 249, 0.98);
  color: #0f172a;
}

.report-employee-month {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.report-employee-month__note {
  margin: 0;
  font-size: 0.72rem;
}

.report-employee-month__weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  padding: 0 0.1rem;
}

.report-employee-month__weekday {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  text-align: center;
  padding: 0.15rem 0;
}

.report-employee-month__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.report-employee-month__cell {
  min-height: 4.75rem;
  padding: 0.35rem 0.4rem 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.85);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

.report-employee-month__cell:hover:not(:disabled) {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.12);
}

.report-employee-month__cell.is-today {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.report-employee-month__cell.is-outside {
  cursor: default;
  opacity: 0.38;
  background: rgba(248, 250, 252, 0.65);
}

.report-employee-month__cell:disabled {
  cursor: default;
  pointer-events: none;
}

.report-employee-month__daynum {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.report-employee-month__cell.is-outside .report-employee-month__daynum {
  color: #94a3b8;
}

.report-employee-month__metrics {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  color: #475569;
}

.report-employee-month__line--game {
  color: #0369a1;
}

.report-employee-month__line--train {
  color: #15803d;
}

.report-employee-month__line--ot {
  color: #c2410c;
}

.report-employee-month__line--double-game-bonus {
  color: #7c3aed;
}

.report-employee-month__line--muted {
  color: #94a3b8;
  font-weight: 600;
}

.report-employee-month__legend {
  margin: 0;
}

.report-employee-month__claims {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-top: auto;
}

.report-employee-month__claims .report-day-claim-chip {
  transform: scale(0.88);
  transform-origin: left bottom;
}

.report-employee-export-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0.65rem;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: hidden;
}

.report-employee-export-row--collapsed {
  padding: 0;
}

.report-employee-export-row__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  min-height: 2.75rem;
}

.report-employee-export-row:not(.report-employee-export-row--collapsed) .report-employee-export-row__bar {
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.report-employee-export-row__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

#main-app .report-employee-export-toggle {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.report-employee-export-row__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.65rem 0.75rem 0.75rem;
}

.report-employee-export-row__body[hidden] {
  display: none !important;
}

.report-employee-export-row__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 720px) {
  .report-employee-export-row__cards {
    grid-template-columns: 1fr;
  }
}

.report-employee-export-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.65);
}

.report-employee-export-card--team {
  background: rgba(241, 245, 249, 0.55);
}

.report-employee-export-card__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
}

.report-employee-export-card__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.report-employee-export-card__btn {
  flex: 1 1 auto;
  min-width: 8.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.report-employee-export-month-wrap {
  flex: 0 0 auto;
}

.report-employee-export-month {
  min-width: 9.25rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  border-radius: 8px;
}

.report-employee-calendar #report-employee-calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  width: 100%;
  min-width: 0;
}

/* Employee week report: denser time gutter; day columns grow to fill the panel width. */
.report-employee-calendar #report-employee-calendar-grid .availability-grid-head--staff,
.report-employee-calendar #report-employee-calendar-grid .availability-grid--staff.report-employee-grid {
  grid-template-columns: 3.5rem repeat(7, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.report-employee-calendar #report-employee-calendar-grid .availability-grid-head--staff {
  min-width: 0;
}

.report-employee-calendar #report-employee-calendar-grid .availability-day-head {
  padding: 0.35rem 0.25rem;
  font-size: 0.7rem;
  line-height: 1.15;
}

.report-employee-calendar #report-employee-calendar-grid .availability-time-label {
  min-height: 1.05rem;
  padding: 0.08rem 0.25rem 0.08rem 0.12rem;
  font-size: 0.56rem;
  z-index: 12;
  background: linear-gradient(90deg, #f8fafc 0%, #fbfdff 100%);
  box-shadow: 1px 0 0 rgba(226, 232, 240, 0.95);
}

.report-employee-calendar #report-employee-calendar-grid .availability-cell {
  min-height: 1.05rem;
}

.report-employee-calendar #report-employee-calendar-grid .report-day-claims {
  min-height: 0.65rem;
  gap: 0.12rem;
}

.report-employee-calendar #report-employee-calendar-grid .report-day-claim-chip {
  padding: 0.05rem 0.28rem 0.05rem 0.22rem;
  font-size: 0.54rem;
  gap: 0.12rem;
}

.report-employee-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.55rem;
  padding: 0.3rem 0.42rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  font-size: 0.68rem;
  color: #475569;
}

.report-employee-legend__title {
  font-weight: 800;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.report-employee-legend__items {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: center;
}

.report-employee-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 600;
}

.report-employee-legend__swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.report-employee-legend__swatch.is-game {
  background: rgba(59, 130, 246, 0.32);
  border-color: rgba(37, 99, 235, 0.35);
}

.report-employee-legend__swatch.is-training {
  background: rgba(34, 197, 94, 0.36);
  border-color: rgba(22, 163, 74, 0.4);
}

.report-employee-legend__swatch.is-overtime {
  background: rgba(245, 158, 11, 0.42);
  border-color: rgba(217, 119, 6, 0.45);
}

.report-employee-legend__swatch.is-double-game-bonus {
  background: rgba(168, 85, 247, 0.35);
  border-color: rgba(126, 34, 206, 0.45);
}

.report-employee-user-filter {
  min-width: 12rem;
  width: 12rem;
  flex: 0 0 12rem;
}

.report-employee-week-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.2rem 0 0.45rem;
}

.report-employee-opening-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

#report-employee-closing-strip {
  margin-top: 0.45rem;
  margin-bottom: 0;
}

.report-employee-opening-strip .shifts-open-close-chip {
  justify-content: center;
  text-align: center;
  font-size: 0.68rem;
}

.report-employee-opening-strip .shifts-open-close-chip.is-claimed {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.report-employee-grid {
  grid-auto-rows: minmax(1.05rem, auto);
}

.report-employee-grid .availability-cell.is-game {
  background: rgba(59, 130, 246, 0.26);
}

.report-employee-grid .availability-cell.is-training {
  background: rgba(34, 197, 94, 0.3);
}

.report-employee-grid .availability-cell.is-overtime {
  background: rgba(245, 158, 11, 0.35);
}

.report-employee-grid .availability-cell.report-employee-block {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0.08rem 0.16rem;
  overflow: hidden;
  z-index: 1;
  border-radius: 7px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
  min-height: 0;
}

.report-employee-grid .availability-cell.report-employee-block.is-game {
  background: rgba(59, 130, 246, 0.32);
  border: 1px solid rgba(37, 99, 235, 0.35);
}

.report-employee-grid .availability-cell.report-employee-block.is-training {
  background: rgba(34, 197, 94, 0.36);
  border: 1px solid rgba(22, 163, 74, 0.4);
}

.report-employee-grid .availability-cell.report-employee-block.is-overtime {
  background: rgba(245, 158, 11, 0.42);
  border: 1px solid rgba(217, 119, 6, 0.45);
}

.report-employee-block__text {
  font-size: 0.56rem;
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  word-break: break-word;
  text-align: left;
}

.report-employee-grid .availability-cell {
  pointer-events: none;
}

.report-employee-grid .availability-day-head {
  display: grid;
  gap: 0.2rem;
  align-content: center;
}

.availability-day-head__label {
  display: block;
}

.report-day-claims {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  min-height: 0.9rem;
}

.report-day-claim-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.1rem 0.38rem 0.1rem 0.32rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.report-day-claim-chip__icon {
  flex-shrink: 0;
  display: block;
}

.report-day-claim-chip__label {
  line-height: 1.1;
}

/* Opening: cooler mint / teal-green (day start) */
.report-day-claim-chip--opening {
  background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: #5eead4;
  color: #0f766e;
  box-shadow: 0 1px 0 rgba(15, 118, 110, 0.12);
}

/* Closing: warmer leaf / emerald-green (day end) */
.report-day-claim-chip--closing {
  background: linear-gradient(180deg, #f7fee7 0%, #ecfccb 100%);
  border-color: #84cc16;
  color: #3f6212;
  box-shadow: 0 1px 0 rgba(63, 98, 18, 0.1);
}

.report-year-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.report-field-label {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #64748b;
}

.report-year-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.report-year-input {
  width: 4.8rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.4rem;
  min-height: 2rem;
}

.report-year-hint {
  margin: 0;
  flex: 1 1 100%;
  font-size: 0.72rem;
}

.report-month-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.35rem;
}

@media (max-width: 980px) {
  .report-month-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.report-month-chip {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 0.25rem 0.35rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.02rem;
  cursor: pointer;
}

.report-month-chip:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.report-month-chip.is-selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.report-month-chip__month {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.15;
}

.report-month-chip__status {
  font-size: 0.6rem;
  color: #475569;
  line-height: 1.1;
}

.report-month-chip__meta {
  font-size: 0.58rem;
  color: #64748b;
  line-height: 1.1;
  display: none;
}

.report-month-chip.is-closed .report-month-chip__meta {
  display: block;
}

/* Green = open (active payroll month), red = closed (period signed off). */
.report-month-chip.is-closed {
  background: #fef2f2;
  border-color: #fca5a5;
}

.report-month-chip.is-open {
  background: #f0fdf4;
  border-color: #86efac;
}

.report-month-chip.is-current {
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.35);
}

.report-month-chip.is-current.is-selected {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35), inset 0 0 0 1px rgba(100, 116, 139, 0.22);
}

.report-month-chip:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.4);
  outline-offset: 1px;
}

.report-payroll-signoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.1rem;
  margin: 1.15rem 0 1.1rem;
  padding: 1.05rem 1.15rem 1.05rem 1.2rem;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-left: 4px solid var(--accent-deep);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px -14px rgba(21, 128, 61, 0.28);
  background:
    radial-gradient(115% 85% at 0% 0%, rgba(52, 211, 153, 0.2), transparent 55%),
    linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 35%, #ffffff 100%);
}

.report-payroll-signoff__title {
  margin: 0 0 0.28rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.report-payroll-signoff__status {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  max-width: 42rem;
}

.report-payroll-signoff__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.report-payroll-signoff__actions .btn-app-outline {
  border-color: rgba(21, 128, 61, 0.45);
  background: #ffffff;
  color: var(--accent-deep);
  font-weight: 600;
}

.report-payroll-signoff__actions .btn-app-outline:hover {
  border-color: var(--accent-deep);
  background: #ecfdf5;
  color: #14532d;
}

.report-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
  border: 1px solid #d1fae5;
  border-radius: 12px;
}

.report-export-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  margin-right: 0.25rem;
}

.pay-rate-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.pay-rate-row .pay-rate-input {
  flex: 1;
  min-width: 0;
}

#main-app .btn-pay-reveal {
  flex-shrink: 0;
  align-self: stretch;
  padding: 0.45rem 0.75rem;
}

.th-pay-rate,
.th-pay-est,
.td-pay-rate,
.td-pay-est {
  font-variant-numeric: tabular-nums;
}

.td-pay-rate,
.td-pay-est {
  color: #14532d;
  font-weight: 600;
}

.report-total-row td {
  border-top: 2px solid #cbd5e1;
  background: #f8fafc;
}

.report-total-label {
  text-align: right;
  font-weight: 700;
  color: #334155;
}

.report-total-value {
  font-size: 0.92rem;
}

.report-pay-reveal-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.75rem;
  background: rgba(240, 253, 244, 0.65);
  border: 1px dashed #86efac;
  border-radius: 10px;
}

.report-pay-reveal-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 42ch;
  line-height: 1.35;
}

#main-app .btn-report-pay-toggle {
  font-size: 0.78rem;
  padding: 0.4rem 0.85rem;
}

#hours-report-table-wrap.pay-masked .pay-est-inner,
.report-year-pay-chart-wrap.pay-masked .pay-est-inner {
  display: inline-block;
  min-width: 2.5em;
  filter: blur(8px);
  user-select: none;
  transition: filter 0.18s ease;
}

#hours-report-table-wrap:not(.pay-masked) .pay-est-inner,
.report-year-pay-chart-wrap:not(.pay-masked) .pay-est-inner {
  filter: none;
}

.report-year-pay-chart-wrap.pay-masked .report-year-pay-chart__bar {
  filter: blur(6px);
  opacity: 0.5;
  transition: filter 0.18s ease, opacity 0.18s ease;
}

.report-year-pay-chart-wrap:not(.pay-masked) .report-year-pay-chart__bar {
  filter: none;
  opacity: 1;
}

.report-year-chart-anchor-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.report-year-pay-chart-wrap {
  margin: 0.65rem 0 1rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 55%, #f8fbff 100%);
  box-shadow: var(--shadow-soft);
}

.report-year-pay-chart:has(.report-year-pay-chart__loading),
.report-year-pay-chart:has(.report-year-pay-chart__error) {
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
}

.report-year-pay-chart .report-year-pay-chart__loading,
.report-year-pay-chart .report-year-pay-chart__error {
  margin: 0;
  max-width: 28rem;
}

.report-year-pay-chart__title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.report-year-pay-chart__subtitle {
  margin: 0 0 0.65rem;
}

.report-year-pay-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 11rem;
  padding: 0.25rem 0 0;
}

.report-year-pay-chart__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.report-year-pay-chart__track {
  width: 100%;
  max-width: 3.25rem;
  height: 8.5rem;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.5));
  border-radius: 8px 8px 4px 4px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.report-year-pay-chart__bar {
  width: 100%;
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: height 0.25s ease;
}

.report-year-pay-chart__month {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
}

.report-year-pay-chart__value {
  font-size: 0.65rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #14532d;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  word-break: break-word;
}

@media (max-width: 720px) {
  .report-year-pay-chart {
    gap: 0.2rem;
    min-height: 9rem;
  }

  .report-year-pay-chart__track {
    height: 6.5rem;
    max-width: none;
  }

  .report-year-pay-chart__month {
    font-size: 0.55rem;
  }

  .report-year-pay-chart__value {
    font-size: 0.58rem;
  }
}

#main-app .btn-export {
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
}

.report-field label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.report-message {
  font-size: 0.875rem;
  color: #b91c1c;
  margin: 0 0 0.75rem;
  min-height: 1.25em;
}

.report-message:empty {
  display: none;
}

.admin-feedback {
  font-size: 0.9rem;
  color: #0f766e;
  margin: 0 0 1rem;
  min-height: 1.25em;
  padding: 0.6rem 0.85rem;
  background: rgba(16, 185, 129, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.admin-feedback:empty {
  display: none;
}

.admin-feedback--top {
  margin-top: 0.55rem;
  color: #991b1b;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
}

.shift-approval-list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 0.8rem;
}

.shift-approval-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  background: #fff;
}

.shift-approval-card p {
  margin: 0.15rem 0;
}

.shift-approval-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

/* App config (and related actions): top-right toast ribbons */
.app-config-toast-host {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(24rem, calc(100vw - 2rem));
}

.app-config-toast {
  pointer-events: auto;
  margin: 0;
  padding: 0.8rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  border-radius: 12px;
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
  opacity: 0;
  transform: translateX(calc(100% + 1.5rem));
  transition:
    opacity 0.38s ease,
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-config-toast--show {
  opacity: 1;
  transform: translateX(0);
}

.app-config-toast--out {
  opacity: 0;
  transform: translateX(1rem);
  transition:
    opacity 0.32s ease,
    transform 0.32s ease;
}

.app-config-toast--info {
  color: #14532d;
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 55%, #ecfdf5 100%);
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-left: 4px solid #16a34a;
}

.app-config-toast--warn {
  color: #92400e;
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 50%, #fffbeb 100%);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-left: 4px solid #d97706;
}

.app-config-toast--error {
  color: #991b1b;
  background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 50%, #fef2f2 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-left: 4px solid #dc2626;
}

.cfg-health-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

.cfg-health-badge--ready {
  color: #166534;
  background: #ecfdf5;
  border-color: #86efac;
}

.cfg-health-badge--incomplete {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}

.cfg-health-badge--disabled {
  color: #475569;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.cfg-health-badge--standby {
  color: #1e40af;
  background: #eff6ff;
  border-color: #93c5fd;
}

.app-form.cfg-section-body.cfg-notifications-master-off {
  border-left: 3px solid #94a3b8;
  padding-left: 0.65rem;
  margin-left: -0.15rem;
}

.cfg-email-master-hint {
  margin-top: 0.35rem;
}

.cfg-notif-card {
  grid-column: 1 / -1;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 10px;
  padding: 0.85rem 1rem 1rem;
  margin-bottom: 0.35rem;
  background: rgba(248, 250, 252, 0.65);
}

.cfg-notif-card-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0f172a;
}

.cfg-audience-picker {
  grid-column: 1 / -1;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.cfg-audience-picker-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.cfg-audience-picker-summary::-webkit-details-marker {
  display: none;
}

.cfg-audience-picker-value {
  color: #64748b;
  font-weight: 500;
  font-size: 0.86rem;
  text-align: right;
}

.cfg-audience-picker-menu {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 0.8rem 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.cfg-audience-picker-menu .hint {
  margin: 0.5rem 0 0.1rem;
}

.cfg-notif-tokens {
  grid-column: 1 / -1;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.75);
  background: rgba(255, 255, 255, 0.7);
}

.cfg-notif-tokens > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  color: #334155;
}

.cfg-notif-tokens .cfg-token-helper-row {
  margin-top: 0.65rem;
}

.entries-section-head {
  margin-top: 0;
}

#main-app .entries-feedback:empty {
  display: none;
}

.entries-readonly #entries-table th.th-actions {
  display: none;
}

.entries-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

#main-app .manual-entry-open-btn {
  font-size: 0.8125rem;
  padding: 0.45rem 0.9rem;
}

.inline-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0;
}

.app-select-inline {
  min-width: 200px;
  width: auto;
}

/* —— Tables —— */
.table-elevated {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fafafa;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.app-table-wrap {
  overflow-x: auto;
}

.entries-scroll-wrap {
  max-height: 25rem;
  overflow-y: auto;
}

.shift-home-panel {
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff;
}

.shift-home-panel-open {
  margin-top: 0.75rem;
}

/* Issues screen — report form */
#admin-issues-section .issues-log-panel {
  padding: 1.05rem 1.1rem 1.2rem;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  border-color: #e2e8f0;
  box-shadow: 0 12px 36px -28px rgba(15, 23, 42, 0.45);
}

#admin-issues-section .issues-log-header {
  margin-bottom: 0.35rem;
}

#admin-issues-section .issues-log-hint {
  margin: 0 0 1.05rem;
  max-width: 56ch;
  line-height: 1.5;
  font-size: 0.88rem;
}

#admin-issues-section .issue-report-form {
  align-items: start;
  gap: 0.9rem 1.25rem;
}

#admin-issues-section .issue-report-form label {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: #475569;
  margin-bottom: 0.38rem;
}

#admin-issues-section .issue-report-form .issues-form-grid-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 540px) {
  #admin-issues-section .issue-report-form .issues-form-grid-pair {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1rem 1.35rem;
  }
}

#admin-issues-section .issue-report-form #issue-description {
  min-height: 6.75rem;
  resize: vertical;
  line-height: 1.45;
}

#admin-issues-section .issue-report-form .issues-form-actions {
  margin-top: 0.15rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

#admin-issues-section .issue-report-form .issues-form-actions .btn-app-primary {
  min-width: 10rem;
}

.staff-shifts-list {
  display: grid;
  gap: 0.65rem;
}

.staff-next-shift-card {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.65rem;
  background: linear-gradient(180deg, #eff6ff, #f8fbff);
}

.staff-next-shift-line {
  margin: 0;
  font-weight: 700;
  color: #1e3a8a;
}

.staff-next-shift-countdown {
  margin: 0.2rem 0 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: #1d4ed8;
}

.staff-shift-card {
  border: 1px solid #dcfce7;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: #f8fffb;
}

.staff-shift-card > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.staff-shift-card__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.staff-shift-card .btn-claim-shift,
.staff-shift-card .btn-unclaim-shift,
.staff-shift-card .btn-floor-checkin {
  flex-shrink: 0;
  align-self: auto;
  white-space: nowrap;
  min-height: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  box-shadow: none;
  text-align: center;
}

.staff-shift-card .btn-claim-shift {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.staff-shift-card .btn-claim-shift:hover {
  transform: none;
  box-shadow: 0 2px 6px -2px rgba(22, 163, 74, 0.35);
}

@media (max-width: 480px) {
  .staff-shift-card {
    flex-wrap: wrap;
  }

  .staff-shift-card__actions {
    width: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: stretch;
  }

  .staff-shift-card .btn-floor-checkin,
  .staff-shift-card .btn-unclaim-shift {
    flex: 1 1 0;
    min-width: 0;
  }
}

.staff-shift-time {
  margin: 0;
  font-weight: 700;
  color: #14532d;
}

.create-shift-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid #dbe7df;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfa 100%);
  box-shadow: 0 14px 34px -30px rgba(15, 23, 42, 0.42);
}

#shifts-create-toggle-btn {
  margin: 0 0 0.7rem;
}

.create-shift-feedback {
  flex: 1 1 100%;
  margin: 0;
}

.create-shift-form .app-input {
  min-width: 15rem;
}

#shift-notes {
  flex: 1 1 18rem;
}

#shift-duration,
#shift-duration-custom {
  min-width: 8rem;
}

.shifts-view-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.9rem;
  padding: 0.6rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
}

.schedule-shell {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
  max-width: 100%;
}

.shifts-calendar {
  min-width: 0;
  max-width: 100%;
}

.schedule-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.schedule-stat-card {
  display: grid;
  gap: 0.22rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid #dbe7df;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  box-shadow: 0 14px 28px -30px rgba(15, 23, 42, 0.5);
}

.schedule-stat-card--open {
  border-color: rgba(16, 185, 129, 0.25);
  background: linear-gradient(180deg, #f6fef9 0%, #ecfdf5 100%);
}

.schedule-stat-card--claimed {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
}

.schedule-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.schedule-stat-value {
  font-size: 1.6rem;
  line-height: 1;
  color: #0f172a;
}

.schedule-subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.schedule-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #dbe7df;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 600;
}

.schedule-legend-item--mine {
  border-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.schedule-legend-swatch {
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 999px;
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.schedule-legend-swatch--open {
  background: #34d399;
}

.schedule-legend-swatch--claimed {
  background: #60a5fa;
}

.schedule-legend-swatch--stacked {
  background: linear-gradient(180deg, #86efac 0%, #60a5fa 100%);
}

.schedule-tip {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
}

/* Hide subhead row until rooms-layout hint is shown (span loses .hidden in JS). */
.schedule-tip:has(#shifts-layout-tip.hidden) {
  display: none;
}

.availability-home-panel,
.availability-admin-shell {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #dbe7df;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  box-shadow: 0 18px 34px -34px rgba(15, 23, 42, 0.55);
}

.availability-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.8rem 0 0.9rem;
}

.availability-nav-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.availability-period-label {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--app-border, #e2e8f0);
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
  font-size: 0.84rem;
}

.availability-date-picker-btn {
  min-width: 2.35rem;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.availability-date-picker-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.availability-nav-short {
  display: none;
}

.availability-toolbar--staff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.55rem;
  margin-bottom: 0.5rem;
}

.availability-toolbar__week-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.availability-controls-card {
  --avail-controls-label: minmax(6.75rem, 8.25rem);
  margin: 0 0 0.55rem;
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.availability-controls-card__block {
  display: grid;
  grid-template-columns: var(--avail-controls-label) minmax(0, 1fr);
  gap: 0.35rem 0.55rem;
  padding: 0.55rem 0.6rem;
  align-items: center;
}

.availability-controls-card__block--day,
.availability-controls-card__block--override {
  border-top: 1px solid var(--app-border, #e2e8f0);
  background: #f8fafc;
}

.availability-controls-card__block--day.hidden,
.availability-controls-card__block--tools.hidden {
  display: none;
}

.availability-controls-card__kicker-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.availability-override-done {
  min-height: 1.85rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
}

.availability-override-toggle {
  min-height: 2.35rem;
  width: 100%;
  justify-self: stretch;
}

.availability-paint-seg__btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.availability-paint-seg__btn:disabled.is-active {
  opacity: 0.62;
}

.availability-controls-card__kicker {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
}

.availability-controls-card__kicker--day {
  font-weight: 700;
  color: #0f172a;
}

.availability-paint-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  border: 1px solid var(--app-border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.availability-paint-seg__text-short {
  display: none;
}

.availability-paint-seg__btn {
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.4rem 0.35rem;
  border: 0;
  border-right: 1px solid var(--app-border, #e2e8f0);
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.availability-paint-seg--slots .availability-paint-seg__btn:last-child {
  border-right: 0;
}

.availability-paint-seg__btn:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: -2px;
  z-index: 1;
}

.availability-paint-seg__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.availability-paint-seg__btn--available .availability-paint-seg__dot {
  background: #22c55e;
}

.availability-paint-seg__btn--maybe .availability-paint-seg__dot {
  background: #f97316;
}

.availability-paint-seg__btn--unavailable .availability-paint-seg__dot {
  background: #ef4444;
}

.availability-paint-seg__btn--clear .availability-paint-seg__dot {
  background: #fff;
  border: 1px solid #cbd5e1;
}

.availability-paint-seg__btn.is-active {
  font-weight: 700;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.availability-paint-seg__btn--available.is-active {
  background: #dcfce7;
}

.availability-paint-seg__btn--maybe.is-active {
  background: #ffedd5;
}

.availability-paint-seg__btn--unavailable.is-active {
  background: #fee2e2;
}

.availability-paint-seg__btn--clear.is-active {
  background: #fff;
}

.availability-paint-seg__btn:not(.is-active) {
  opacity: 0.82;
}

/* Staff week grid: full height (page scrolls), not a short inner scroll box */
#staff-availability-calendar.availability-calendar {
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}

.availability-week-scroll-hint {
  display: none;
}

#staff-availability-calendar.availability-calendar.is-scrollable-x:not(.is-scroll-start):not(.is-scroll-end) {
  box-shadow:
    inset 14px 0 12px -12px rgba(15, 23, 42, 0.1),
    inset -14px 0 12px -12px rgba(15, 23, 42, 0.1),
    0 1px 0 rgba(15, 23, 42, 0.04);
}

#staff-availability-calendar.availability-calendar.is-scrollable-x.is-scroll-start:not(.is-scroll-end) {
  box-shadow:
    inset -14px 0 12px -12px rgba(15, 23, 42, 0.1),
    0 1px 0 rgba(15, 23, 42, 0.04);
}

#staff-availability-calendar.availability-calendar.is-scrollable-x.is-scroll-end:not(.is-scroll-start) {
  box-shadow:
    inset 14px 0 12px -12px rgba(15, 23, 42, 0.1),
    0 1px 0 rgba(15, 23, 42, 0.04);
}

@media (max-width: 720px) {
  #admin-availability-section.app-screen-availability {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .availability-home-panel {
    margin-top: 0.65rem;
    padding: 0.85rem 0.75rem 1rem;
    border-radius: 14px;
  }

  .availability-home-panel__head {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .availability-home-panel__collapse {
    display: none;
  }

  #staff-availability-panel-body.availability-home-panel__body,
  #staff-availability-panel-body:not(.hidden) {
    display: block !important;
  }

  .availability-nav-long {
    display: none;
  }

  .availability-nav-short {
    display: inline;
  }

  .availability-nav-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    width: 100%;
  }

  .availability-nav-group .btn-app-outline {
    min-height: 2.75rem;
    padding: 0.45rem 0.35rem;
    font-size: 0.82rem;
  }

  .availability-toolbar__nav {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .availability-toolbar__week-meta {
    width: 100%;
    justify-content: space-between;
  }

  .availability-period-label {
    flex: 1 1 auto;
    min-height: 2.5rem;
    font-size: 0.82rem;
    justify-content: center;
    text-align: center;
  }

  .availability-date-picker-btn {
    min-width: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  .availability-toolbar--staff {
    flex-direction: column;
    align-items: stretch;
  }

  .availability-override-toggle {
    min-height: 2.85rem;
  }

  .availability-controls-card {
    --avail-controls-label: 1fr;
  }

  .availability-controls-card__block {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    padding: 0.5rem 0.45rem;
  }

  .availability-controls-card__kicker {
    font-size: 0.78rem;
  }

  .availability-paint-seg__text-full {
    display: none;
  }

  .availability-paint-seg__text-short {
    display: inline;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.01em;
  }

  .availability-paint-seg__btn {
    flex-direction: column;
    gap: 0.2rem;
    min-height: 2.85rem;
    padding: 0.4rem 0.2rem;
  }

  .availability-paint-seg__dot {
    width: 0.65rem;
    height: 0.65rem;
  }

  .availability-calendar--staff .availability-week-scroll-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    margin: 0;
    padding: 0.5rem 0.55rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #475569;
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    min-width: max-content;
  }

  .availability-week-scroll-hint__icon {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #6366f1;
    line-height: 1.2;
  }

  .availability-grid-head--staff {
    min-height: 4.25rem;
    grid-template-columns: 2.75rem repeat(7, minmax(3rem, 1fr));
  }

  button.availability-day-head {
    min-height: 4rem;
    padding: 0.55rem 0.2rem 0.65rem;
    touch-action: pan-x pan-y;
  }

  button.availability-day-head::after {
    content: "";
    display: block;
    width: 1.75rem;
    height: 0.2rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #cbd5e1;
  }

  button.availability-day-head.is-selected::after {
    background: #818cf8;
  }

  .availability-day-head__wd {
    font-size: 0.62rem;
  }

  .availability-day-head__dm {
    font-size: 0.88rem;
  }

  .availability-day-head__mo {
    font-size: 0.58rem;
  }

  .availability-grid--staff {
    grid-template-columns: 2.75rem repeat(7, minmax(3rem, 1fr));
  }

  #staff-availability-calendar.availability-calendar .availability-cell.availability-block-row {
    touch-action: pan-x pan-y;
  }

  #staff-availability-calendar.availability-calendar {
    border-radius: 10px;
  }
}

.availability-calendar {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.availability-grid-head {
  display: grid;
  position: sticky;
  top: 0;
  z-index: 2;
  min-width: max-content;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}

.availability-grid-head--staff {
  grid-template-columns: 3.35rem repeat(7, minmax(5.75rem, 1fr));
}

.availability-time-head {
  border-right: 1px solid #e2e8f0;
  position: sticky;
  left: 0;
  z-index: 5;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 1px 0 0 rgba(226, 232, 240, 0.95);
}

.availability-day-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.4rem 0.2rem;
  text-align: center;
  font-weight: 700;
  color: #64748b;
  border: 0;
  border-right: 1px solid #eef2f7;
  background: transparent;
  cursor: default;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button.availability-day-head {
  cursor: pointer;
}

button.availability-day-head:hover {
  background: rgba(99, 102, 241, 0.06);
}

.availability-day-head__wd {
  display: block;
  font-size: 0.68rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.availability-day-head__date {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.22rem;
  line-height: 1.1;
}

.availability-day-head__dm {
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.availability-day-head__mo {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.availability-day-head.is-selected .availability-day-head__mo,
.availability-day-head.is-today .availability-day-head__mo {
  color: inherit;
  opacity: 0.88;
}

.availability-day-head--month-start {
  box-shadow: inset 2px 0 0 rgba(99, 102, 241, 0.28);
}

.availability-day-head.is-selected {
  background: rgba(99, 102, 241, 0.12);
  color: #3730a3;
  box-shadow: inset 0 -2px 0 #6366f1;
}

.availability-day-head:last-child {
  border-right: 0;
}

.availability-day-head.is-today,
.availability-admin-day-head.is-today {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

.availability-grid--staff {
  display: grid;
  grid-template-columns: 3.35rem repeat(7, minmax(5.75rem, 1fr));
  min-width: max-content;
}

/* Time gutter — match admin shifts calendar: compact type, bold on the hour */
.availability-time-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.35rem;
  padding: 0.18rem 0.35rem 0.18rem 0.2rem;
  font-size: 0.62rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #64748b);
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(90deg, #f8fafc 0%, #fbfdff 100%);
  position: sticky;
  left: 0;
  z-index: 3;
  box-shadow: 1px 0 0 rgba(226, 232, 240, 0.95);
}

.availability-time-label.is-hour {
  font-weight: 700;
  color: #334155;
}

.availability-time-label.is-quarter {
  opacity: 0.74;
  font-weight: 500;
}

.availability-cell {
  min-height: 1.35rem;
  border: 0;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Fixed venue blocks — row height follows compact time gutter, not slot duration. */
.availability-block-row[data-block-minutes="90"],
.availability-block-row[data-block-minutes="105"] {
  min-height: 0;
}

.availability-cell.availability-block-row {
  min-height: 0;
}

.availability-time-label.availability-block-row,
.availability-admin-time-cell.availability-block-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.2rem 0.35rem 0.2rem 0.45rem;
  font-family: inherit;
  min-height: 0;
  white-space: nowrap;
}

.availability-block-time-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.02rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.availability-block-time-start {
  display: block;
  font-size: 0.625rem;
  font-weight: 650;
  color: #334155;
}

.availability-block-time-end {
  display: block;
  font-size: 0.5625rem;
  font-weight: 500;
  color: #64748b;
  padding-left: 0.42rem;
}

.availability-admin-time-cell.availability-block-row {
  background: linear-gradient(90deg, #f8fafc 0%, #fbfdff 100%);
}

.availability-time-label.is-hour,
.availability-cell.is-hour,
.availability-admin-time-cell.is-hour,
.availability-admin-cell.is-hour {
  border-bottom-color: rgba(148, 163, 184, 0.8);
  border-bottom-style: solid;
}

.availability-time-label.is-quarter,
.availability-cell.is-quarter,
.availability-admin-time-cell.is-quarter,
.availability-admin-cell.is-quarter {
  border-bottom-style: dashed;
  border-bottom-color: rgba(203, 213, 225, 0.45);
}

.availability-cell:hover {
  background: #f8fafc;
}

.availability-cell.is-available,
.availability-mini-slot.is-available {
  background: #86efac;
}

.availability-cell.is-maybe,
.availability-mini-slot.is-maybe {
  background: #fdba74;
}

.availability-cell.is-blocked,
.availability-mini-slot.is-blocked {
  background: #fca5a5;
}

.availability-board {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.availability-admin-grid {
  border-radius: 12px;
  background: #fff;
  width: var(--availability-admin-width, max-content);
  min-width: 100%;
}

.availability-admin-grid-head,
.availability-admin-grid .availability-admin-row {
  display: grid;
  grid-template-columns: var(--availability-admin-columns, 4.5rem);
}

.availability-admin-grid-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}

.availability-admin-time-head,
.availability-admin-staff-head {
  padding: 0.55rem 0.45rem 0.55rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  border-right: 1px solid #eef2f7;
}

.availability-admin-time-head {
  text-align: left;
}

.availability-admin-staff-head {
  white-space: nowrap;
  overflow: visible;
  text-align: center;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

.availability-admin-grid .availability-admin-row {
  border-bottom: 0;
}

.availability-admin-time-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 1.35rem;
  padding: 0.18rem 0.35rem 0.18rem 0.45rem;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  border-right: 1px solid #e2e8f0;
  background: linear-gradient(90deg, #f8fafc 0%, #fbfdff 100%);
  font-variant-numeric: tabular-nums;
}

.availability-admin-time-cell.is-hour {
  font-weight: 700;
  color: #334155;
}

.availability-admin-time-cell.is-quarter {
  opacity: 0.74;
}

.availability-admin-cell {
  min-height: 1.35rem;
  padding: 0;
  border: 0;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  cursor: default;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 0.12s ease;
}

.availability-admin-cell.is-available {
  background: #86efac;
}

.availability-admin-cell.is-maybe {
  background: #fdba74;
}

.availability-admin-cell.is-blocked {
  background: #fca5a5;
}

.availability-admin-cell--readonly {
  pointer-events: none;
}

.availability-admin-cell:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: -2px;
}

.availability-admin-grid-head > :last-child {
  border-right: 0;
}

.availability-admin-grid .availability-admin-row > :last-child {
  border-right: 0;
}

.availability-admin-empty {
  padding: 0.8rem 1rem;
}

@media (max-width: 768px) {
  .availability-admin-grid {
    width: max-content;
    min-width: max-content;
  }

  .availability-admin-grid-head,
  .availability-admin-grid .availability-admin-row {
    grid-template-columns: var(--availability-admin-columns-mobile, 4.5rem);
  }

  .availability-admin-time-head,
  .availability-admin-staff-head {
    padding: 0.5rem 0.4rem;
    font-size: 0.7rem;
  }

  .availability-admin-time-cell {
    padding: 0.16rem 0.3rem 0.16rem 0.15rem;
    font-size: 0.62rem;
  }

  .availability-admin-cell {
    min-height: 1.1rem;
  }
}

.shifts-view-date-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.shifts-date-picker-btn {
  min-width: 2.35rem;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shifts-mode-toggle {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.15rem;
  background: #fff;
}

.shifts-nav-group {
  display: inline-flex;
  gap: 0;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

#main-app .shifts-nav-group .btn-app-outline {
  border: 0;
  border-right: 1px solid #dbeafe;
  border-radius: 0;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

#main-app .shifts-nav-group .btn-app-outline:last-child {
  border-right: 0;
}

#main-app .shifts-nav-group .btn-app-outline:hover {
  background: #eff6ff;
}

#main-app .shifts-mode-toggle .btn-app-outline {
  border: 0;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

#main-app .shifts-mode-toggle .btn-app-outline.is-active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

#main-app .shifts-layout-toggle {
  display: inline-flex;
  gap: 0;
  padding: 0.15rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

#main-app .shifts-layout-toggle .btn-app-outline {
  border: 0;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

#main-app .shifts-layout-toggle .btn-app-outline.is-active {
  background: #0f766e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.35);
}

.shifts-timeline-view-controls.hidden {
  display: none !important;
}

.shifts-period-label {
  font-weight: 700;
  color: #1e3a8a;
  padding: 0.2rem 0.35rem;
  min-width: 17rem;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
}

.shifts-calendar-head {
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.shifts-open-close-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: -0.25rem 0 0.7rem;
}

.shifts-open-close-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 0.76rem;
}

.shifts-open-close-chip strong {
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1d4ed8;
}

.shifts-open-close-chip--assignable {
  cursor: context-menu;
}

.shifts-open-close-chip.is-claimed {
  border-color: #86efac;
  background: #dcfce7;
  color: #14532d;
}

.shifts-open-close-chip.is-claimed strong {
  color: #15803d;
}

.shifts-open-close-chip.is-unassigned {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #7f1d1d;
}

.shifts-open-close-chip.is-unassigned strong {
  color: #b91c1c;
}

.opening-closing-assign-menu {
  position: fixed;
  z-index: 10060;
  min-width: 12rem;
  max-width: min(20rem, calc(100vw - 1rem));
  max-height: min(70vh, 22rem);
  overflow: auto;
  padding: 0.35rem 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow:
    0 10px 30px -12px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

.opening-closing-assign-menu__head {
  padding: 0.35rem 0.65rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
}

.opening-closing-assign-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  color: #0f172a;
  cursor: pointer;
}

.opening-closing-assign-menu__item:hover,
.opening-closing-assign-menu__item:focus-visible {
  background: #f8fafc;
  outline: none;
}

.opening-closing-assign-menu__item--clear {
  color: #64748b;
  font-size: 0.78rem;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 0.15rem;
  padding-bottom: 0.5rem;
}

.shift-context-menu {
  position: fixed;
  z-index: 10060;
  min-width: 11rem;
  padding: 0.35rem 0;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow:
    0 10px 30px -12px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

.shift-context-menu__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.75rem;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  color: #0f172a;
  cursor: pointer;
}

.shift-context-menu__item:hover,
.shift-context-menu__item:focus-visible {
  background: #f8fafc;
  outline: none;
}

.shift-context-menu__item--danger {
  color: #b91c1c;
}

.shift-context-menu__item--danger:hover,
.shift-context-menu__item--danger:focus-visible {
  background: #fef2f2;
}

.checklists-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

/* Fill main column height: stretch panel + scroll list inside */
#admin-checklists-section.app-screen-checklists {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 10.5rem);
}

#admin-checklists-section.app-screen-checklists > .panel-head,
#admin-checklists-section.app-screen-checklists > .admin-feedback {
  flex-shrink: 0;
}

#admin-checklists-section.app-screen-checklists .checklists-layout {
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

#main-app .app-screen-checklists .checklists-layout > div:first-child {
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  padding: 0.7rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

#main-app .app-screen-checklists .checklists-layout > div:first-child .header-with-action {
  flex-shrink: 0;
}

#main-app .app-screen-checklists #checklists-list {
  flex: 1;
  min-height: 8rem;
  overflow-y: auto;
  align-content: start;
}

#main-app .app-screen-checklists .notice-admin-list {
  gap: 0.45rem;
  margin-bottom: 0;
}

#main-app .app-screen-checklists .notice-admin-row {
  align-items: center;
  padding: 0.58rem 0.65rem;
  border-radius: 10px;
  border-color: #e2e8f0;
}

#main-app .app-screen-checklists .issue-card-head h4 {
  font-size: 0.92rem;
}

#main-app .app-screen-checklists .notice-admin-row__meta {
  margin-top: 0.2rem;
  font-size: 0.75rem;
}

#main-app .app-screen-checklists .checklist-begin-btn {
  min-width: 6.8rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
}

@media (max-width: 720px) {
  #main-app .app-screen-checklists .notice-admin-row {
    flex-direction: row;
    align-items: center;
  }

  #main-app .app-screen-checklists .checklist-begin-btn {
    min-width: 5.9rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.55rem;
  }
}

.checklist-step-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  max-height: 240px;
  object-fit: cover;
}

.checklist-steps-editor {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.checklist-step-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 0.24rem 0.42rem;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}

.checklist-step-row.is-dragging {
  opacity: 0.45;
}

.checklist-step-row__summary {
  display: flex;
  align-items: center;
  gap: 0.24rem;
  min-height: 1.45rem;
}

.checklist-step-drag-btn {
  cursor: grab;
  min-width: 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  line-height: 1;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checklist-step-drag-btn svg,
.checklist-step-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: inherit;
}

.checklist-step-row__title {
  margin: 0;
  font-weight: 600;
  font-size: 0.74rem;
  color: #0f172a;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checklist-step-row__actions {
  display: inline-flex;
  gap: 0.28rem;
}

.checklist-step-row__details {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.35rem;
  padding-top: 0.24rem;
  border-top: 1px solid #f1f5f9;
}

.checklist-step-row__fields {
  display: grid;
  gap: 0.42rem;
}

.checklist-step-row__image {
  display: grid;
  gap: 0.42rem;
}

.checklist-step-row__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.checklist-step-row__actions .btn-app-outline {
  min-width: 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border-radius: 5px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checklist-step-row__actions .btn-app-outline svg {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: inherit;
}

.checklist-step-edit-btn.is-open {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.checklist-step-optional-wrap {
  font-size: 0.74rem;
}

.checklist-step-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.checklist-step-upload-btn {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.checklist-step-preview-wrap {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.checklist-step-preview-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
}

@media (max-width: 980px) {
  .checklist-step-row__details {
    grid-template-columns: 1fr;
  }
}

body.checklist-runner-open {
  overflow: hidden;
}

#checklist-runner.checklist-runner--active {
  position: fixed;
  inset: 0;
  z-index: 2600;
  margin: 0;
  min-width: 0;
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  padding: 0.85rem 0.85rem 1rem;
  background:
    radial-gradient(140% 110% at 50% -20%, rgba(52, 211, 153, 0.18), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 0.55rem;
}

.checklist-runner-close-btn {
  justify-self: end;
}

#checklist-runner.checklist-runner--active #checklist-runner-title {
  margin: 0;
  font-size: 1.18rem;
}

#checklist-runner.checklist-runner--active #checklist-runner-step-image-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #0f172a;
}

#checklist-runner.checklist-runner--active .checklist-step-image {
  width: 100%;
  max-height: 56dvh;
  min-height: 32dvh;
  object-fit: contain;
  object-position: center;
  border: 0;
  border-radius: 0;
  background: #0f172a;
}

#checklist-runner.checklist-runner--active #checklist-runner-step-title {
  margin: 0;
  font-size: 1.02rem;
  color: #0f172a;
}

#checklist-runner.checklist-runner--active #checklist-runner-step-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.52;
  color: #1e293b;
  overflow-y: auto;
  padding-bottom: 0.2rem;
}

#checklist-runner.checklist-runner--active .issue-actions__buttons {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

#checklist-runner.checklist-runner--active #checklist-complete-btn {
  grid-column: 1 / -1;
}

@media (min-width: 840px) {
  /* One column when runner is closed: runner uses .hidden (display:none) but a fixed
     second track was still reserving ~320–380px and shrinking the list panel. */
  .checklists-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .checklists-layout:has(#checklist-runner:not(.hidden)) {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  }

  #admin-checklists-section.app-screen-checklists .checklists-layout {
    min-height: calc(100vh - 11rem);
  }
}

/* ---- Homepage major overhaul ---- */
#login-page .login-main {
  max-width: 500px;
}

#login-page .login-card {
  border-radius: 18px;
  padding: 1.95rem 1.8rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background:
    radial-gradient(120% 100% at 100% -20%, rgba(34, 197, 94, 0.14), transparent 50%),
    rgba(15, 23, 42, 0.74);
  box-shadow:
    0 26px 54px -30px rgba(15, 23, 42, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#main-app .app-card-home {
  --home-gutter: 1.2rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.95rem;
  padding: var(--home-gutter);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(130% 120% at 100% -30%, rgba(59, 130, 246, 0.07), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

#main-app .app-card-home .home-hero,
#main-app .app-card-home #home-notice-board,
#main-app .app-card-home .shift-home-panel {
  grid-column: 1 / -1;
  margin: 0;
}

#main-app .app-card-home .home-hero {
  border-radius: 18px;
  overflow: hidden;
  min-height: 9.25rem;
  padding: 1.5rem 1.35rem 1.35rem;
}

#main-app .app-card-home #home-notice-board {
  border-radius: 16px;
  padding: 0.95rem;
}

#main-app .app-card-home .shift-home-panel {
  border-radius: 16px;
  border: 1px solid #d9e4f3;
  padding: 1rem 1rem 0.95rem;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 10px 26px -28px rgba(15, 23, 42, 0.9);
}

#main-app .app-card-home .shift-home-panel-mine {
  grid-column: 1 / span 6;
}

#main-app .app-card-home .shift-home-panel-open {
  grid-column: 7 / -1;
}

#main-app .app-card-home .shift-home-panel:last-child {
  margin-bottom: 0;
}

#main-app .app-card-home .staff-next-shift-card {
  border-radius: 12px;
  padding: 0.8rem 0.85rem;
}

#main-app .app-card-home .staff-shift-card {
  border-radius: 12px;
  padding: 0.72rem 0.82rem;
}

@media (max-width: 980px) {
  #main-app .app-card-home .shift-home-panel-mine,
  #main-app .app-card-home .shift-home-panel-open {
    grid-column: 1 / -1;
  }
}

/* Home v2: high-impact visual refresh */
#main-app .app-card-home {
  --home-gap: 0.95rem;
  gap: var(--home-gap);
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background:
    radial-gradient(140% 80% at 0% 0%, rgba(16, 185, 129, 0.08), transparent 48%),
    radial-gradient(120% 80% at 100% 0%, rgba(59, 130, 246, 0.12), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow:
    0 32px 60px -44px rgba(15, 23, 42, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#main-app .app-card-home .home-hero {
  grid-column: 1 / span 8;
  border-radius: 20px;
  padding: 1.45rem 1.35rem 1.25rem;
  min-height: 10.5rem;
  box-shadow: 0 20px 46px -38px rgba(2, 132, 199, 0.85);
}

#main-app .app-card-home .home-hero__name {
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  letter-spacing: -0.05em;
}

#main-app .app-card-home #home-notice-board {
  grid-column: 1 / span 8;
  border-radius: 18px;
  padding: 0.95rem;
  border: 1px solid #dbe5f4;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 36px -34px rgba(30, 41, 59, 0.9);
}

#main-app .app-card-home .shift-home-panel {
  border-radius: 18px;
  border: 1px solid #d9e4f3;
  padding: 0.95rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#main-app .app-card-home .shift-home-panel-mine {
  grid-column: 9 / -1;
  grid-row: 1 / span 1;
  align-self: stretch;
}

#main-app .app-card-home .shift-home-panel-open {
  grid-column: 9 / -1;
  grid-row: 2 / span 1;
}

#main-app .app-card-home .staff-next-shift-card {
  border-radius: 12px;
  border: 1px solid #93c5fd;
  background: linear-gradient(160deg, #eff6ff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

#main-app .app-card-home .staff-shift-card {
  border-radius: 12px;
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

#main-app .home-notice-sticky-card {
  border-radius: 14px;
  border-width: 1px;
  box-shadow: 0 8px 20px -22px rgba(15, 23, 42, 0.85);
}

#main-app .home-notice-post {
  border-radius: 12px;
  border: 1px solid #dbe5f4;
}

@media (max-width: 980px) {
  #main-app .app-card-home .home-hero,
  #main-app .app-card-home #home-notice-board,
  #main-app .app-card-home .shift-home-panel-mine,
  #main-app .app-card-home .shift-home-panel-open {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/* Home v3 dramatic mode */
#main-app .app-card-home {
  gap: 0.9rem;
  padding: 0.95rem;
  border-radius: 24px;
  border: 1px solid rgba(30, 41, 59, 0.3);
  background:
    radial-gradient(120% 70% at -10% -20%, rgba(20, 184, 166, 0.22), transparent 50%),
    radial-gradient(120% 70% at 110% -15%, rgba(99, 102, 241, 0.28), transparent 52%),
    linear-gradient(160deg, #0f172a 0%, #111827 42%, #0b1220 100%);
  box-shadow:
    0 36px 70px -48px rgba(2, 6, 23, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#main-app .app-card-home .home-hero {
  position: relative;
  grid-column: 1 / span 8;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
    linear-gradient(125deg, rgba(15, 23, 42, 0.76), rgba(30, 41, 59, 0.58));
  box-shadow: 0 24px 52px -42px rgba(45, 212, 191, 0.95);
  overflow: hidden;
}

#main-app .app-card-home .home-hero__mesh {
  background:
    radial-gradient(ellipse 100% 85% at 0% -25%, rgba(45, 212, 191, 0.42), transparent 52%),
    radial-gradient(ellipse 85% 65% at 100% 20%, rgba(99, 102, 241, 0.5), transparent 55%),
    linear-gradient(140deg, #0b1220 0%, #111827 55%, #1f2937 100%);
}

#main-app .app-card-home .home-hero::after {
  content: "";
  position: absolute;
  inset: -25% -10%;
  background: conic-gradient(
    from 140deg,
    rgba(45, 212, 191, 0.28),
    rgba(129, 140, 248, 0.34),
    rgba(56, 189, 248, 0.22),
    rgba(45, 212, 191, 0.28)
  );
  filter: blur(38px);
  opacity: 0.72;
  animation: home-v3-glow-rotate 14s linear infinite;
  pointer-events: none;
}

#main-app .app-card-home .home-hero__content {
  position: relative;
  z-index: 1;
}

#main-app .app-card-home .home-hero__greeting {
  color: rgba(191, 219, 254, 0.9);
}

#main-app .app-card-home .home-hero__name {
  color: #f8fafc;
  text-shadow: 0 8px 28px rgba(15, 23, 42, 0.65);
}

#main-app .app-card-home #home-notice-board,
#main-app .app-card-home .shift-home-panel {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(30, 41, 59, 0.74));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

#main-app .app-card-home .shift-home-panel-mine {
  grid-column: 9 / -1;
  border-color: rgba(56, 189, 248, 0.42);
}

#main-app .app-card-home .shift-home-panel-open {
  grid-column: 9 / -1;
  border-color: rgba(129, 140, 248, 0.4);
}

#main-app .app-card-home .section-title,
#main-app .app-card-home .staff-shift-time,
#main-app .app-card-home .staff-next-shift-line,
#main-app .app-card-home .home-notice-post__title,
#main-app .app-card-home .home-notice-sticky-card__title {
  color: #e2e8f0;
}

#main-app .app-card-home .hint,
#main-app .app-card-home .home-notice-post__body,
#main-app .app-card-home .home-notice-sticky-card__body,
#main-app .app-card-home .staff-next-shift-countdown {
  color: #cbd5e1;
}

#main-app .app-card-home .staff-next-shift-card,
#main-app .app-card-home .staff-shift-card,
#main-app .app-card-home .home-notice-post,
#main-app .app-card-home .home-notice-sticky-card {
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(148, 163, 184, 0.24);
}

@keyframes home-v3-glow-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #main-app .app-card-home .home-hero::after {
    animation: none;
  }
}

/* Home rollback: keep classic UI + green animated hero accent */
#main-app .app-card-home {
  gap: 0.95rem;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 28px 56px -32px rgba(15, 23, 42, 0.2);
}

#main-app .app-card-home .home-hero {
  grid-column: 1 / -1;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: linear-gradient(155deg, #022c22 0%, #065f46 48%, #0f766e 100%);
  box-shadow: 0 14px 34px -24px rgba(6, 95, 70, 0.7);
}

#main-app .app-card-home .home-hero__mesh {
  background:
    radial-gradient(ellipse 95% 80% at 100% -20%, rgba(52, 211, 153, 0.6), transparent 55%),
    radial-gradient(ellipse 75% 60% at 0% 100%, rgba(16, 185, 129, 0.48), transparent 52%),
    linear-gradient(155deg, #022c22 0%, #065f46 48%, #0f766e 100%);
  animation: home-hero-mesh-pan 6s ease-in-out infinite alternate;
}

#main-app .app-card-home .home-hero::after {
  content: "";
  position: absolute;
  inset: -35% -12%;
  background: conic-gradient(
    from 160deg,
    rgba(16, 185, 129, 0.38),
    rgba(34, 197, 94, 0.62),
    rgba(45, 212, 191, 0.34),
    rgba(16, 185, 129, 0.38)
  );
  filter: blur(22px);
  opacity: 0.98;
  animation: home-hero-accent-sweep 4.8s ease-in-out infinite alternate;
  pointer-events: none;
}

#main-app .app-card-home .home-hero__content {
  position: relative;
  z-index: 1;
}

#main-app .app-card-home .home-hero__next-shift-eyebrow {
  color: rgba(167, 243, 208, 0.88);
}

#main-app .app-card-home .home-hero__next-shift-line {
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
}

#main-app .app-card-home .home-hero__next-shift-countdown {
  color: rgba(236, 253, 245, 0.92);
}

#main-app .app-card-home .home-hero__next-shift--empty .home-hero__next-shift-line {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(236, 253, 245, 0.94);
  text-shadow: none;
}

#main-app .app-card-home .home-hero__glow--a {
  opacity: 1;
  filter: blur(32px);
  background: #22c55e;
  animation: home-hero-orb-a 3.8s ease-in-out infinite alternate;
}

#main-app .app-card-home .home-hero__glow--b {
  opacity: 0.9;
  filter: blur(28px);
  background: #34d399;
  animation: home-hero-orb-b 4.2s ease-in-out infinite alternate;
}

#main-app .app-card-home #home-notice-board,
#main-app .app-card-home .shift-home-panel,
#main-app .app-card-home .staff-next-shift-card,
#main-app .app-card-home .staff-shift-card,
#main-app .app-card-home .home-notice-post,
#main-app .app-card-home .home-notice-sticky-card {
  background: #ffffff;
  border-color: #e2e8f0;
  color: inherit;
}

/* Restore sticky variant colours after rollback overrides */
#main-app .app-card-home .home-notice-sticky-card--warning {
  background: #fff1f2;
  border-color: #fb7185;
  border-left: 4px solid #e11d48;
  color: #7f1d1d;
  box-shadow: 0 8px 20px -18px rgba(225, 29, 72, 0.45);
}

#main-app .app-card-home .home-notice-sticky-card--warning .home-notice-sticky-card__title,
#main-app .app-card-home .home-notice-sticky-card--warning .home-notice-sticky-card__body {
  color: #7f1d1d;
}

#main-app .app-card-home .home-notice-sticky-card--reminder {
  background: #eef6ff;
  border-color: #60a5fa;
  border-left: 4px solid #2563eb;
  box-shadow: 0 8px 20px -18px rgba(37, 99, 235, 0.35);
}

#main-app .app-card-home .home-notice-sticky-card--info {
  background: #ecfdf3;
  border-color: #4ade80;
  border-left: 4px solid #16a34a;
  box-shadow: 0 8px 20px -18px rgba(22, 163, 74, 0.35);
}

#main-app .app-card-home .section-title,
#main-app .app-card-home .staff-shift-time,
#main-app .app-card-home .staff-next-shift-line,
#main-app .app-card-home .home-notice-post__title,
#main-app .app-card-home .home-notice-sticky-card__title {
  color: #0f172a;
}

#main-app .app-card-home .hint,
#main-app .app-card-home .home-notice-post__body,
#main-app .app-card-home .home-notice-sticky-card__body,
#main-app .app-card-home .staff-next-shift-countdown {
  color: #475569;
}

#main-app .app-card-home .shift-home-panel-mine,
#main-app .app-card-home .shift-home-panel-open {
  grid-column: 1 / -1;
  grid-row: auto;
}

@keyframes home-hero-accent-sweep {
  0% {
    transform: translate3d(-4%, -2%, 0) scale(1);
  }
  50% {
    transform: translate3d(2.5%, 1.4%, 0) scale(1.08);
  }
  100% {
    transform: translate3d(5%, 0%, 0) scale(1.05);
  }
}

@keyframes home-hero-mesh-pan {
  0% { transform: translate3d(-1.2%, 0, 0) scale(1.01); }
  100% { transform: translate3d(1.4%, 0.6%, 0) scale(1.03); }
}

@keyframes home-hero-orb-a {
  0% { transform: translate3d(-6px, -4px, 0) scale(1); }
  100% { transform: translate3d(8px, 6px, 0) scale(1.08); }
}

@keyframes home-hero-orb-b {
  0% { transform: translate3d(5px, 4px, 0) scale(1); }
  100% { transform: translate3d(-7px, -5px, 0) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  #main-app .app-card-home .home-hero__mesh,
  #main-app .app-card-home .home-hero__glow--a,
  #main-app .app-card-home .home-hero__glow--b,
  #main-app .app-card-home .home-hero::after {
    animation: none;
    opacity: 0.45;
  }
}

/* Final hero animation boost: visibly animated at a glance */
#main-app .app-card-home .home-hero {
  overflow: hidden;
}

#main-app .app-card-home .home-hero__mesh {
  animation: home-hero-mesh-pan-strong 2.8s ease-in-out infinite alternate;
}

#main-app .app-card-home .home-hero__mesh::after {
  content: "";
  position: absolute;
  inset: -12% -6%;
  background:
    linear-gradient(
      115deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.05) 36%,
      rgba(167, 243, 208, 0.38) 48%,
      rgba(255, 255, 255, 0.08) 62%,
      rgba(255, 255, 255, 0) 100%
    );
  mix-blend-mode: screen;
  pointer-events: none;
  animation: home-hero-shine-sweep 2.1s ease-in-out infinite;
}

#main-app .app-card-home .home-hero::after {
  animation: home-hero-accent-sweep-strong 2.6s ease-in-out infinite alternate;
  opacity: 1;
}

@keyframes home-hero-mesh-pan-strong {
  0% { transform: translate3d(-2.8%, -0.8%, 0) scale(1.02); }
  100% { transform: translate3d(2.8%, 1.1%, 0) scale(1.05); }
}

/* Full welcome panel (hero + noticeboard): slower shared mesh motion */
@keyframes home-welcome-panel-mesh {
  0% { transform: translate3d(-2.8%, -0.8%, 0) scale(1.02); }
  100% { transform: translate3d(2.8%, 1.1%, 0) scale(1.05); }
}

@keyframes home-hero-shine-sweep {
  0% { transform: translateX(-38%) skewX(-9deg); opacity: 0.2; }
  45% { opacity: 0.95; }
  100% { transform: translateX(38%) skewX(-9deg); opacity: 0.15; }
}

@keyframes home-hero-accent-sweep-strong {
  0% { transform: translate3d(-6%, -3%, 0) scale(1); }
  100% { transform: translate3d(6%, 3%, 0) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  #main-app .app-card-home .home-hero__mesh,
  #main-app .app-card-home .home-hero__mesh::after,
  #main-app .app-card-home .home-hero::after {
    animation: none;
  }

  #main-app .app-card-home .home-welcome-panel__mesh,
  #main-app .app-card-home .home-welcome-panel__mesh::after,
  #main-app .app-card-home .home-welcome-panel__accent {
    animation: none;
    opacity: 0.5;
  }
}

@media (max-width: 620px) {
  #main-app .app-card-home {
    --home-gutter: 0.75rem;
    gap: 0.75rem;
    border-radius: 16px;
  }

  #main-app .app-card-home .home-welcome-stack .home-welcome-panel {
    border-radius: 14px;
  }

  #main-app .app-card-home .home-welcome-stack .home-welcome-panel .home-hero {
    border-radius: 0;
  }

  #main-app .app-card-home .home-welcome-stack .home-welcome-panel #home-notice-board {
    border-radius: 0 0 13px 13px;
  }

  #main-app .app-card-home .home-welcome-panel__backdrop {
    border-radius: 14px 14px 0 0;
  }

  #main-app .app-card-home .shift-home-panel {
    border-radius: 14px;
  }

  #login-page .login-main {
    max-width: 100%;
  }

  #login-page .login-card {
    padding: 1.45rem 1.1rem;
    border-radius: 14px;
  }
}

.shifts-rooms-empty {
  padding: 1.25rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
}

.shifts-rooms-calendar {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.shifts-rooms-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem;
  align-items: flex-start;
}

.shifts-rooms-time-col {
  display: flex;
  flex-direction: column;
  flex: 0 0 4.5rem;
  width: 4.5rem;
  align-self: flex-start;
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 6;
  background: #fff;
  box-shadow: 1px 0 0 rgba(226, 232, 240, 0.95);
  transform: translateZ(0);
}

.shifts-rooms-day-title--time-gutter {
  flex-shrink: 0;
  text-align: right;
  padding-right: 0.35rem;
  padding-left: 0.25rem;
}

/* Date is shown on the calendar head and each room column; keep a blank band so the grid lines up */
.shifts-rooms-time-gutter--empty {
  font-size: 0;
  line-height: 0;
  min-height: 2.35rem;
  box-sizing: border-box;
}

/* No date label here — override day-title gradient so the spacer blends with the white scroll area */
.shifts-rooms-day-title.shifts-rooms-time-gutter--empty {
  background: #fff;
  background-image: none;
}

.shifts-rooms-game-head--time-gutter {
  flex-shrink: 0;
  border-right: 0;
  color: transparent;
  user-select: none;
}

.shifts-rooms-time-labels {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
}

/* top matches each grid tick. Do not center on the line (-50% bisects glyphs with the 1px rule). */
.shifts-rooms-time-label {
  position: absolute;
  left: 0;
  width: 100%;
  /* Sit just under the tick; a hair above “fully below” so it lines up with the room grid. */
  transform: translateY(1px);
  font-size: 0.62rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: 0.25rem;
  line-height: 1;
  pointer-events: none;
}

.shifts-rooms-time-label.is-hour {
  font-weight: 700;
  color: #334155;
}

.shifts-rooms-time-label.is-quarter {
  opacity: 0.74;
}

.shifts-rooms-days {
  display: flex;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}

.shifts-rooms-day {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfdff;
  overflow: hidden;
}

.shifts-rooms-day.is-today {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.shifts-rooms-day-title {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.5rem;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.shifts-rooms-game-strip {
  display: flex;
  gap: 0;
  min-height: 0;
}

.shifts-rooms-game-col {
  flex: 1 1 0;
  min-width: 6.5rem;
  border-right: 1px solid #eef2f7;
}

.shifts-rooms-game-col:last-child {
  border-right: 0;
}

.shifts-rooms-game-head {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  box-sizing: border-box;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  padding: 0.35rem 0.25rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Time gutter cells reuse day-title / game-head styles; higher specificity than the bases above so border-bottom is not re-applied by cascade order. */
.shifts-rooms-day-title.shifts-rooms-day-title--time-gutter,
.shifts-rooms-day-title.shifts-rooms-time-gutter--empty {
  border-bottom: none;
}

.shifts-rooms-game-head.shifts-rooms-game-head--time-gutter {
  border-bottom: none;
}

.shifts-rooms-game-body {
  position: relative;
  border-top: 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.75));
}

.shifts-rooms-hour-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(203, 213, 225, 0.55);
  pointer-events: none;
}

.shifts-rooms-hour-line.is-hour {
  border-top-color: rgba(148, 163, 184, 0.8);
}

.shifts-rooms-hour-line.is-quarter {
  border-top-style: dashed;
  border-top-color: rgba(203, 213, 225, 0.45);
  pointer-events: none;
}

.shifts-rooms-calendar--fit .shifts-rooms-game-strip {
  width: 100%;
}

.shifts-rooms-calendar--fit .shifts-rooms-game-col {
  min-width: 0;
}

.shifts-rooms-calendar--scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.shifts-rooms-split {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.shifts-rooms-rooms-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.shifts-rooms-calendar--scroll .shifts-rooms-time-col {
  position: static;
  flex: 0 0 3.25rem;
  width: 3.25rem;
  left: auto;
  transform: none;
  align-self: flex-start;
  box-shadow: none;
  border-right: 1px solid #e2e8f0;
}

.shifts-rooms-calendar--scroll .shifts-rooms-day-title--time-gutter {
  padding-left: 0.35rem;
  padding-right: 0.15rem;
}

.shifts-rooms-calendar--scroll .shifts-rooms-time-label {
  text-align: left;
  padding-left: 0.35rem;
  padding-right: 0.1rem;
}

.shifts-rooms-calendar--scroll .shifts-rooms-days {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
}

.shifts-rooms-calendar--scroll .shifts-rooms-day {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
  max-width: none;
  overflow: hidden;
}

.shifts-rooms-calendar--scroll .shifts-rooms-day-title {
  width: 100%;
  box-sizing: border-box;
}

.shifts-rooms-calendar--scroll .shifts-rooms-game-strip {
  display: flex;
  flex: 0 0 auto;
  width: max-content;
  min-width: 0;
}

.shifts-rooms-calendar--scroll .shifts-rooms-game-col {
  flex: 0 0 var(--room-lane-width, 10.25rem);
  width: var(--room-lane-width, 10.25rem);
  min-width: var(--room-lane-width, 10.25rem);
  max-width: var(--room-lane-width, 10.25rem);
}

.shifts-rooms-calendar--scroll .shifts-rooms-game-head {
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.15;
  min-height: 2.55rem;
}

.shifts-rooms-calendar--scroll .shifts-rooms-game-head--time-gutter {
  min-height: 2.55rem;
}

.shift-block--compact {
  padding: 0.32rem 0.38rem 0.34rem;
  font-size: 0.64rem;
  border-radius: 10px;
}

/* Rooms grid: time on its own row so start–end is not truncated; DGB is a purple pill on the name row */
.shifts-rooms-game-body .shift-block.shift-block--compact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.24rem 0.32rem 0.26rem;
  box-sizing: border-box;
  overflow: hidden;
  font-size: 0.64rem;
  line-height: 1.2;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-time-row {
  display: block;
  width: 100%;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-meta-row {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.56rem;
  font-weight: 600;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* API = solid left edge; manual = dashed (see schedule legend) */
.shifts-rooms-game-body .shift-block.shift-block--compact.shift-block--source-api {
  border-left-style: solid;
}

.shifts-rooms-game-body .shift-block.shift-block--compact.shift-block--source-manual {
  border-left-style: dashed;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-dgb {
  flex: 0 0 auto;
  margin-left: 0.08rem;
  font-size: 0.54rem;
  padding: 0.1rem 0.34rem;
  box-shadow: 0 0 0 1px rgba(126, 34, 206, 0.2);
}

.shifts-rooms-game-body .shift-block--compact .shift-block-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.22rem 0.26rem;
  min-width: 0;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-gm {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-party {
  flex: 0 0 auto;
  font-size: 0.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.88;
  white-space: nowrap;
}

/* Needs cover: one amber palette — fill, text, left stripe (solid API / dashed manual) */
.shifts-rooms-game-body .shift-block.shift-block--compact.is-open {
  background: #fffbeb !important;
  border-left-color: #d97706 !important;
  color: #92400e !important;
  box-shadow: 0 10px 20px -16px rgba(15, 23, 42, 0.32);
  padding-left: 0.4rem;
}

.shifts-rooms-game-body .shift-block--compact.is-open .shift-block-time-row,
.shifts-rooms-game-body .shift-block--compact.is-open .shift-block-meta-row,
.shifts-rooms-game-body .shift-block--compact.is-open .shift-block-duration {
  color: inherit;
  opacity: 1;
}

.shifts-rooms-game-body .shift-block--compact.is-open .shift-block-meta-row {
  opacity: 0.82;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-main--unclaimed {
  align-items: center;
  min-height: 1.28rem;
  overflow: visible;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-gm--needs-cover {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  align-self: center;
  min-height: 1.28rem;
  min-width: 0;
  overflow: visible;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  color: inherit;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-gm--needs-cover::before {
  content: "";
  flex: 0 0 auto;
  width: 0.36rem;
  height: 0.36rem;
  margin-right: 0.32rem;
  border-radius: 50%;
  background: #d97706;
}

.shifts-rooms-game-body .shift-block--compact .shift-block-claim {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 1.28rem;
  height: 1.28rem;
  margin-left: auto;
  padding: 0 0.42rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.88);
  color: #1e40af;
  -webkit-tap-highlight-color: transparent;
}

.shifts-rooms-game-body .shift-block--compact.is-open .shift-block-claim {
  border-color: rgba(217, 119, 6, 0.45);
  color: #b45309;
  background: rgba(255, 255, 255, 0.95);
}

.shifts-rooms-game-body .shift-block--compact .shift-block-claim:hover {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.shifts-rooms-game-body .shift-block--compact .shift-block-claim:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 1px;
}

.shift-block-sub {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
}

.cfg-games-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.cfg-game-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cfg-game-row .cfg-game-name {
  flex: 1 1 200px;
  min-width: 160px;
}

.shifts-day-view {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 0.55rem;
  height: calc(var(--day-grid-height) + 2px);
  max-height: 74vh;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 0.6rem;
}

.shifts-time-col {
  position: relative;
  height: var(--day-grid-height);
}

.shifts-time-label {
  position: absolute;
  left: 0;
  width: 100%;
  height: 56px;
  transform: translateY(-0.5rem);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.shifts-day-grid {
  position: relative;
  height: var(--day-grid-height);
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.75));
  overflow: hidden;
}

.shifts-day-grid-week {
  background:
    linear-gradient(90deg, rgba(203, 213, 225, 0.45) 1px, transparent 1px),
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.75));
  background-size: calc(100% / 7) 100%, 100% 100%;
}

.shifts-week-head {
  margin-left: 5.8rem;
  margin-bottom: 0.35rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
}

.shifts-week-head-day {
  font-size: 0.72rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
}

.shifts-week-head-day.is-today {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.shifts-hour-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed #cbd5e1;
  pointer-events: none;
}

.shifts-week-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.35);
  pointer-events: none;
}

.shift-block {
  position: absolute;
  border-left: 5px solid #22c55e;
  border-radius: 14px;
  padding: 0.5rem 0.55rem 0.55rem;
  font-size: 0.74rem;
  display: grid;
  gap: 0.18rem;
  box-shadow: 0 14px 28px -22px rgba(15, 23, 42, 0.5);
  overflow: hidden;
  backdrop-filter: blur(4px);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.shift-block.is-open {
  backdrop-filter: none;
}

.shift-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px -20px rgba(15, 23, 42, 0.42);
}

.shift-block--other {
  opacity: 0.92;
}

.shift-block--mine {
  outline: 2.5px solid #2563eb;
  outline-offset: 1px;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.2),
    0 16px 30px -18px rgba(37, 99, 235, 0.45);
  opacity: 1;
  filter: none;
}

.shift-block--mine:hover {
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.28),
    0 20px 34px -16px rgba(37, 99, 235, 0.5);
}

.shift-block-you-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 0.28rem;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  vertical-align: 0.05em;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.12);
}

.shift-block--compact.shift-block--mine {
  border-left-width: 6px;
  padding-right: 0.42rem;
}

.shift-block-owner .shift-block-you-badge {
  margin-right: 0.35rem;
}

.shift-block-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.shift-block-top-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
  max-width: 58%;
}

.shift-block-source {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.08rem 0.32rem;
  border-radius: 4px;
  line-height: 1.1;
}

.shift-block-source--api {
  background: rgba(59, 130, 246, 0.28);
  color: #1e3a8a;
}

.shift-block-source--manual {
  background: rgba(148, 163, 184, 0.38);
  color: #334155;
}

.shift-block-double-game-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  background: rgba(168, 85, 247, 0.26);
  border: 1px solid rgba(126, 34, 206, 0.45);
  color: #5b21b6;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.05;
  white-space: nowrap;
}

.shift-block strong {
  font-size: 0.8rem;
  line-height: 1.2;
}

.shift-block-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.shift-block-owner {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0.98;
}

.shift-block-meta {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 0.68rem;
  line-height: 1.25;
  opacity: 0.9;
}

.shift-block-notes {
  display: block;
  margin-top: 0.08rem;
  font-size: 0.68rem;
  line-height: 1.25;
  opacity: 0.96;
}

.shift-block-actions {
  margin-top: 0.28rem;
  display: flex;
  gap: 0.3rem;
}

.shift-block-action-btn {
  border: 0;
  border-radius: 6px;
  padding: 0.16rem 0.42rem;
  font-size: 0.62rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.1;
}

.shift-block-action-btn--claim {
  background: #1d4ed8;
  color: #fff;
}

.shift-block-action-btn--assign {
  background: rgba(55, 65, 81, 0.2);
  color: inherit;
}

/* Unclaimed = not covered yet: amber badge reads as “needs attention”, distinct from green slot + claimed pastel cards */
.shift-block-badge--unclaimed {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fbbf24;
  letter-spacing: 0.04em;
}

.shift-block.is-open .shift-block-owner,
.shift-block.is-open .shift-block-sub {
  font-weight: 700;
  color: #92400e;
}

/* Not green — claimed uses per-user hues on the card. */
.shift-block.is-claimed .shift-block-badge {
  color: #1e293b;
}

.shifts-day-empty {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.9);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.app-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.app-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid #e2e8f0;
}

.app-table th .th-sub-note {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

.app-table th.th-double-game-bonus,
.app-table td.td-double-game-bonus {
  width: 5.25rem;
  min-width: 5.25rem;
  max-width: 5.25rem;
}

.th-numeric,
.td-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.th-actions {
  width: 5rem;
  text-align: right;
}

.th-status {
  width: 5.5rem;
}

.app-table td {
  padding: 0.72rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.app-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.5);
}

.app-table tbody tr:hover td {
  background: rgba(236, 253, 245, 0.85);
}

.app-table tbody tr:last-child td {
  border-bottom: 0;
}

.cell-strong {
  font-weight: 600;
  color: #1e293b;
}

.cell-wrap {
  max-width: 14rem;
  white-space: pre-wrap;
  word-break: break-word;
  vertical-align: top;
}

.pay-approval-notes-block + .pay-approval-notes-block {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.pay-approval-notes-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.12rem;
}

.pay-approval-notes-body {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #0f172a;
}

.td-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: #475569;
}

.td-live {
  color: var(--success);
  font-weight: 700;
}

.hours-value {
  font-weight: 700;
  color: #14532d;
}

.hours-with-cost {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.18rem;
  line-height: 1.25;
}

.hours-cost {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.entry-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 6px;
}

.entry-chip--open {
  color: #047857;
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.entry-chip--done {
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.cell-actions {
  text-align: right;
  white-space: nowrap;
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

#main-app .btn-delete-entry {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
}

#main-app button.danger {
  margin-top: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: #dc2626;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

#main-app button.danger:hover {
  background: #b91c1c;
}

/* —— Login —— */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  background: var(--bg-deep);
  color: #f8fafc;
}

.login-page.hidden {
  display: none;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% -25%, rgba(34, 197, 94, 0.38), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 40%, rgba(52, 211, 153, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 45% at 0% 80%, rgba(21, 128, 61, 0.14), transparent 45%);
  pointer-events: none;
}

.login-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.login-main {
  position: relative;
  width: 100%;
  max-width: 440px;
  z-index: 1;
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(167, 243, 208, 0.95);
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.55);
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px -12px rgba(34, 197, 94, 0.35);
}

.login-logo-img {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(320px, 85vw);
  object-fit: contain;
}

.login-title {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1.05;
}

.login-tagline {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
  color: rgba(148, 163, 184, 0.95);
  line-height: 1.55;
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
}

.login-features {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.login-features li {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.login-card {
  background: rgba(30, 41, 59, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.85rem 1.65rem;
  box-shadow: var(--shadow);
}

.login-card-title {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}

.login-form .field {
  margin-bottom: 1rem;
}

.login-form .field label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.95);
}

.login-form input {
  width: 100%;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-form input::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

.login-form input:hover {
  border-color: rgba(148, 163, 184, 0.45);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.82rem 1rem;
  border-radius: 12px;
  margin-top: 0.5rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 32px -10px rgba(22, 163, 74, 0.55);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px -12px rgba(21, 128, 61, 0.5);
}

.btn-block {
  width: 100%;
  margin-top: 1.1rem;
}

.login-message:empty {
  display: none;
}

.login-message {
  font-size: 0.875rem;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin: 0 0 1rem;
}

.login-footnote {
  margin: 1.75rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.85);
  line-height: 1.55;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.login-deploy-stamp {
  margin: 0.8rem 0 0;
  text-align: center;
  font-size: 0.68rem;
  color: rgba(148, 163, 184, 0.72);
  letter-spacing: 0.02em;
}

/* —— UI polish pass —— */
/* Segmented nav + Sign out: outer chrome is .admin-header-nav-shell */

.nav-pill[aria-current="page"] {
  background: rgba(34, 197, 94, 0.24);
  border-color: rgba(74, 222, 128, 0.48);
  color: #f0fdf4;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
}

.panel-head {
  align-items: end;
}

#main-app .admin-header-extra .nav-pill {
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: transparent;
  padding: 0.48rem 0.75rem;
  min-height: 2.2rem;
}

#main-app .admin-header-extra .nav-pill:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

#main-app .admin-header-extra .nav-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

#main-app .admin-header-extra .nav-pill.is-active,
#main-app .admin-header-extra .nav-pill[aria-current="page"] {
  background: rgba(34, 197, 94, 0.22);
  box-shadow: none;
}

@media (max-width: 900px) {
  .admin-header-nav-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-header-extra {
    flex-wrap: wrap;
    justify-content: center;
  }

  #main-app .admin-header-extra .nav-pill {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
  }

  #main-app .admin-header-extra .nav-pill:last-child {
    border-bottom: 0;
  }
}

#main-app .card-lead {
  max-width: 68ch;
}

.cfg-section-card {
  position: relative;
  overflow: hidden;
}

.cfg-section-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(21, 128, 61, 0.85), rgba(52, 211, 153, 0.45), transparent);
}

.cfg-section-head {
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.cfg-section-head .hint {
  display: none;
}

.cfg-summary-line {
  display: none;
}

.users-directory-toolbar {
  padding: 0.75rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.app-screen-audit .app-form.app-form-grid {
  align-items: end;
}

.shifts-view-controls {
  gap: 0.8rem;
  padding: 0.75rem;
  border-color: #cfe9d6;
  background: linear-gradient(180deg, #fbfefc 0%, #f2fbf5 100%);
}

.shifts-controls-cluster {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  border: 1px solid #dbe7df;
  background: rgba(255, 255, 255, 0.8);
}

.shifts-controls-cluster--meta {
  flex-wrap: wrap;
}

.shifts-controls-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.shifts-period-label {
  min-width: 0;
}

.audit-feed-shell {
  margin-top: 0.9rem;
}

.audit-feed {
  display: grid;
  gap: 0.55rem;
}

.audit-feed-empty {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #64748b;
}

.audit-feed-empty p {
  margin: 0;
}

.audit-event-card {
  padding: 0.7rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 22px -24px rgba(15, 23, 42, 0.55);
}

.audit-event-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.audit-event-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.audit-event-category {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.audit-event-title {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.25;
  color: #0f172a;
}

.audit-event-time {
  white-space: nowrap;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
}

.audit-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.audit-event-pill {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
}

.audit-event-pill strong {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.login-main {
  width: 100%;
  max-width: 440px;
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-card {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
  .schedule-shell,
  .shifts-calendar,
  .shifts-controls-cluster,
  .shifts-controls-cluster--meta {
    min-width: 0;
  }

  .audit-event-top {
    flex-direction: column;
  }

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

  .shifts-controls-cluster {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .shifts-period-label {
    min-width: 0;
    width: 100%;
    font-size: 0.8rem;
    overflow-wrap: anywhere;
  }

  .schedule-subhead {
    align-items: flex-start;
  }

  /* On small screens, keep schedule lanes readable and allow horizontal pan. */
  .shifts-rooms-calendar {
    overflow-x: hidden;
  }

  .shifts-rooms-calendar .shifts-rooms-scroll,
  .shifts-rooms-calendar--scroll .shifts-rooms-rooms-scroll {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    width: 100%;
    gap: 0;
    padding: 0;
  }

  .shifts-rooms-calendar .shifts-rooms-scroll {
    padding: 0.5rem 0.5rem 0.5rem 0;
  }

  .shifts-rooms-calendar .shifts-rooms-days {
    flex: 0 0 auto;
    width: max-content;
    min-width: max-content;
  }

  .shifts-rooms-calendar .shifts-rooms-time-col {
    z-index: 30;
  }

  .shifts-rooms-calendar:not(.shifts-rooms-calendar--scroll) .shifts-rooms-day {
    flex: 0 0 auto;
    min-width: calc(var(--room-count, 1) * 6rem);
  }

  .shifts-rooms-calendar .shifts-rooms-day,
  .shifts-rooms-calendar .shifts-rooms-game-col,
  .shifts-rooms-calendar .shifts-rooms-game-body {
    position: relative;
    overflow: hidden;
  }

  .shifts-rooms-calendar:not(.shifts-rooms-calendar--scroll) .shifts-rooms-game-strip {
    min-width: max-content;
  }

  .shifts-rooms-calendar:not(.shifts-rooms-calendar--scroll) .shifts-rooms-game-col {
    min-width: 6rem;
  }

  .shifts-rooms-calendar--scroll {
    --room-lane-width: 6rem;
  }

  .shifts-rooms-calendar .shifts-rooms-game-head {
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.15;
    min-height: 2.55rem;
  }

  .shifts-rooms-calendar .shift-block {
    z-index: 1;
  }

  .shifts-rooms-calendar .shifts-rooms-game-body .shift-block.shift-block--compact {
    padding: 0.28rem 0.36rem 0.3rem;
  }

  .shifts-rooms-calendar .shifts-rooms-game-body .shift-block--compact .shift-block-gm--needs-cover,
  .shifts-rooms-calendar .shifts-rooms-game-body .shift-block--compact .shift-block-claim {
    min-height: 1.36rem;
    height: 1.36rem;
    font-size: 0.62rem;
  }

  /* Keep mobile header close to previous layout, just slightly lower. */
  .app-header-nav-row {
    min-width: 0;
    margin-top: 0.6rem;
  }

  .admin-header-nav-shell {
    margin-top: 0.35rem;
  }

  .app-main {
    margin-top: 0.45rem;
  }

  /* Keep notifications panel fully on-screen on phones. */
  .header-notifications {
    display: flex;
    justify-content: flex-end;
  }

  .notifications-menu {
    position: fixed;
    top: max(4rem, env(safe-area-inset-top, 0px) + 3.5rem);
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    max-width: none;
    transform: none;
  }
}

@media (max-width: 520px) {
  .schedule-stats {
    grid-template-columns: 1fr;
  }
}

/* —— Dialog —— */
.dialog-edit-entry {
  max-width: 440px;
  width: calc(100vw - 2rem);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
}

.dialog-edit-entry--user {
  max-width: 28rem;
}

.dialog-edit-entry--user .dialog-edit-entry-form {
  max-height: min(90vh, 44rem);
  overflow-y: auto;
}

.dialog-edit-entry-head {
  margin-bottom: 0.25rem;
}

.dialog-edit-entry-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dialog-form-section {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid #e8edf3;
}

.dialog-form-section:first-of-type {
  margin-top: 0.85rem;
  padding-top: 0;
  border-top: 0;
}

.dialog-form-section-title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dialog-form-section-label {
  margin: 0 0 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.dialog-edit-entry .hint--compact {
  margin-top: 0.25rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.edit-user-shift-calendar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.5rem;
}

.edit-user-shift-calendar-status {
  margin: 0;
  flex: 1 1 10rem;
  font-size: 0.8rem;
}

.btn-app-outline--sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.dialog-edit-entry::backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.dialog-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-deep);
}

.dialog-edit-entry-form {
  padding: 1.5rem 1.55rem 1.6rem;
  margin: 0;
}

.dialog-edit-entry-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dialog-edit-entry-user {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

#confirm-claim-shift-dialog #confirm-claim-shift-date,
#confirm-claim-shift-dialog #confirm-claim-shift-time.confirm-claim-shift-time-line {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: inherit;
}

#confirm-claim-shift-dialog #confirm-claim-shift-date {
  margin-top: 0.65rem;
}

#confirm-claim-shift-dialog #confirm-claim-shift-time.confirm-claim-shift-time-line {
  margin-bottom: 0.75rem;
}

.dialog-edit-entry-error:empty {
  display: none;
}

.dialog-edit-entry-error {
  font-size: 0.85rem;
  color: var(--danger);
  margin: 0.5rem 0 0;
}

.dialog-edit-entry-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.35rem;
}

.dialog-edit-entry-actions--split {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.dialog-edit-entry-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dialog-edit-entry-actions--split .dialog-edit-entry-actions-primary {
  margin-left: auto;
}

.dialog-edit-entry .dialog-edit-entry-actions button.danger {
  margin-top: 0;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: #dc2626;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dialog-edit-entry .dialog-edit-entry-actions button.danger:hover {
  background: #b91c1c;
}

.dialog-edit-entry .field {
  margin-bottom: 0.35rem;
}

.dialog-edit-entry .hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}

#login-captcha-container {
  min-height: 65px;
}

.panel-attention-flash {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
  border-radius: 10px;
}

.edit-user-sessions-list {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.4rem;
  max-height: 9.5rem;
  overflow: auto;
}

.edit-user-session-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
  color: #334155;
}

.profile-shift-calendar-wrap {
  margin: 0.75rem 0 0;
}

.profile-shift-calendar-disabled {
  margin: 0.35rem 0 0;
}

.shift-calendar-url-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.shift-calendar-url-row .app-input {
  flex: 1 1 auto;
  min-width: 0;
}

.opening-closing-reassign-body {
  margin: 0.65rem 0 0;
  max-width: 26rem;
  line-height: 1.5;
}

/* —— Audit table —— */
.audit-table-wrap {
  overflow-x: auto;
}

#main-app .app-table-audit .audit-changes-cell {
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: min(40rem, 94vw);
  word-break: break-word;
  color: #334155;
  vertical-align: top;
}

#main-app .audit-changes-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

#main-app .audit-event-card .audit-changes-cell {
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 100%;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #334155;
}

#main-app .audit-change-block {
  padding: 0.28rem 0.45rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-width: 0;
}

#main-app .audit-delete-notice {
  padding: 0.42rem 0.55rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}

#main-app .audit-delete-title {
  margin: 0 0 0.22rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #92400e;
}

#main-app .audit-delete-line {
  margin: 0;
  font-size: 0.74rem;
  color: #334155;
  line-height: 1.3;
}

#main-app .audit-detail-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

#main-app .audit-detail-summary-line.audit-delete-notice {
  padding: 0.38rem 0.5rem;
}

#main-app .audit-extra-details {
  margin: 0;
  padding: 0.38rem 0.55rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(5rem, 10rem) minmax(0, 1fr);
  gap: 0.28rem 0.65rem;
  font-size: 0.74rem;
  line-height: 1.35;
  align-items: start;
}

#main-app .audit-extra-details dt {
  margin: 0;
  font-weight: 600;
  color: #475569;
}

#main-app .audit-extra-details dd {
  margin: 0;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #334155;
}

#main-app .audit-change-row {
  display: grid;
  grid-template-columns: minmax(5rem, 9rem) minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "label before arrow after";
  gap: 0.35rem 0.55rem;
  align-items: center;
  min-width: 0;
}

#main-app .audit-change-row > .audit-change-title {
  grid-area: label;
}

#main-app .audit-change-row > .audit-value--before {
  grid-area: before;
  min-width: 0;
}

#main-app .audit-change-row > .audit-gap {
  grid-area: arrow;
  justify-self: center;
}

#main-app .audit-change-row > .audit-value--after {
  grid-area: after;
  min-width: 0;
}

#main-app .audit-change-row--single {
  grid-template-columns: minmax(5rem, 9rem) minmax(0, 1fr);
  grid-template-areas: "label before";
}

#main-app .audit-change-row--single > .audit-value--before {
  grid-area: before;
}

#main-app .audit-change-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

#main-app .audit-value {
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  color: #1e293b;
  line-height: 1.35;
  display: block;
}

#main-app .audit-value--before,
#main-app .audit-value--after {
  overflow-wrap: anywhere;
}

#main-app .audit-gap {
  flex-shrink: 0;
  color: var(--text-soft);
  font-weight: 600;
  padding: 0;
  font-size: 0.72rem;
  text-align: center;
  white-space: nowrap;
}

.cfg-role-builder {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.cfg-role-list-wrap,
.cfg-role-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cfg-role-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cfg-role-permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}

.cfg-permission-group {
  padding: 0.8rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.cfg-permission-group-head {
  margin-bottom: 0.65rem;
}

.cfg-permission-group-head h5 {
  margin: 0 0 0.2rem;
  font-size: 0.86rem;
  color: #0f172a;
}

.cfg-permission-group-head .hint {
  margin: 0;
  font-size: 0.74rem;
}

.cfg-permission-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.8rem;
}

#main-app .cfg-permission-options .checkbox-row {
  display: inline-flex;
  align-items: flex-start;
  margin: 0;
}

#main-app .cfg-permission-options .checkbox-row input {
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  padding: 0;
  flex: 0 0 auto;
  min-width: 1rem;
  max-width: 1rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  appearance: auto;
  -webkit-appearance: checkbox;
}

#main-app .cfg-permission-options .checkbox-row span {
  display: inline;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .cfg-permission-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .audit-event-top {
    align-items: flex-start;
  }

  .audit-event-heading {
    align-items: flex-start;
  }

  #main-app .audit-change-row:not(.audit-change-row--single) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "before"
      "arrow"
      "after";
    align-items: start;
  }

  #main-app .audit-change-row:not(.audit-change-row--single) > .audit-gap {
    justify-self: start;
  }

  #main-app .audit-change-row--single {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "before";
    align-items: start;
  }

  #main-app .audit-extra-details {
    grid-template-columns: 1fr;
    gap: 0.12rem 0;
  }

  #main-app .audit-extra-details dt {
    margin-top: 0.4rem;
  }

  #main-app .audit-extra-details dt:first-of-type {
    margin-top: 0;
  }

  .cfg-role-builder {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .clock-actions {
    flex-direction: column;
  }

  #main-app .clock-actions .btn-clock {
    width: 100%;
  }

  .report-controls {
    gap: 0.65rem;
  }

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

/* Pay requests & approvals */
.nav-pill--badged {
  position: relative;
  padding-right: 1.35rem;
}

.nav-pill-badge {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
  color: #fff;
  background: #ef4444;
  box-shadow: 0 0 0 2px var(--bg-card);
}

.pay-request-form {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: none;
}

.pay-request-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pay-request-range-grid {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .pay-request-range-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.pay-request-range-hint {
  margin: 0.5rem 0 0;
}

.pay-request-oc-copy {
  margin: 0;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(52, 211, 153, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.28);
  line-height: 1.45;
}

/* —— Requests screen: full-width polished layout —— */
#admin-pay-requests-section .pay-request-panel {
  margin-top: 0.5rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

#admin-pay-requests-section .pay-request-panel-head {
  margin-bottom: 0.15rem;
}

#admin-pay-requests-section .pay-request-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

#admin-pay-requests-section .pay-request-panel-lead {
  margin: 0;
  max-width: 52rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

#admin-pay-requests-section .pay-request-feedback {
  margin: 0.85rem 0 0;
}

#admin-pay-requests-section .pay-request-layout {
  display: grid;
  gap: 1.35rem;
  margin-top: 1.1rem;
  align-items: start;
}

@media (min-width: 960px) {
  #admin-pay-requests-section .pay-request-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.5rem;
  }
}

#admin-pay-requests-section .pay-request-form-shell {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(165deg, #ffffff 0%, #f6fdf9 42%, #f8fafc 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 20px 48px -32px rgba(15, 23, 42, 0.22);
  padding: 1.4rem 1.5rem 1.55rem 1.65rem;
  overflow: hidden;
}

#admin-pay-requests-section .pay-request-form-shell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #059669, #34d399, #6ee7b7);
  border-radius: 18px 0 0 18px;
  pointer-events: none;
}

#admin-pay-requests-section .pay-request-form-shell .pay-request-form {
  position: relative;
  z-index: 1;
}

#admin-pay-requests-section .pay-request-form .app-input,
#admin-pay-requests-section .pay-request-form .app-select {
  width: 100%;
  min-height: 2.7rem;
  border-radius: 11px;
}

#admin-pay-requests-section .pay-request-form textarea.app-input {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.45;
}

#admin-pay-requests-section .pay-request-submit {
  margin-top: 0.35rem;
  justify-self: start;
  min-width: min(100%, 20rem);
  padding: 0.72rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 12px;
  box-shadow: 0 10px 28px -14px rgba(22, 163, 74, 0.65);
}

@media (max-width: 540px) {
  #admin-pay-requests-section .pay-request-submit {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }
}

#admin-pay-requests-section .pay-request-mine-wrap {
  margin: 0;
  padding: 1.35rem 1.4rem 1.3rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(16, 185, 129, 0.06), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 40px -30px rgba(15, 23, 42, 0.28);
}

#admin-pay-requests-section .pay-request-mine-heading {
  margin: 0 0 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #475569;
}

#admin-pay-requests-section .pay-request-mine-toolbar {
  margin: 0 0 0.85rem;
}

#admin-pay-requests-section .pay-request-mine-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

#admin-pay-requests-section .pay-request-mine-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

#admin-pay-requests-section .pay-request-mine-filter:hover {
  border-color: rgba(16, 185, 129, 0.45);
  color: #0f172a;
}

#admin-pay-requests-section .pay-request-mine-filter.is-active {
  border-color: rgba(5, 150, 105, 0.55);
  background: linear-gradient(180deg, rgba(209, 250, 229, 0.95), rgba(236, 253, 245, 0.98));
  color: #065f46;
  box-shadow: 0 6px 18px -12px rgba(5, 150, 105, 0.45);
}

#admin-pay-requests-section .pay-request-mine-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

#admin-pay-requests-section .pay-request-mine-range {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

#admin-pay-requests-section .pay-request-mine-pager {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

#admin-pay-requests-section .pay-request-mine-page-btn {
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
  min-height: 2.25rem;
}

.pay-request-mine-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#admin-pay-requests-section .pay-request-mine-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: min(26rem, 56vh);
  overflow-y: auto;
  padding-right: 0.35rem;
  scrollbar-gutter: stable;
}

#admin-pay-requests-section .pay-request-mine-item {
  --pay-mine-accent: #64748b;
  margin: 0;
  padding: 0.95rem 1.05rem 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(165deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 10px 26px -20px rgba(15, 23, 42, 0.22);
  border-left: 4px solid var(--pay-mine-accent);
  list-style: none;
}

#admin-pay-requests-section .pay-request-mine-item--opening {
  --pay-mine-accent: #0d9488;
}

#admin-pay-requests-section .pay-request-mine-item--closing {
  --pay-mine-accent: #059669;
}

#admin-pay-requests-section .pay-request-mine-item--training {
  --pay-mine-accent: #2563eb;
}

#admin-pay-requests-section .pay-request-mine-item--overtime {
  --pay-mine-accent: #d97706;
}

#admin-pay-requests-section .pay-request-mine-item--other {
  --pay-mine-accent: #64748b;
}

#admin-pay-requests-section .pay-request-mine-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

#admin-pay-requests-section .pay-request-mine-item__type {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f172a;
}

#admin-pay-requests-section .pay-request-mine-item__status {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

#admin-pay-requests-section .pay-request-mine-item__status.is-pending {
  color: #a16207;
  background: rgba(251, 191, 36, 0.24);
  border-color: rgba(217, 119, 6, 0.38);
}

#admin-pay-requests-section .pay-request-mine-item__status.is-approved {
  color: #047857;
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(5, 150, 105, 0.38);
}

#admin-pay-requests-section .pay-request-mine-item__status.is-rejected {
  color: #b91c1c;
  background: rgba(254, 202, 202, 0.4);
  border-color: rgba(248, 113, 113, 0.48);
}

#admin-pay-requests-section .pay-request-mine-item__detail {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

#admin-pay-requests-section .pay-request-mine-item__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin: 0.55rem 0 0;
  padding: 0.5rem 0 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

#admin-pay-requests-section .pay-request-mine-item__date-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #475569;
}

#admin-pay-requests-section .pay-request-mine-item__date-row time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

#admin-pay-requests-section .pay-request-mine-item__dates .pay-request-mine-item__date-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.58rem;
  color: #94a3b8;
}

#admin-pay-requests-section .pay-request-mine-item__meta {
  margin: 0.55rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.74rem;
  color: #64748b;
}

#admin-pay-requests-section .pay-request-mine-item__meta-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.58rem;
  margin-right: 0.4rem;
  color: #94a3b8;
}

#admin-pay-requests-section .pay-request-mine-item__rejection {
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 0.45rem;
  background: rgba(254, 242, 242, 0.92);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

#admin-pay-requests-section .pay-request-mine-item__rejection-label {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.58rem;
  color: #b91c1c;
  margin-bottom: 0.35rem;
}

#admin-pay-requests-section .pay-request-mine-item__rejection-text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #450a0a;
  white-space: pre-wrap;
  word-break: break-word;
}

#admin-pay-requests-section .pay-request-mine-item__rejection-missing {
  color: #94a3b8;
  font-style: italic;
}

#admin-pay-requests-section .pay-request-mine-item--empty {
  text-align: center;
  padding: 1.4rem 1.1rem;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-left-width: 1px;
  border-left-style: dashed;
  background: rgba(248, 250, 252, 0.95);
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--text-muted);
  box-shadow: none;
}

.subsection-title {
  margin: 1rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.section-title--spaced {
  margin-top: 1.75rem;
}

.events-oc-strip {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--border);
}

.events-oc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  font-size: 0.92rem;
}

.events-oc-row + .events-oc-row {
  margin-top: 0.35rem;
}

.events-oc-label {
  font-weight: 600;
  color: var(--text-muted);
}

.events-oc-value {
  font-weight: 600;
  color: var(--text);
}

/* —— Home dashboard (staff / home tab) —— */
#main-app .app-card-home {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 28px 56px -32px rgba(15, 23, 42, 0.2);
}

.home-hero {
  position: relative;
  padding: 1.65rem 1.5rem 1.5rem;
  color: #ecfdf5;
  isolation: isolate;
  min-height: 8.5rem;
}

.home-hero__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 80% at 100% -20%, rgba(52, 211, 153, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 60% at 0% 100%, rgba(16, 185, 129, 0.35), transparent 50%),
    linear-gradient(155deg, #022c22 0%, #064e3b 42%, #0f766e 100%);
  z-index: 0;
}

.home-hero__mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E");
  background-size: 28px 28px;
  opacity: 0.5;
  mix-blend-mode: overlay;
}

.home-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.home-hero__glow--a {
  width: 140px;
  height: 140px;
  top: -40px;
  right: 10%;
  background: #34d399;
}

.home-hero__glow--b {
  width: 100px;
  height: 100px;
  bottom: -30px;
  left: 5%;
  background: #2dd4bf;
}

.home-hero__content {
  position: relative;
  z-index: 1;
}

.home-hero__greeting {
  margin: 0 0 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(236, 253, 245, 0.82);
  text-transform: none;
}

.home-hero__name {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.15);
}

.home-hero__next-shift {
  margin-top: 0.7rem;
  max-width: 38rem;
}

.home-hero__next-shift--empty .home-hero__next-shift-line {
  font-weight: 600;
  opacity: 0.95;
}

.home-hero__next-shift-eyebrow {
  margin: 0 0 0.18rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.78);
}

.home-hero__next-shift-line {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  text-transform: none;
}

.home-hero__next-shift-countdown {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(236, 253, 245, 0.88);
}

.home-hero__meta {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(167, 243, 208, 0.88);
  letter-spacing: 0.02em;
}

.home-hero__meta.hidden {
  display: none;
}

.home-hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(236, 253, 245, 0.92);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.home-hero__pill-icon {
  display: flex;
  color: rgba(167, 243, 208, 0.95);
  opacity: 0.95;
}

.home-insight {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  margin: 0;
  background: linear-gradient(105deg, #ecfdf5 0%, #f8fafc 55%, #f1f5f9 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.home-insight__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  color: #047857;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.home-insight__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #334155;
}

.home-insight__text strong {
  color: #0f172a;
  font-weight: 700;
}

#main-app .app-card-home .shift-home-panel {
  margin: 1rem 1.25rem 0;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 1rem 1.05rem;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

#main-app .app-card-home > .home-open-closeouts .shift-home-panel,
#main-app .app-card-home > .home-shifts-row .shift-home-panel,
#main-app .app-card-home .home-welcome-stack {
  margin-left: 0;
  margin-right: 0;
}

#main-app .app-card-home .shift-home-panel:last-child {
  margin-bottom: 1.25rem;
}

#main-app .app-card-home .shift-home-panel-pay {
  border-left: 4px solid #10b981;
}

#main-app .app-card-home .shift-home-panel-mine {
  border-left: 4px solid #3b82f6;
}

#main-app .app-card-home .shift-home-panel-open {
  border-left: 4px solid #8b5cf6;
}

@media (max-width: 520px) {
  .home-hero {
    padding: 1.35rem 1.15rem 1.25rem;
    min-height: 0;
  }

  .home-hero__pills {
    gap: 0.35rem;
  }

  .home-hero__pill {
    font-size: 0.62rem;
    padding: 0.3rem 0.5rem;
  }

  .home-insight {
    flex-direction: column;
    padding: 0.9rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__glow {
    filter: blur(32px);
    opacity: 0.35;
  }
}

/* —— Notice board (home + admin) —— */
.nav-pill-split {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.nav-pill-split .nav-pill-split__main {
  border-radius: 999px 0 0 999px;
  padding-right: 0.65rem;
}

.nav-pill-split .nav-pill-split__caret {
  border-radius: 0 999px 999px 0;
  padding-left: 0.35rem;
  padding-right: 0.55rem;
  min-width: 2rem;
  font-size: 0.75rem;
  line-height: 1;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 11rem;
  padding: 0.35rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 30px -12px rgba(15, 23, 42, 0.35);
  z-index: 40;
}

/* Allow config dropdown to extend beyond header shell */
#main-app .admin-header-nav-shell {
  overflow: visible;
}

.nav-dropdown__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: #0f172a;
  cursor: pointer;
}

.nav-dropdown__item:hover {
  background: #f1f5f9;
}

.home-notice-board {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1rem 0.9rem;
  border-radius: 18px;
  border: 1px solid #d7e3f5;
  background:
    radial-gradient(120% 120% at 8% -12%, rgba(59, 130, 246, 0.12), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 14px 36px -30px rgba(15, 23, 42, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-notice-board__head {
  margin-bottom: 0.75rem;
}

.home-notice-board__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.home-notice-sticky {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.95rem;
}

.home-notice-sticky-card {
  border-radius: 14px;
  padding: 0.78rem 0.9rem 0.82rem;
  border: 1px solid #dbe6f4;
  box-shadow: 0 10px 24px -26px rgba(15, 23, 42, 0.85);
}

.home-notice-sticky-card__title {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.home-notice-sticky-card__body {
  font-size: 0.84rem;
  line-height: 1.5;
  color: #334155;
}

.home-notice-sticky-card__body .ql-editor {
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}

.home-notice-sticky-card--warning {
  background: linear-gradient(180deg, #fff5f5 0%, #fee2e2 100%);
  border-color: #fda4af;
  color: #7f1d1d;
}

.home-notice-sticky-card--warning .home-notice-sticky-card__title {
  color: #991b1b;
}

.home-notice-sticky-card--warning .home-notice-sticky-card__body {
  color: #7f1d1d;
}

.home-notice-sticky-card--reminder {
  background: linear-gradient(180deg, #f0f7ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
}

.home-notice-sticky-card--info {
  background: linear-gradient(180deg, #f3fff7 0%, #dcfce7 100%);
  border-color: #86efac;
}

@media (max-width: 960px) {
  .home-notice-sticky {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-notice-sticky {
    grid-template-columns: 1fr;
  }
}

.home-notice-posts__heading {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #475569;
}

.home-notice-post {
  padding: 0.8rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px -28px rgba(15, 23, 42, 0.8);
  margin-bottom: 0.5rem;
}

.home-notice-post:first-of-type {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.8rem;
}

.home-notice-post__title {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
}

.home-notice-post__meta {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: #64748b;
}

.home-notice-post__body {
  font-size: 0.87rem;
  line-height: 1.52;
  color: #334155;
}

.home-notice-post__body .ql-editor {
  padding: 0;
}

.notice-admin-toolbar {
  margin-bottom: 1rem;
}

.notice-admin-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.notice-admin-actions {
  margin: 0.5rem 0 0.75rem;
}

.notice-admin-actions__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notice-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.notice-admin-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.notice-admin-row__main {
  flex: 1;
  min-width: 0;
}

.issue-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.issue-card-head h4 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.issue-description {
  margin: 0.35rem 0 0;
  color: #0f172a;
  line-height: 1.45;
}

.notice-admin-row__badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: 0.5rem;
  align-items: center;
}

.notice-badge {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.notice-badge--muted {
  background: #f1f5f9;
  color: #64748b;
}

.notice-badge--owner {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #ddd6fe;
}

.notice-badge.notice-badge--total {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  color: #14532d;
  border-color: #6ee7b7;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.notice-admin-row__meta {
  margin: 0.32rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.issue-actions {
  min-width: 15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.issue-ticket-row {
  flex-direction: column;
  align-items: stretch;
}

.issue-ticket-row .issue-actions {
  width: 100%;
  min-width: 0;
}

.issue-actions__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
}

.issue-actions__label {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 600;
}

.issue-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.issue-actions__buttons .btn-app-outline {
  min-height: 2rem;
  border-radius: 9px;
  border-color: #cbd5e1;
  background: #fff;
}

.issue-actions.issue-actions--locked {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  border-style: dashed;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.issue-resolution-note {
  min-height: 4.5rem;
}

.issue-work-notes {
  min-height: 4.5rem;
}

.issue-work-log {
  margin-top: 0.5rem;
  border-left: 2px solid #e2e8f0;
  padding-left: 0.55rem;
}

.issue-work-log__meta {
  color: #94a3b8;
}

.issue-ticket-row {
  border-left: 4px solid #cbd5e1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.issue-ticket-row:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.issue-ticket-row.issue-status-open {
  border-left-color: #f59e0b;
}

.issue-ticket-row.issue-status-in_progress {
  border-left-color: #3b82f6;
}

.issue-ticket-row.issue-status-closed {
  border-left-color: #10b981;
  background: #fcfffd;
}

.issue-ticket-row.issue-priority-high .issue-card-head h4 {
  color: #991b1b;
}

.issue-input-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
}

.issue-input-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.issue-input-modal__card {
  position: relative;
  width: min(30rem, calc(100vw - 2rem));
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.28);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.issue-input-modal__title {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.issue-input-modal__card--confirm {
  max-width: 32rem;
}

.issue-input-modal__message {
  margin: 0.1rem 0 0.2rem;
  color: #334155;
  line-height: 1.45;
}

.issue-input-modal__label {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 600;
}

.issue-input-modal__control {
  width: 100%;
}

.issue-input-modal__actions {
  margin-top: 0.15rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

@media (max-width: 880px) {
  .notice-admin-row {
    flex-direction: column;
  }

  .issue-actions {
    min-width: 100%;
    width: 100%;
  }
}

.notice-editor-panel {
  margin-top: 0.5rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fafafa;
}

.notice-quill-editor {
  min-height: 180px;
  background: #fff;
  border-radius: 10px;
}

.notice-editor-panel .ql-toolbar.ql-snow {
  border-radius: 10px 10px 0 0;
  border-color: #e2e8f0;
}

.notice-editor-panel .ql-container.ql-snow {
  border-radius: 0 0 10px 10px;
  border-color: #e2e8f0;
  font-size: 0.92rem;
}

.notice-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.notice-delete-btn {
  margin-left: auto;
  color: #b91c1c;
  border-color: #fecaca;
}

.app-screen-notices {
  max-width: 900px;
}

/* Final home overrides (must stay at end) */
#login-page .login-main {
  max-width: 500px;
}

#login-page .login-card {
  border-radius: 18px;
  padding: 1.95rem 1.8rem;
}

#main-app .app-card-home {
  --home-gutter: 1.2rem;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.95rem;
  padding: var(--home-gutter);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 55% at 50% -15%, rgba(16, 185, 129, 0.09), transparent 55%),
    radial-gradient(130% 120% at 100% -30%, rgba(59, 130, 246, 0.06), transparent 52%),
    radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.11) 1px, transparent 0),
    linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  background-size: auto, auto, 22px 22px, auto;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 28px 64px -40px rgba(15, 23, 42, 0.28);
}

#main-app .app-card-home .home-welcome-stack,
#main-app .app-card-home .home-open-closeouts,
#main-app .app-card-home .home-shifts-row {
  grid-column: 1 / -1;
  margin: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#main-app .app-card-home > .home-open-closeouts .shift-home-panel,
#main-app .app-card-home > .home-shifts-row .shift-home-panel {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

#main-app .app-card-home .home-open-closeouts-panel {
  margin: 0;
  width: 100%;
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 42%);
}

#main-app .app-card-home .home-open-closeouts-panel::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.home-open-closeouts-message {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.92rem;
  color: #92400e;
  font-weight: 600;
}

.home-open-closeouts-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.home-open-closeouts-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: #fff;
}

.home-open-closeouts-row__title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.home-open-closeouts-past {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  vertical-align: middle;
}

@media (max-width: 540px) {
  .home-open-closeouts-row {
    flex-direction: column;
    align-items: stretch;
  }
}

#main-app .app-card-home .home-welcome-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Single merged card: hero + noticeboard */
#main-app .app-card-home .home-welcome-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.32);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 22px 52px -32px rgba(6, 95, 70, 0.65),
    0 14px 36px -36px rgba(15, 23, 42, 0.55);
  background: linear-gradient(155deg, #022c22 0%, #065f46 48%, #0f766e 100%);
}

#main-app .app-card-home .home-welcome-panel__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  height: min(13.5rem, 48%);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

#main-app .app-card-home .home-welcome-panel__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 95% 80% at 100% -20%, rgba(52, 211, 153, 0.6), transparent 55%),
    radial-gradient(ellipse 75% 60% at 0% 100%, rgba(16, 185, 129, 0.48), transparent 52%),
    linear-gradient(155deg, #022c22 0%, #065f46 48%, #0f766e 100%);
  animation: home-welcome-panel-mesh 10.5s ease-in-out infinite alternate;
}

#main-app .app-card-home .home-welcome-panel__mesh::after {
  content: "";
  position: absolute;
  inset: -12% -6%;
  background:
    linear-gradient(
      115deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.05) 36%,
      rgba(167, 243, 208, 0.38) 48%,
      rgba(255, 255, 255, 0.08) 62%,
      rgba(255, 255, 255, 0) 100%
    );
  mix-blend-mode: screen;
  pointer-events: none;
  animation: home-hero-shine-sweep 7.5s ease-in-out infinite;
}

#main-app .app-card-home .home-welcome-panel__accent {
  position: absolute;
  inset: -35% -12%;
  background: conic-gradient(
    from 160deg,
    rgba(16, 185, 129, 0.38),
    rgba(34, 197, 94, 0.62),
    rgba(45, 212, 191, 0.34),
    rgba(16, 185, 129, 0.38)
  );
  filter: blur(22px);
  opacity: 0.98;
  pointer-events: none;
  animation: home-hero-accent-sweep-strong 9.5s ease-in-out infinite alternate;
}

#main-app .app-card-home .home-welcome-panel .home-hero {
  border-radius: 0;
  border: none;
  box-shadow: none;
  margin: 0;
  position: relative;
  z-index: 1;
  background: transparent;
  overflow: visible;
}

#main-app .app-card-home .home-welcome-panel .home-hero::after {
  content: none;
}

#main-app .app-card-home .home-welcome-panel #home-notice-board.home-notice-board--home .home-notice-board__aurora,
#main-app .app-card-home .home-welcome-panel #home-notice-board.home-notice-board--home .home-notice-board__gridfx {
  display: none;
}

#main-app .app-card-home .home-shifts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
  align-items: start;
}

#main-app .app-card-home .home-shifts-row .shift-home-panel {
  grid-column: auto;
  min-width: 0;
  margin: 0;
}

#main-app .app-card-home .home-welcome-stack .home-welcome-panel .home-hero {
  border-radius: 0;
  min-height: 0;
  padding: 0.85rem 1rem 0.75rem;
  box-shadow: none;
  border: none;
}

#main-app .app-card-home .home-welcome-stack .home-hero__name {
  font-size: clamp(1.35rem, 3.2vw, 1.95rem);
  margin: 0.12rem 0 0.3rem;
}

#main-app .app-card-home .home-welcome-stack .home-hero__greeting {
  font-size: 0.86rem;
}

#main-app .app-card-home .home-welcome-stack .home-hero__next-shift-line {
  font-size: 0.82rem;
}

#main-app .app-card-home .home-welcome-stack #home-notice-board {
  border-radius: 0;
}

#main-app .app-card-home .shift-home-panel {
  position: relative;
  border-radius: 16px;
  border: 1px solid #d9e4f3;
  padding: 1rem 1rem 0.95rem;
  box-shadow: 0 10px 26px -28px rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

#main-app .app-card-home .shift-home-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.85), rgba(59, 130, 246, 0.55), rgba(16, 185, 129, 0.35));
  opacity: 0.95;
  pointer-events: none;
}

#main-app .app-card-home .shift-home-panel-mine::before {
  background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
}

#main-app .app-card-home .shift-home-panel-open::before {
  background: linear-gradient(90deg, #6366f1, #818cf8, #a5b4fc);
}

@media (max-width: 720px) {
  #main-app .app-card-home .home-shifts-row {
    grid-template-columns: 1fr;
  }
}

/* Home noticeboard: same emerald story as hero — continuous welcome stack */
#main-app .app-card-home #home-notice-board.home-notice-board--home {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: 1.05rem 1.1rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: linear-gradient(155deg, #022c22 0%, #065f46 42%, #0f766e 78%, #0f766e 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 16px 40px -28px rgba(6, 95, 70, 0.65),
    0 8px 28px -24px rgba(15, 23, 42, 0.35);
}

#main-app .app-card-home .home-welcome-panel #home-notice-board.home-notice-board--home {
  position: relative;
  z-index: 1;
  border-radius: 0 0 19px 19px;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.55) 0%, #065f46 38%, #0f766e 100%);
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__aurora {
  position: absolute;
  inset: -50% -25% auto -30%;
  height: 80%;
  background: conic-gradient(
    from 165deg at 50% 45%,
    rgba(16, 185, 129, 0.42),
    rgba(34, 197, 94, 0.5),
    rgba(45, 212, 191, 0.38),
    rgba(52, 211, 153, 0.44),
    rgba(16, 185, 129, 0.42)
  );
  filter: blur(42px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  animation: home-notice-aurora-shift 14s ease-in-out infinite alternate;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__gridfx {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 24px, 24px 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 78%);
  pointer-events: none;
  z-index: 0;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__masthead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__live {
  position: relative;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__live-ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, 0.45);
  animation: home-notice-live-ring 2.4s ease-out infinite;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.95);
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__titles {
  min-width: 0;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__eyebrow {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(167, 243, 208, 0.88);
  margin-bottom: 0.2rem;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__title {
  margin: 0;
  font-size: clamp(1.35rem, 3.2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #f8fafc;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__body {
  position: relative;
  z-index: 1;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-sticky {
  margin-bottom: 0.85rem;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-post {
  margin-bottom: 0.6rem;
  padding: 0.85rem 0.9rem 0.9rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 32px -24px rgba(15, 23, 42, 0.45);
  transform: none;
  overflow: hidden;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-post:first-of-type {
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  padding-top: 0.85rem;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-post::before {
  content: "";
  display: block;
  height: 4px;
  margin: -0.85rem -0.9rem 0.75rem -0.9rem;
  background: linear-gradient(90deg, #059669, #10b981, #34d399, #5eead4);
  opacity: 0.95;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-post__title {
  color: #0f172a;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-post__body {
  color: #334155;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-post:last-child {
  margin-bottom: 0;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-sticky-card {
  box-shadow: 0 10px 26px -20px rgba(6, 78, 59, 0.55);
  border-width: 1px;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-posts-footer {
  border-top-color: rgba(255, 255, 255, 0.12);
  margin-top: 0.5rem;
  padding-top: 0.65rem;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-posts-range {
  color: rgba(226, 232, 240, 0.85);
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-posts__empty,
#main-app .app-card-home #home-notice-board.home-notice-board--home .hint.home-notice-posts__empty {
  color: rgba(203, 213, 225, 0.92);
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-posts-page-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f1f5f9;
  font-weight: 600;
}

#main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-posts-page-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: #fff;
}

@keyframes home-notice-aurora-shift {
  0% {
    transform: translate3d(-4%, -2%, 0) rotate(-6deg) scale(1);
  }
  100% {
    transform: translate3d(3%, 4%, 0) rotate(4deg) scale(1.05);
  }
}

@keyframes home-notice-live-ring {
  0% {
    transform: scale(0.72);
    opacity: 0.9;
  }
  70% {
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__aurora {
    animation: none;
  }

  #main-app .app-card-home #home-notice-board.home-notice-board--home .home-notice-board__live-ring {
    animation: none;
    opacity: 0.35;
  }
}

.home-notice-posts-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-notice-posts-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
}

.home-notice-posts-range {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
}

.home-notice-posts-pager {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.home-notice-posts-page-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.76rem;
  min-height: 2rem;
}

.notice-emoji-palette {
  position: fixed;
  z-index: 12000;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.25rem;
  padding: 0.45rem;
  max-width: 220px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 40px -24px rgba(15, 23, 42, 0.45);
}

.notice-emoji-palette__btn {
  border: none;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 1.35rem;
  line-height: 1.2;
  padding: 0.28rem;
  cursor: pointer;
}

.notice-emoji-palette__btn:hover {
  background: #e2e8f0;
}

#admin-notices-section .ql-toolbar button.ql-emoji {
  width: 28px;
  font-size: 1rem;
}

#admin-notices-section .ql-toolbar button.ql-emoji::before {
  content: "😀";
  display: block;
  line-height: 1;
}

/* Escape room cast display (standalone page, no #main-app) — minimal TV layout */
.erd-body {
  margin: 0;
  min-height: 100vh;
  --erd-text-color: #f8fafc;
  --erd-title-color: rgba(248, 250, 252, 0.88);
  --erd-accent-color: #fef3c7;
  --erd-font-display: "Special Elite", "American Typewriter", "Bookman Old Style", Georgia, serif;
  --erd-bg-overlay: 0;
  color: var(--erd-text-color);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #020617;
}

.cfg-er-display-color-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.cfg-er-display-color-row input[type="color"] {
  width: 2.75rem;
  height: 2.25rem;
  padding: 0.15rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
}

.cfg-er-display-color-row .app-input {
  flex: 1;
  min-width: 10rem;
}

.cfg-er-display-overlay-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.cfg-er-display-overlay-row input[type="range"] {
  flex: 1;
  min-width: 8rem;
  max-width: 16rem;
}

/* GM rail iframe preview — scale full TV layout to fit (same proportions as room display) */
html.erd-html--preview,
html.erd-html--preview body.erd-body--preview {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.erd-body--preview .erd-sound-gate {
  display: none !important;
}

body.erd-body--preview .erd-shell {
  position: absolute;
  left: 50%;
  top: 0;
  box-sizing: border-box;
  transform: translateX(-50%) scale(var(--erd-preview-scale, 1));
  transform-origin: top center;
}

.erd-sound-gate {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(10px);
  outline: none;
}

.erd-sound-gate:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(251, 191, 36, 0.45);
}

.erd-sound-gate.hidden {
  display: none;
}

.erd-sound-gate-card {
  max-width: min(36rem, 100%);
  text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.erd-sound-gate-title {
  margin: 0 0 0.85rem;
  font-family: "Special Elite", "American Typewriter", "Bookman Old Style", Georgia, serif;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #fef3c7;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.erd-sound-gate-lead,
.erd-sound-gate-action,
.erd-sound-gate-sub {
  margin: 0 0 0.75rem;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  line-height: 1.5;
  color: rgba(241, 245, 249, 0.92);
}

.erd-sound-gate-action {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: #f8fafc;
}

.erd-sound-gate-sub {
  margin-bottom: 0;
  font-size: clamp(0.85rem, 1.8vw, 0.95rem);
  color: rgba(148, 163, 184, 0.95);
}

.erd-intro-wrap {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.erd-intro-wrap.hidden {
  display: none;
}

.erd-intro-video {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  background: #000;
}

.erd-shell.erd-shell--hidden {
  visibility: hidden;
  pointer-events: none;
}

.erd-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 85% at 50% 0%, #1e293b 0%, #0f172a 50%, #020617 100%);
}

.erd-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem);
  box-sizing: border-box;
}

.erd-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  gap: clamp(0.65rem, 2.2vw, 1.35rem);
  padding-top: clamp(1.5rem, 4.5vw, 3rem);
  text-align: center;
}

.erd-timer {
  text-align: center;
  font-family: var(--erd-font-display);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.5rem, 10vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.06em;
  color: var(--erd-text-color);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45), 0 0 40px rgba(251, 191, 36, 0.08);
}

.erd-error {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.9rem;
  color: #fecaca;
}

.erd-error.hidden {
  display: none;
}

.erd-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(0.5rem, 2vw, 2rem) 0;
  min-height: 0;
}

.erd-title {
  margin: 0;
  max-width: 42rem;
  font-family: var(--erd-font-display);
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--erd-title-color);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.erd-title:empty {
  display: none;
}

.erd-hint {
  margin: 0;
  max-width: min(52rem, 100%);
  font-family: var(--erd-font-display);
  font-size: clamp(1.15rem, 3.2vw, 2.1rem);
  font-weight: 400;
  line-height: 1.45;
  white-space: pre-wrap;
  color: var(--erd-text-color);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5);
}

.erd-hint.hidden {
  display: none;
}

.erd-game-over {
  width: 100%;
  max-width: min(100%, 56rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(0.5rem, 2vw, 1rem);
  box-sizing: border-box;
}

/* When Game Over is showing, give the header band height and center timer + label vertically */
.erd-shell:has(.erd-game-over:not(.hidden)) .erd-top {
  padding-top: clamp(1.75rem, 5.5vw, 3.5rem);
  min-height: min(52vh, 28rem);
  justify-content: center;
  gap: clamp(1rem, 3.5vh, 2.5rem);
}

.erd-game-over.hidden {
  display: none;
}

.erd-game-over-inner {
  font-family: var(--erd-font-display);
  font-size: clamp(3.25rem, 14vw, 8.5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--erd-accent-color);
  text-align: center;
  text-shadow:
    0 0 56px rgba(251, 191, 36, 0.45),
    0 6px 40px rgba(0, 0, 0, 0.75);
  animation: erd-game-over-pulse 2.2s ease-in-out infinite;
}

@keyframes erd-game-over-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.02);
  }
}

@keyframes admin-screen-in-opacity-only {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Game master escape room panel (inside main app) */
.escape-room-gm-active-root {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Escape room GM: overflow visible; opacity-only screen animation (transform breaks sticky rail) */
#main-app #admin-escape-room-section.app-screen-escape-room {
  animation-name: admin-screen-in-opacity-only;
  overflow: visible;
}

#admin-escape-room-section #escape-room-active-panel.escape-room-gm-active-root,
#admin-floor-section #escape-room-active-panel.escape-room-gm-active-root {
  width: 100%;
  min-width: 0;
}

.escape-room-panel-head.escape-room-panel-head--with-action {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.escape-room-panel-head.escape-room-panel-head--with-action > div {
  flex: 1 1 14rem;
  min-width: 0;
}

.escape-room-panel-head .escape-room-panel-subtitle {
  margin: 0.4rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 40rem;
}

/* Guest souvenir photo — full admin page, mobile-first */
.er-gp-wizard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: min(70vh, 32rem);
}

.er-gp-progress-track {
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.er-gp-progress-fill {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #15803d);
  transition: width 0.25s ease;
}

.er-gp-progress-label {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.er-gp-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.25rem 0 0.5rem;
}

.er-gp-step-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  color: #0f172a;
}

.er-gp-step-hint {
  margin: 0;
  font-size: 0.9rem;
}

.er-gp-run-meta {
  margin-top: 0.35rem;
}

.er-gp-preview-loading {
  margin: 0.5rem 0;
  text-align: center;
  font-size: 0.95rem;
  color: #64748b;
}

.er-gp-retake-btn {
  align-self: center;
  margin-top: 0.5rem;
}

.er-gp-email-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.er-gp-select,
.er-gp-input {
  font-size: 1rem;
  min-height: 2.75rem;
}

.er-gp-photo-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

@media (min-width: 480px) {
  .er-gp-photo-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.er-gp-photo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 4rem;
  padding: 0.85rem 1rem;
  text-align: center;
  line-height: 1.25;
}

.er-gp-photo-btn__title {
  display: block;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.er-gp-photo-btn__sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  max-width: 16rem;
}

#main-app .er-gp-photo-btn.btn-app-primary {
  color: #fff;
}

#main-app .er-gp-photo-btn.btn-app-primary .er-gp-photo-btn__sub {
  color: rgba(255, 255, 255, 0.92);
}

#main-app .er-gp-photo-btn.btn-app-outline .er-gp-photo-btn__title {
  color: #0f172a;
}

#main-app .er-gp-photo-btn.btn-app-outline .er-gp-photo-btn__sub {
  color: #475569;
}

.er-gp-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.er-guest-photo-preview-wrap {
  margin: 0.75rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  line-height: 0;
}

.er-guest-photo-preview {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  vertical-align: top;
  image-rendering: auto;
}

.er-gp-status {
  margin: 0.5rem 0 0;
  min-height: 1.25rem;
  font-size: 0.88rem;
}

.er-gp-status--error {
  color: #fca5a5;
}

.er-gp-status--ok {
  color: #86efac;
}

.er-gp-wizard-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 22%);
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
}

.er-gp-wizard-footer:has(#er-guest-photo-back-btn.hidden) {
  grid-template-columns: 1fr;
}

.er-gp-wizard-footer:has(#er-guest-photo-skip-btn:not(.hidden)) {
  grid-template-columns: auto 1fr 1fr;
}

.er-gp-wizard-footer:has(#er-guest-photo-back-btn.hidden):has(#er-guest-photo-skip-btn:not(.hidden)) {
  grid-template-columns: 1fr 1fr;
}

.er-gp-wizard-footer.er-gp-wizard-footer--pick-photo {
  grid-template-columns: 1fr;
  justify-items: start;
}

.er-gp-wizard-footer.er-gp-wizard-footer--pick-photo #er-guest-photo-skip-btn {
  max-width: 11rem;
}

.er-gp-wizard-footer #er-guest-photo-back-btn.hidden + #er-guest-photo-skip-btn:not(.hidden) + #er-guest-photo-next-btn {
  grid-column: auto;
}

.er-gp-wizard-footer #er-guest-photo-back-btn.hidden + #er-guest-photo-next-btn:not(#er-guest-photo-skip-btn ~ #er-guest-photo-next-btn) {
  grid-column: 1 / -1;
}

.er-gp-wizard-btn {
  min-height: 3.1rem;
  font-size: 1.05rem;
  font-weight: 650;
  width: 100%;
}

#admin-guest-photo-section.app-screen-guest-photo {
  animation-name: admin-screen-in-opacity-only;
}

.er-gp-mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  padding-bottom: 0.35rem;
}

.er-gp-mode-tab {
  flex: 1;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.er-gp-mode-tab--active {
  color: #0f172a;
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 0 -2px 0 #15803d;
}

.er-gp-marketing-fieldset {
  margin: 0.5rem 0 0;
  padding: 0;
  border: none;
}

.er-gp-marketing-legend {
  font-size: 0.9rem;
  font-weight: 650;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.er-gp-marketing-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.er-gp-marketing-option {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
}

.er-gp-marketing-option:has(.er-gp-marketing-radio:checked) {
  border-color: #15803d;
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 0 1px rgba(21, 128, 61, 0.25);
}

.er-gp-marketing-radio {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.er-gp-marketing-option__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.er-gp-marketing-option__sub {
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

.er-gp-sent-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.25rem 0 1rem;
}

.er-gp-sent-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.er-gp-sent-filter {
  font-size: 0.88rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.75rem;
}

.er-gp-sent-filter--active {
  border-color: #15803d;
  background: rgba(34, 197, 94, 0.1);
  color: #14532d;
  font-weight: 650;
}

.er-gp-sent-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.er-gp-sent-card {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #fff;
}

.er-gp-sent-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.er-gp-sent-card__room {
  font-size: 1rem;
  color: #0f172a;
}

.er-gp-sent-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.er-gp-sent-badge--yes {
  background: rgba(34, 197, 94, 0.18);
  color: #14532d;
}

.er-gp-sent-badge--no {
  background: rgba(148, 163, 184, 0.25);
  color: #475569;
}

.er-gp-sent-card__email {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-all;
}

.er-gp-sent-card__meta {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: #64748b;
}

.er-gp-sent-card__time {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.er-gp-sent-empty {
  margin: 0.5rem 0;
}

/* Guest photo overlay layout editor (app config) */
.gp-overlay-editor-host {
  margin-top: 0.75rem;
}

.gp-overlay-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.gp-overlay-editor__tab {
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.gp-overlay-editor__tab--active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.gp-overlay-editor__canvas-wrap {
  max-width: 20rem;
  margin: 0 auto;
  overflow: visible;
}

.gp-overlay-editor__canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  background-color: #f1f5f9;
  background-image:
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 18px 18px;
  background-position:
    0 0,
    0 9px,
    9px -9px,
    -9px 0;
  border: 2px dashed rgba(100, 116, 139, 0.55);
  overflow: visible;
  touch-action: none;
  user-select: none;
}

.gp-overlay-editor__frame-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(71, 85, 105, 0.55);
  pointer-events: none;
  z-index: 0;
}

.gp-overlay-editor__band-shim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  pointer-events: none;
  z-index: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.gp-overlay-editor__band-panel {
  padding: 0.65rem 0.55rem;
  margin: 0 0 0.35rem;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.gp-overlay-editor__band-title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
}

.gp-band-col-heading {
  margin: 0.35rem 0 0.15rem;
}

.gp-overlay-layer {
  position: absolute;
  z-index: 1;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 4px;
  box-sizing: border-box;
}

.gp-overlay-layer:active {
  cursor: grabbing;
}

.gp-overlay-layer--selected {
  border-color: #818cf8;
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.35);
}

.gp-overlay-layer--hidden {
  opacity: 0.35;
  pointer-events: none;
}

.gp-overlay-layer__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
}

/* Logos sit on the bottom of the drag box so you can place them low in the footer band. */
.gp-overlay-layer.gp-layer--company {
  align-items: flex-start;
  justify-content: flex-end;
}

.gp-overlay-layer.gp-layer--room {
  align-items: flex-end;
  justify-content: flex-end;
}

.gp-overlay-layer--text {
  align-items: flex-end;
  justify-content: flex-start;
}

.gp-overlay-layer__text-sample {
  font-family: "Special Elite", "American Typewriter", "Bookman Old Style", Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #000000;
  paint-order: stroke fill;
  -webkit-text-stroke: 0.45px rgba(255, 255, 255, 0.88);
  text-shadow: none;
  line-height: 1.15;
  white-space: nowrap;
  pointer-events: none;
  font-synthesis: none;
}

.gp-overlay-editor__controls {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gp-overlay-editor__selected-hint {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.gp-overlay-editor__controls label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.88rem;
}

.gp-overlay-editor__reset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.4rem 0 0;
}

.gp-overlay-control-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
}

#main-app #admin-escape-room-section.app-screen-escape-room.app-card-panel {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 40%, #f1f5f9 100%);
  border-color: rgba(99, 102, 241, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 20px 50px -18px rgba(15, 23, 42, 0.1);
}

.escape-room-gm-control-deck {
  border-radius: 16px;
  padding: 0.85rem 0.9rem 0.95rem;
  background: linear-gradient(150deg, rgba(248, 250, 252, 0.98) 0%, rgba(226, 232, 240, 0.45) 48%, rgba(241, 245, 249, 0.95) 100%);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 12px 40px rgba(15, 23, 42, 0.07);
}

@media (min-width: 880px) {
  .escape-room-gm-control-deck {
    padding: 1.05rem 1.15rem 1.2rem;
  }
}

#admin-escape-room-section .escape-room-gm-control-deck .escape-room-gm-card,
#admin-floor-section .escape-room-gm-control-deck .escape-room-gm-card {
  background: #fff;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 2px 6px rgba(15, 23, 42, 0.04),
    0 10px 28px -8px rgba(15, 23, 42, 0.08);
}

#admin-escape-room-section .escape-room-gm-rail-card--timer,
#admin-floor-section .escape-room-gm-rail-card--timer {
  border-top: 3px solid #4f46e5;
}

.escape-room-gm-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.escape-room-gm-rail {
  flex: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  position: static;
  max-height: none;
  align-self: stretch;
  z-index: auto;
}

@media (max-width: 640px) {
  .escape-room-gm-layout {
    flex-wrap: nowrap;
  }
}

.escape-room-gm-rail-inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.escape-room-gm-rail-hint {
  font-size: 0.72rem;
  margin: 0 0 0.45rem;
}

.escape-room-gm-rail .escape-room-gm-timer-readout {
  font-size: 2.85rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: #0f172a;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.6),
    0 2px 0 rgba(148, 163, 184, 0.35),
    0 6px 18px rgba(15, 23, 42, 0.18);
}

.escape-room-gm-timer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
  margin: 0 0 0.35rem;
}

.escape-room-gm-puzzle-progress {
  flex: 0 1 auto;
  margin: 0;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  color: #1e40af;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.escape-room-gm-timer-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.escape-room-gm-start-choices,
.escape-room-gm-live-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.escape-room-gm-start-plain {
  width: 100%;
  padding: 0.55rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.escape-room-gm-start-plain:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
}

.escape-room-gm-start-only {
  width: 100%;
}

.escape-room-gm-actions--live {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0;
  width: 100%;
}

.escape-room-gm-timer-adjust-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  width: 100%;
}

.escape-room-gm-timer-adjust-row .btn-app-outline {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.35rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  justify-content: center;
}

.escape-room-gm-btn-full {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

#main-app .escape-room-gm-actions--live .escape-room-gm-btn-full.btn-app-primary,
#main-app .escape-room-gm-actions--live .escape-room-gm-btn-full.btn-app-outline {
  justify-content: center;
}

.escape-room-gm-replay-btn {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #047857;
  border-radius: 0.5rem;
  background: transparent;
  color: #047857;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.escape-room-gm-replay-btn:hover:not(:disabled) {
  background: rgba(5, 150, 105, 0.08);
}

.escape-room-gm-replay-btn--busy {
  opacity: 0.45;
  color: #94a3b8;
  border-color: #cbd5e1;
  cursor: pointer;
}

.escape-room-gm-replay-btn--busy:hover {
  background: transparent;
}

.escape-room-gm-intro-btn {
  width: 100%;
  padding: 0.55rem 1rem;
  border: 1px solid #047857;
  border-radius: 0.5rem;
  background: #059669;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.escape-room-gm-intro-btn:hover:not(:disabled) {
  background: #047857;
}

.escape-room-gm-intro-btn--stop {
  background: #0f172a;
  border-color: #334155;
}

.escape-room-gm-intro-btn--stop:hover:not(:disabled) {
  background: #1e293b;
}

.escape-room-gm-intro-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#main-app .escape-room-gm-timer-toggle.escape-room-gm-timer-toggle--pause {
  background: #fff;
  border: 1px solid #4f46e5;
  color: #4f46e5;
  box-shadow: none;
}

#main-app .escape-room-gm-timer-toggle.escape-room-gm-timer-toggle--pause:hover:not(:disabled) {
  background: #eef2ff;
  border-color: #4338ca;
  color: #4338ca;
  box-shadow: none;
  transform: translateY(-1px);
}

.escape-room-gm-rail .escape-room-gm-actions {
  margin-top: 0.4rem;
}

.escape-room-gm-rail .escape-room-gm-row {
  margin-top: 0.4rem;
}

.escape-room-gm-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

@media (min-width: 880px) {
  #admin-escape-room-section .escape-room-gm-layout,
  #admin-floor-section .escape-room-gm-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.15rem;
  }

  #admin-escape-room-section .escape-room-gm-rail,
  #admin-floor-section .escape-room-gm-rail {
    flex: 0 0 min(20.5rem, 36vw);
    width: min(20.5rem, 36vw);
    max-width: none;
    position: sticky;
    top: 0.75rem;
    align-self: flex-start;
    z-index: 2;
  }

  #admin-escape-room-section .escape-room-gm-main,
  #admin-floor-section .escape-room-gm-main {
    flex: 1 1 0;
    min-width: 0;
  }
}

.escape-room-gm-active-sessions-card {
  margin-bottom: 1rem;
}

.escape-room-gm-idle-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #334155;
}

#admin-escape-room-section #escape-room-gm-live-shell:not(.hidden),
#admin-floor-section #escape-room-gm-live-shell:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.escape-room-gm-active-session-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 0.5rem;
}

.escape-room-gm-active-session-row:last-child {
  margin-bottom: 0;
}

.escape-room-gm-active-session-main {
  flex: 1;
  min-width: 0;
}

.escape-room-gm-active-session-title {
  display: block;
  font-size: 0.95rem;
}

.escape-room-gm-active-session-room,
.escape-room-gm-active-session-meta {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
}

.escape-room-gm-active-session-gm {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.escape-room-gm-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #f8fafc;
}

.escape-room-gm-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.escape-room-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

.escape-room-gm-trial-pill {
  display: inline-block;
  margin-right: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  vertical-align: middle;
}

.escape-room-gm-card.escape-room-gm-rail-card {
  padding: 0.6rem 0.75rem;
}

.escape-room-gm-card.escape-room-gm-rail-card.escape-room-gm-rail-card--clue {
  padding: 0.55rem 0.7rem 0.65rem;
}

.escape-room-gm-card.escape-room-gm-rail-card.escape-room-gm-rail-card--clue > h3 {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
}

.escape-room-gm-action-glyph {
  margin-right: 0.2rem;
}

.escape-room-gm-card.escape-room-gm-rail-card > h3 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
}

.escape-room-gm-card.escape-room-gm-main-card {
  padding: 0.75rem 0.85rem;
}

@media (min-width: 880px) {
  #admin-escape-room-section .escape-room-gm-objectives-card,
  #admin-floor-section .escape-room-gm-objectives-card {
    box-shadow:
      inset 4px 0 0 #4f46e5,
      0 1px 0 rgba(255, 255, 255, 0.95) inset,
      0 2px 6px rgba(15, 23, 42, 0.04),
      0 10px 28px -8px rgba(15, 23, 42, 0.08);
  }
}

#admin-escape-room-section .escape-room-gm-rail-card--clue .escape-room-gm-manual-send-btn,
#admin-floor-section .escape-room-gm-rail-card--clue .escape-room-gm-manual-send-btn {
  margin-top: 0.55rem;
  width: 100%;
  justify-content: center;
}

.escape-room-gm-timer-readout {
  font-variant-numeric: tabular-nums;
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.escape-room-gm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.escape-room-gm-actions.escape-room-gm-actions--live {
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
}

.escape-room-gm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.escape-room-gm-row--tweak {
  margin-bottom: 0.35rem;
}

.escape-room-gm-btn-tweak {
  padding: 0.28rem 0.5rem;
  font-size: 0.78rem;
}

.escape-room-gm-hints-sent {
  font-size: 0.78rem;
  line-height: 1.25;
}

.escape-room-gm-rail-card--timer #escape-room-gm-timer-meta,
.escape-room-gm-rail-card--timer .escape-room-gm-hints-sent {
  margin: 0;
  padding: 0;
}

.escape-room-gm-rail-card--timer .escape-room-gm-hints-sent {
  margin-top: 0;
}

.escape-room-gm-rail-card--timer .escape-room-gm-timer-stack {
  margin-top: 0.5rem;
}

#admin-floor-section .escape-room-gm-rail-card--timer .escape-room-gm-end-session-btn,
#admin-escape-room-section .escape-room-gm-rail-card--timer .escape-room-gm-end-session-btn,
#main-app .escape-room-gm-rail-card--timer button.escape-room-gm-end-session-btn.danger {
  width: 100%;
  margin-top: 0.85rem;
  margin-bottom: 0;
  box-sizing: border-box;
}

.escape-room-gm-url {
  flex: 1;
  min-width: 200px;
  font-size: 0.8rem;
}

.escape-room-gm-objective {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.65rem;
  background: #fff;
}

.escape-room-gm-prompt {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #e2e8f0;
}

.cfg-games-list .cfg-game-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.cfg-game-row-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.cfg-game-row-head .cfg-game-name {
  flex: 1;
  min-width: 160px;
}

.cfg-game-er {
  margin-top: 0.35rem;
  text-align: left;
}

.cfg-game-er summary {
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

.cfg-game-er > .app-form.app-form-grid {
  align-items: start;
}

.cfg-er-sound-file {
  display: block;
  margin-top: 0.4rem;
  max-width: 22rem;
}

.gp-cfg-er-guest-photo-norun {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 0.65rem;
  font-size: 0.88rem;
  line-height: 1.35;
}

.gp-cfg-er-guest-photo-norun input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.cfg-er-objectives-section {
  margin-top: 0.25rem;
}

.cfg-er-objectives-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.cfg-er-objective {
  position: relative;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.65rem 0.75rem 0.75rem 0.85rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.cfg-er-objective::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, #6366f1, #7c3aed);
}

.cfg-er-objective-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 0.75rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.cfg-er-objective-card-head-text {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.cfg-er-objective-grip {
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 1rem;
  line-height: 1;
  color: #94a3b8;
  user-select: none;
}

.cfg-er-objective-kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4f46e5;
}

.cfg-er-obj-panel {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.6rem 0.7rem 0.65rem;
  margin-bottom: 0.55rem;
}

.cfg-er-obj-panel--gm {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.cfg-er-obj-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.45rem;
}

.cfg-er-obj-panel-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.cfg-er-obj-panel-pill {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  background: #e0e7ff;
  color: #312e81;
}

.cfg-er-gm-split {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 640px) {
  .cfg-er-gm-split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.cfg-er-field-group--title {
  margin-bottom: 0.45rem;
}

.cfg-er-field-group--solution .cfg-er-obj-goal {
  font-weight: 500;
  min-height: 5.5rem;
  resize: vertical;
}

.cfg-er-hints-details {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  border-radius: 10px;
  padding: 0 0.65rem 0.6rem;
}

.cfg-er-hints-details__summary {
  cursor: pointer;
  list-style: none;
  padding: 0.55rem 0 0.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.cfg-er-hints-details__summary::-webkit-details-marker {
  display: none;
}

.cfg-er-hints-details__summary::marker {
  content: "";
}

.cfg-er-hints-details__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #92400e;
}

.cfg-er-hints-details__body {
  padding-top: 0.2rem;
  border-top: 1px dashed #fcd34d;
}

.cfg-er-objective-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cfg-er-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cfg-er-field-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
}

.cfg-er-field-hint {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.3;
  color: #64748b;
}

.cfg-er-objective.cfg-er-dragging {
  opacity: 0.65;
}

.cfg-er-objective-toolbar,
.cfg-er-hint-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.cfg-er-objective-toolbar {
  flex-shrink: 0;
}

.cfg-er-objective-toolbar .btn-app-outline,
.cfg-er-hint-toolbar .btn-app-outline {
  font-size: 0.78rem;
  padding: 0.2rem 0.42rem;
}

.cfg-er-hints-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}

.cfg-er-hint-row {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.4rem 0.5rem 0.5rem;
  background: #fff;
}

.cfg-er-hint-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.25rem;
}

.cfg-er-hint-order {
  flex-shrink: 0;
  min-width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #1e293b;
}

.cfg-er-hint-row .cfg-er-hint-toolbar {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-bottom: 0;
}

.cfg-er-hint-row.cfg-er-dragging {
  opacity: 0.65;
}

.cfg-er-add-hint {
  margin-top: 0.1rem;
}

#escape-room-objectives-active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.escape-room-gm-obj {
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  padding: 0;
  margin-bottom: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 55%, #f4f6fb 100%);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 12px rgba(15, 23, 42, 0.05),
    0 8px 28px -10px rgba(79, 70, 229, 0.12);
}

.escape-room-gm-obj--complete,
.escape-room-gm-obj--skipped {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.escape-room-gm-obj--complete .escape-room-gm-obj-top,
.escape-room-gm-obj--complete .escape-room-gm-obj-desc,
.escape-room-gm-obj--complete .escape-room-gm-obj-goal-block,
.escape-room-gm-obj--complete .escape-room-gm-obj-hints-details,
.escape-room-gm-obj--skipped .escape-room-gm-obj-top,
.escape-room-gm-obj--skipped .escape-room-gm-obj-desc,
.escape-room-gm-obj--skipped .escape-room-gm-obj-goal-block,
.escape-room-gm-obj--skipped .escape-room-gm-obj-hints-details {
  opacity: 0.72;
}

.escape-room-gm-obj--complete .escape-room-gm-obj-title,
.escape-room-gm-obj--skipped .escape-room-gm-obj-title {
  color: #64748b;
}

.escape-room-gm-obj--complete .escape-room-gm-obj-num,
.escape-room-gm-obj--skipped .escape-room-gm-obj-num {
  filter: grayscale(0.35);
  opacity: 0.85;
}

.escape-room-gm-obj-top {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.45rem 0.55rem 0.45rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(248, 250, 252, 0.4) 100%);
}

.escape-room-gm-obj-num {
  flex-shrink: 0;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  background: linear-gradient(145deg, #7c3aed, #6366f1);
  color: #fff;
}

.escape-room-gm-obj-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.escape-room-gm-obj-head {
  display: block;
  padding-bottom: 0.05rem;
}

.escape-room-gm-obj-head .escape-room-gm-obj-title-row {
  width: 100%;
}

.escape-room-gm-obj-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.45rem 0.65rem;
  justify-content: flex-start;
}

.escape-room-gm-obj-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.025em;
  color: #0f172a;
  flex: 1 1 12rem;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.escape-room-gm-obj-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 0.12rem;
  border: 1px solid transparent;
}

.escape-room-gm-obj-badge--pending {
  background: #fef3c7;
  color: #92400e;
}

.escape-room-gm-obj-badge--not-started {
  background: #e2e8f0;
  color: #475569;
}

.escape-room-gm-obj-badge--done {
  background: #dcfce7;
  color: #166534;
}

.escape-room-gm-obj-badge--skip {
  background: #fee2e2;
  color: #991b1b;
}

.escape-room-gm-obj-main > .escape-room-gm-obj-desc {
  margin: 0;
}

.escape-room-gm-obj-desc {
  margin: 0;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #475569;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: none;
}

.escape-room-gm-obj-goal-block {
  margin: 0;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.escape-room-gm-obj-goal-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.escape-room-gm-goal-head-icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.escape-room-gm-goal-head-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #334155;
}

.escape-room-gm-obj-goal-block .escape-room-gm-obj-goal-text {
  margin: 0;
  padding: 0.45rem 0.5rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  color: #334155;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: #fff;
  border-top: none;
}

.escape-room-gm-obj-head .escape-room-gm-obj-issue-panel,
.escape-room-gm-obj-main > .escape-room-gm-obj-issue-panel {
  flex: none;
  width: 100%;
  box-sizing: border-box;
}

.escape-room-gm-obj-issue-panel {
  margin-top: 0.45rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.escape-room-gm-obj-issue-panel.hidden {
  display: none;
}

.escape-room-gm-issue-label {
  display: block;
  margin-bottom: 0.35rem;
}

.escape-room-gm-issue-text {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}

.escape-room-gm-issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.escape-room-gm-obj-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.85);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.escape-room-gm-obj-toolbar .escape-room-gm-btn-complete {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.escape-room-gm-obj-toolbar .escape-room-gm-btn-skip,
.escape-room-gm-obj-toolbar .btn-app-outline.escape-room-gm-btn-sm[data-er-report-issue] {
  font-weight: 600;
  color: #334155;
  border-color: rgba(100, 116, 139, 0.45);
  background: #fff;
}

.escape-room-gm-toolbar-hint {
  font-size: 0.68rem;
  margin: 0;
}

.escape-room-gm-btn-sm.btn-app-primary,
.escape-room-gm-btn-sm.btn-app-outline {
  font-size: 0.72rem;
  padding: 0.18rem 0.42rem;
}

.escape-room-gm-interactions {
  border-top: 1px solid #e2e8f0;
  padding: 0.45rem 0.5rem 0.5rem;
  background: #f8fafc;
}

.escape-room-gm-obj-hints-details {
  margin: 0;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
}

.escape-room-gm-obj-hints-summary {
  cursor: pointer;
  list-style: none;
  padding: 0;
  margin: 0;
  user-select: none;
}

.escape-room-gm-obj-hints-summary::-webkit-details-marker {
  display: none;
}

.escape-room-gm-obj-hints-summary::marker {
  content: "";
}

.escape-room-gm-hints-summary-layout {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  min-height: 0;
  box-sizing: border-box;
  background: #f8fafc;
  border-radius: 0;
  transition: background 0.12s ease;
}

.escape-room-gm-obj-hints-summary:hover .escape-room-gm-hints-summary-layout {
  background: #f1f5f9;
  box-shadow: none;
}

.escape-room-gm-obj-hints-details[open] .escape-room-gm-hints-summary-layout {
  border-radius: 0;
  border-bottom: 1px solid #e2e8f0;
}

.escape-room-gm-hints-summary-icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.escape-room-gm-hints-summary-label {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #334155;
}

.escape-room-gm-hints-summary-chevron {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  border-radius: 0;
  border: none;
}

.escape-room-gm-hints-summary-chevron::before {
  content: "\25B8";
  font-weight: 700;
}

.escape-room-gm-obj-hints-details[open] .escape-room-gm-hints-summary-chevron::before {
  content: "\25BE";
}

.escape-room-gm-interactions-head {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #475569;
  margin-bottom: 0.45rem;
}

.escape-room-gm-interaction-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 0.5rem;
  align-items: start;
  padding: 0.4rem 0.45rem;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.escape-room-gm-interaction-row:last-child {
  margin-bottom: 0;
}

.escape-room-gm-obj-toolbar + .escape-room-gm-obj-issue-panel {
  margin-top: 0.5rem;
}

.escape-room-gm-obj-hints-summary:focus-visible {
  outline: none;
}

.escape-room-gm-obj-hints-summary:focus-visible .escape-room-gm-hints-summary-layout {
  outline: 2px solid rgba(100, 116, 139, 0.45);
  outline-offset: 1px;
  border-radius: 4px;
}

.escape-room-gm-interaction-text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #475569;
  font-weight: 500;
  white-space: pre-wrap;
  word-break: break-word;
}

.escape-room-gm-interaction-send-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.escape-room-gm-send {
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: linear-gradient(180deg, #ec4899, #db2777);
  color: #fff;
  box-shadow: 0 1px 2px rgba(219, 39, 119, 0.35);
}

.escape-room-gm-send--sm {
  padding: 0.26rem 0.55rem;
  font-size: 0.68rem;
}

.escape-room-gm-send:hover {
  filter: brightness(1.06);
}

.escape-room-gm-sent-flag {
  font-size: 0.65rem;
  font-weight: 600;
  color: #16a34a;
}

.escape-room-gm-hint-send-gated {
  font-size: 0.68rem;
  font-weight: 500;
  color: #94a3b8;
}

.escape-room-gm-stats-table .escape-room-gm-stat-num {
  width: 2.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #64748b;
}

/* Escape room past runs & analytics */
.escape-room-runs-toolbar {
  margin-bottom: 1rem;
}

.escape-room-runs-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  justify-content: space-between;
}

.escape-room-runs-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.escape-room-runs-toolbar-row label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.escape-room-runs-summary-line {
  margin: 0.65rem 0 0;
}

.escape-room-runs-charts {
  display: block;
  margin-bottom: 1.25rem;
}

.escape-room-runs-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  align-items: start;
}

.escape-room-runs-chart-card--wide {
  grid-column: 1 / -1;
}

.escape-room-runs-insight-note {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.escape-room-runs-insight-list {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}

.escape-room-runs-insight-list li {
  margin: 0.25rem 0;
}

.escape-room-runs-puzzle-focus td {
  background: rgba(59, 130, 246, 0.12);
  box-shadow: inset 3px 0 0 #3b82f6;
}

.escape-room-runs-puzzle-spotlight {
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.escape-room-runs-mix-row--dim,
.escape-room-runs-bar-row--dim {
  opacity: 0.42;
}

.escape-room-runs-outcome-stack {
  display: flex;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  min-height: 2.35rem;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.escape-room-runs-outcome-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0.35rem 0.4rem;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.escape-room-runs-outcome-seg-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.escape-room-runs-outcome-seg--escaped {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.escape-room-runs-outcome-seg--dnf {
  background: linear-gradient(180deg, #fb923c, #ea580c);
}

.escape-room-runs-outcome-seg--stopped {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.escape-room-runs-outcome-seg--expired {
  background: linear-gradient(180deg, #c084fc, #9333ea);
}

.escape-room-runs-outcome-seg--other {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}

.escape-room-runs-mini-table {
  width: 100%;
  font-size: 0.82rem;
}

.escape-room-runs-mini-table th,
.escape-room-runs-mini-table td {
  padding: 0.4rem 0.5rem;
}

.escape-room-runs-bar-title {
  margin: -0.15rem 0 0.4rem 3.2rem;
  font-size: 0.78rem;
}

.escape-room-runs-mix-chart {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.escape-room-runs-mix-row {
  display: grid;
  grid-template-columns: 2rem 1fr 5.75rem;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.82rem;
}

.escape-room-runs-mix-ord {
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.escape-room-runs-mix-track {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: #e2e8f0;
}

.escape-room-runs-mix-complete {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #16a34a);
  min-width: 2px;
}

.escape-room-runs-mix-skip {
  height: 100%;
  background: linear-gradient(90deg, #fdba74, #ea580c);
  min-width: 2px;
}

.escape-room-runs-mix-meta {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  font-size: 0.78rem;
}

.escape-room-runs-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: #64748b;
}

.escape-room-runs-legend-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.escape-room-runs-legend-swatch--complete {
  background: linear-gradient(180deg, #4ade80, #16a34a);
}

.escape-room-runs-legend-swatch--skip {
  background: linear-gradient(180deg, #fdba74, #ea580c);
}

.escape-room-runs-chart-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background: #f8fafc;
}

.escape-room-runs-chart-card h4 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.escape-room-runs-bar-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr 3.5rem;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}

.escape-room-runs-bar-track {
  height: 10px;
  border-radius: 6px;
  background: #e2e8f0;
  overflow: hidden;
}

.escape-room-runs-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  min-width: 2px;
}

.escape-room-runs-bar-meta {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

.escape-room-runs-table .escape-room-runs-expand-btn {
  white-space: nowrap;
}

.escape-room-runs-progress {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1e40af;
  white-space: nowrap;
}

.escape-room-runs-ctx-menu {
  position: fixed;
  z-index: 12000;
  min-width: 11rem;
  padding: 0.35rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.12));
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.escape-room-runs-ctx-menu .btn-app-outline {
  width: 100%;
  justify-content: center;
}

.escape-room-runs-delete-hint {
  display: block;
  margin-top: 0.35rem;
}

.escape-room-runs-detail td {
  background: #f1f5f9;
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
}

.escape-room-runs-outcome-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  border: 1px solid transparent;
  line-height: 1.25;
}

.escape-room-runs-outcome-pill--escaped {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.escape-room-runs-outcome-pill--dnf {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.escape-room-runs-outcome-pill--expired {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.escape-room-runs-outcome-pill--stopped {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.escape-room-runs-outcome-pill--muted {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.escape-room-runs-photo-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.escape-room-runs-photo-pill--yes {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
}

.escape-room-runs-photo-pill--no {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

.er-closeout {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.er-closeout--done {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
}

.er-closeout--skip {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.er-closeout--pending {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}

.er-closeout--miss {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.er-closeout--na {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
}

@media (max-width: 540px) {
  .escape-room-gm-interaction-row {
    grid-template-columns: 1fr;
  }

  .escape-room-gm-interaction-send-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
}

/* ----------------------------- Floor view ----------------------------- */
.floor-bookings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.floor-bookings--empty {
  display: block;
}

#admin-floor-section .panel-head--floor {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.65rem;
}

#admin-floor-section .panel-head__main {
  flex: 1 1 11rem;
  min-width: 0;
}

#admin-floor-section .panel-head__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

#admin-floor-section .floor-trial-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--app-border, #e2e5ec);
  background: var(--app-card-bg, #fff);
  color: var(--app-muted, #64748b);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#admin-floor-section .floor-trial-btn:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.06);
  color: #4f46e5;
}

#admin-floor-section .floor-trial-btn:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.55);
  outline-offset: 2px;
}

#admin-floor-section .floor-trial-btn svg {
  display: block;
}

@media (max-width: 480px) {
  #admin-floor-section .panel-head--floor {
    align-items: flex-start;
  }

  #admin-floor-section .panel-head__actions {
    gap: 0.3rem;
  }

  #admin-floor-section .floor-trial-btn {
    width: 2.25rem;
    height: 2.25rem;
  }

  #admin-floor-section .panel-head__actions .btn-app-outline {
    padding: 0.4rem 0.65rem;
    font-size: 0.82rem;
    min-height: 2.25rem;
  }
}

.floor-overview--all-clear .floor-bookings--empty {
  display: flex;
  justify-content: center;
}

.floor-empty {
  box-sizing: border-box;
  width: 100%;
  max-width: 22rem;
  margin: 20px auto 4px;
  padding: 28px 24px 32px;
  text-align: center;
  border-radius: 16px;
  border: 1px solid var(--app-border, #e2e5ec);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.07) 0%, var(--app-card-bg, #fff) 52%);
}

.floor-empty__icon {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  color: #94a3b8;
}

.floor-empty__title {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text, #101828);
}

.floor-empty__lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--app-muted, #667085);
}

.floor-empty__link {
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;
}

.floor-empty__link:hover {
  text-decoration: underline;
}

.floor-empty--compact {
  max-width: none;
  margin: 0 0 8px;
  padding: 14px 16px;
  text-align: left;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
}

.floor-empty--compact .floor-empty__title {
  font-size: 0.95rem;
}

.floor-empty--compact .floor-empty__lead {
  font-size: 0.85rem;
}

.floor-card {
  border: 1px solid var(--app-border, #e2e5ec);
  border-radius: 14px;
  padding: 16px;
  background: var(--app-card-bg, #fff);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.floor-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.floor-card__head-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.floor-card__title {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floor-card__meta {
  margin: 4px 0 0;
  color: var(--app-muted, #667085);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.floor-card__meta-when {
  font-size: 0.82rem;
  line-height: 1.35;
}

.floor-card__meta-detail {
  display: block;
  color: var(--app-text, #344054);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
}

.floor-card__meta-sep {
  color: var(--app-muted, #98a2b3);
  font-weight: 400;
}

.floor-card__meta-piece--gm {
  color: #047857;
  font-weight: 600;
}

.floor-card__title-gm {
  font-weight: 700;
  color: #047857;
  font-size: 0.92em;
}

.floor-card__note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--app-muted, #667085);
}

.floor-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.floor-card__pickup-btn {
  width: 100%;
  justify-content: center;
  min-height: 2.75rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.floor-card__pipeline {
  margin: 2px 0 4px;
}

.floor-card__pipeline .floor-pipeline {
  margin-bottom: 0;
  padding: 4px 2px 0;
}

.floor-card__pipeline .floor-pipeline__dot {
  width: 32px;
  height: 32px;
}

.floor-card__pipeline .floor-pipeline__dot svg {
  width: 15px;
  height: 15px;
}

.floor-card__pipeline .floor-pipeline__track {
  top: 20px;
}

.floor-card__pipeline .floor-pipeline__label {
  font-size: 0.68rem;
}

.floor-steps {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: stretch;
  overflow-x: auto;
  border-radius: 10px;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.floor-step {
  position: relative;
  flex: 1 1 0;
  min-width: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 9px 14px 9px 26px;
  margin-left: -14px;
  background: #eceef3;
  color: #8a92a3;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
  transition: background 0.15s ease, color 0.15s ease;
}

.floor-step:first-child {
  margin-left: 0;
  padding-left: 16px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.floor-step:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
}

.floor-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.64rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.floor-step.is-done {
  background: #16a34a;
  color: #fff;
}

.floor-step.is-done .floor-step__num {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.floor-step.is-current {
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
}

.floor-step.is-current .floor-step__num {
  background: #fff;
  color: #4f46e5;
}

.floor-step.is-upcoming {
  background: #eceef3;
  color: #8a92a3;
}

.floor-step--abandoned {
  background: #dc2626;
  color: #fff;
}

.floor-step--abandoned .floor-step__num {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

@media (max-width: 560px) {
  .floor-step__label {
    display: none;
  }
  .floor-step {
    min-width: 0;
    padding: 9px 12px 9px 22px;
  }
}

/* ---- Active run stage (single "Game Tracker") ---- */
.floor-run-stage {
  border: 1px solid var(--app-border, #e2e5ec);
  border-radius: 16px;
  background: var(--app-card-bg, #fff);
  box-shadow: 0 6px 22px rgba(16, 24, 40, 0.08);
  padding: 18px 18px 6px;
  margin-bottom: 18px;
}

.floor-run-stage__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 14px;
}

.floor-run-stage__head-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.floor-run-stage__title {
  margin: 0;
  font-size: 1.15rem;
}

.floor-run-stage__puzzle-progress,
.floor-card__puzzle-progress,
.floor-puzzle-progress-badge {
  flex: 0 0 auto;
  margin: 0.1rem 0 0;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  color: #1e40af;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
  max-width: min(100%, 11rem);
  text-align: right;
}

.floor-run-stage__puzzle-progress {
  flex: 0 0 auto;
}

.floor-run-stage__meta {
  margin: 4px 0 0;
}

.floor-run-stage__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  width: 100%;
}

.floor-run-stage--checkin {
  padding: 1.25rem 1.35rem 1.5rem;
}

.floor-run-stage--checkin .floor-run-stage__actions {
  margin-top: 0.75rem;
}

.floor-checkin-form {
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
  display: grid;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.floor-checkin-form__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.floor-checkin-form__hint {
  margin: 0;
  max-width: none;
}

.floor-checkin-form__fields {
  display: grid;
  grid-template-columns: 1fr minmax(8rem, 12rem);
  gap: 1rem 1.25rem;
  align-items: end;
}

.floor-checkin-form__field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.floor-checkin-form__field .app-input {
  width: 100%;
  max-width: none;
}

.floor-checkin-form__actions {
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .floor-checkin-form__fields {
    grid-template-columns: 1fr;
  }
}

.floor-run-stage__host:not(:empty) {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--app-border, #e7e9f0);
}

#admin-floor-section .floor-run-stage__host:not(:empty) {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

/* Live GM (trial + Run a session): room screen preview in rail; hide duplicate URL row */
.escape-room-gm--display-preview .escape-room-gm-rail-card--session {
  display: none;
}

.escape-room-gm--display-preview .escape-room-gm-rail-card--display {
  padding: 0;
  overflow: hidden;
}

.escape-room-gm--display-preview .escape-room-gm-rail-card--display .escape-room-gm-display-preview__head {
  padding: 0.55rem 0.7rem 0.35rem;
}

.escape-room-gm--display-preview .escape-room-gm-rail-card--display .escape-room-gm-display-preview__head h3 {
  margin: 0;
  font-size: 0.82rem;
}

.escape-room-gm--display-preview .escape-room-gm-display-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem 0.6rem;
}

.escape-room-gm--display-preview .escape-room-gm-display-preview__actions .btn-app-outline {
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.escape-room-gm--display-preview .escape-room-gm-display-preview__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 9.5rem;
  max-height: 17rem;
  background: #0f172a;
  overflow: hidden;
}

.escape-room-gm--display-preview .escape-room-gm-display-preview__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (min-width: 880px) {
  #admin-escape-room-section .escape-room-gm--display-preview .escape-room-gm-rail,
  #admin-floor-section .escape-room-gm--display-preview .escape-room-gm-rail {
    flex: 0 0 min(18rem, 32vw);
    width: min(18rem, 32vw);
  }
}

/* ---- Circular-node pipeline ---- */
.floor-pipeline {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  padding: 6px 8px 2px;
  margin-bottom: 6px;
}

.floor-pipeline__track {
  position: absolute;
  top: 25px;
  left: 9%;
  right: 9%;
  height: 3px;
  background: #e4e7ee;
  border-radius: 999px;
  z-index: 0;
}

.floor-pipeline__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #4f46e5);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.floor-pipeline__node {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  min-width: 0;
}

.floor-pipeline__dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eceef3;
  color: #9aa1b2;
  border: 3px solid var(--app-card-bg, #fff);
  box-shadow: 0 0 0 2px #e4e7ee;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.floor-pipeline__dot svg {
  width: 18px;
  height: 18px;
}

.floor-pipeline__label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #8a92a3;
  line-height: 1.2;
}

.floor-pipeline__node.is-done .floor-pipeline__dot {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 0 0 2px #16a34a;
}

.floor-pipeline__node.is-done .floor-pipeline__label {
  color: #15803d;
}

.floor-pipeline__node.is-current .floor-pipeline__dot {
  background: #4f46e5;
  color: #fff;
  box-shadow: 0 0 0 2px #4f46e5, 0 0 0 6px rgba(79, 70, 229, 0.18);
}

.floor-pipeline__node.is-current .floor-pipeline__label {
  color: #4338ca;
  font-weight: 700;
}

.floor-pipeline.is-abandoned .floor-pipeline__fill {
  background: #dc2626;
}

@media (max-width: 640px) {
  .floor-pipeline__label {
    font-size: 0.66rem;
  }
  .floor-pipeline__dot {
    width: 32px;
    height: 32px;
  }
  .floor-pipeline__track {
    top: 22px;
  }
}

.floor-badge {
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.floor-badge--overdue {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.floor-overview {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}

.floor-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.floor-section__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.floor-section__title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted, #667085);
}

.floor-section__hint {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: none;
}

.floor-section--mine .floor-section__head:not(.hidden) + .floor-bookings {
  margin-top: 2px;
}

.floor-section--admin:not(.hidden) {
  margin-top: 20px;
  padding: 14px 16px 16px;
  border: 1px solid var(--app-border, #e2e5ec);
  border-radius: 14px;
  background: var(--app-card-bg, #fff);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.floor-section--admin .floor-section__head {
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--app-border, #e2e5ec);
}

.floor-section--admin .floor-section__title {
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text, #101828);
}

.floor-admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floor-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--app-border, #e2e5ec);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--app-card-bg, #fff);
}

.floor-admin-row__main {
  min-width: 0;
}
