/* Comptoir Abdelillah — Vert de Fès, kraft et chiffres au pochoir */
:root{
  --green:#0F6B4E; --green-2:#0B5640; --green-soft:#E2F0E9; --green-tint:#EEF6F2;
  --ink:#0F1F19; --ink-2:#33433D; --muted:#55655E; --faint:#8A9892;
  --bg:#F3F5F4; --surface:#FFFFFF; --line:#E1E7E4; --line-2:#EDF1EF;
  --kraft:#E3C493; --kraft-ink:#5B3F14;
  --saffron:#F0A81C; --saffron-soft:#FCEFD3; --saffron-ink:#7A5200;
  --brick:#B3402B; --brick-soft:#F8E3DE; --brick-ink:#8E2F1E;
  --slate-soft:#E9EDEF; --slate-ink:#3E4C55;
  --r-xl:24px; --r-lg:20px; --r:16px; --r-sm:12px;
  --sh:0 1px 2px rgba(15,31,25,.06);
  --sh-2:0 10px 30px -12px rgba(15,31,25,.28);
  --num:'Barlow Condensed','Readex Pro',sans-serif;
  --ease:cubic-bezier(.2,.8,.2,1);
  --safe-b:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{font-family:'Readex Pro',system-ui,sans-serif;background:var(--bg);color:var(--ink);font-size:15px;line-height:1.45;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none;padding:0}
a{color:var(--green)}
img{display:block}
:focus-visible{outline:3px solid rgba(15,107,78,.45);outline-offset:2px;border-radius:10px}
.num{font-family:var(--num);font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:.005em}
.ltr{direction:ltr;unicode-bidi:isolate}
.ic{flex:none;display:block}
[dir=rtl] .flip{transform:scaleX(-1)}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--muted)}
[hidden]{display:none!important}

/* ---------- views & motion ---------- */
.view{animation:enter .22s var(--ease) both}
@keyframes enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}

