/* Office app, on top of ui.css. Calm, airy, no clutter. */
.stack-lg > * + * { margin-top: 18px; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .sp { flex: 1; }
.toolbar select.input { width: auto; min-width: 230px; height: 36px; font-size: 14px; border-radius: 980px; padding: 0 14px; }
.rowx { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.rowx:last-child { border-bottom: 0; }
.rowx .who { display: flex; align-items: center; gap: 11px; min-width: 190px; font-weight: 600; }
.rowx .det { color: var(--ink-2); font-size: 14px; flex: 1; min-width: 180px; }
.rowx .rb { display: flex; gap: 6px; flex-wrap: wrap; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 980px; font-size: 12px; font-weight: 500; background: var(--fill); color: var(--ink-2); vertical-align: middle; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.lunch { background: var(--lunch-soft); color: var(--lunch); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.brand { background: var(--brand-soft); color: var(--brand); }

/* Timesheet grid */
table.ts { width: 100%; border-collapse: collapse; font-size: 14px; }
.ts th { font-size: 12px; font-weight: 500; color: var(--muted); padding: 14px 10px 10px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; background: var(--surface); }
.ts th:first-child, .ts td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.ts td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--surface); }
.ts td.c { cursor: pointer; border-radius: 8px; }
.ts td.c:hover { background: var(--brand-soft); color: var(--brand); }
.ts td.flag { background: var(--lunch-soft); }
.ts td.open { color: var(--in); font-weight: 600; }
.ts td.zero { color: var(--muted); }
.ts .we { color: var(--muted); }
.ts td.tot { font-weight: 600; }
.ts tfoot td { font-weight: 600; border-top: 1px solid var(--border-strong); }
.ts .mk { color: var(--brand); font-size: 11px; margin-left: 2px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* Sheets (pop-ups): frosted backdrop, big rounded panel */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.32); backdrop-filter: blur(10px); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 14px 20px; z-index: 50; overflow: auto; animation: tcFade .2s ease-out; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: tcRise .28s cubic-bezier(.2,.8,.2,1); }
@keyframes tcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tcRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal.wide { max-width: 720px; }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 26px 28px 8px; }
.modal .mh h2 { font-size: 22px; margin: 0; flex: 1; letter-spacing: -.03em; }
.modal .mb { padding: 8px 28px 4px; }
.modal .mf { display: flex; align-items: center; gap: 8px; padding: 18px 28px 24px; flex-wrap: wrap; }
.modal .mf .sp { flex: 1; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.f3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .f2, .f3 { grid-template-columns: 1fr; } }
.sec { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.sec h4 { margin-bottom: 10px; }
.preview { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 10px; }

/* Apple-style switch: green when on */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { width: 51px; height: 31px; border-radius: 99px; background: var(--fill-2); position: relative; flex: none; transition: background .25s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3,.7,.3,1); box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.1); }
.switch input:checked + i { background: var(--go); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { box-shadow: var(--ring); }
.hist { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.lrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 8px; }

/* Setup code */
.bigcode { font: 600 clamp(44px, 9vw, 68px)/1 var(--font-display); letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; margin: 18px 0 8px; color: var(--ink); }

/* Add-on offer */
.lockcard { text-align: center; padding: 40px 24px; }
.lockcard ul { list-style: none; padding: 0; margin: 18px auto 24px; max-width: 420px; text-align: left; }
.lockcard li { padding: 7px 0 7px 28px; position: relative; color: var(--ink-2); }
.lockcard li::before { content: "✓"; position: absolute; left: 4px; color: var(--in); font-weight: 700; }

/* Setup checklist */
.checklist li { gap: 12px; }
.checklist .dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.checklist .done .dot { background: var(--go); border-color: var(--go); color: #fff; }
.checklist .done .txt { color: var(--muted); }
.checklist .txt { flex: 1; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: color-mix(in srgb, #1d1d1f 92%, transparent); backdrop-filter: blur(20px); color: #fff; padding: 12px 20px; border-radius: 980px; display: flex; gap: 14px; align-items: center; z-index: 70; box-shadow: var(--shadow-lg); font-size: 14px; max-width: calc(100vw - 32px); animation: tcRise .25s ease-out; }
.toast button { background: none; border: 0; color: #64d2ff; font: 600 14px var(--font); cursor: pointer; }
@media (max-width: 900px) { .toast { bottom: 88px; } }

/* Print */
.printonly { display: none; }
@media print {
  body { background: #fff; }
  .noprint, .side, .topbar, .mobile-nav, .toast, .modal-bg { display: none !important; }
  .shell { display: block; }
  body.print-area .shell { display: none !important; } /* the office layout is a screen tall: hide it so page 1 isn't blank */
  body.print-area .printonly { display: block; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; }
  .sheet-page { page-break-after: always; }
  .sheet-page:last-child { page-break-after: auto; }
  table.ts td, table.ts th { position: static !important; }
}
.sheet-page { font-size: 13px; }
.sheet-page h2 { font-size: 20px; }
.sheet-page table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.sheet-page td, .sheet-page th { border-bottom: 1px solid #e5e5e5; padding: 7px 4px; text-align: left; }
.sheet-page .r { text-align: right; }
.sheet-page .sig { margin-top: 36px; display: flex; gap: 40px; }
.sheet-page .sig div { flex: 1; border-top: 1px solid #999; padding-top: 4px; font-size: 12px; color: #555; }

/* Plan, top right: a quiet pill you can click */
.plan-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 980px; font: 500 13px var(--font); color: var(--brand); background: var(--brand-soft); white-space: nowrap; transition: background .2s; }
.plan-chip:hover { text-decoration: none; background: color-mix(in srgb, var(--brand) 18%, var(--surface)); }
@media (max-width: 600px) { .plan-chip { font-size: 12px; padding: 0 10px; } }

/* The company's own brand in the sidebar */
.co-brand { display: flex; align-items: center; gap: 10px; padding: 4px 12px 22px; color: var(--ink); text-decoration: none; min-height: 54px; }
.co-brand:hover { text-decoration: none; }
.co-brand .co-logo { max-height: 40px; max-width: 190px; object-fit: contain; display: block; }
.co-brand .co-name { font: 600 16px/1.2 var(--font-display); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; }
.co-brand .co-initial { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 600 15px var(--font); color: var(--brand-ink); background: var(--brand); }
.powered { padding: 8px 12px 0; font-size: 11.5px; color: var(--muted); }
.logo-box { width: 220px; height: 84px; border-radius: var(--r); background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.logo-box img { max-width: 200px; max-height: 70px; object-fit: contain; }
