/* HourMark — premium elevation layer (loaded after app.css) */

:root {
  --pine: #0b3229;
  --pine-mid: #16634f;
  --brand: #1a7a62;
  --brand-dark: #0f4a3c;
  --ink: #0e1c18;
  --muted: #5a6e66;
  --gold: #a8843a;
  --gold-soft: rgba(168, 132, 58, 0.14);
  --surface: rgba(255, 253, 250, 0.78);
  --surface-solid: #fffcf8;
  --line: rgba(11, 50, 41, 0.12);
  --go: #178a66;
  --stop: #c23b3b;
  --shadow: 0 22px 50px rgba(8, 36, 30, 0.14);
  --shadow-soft: 0 10px 28px rgba(8, 36, 30, 0.08);
  --radius: 26px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  letter-spacing: -0.01em;
}

.ambient {
  background:
    radial-gradient(ellipse 110% 75% at -5% -25%, rgba(26, 122, 98, 0.38), transparent 55%),
    radial-gradient(ellipse 90% 60% at 105% 0%, rgba(168, 132, 58, 0.16), transparent 52%),
    radial-gradient(ellipse 100% 55% at 50% 115%, rgba(11, 50, 41, 0.24), transparent 55%),
    linear-gradient(168deg, #f8fbf9 0%, #e2efe8 40%, #cfdfd6 100%);
}

/* Curtain depth — premium */
.curtain-panel {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.32), transparent 20%, transparent 80%, rgba(0,0,0,0.24)),
    linear-gradient(185deg, #1f7a62 0%, #0f4338 42%, #061a15 100%);
}

.app-shell {
  max-width: 430px;
  padding-left: 18px;
  padding-right: 18px;
}

html.app-ready .app-shell > .topbar,
html.app-ready .app-shell > .flash,
html.app-ready .app-shell > .main > * {
  animation: rise-in 0.55s var(--ease-out) both;
}

html.app-ready .app-shell > .main > *:nth-child(1) { animation-delay: 0.04s; }
html.app-ready .app-shell > .main > *:nth-child(2) { animation-delay: 0.1s; }
html.app-ready .app-shell > .main > *:nth-child(3) { animation-delay: 0.14s; }
html.app-ready .app-shell > .main > *:nth-child(4) { animation-delay: 0.18s; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

html.curtain-skip .app-shell > .topbar,
html.curtain-skip .app-shell > .flash,
html.curtain-skip .app-shell > .main > * {
  animation: none;
}

.topbar {
  padding: 10px 0 16px;
}

.brand {
  font-size: 1.28rem;
}

.profile-chip {
  background: rgba(255, 253, 250, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.card,
.auth-card,
.hero-status {
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  padding: 24px;
  border-radius: var(--radius);
}

/* Welcome — full-bleed brand stage, not a boxed SaaS card */
.welcome-stage {
  text-align: center;
  padding: 28px 8px 8px;
  margin-bottom: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-status {
  padding: 34px 24px 28px;
  position: relative;
  overflow: hidden;
}

.hero-status::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  right: -80px;
  top: -90px;
  background: radial-gradient(circle, rgba(201, 162, 74, 0.16), transparent 70%);
  pointer-events: none;
}

.status-on {
  background:
    linear-gradient(165deg, rgba(214, 242, 230, 0.95), rgba(255, 253, 250, 0.88));
  border-color: rgba(26, 122, 98, 0.28);
}

.status-break {
  background:
    linear-gradient(165deg, rgba(255, 244, 220, 0.95), rgba(255, 253, 250, 0.9));
  border-color: rgba(201, 162, 74, 0.35);
}

.status-label {
  letter-spacing: 0.14em;
  font-size: 0.7rem;
}

.clock-ring {
  width: min(252px, 72vw);
  height: min(252px, 72vw);
  margin: 14px auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.62), transparent 52%),
    conic-gradient(from 210deg, rgba(26, 122, 98, 0.18), rgba(201, 162, 74, 0.42), rgba(26, 122, 98, 0.22));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.55),
    0 20px 48px rgba(11, 50, 41, 0.14);
}

.clock-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: linear-gradient(165deg, rgba(255, 253, 250, 0.96), rgba(240, 247, 243, 0.92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.status-on .clock-ring {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.55), transparent 52%),
    conic-gradient(from 180deg, rgba(26, 122, 98, 0.6), rgba(168, 132, 58, 0.45), rgba(26, 122, 98, 0.6));
  animation: ring-glow 3.2s ease-in-out infinite;
}

.status-break .clock-ring {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,0.55), transparent 52%),
    conic-gradient(from 180deg, rgba(168, 132, 58, 0.6), rgba(240, 215, 154, 0.5), rgba(168, 132, 58, 0.6));
  animation: ring-glow 3.2s ease-in-out infinite;
}

