:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e8eaf0;
  --soft: #fff7ed;
  --purple: #9333ea;
  --purple-dark: #7e22ce;
  --green: #22c55e;
  --green-soft: #eafff2;
  --amber: #f59e0b;
  --amber-soft: #fff7df;
  --blue: #3b82f6;
  --blue-soft: #eef6ff;
  --beach-yellow: #facc15;
  --sand: #d6b98c;
  --dark-sand: #a47c47;
  --lifeguard-red: #dc2626;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(249, 115, 22, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    #fff8f1;
  background-size: 42px 42px;
  color: var(--ink);
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 12px;
}

.phone {
  width: min(100%, 430px);
  min-height: min(900px, calc(100vh - 24px));
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(124, 45, 18, 0.16);
  padding: 14px;
}

.login-panel {
  width: min(100%, 430px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(124, 45, 18, 0.16);
  padding: 24px;
}

.login-logo {
  width: 240px;
  max-width: 80%;
  display: block;
  margin: 0 auto 18px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #92400e;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.login-form input {
  min-height: 46px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  background: #fffaf0;
}

.roster-select {
  font-size: 16px;
}

.login-submit {
  margin-top: 6px;
}

.login-error {
  margin: 0;
  color: var(--lifeguard-red);
  font-weight: 850;
}

.topbar,
.owner-tabs,
.employee-tabs,
.today-panel,
.card-head,
.legend,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar {
  justify-content: space-between;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 72px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.home-button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--beach-yellow);
  color: #78350f;
  border: 1px solid #f59e0b;
  font-size: 0.9rem;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 3px;
  color: #f97316;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 1.32rem;
  line-height: 1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.08rem;
  line-height: 1.15;
}

h3 {
  margin-bottom: 0;
  font-size: 0.98rem;
}

.owner-tabs,
.employee-tabs {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.owner-tabs {
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 3px;
}

.owner-tab,
.employee-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 850;
}

.owner-tab {
  flex: 1 1 0;
  min-width: 0;
  gap: 2px;
  min-height: 32px;
  padding: 4px 6px 4px 3px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  font-size: 0.64rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-tab span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 3px;
  border-radius: 50%;
  background: #ffedd5;
  color: #c2410c;
  font-weight: 950;
}

.owner-tab.active {
  background: var(--beach-yellow);
  color: #78350f;
  border-color: #f59e0b;
}

.owner-tab.active span {
  background: #fff7ad;
  color: #92400e;
}

.employee-tabs {
  margin-top: 16px;
}

.employee-tab {
  min-height: 32px;
  padding: 6px 10px;
  background: #ffffff;
  color: #475569;
  border: 1px solid #e5e7eb;
  font-size: 0.72rem;
}

.employee-tab:nth-child(2n) {
  background: #ffffff;
  color: #475569;
}

.employee-tab:nth-child(3n) {
  background: #ffffff;
  color: #475569;
}

.employee-tab.active {
  background: var(--beach-yellow);
  color: #78350f;
  border-color: #f59e0b;
}

.notice {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: #1d4ed8;
  font-size: 0.84rem;
  font-weight: 750;
}

.today-panel {
  margin-top: 10px;
  padding: 12px;
  border-radius: 15px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid var(--line);
}

.today-panel.status-free {
  background: var(--green-soft);
  border-color: #86efac;
  color: #166534;
}

.today-panel.status-held {
  background: var(--amber-soft);
  border-color: #fde68a;
  color: #92400e;
}

.today-panel.status-unavailable {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #6b7280;
}

.danger-title {
  color: var(--lifeguard-red);
}

.meter {
  width: 56px;
  height: 56px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.meter.danger-meter {
  background: #fee2e2;
  color: var(--lifeguard-red);
  border-color: #fecaca;
}

.meter strong {
  display: block;
  font-size: 1.28rem;
  line-height: 1;
}

.meter span {
  display: block;
  font-size: 0.68rem;
  font-weight: 850;
}

.days {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin: 9px 0;
}

.day {
  min-height: 50px;
  border-radius: 11px;
  background: white;
  color: #9ca3af;
  border: 1px solid var(--line);
  font-weight: 850;
}

.day strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1rem;
}

