@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

:root {
  --bg-gradient-start: #f9fafb;
  --bg-gradient-end: #e0f2fe;
  --card-bg: #ffffff;
  --card-radius: 24px;
  --card-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  --primary: #097e52;
  --primary-soft: #e6f6ef;
  --border-subtle: #e5e7eb;
  --text-main: #111827;
  --text-primary: #0f172a;
  /* App bar / theme uses the GamePlan primary green. */
  --text-muted: #6b7280;
  --accent: #0a58ca;
  --accent-soft: #eef5ff;
  --surface: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.12), transparent 55%),
    linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
}

body.pwa-page {
  align-items: flex-start;
  padding: 0;
}

.card {
  width: 100%;
  max-width: 420px;
  background-color: var(--card-bg);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 28px 24px 22px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.login-card {
  margin: 0 auto;
}

.card-header {
  margin-bottom: 20px;
}
.card-header--compact {
  margin-bottom: 12px;
}
.card-header--compact .eyebrow {
  margin-bottom: 2px;
}

.pwa-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pwa-page-title-group {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}
.pwa-page-title-group h1,
.pwa-page-title-group .dashboard-title,
.pwa-page-title-group .pwa-title-inline {
  min-width: 0;
}
.pwa-page-back-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(9, 126, 82, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}
.pwa-page-back-btn:hover,
.pwa-page-back-btn:active {
  background: var(--primary-soft);
  border-color: rgba(9, 126, 82, 0.32);
}
.pwa-page-back-btn[hidden] {
  display: none !important;
}
.pwa-header-row .pwa-title-inline {
  font-size: 20px;
  line-height: 1.25;
  margin: 0;
  color: var(--primary);
  font-weight: 600;
}
.pwa-header-dropdown {
  flex-shrink: 0;
  min-width: 140px;
  max-width: 200px;
}
.pwa-header-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
}
.pwa-label--inline {
  display: block;
  margin-bottom: 4px;
}
.pwa-select--inline {
  width: 100%;
  margin-bottom: 0;
}

.pwa-sticky-header {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -2px -2px 12px;
  padding: 2px 2px 12px;
  background: var(--card-bg);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 180px;
  margin-bottom: 16px;
  object-fit: contain;
  object-position: left;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #4b5563;
  margin-bottom: 4px;
}

h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--primary);
}

.subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.section {
  margin-top: 20px;
}

.section + .section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

/* Google Sign-In button */
.google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 200px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  color: #111827;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.google-button:hover {
  background-color: #f3f4f6;
}

.google-button:active {
  background-color: #e5e7eb;
}

.google-login-wrap {
  justify-content: center;
  width: 100%;
}

#google-login-btn,
#google-login-btn > div {
  width: 100%;
}

.support-text {
  font-size: 13px;
  color: var(--text-muted);
}

.support-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.support-text a:hover {
  text-decoration: underline;
}

.error-text {
  color: #dc2626;
}

