/* Shop N Save Liquor — Timecard
   Modern iOS-style glass, matched to shopnsaveliquor.ca:
   white canvas, pale mint #F3FAF2, deep burgundy #7B1E3B (primary),
   raspberry #C63466, blush #EED7DD, amber #FFAB43 for "today".
   Frosted-glass panels (translucent white + backdrop blur) float over
   a soft mint/blush gradient, like a modern iPhone app.
   The printable chart (#chartView) stays clean white on purpose —
   print CSS below only shows that chart. */
:root{
  --bg:#f7f8f7; --mint:#f3faf2; --blush:#eed7dd;
  --wine:#7b1e3b; --wine-deep:#5e142c; --raspberry:#c63466;
  --amber:#ffab43; --ink:#111827; --ink-soft:#1f2937; --muted:#6b7280;
  --line:#e5e7eb; --grey-btn:#f1f1f1;
  --glass:rgba(255,255,255,.68); --glass-strong:rgba(255,255,255,.82);
  --glass-border:rgba(255,255,255,.75);
  --shadow:0 8px 32px rgba(17,24,39,.08), 0 1px 3px rgba(17,24,39,.05);
  --radius:24px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:
    radial-gradient(720px 480px at 8% -8%, rgba(243,250,242,.95), transparent 65%),
    radial-gradient(680px 520px at 96% 4%, rgba(238,215,221,.9), transparent 60%),
    radial-gradient(560px 420px at 50% 110%, rgba(123,30,59,.07), transparent 65%),
    var(--bg);
  background-attachment:fixed;
  min-height:100vh;
}
/* Soft colour blobs behind the glass, fixed so they blur through panels. */
.bg{position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none}
.blob{position:absolute; border-radius:50%; filter:blur(70px); opacity:.55}
.blob.b1{width:420px; height:420px; left:-120px; top:-80px; background:#d9f2e3}
.blob.b2{width:380px; height:380px; right:-100px; top:12%; background:#f6dbe2}
.blob.b3{width:460px; height:300px; left:32%; bottom:-140px; background:#f3faf2}
.wrap{position:relative; z-index:1; max-width:980px; margin:0 auto; padding:20px 16px 48px}

/* Top brand bar — like the store header: pale mint glass, logo left. */
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:var(--glass); backdrop-filter:blur(20px) saturate(1.4); -webkit-backdrop-filter:blur(20px) saturate(1.4);
  border:1px solid var(--glass-border); border-radius:999px;
  padding:8px 10px 8px 14px; margin-bottom:16px; box-shadow:var(--shadow);
}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink); min-width:0}
.brand-logo{height:40px; width:auto; display:block}
.brand-text{font-weight:800; font-size:15px; letter-spacing:-.01em; white-space:nowrap}
.brand-text em{display:block; font-style:normal; font-weight:600; font-size:11px; color:var(--muted); letter-spacing:.06em; text-transform:uppercase}
.topbar-pill{
  flex:none; background:var(--wine); color:#fff; font-size:12px; font-weight:700;
  border-radius:999px; padding:7px 12px; white-space:nowrap;
}

/* Hero — frosted glass with a burgundy-tinted top edge. */
header.hero{
  position:relative; overflow:hidden;
  background:linear-gradient(135deg, rgba(255,255,255,.88), rgba(243,250,242,.72));
  backdrop-filter:blur(20px) saturate(1.4); -webkit-backdrop-filter:blur(20px) saturate(1.4);
  border:1px solid var(--glass-border); border-radius:var(--radius);
  padding:24px 24px 20px; box-shadow:var(--shadow);
}
header.hero::before{content:""; position:absolute; inset:0 0 auto 0; height:4px; background:linear-gradient(90deg, var(--wine), var(--raspberry), var(--amber))}
.hero h1{margin:0; font-size:13px; letter-spacing:.14em; text-transform:uppercase; color:var(--wine); font-weight:800}
.hero .big{font-size:clamp(32px,7vw,52px); font-weight:800; letter-spacing:-.03em; margin:10px 0 16px; color:var(--ink)}
.hero .big::after{content:""; display:block; width:64px; height:4px; border-radius:999px; background:var(--raspberry); margin-top:10px}
.stats{display:flex; gap:12px}
.stat{
  flex:1; background:rgba(255,255,255,.75); border:1px solid rgba(255,255,255,.9);
  border-radius:18px; padding:14px 16px; box-shadow:0 2px 10px rgba(17,24,39,.04);
}
.stat b{display:block; font-size:22px; letter-spacing:-.02em}
.stat span{font-size:11px; letter-spacing:.12em; color:var(--muted); font-weight:700}

