/* Wellspin Hours, styled after Tally: plain white pages, Notion-style ink, Inter at 400–700,
   soft warm dividers, 7px controls and 10px cards, a blue primary button and a pink squiggle. */
:root {
  --ink: #37352f; --ink-2: #5f5e5a; --muted: #777672; --faint: #a8a7a3; --black: #000000; --white: #ffffff;
  --gray-bg: #f7f7f5; --hover: rgba(55, 53, 47, .08); --line: rgba(55, 53, 47, .09); --line-strong: rgba(55, 53, 47, .16);
  --blue: #0070d7; --blue-dark: #0062bd; --blue-soft: #e9f2fc; --blue-ring: rgba(58, 152, 255, .32);
  --pink: #f81ce5;
  --ok-soft: #d2f4d6; --ok-ink: #17812b; --warn-soft: #fbf3db; --warn-ink: #8a5a00; --danger-soft: #fdecec; --danger: #d1383d;
  --blue-ink: var(--blue-dark); --avatar-bg: var(--ink); --avatar-ink: var(--white);
  --shadow: 0 16px 48px rgba(55, 53, 47, .18); --backdrop: rgba(55, 53, 47, .4);
  /* names the templates already use */
  --bg: var(--white); --surface: var(--white); --line-soft: var(--line); --cream: var(--blue-soft); --accent: var(--blue);
  --r-sm: 4px; --r: 7px; --r-input: 8px; --r-card: 10px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
/* Dark mode: the same page in Notion's dark neutrals. Follows the system unless the
   appearance switch saved a choice on this device (data-theme on <html>, see theme.js). */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ink: #e8e8e6; --ink-2: #c6c6c3; --muted: #9c9c98; --faint: #6c6c69;
  --bg: #191919; --surface: #1f1f1f; --gray-bg: #232323; --hover: rgba(255, 255, 255, .07); --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .17);
  --blue: #4596ea; --blue-dark: #2f83d9; --blue-ink: #8ec1f5; --blue-soft: rgba(69, 150, 234, .17); --blue-ring: rgba(69, 150, 234, .38);
  --ok-soft: rgba(38, 160, 70, .22); --ok-ink: #82d390; --warn-soft: rgba(212, 150, 40, .2); --warn-ink: #e9c06a; --danger-soft: rgba(230, 80, 86, .2); --danger: #f0767b;
  --avatar-bg: #e8e8e6; --avatar-ink: #191919; --shadow: 0 16px 48px rgba(0, 0, 0, .55); --backdrop: rgba(0, 0, 0, .55);
} }
:root[data-theme="dark"] {
  --ink: #e8e8e6; --ink-2: #c6c6c3; --muted: #9c9c98; --faint: #6c6c69;
  --bg: #191919; --surface: #1f1f1f; --gray-bg: #232323; --hover: rgba(255, 255, 255, .07); --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .17);
  --blue: #4596ea; --blue-dark: #2f83d9; --blue-ink: #8ec1f5; --blue-soft: rgba(69, 150, 234, .17); --blue-ring: rgba(69, 150, 234, .38);
  --ok-soft: rgba(38, 160, 70, .22); --ok-ink: #82d390; --warn-soft: rgba(212, 150, 40, .2); --warn-ink: #e9c06a; --danger-soft: rgba(230, 80, 86, .2); --danger: #f0767b;
  --avatar-bg: #e8e8e6; --avatar-ink: #191919; --shadow: 0 16px 48px rgba(0, 0, 0, .55); --backdrop: rgba(0, 0, 0, .55);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
a:hover { text-decoration-color: var(--ink); }
a.quiet { text-decoration: none; }
strong, b { font-weight: 600; }
h1, h2, h3 { margin: 0 0 4px; color: var(--ink); }
h1 { font-size: 30px; line-height: 1.25; letter-spacing: -0.6px; font-weight: 600; }
h2 { font-size: 17px; line-height: 1.35; letter-spacing: -0.1px; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 24px; }
.mt-s { margin-top: 12px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 32px 96px; }
.wrap-narrow { max-width: 700px; }

/* brand: the Wellspin logo, then "/ Hours" like a Tally breadcrumb */
.logo { height: 18px; width: auto; display: block; color: var(--ink); flex: none; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
.brand .sub { color: var(--muted); font-weight: 400; }
.brand .sub::before { content: "/ "; color: var(--faint); }
.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 2px 0 28px; min-height: 48px; }
.topbar .small, .topbar .linkbtn { font-size: 14px; color: var(--ink-2); }
.spacer { flex: 1; }

.card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: 24px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* hero: a question-style heading on plain white, with Tally's pink squiggle under it */
.hero { padding: 8px 0 20px; }
.hero .kicker { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.hero .kicker .logo { height: 16px; }
.hero .kicker .sub::before { content: "/ "; color: var(--faint); }
.hero h1 { margin: 0; }
.hero .squiggle { display: block; margin: 4px 0 8px; }
.hero .sub { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero.hero-center { text-align: center; }
.hero.hero-center .kicker, .hero.hero-center .sub { justify-content: center; }

/* buttons: filled blue, outlined white, or plain text. 36px tall, 28px when small. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--r); padding: 0 14px; font: 500 14px/1 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--gray-bg); }
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); font-weight: 600; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger); }
.iconbtn { background: none; border: 0; padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; color: var(--muted); font: 400 13px/1.4 var(--font); text-decoration: none; }
.iconbtn:hover { background: var(--hover); color: var(--ink); }
.iconbtn.btn-danger:hover { color: var(--danger); }

label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin: 0 0 6px; }
label .muted { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-input);
  padding: 9px 12px; font: 400 15px/1.4 var(--font);
}
::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-ring); }
textarea { resize: vertical; min-height: 96px; }
.field { margin-bottom: 16px; }
.form-row { display: grid; gap: 12px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }
.hint { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 6px; }
.hint a { color: inherit; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: auto; accent-color: var(--blue); }

.flash { border-radius: var(--r-input); padding: 11px 14px; margin: 0 0 20px; font-size: 14px; font-weight: 500; line-height: 1.45; }
.flash-ok { background: var(--ok-soft); color: var(--ok-ink); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-warn { background: var(--warn-soft); color: var(--warn-ink); }
.flash.requests { padding: 6px 14px; }
.request-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.request-row + .request-row { border-top: 1px solid var(--line); }
.request-row .request-email { color: var(--warn-ink); opacity: .8; font-weight: 400; }
.request-actions { display: inline-flex; align-items: center; gap: 6px; }
.flash-link { display: flex; gap: 8px; margin-top: 8px; }
.flash-link input { flex: 1; min-width: 0; font-size: 13px; padding: 6px 10px; background: var(--surface); color: var(--ink); font-weight: 400; }

/* chips: small rounded tags, like Tally's inline mentions */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-sm); padding: 2px 7px; font-size: 12.5px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.chip-ok { background: var(--ok-soft); color: var(--ok-ink); }
.chip-neutral { background: var(--hover); color: var(--ink-2); }
.chip-warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip-accent { background: var(--blue-soft); color: var(--blue); }

/* tabs under a page heading, e.g. Reports: Summary · Payouts */
.tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; margin-bottom: -1px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-color: var(--ink); }
.tabs .chip { font-size: 12px; padding: 0 6px; }

/* payouts: asks grouped by designer */
.ask-group + .ask-group { border-top: 1px solid var(--line-strong); margin-top: 18px; padding-top: 18px; }
.ask-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ask-head .who { display: inline-flex; align-items: center; gap: 10px; }
.ask-head .who .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
details.tasks > summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; display: inline-block; white-space: nowrap; }
details.tasks > summary::-webkit-details-marker { display: none; }
details.tasks > summary:hover, details.tasks[open] > summary { color: var(--ink); }
details.tasks .tasks-body { font-size: 13px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; margin-top: 4px; max-width: 520px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 20px 0; }
.tile { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: 16px 18px; }
.tile .label { font-size: 13px; font-weight: 500; color: var(--muted); }
.tile .value { font-size: 26px; line-height: 1.2; letter-spacing: -0.5px; font-weight: 600; margin-top: 6px; }
.tile .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.tile.accent { background: var(--blue-soft); border-color: var(--blue-soft); }
.tile.accent .label { color: var(--blue-ink); }
.tile.accent .value { color: var(--blue); }
.tile.accent .sub { color: var(--blue-ink); }