.install-wrapper {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.install-label {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
}

.install-button {
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background-color: #111827;
  color: #f9fafb;
  cursor: pointer;
  white-space: nowrap;
}

.install-button[disabled] {
  opacity: 0.6;
  cursor: default;
}

.helper-text {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

.ios-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

/* —— App shell (dashboard) —— */
.app-shell {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  background: var(--card-bg);
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border: none;
  display: flex;
  flex-direction: column;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-bar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.app-bar-icon:hover {
  background: rgba(255, 255, 255, 0.15);
}

.app-bar-icon:active {
  background: rgba(255, 255, 255, 0.25);
}

.app-bar-icon svg {
  flex-shrink: 0;
}

.app-bar-title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.app-bar-logo-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 36px;
  max-width: 100%;
  overflow: hidden;
}

.app-bar-logo {
  height: 32px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.app-bar-logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.app-bar-logo-fallback {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.app-bar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.app-bar-profile {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.profile-avatar--large {
  width: 56px;
  height: 56px;
  font-size: 22px;
  margin-bottom: 8px;
}

.app-content {
  flex: 1;
  padding: 20px 20px 28px;
  overflow-y: auto;
}

.app-shell .card-header {
  margin-bottom: 16px;
}

/* Dashboard (index) – header and layout */
.app-content--dashboard {
  padding: 16px 16px 24px;
  background: var(--surface);
}

.dashboard-header {
  margin-bottom: 20px;
}

.dashboard-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin: 0 0 4px;
  line-height: 1.25;
}

.dashboard-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Generic cards grid for dashboard shortcuts */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card-link .card-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.card-link .card-body {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Drawer (slide-out menu) */
.app-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.2s ease;
}

.app-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.app-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.app-drawer.is-open .app-drawer-backdrop {
  opacity: 1;
}

.app-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--card-bg);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
}

.app-drawer.is-open .app-drawer-panel {
  transform: translateX(0);
}

.app-drawer-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.app-drawer-header .profile-avatar--large {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--border-subtle);
}

.app-drawer-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}