@keyframes ring-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06); }
}

.clock-ring .status-time {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(2.35rem, 9.5vw, 2.9rem);
  font-variant-numeric: tabular-nums;
}

.btn {
  min-height: 52px;
  border-radius: 18px;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent 45%);
  pointer-events: none;
}

.btn-text::after,
.btn-ghost::after { display: none; }

.btn-huge {
  min-height: 68px;
  font-size: 1.2rem;
  letter-spacing: 0.07em;
  border-radius: 20px;
}

.btn-go {
  background: linear-gradient(180deg, #1f9470 0%, #147556 100%);
  box-shadow:
    0 16px 32px rgba(20, 117, 86, 0.32),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-stop {
  background: var(--surface-solid);
  color: #b33a3a;
  border: 1.5px solid rgba(179, 58, 58, 0.45);
  box-shadow: var(--shadow-soft);
}

.btn-stop::after {
  display: none;
}

.btn-primary {
  background: linear-gradient(180deg, #1f8a6c 0%, #134e40 100%);
  box-shadow:
    0 12px 24px rgba(15, 61, 50, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

.welcome-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #e8f5ef;
  background: linear-gradient(160deg, #1f8a6c, #0b3229);
  box-shadow:
    0 18px 36px rgba(11, 50, 41, 0.32),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

.welcome-kicker {
  letter-spacing: 0.2em;
  color: #6e8279;
}

.welcome-brand {
  font-size: clamp(3rem, 13vw, 3.8rem);
  background: linear-gradient(145deg, var(--pine) 15%, #1a7a62 70%, #8f6f2f 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}

.welcome-tagline {
  color: #8f6f2f;
  font-weight: 700;
  font-size: 1.15rem;
}

.welcome-copy {
  max-width: 26ch;
  font-size: 1.02rem;
}

.welcome-actions {
  margin-top: 32px;
  padding: 0 4px;
}

.welcome-actions .btn-primary {
  min-height: 56px;
  font-size: 1.05rem;
}

.auth-card {
  margin-top: 8px;
  padding: 28px 22px;
}

.bottom-nav {
  width: min(400px, calc(100% - 28px));
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  transform: translateX(-50%);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 22px;
  background: rgba(255, 253, 250, 0.86);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: 0 18px 40px rgba(8, 36, 30, 0.16);
  padding: 8px;
  border-top: 1px solid rgba(255,255,255,0.55);
}

.app-shell {
  padding-bottom: calc(108px + var(--safe-bottom));
}

.app-shell-auth {
  padding-bottom: calc(36px + var(--safe-bottom));
}

.bottom-nav a {
  border-radius: 16px;
  padding: 10px 6px 8px;
  font-size: 0.74rem;
}

.bottom-nav a.active {
  background: linear-gradient(180deg, rgba(26, 122, 98, 0.16), rgba(26, 122, 98, 0.08));
  color: var(--pine);
  box-shadow: inset 0 0 0 1px rgba(26, 122, 98, 0.12);
}

.pay-total {
  background: rgba(255, 252, 248, 0.95);
  border: 1px solid rgba(168, 132, 58, 0.28);
  border-left: 3px solid var(--gold);
}

.pay-total strong {
  font-size: 1.85rem;
  font-family: var(--font-display);
}

.profile-avatar {
  width: 88px;
  height: 88px;
  font-size: 2.2rem;
  box-shadow:
    0 16px 36px rgba(11, 50, 41, 0.28),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

.shift-row-link:hover,
.shift-row-link:active {
  background: linear-gradient(90deg, rgba(26, 122, 98, 0.08), transparent);
}

.tax-note {
  background: var(--gold-soft);
  border-color: rgba(168, 132, 58, 0.28);
  color: #6a5218;
  border-radius: 14px;
}

.chip {
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}

.chip.active {
  background: linear-gradient(180deg, rgba(26, 122, 98, 0.18), rgba(26, 122, 98, 0.1));
  border-color: rgba(26, 122, 98, 0.35);
  color: var(--pine);
}

.confirm-sheet {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(247, 241, 232, 0.98));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.confirm-title {
  font-family: 'Fraunces', var(--font-display), serif;
}

.btn-danger {
  background: linear-gradient(180deg, #a33a3a, #8b2e2e);
}

.flash {
  border-radius: 18px;
  backdrop-filter: blur(10px);
}

input:focus, select:focus {
  box-shadow: 0 0 0 4px rgba(26, 122, 98, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .status-on .clock-ring,
  .status-break .clock-ring,
  html.app-ready .app-shell > .topbar,
  html.app-ready .app-shell > .flash,
  html.app-ready .app-shell > .main > * {
    animation: none !important;
  }
}