.day.active {
  background: var(--beach-yellow);
  color: #78350f;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(250, 204, 21, 0.26);
}

.day.active strong {
  color: #78350f;
}

.card {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  padding: 12px;
}

.text-button {
  color: #ea580c;
  background: #fff7ed;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.78rem;
  font-weight: 850;
}

.bay-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 9px;
}

.bay {
  position: relative;
  min-height: 57px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  font-weight: 850;
}

.shared-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  color: #9ca3af;
  font-size: 0.46rem;
  font-weight: 950;
  text-transform: uppercase;
}

.bay small {
  display: block;
  margin-top: 3px;
  font-size: 0.66rem;
  font-weight: 750;
}

.bay.free {
  background: var(--green-soft);
  border-color: #86efac;
  color: #16a34a;
}

.bay.held {
  background: var(--amber-soft);
  border-color: #fde68a;
  color: #d97706;
}

.bay.unavailable {
  background: #f9fafb;
  color: #9ca3af;
}

.owner-card .bay-grid {
  grid-template-columns: 1fr;
}

.owner-card .bay {
  min-height: 74px;
}

.legend {
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.free {
  color: var(--green);
}

.held {
  color: var(--amber);
}

.unavailable {
  color: #9ca3af;
}

.actions {
  margin-top: 8px;
}

.primary,
.secondary {
  min-height: 41px;
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 900;
}

.primary {
  flex: 1.2;
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: white;
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.24);
}

.actions .primary {
  width: 100%;
  min-height: 126px;
  border-radius: 20px;
  font-size: 1.2rem;
  line-height: 1.1;
}

.owner-actions .primary {
  width: 100%;
  min-height: 126px;
  border-radius: 20px;
  font-size: 1.25rem;
  line-height: 1.1;
}

.primary.claim-back {
  background: #d6b98c;
  color: #7f1d1d;
  box-shadow: 0 12px 26px rgba(164, 124, 71, 0.22);
}

.primary.employee-claimed {
  background: #e5e7eb;
  color: #f97316;
  border: 1px solid #d1d5db;
  box-shadow: 0 12px 26px rgba(156, 163, 175, 0.22);
}

.secondary {
  flex: 0.8;
  background: #f3f4f6;
  color: #374151;
}

.roster {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.roster .roster-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f9fafb;
  color: var(--muted);
  font-weight: 750;
}

.roster .roster-row-today {
  background: var(--amber-soft);
  color: #92400e;
  border: 1px solid #fde68a;
}

.roster-day-label {
  flex: 0 0 44px;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.roster-select {
  flex: 1;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #fed7aa;
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.roster-today {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--beach-yellow);
  color: #78350f;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ei-footer {
  width: min(100%, 430px);
  margin: 14px auto 0;
  padding: 10px 12px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 750;
  color: #9ca3af;
  letter-spacing: 0.02em;
}

.ei-footer a {
  color: #f97316;
  font-weight: 900;
  text-decoration: none;
}

.ei-footer a:hover,
.ei-footer a:focus {
  text-decoration: underline;
}

body.app-active .ei-footer {
  margin-top: 6px;
  padding: 6px 12px;
  font-size: 0.58rem;
  font-weight: 500;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}

body.app-active .ei-footer a {
  color: #f97316;
  font-weight: 600;
  opacity: 0.85;
}

.roster-button {
  width: 100%;
  min-height: 38px;
  margin-top: auto;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-weight: 900;
}

.roster-button.active {
  background: var(--beach-yellow);
  color: #78350f;
  border-color: #f59e0b;
}

@media (max-width: 460px) {
  .shell {
    padding: 0;
    place-items: stretch;
  }

  .phone {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    padding: 8px 8px 14px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 1.14rem;
  }

  .brand-logo {
    width: 62px;
    height: 46px;
  }

  .home-button {
    min-height: 44px;
    padding: 0 18px;
  }

  .eyebrow {
    font-size: 0.66rem;
  }
}