.app-drawer-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.app-drawer-nav {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.app-drawer-section-label {
  padding: 8px 20px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.app-drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  transition: background-color 0.12s ease;
}

button.app-drawer-item {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.app-drawer-item:hover {
  background: var(--primary-soft);
}

.app-drawer-item--active {
  background: var(--primary-soft);
  color: var(--accent);
}

.app-drawer-item svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.pwa-install-nav-btn {
  justify-content: flex-start;
  margin-top: auto;
  flex-shrink: 0;
}

.app-install-alert {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin: 0 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(9, 126, 82, 0.18);
  background:
    linear-gradient(135deg, rgba(9, 126, 82, 0.09), rgba(10, 88, 202, 0.08)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.app-install-alert-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.app-install-alert-copy strong {
  color: var(--primary);
  font-size: 15px;
}

.app-install-alert-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.app-install-alert-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.app-install-alert .pwa-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  white-space: nowrap;
}

/* My bookings list */
.bookings-section {
  margin-top: 8px;
}

.bookings-loading {
  font-size: 14px;
  color: var(--text-muted);
  padding: 12px 0;
}

.bookings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.booking-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.booking-item .booking-resource {
  font-weight: 600;
  font-size: 15px;
  color: var(--primary);
  margin: 0;
  line-height: 1.3;
  min-width: 0;
}

.booking-item .booking-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.booking-item .booking-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.booking-item .booking-status.confirmed {
  background: #d1fae5;
  color: #065f46;
}

.booking-item .booking-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.booking-item .booking-status.cancelled,
.booking-item .booking-status.expired {
  background: #f1f5f9;
  color: #64748b;
}

/* PWA form (entity dropdown etc.) */
.pwa-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pwa-select {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 20px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 44px;
}

.pwa-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pwa-label--inline {
  font-size: 11px;
}
.pwa-select--inline {
  padding: 8px 32px 8px 10px;
  font-size: 13px;
  border-radius: 8px;
  min-height: 36px;
}

/* PWA tabs (Venue / Batches / Events) – segmented control */
.pwa-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 24px;
  background: var(--border-subtle);
  border-radius: 12px;
}

.pwa-tab {
  flex: 1;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.pwa-tab:hover {
  color: var(--primary);
}

.pwa-tab.is-active {
  color: var(--primary);
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pwa-tab-panel {
  display: block;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pwa-tab-panel[hidden] {
  display: none !important;
}

.pwa-section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.bookings-section {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.bookings-empty {
  color: var(--text-muted);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}

.bookings-empty a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.bookings-empty a:hover {
  text-decoration: underline;
}

/* PWA list/cards (venues, batches, events) */
.pwa-loading {
  font-size: 14px;
  color: var(--text-muted);
  padding: 16px 0;
}

.pwa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-list-search {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.pwa-list-search--sticky {
  position: sticky;
  top: var(--pwa-sticky-search-top, 96px);
  z-index: 7;
  margin: -4px 0 12px;
  padding: 8px 0 10px;
  background: var(--card-bg);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.pwa-list-search-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pwa-list-search-control {
  position: relative;
}

.pwa-list-search-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-main);
  font: inherit;
  font-size: 15px;
}

.pwa-list-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.14);
}

.pwa-list-search-empty {
  margin: 2px 0 0;
}

.pwa-card {
  display: flex;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pwa-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.pwa-card-media {
  flex-shrink: 0;
  width: 100px;
  min-height: 80px;
  background: var(--primary-soft);
}

.pwa-card-media--thumb {
  width: 64px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-card-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.pwa-card-body {
  flex: 1;
  padding: 12px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pwa-card--venue .pwa-card-media {
  width: 120px;
  min-height: 90px;
}

.pwa-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.pwa-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.35;
}

.pwa-card-cost {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}

.pwa-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  padding-top: 6px;
}

.pwa-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
}

.pwa-badge--open {
  background: #d1fae5;
  color: #065f46;
}

/* Gate checker */
.gate-card {
  max-width: 440px;
  margin: 0 auto 16px;
  padding: 14px 14px 16px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
}

.gate-card--result {
  padding-top: 12px;
}

.gate-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.gate-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.gate-icon-button {
  border: none;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
}

.gate-icon-button:active {
  transform: scale(0.96);
}

.gate-video-frame {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 3 / 4;
}

.gate-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gate-help-text {
  margin-top: 8px;
}

.gate-manual-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.gate-code-input {
  flex: 1;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-align: center;
}

.gate-lookup-btn {
  white-space: nowrap;
  padding-inline: 12px;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.gate-actions .pwa-button {
  flex: 1;
}

.gate-install-btn {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
}

/* Resource booking – slot picker */
.pwa-slots-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 4px 0 8px;
  margin-left: -4px;
  margin-right: -4px;
  padding-left: 4px;
  padding-right: 4px;
  background: var(--card-bg);
}
.pwa-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.pwa-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pwa-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.pwa-slots-range-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  flex: 1;
  min-width: 0;
}

/* Fixed footer so Next is always visible at bottom of viewport (overlay, not at scroll end) */
.pwa-booking-section {
  padding-bottom: 0;
}
.pwa-booking-spacer {
  min-height: 140px;
}
.pwa-booking-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  background: var(--card-bg, #fff);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}
.pwa-booking-footer .pwa-booking-summary {
  border-top: none;
  padding-top: 0;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pwa-booking-calendar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.pwa-day-card {
  flex: 1 1 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  background: var(--primary-soft);
}

.pwa-day-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.pwa-day-date {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

.pwa-slots-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pwa-slot-chip {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.pwa-slot-chip:hover:not(.disabled) {
  border-color: var(--accent);
  background: #eff6ff;
}

.pwa-slot-chip.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.pwa-slot-chip.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pwa-booking-summary {
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
}

.pwa-booking-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

.pwa-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
}

.pwa-btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
}

.pwa-btn-primary:hover {
  background: #1e293b;
}

.pwa-form-group {
  margin-bottom: 5px;
}

.pwa-form-group > label,
.pwa-form-half > label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 6px;
}

.pwa-page:not(.pwa-page--coach) .pwa-form-group,
.pwa-page:not(.pwa-page--coach) .form-field {
  margin-bottom: 12px;
}

.pwa-page:not(.pwa-page--coach) .pwa-form-group > label,
.pwa-page:not(.pwa-page--coach) .pwa-form-half > label,
.pwa-page:not(.pwa-page--coach) .form-field > .form-label,
.pwa-page:not(.pwa-page--coach) .pwa-label--inline,
.pwa-page:not(.pwa-page--coach) .pwa-event-quantity > label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.pwa-form-group input,
.pwa-form-group select,
.pwa-form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 15px;
}

.pwa-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 14px;
}

.pwa-form-group input:focus,
.pwa-form-group select:focus,
.pwa-form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.pwa-confirm-details {
  padding: 12px 0;
}

.pwa-confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.pwa-confirm-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 14px;
}

/* Batch form (coach PWA) */
.pwa-form-group--inline {
  display: flex;
  gap: 12px;
}

.pwa-form-half {
  flex: 1;
}

.pwa-day-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pwa-day-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  font-size: 12px;
}

