:root {
  --bg: #0b1222; --panel: rgba(255,255,255,.06); --panel-b: rgba(255,255,255,.12);
  --text: #eef2fb; --muted: #8d9bb8; --blue: #7fa8f0; --coral: #ff6b5a; --navy: #25345a;
  --radius: 20px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: "Space Grotesk", system-ui, -apple-system, sans-serif; min-height: 100dvh; }
.bg { position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(60% 40% at 90% 0%, rgba(255,107,90,.22), transparent 70%),
  radial-gradient(70% 50% at 0% 20%, rgba(127,168,240,.22), transparent 70%),
  linear-gradient(180deg, #121c36, var(--bg) 60%); }
#app { max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 20px) 16px calc(96px + var(--safe-b)); }
h1 { font-size: 1.9rem; margin: 8px 0 4px; letter-spacing: -.02em; }
h2 { font-size: 1.1rem; margin: 24px 0 10px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.sub { color: var(--muted); margin: 0 0 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { justify-content: space-between; }

.card { background: var(--panel); border: 1px solid var(--panel-b); border-radius: var(--radius);
  padding: 16px 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
a.card, button.card { display: flex; width: 100%; text-align: left; color: inherit; font: inherit;
  text-decoration: none; align-items: center; justify-content: space-between; margin-bottom: 12px; cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s; }
a.card:hover, button.card:hover { border-color: var(--blue); box-shadow: 0 0 24px rgba(127,168,240,.25); }
a.card:active, button.card:active { transform: scale(.98); }
.card .t { font-weight: 700; font-size: 1.1rem; }
.card .s { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.chev { color: var(--blue); font-size: 1.5rem; }
.badge { background: rgba(255,107,90,.18); color: var(--coral); border-radius: 99px; padding: 3px 10px; font-size: .8rem; font-weight: 700; margin-right: 10px; white-space: nowrap; }

.btn { font: inherit; font-weight: 700; border: 0; border-radius: 16px; padding: 16px 20px; width: 100%; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #ff6b5a, #ff8d6b); box-shadow: 0 8px 28px rgba(255,107,90,.35);
  transition: transform .12s, opacity .2s; font-size: 1.05rem; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.ghost { background: var(--panel); border: 1px solid var(--panel-b); box-shadow: none; color: var(--text); }
.btn.danger { background: transparent; border: 1px solid rgba(255,107,90,.5); color: var(--coral); box-shadow: none; }
.btn.sm { width: auto; padding: 10px 16px; font-size: .9rem; border-radius: 12px; }
.back { text-decoration: none; display: inline-block; background: none; border: 0; color: var(--blue); font: inherit; font-size: 1rem; padding: 6px 0; cursor: pointer; }

label { display: block; color: var(--muted); font-size: .85rem; margin: 16px 0 6px; letter-spacing: .04em; }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: rgba(255,255,255,.07);
  border: 1px solid var(--panel-b); border-radius: 14px; padding: 14px 16px; outline: none; font-size: 1rem; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(127,168,240,.2); }
textarea { resize: vertical; min-height: 96px; }
select option { color: #000; }
.stack > * + * { margin-top: 12px; }

.hours { text-align: center; margin: 14px 0 6px; }
.hours .n { font-size: 6.5rem; font-weight: 700; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(180deg, #fff, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(127,168,240,.45)); font-variant-numeric: tabular-nums; }
.hours .u { color: var(--muted); }
.stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.stepper button { font: inherit; font-size: 2rem; padding: 12px 0; border-radius: 16px; cursor: pointer; color: var(--text);
  background: var(--panel); border: 1px solid var(--panel-b); transition: transform .1s, border-color .15s; }
.stepper button:active { transform: scale(.94); border-color: var(--coral); }
.datebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.datebar button { background: var(--panel); border: 1px solid var(--panel-b); color: var(--text); width: 44px; height: 44px; border-radius: 12px; font-size: 1.2rem; cursor: pointer; }
.datebar input { text-align: center; flex: 1; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chip { font: inherit; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--panel-b); background: var(--panel); color: var(--text); cursor: pointer; }

.day { color: var(--blue); font-weight: 700; margin: 20px 0 8px; display: flex; justify-content: space-between; }
.entry { margin-bottom: 8px; }
.entry .h { font-weight: 700; font-size: 1.3rem; margin-left: 12px; white-space: nowrap; }
.entry .exp { color: var(--muted); font-size: .75rem; }
.entry .c { color: var(--muted); font-size: .9rem; margin-top: 4px; overflow-wrap: anywhere; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.stat { text-align: center; padding: 14px 6px; }
.stat b { display: block; font-size: 1.4rem; color: var(--blue); }
.stat span { color: var(--muted); font-size: .8rem; }

nav { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + var(--safe-b));
  background: rgba(11,18,34,.8); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--panel-b); z-index: 5; }
nav div { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
nav a { text-align: center; color: var(--muted); text-decoration: none; padding: 8px 0; border-radius: 14px; font-size: .82rem; }
nav a svg { display: block; margin: 0 auto 2px; width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav a.on { color: var(--coral); background: rgba(255,107,90,.1); }

#toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--navy); border: 1px solid var(--blue); padding: 12px 20px; border-radius: 14px; transition: .25s; z-index: 10; max-width: 90vw; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { border-color: var(--coral); }
.err-t { color: var(--coral); margin-top: 10px; }

@media (min-width: 760px) {
  #app { max-width: 640px; padding-top: 48px; }
  .hours .n { font-size: 8rem; }
}
