:root{
  --blue:#1565C0; --blue-d:#0D47A1; --bg:#EEF2F6; --card:#fff; --ink:#14233b; --muted:#5b6b82;
  --green:#2E7D32; --green-bg:#E8F5E9; --red:#C62828; --line:#D7DEE8; --amber:#B26A00;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--ink);
  font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  min-height:100vh; min-height:100dvh;
  padding-bottom:env(safe-area-inset-bottom);
}
[hidden]{display:none !important}

.top{
  position:sticky; top:0; z-index:5; display:flex; align-items:center; justify-content:space-between;
  gap:8px; padding:calc(10px + env(safe-area-inset-top)) 16px 10px;
  background:var(--blue); color:#fff;
}
.brand{display:flex; align-items:center; gap:10px; font-weight:700; font-size:18px}
.brand img{border-radius:8px; background:#fff}
.top-actions{display:flex; gap:8px}
.chip{
  appearance:none; border:1px solid rgba(255,255,255,.55); background:rgba(255,255,255,.14); color:#fff;
  border-radius:999px; padding:7px 14px; font-size:14px; font-weight:600; min-height:36px; cursor:pointer;
}

.wrap{max-width:460px; margin:0 auto; padding:16px 16px 28px; position:relative}
.card{
  background:var(--card); border-radius:18px; padding:20px;
  box-shadow:0 6px 18px rgba(20,35,59,.07); margin-bottom:14px;
}
h1{margin:0 0 4px; font-size:22px; color:var(--blue)}
.sub{margin:0 0 16px; color:var(--muted)}
label{display:block; font-weight:600; margin:12px 0 6px; font-size:14px}
input[type=text],input[type=email],input[type=password]{
  width:100%; min-height:50px; padding:12px 14px; font-size:17px; color:var(--ink);
  border:1.5px solid var(--line); border-radius:12px; background:#fff;
}
input:focus-visible,button:focus-visible{outline:3px solid #90CAF9; outline-offset:2px}
.passrow{position:relative}
.passrow input{padding-right:54px}
.eye{
  position:absolute; right:4px; top:4px; width:46px; height:42px; border:0; background:transparent;
  font-size:20px; color:var(--muted); cursor:pointer;
}
.check{display:flex; align-items:center; gap:10px; font-weight:500; margin:14px 0 4px}
.check input{width:22px; height:22px; accent-color:var(--blue)}
.error{color:var(--red); font-weight:600; margin:10px 0 0}

button.primary,button.secondary{
  width:100%; min-height:54px; border-radius:14px; border:0; font-size:17px; font-weight:700; cursor:pointer;
}
button.primary{background:var(--blue); color:#fff; margin-top:16px}
button.primary:active{background:var(--blue-d)}
button.primary[disabled]{opacity:.6}
button.secondary{background:#E3EAF3; color:var(--ink); margin-top:16px}
button.link{
  appearance:none; background:none; border:0; color:var(--blue); font-weight:600; font-size:15px;
  padding:10px 6px; min-height:44px; cursor:pointer;
}
button.link.center{display:block; margin:6px auto 0}

.who{display:flex; align-items:center; gap:14px}
.avatar{
  width:56px; height:56px; border-radius:50%; background:#DCE8F7; color:var(--blue); font-weight:800;
  display:flex; align-items:center; justify-content:center; font-size:20px; flex:0 0 56px;
  background-size:cover; background-position:center;
}
.who-text{flex:1; min-width:0}
.who-name{font-weight:700; font-size:18px; overflow-wrap:anywhere}
.who-role{color:var(--muted); font-size:14px; overflow-wrap:anywhere}

.clock{text-align:center; padding:14px 20px}
.clock-time{font-size:44px; font-weight:800; letter-spacing:1px; color:var(--blue); font-variant-numeric:tabular-nums}
.clock-date{color:var(--ink); font-weight:600}
.clock-date::first-letter{text-transform:uppercase}
.clock-note{color:var(--muted); font-size:13px}

.slots{display:grid; gap:12px; margin-bottom:12px}
.slot{
  display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%;
  min-height:72px; padding:14px 18px; border-radius:16px; border:2px solid var(--line);
  background:#fff; color:var(--muted); font-size:18px; font-weight:700; text-align:left; cursor:default;
}
.slot .t{font-variant-numeric:tabular-nums; font-size:20px}
.slot.done{background:var(--green-bg); border-color:#A5D6A7; color:var(--green)}
.slot.next{
  background:var(--blue); border-color:var(--blue); color:#fff; cursor:pointer; min-height:88px; font-size:21px;
  box-shadow:0 8px 20px rgba(21,101,192,.35);
}
.slot.next:active{background:var(--blue-d)}
.slot.next .t{font-size:15px; font-weight:600; opacity:.9}
.slot[disabled]{pointer-events:none}

.complete{
  display:grid; gap:4px; text-align:center; padding:14px; background:var(--green-bg); color:var(--green);
  border-radius:14px; margin-bottom:12px;
}
.msg{
  margin:10px 0; padding:12px 14px; border-radius:12px; font-weight:600; background:#E3F2FD; color:var(--blue-d);
}
.msg.ok{background:var(--green-bg); color:var(--green)}
.msg.warn{background:#FFF3E0; color:var(--amber)}
.msg.err{background:#FDECEA; color:var(--red)}
.hint{
  background:#FFF8E1; color:#6b4e00; border-radius:12px; padding:12px 14px; margin-bottom:14px; font-size:14px;
}

.loading{position:fixed; inset:0; background:rgba(238,242,246,.7); display:flex; align-items:center; justify-content:center; z-index:20}
.spin{width:44px; height:44px; border-radius:50%; border:5px solid #BBD3F2; border-top-color:var(--blue); animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}

.sheet{position:fixed; inset:0; z-index:30; background:rgba(10,20,40,.5); display:flex; align-items:flex-end; justify-content:center}
.sheet-card{
  width:100%; max-width:460px; background:#fff; border-radius:22px 22px 0 0; padding:22px 20px calc(20px + env(safe-area-inset-bottom));
}
.sheet-card h2{margin:0 0 6px; font-size:21px; color:var(--blue)}
.sheet-card p{margin:0 0 4px; color:var(--ink)}
.sheet-actions{display:grid; grid-template-columns:1fr 1fr; gap:12px}

@media (min-width:700px){
  .wrap{padding-top:28px}
  .sheet{align-items:center}
  .sheet-card{border-radius:22px}
}
@media (prefers-reduced-motion:reduce){ .spin{animation-duration:2s} }

.ver{margin:18px 0 0; text-align:center; font-size:12px; color:var(--muted)}