.pwa-day-chip input[type="checkbox"] {
  margin: 0;
}

.pwa-day-chip.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.pwa-toggle-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.pwa-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

/* Attendance list (coach PWA) */
.attendance-list {
  margin-bottom: 72px; /* space for fixed footer button */
}

.attendance-row {
  flex-direction: column;
}

.attendance-main {
  margin-bottom: 8px;
}

.attendance-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attendance-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.attendance-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  font-size: 11px;
}

.attendance-chip input[type="radio"] {
  margin: 0;
}

.attendance-chip.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.attendance-notes-input {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  font-size: 13px;
}

@media (max-width: 480px) {
  .card {
    padding: 24px 18px 20px;
    border-radius: 20px;
  }
  h1 {
    font-size: 22px;
  }
}

/* Root/user PWA shell - teacher-app inspired, GamePlan branded */
:root {
  --bg-gradient-start: #f7fbf8;
  --bg-gradient-end: #e6f6ef;
  --card-bg: #fffefa;
  --card-radius: 24px;
  --card-shadow: 0 24px 54px rgba(9, 126, 82, 0.14);
  --primary: #097e52;
  --primary-strong: #075f40;
  --primary-soft: #e6f6ef;
  --accent: #0a58ca;
  --accent-soft: #eef5ff;
  --surface: #f7fbf8;
  --surface-soft: rgba(255, 254, 250, 0.92);
  --surface-strong: rgba(255, 254, 250, 0.98);
  --border-subtle: rgba(9, 126, 82, 0.14);
  --text-main: #192335;
  --text-primary: #192335;
  --text-muted: #6b7385;
  --app-bg: #f7fbf8;
}

html,
body {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Outfit", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(9, 126, 82, 0.22), transparent 44%),
    radial-gradient(circle at 24% 56%, rgba(10, 88, 202, 0.14), transparent 48%),
    linear-gradient(140deg, var(--app-bg, var(--bg-gradient-start)), var(--bg-gradient-end));
  line-height: 1.5;
}

body.pwa-page,
body.pwa-home-page {
  align-items: center;
  justify-content: center;
  padding: 0;
}

body.pwa-page::before,
body.pwa-home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(115deg, rgba(25, 35, 53, 0.06) 0%, rgba(25, 35, 53, 0) 60%),
    repeating-linear-gradient(90deg, rgba(9, 126, 82, 0.045), rgba(9, 126, 82, 0.045) 1px, transparent 1px, transparent 120px);
  pointer-events: none;
  z-index: -1;
}

.card {
  width: min(440px, 92vw);
  padding: 32px;
  border-radius: var(--card-radius);
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px);
}

.card-header {
  margin-bottom: 22px;
}

.brand-logo {
  height: 52px;
  max-width: 210px;
  margin-bottom: 18px;
}

h1,
.dashboard-title,
.pwa-section-title,
.gate-title {
  color: var(--text-main);
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
  font-weight: 700;
}

.subtitle,
.support-text,
.dashboard-subtitle,
.pwa-card-meta,
.booking-item .booking-meta {
  color: var(--text-muted);
}

.section + .section {
  border-top-color: var(--border-subtle);
}

.google-button {
  min-height: 48px;
  border-radius: 12px;
  border-color: rgba(9, 126, 82, 0.18);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.google-button:hover {
  border-color: rgba(9, 126, 82, 0.36);
  background: var(--primary-soft);
}

.app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  background: transparent;
}