/* ---------- client shell ---------- */
.shell{max-width:560px;margin:0 auto;min-height:100vh;min-height:100dvh;position:relative;padding-bottom:calc(158px + var(--safe-b))}
.shell.no-nav{padding-bottom:calc(110px + var(--safe-b))}
@media (min-width:620px){body.client{background:#E7ECE9}.shell{background:var(--bg);box-shadow:0 0 0 1px var(--line)}}
.top{display:flex;align-items:center;gap:12px;padding:16px 18px 10px;padding-top:max(16px,env(safe-area-inset-top))}
.mark{width:42px;height:42px;flex:none}
.top-t{flex:1;min-width:0}
.top-t b{display:block;font-size:16px;font-weight:700;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-t span{display:block;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lang{display:flex;height:44px;padding:4px;gap:2px;border-radius:13px;background:var(--surface);box-shadow:var(--sh);flex:none}
.lang button{min-width:38px;padding:0 9px;border-radius:9px;font-weight:600;font-size:13.5px;color:var(--muted)}
.lang button[aria-pressed=true]{background:var(--ink);color:#fff}
.back{width:44px;height:44px;border-radius:13px;background:var(--surface);box-shadow:var(--sh);display:grid;place-items:center;flex:none;color:var(--ink)}
.bar{display:flex;align-items:center;gap:12px;padding:16px 18px 6px;padding-top:max(16px,env(safe-area-inset-top))}
.bar-t{flex:1;min-width:0}
.bar-t small{display:block;font-size:13px;color:var(--muted)}
.bar-t h1{margin:0;font-size:20px;font-weight:700;letter-spacing:-.02em;line-height:1.25}

.habit{margin:4px 18px 14px;background:var(--green);color:#fff;border-radius:var(--r-lg);padding:16px;padding-inline-start:18px;display:flex;align-items:center;gap:14px}
.habit b{display:block;font-size:15.5px;font-weight:600}
.habit span{display:block;font-size:13px;color:#BFDCCD;margin-top:2px}
.habit button{height:46px;padding:0 16px;border-radius:12px;background:var(--saffron);color:var(--ink);font-weight:700;font-size:14px;white-space:nowrap;flex:none;transition:transform .15s var(--ease)}
.habit button:active{transform:scale(.96)}

.search{margin:0 18px;height:50px;border-radius:14px;background:var(--surface);display:flex;align-items:center;gap:10px;padding:0 14px;box-shadow:var(--sh);border:1.5px solid transparent;transition:border-color .15s}
.search:focus-within{border-color:var(--green)}
.search input{flex:1;min-width:0;border:0;outline:0;background:none;font-size:16px;height:100%}
.search input::-webkit-search-cancel-button{display:none}
.search .x{width:36px;height:36px;display:grid;place-items:center;color:var(--muted);margin-inline-end:-8px}
.sticky{position:sticky;top:0;z-index:20;padding:8px 0 6px;background:linear-gradient(var(--bg) 85%,rgba(243,245,244,0))}
.chips{display:flex;gap:8px;overflow-x:auto;padding:12px 18px 4px;scrollbar-width:none;scroll-padding:18px}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;height:40px;padding:0 15px;border-radius:999px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:500;box-shadow:inset 0 0 0 1px var(--line);white-space:nowrap}
.chip[aria-pressed=true]{background:var(--ink);color:#fff;box-shadow:none;font-weight:600}

.sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:18px 22px 8px}
.sec-h h2{margin:0;font-size:15px;font-weight:700}
.sec-h span{font-size:13px;color:var(--muted)}
.list{margin:0 18px;background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--sh);overflow:hidden}
.row{display:flex;align-items:center;gap:12px;padding:11px 14px;position:relative}
.row+.row{border-top:1px solid var(--line-2)}
.ph{width:56px;height:56px;border-radius:13px;flex:none;background:var(--kraft);color:var(--kraft-ink);display:grid;place-items:center;font-family:var(--num);font-weight:700;font-size:14px;letter-spacing:.03em;overflow:hidden;text-transform:uppercase;text-align:center;line-height:1}
.ph img{width:100%;height:100%;object-fit:cover;background:#fff}
.pinfo{flex:1;min-width:0}
.pinfo b{display:block;font-size:14.5px;font-weight:600;line-height:1.25}
.pinfo small{display:block;font-size:12.5px;color:var(--muted);margin-top:1px}
.price{display:flex;align-items:baseline;gap:4px;margin-top:3px}
.price .num{font-size:21px;line-height:1.1}
.price em{font-style:normal;font-size:13px;color:var(--muted);font-weight:500}
.row.off{opacity:.55}
.fav{width:36px;height:44px;display:grid;place-items:center;color:var(--faint);flex:none;margin-inline-start:-6px}
.fav[aria-pressed=true]{color:var(--brick)}
.tag-out{font-size:12px;font-weight:600;color:var(--brick-ink);background:var(--brick-soft);padding:6px 10px;border-radius:999px;white-space:nowrap}
.add{width:46px;height:46px;border-radius:13px;background:var(--green-soft);color:var(--green);display:grid;place-items:center;flex:none;transition:transform .15s var(--ease),background .15s}
.add:active{transform:scale(.92)}
.step{display:flex;align-items:center;height:46px;border-radius:13px;background:var(--green);color:#fff;flex:none;animation:pop .2s var(--ease)}
@keyframes pop{from{transform:scale(.85);opacity:.4}to{transform:none;opacity:1}}
.step button{width:40px;height:46px;display:grid;place-items:center;color:inherit}
.step input{width:38px;height:46px;border:0;background:none;text-align:center;color:inherit;font-family:var(--num);font-weight:700;font-size:20px;outline:0;padding:0;-moz-appearance:textfield}
.step input::-webkit-outer-spin-button,.step input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.step.light{background:var(--green-tint);color:var(--ink);animation:none}
.step.light button{color:var(--green)}

/* bottom area */
.dock{position:fixed;left:0;right:0;bottom:0;z-index:40;pointer-events:none}
.dock-in{max-width:560px;margin:0 auto;background:var(--surface);box-shadow:0 -1px 0 var(--line);padding:10px 14px calc(8px + var(--safe-b));pointer-events:auto}
.cart-cta{height:60px;width:100%;border-radius:16px;background:var(--ink);color:#fff;display:flex;align-items:center;gap:12px;padding:0 8px;padding-inline-start:14px;font-weight:600;font-size:15px;text-decoration:none;transition:transform .15s var(--ease)}
.cart-cta:active{transform:scale(.985)}
.cart-cta .cnt{width:34px;height:34px;border-radius:10px;background:var(--saffron);color:var(--ink);display:grid;place-items:center;font-size:19px}
.cart-cta .sum{margin-inline-start:auto;height:46px;padding:0 14px;border-radius:12px;background:var(--green);display:flex;align-items:center;font-size:21px}
.cnt.bump{animation:bump .32s var(--ease)}
@keyframes bump{40%{transform:scale(1.25)}}
.tabs{display:flex;justify-content:space-around;padding-top:6px}
.tabs a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 0;font-size:11.5px;font-weight:600;color:var(--muted);text-decoration:none;border-radius:12px;min-height:48px;justify-content:center;position:relative}
.tabs a[aria-current=page]{color:var(--green)}
.tabs .dot{position:absolute;top:5px;inset-inline-start:calc(50% + 6px);width:8px;height:8px;border-radius:50%;background:var(--saffron)}
.btn{height:56px;border-radius:16px;font-weight:600;font-size:16px;display:flex;align-items:center;justify-content:center;gap:8px;width:100%;text-decoration:none;transition:transform .15s var(--ease),opacity .15s}
.btn:active{transform:scale(.985)}
.btn.pri{background:var(--green);color:#fff}
.btn.dark{background:var(--ink);color:#fff}
.btn.sec{background:var(--surface);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--line)}
.btn.ghost{color:var(--brick);height:48px}
.btn.sm{height:46px;font-size:14.5px;border-radius:13px;width:auto;padding:0 16px}
.btn[disabled],.btn[aria-disabled=true]{opacity:.45;pointer-events:none}
.btn .spin{width:20px;height:20px;border-radius:50%;border:2.5px solid rgba(255,255,255,.35);border-top-color:#fff;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.dock-sum{display:flex;justify-content:space-between;align-items:baseline;padding:0 4px 10px;font-size:14px;color:var(--muted)}
.dock-sum .num{font-size:22px;color:var(--ink)}

/* cards & forms */
.card{margin:0 18px 14px;background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--sh);padding:16px}
.card h3{margin:0 0 12px;font-size:15px;font-weight:700}
.line{display:flex;align-items:center;gap:12px;padding:10px 0}
.line+.line{border-top:1px solid var(--line-2)}
.line .ph{width:48px;height:48px;border-radius:12px;font-size:12.5px}
.line .lt{font-size:19px;min-width:72px;text-align:end}
.total{display:flex;justify-content:space-between;align-items:baseline;padding-top:12px;margin-top:4px;border-top:1.5px dashed var(--line)}
.total span{color:var(--muted);font-size:14px}
.total .mny .num{font-size:28px}
.field{display:block;margin-bottom:14px}
.field>span{display:block;font-size:13px;font-weight:600;color:var(--ink-2);margin-bottom:6px}
.field>small{display:block;font-size:12.5px;color:var(--muted);margin-top:6px}
.input{width:100%;height:52px;border-radius:14px;border:1.5px solid var(--line);background:var(--surface);padding:0 14px;font-size:16px;outline:0;transition:border-color .15s}
.input:focus{border-color:var(--green)}
.input[aria-invalid=true]{border-color:var(--brick)}
textarea.input{height:auto;min-height:88px;padding:12px 14px;resize:vertical;line-height:1.5}
select.input{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2355655E' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;padding-inline-end:40px}
[dir=rtl] select.input{background-position:left 16px center}
.pin-in{letter-spacing:.5em;font-family:var(--num);font-weight:700;font-size:24px;text-align:center}
.err{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:14px;background:var(--brick-soft);color:var(--brick-ink);font-size:14px;margin-bottom:14px;line-height:1.45}
.info{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:14px;background:var(--green-tint);color:var(--ink-2);font-size:13.5px;line-height:1.5;margin:0 18px 14px}
.info .ic{color:var(--green);margin-top:1px}
.kv{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:8px 0;font-size:14.5px}
.kv span{color:var(--muted)}
.kv b{text-align:end;font-weight:600}

/* welcome */
.welcome{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;padding:28px 22px calc(24px + var(--safe-b));max-width:560px;margin:0 auto}
.welcome .mark{width:56px;height:56px}
.welcome h1{font-size:30px;line-height:1.15;letter-spacing:-.03em;margin:26px 0 10px;font-weight:700}
.welcome p{font-size:16px;color:var(--ink-2);margin:0 0 22px;line-height:1.55}
.how{display:flex;flex-direction:column;gap:12px;margin-bottom:26px}
.how div{display:flex;gap:14px;align-items:center;font-size:15px}
.how i{font-style:normal;width:34px;height:34px;border-radius:50%;background:var(--green-soft);color:var(--green);display:grid;place-items:center;font-family:var(--num);font-weight:700;font-size:19px;flex:none}
.welcome .btns{margin-top:auto;display:flex;flex-direction:column;gap:10px}

/* slots */
.days{display:flex;gap:8px;overflow-x:auto;padding:12px 18px 4px;scrollbar-width:none}
.days::-webkit-scrollbar{display:none}
.day{flex:none;width:70px;height:80px;border-radius:16px;background:var(--surface);box-shadow:var(--sh);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:var(--ink)}
.day small{font-size:12px;font-weight:500;color:var(--muted)}
.day .num{font-size:28px;line-height:1}
.day span{font-size:11.5px;color:var(--muted)}
.day[aria-pressed=true]{background:var(--green);color:#fff;box-shadow:none}
.day[aria-pressed=true] small,.day[aria-pressed=true] span{color:#D5E8DE}
.day[disabled]{opacity:.42}
.slots{margin:10px 18px 0;background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--sh);overflow:hidden}
.slot-g{font-size:13px;font-weight:600;color:var(--muted);padding:12px 16px 6px;background:var(--surface)}
.slot{width:100%;display:flex;align-items:center;gap:14px;padding:0 16px;height:62px;border-top:1px solid var(--line-2);text-align:start;color:var(--ink);transition:background .15s}
.slot .num{font-size:23px;min-width:116px}
.slot .dots{display:flex;gap:4px}
.slot .dots i{width:9px;height:9px;border-radius:3px;background:var(--line)}
.slot .dots i.on{background:var(--ink)}
.slot .lab{flex:1;text-align:end;font-size:13px;font-weight:600;color:var(--muted)}
.slot .lab.calm{color:var(--green)}
.slot .lab.full{color:var(--brick)}
.slot[aria-pressed=true]{background:var(--green);color:#fff}
.slot[aria-pressed=true] .dots i{background:rgba(255,255,255,.28)}
.slot[aria-pressed=true] .dots i.on{background:#fff}
.slot[aria-pressed=true] .lab{color:#fff}
.slot[disabled]{opacity:.45}
.slot[disabled] .num{text-decoration:line-through}

/* ticket */
.ticket{margin:18px 18px 14px;background:var(--green);color:#fff;border-radius:26px;overflow:hidden;animation:rise .45s var(--ease) both}
@keyframes rise{from{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:none}}
.ticket-top{padding:22px 24px 18px;text-align:center}
.ticket-top small{font-size:14px;color:#BFDCCD}
.ticket-top .big{font-size:150px;line-height:.92;display:block;letter-spacing:-.01em}
.ticket-top p{margin:6px 0 0;font-size:15px}
.perf{height:0;border-top:2px dashed rgba(255,255,255,.35);margin:0 20px;position:relative}
.perf::before,.perf::after{content:"";position:absolute;top:-14px;width:26px;height:26px;border-radius:50%;background:var(--bg)}
.perf::before{left:-34px}.perf::after{right:-34px}
.ticket-bot{padding:16px 24px 20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px}
.ticket-bot small{display:block;font-size:12.5px;color:#BFDCCD}
.ticket-bot b{font-size:15px;font-weight:600}
.ticket-bot>div>.num{font-size:22px}
.ok-head{display:flex;align-items:center;gap:12px;padding:18px 18px 0;padding-top:max(18px,env(safe-area-inset-top))}
.ok-head .chk{width:46px;height:46px;border-radius:50%;background:var(--green);color:#fff;display:grid;place-items:center;flex:none;animation:pop .35s var(--ease)}
.ok-head b{display:block;font-size:20px;font-weight:700}
.ok-head span{display:block;font-size:14px;color:var(--muted)}
.track{display:flex;align-items:center}
.track .st{width:28px;height:28px;border-radius:50%;background:var(--line-2);flex:none;display:grid;place-items:center;color:#fff;transition:background .3s}
.track .st.on{background:var(--green)}
.track .ln{flex:1;height:3px;background:var(--line);margin:0 4px;border-radius:3px;transition:background .3s}
.track .ln.on{background:var(--green)}
.track-l{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:8px;font-size:12px;font-weight:600;color:var(--muted)}
.track-l span:nth-child(2),.track-l span:nth-child(3){text-align:center}
.track-l span:last-child{text-align:end}
.track-l span.on{color:var(--green)}

.chipst{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;padding:6px 11px;border-radius:999px;white-space:nowrap;transition:background .25s,color .25s}
.chipst.recue{background:var(--slate-soft);color:var(--slate-ink)}
.chipst.prep{background:var(--saffron-soft);color:var(--saffron-ink)}
.chipst.prete{background:var(--green);color:#fff}
.chipst.recup{background:var(--line-2);color:var(--muted)}
.chipst.annulee{background:var(--brick-soft);color:var(--brick-ink)}
.ocard{margin:0 18px 12px;background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--sh);padding:16px;display:block;color:inherit;text-decoration:none}
.ocard-h{display:flex;align-items:center;gap:12px}
.ocard-h>.num{font-size:34px;line-height:1;color:var(--green);min-width:56px}
.ocard-h div{flex:1;min-width:0}
.ocard-h b{display:block;font-size:15px;font-weight:600}
.ocard-h small{display:block;font-size:13px;color:var(--muted)}
.ocard-f{display:flex;gap:8px;margin-top:14px}
.ocard-f .btn{flex:1}

/* skeleton & empty */
.sk{background:linear-gradient(90deg,var(--line-2) 0%,#F7F9F8 50%,var(--line-2) 100%);background-size:200% 100%;animation:sh 1.2s linear infinite;border-radius:8px}
@keyframes sh{to{background-position:-200% 0}}
.sk-row{display:flex;gap:12px;align-items:center;padding:12px 14px}
.sk-row+.sk-row{border-top:1px solid var(--line-2)}
.empty{text-align:center;padding:40px 28px;color:var(--muted);font-size:14.5px;line-height:1.55}
.empty svg{margin:0 auto 12px;color:var(--faint)}
.empty b{display:block;color:var(--ink);font-size:17px;margin-bottom:4px;font-weight:600}
.empty .btn{margin:18px auto 0;width:auto;padding:0 20px;height:48px;font-size:15px}

/* net banner, toast, sheet */
.net{position:fixed;top:0;left:0;right:0;z-index:120;background:var(--ink);color:#fff;font-size:13.5px;padding:10px 16px;padding-top:max(10px,env(safe-area-inset-top));display:flex;align-items:center;gap:10px;justify-content:center;animation:enter .2s var(--ease)}
.net button{color:var(--saffron);font-weight:600;padding:6px 8px}
.toast{position:fixed;left:50%;bottom:calc(170px + var(--safe-b));transform:translate(-50%,16px);opacity:0;pointer-events:none;z-index:130;background:var(--ink);color:#fff;padding:12px 18px;border-radius:14px;font-size:14px;font-weight:500;max-width:min(90vw,420px);box-shadow:var(--sh-2);transition:opacity .2s,transform .25s var(--ease);display:flex;gap:10px;align-items:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.bad{background:var(--brick)}
.scrim{position:fixed;inset:0;z-index:90;background:rgba(15,31,25,.42);animation:fade .2s both}
@keyframes fade{from{opacity:0}}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:100;max-height:92vh;max-height:92dvh;overflow:auto;background:var(--surface);border-radius:26px 26px 0 0;padding:10px 18px calc(22px + var(--safe-b));box-shadow:var(--sh-2);animation:up .3s var(--ease) both;overscroll-behavior:contain}
@keyframes up{from{transform:translateY(100%)}}
.sheet .grip{width:40px;height:5px;border-radius:5px;background:var(--line);margin:0 auto 12px}
@media (min-width:760px){.sheet{left:50%;right:auto;top:50%;bottom:auto;width:min(560px,92vw);border-radius:24px;transform:translate(-50%,-50%);animation:zoom .22s var(--ease) both;max-height:88vh}.sheet .grip{display:none}@keyframes zoom{from{opacity:0;transform:translate(-50%,-47%)}}}
.sh-h{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px}
.sh-h h2{margin:0;font-size:20px;font-weight:700;letter-spacing:-.02em;flex:1}
.sh-h .close{width:44px;height:44px;border-radius:13px;background:var(--line-2);display:grid;place-items:center;flex:none}

/* ---------- admin ---------- */
body.admin{background:var(--bg)}
.adm{min-height:100vh;min-height:100dvh;display:flex}
.rail{width:96px;flex:none;background:var(--ink);color:#A9BDB3;display:none;flex-direction:column;align-items:center;gap:4px;padding:18px 0;position:sticky;top:0;height:100vh;height:100dvh}
@media (min-width:900px){.rail{display:flex}}
.rail .mark{margin-bottom:14px}
.rail a,.rail button{width:80px;min-height:62px;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11.5px;font-weight:600;color:inherit;text-decoration:none;text-align:center;line-height:1.2;position:relative}
.rail a[aria-current=page]{background:var(--green);color:#fff}
.rail a:hover{color:#fff}
.rail .cnt{position:absolute;top:6px;inset-inline-end:10px;background:var(--saffron);color:var(--ink);font-family:var(--num);font-weight:700;font-size:13px;min-width:20px;height:20px;border-radius:10px;padding:0 5px;display:grid;place-items:center}
.rail .bottom{margin-top:auto;display:flex;flex-direction:column;gap:4px;align-items:center}
.amain{flex:1;min-width:0;padding-bottom:calc(84px + var(--safe-b))}
@media (min-width:900px){.amain{padding-bottom:24px}}
.ahead{display:flex;align-items:center;gap:14px;padding:18px 18px 10px;padding-top:max(18px,env(safe-area-inset-top));flex-wrap:wrap}
@media (min-width:900px){.ahead{padding:22px 26px 12px}}
.ahead .mark{width:40px;height:40px}
@media (min-width:900px){.ahead .mark{display:none}}
.ahead .tt{flex:1;min-width:180px}
.ahead small{display:block;font-size:13px;color:var(--muted)}
.ahead h1{margin:0;font-size:23px;font-weight:700;letter-spacing:-.02em}
.awrap{padding:0 18px}
@media (min-width:900px){.awrap{padding:0 26px}}
.abar{position:fixed;left:0;right:0;bottom:0;z-index:50;background:var(--surface);box-shadow:0 -1px 0 var(--line);display:flex;padding:6px 6px calc(6px + var(--safe-b))}
@media (min-width:900px){.abar{display:none}}
.abar a,.abar button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:6px 0;font-size:11px;font-weight:600;color:var(--muted);text-decoration:none;min-height:52px;justify-content:center;position:relative}
.abar a[aria-current=page]{color:var(--green)}
.abar .cnt{position:absolute;top:2px;inset-inline-start:calc(50% + 6px);background:var(--saffron);color:var(--ink);font-family:var(--num);font-weight:700;font-size:12px;min-width:18px;height:18px;border-radius:9px;padding:0 4px;display:grid;place-items:center}
.kpis{display:flex;gap:22px;flex-wrap:wrap}
.kpi small{display:block;font-size:12.5px;color:var(--muted)}
.kpi>.num{font-size:30px;line-height:1.05}
.kpi.todo .num{color:var(--saffron-ink)}
.kpi.ready .num{color:var(--green)}
.adays{display:flex;gap:8px;overflow-x:auto;padding:4px 0 14px;scrollbar-width:none}
.adays::-webkit-scrollbar{display:none}
.aday{flex:none;height:44px;padding:0 14px;border-radius:12px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;white-space:nowrap}
.aday .num{font-size:17px}
.aday i{font-style:normal;font-family:var(--num);font-weight:700;font-size:14px;min-width:22px;height:22px;border-radius:11px;background:var(--line-2);display:grid;place-items:center;padding:0 5px}
.aday[aria-pressed=true]{background:var(--ink);color:#fff;box-shadow:none}
.aday[aria-pressed=true] i{background:var(--saffron);color:var(--ink)}
.split{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
@media (min-width:1000px){.split{grid-template-columns:minmax(330px,400px) minmax(0,1fr);align-items:start}.split .detail{position:sticky;top:16px}}
.split .detail{display:none}
@media (min-width:1000px){.split .detail{display:block}}
.sgroup+.sgroup{margin-top:14px}
.sgroup-h{display:flex;align-items:baseline;gap:10px;margin:0 4px 6px}
.sgroup-h>.num{font-size:22px}
.sgroup-h small{font-size:12.5px;color:var(--muted)}
.sgroup-h small.full{color:var(--brick)}
.olist{background:var(--surface);border-radius:var(--r);box-shadow:var(--sh);overflow:hidden}
.orow{width:100%;display:flex;align-items:center;gap:12px;padding:0 14px;min-height:62px;text-align:start;color:var(--ink);transition:background .15s}
.orow+.orow{border-top:1px solid var(--line-2)}
.orow>.num{font-size:22px;min-width:42px}
.orow .who{flex:1;min-width:0}
.orow .who b{display:block;font-size:14.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.orow .who small{display:block;font-size:12.5px;color:var(--muted)}
.orow[aria-current=true]{background:var(--green-tint)}
.orow[aria-current=true] .num{color:var(--green)}
.orow.dim{opacity:.6}
.panel{background:var(--surface);border-radius:var(--r-xl);box-shadow:var(--sh);padding:20px}
.od-h{display:flex;align-items:flex-start;gap:14px}
.od-h>.num{font-size:54px;line-height:.9;color:var(--green)}
.od-h div{flex:1;min-width:0}
.od-h b{display:block;font-size:18px;font-weight:700}
.od-h small{display:block;font-size:13px;color:var(--muted)}
.owe{margin-top:14px;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;background:var(--brick-soft);color:var(--brick-ink);font-size:13.5px}
.owe span{flex:1}
.owe a{color:var(--brick-ink);font-weight:600}
.prog{display:flex;justify-content:space-between;margin:16px 2px 6px;font-size:13px;font-weight:600;color:var(--muted)}
.pbar{height:7px;border-radius:7px;background:var(--line-2);overflow:hidden}
.pbar i{display:block;height:100%;background:var(--green);border-radius:7px;transform-origin:left;transition:width .3s var(--ease)}
.check{display:flex;align-items:center;gap:14px;min-height:54px;border-bottom:1px solid var(--line-2);width:100%;text-align:start;padding:4px 2px}
.check:last-child{border-bottom:0}
.check .box{width:26px;height:26px;border-radius:8px;border:2px solid var(--line);display:grid;place-items:center;color:transparent;flex:none;transition:background .15s,border-color .15s}
.check[aria-checked=true] .box{background:var(--green);border-color:var(--green);color:#fff}
.check .q{font-family:var(--num);font-weight:700;font-size:21px;min-width:50px}
.check .n{flex:1;font-size:14.5px}
.check .u{font-size:12.5px;color:var(--muted)}
.check[aria-checked=true] .q,.check[aria-checked=true] .n{color:var(--faint);text-decoration:line-through}
.acts{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}
.acts .btn{flex:1;min-width:140px}
.note-c{margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--saffron-soft);color:var(--saffron-ink);font-size:13.5px}
.tbl{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--sh);overflow:hidden;margin-bottom:14px}
.tbl-h{display:flex;align-items:center;gap:10px;padding:13px 16px;font-size:14.5px;font-weight:700;border-bottom:1px solid var(--line-2)}
.tbl-h small{margin-inline-start:auto;font-weight:500;color:var(--muted);font-size:13px}
.trow{display:flex;align-items:center;gap:12px;padding:10px 16px;min-height:60px;width:100%;text-align:start;color:var(--ink);text-decoration:none}
.trow+.trow{border-top:1px solid var(--line-2)}
.trow .ph{width:46px;height:46px;border-radius:11px;font-size:12px}
.trow .tt{flex:1;min-width:0}
.trow .tt b{display:block;font-size:14.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trow .tt small{display:block;font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trow .val{text-align:end}
.trow .val>.num{font-size:21px;display:block;line-height:1.1}
.trow .val small{font-size:12px;color:var(--muted)}
.trow .val .num.due{color:var(--brick)}
.trow.done{opacity:.5}
.trow.done .tt b{text-decoration:line-through}
.trow .pill{font-size:12px;font-weight:600;padding:5px 9px;border-radius:999px;background:var(--line-2);color:var(--muted)}
.trow .pill.out{background:var(--brick-soft);color:var(--brick-ink)}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.toolbar .search{margin:0;flex:1;min-width:200px;height:48px}
.toolbar select{width:auto;min-width:180px;height:48px}
.switch{width:52px;height:32px;border-radius:999px;background:var(--line);position:relative;flex:none;transition:background .2s}
.switch::after{content:"";position:absolute;top:4px;inset-inline-start:4px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:var(--sh);transition:inset-inline-start .2s var(--ease)}
.switch[aria-checked=true]{background:var(--green)}
.switch[aria-checked=true]::after{inset-inline-start:24px}
.swrow{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;font-size:14.5px}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.photo{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.photo .ph{width:84px;height:84px;border-radius:16px;font-size:16px}
.photo label{cursor:pointer}
.big-total{display:flex;align-items:baseline;gap:8px}
.big-total .num{font-size:44px;line-height:1;color:var(--brick)}
.stat-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.stat{background:var(--surface);border-radius:var(--r);box-shadow:var(--sh);padding:14px}
.stat small{display:block;font-size:12.5px;color:var(--muted)}
.stat>.num{font-size:28px;line-height:1.1}
@media (max-width:420px){.stat>.num{font-size:20px}}
.stat>.num{white-space:nowrap;display:block}
.chart{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--sh);padding:16px 16px 10px;margin-bottom:14px}
.chart h3{margin:0 0 2px;font-size:15px;font-weight:700}
.chart p{margin:0 0 10px;font-size:13px;color:var(--muted)}
.bars{display:flex;align-items:flex-end;gap:2px;height:180px;border-bottom:1px solid var(--line);position:relative}
.bars button{flex:1;height:100%;display:flex;align-items:flex-end;min-width:0;position:relative}
.bars button i{display:block;width:100%;background:var(--green);border-radius:4px 4px 0 0;min-height:2px;transition:opacity .15s}
.bars button.zero i{background:var(--line)}
.bars:hover button i,.bars:focus-within button i{opacity:.55}
.bars button:hover i,.bars button:focus-visible i{opacity:1}
.bars-x{display:flex;justify-content:space-between;font-size:11.5px;color:var(--muted);margin-top:6px}
.tip{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;font-size:12.5px;padding:6px 9px;border-radius:9px;white-space:nowrap;pointer-events:none;z-index:2;opacity:0;transition:opacity .12s}
.bars button:hover .tip,.bars button:focus-visible .tip{opacity:1}
.login{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px;background:var(--green)}
.login-c{width:100%;max-width:380px;background:var(--surface);border-radius:26px;padding:28px 24px;box-shadow:var(--sh-2)}
.login-c .mark{width:52px;height:52px;margin-bottom:16px}
.login-c h1{margin:0 0 6px;font-size:22px;font-weight:700;letter-spacing:-.02em}
.login-c p{margin:0 0 20px;color:var(--muted);font-size:14.5px}
.seg{display:flex;background:var(--line-2);border-radius:13px;padding:4px;gap:4px}
.seg button{flex:1;height:44px;border-radius:10px;font-weight:600;font-size:14px;color:var(--muted)}
.seg button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:var(--sh)}
@media print{.rail,.abar,.ahead .lang,.adays,.no-print{display:none!important}body{background:#fff}.tbl{box-shadow:none;border:1px solid #ccc;break-inside:avoid}}

.mny{white-space:nowrap}
.kpi>.num .mny,.kpi .num{white-space:nowrap}
