/* Five Star Diary - owner / manager dashboard */
body.app{background:var(--steel-2);font-size:16px}
.app-shell{display:grid;grid-template-columns:264px minmax(0,1fr);min-height:100vh}
.side{background:var(--ink);color:#C9D3E1;padding:20px 14px 24px;position:sticky;top:0;height:100vh;overflow-y:auto;display:flex;flex-direction:column;gap:4px}
.side .brand{display:block;padding:4px 8px 18px}
.side .brand img{height:34px;width:auto;display:block}
.side a{display:flex;align-items:center;gap:11px;padding:10px 10px;border-radius:10px;color:#C9D3E1;text-decoration:none;font-weight:600;font-size:15px}
.side a svg{width:19px;height:19px;flex:none;opacity:.85}
.side a:hover{background:#1A2A42;color:#fff}
.side a.on{background:var(--blue);color:#fff}
.side a.on svg{opacity:1}
.side .grp{font:700 11px/1 var(--text);letter-spacing:.1em;text-transform:uppercase;color:#7D8FA8;margin:16px 10px 6px}
.side .lockc{margin-left:auto;font-size:10px;padding:3px 6px;border-radius:6px;background:#22344F;color:#AFC2DA;font-weight:800;letter-spacing:.04em}
.side .grow{flex:1}
.kswitch{margin:0 4px 6px;position:relative}
.kswitch select{width:100%;font:700 15px/1.2 var(--text);color:#fff;background:#16253B;border:1px solid #2A3D5A;border-radius:12px;padding:12px 34px 12px 12px;appearance:none;-webkit-appearance:none;cursor:pointer}
.kswitch::after{content:"";position:absolute;right:14px;top:50%;width:8px;height:8px;border-right:2px solid #AFC2DA;border-bottom:2px solid #AFC2DA;transform:translateY(-70%) rotate(45deg);pointer-events:none}
.kname{margin:0 4px 6px;padding:12px;border-radius:12px;background:#16253B;color:#fff;font-weight:800;font-size:15px}
.kname small{display:block;color:#8EA0B8;font-weight:600;font-size:12px;margin-top:2px}
.amain{min-width:0;padding:22px clamp(16px,3vw,40px) 64px}
.atop{display:none}
.trialbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 16px;margin:0 0 18px;font-size:15px}
.trialbar.warn{background:var(--yellow-50);border-color:#F5DC8F}
.trialbar.bad{background:var(--tomato-50);border-color:#F7C3C5}
.trialbar .btn{margin-left:auto}
.ph{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:14px;margin:6px 0 22px}
.ph h1{font-size:clamp(28px,3.2vw,38px);margin:0}
.ph p{margin:6px 0 0;color:var(--muted)}
.ph .btn-row{gap:8px}
.panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;margin:0 0 16px}
.panel h2{font-size:20px;margin:0 0 12px;letter-spacing:-.01em}
.panel h3{font-size:17px;margin:0 0 8px}
.panel .sub{color:var(--muted);font-size:14.5px;margin:-6px 0 14px}
.pgrid{display:grid;grid-template-columns:repeat(12,1fr);gap:16px}
.c4{grid-column:span 4}.c5{grid-column:span 5}.c6{grid-column:span 6}.c7{grid-column:span 7}.c8{grid-column:span 8}.c12{grid-column:span 12}
@media (max-width:1100px){.c4,.c5,.c6,.c7,.c8{grid-column:span 12}}
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:0 0 16px}
.kpi{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}
.kpi .l{font-size:13px;color:var(--muted);font-weight:600}
.kpi .v{font:900 30px/1.1 var(--display);margin-top:4px;letter-spacing:-.02em}
.kpi .v small{font:600 14px var(--text);color:var(--muted)}
.kpi.ok .v{color:var(--mint-700)}.kpi.bad .v{color:var(--tomato-700)}.kpi.warn .v{color:#8A5A00}
@media (max-width:900px){.kpis{grid-template-columns:1fr 1fr}}
.strip{display:flex;gap:6px;flex-wrap:wrap}
.strip a{flex:1 0 34px;max-width:60px;text-align:center;text-decoration:none;color:var(--ink-2)}
.strip a i{display:block;height:36px;border-radius:9px;background:var(--steel);margin-bottom:5px}
.strip a.complete i{background:var(--mint)}.strip a.partial i{background:var(--yellow)}.strip a.missed i{background:var(--tomato)}.strip a.closed i{background:repeating-linear-gradient(45deg,#E2E8EF,#E2E8EF 4px,#F4F7FA 4px,#F4F7FA 8px)}
.strip a.today i{background:var(--blue-100);outline:2px solid var(--blue)}
.strip a span{font-size:11.5px;font-weight:700}
.legend{display:flex;flex-wrap:wrap;gap:14px;font-size:13px;color:var(--muted);margin-top:10px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.todo-list{list-style:none;margin:0;padding:0}
.todo-list li{display:flex;align-items:center;gap:12px;padding:11px 0;border-top:1px solid var(--steel)}
.todo-list li:first-child{border-top:0}
.todo-list .ic{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:var(--steel);color:var(--ink-2);flex:none}
.todo-list .ic svg{width:18px;height:18px}
.todo-list li.ok .ic{background:var(--mint-50);color:var(--mint-700)}
.todo-list li.bad .ic{background:var(--tomato-50);color:var(--tomato-700)}
.todo-list li.warn .ic{background:var(--yellow-50);color:#8A5A00}
.todo-list .t{flex:1;min-width:0}
.todo-list .t b{display:block;font-size:15px}
.todo-list .t small{color:var(--muted);font-size:13.5px}
.tbl{width:100%;border-collapse:collapse;font-size:14.5px}
.tbl th,.tbl td{text-align:left;padding:10px 10px;border-bottom:1px solid var(--steel);vertical-align:top}
.tbl th{font:700 12.5px/1.2 var(--text);color:var(--muted);text-transform:uppercase;letter-spacing:.05em;background:var(--steel-2)}
.tbl td.num,.tbl th.num{text-align:right;font-family:var(--mono);white-space:nowrap}
.tbl tr:hover td{background:#FAFCFE}
.tbl .chip{font-size:12px;padding:4px 8px}
.tscroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.empty-state{text-align:center;padding:36px 20px;color:var(--muted)}
.empty-state .sk-email-notice{max-width:520px;margin:14px auto 0;color:var(--ink-2)}
.empty-state .ic{width:56px;height:56px;border-radius:16px;background:var(--blue-50);color:var(--blue);display:grid;place-items:center;margin:0 auto 12px}
.empty-state .ic svg{width:28px;height:28px}
.empty-state b{display:block;color:var(--ink);font:800 18px/1.3 var(--display);margin-bottom:4px}
.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 14px}
.filters a{font-weight:700;font-size:14px;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid var(--line);text-decoration:none;color:var(--ink-2)}
.filters a.on{background:var(--ink);border-color:var(--ink);color:#fff}
.filters select{font:inherit;font-size:14px;padding:8px 10px;border-radius:10px;border:1px solid var(--line)}
/* charts */
.charts{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.chartcard{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}
.chartcard h3{display:flex;align-items:center;gap:8px;font-size:16px;margin:0 0 2px}
.chartcard h3 svg{width:18px;height:18px;color:var(--muted)}
.chartcard .meta{font-size:13px;color:var(--muted);margin:0 0 8px}
.chartcard svg.spark{width:100%;height:120px;display:block}
/* setup wizard */
.wizard{max-width:860px}
.steps-bar{display:flex;gap:6px;margin:0 0 22px;list-style:none;padding:0;counter-reset:s}
.steps-bar li{flex:1;font-size:13px;font-weight:700;color:var(--muted);counter-increment:s}
.steps-bar li::before{content:"";display:block;height:6px;border-radius:3px;background:var(--line);margin-bottom:8px}
.steps-bar li.done::before{background:var(--mint)}
.steps-bar li.on{color:var(--blue-700)}
.steps-bar li.on::before{background:var(--blue)}
.typegrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:8px}
.typegrid label{display:flex;align-items:center;gap:10px;border:2px solid var(--line);border-radius:12px;padding:12px;cursor:pointer;font-weight:600;font-size:14.5px;background:#fff}
.typegrid input{accent-color:var(--blue);width:18px;height:18px;flex:none}
.typegrid label:has(input:checked){border-color:var(--blue);background:var(--blue-50)}
.days{display:flex;flex-wrap:wrap;gap:6px}
.days label{display:inline-flex;align-items:center;gap:6px;border:2px solid var(--line);border-radius:10px;padding:8px 12px;font-weight:700;font-size:14px;cursor:pointer;background:#fff}
.days input{accent-color:var(--blue)}
.days label:has(input:checked){border-color:var(--blue);background:var(--blue-50)}
.counts{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}
.count{display:flex;align-items:center;gap:10px;border:1.5px solid var(--line);border-radius:14px;padding:12px;background:#fff}
.count .ic{width:38px;height:38px;border-radius:10px;background:var(--blue-50);color:var(--blue);display:grid;place-items:center;flex:none}
.count .ic svg{width:20px;height:20px}
.count b{flex:1;font-size:14.5px}
.count input{width:64px;text-align:center;font:700 18px var(--mono);padding:8px;border-radius:10px;border:1.5px solid var(--line)}
.rowform{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:8px;align-items:center;padding:10px 0;border-top:1px solid var(--steel)}
.rowform:first-of-type{border-top:0}
.rowform input,.rowform select{font:inherit;font-size:15px;padding:10px 12px;border-radius:10px;border:1.5px solid var(--line);width:100%;min-width:0}
.rowform .k{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);white-space:nowrap}
.rowform .k svg{width:18px;height:18px}
@media (max-width:760px){.rowform{grid-template-columns:1fr 1fr}.rowform > :first-child{grid-column:1/-1}}
.chk{display:inline-flex;align-items:center;gap:8px;font-size:14.5px;font-weight:600;cursor:pointer}
.chk input{width:18px;height:18px;accent-color:var(--blue)}
.ctask{display:grid;grid-template-columns:auto 1fr 150px;gap:12px;align-items:start;padding:12px 0;border-top:1px solid var(--steel)}
.ctask:first-of-type{border-top:0}
.ctask input[type=text],.ctask textarea,.ctask select{font:inherit;font-size:14.5px;padding:9px 11px;border-radius:10px;border:1.5px solid var(--line);width:100%}
.ctask textarea{min-height:58px;resize:vertical;margin-top:6px;color:var(--ink-2)}
@media (max-width:700px){.ctask{grid-template-columns:auto 1fr}.ctask select{grid-column:2}}
.pinslip{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.staffrow{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:12px 0;border-top:1px solid var(--steel)}
.staffrow:first-of-type{border-top:0}
.staffrow .nm{flex:1;min-width:180px}
.staffrow .nm b{display:block}
.staffrow .nm small{color:var(--muted)}
.staffrow form{display:inline-flex;gap:6px;align-items:center}
.staffrow input[name=pin]{width:84px;font:700 16px var(--mono);text-align:center;padding:8px;border-radius:10px;border:1.5px solid var(--line)}
.staffrow.inactive{opacity:.55}
.newstaff{display:grid;grid-template-columns:1.6fr 120px auto;gap:8px;align-items:center;margin:0 0 8px}
.newstaff input{font:inherit;font-size:15px;padding:11px 12px;border-radius:10px;border:1.5px solid var(--line);width:100%;min-width:0}
.newstaff input[name^=new_pin]{font-family:var(--mono);text-align:center;font-weight:700}
@media (max-width:600px){.newstaff{grid-template-columns:1fr 100px}.newstaff .chk{grid-column:1/-1}}
/* review */
.rvq{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;padding:12px 0;border-top:1px solid var(--steel)}
.rvq:first-of-type{border-top:0}
.yn{display:inline-flex;border:1.5px solid var(--line);border-radius:10px;overflow:hidden}
.yn label{padding:8px 14px;font-weight:700;font-size:14px;cursor:pointer;border-left:1.5px solid var(--line);background:#fff}
.yn label:first-child{border-left:0}
.yn input{position:absolute;opacity:0}
.yn label:has(input:checked){background:var(--blue);color:#fff}
.yn label:has(input:focus-visible){outline:3px solid var(--blue);outline-offset:-3px}
.suggest{font-size:12px;color:var(--blue-700);font-weight:700;display:block;margin-top:3px}
@media (max-width:640px){.rvq{grid-template-columns:1fr}}
.sumgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 0 14px}
.sumgrid div{background:var(--steel-2);border-radius:12px;padding:12px}
.sumgrid b{display:block;font:900 26px/1 var(--display)}
.sumgrid span{font-size:13px;color:var(--muted)}
@media (max-width:760px){.sumgrid{grid-template-columns:1fr 1fr}}
/* week diary */
.week{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}
.wcol{display:grid;gap:14px}
@media (max-width:1000px){.week{grid-template-columns:1fr}}
.dday{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;border-left:5px solid var(--line)}
.dday.complete{border-left-color:var(--mint)}.dday.partial{border-left-color:var(--yellow)}.dday.missed{border-left-color:var(--tomato)}.dday.closed{border-left-color:#C5D0DC;opacity:.85}
.dday header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px 6px}
.dday h3{font-size:17px;margin:0}
.dday h3 span{font:600 14px var(--text);color:var(--muted);margin-left:4px}
.dchecks{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:6px 14px}
.dcheck{background:var(--steel-2);border-radius:10px;padding:8px 10px;font-size:13px}
.dcheck .lbl{display:block;color:var(--muted);font-weight:700;font-size:11.5px;text-transform:uppercase;letter-spacing:.04em}
.dcheck b{display:flex;align-items:center;gap:5px;font-size:14px;margin-top:3px}
.dcheck b svg{width:15px;height:15px}
.dcheck small{color:var(--muted)}
.dcheck.ok b{color:var(--mint-700)}.dcheck.bad b{color:var(--tomato-700)}
.dprob{padding:6px 14px}
.dprob .lbl,.dday .lbl{font-size:12px;font-weight:800;color:var(--muted);margin:4px 0 4px}
.pitem{font-size:13.5px;margin:0 0 6px;line-height:1.45}
.pitem small{color:var(--muted)}
.dsign{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:10px 14px;background:var(--steel-2);font-size:12.5px;color:var(--muted);margin-top:6px}
.dsign b{display:inline-flex;align-items:center;gap:5px;color:var(--ink);font-size:13.5px}
.dsign b svg{width:15px;height:15px}
.dsign form{margin:0}
.dday.extras{border-left-color:var(--blue)}
.dday.extras .lbl,.dday.extras .pitem{padding:0 14px}
.dday.extras .pitem:last-child{padding-bottom:12px}
@media (max-width:560px){.dchecks{grid-template-columns:1fr 1fr}}
/* stickers (print) */
.sheet-a4{background:#fff;border:1px solid var(--line);border-radius:12px;padding:24px;max-width:900px}
.stk-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.stk{border:2.5px solid var(--blue);border-radius:12px;padding:12px 12px 10px;text-align:center;break-inside:avoid;page-break-inside:avoid;background:#fff}
.stk .top{font:500 11px/1 var(--mono);letter-spacing:.14em;color:var(--blue-700);margin-bottom:8px}
.stk .q svg{width:100%;height:auto;max-width:150px;display:block;margin:0 auto}
.stk b{display:block;font:900 16px/1.2 var(--display);margin-top:8px}
.stk small{display:block;font-size:11px;color:var(--muted)}
.stk .brandline{display:flex;justify-content:center;align-items:center;gap:6px;margin-top:6px;font-size:10px;color:var(--muted)}
.stk .brandline img{width:16px;height:16px}
.poster-a4{border:3px solid var(--blue);border-radius:20px;padding:28px;text-align:center;margin:0 0 20px;break-inside:avoid}
.poster-a4 h2{font-size:30px;margin:0 0 8px}
.poster-a4 .q svg{width:220px;height:220px}
@media (max-width:700px){.stk-grid{grid-template-columns:1fr 1fr}}
.hide-print{}
@media print{
  body.app{background:#fff}
  .side,.atop,.trialbar,.hide-print,.sk-flashes,.sk-demo-banner{display:none!important}
  .app-shell{display:block}
  .amain{padding:0}
  .sheet-a4{border:0;padding:0;max-width:none}
  .stk-grid{grid-template-columns:repeat(3,1fr);gap:6mm}
  @page{size:A4;margin:10mm}
}
@media (max-width:900px){
  .app-shell{grid-template-columns:1fr}
  .side{position:fixed;inset:0 auto 0 0;width:286px;z-index:60;transform:translateX(-102%);transition:transform .25s var(--ease);box-shadow:20px 0 40px -20px rgba(0,0,0,.5)}
  .side.open{transform:none}
  .atop{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--line);padding:10px 16px}
  .atop img{height:30px;width:auto}
  .atop button{background:var(--steel);border:0;border-radius:10px;padding:9px 12px;font:700 14px var(--text);display:flex;align-items:center;gap:8px;cursor:pointer;color:var(--ink)}
  .atop button svg{width:18px;height:18px}
  .scrim{position:fixed;inset:0;background:rgba(15,27,45,.45);z-index:55;display:none}
  .scrim.show{display:block}
}
.upsell{display:grid;grid-template-columns:auto 1fr;gap:20px;align-items:center;background:linear-gradient(135deg,var(--blue),#3B82F6);color:#fff;border-radius:22px;padding:28px}
.upsell h2{color:#fff;margin:0 0 6px}
.upsell p{color:#E3ECFF;margin:0 0 14px}
.upsell .big{width:72px;height:72px;border-radius:20px;background:rgba(255,255,255,.14);display:grid;place-items:center;color:var(--yellow)}
.upsell .big svg{width:38px;height:38px}
.qr-mini svg{width:150px;height:150px}
.copy{display:flex;gap:8px}
.copy input{flex:1;min-width:0;font:600 14px var(--mono);padding:10px 12px;border-radius:10px;border:1.5px solid var(--line);background:var(--steel-2)}
.dday.future{opacity:.6;border-left-color:var(--line)}
.dday.future header{padding-bottom:12px}
.strip{display:grid;grid-template-columns:repeat(14,1fr);gap:5px}
.strip a{max-width:none}
.legend{margin-bottom:22px}
@media (max-width:600px){.strip{grid-template-columns:repeat(7,1fr)}}
.trialbar > span{flex:1 1 220px}
.trialbar > svg{width:20px;height:20px;flex:none}
@media (max-width:900px){.side{box-shadow:none}.side.open{box-shadow:20px 0 40px -20px rgba(0,0,0,.5)}}
.panel .mt3{margin-top:32px}.panel .mt2{margin-top:24px}.panel .mt1{margin-top:12px}