.app-bar {
  min-height: 64px;
  padding: 12px 16px;
  background: rgba(255, 254, 250, 0.94);
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 10px 24px rgba(9, 126, 82, 0.12);
  backdrop-filter: blur(12px);
}

.app-bar-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(9, 126, 82, 0.24);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.app-bar-icon:hover,
.app-bar-icon:active {
  background: var(--primary-soft);
  color: var(--primary);
}

.app-bar-logo-wrap {
  min-height: 40px;
}

.app-bar-logo {
  height: 42px;
  max-width: 180px;
}

.app-bar-logo-fallback,
.app-bar-logo-text {
  color: var(--text-main);
  letter-spacing: 0;
}

.app-bar-actions {
  gap: 8px;
}

.profile-avatar {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.74);
  box-shadow: 0 6px 14px rgba(9, 126, 82, 0.16);
}

.app-content {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.app-content--dashboard {
  background: transparent;
  padding-top: 18px;
}

.dashboard-header {
  margin-bottom: 16px;
}

.dashboard-title {
  font-size: 24px;
}

.pwa-tabs {
  gap: 6px;
  padding: 5px;
  background: rgba(9, 126, 82, 0.12);
  border: 1px solid var(--border-subtle);
}

.pwa-tab {
  color: var(--text-muted);
}

.pwa-tab:hover,
.pwa-tab.is-active {
  color: var(--primary);
}

.pwa-tab.is-active {
  background: var(--surface-strong);
  box-shadow: 0 6px 14px rgba(9, 126, 82, 0.1);
}

.pwa-tab-panel,
.booking-item,
.pwa-card,
.gate-card,
.pwa-day-card,
.profile-view,
.photo-manager-view,
.transport-view,
.time-table-view {
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 28px rgba(9, 126, 82, 0.1);
}

.pwa-tab-panel,
.gate-card {
  backdrop-filter: blur(10px);
}

.pwa-card:hover {
  border-color: rgba(9, 126, 82, 0.42);
  box-shadow: 0 14px 28px rgba(9, 126, 82, 0.14);
}

.pwa-card-media,
.pwa-day-card {
  background: var(--primary-soft);
}

.pwa-card-title,
.pwa-card-cost,
.booking-item .booking-resource,
.pwa-booking-summary-row,
.app-drawer-name {
  color: var(--text-main);
}

.pwa-card-cta,
.support-text a,
.bookings-empty a,
.pwa-back-link {
  color: var(--accent);
}

.pwa-btn-primary {
  background: var(--primary);
}

.pwa-btn-primary:hover {
  background: var(--primary-strong);
}

.pwa-btn-outline {
  border: 1px solid rgba(9, 126, 82, 0.22);
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
}

.pwa-btn-outline:hover {
  background: var(--primary-soft);
}

.public-home-section {
  display: grid;
  gap: 16px;
}

.pwa-home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pwa-home-action {
  min-width: 0;
  min-height: 86px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-soft);
  color: var(--text-main);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(9, 126, 82, 0.09);
}

.pwa-home-action:hover {
  border-color: rgba(9, 126, 82, 0.34);
  background: linear-gradient(135deg, rgba(9, 126, 82, 0.12), rgba(10, 88, 202, 0.08));
  color: var(--primary);
}

.pwa-home-action-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.pwa-home-action-icon svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pwa-public-panel {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-soft);
  box-shadow: 0 10px 28px rgba(9, 126, 82, 0.1);
}

.pwa-public-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pwa-public-panel-header h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.pwa-public-panel-header a {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.pwa-event-hero {
  display: grid;
  gap: 12px;
}

.pwa-event-hero-media {
  width: 100%;
  min-height: 180px;
  max-height: 340px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-soft);
  box-shadow: 0 10px 28px rgba(9, 126, 82, 0.1);
}

.pwa-event-hero-media--logo {
  min-height: 160px;
}