.scroll { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); padding: 4px 10px 8px; border-bottom: 1px solid var(--line); }
.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t td.status-cell { line-height: 1.9; }
.t tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 600; }
.t .sub { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; font-weight: 400; }
.bar-track { background: var(--hover); border-radius: 3px; height: 6px; min-width: 60px; overflow: hidden; }
.bar-fill { background: var(--blue); height: 100%; border-radius: 3px; min-width: 3px; }

/* week navigation: toolbar-style ghost buttons */
.weeknav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.weeknav .label { font-size: 17px; font-weight: 600; letter-spacing: -0.1px; padding: 0 4px; }
.weeknav a.arrow {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border: 0; border-radius: var(--r); background: transparent; color: var(--ink-2); font-size: 16px; text-decoration: none;
}
.weeknav a.arrow:hover { background: var(--hover); color: var(--ink); }

.placeholder-bars { display: flex; gap: 8px; justify-content: center; align-items: flex-end; padding: 20px 0 10px; }
.placeholder-bars span { width: 10px; height: 52px; border-radius: 3px; background: var(--hover); display: inline-block; }
.placeholder-bars span:nth-child(2n) { height: 36px; }
.placeholder-caption { text-align: center; color: var(--muted); font-size: 14px; padding-bottom: 10px; margin: 0; }

.entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry .proj { font-weight: 600; }
.entry .hours { font-weight: 600; font-variant-numeric: tabular-nums; }
.entry .entry-hours { grid-column: 2; font-size: 13px; color: var(--muted); text-align: right; margin-top: -2px; }
.entry .tasks { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.entry .actions { grid-column: 1 / -1; display: flex; gap: 12px; font-size: 13px; margin-top: 4px; align-items: center; }
.entry .actions a { color: var(--muted); }

/* avatar: Tally's keycap badge, a dark rounded square with a bold white letter */
.avatar {
  width: 32px; height: 32px; border-radius: 6px; flex: none;
  background: var(--avatar-bg); color: var(--avatar-ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}

/* appearance switch: light, dark, or follow the system */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.theme-switch button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font: 500 13px/1 var(--font); cursor: pointer; }
.theme-switch button svg { flex: none; }
.theme-switch button:hover { color: var(--ink); background: var(--hover); }
.theme-switch button[aria-pressed="true"] { color: var(--ink); background: var(--hover); }
.theme-switch.compact button { padding: 0 7px; }
.side .theme-switch { margin: 0 10px 8px; align-self: flex-start; }

/* modals: a native dialog, styled like a card, over a dimmed page */
dialog.modal { width: min(500px, calc(100vw - 32px)); border: 1px solid var(--line-strong); border-radius: var(--r-card); padding: 24px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); text-align: left; }
dialog.modal::backdrop { background: var(--backdrop); }
dialog.modal:not([open]):target { display: block; position: fixed; top: 8vh; left: 50%; transform: translateX(-50%); margin: 0; z-index: 20; } /* no JavaScript: the link's hash shows it */
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.modal-head h2 { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.modal-close { flex: none; display: inline-flex; padding: 6px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal .field:last-of-type { margin-bottom: 0; }
.modal .check { margin-top: 14px; }
.row-actions { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* sign in and account: a plain Tally-style form, no box around it */
.center-page { min-height: 60vh; display: flex; align-items: flex-start; justify-content: center; padding: 64px 20px 96px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .card { border: 0; padding: 0; }
.login-card .hero { padding-bottom: 24px; }
.login-card .hint { text-align: center; }

/* admin shell: Notion-style gray sidebar next to a white page */
.shell { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: 100vh; }
.side { background: var(--gray-bg); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 8px 10px 18px; }
.snav { display: flex; flex-direction: column; gap: 1px; }
.snav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--r); font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.snav a svg { flex: none; color: var(--muted); }
.snav a:hover { background: var(--hover); color: var(--ink); }
.snav a.active { background: var(--hover); color: var(--ink); }
.snav a.active svg { color: var(--ink); }
.side .push { flex: 1; }
.side form .btn { border-color: transparent; background: transparent; color: var(--ink-2); height: 32px; padding: 0 10px; justify-content: flex-start; }
.side form .btn:hover { background: var(--hover); color: var(--ink); }
.main { min-width: 0; }
.section-kicker { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.grand { font-weight: 600; }
.cols { display: grid; gap: 16px; align-items: start; }
.cols > * { min-width: 0; } /* let wide tables scroll inside their card instead of stretching the page */
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-main-side { grid-template-columns: minmax(0,1fr) 340px; }
@media (max-width: 980px) { .cols-2, .cols-main-side { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 8px; border-bottom: 1px solid var(--line); }
  .side .brand { padding: 0 6px; }
  .side .brand span:last-child { display: none; }
  .snav { flex-direction: row; overflow-x: auto; gap: 2px; }
  .snav a { padding: 6px 10px; white-space: nowrap; }
  .snav a svg { display: none; }
  .side form, .side .push, .side .theme-switch { display: none; }
  .wrap { padding: 20px 16px 96px; }
  .center-page { padding-top: 40px; }
  h1 { font-size: 26px; letter-spacing: -0.4px; }
  .tile .value { font-size: 22px; }
  .card { padding: 18px; }
}

.inline-form { display: inline; margin: 0; }
.linkbtn {
  background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px;
}
.linkbtn:hover { text-decoration-color: var(--ink); }
a.iconbtn { text-decoration: none; }
.entry .actions .muted { color: var(--muted); }
.mobile-only { display: none; }
@media (max-width: 900px) { .mobile-only { display: block; } }
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #37352f; }
  .side, .no-print, .flash { display: none !important; }
  .shell { display: block; }
  .wrap { max-width: none; padding: 0; }
  .card, .tile { break-inside: avoid; }
}