/* Glass toolbar — one frosted pill holding the controls. */
.toolbar{
  display:flex; flex-wrap:wrap; gap:8px; align-items:center;
  background:var(--glass); backdrop-filter:blur(20px) saturate(1.4); -webkit-backdrop-filter:blur(20px) saturate(1.4);
  border:1px solid var(--glass-border); border-radius:20px; padding:10px; margin:16px 0; box-shadow:var(--shadow);
}
button,.btn{
  background:rgba(255,255,255,.85); color:var(--ink); border:1px solid var(--line);
  border-radius:999px; padding:10px 16px; cursor:pointer; font-size:14px; font-weight:600;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
button:hover{transform:translateY(-1px); box-shadow:0 4px 14px rgba(17,24,39,.10)}
button:active{transform:translateY(0) scale(.98)}
button.primary{background:var(--wine); color:#fff; border-color:var(--wine); font-weight:700; box-shadow:0 6px 16px rgba(123,30,59,.28)}
button.primary:hover{background:var(--wine-deep)}
input,select{
  background:rgba(255,255,255,.9); color:var(--ink); border:1px solid var(--line);
  border-radius:999px; padding:9px 12px; font-size:14px; font-family:inherit;
}
input:focus,select:focus,button:focus-visible{outline:2px solid rgba(198,52,102,.45); outline-offset:2px}
label{font-size:13px; color:var(--muted); font-weight:600}

/* Calendar — frosted glass panel, soft rounded day cells. */
.calendar{
  background:var(--glass); backdrop-filter:blur(20px) saturate(1.4); -webkit-backdrop-filter:blur(20px) saturate(1.4);
  border:1px solid var(--glass-border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow);
}
.cal-head,.week-row{display:grid; grid-template-columns:repeat(7,1fr); gap:8px}
.cal-head div{text-align:center; font-size:11px; letter-spacing:.12em; color:var(--muted); font-weight:700; padding:4px}
.week-row{margin-bottom:8px}
.day{
  background:rgba(255,255,255,.85); border-radius:18px; padding:10px; min-height:92px;
  cursor:pointer; text-align:left; border:2px solid transparent;
  transition:border-color .12s ease, transform .12s ease, box-shadow .12s ease;
  font-family:inherit; color:var(--ink);
}
.day:hover{border-color:var(--wine); transform:translateY(-1px); box-shadow:0 6px 16px rgba(123,30,59,.10)}
.day.dim{opacity:.45; background:rgba(241,241,241,.6)}
.day.today{border-color:var(--amber); box-shadow:0 0 0 3px rgba(255,171,67,.25)}
.day.today .num{color:var(--wine); font-weight:800}
.num{font-size:15px; font-weight:700}
.times{font-size:12px; margin-top:6px; line-height:1.4; word-break:break-all; color:var(--ink-soft)}
.add{color:var(--raspberry); font-size:13px; font-weight:600; margin-top:10px}
.badge{display:inline-block; background:var(--wine); color:#fff; font-weight:700; font-size:12px; border-radius:999px; padding:3px 10px; margin-top:6px}
.week-total{
  grid-column:1/-1; background:var(--mint); border:1px solid rgba(123,30,59,.08);
  border-radius:12px; padding:8px 12px; font-size:13px; color:var(--ink-soft);
}
.week-total b{color:var(--wine)}

/* Edit / signatures / saved months — matching glass cards. */
.edit,.sigs,.months{
  background:var(--glass); backdrop-filter:blur(20px) saturate(1.4); -webkit-backdrop-filter:blur(20px) saturate(1.4);
  border:1px solid var(--glass-border); border-radius:var(--radius); padding:20px; margin-top:16px; box-shadow:var(--shadow);
}
.edit h2,.sigs h2,.months h2{margin:0 0 12px; font-size:18px; letter-spacing:-.02em}
.edit form,.sigs form{display:flex; flex-wrap:wrap; gap:10px; align-items:end}
.status{font-size:13px; color:var(--muted)}
.status.ok{color:var(--wine)} .status.err{color:#b91c1c}
.months ul{list-style:none; margin:0; padding:0}
.months li{padding:8px 0; border-top:1px solid var(--line); font-size:14px}
.months li:first-child{border-top:0}
.months li button{background:var(--grey-btn); border-color:transparent; padding:6px 12px}

/* Printable chart — deliberately clean white, unchanged in structure. */
#chartView{display:none; background:#fff; color:#111; border-radius:24px; padding:24px; margin-top:16px; box-shadow:var(--shadow)}
#chartView.open{display:block}
#chartView h2{margin:0 0 4px}#chartView .print-sub{margin:4px 0}#chartView .print-totals{margin:8px 0 12px; font-size:15px}
#chartView .print-head,#chartView .print-days{display:grid; grid-template-columns:repeat(7,1fr); gap:6px}
#chartView .print-head div{text-align:center; font-size:11px; letter-spacing:.1em; color:#555; padding:4px}
#chartView .print-week{margin-bottom:8px; break-inside:avoid}
#chartView .print-day{border:1px solid #999; border-radius:8px; padding:6px; min-height:64px; text-align:left}
#chartView .print-day.dim{color:#999}
#chartView .print-num{font-size:14px; font-weight:700}#chartView .print-times{font-size:12px; margin-top:4px; line-height:1.4}
#chartView .print-badge{display:inline-block; background:#0f766e; color:#fff; font-weight:700; font-size:12px; border-radius:999px; padding:2px 9px; margin-top:4px}
#chartView .print-empty{color:#999; margin-top:8px}
#chartView .print-week-total{background:#e6f4f1; border:1px solid #999; border-radius:8px; padding:6px 10px; font-size:13px; margin-top:6px}
#chartView .print-month-total{margin-top:14px; font-size:15px}
#chartView .sigline{border-top:1px solid #111; margin-top:36px; padding-top:4px; display:flex; justify-content:space-between}
@media(max-width:600px){
  .day{min-height:74px; padding:7px; border-radius:14px}
  .times{font-size:11px}
  .stats{flex-direction:column}
  .brand-text{font-size:13px}
  .brand-logo{height:32px}
  .topbar-pill{display:none}
  .calendar{padding:12px}
}
@media print{
  body{background:#fff} body *{visibility:hidden}
  #chartView,#chartView *{visibility:visible}
  #chartView{position:absolute; inset:0; display:block!important; margin:0; border-radius:0; box-shadow:none}
}
