/* 3B.X client portal — same tokens as the public site (assets/home.css), tuned for forms. */
:root {
  --night: #17100B; --paper: #FFF9F0; --day: #F5ECDF; --ink: #1E140D; --muted: #6E5E50; --rule: #E6D8C5;
  --amber: #FFB547; --coral: #E8573B; --green: #2E9E68;
  --f-display: "Fraunces", Georgia, serif; --f-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --radius: 14px; --gutter: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--day); color: var(--ink); font: 400 16px/1.5 var(--f-body); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.bar { display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); background: var(--night); color: var(--day); }
.brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font: 700 1.05rem var(--f-display); }
.brand span { color: var(--amber); font-weight: 600; }
.bar-actions { display: flex; gap: 14px; }
.link { background: none; border: 0; color: inherit; font: 600 .9rem var(--f-body); cursor: pointer; padding: 6px 2px; }

main { max-width: 760px; margin: 24px auto 60px; padding: 0 var(--gutter); }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.narrow { max-width: 440px; margin-top: 8vh; }
h1, h2 { font-family: var(--f-display); line-height: 1.1; margin: 0 0 10px; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.02rem; margin: 0 0 4px; }
.muted { color: var(--muted); }
.note { min-height: 1.4em; color: var(--muted); font-size: .92rem; margin: 8px 0 0; }

label { display: block; margin: 14px 0 0; font-weight: 600; font-size: .92rem; }
label > span { display: block; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: 400 1rem var(--f-body); color: var(--ink); background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 11px 12px; }
textarea { resize: vertical; }
/* Examples must not look like filled-in answers. */
::placeholder { color: #B9AC9E; font-style: italic; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--amber); outline: 2px solid rgba(255,181,71,.35); }
fieldset { border: 0; padding: 0; margin: 14px 0 0; }
legend { font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--green); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row.end { grid-template-columns: 1fr auto; align-items: end; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px;
  background: var(--night); color: var(--day); font: 700 .95rem var(--f-body); cursor: pointer; transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-google { width: 100%; margin-top: 12px; background: #fff; color: var(--ink); border: 1px solid var(--rule); }
.btn-google span[aria-hidden] { font: 800 1.1rem var(--f-display); color: var(--coral); }
#magic { display: grid; gap: 10px; }
#magic .btn { width: 100%; }
.or { text-align: center; color: var(--muted); margin: 16px 0 6px; }

.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 14px; overflow-x: auto; counter-reset: s; }
.steps li { flex: none; counter-increment: s; font-size: .85rem; font-weight: 600; color: var(--muted); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); }
.steps li::before { content: counter(s) " · "; }
.steps li[aria-current] { background: var(--night); color: var(--day); border-color: var(--night); }
.steps li.done { color: var(--green); }

.day { display: grid; grid-template-columns: 7.5rem 5.5rem repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--rule); }
.day > span { font-weight: 600; font-size: .92rem; }
.day .check { margin: 0; font-size: .85rem; }
.day input[type=time] { padding: 8px 6px; font-size: .9rem; }

.conn { padding: 14px 0; border-top: 1px solid var(--rule); }
.conn:first-of-type { border-top: 0; }
.copy code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; background: #fff; border: 1px dashed var(--amber); border-radius: 8px; padding: 6px 8px; font-size: .85rem; user-select: all; }

.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); }
.actions .note { margin: 0; flex: 1; text-align: center; }

.pill { padding: 3px 10px; border-radius: 999px; background: var(--rule); font-size: .85rem; }
.pill[data-status=submitted] { background: rgba(255,181,71,.35); }
.pill[data-status=live] { background: var(--green); color: #fff; }
.checklist { list-style: none; padding: 0; margin: 12px 0 16px; }
.checklist li { padding: 6px 0 6px 28px; position: relative; }
.checklist li::before { position: absolute; left: 0; font-weight: 800; }
.checklist li.ok::before { content: "✓"; color: var(--green); }
.checklist li.todo::before { content: "○"; color: var(--muted); }
.bookings { list-style: none; padding: 0; margin: 0; }
.bookings li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.bookings time { flex: none; width: 9.5rem; font-weight: 700; font-size: .9rem; }
.tag { margin-left: auto; font-size: .7rem; background: var(--amber); padding: 2px 7px; border-radius: 6px; }

/* Admin view */
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; display: block; overflow-x: auto; }
.admin-table th, .admin-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.admin-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.admin-table tbody tr { cursor: pointer; }
.admin-table tbody tr:hover, .admin-table tbody tr:focus-visible { background: #fff; }
.admin-table tr[data-status=submitted] td:nth-child(3) { color: var(--coral); font-weight: 700; }
.admin-table tr[data-status=live] td:nth-child(3) { color: var(--green); font-weight: 700; }
.brief { white-space: pre-wrap; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 14px; font-size: .85rem; max-height: 420px; overflow: auto; }

@media (max-width: 600px) {
  .card { padding: 18px 16px; }
  .row { grid-template-columns: 1fr; }
  .day { grid-template-columns: 1fr auto; }
  .day > span { grid-column: 1; } .day .check { grid-column: 2; }
  .day input[type=time] { grid-column: span 1; }
  .bookings li { flex-wrap: wrap; } .bookings time { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
