:root { --ink:#2B2118; --muted:#6f6359; --bg:#FFF8F3; --card:#fff; --line:#eadfd6; --brand:#E8505B; --ok:#2E7D32; --bad:#C62828; --warn:#9E6A00; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--ink); font-size:17px; }
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; padding-bottom: 90px; }
header { display:flex; align-items:center; gap:10px; padding:12px 14px; position:sticky; top:0; background:var(--bg); z-index:2; border-bottom:1px solid var(--line); }
header h2 { flex:1; margin:0; font-size:21px; }
main { padding: 12px 14px; display:flex; flex-direction:column; gap:12px; }
.center { padding: 60px 24px; text-align:center; display:flex; flex-direction:column; gap:14px; align-items:center; }
.center h1 { margin:0; }
.logo { width:72px; height:72px; border-radius:20px; background:var(--brand); color:#fff; font-size:40px; display:grid; place-items:center; }
.logo.sm { width:34px; height:34px; border-radius:10px; font-size:20px; }
.muted { color:var(--muted); } .sm { font-size:14px; } .xs { font-size:12px; } .lg { font-size:20px; }
.ok { color:var(--ok); } .bad { color:var(--bad); } .warn { color:var(--warn); }
.card { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:14px; text-align:left; font:inherit; color:inherit; width:100%; }
button.card { cursor:pointer; }
.card.alert { background:#FDE8EC; border-color:#f3c2cc; }
.card p { margin:6px 0; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.row.end { justify-content:flex-end; }
.grow { flex:1; min-width: 0; }
.btn { background:var(--ink); color:#fff; border:0; border-radius:12px; padding:10px 16px; font:inherit; font-weight:600; cursor:pointer; }
.btn.ghost { background:transparent; color:var(--ink); border:1px solid var(--ink); }
.btn.big { padding:14px 22px; font-size:18px; }
.btn.fab { position:fixed; bottom:16px; left:50%; transform:translateX(-50%); width:min(600px, calc(100% - 28px)); background:var(--brand); box-shadow:0 6px 18px rgba(0,0,0,.15); }
.link { background:none; border:0; color:#1F4FB8; font:inherit; cursor:pointer; padding:6px 0; text-align:left; }
.link.danger { color:var(--bad); }
.icon { background:#f1ebe6; border:0; border-radius:10px; min-width:36px; height:36px; font-size:18px; cursor:pointer; }
header .icon { font-size:26px; background:none; }
.avatar { width:44px; height:44px; border-radius:50%; background:#FDE8EC; color:var(--brand); display:grid; place-items:center; font-weight:700; font-size:20px; }
.status { margin:10px 14px 0; padding:8px 12px; border-radius:10px; font-size:14px; }
.status.ok { background:#e6f4ea; color:var(--ok); } .status.warn { background:#fff4e0; color:var(--warn); }
.tabs { display:flex; gap:6px; padding:10px 14px 0; }
.tabs button { flex:1; padding:10px; border:1px solid var(--line); background:#fff; border-radius:12px; font:inherit; cursor:pointer; }
.tabs button.on { background:var(--ink); color:#fff; border-color:var(--ink); }
.rem { display:flex; gap:12px; border-left:6px solid var(--c); cursor:pointer; }
.rem.off { opacity:.55; }
.rem .time { font-size:24px; font-weight:800; color:var(--c); min-width:76px; }
.badge { display:inline-block; background:var(--t); color:var(--c); font-size:11px; font-weight:800; padding:2px 8px; border-radius:99px; }
.dot { width:18px; height:18px; border-radius:50%; background:var(--c); box-shadow:0 0 0 6px var(--t); margin:0 8px; }
label { font-size:15px; color:var(--muted); display:block; margin-top:4px; }
input, select, textarea { font:inherit; padding:11px 12px; border:1px solid #d9cdc3; border-radius:12px; width:100%; background:#fff; color:inherit; }
input[type=time], input[type=date] { width:auto; }
.row input { flex:1; width:auto; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { border:1px solid #d9cdc3; background:#fff; border-radius:99px; padding:8px 14px; font:inherit; font-size:15px; cursor:pointer; }
.chip.on { background:var(--c, var(--ink)); border-color:var(--c, var(--ink)); color:#fff; }
.week { display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; }
.week button { padding:10px 0; border-radius:10px; border:0; background:#eee8e3; font:inherit; font-weight:600; cursor:pointer; }
.week button.on { background:var(--c, #4E5BA6); color:#fff; }
.slot { border:1px solid var(--line); border-radius:14px; padding:10px; background:#fff; display:flex; flex-direction:column; gap:6px; }
.med b { min-width:34px; text-align:center; }
.qty { font-size:24px; font-weight:800; margin:4px 0; }
.hl { font-weight:700; color:var(--c); }
.err { color:var(--bad); min-height:1em; margin:0; }
.switch { display:flex; gap:10px; align-items:flex-start; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px; }
.switch input { width:22px; height:22px; margin-top:2px; flex:none; }
.toast { position:fixed; bottom:84px; left:50%; transform:translateX(-50%); background:var(--ink); color:#fff; padding:10px 16px; border-radius:12px; z-index:20; max-width:90%; font-size:15px; }
.dlg { position:fixed; inset:0; background:rgba(0,0,0,.35); display:grid; place-items:center; z-index:10; padding:16px; }
.dlg .box { background:#fff; border-radius:18px; padding:16px; width:min(460px, 100%); display:flex; flex-direction:column; gap:8px; max-height:90vh; overflow:auto; }
.editor textarea { resize: vertical; }