.pwa-event-hero-img,
.pwa-event-hero-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.pwa-event-hero-logo {
  width: auto;
  max-width: min(300px, 80%);
  max-height: 140px;
}

.pwa-event-description,
.pwa-event-rich-text {
  display: grid;
  gap: 8px;
}

.pwa-event-description p,
.pwa-event-rich-text p,
.pwa-event-rich-text ul,
.pwa-event-rich-text ol {
  margin: 0;
}

.pwa-event-rich-text ul,
.pwa-event-rich-text ol {
  padding-left: 20px;
}

.pwa-event-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
}

.pwa-event-summary-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-soft);
  box-shadow: 0 8px 18px rgba(9, 126, 82, 0.08);
}

.pwa-event-summary-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pwa-event-summary-value {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
}

.pwa-event-option-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pwa-event-option-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.pwa-event-round {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.pwa-event-match {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(0, 1fr);
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.pwa-event-alert {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.pwa-event-selection-form {
  display: block;
}

.pwa-event-select-card {
  cursor: pointer;
}

.pwa-event-select-card.is-selected {
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(9, 126, 82, 0.14);
}

.pwa-event-select-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.pwa-event-select-body {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(82px, auto);
  align-items: start;
  gap: 12px;
  width: 100%;
}

.pwa-event-checkbox-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  cursor: pointer;
}

.pwa-event-checkbox-wrap input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pwa-event-checkmark {
  width: 26px;
  height: 26px;
  border: 2px solid var(--border-subtle);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pwa-event-checkbox:checked + .pwa-event-checkmark {
  border-color: var(--primary);
  background: var(--primary);
}

.pwa-event-checkbox:checked + .pwa-event-checkmark::after {
  content: "";
  display: block;
  width: 7px;
  height: 12px;
  margin: 4px auto 0;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pwa-event-select-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.pwa-event-quantity {
  justify-self: end;
  display: grid;
  gap: 4px;
  min-width: 74px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.pwa-event-quantity label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.pwa-event-quantity input {
  width: 74px;
  text-align: center;
}

.pwa-event-action-footer .pwa-booking-summary {
  display: grid;
  gap: 10px;
}

.pwa-event-register-summary,
.pwa-event-register-total {
  display: grid;
  gap: 8px;
}

.pwa-event-register-form {
  display: grid;
  gap: 18px;
}

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

.pwa-event-register-grid-full {
  grid-column: 1 / -1;
}

.pwa-event-form-section {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.pwa-event-form-section h2 {
  margin: 0;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
}

.pwa-event-selected-list {
  display: grid;
  gap: 12px;
}

.pwa-event-selected-card {
  display: block;
}

.pwa-event-selected-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pwa-event-selected-head strong {
  color: var(--primary);
  white-space: nowrap;
}

.pwa-event-custom-fields {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.pwa-event-pay-btn {
  margin-top: 2px;
}

@media (max-width: 620px) {
  .pwa-event-select-body {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .pwa-event-quantity {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .pwa-event-register-grid {
    grid-template-columns: 1fr;
  }
}

.app-drawer {
  z-index: 1000;
}

.app-drawer-backdrop {
  background: rgba(16, 24, 26, 0.2);
}

.app-drawer-panel {
  width: 288px;
  max-width: 86vw;
  padding: 28px 22px;
  gap: 18px;
  background:
    linear-gradient(160deg, rgba(9, 126, 82, 0.18), rgba(10, 88, 202, 0.08)),
    var(--surface-strong);
  border-right: 1px solid var(--border-subtle);
  box-shadow: 16px 0 40px rgba(16, 24, 26, 0.12);
}

.app-drawer-header {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.app-drawer-header .profile-avatar--large {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.74);
}

.app-drawer-email {
  color: var(--text-muted);
}

.app-drawer-nav {
  gap: 8px;
  padding: 0;
  overflow-y: auto;
}

.app-drawer-section-label {
  padding: 12px 2px 4px;
  color: var(--text-muted);
}

.app-drawer-item {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.app-drawer-item svg {
  color: var(--primary);
  opacity: 1;
}

.app-drawer-item:hover,
.app-drawer-item--active {
  background: linear-gradient(135deg, rgba(9, 126, 82, 0.12), rgba(10, 88, 202, 0.08));
  border-color: rgba(9, 126, 82, 0.34);
  color: var(--primary);
  transform: translateX(2px);
}

.pwa-select,
.pwa-input,
.pwa-form-group input,
.pwa-form-group select,
.pwa-form-group textarea,
.gate-code-input {
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main);
}

.pwa-select:focus,
.pwa-input:focus,
.pwa-form-group input:focus,
.pwa-form-group select:focus,
.pwa-form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(9, 126, 82, 0.14);
}

.pwa-slot-chip.selected {
  border-color: var(--primary);
  background: var(--primary);
}

.pwa-slot-chip:hover:not(.disabled) {
  border-color: var(--primary);
  background: var(--primary-soft);
}

@media (min-width: 900px) {
  .app-content {
    padding-top: 28px;
  }

  .app-content--dashboard {
    max-width: 820px;
  }
}

@media (max-width: 560px) {
  .app-install-alert {
    align-items: stretch;
    flex-direction: column;
  }

  .app-install-alert-actions {
    width: 100%;
    justify-content: stretch;
  }

  .app-install-alert .pwa-btn {
    flex: 1 1 auto;
  }

  .card {
    width: min(420px, calc(100vw - 32px));
    padding: 28px 22px 24px;
  }

  .app-bar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-bar-logo {
    height: 36px;
    max-width: 148px;
  }

  .app-content {
    padding: 18px 14px 24px;
  }

  .pwa-tab-panel {
    padding: 16px;
  }

  .pwa-home-actions {
    gap: 8px;
  }

  .pwa-home-action {
    min-height: 78px;
    font-size: 13px;
  }

  .pwa-public-panel {
    padding: 14px;
  }
}

/* Desktop PWA shell: mobile keeps the drawer overlay; wide screens get a persistent rail. */
@media (min-width: 960px) {
  :root {
    --desktop-sidebar-width: 280px;
    --desktop-topbar-height: 68px;
  }

  body.pwa-shell-page {
    display: block;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: clip;
    background:
      linear-gradient(180deg, rgba(247, 251, 248, 0.96), rgba(235, 244, 240, 0.94)),
      linear-gradient(135deg, rgba(9, 126, 82, 0.1), rgba(10, 88, 202, 0.07));
  }

  body.pwa-shell-page.pwa-login-visible #login-card {
    margin-top: clamp(12px, 5vh, 42px);
  }

  body.pwa-shell-page::before {
    background-image:
      linear-gradient(90deg, rgba(9, 126, 82, 0.04) 1px, transparent 1px),
      linear-gradient(180deg, rgba(9, 126, 82, 0.03) 1px, transparent 1px);
    background-position: var(--desktop-sidebar-width) var(--desktop-topbar-height);
    background-size: 72px 72px;
  }

  body.pwa-shell-page .app-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background: transparent;
  }

  body.pwa-shell-page .app-bar {
    position: fixed;
    top: 0;
    left: var(--desktop-sidebar-width);
    right: 0;
    min-height: var(--desktop-topbar-height);
    padding: 12px clamp(28px, 4vw, 56px);
    border-bottom: 1px solid rgba(9, 126, 82, 0.12);
    background: rgba(255, 254, 250, 0.92);
    box-shadow: 0 10px 28px rgba(9, 126, 82, 0.08);
    backdrop-filter: blur(18px);
    z-index: 80;
  }

  body.pwa-shell-page #menu-btn {
    display: none;
  }

  body.pwa-shell-page .app-bar-logo-wrap {
    flex: 1 1 auto;
  }

  body.pwa-shell-page .app-bar-logo {
    height: 44px;
    max-width: 240px;
  }

  body.pwa-shell-page .app-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--desktop-sidebar-width);
    visibility: visible;
    pointer-events: auto;
    z-index: 90;
    transition: none;
  }

  body.pwa-shell-page .app-drawer-backdrop {
    display: none;
  }

  body.pwa-shell-page .app-drawer-panel {
    position: static;
    width: 100%;
    max-width: none;
    height: 100%;
    transform: none;
    padding: 22px 18px 18px;
    gap: 18px;
    background:
      linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(240, 247, 243, 0.96)),
      linear-gradient(150deg, rgba(9, 126, 82, 0.08), rgba(10, 88, 202, 0.06));
    border-right: 1px solid rgba(9, 126, 82, 0.14);
    box-shadow: 14px 0 34px rgba(9, 126, 82, 0.1);
    transition: none;
  }

  body.pwa-shell-page .app-drawer-header {
    padding: 0 0 18px;
    min-height: 132px;
  }

  body.pwa-shell-page .app-drawer-nav {
    gap: 8px;
    padding: 0 4px 18px 0;
    margin-right: -4px;
    overflow-y: auto;
  }

  body.pwa-shell-page .app-drawer-item {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    line-height: 1.25;
  }

  body.pwa-shell-page .app-drawer-item:hover,
  body.pwa-shell-page .app-drawer-item--active {
    transform: none;
  }

  body.pwa-shell-page .app-content {
    width: calc(100% - var(--desktop-sidebar-width));
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 0 0 var(--desktop-sidebar-width);
    padding: calc(var(--desktop-topbar-height) + 30px) clamp(28px, 4vw, 56px) 52px;
    overflow: visible;
  }

  body.pwa-shell-page .app-content > * {
    width: 100%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
  }

  body.pwa-shell-page .app-content > .login-card {
    width: min(440px, 100%);
    max-width: 440px;
  }

  body.pwa-shell-page .app-content--dashboard {
    padding-top: calc(var(--desktop-topbar-height) + 28px);
  }

  body.pwa-shell-page .pwa-sticky-header {
    top: var(--desktop-topbar-height);
  }

  body.pwa-shell-page .pwa-list-search--sticky {
    top: calc(var(--desktop-topbar-height) + var(--pwa-sticky-search-top, 96px));
  }

  body.pwa-shell-page .dashboard-header,
  body.pwa-shell-page .pwa-header-row {
    align-items: center;
  }

  body.pwa-shell-page .dashboard-title,
  body.pwa-shell-page .pwa-title-inline {
    font-size: 28px;
  }

  body.pwa-shell-page .public-home-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  body.pwa-shell-page .pwa-home-actions {
    grid-column: 1 / -1;
    max-width: 720px;
    justify-self: center;
  }

  body.pwa-shell-page .pwa-public-panel {
    min-height: 100%;
  }

  body.pwa-shell-page .pwa-list,
  body.pwa-shell-page .bookings-list,
  body.pwa-shell-page .cards-grid {
    gap: 16px;
  }

  body.pwa-shell-page .pwa-card,
  body.pwa-shell-page .booking-item,
  body.pwa-shell-page .pwa-tab-panel,
  body.pwa-shell-page .gate-card {
    border-radius: 16px;
  }

  body.pwa-shell-page .pwa-card-media {
    width: 148px;
  }

  body.pwa-shell-page .pwa-card-media--thumb {
    width: 84px;
  }

  body.pwa-shell-page .pwa-booking-footer {
    left: var(--desktop-sidebar-width);
    padding-left: clamp(28px, 4vw, 56px);
    padding-right: clamp(28px, 4vw, 56px);
  }

  body.pwa-shell-page .pwa-booking-footer .pwa-booking-summary {
    max-width: 1180px;
  }
}

@media (min-width: 1280px) {
  :root {
    --desktop-sidebar-width: 292px;
  }

  body.pwa-shell-page .public-home-section {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
