:root { --ze: #269797; --ze-dark: #1c7474; --ink: #1f2933; --muted: #6b7785; --line: #d9e0e6; --bg: #f4f8f8; --err: #b42318; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { max-width: 680px; margin: 0 auto; padding: 16px; }
.brand { font-weight: 800; color: var(--ze); font-size: 22px; padding: 12px 0 4px; }
.brand img { display: block; height: 44px; width: auto; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 0 0 12px; color: var(--ze-dark); }
p.lead { color: var(--muted); margin: 0 0 8px; }
label.q, legend.q { display: block; font-weight: 600; margin: 14px 0 6px; padding: 0; }
.req::after { content: " *"; color: var(--err); }
input[type=text], input[type=email], input[type=tel], input[type=date], textarea, select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ze); border-color: var(--ze); }
fieldset { border: 0; padding: 0; margin: 0; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-weight: 400; }
.opt input { margin-top: 5px; flex: none; }
.readonly { background: #eef3f3; border-radius: 8px; padding: 10px 12px; }
.readonly b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.note { font-size: 14px; color: var(--muted); }
.policy { background: #f9fbfb; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; font-size: 15px; }
.policy ul { margin: 6px 0 0; padding-left: 20px; }
.errors { border: 1px solid var(--err); background: #fff4f2; color: var(--err); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.errors ul { margin: 6px 0 0; padding-left: 20px; }
.zf-box { border: 2px solid var(--ze); background: #eaf7f1; }
.zf-box h2 { margin-top: 0; color: var(--ze-dark); }
.zf-box input[type=text] { font-size: 20px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.zf-status { min-height: 1.4em; margin-top: 8px; font-size: 15px; }
.zf-status.ok { color: var(--ze-dark); }
.zf-status.bad { color: var(--err); }
.has-error input[type=text], .has-error input[type=email], .has-error input[type=tel], .has-error input[type=date], .has-error textarea, .has-error select { border-color: var(--err); }
button.primary { width: 100%; font: inherit; font-weight: 700; color: #fff; background: var(--ze); border: 0; border-radius: 10px; padding: 14px; cursor: pointer; }
button.primary:hover { background: var(--ze-dark); }
.hp { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }
.done { text-align: center; padding: 28px 20px; }
.done .tick { font-size: 44px; color: var(--ze); }

/* "Nhu cầu": goal checkboxes + weekday × part-of-day slot grid */
.hint { font-weight: 400; color: #6b7280; font-size: 0.9em; }
.slots { overflow-x: auto; margin: 6px 0 10px; }
.slots table { border-collapse: collapse; min-width: 280px; }
.slots th, .slots td { padding: 4px 14px; text-align: center; font-weight: 500; }
.slots tbody th { text-align: left; padding-left: 0; padding-right: 18px; white-space: nowrap; }
.gslot { display: flex; justify-content: center; padding: 4px; cursor: pointer; }
.gslot input { width: 20px; height: 20px; margin: 0; }
fieldset input[type=text] { margin-top: 6px; }
.has-error .hint { color: var(--err); }

/* ADR-Z74: 15-minute check-in slots (/dat-lich-hop) */
.slotday { margin-bottom: 14px; }
.slotday h2 { font-size: 16px; margin: 0 0 8px; }
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.slot { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; cursor: pointer; font-weight: 600; }
.slot input { margin: 0; flex: none; }
.slot:has(input:checked) { border-color: var(--ze); outline: 2px solid var(--ze); }
.slotnote { flex-basis: 100%; font-size: 12px; font-weight: 400; color: var(--muted); }
.slot.mine .slotnote { color: var(--ze); font-weight: 600; }
/* taken: greyed out and crossed with a diagonal line */
.slot.taken { cursor: not-allowed; color: #8a94a0; background: #f1f3f5 linear-gradient(to top right, transparent calc(50% - 1px), #aab2bb calc(50% - 1px), #aab2bb calc(50% + 1px), transparent calc(50% + 1px)); }
.slot.taken .slottime { text-decoration: line-through; }

/* ZE-327: program chooser — one tappable box per program, brand teal only (no default blue/purple links) */
.progs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.prog { position: relative; display: block; padding: 12px 40px 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.prog::after { content: "›"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 24px; line-height: 1; color: var(--ze); }
.prog:hover, .prog:focus-visible { border-color: var(--ze); background: #eaf7f1; outline: none; }
.prog:visited { color: var(--ink); }
.prog-t { display: block; font-weight: 700; color: var(--ze-dark); }
.prog-d { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.nw { white-space: nowrap; }
