:root {
  /* Paradis brand: yellow #FCC440, sky blue #69B9D9, scoop red #C8303A, outline #2B2B2B */
  --yellow: #FCC440; --yellow-soft: #FFF3D1; --sky: #69B9D9; --blue: #1F7FAA;
  --bg: #FFFFFF; --card: #FFFFFF; --ink: #2B2B2B; --muted: #6E6E6E; --line: #EEE6D3;
  --accent: #1F7FAA; --accent-soft: #E3F3FA; --ok: #2F7A4C; --ok-soft: #E2F1E7;
  --bad: #C8303A; --bad-soft: #FBE4E5; --warn: #9A6A00; --warn-soft: #FFF3D1;
  --r: 14px; --tab-h: 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { padding: env(safe-area-inset-top) 0 calc(var(--tab-h) + env(safe-area-inset-bottom)); }
#app { max-width: 860px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 2px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 15px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sub { color: var(--muted); font-size: 14px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--blue); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.brand img { height: 40px; width: auto; }

.card { background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(43,43,43,.05); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (min-width: 700px) { .cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } }

button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 12px 16px; min-height: 46px;
  background: var(--yellow); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
button.plain { background: var(--accent-soft); color: var(--accent); }
button.danger { background: var(--bad); color: #fff; }
button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button:disabled { opacity: .45; cursor: default; }
button.block { width: 100%; }
input, select, textarea { font: inherit; font-size: 16px; width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
label.f { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
.chk { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; }
.chk input { width: 22px; height: 22px; }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: var(--sky); border-radius: 99px; }

/* checklist */
.list-head { cursor: pointer; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; border-top: 1px solid var(--line); }
.tick { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; min-height: 0; color: transparent; font-size: 20px; }
.tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.item .t { font-size: 16px; line-height: 1.3; }
.item.done .t { color: var(--muted); }
.meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; margin-top: 6px; cursor: pointer; }
.cam { position: relative; overflow: hidden; }
.cam input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* temps */
.reading { font-size: 28px; font-weight: 700; }
.reading.bad { color: var(--bad); }
.temp-in { display: flex; gap: 8px; margin-top: 10px; }
.temp-in input { font-size: 20px; text-align: center; }
.temp-in button { flex: none; }

/* labels */
.label-btn { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); text-align: left; display: block; padding: 14px; min-height: 76px; }
.label-btn small { display: block; color: var(--muted); font-weight: 500; margin-top: 4px; }
.label-btn.sel { border-color: var(--yellow); background: var(--yellow-soft); }
.stepper { display: flex; align-items: center; gap: 0; }
.stepper button { width: 48px; padding: 0; }
.stepper span { width: 54px; text-align: center; font-size: 20px; font-weight: 700; }
.preview { font-size: 15px; line-height: 1.35; border: 2px dashed var(--line); border-radius: 10px; padding: 12px; background: #fff; font-family: Arial, sans-serif; max-width: 320px; }

/* schedule */
.day { margin-bottom: 14px; }
.day h3 { margin-top: 6px; }
.shift { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.shift.mine { border-color: var(--sky); background: var(--accent-soft); }
.shift.open { border-style: dashed; }

/* login */
.login { max-width: 420px; margin: 8vh auto 0; text-align: center; }
.login .logo img { width: min(300px, 80%); height: auto; }
.login .logo { margin-bottom: 2px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.people button { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); min-height: 64px; }
.dots { display: flex; justify-content: center; gap: 12px; margin: 18px 0; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sky); }
.dots i.on { background: var(--sky); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pad button { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); font-size: 24px; min-height: 64px; }
.err { color: var(--bad); font-weight: 600; min-height: 22px; margin-top: 8px; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--blue); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.tabs a { flex: 1; max-width: 140px; color: #D6EDF7; text-decoration: none; text-align: center; font-size: 11px; font-weight: 600; padding: 9px 2px 8px; height: var(--tab-h); }
.tabs a svg { display: block; margin: 0 auto 4px; width: 24px; height: 24px; }
.tabs a.on { color: var(--yellow); }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(30, 20, 15, .45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 20px; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 30; font-weight: 600; max-width: 90vw; }
.toast.bad { background: var(--bad); }
.seg { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.seg button { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); white-space: nowrap; min-height: 40px; padding: 6px 14px; }
.seg button.on { background: var(--blue); color: #fff; border-color: var(--blue); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.empty { color: var(--muted); text-align: center; padding: 24px 8px; }
.photo-full { width: 100%; border-radius: 12px; }

/* print: only the label sheet */
#print-area { display: none; }
@media print {
  body { padding: 0; background: #fff; }
  #app, #tabs, #modal, #toast { display: none !important; }
  #print-area { display: block; }
  .lbl { page-break-after: always; break-after: page; font-family: Arial, sans-serif; color: #000; overflow: hidden; padding: 0.06in 0.08in; }
  .lbl:last-child { page-break-after: auto; break-after: auto; }
}
.lbl .n { font-weight: 800; line-height: 1.1; }
.lbl .k { display: flex; justify-content: space-between; gap: 4px; line-height: 1.2; }
.lbl .u { font-weight: 800; }
.lbl .s { opacity: .8; }

/* v2 additions */
.link { color: var(--accent); font-weight: 600; text-decoration: none; }
.small-link { font-size: 13px; }
.store-switch, .date-pick { width: auto; padding: 6px 10px; font-size: 14px; }
.tabs a { position: relative; }
.badge { position: absolute; top: 4px; left: 54%; background: var(--bad); border: 1.5px solid #fff; color: #fff; font-size: 10px; min-width: 17px; height: 17px; line-height: 17px; border-radius: 9px; padding: 0 4px; }
.badge.static { position: static; display: inline-block; margin-right: 6px; }
.banner { display: block; background: var(--yellow-soft); border-color: var(--yellow); color: var(--ink); text-decoration: none; }
.card.unread { border-color: var(--accent); }
.body { white-space: pre-wrap; margin-top: 8px; line-height: 1.45; font-size: 15px; }
.doc-body { max-height: 65vh; overflow: auto; }
.items { margin-top: 6px; }
.sec { margin: 18px -14px 4px; padding: 8px 14px; background: var(--sky); color: var(--ink); font-weight: 700; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.subt { font-weight: 700; color: var(--blue); margin: 14px 0 2px; font-size: 15px; }
.info { background: var(--yellow-soft); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 14px; line-height: 1.4; }
.tick.flag { background: var(--bad); border-color: var(--bad); color: #fff; }
div.tick { color: var(--muted); font-size: 16px; }
div.tick.on { color: #fff; }
.yn { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); min-width: 70px; }
.yn.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.yn.on.no { background: var(--warn); border-color: var(--warn); }
.hub { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.hub-i { font-size: 24px; width: 34px; text-align: center; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { text-align: center; padding: 12px 6px; }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 12px; color: var(--muted); }
.dash-row { padding: 6px 0; border-top: 1px solid var(--line); }
.dash-row:first-child { border-top: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.checks .chk { margin-top: 4px; font-size: 14px; }
.checks.days .chk { gap: 4px; }
.avail-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.avail-row input[type=time] { padding: 8px; font-size: 14px; }
.ed-item { border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 8px; background: var(--card); display: grid; gap: 6px; }
.ed-item.ed-section { background: var(--accent-soft); }
.ed-item textarea { padding: 8px 10px; font-size: 15px; resize: vertical; }
.ed-type { width: auto; padding: 6px 8px; font-size: 14px; margin-right: auto; }
.ed-opts { border-top: 1px dashed var(--line); padding-top: 6px; }
.sticky-save { position: sticky; bottom: -18px; background: var(--bg); padding: 10px 0; }
.doc-row { padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; gap: 8px; }
.doc-row:first-child { border-top: 0; }
.pdf { width: 100%; height: 65vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pad button.go { background: var(--yellow); color: var(--ink); font-size: 17px; }
details summary { cursor: pointer; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.video { width: 100%; max-height: 70vh; border-radius: 12px; background: #000; }
