/* app/styles/base.css — reset, type, safe-area insets, the state and band classes (E §2; the wbl-ui skill:
   behaviour here, decoration in theme.css). */
:root { --sat: env(safe-area-inset-top, 0px); --sar: env(safe-area-inset-right, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body { font: 16px/1.45 var(--v-font-ui, -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif); color: var(--v-ink, #262119); background: var(--v-page, #fbf7ef); padding: calc(var(--sat) + 16px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px); }
.root { max-width: 920px; margin: 0 auto; }
h1, h2 { margin: 0 0 8px; }
.display { font-family: var(--v-font-display, inherit); text-transform: uppercase; letter-spacing: var(--v-track-caps, 0.055em); font-weight: 600; }
h1.display { font-size: 1.6rem; } h2.display { font-size: 1.1rem; margin-top: 28px; }
.muted { color: var(--v-ink-soft, #7a7264); margin: 0 0 16px; }
.card { background: var(--v-surface, #fffdf8); border: 1px solid var(--v-line, #e7ddc9); border-radius: var(--v-r-md, 16px); padding: 16px; box-shadow: var(--v-shadow-sm, none); }
.rows { list-style: none; margin: 0; padding: 0; } .rows li { padding: 6px 0; border-top: 1px solid var(--v-line-soft, #f0e8d8); font-variant-numeric: tabular-nums; } .rows li:first-child { border-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.btn { font: inherit; border: 1px solid var(--v-line, #e7ddc9); background: var(--v-accent, #0e9c93); color: #fff; border-radius: var(--v-r-sm, 12px); padding: 8px 14px; cursor: pointer; min-height: 40px; }
.btn-quiet { background: transparent; color: var(--v-ink, #262119); }
/* the states (ui/states.js) — tile and inline sizes */
.state { padding: 20px; border-radius: var(--v-r-md, 16px); background: var(--v-surface-2, #f4eee1); }
.state-tile { min-height: 120px; } .state-inline { padding: 4px 0; background: transparent; }
.state-copy { margin: 0 0 4px; font-weight: 600; } .state-inline .state-copy { font-weight: 500; font-size: 0.95rem; }
.state-detail { margin: 0; color: var(--v-ink-soft, #7a7264); font-size: 0.9rem; }
.state-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.state-loading { animation: state-appear 0.01s linear 0.8s both; }   /* no spinner under ~800 ms (E §9) */
@keyframes state-appear { from { opacity: 0; } to { opacity: 1; } }
.state-denied { border-left: 4px solid var(--v-pine-500, #1d6a56); }
.state-failed { border-left: 4px solid var(--v-coral, #e0574a); }
/* the bands (ui/banner.js) */
.band { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--v-r-sm, 12px); margin-bottom: 10px; font-size: 0.95rem; }
.band-offline { background: var(--v-sun-100, #fde6cd); color: var(--v-bark-900, #262119); }   /* sunset = "this is live/dated", never lake */
.band-refusal { background: #fbe4e1; color: var(--v-bark-900, #262119); }
.band-copy { flex: 1; } .band-detail { color: var(--v-ink-soft, #7a7264); } .band-tile { font-size: 0.9rem; } .band-inline { padding: 2px 0; background: transparent; }
.band-close { margin-left: auto; }
.band .btn-quiet { color: var(--v-bark-900, #262119); border-color: rgba(0, 0, 0, 0.2); }   /* a band is always light; its controls read in both themes */
/* forms (pages/sign-in) */
.card-narrow { max-width: 420px; }
.form { display: grid; gap: 12px; margin-top: 8px; }
.form label { display: grid; gap: 4px; font-size: 0.9rem; color: var(--v-ink-soft, #7a7264); }
.form label.check { grid-template-columns: auto 1fr; align-items: start; gap: 8px; color: var(--v-ink, #262119); }
.form input[type=email], .form input[type=password], .form input[type=text] { font: inherit; padding: 10px 12px; border: 1px solid var(--v-line, #e7ddc9); border-radius: var(--v-r-sm, 12px); background: var(--v-surface, #fffdf8); color: inherit; min-height: 44px; }
.form input:focus { outline: 2px solid var(--v-accent, #0e9c93); outline-offset: 1px; }
.small { font-size: 0.85rem; }
/* the dashboard (pages/dashboard) — a grid placed by dashboard_widgets' four integers; one column on a phone */
.wbl-dash-bar { margin-bottom: 12px; }
.wbl-dash-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.wbl-dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(120px, auto); gap: 12px; }
.wbl-dash-tile { min-width: 0; padding: 12px 14px 14px; }
.wbl-dash-tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.wbl-dash-tile-head h2 { margin: 0; font-size: 0.95rem; }
.wbl-dash-remove { min-height: 32px; padding: 2px 10px; line-height: 1; color: var(--v-ink-soft, #7a7264); }
.wbl-dash-empty, .wbl-dash-loading { margin-top: 12px; }
@media (max-width: 640px) { .wbl-dash-grid { grid-template-columns: minmax(0, 1fr); } .wbl-dash-tile { grid-area: auto !important; } }
.banners { position: sticky; top: 0; z-index: 10; max-width: 920px; margin: 0 auto; }
/* the Postings card (widgets/postings) */
.wbl-postings-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 0; padding: 6px 0; border-top: 1px solid var(--v-line-soft, #f0e8d8); }
.wbl-postings-line:first-child { border-top: 0; }
.wbl-postings-label { flex: 0 0 110px; color: var(--v-ink-soft, #7a7264); font-size: 0.9rem; }
.wbl-postings-signup { min-height: 34px; padding: 4px 10px; }
.wbl-retry { margin-top: 8px; }
/* the Days Off card (widgets/days-off) */
.wbl-daysoff-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.wbl-daysoff-when { flex: 0 0 150px; font-weight: 600; }
.wbl-daysoff-now .wbl-daysoff-when::after { content: ' · this week'; font-weight: 400; color: var(--v-accent, #0e9c93); }
/* the directory (pages/directory) */
.wbl-dir-tools { margin: 0 0 12px; }
.wbl-dir-search { font: inherit; width: 100%; max-width: 420px; padding: 10px 12px; border: 1px solid var(--v-line, #e7ddc9); border-radius: var(--v-r-sm, 12px); background: var(--v-surface, #fffdf8); color: inherit; min-height: 44px; }
.wbl-dir-section h2 { margin-top: 20px; }
.wbl-dir-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; padding: 8px 4px; border-radius: var(--v-r-sm, 12px); cursor: pointer; min-height: 48px; }
.wbl-dir-row:hover, .wbl-dir-row.is-open { background: var(--v-surface-2, #f4eee1); }
.wbl-dir-swatch { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--v-line, #e7ddc9); display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.wbl-dir-name { flex: 1 1 auto; font-weight: 600; }
.wbl-dir-title { flex: 0 1 auto; }
.wbl-dir-card { margin-top: 16px; max-width: 560px; }
/* the staff card is a sheet over the list (A §7 :858 DASH-19/20 are modal; SE-S0-3): on a phone a bottom sheet, wider a centred dialog */
.wbl-dir-scrim { position: fixed; inset: 0; z-index: 15; background: rgba(20, 16, 10, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.wbl-dir-scrim .wbl-dir-card { margin: 0; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
@media (min-width: 561px) { .wbl-dir-scrim { align-items: center; padding: 24px; } .wbl-dir-scrim .wbl-dir-card { border-radius: var(--v-r, 16px); } }
.wbl-dir-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; }
.wbl-dir-facts dt { color: var(--v-ink-soft, #7a7264); font-size: 0.9rem; } .wbl-dir-facts dd { margin: 0; }
.wbl-dir-answer { margin: 0 0 10px; }
h3.display.small { font-size: 0.9rem; margin: 12px 0 6px; }
.wbl-dir-editor textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--v-line, #e7ddc9); border-radius: var(--v-r-sm, 12px); background: var(--v-surface, #fffdf8); color: inherit; resize: vertical; }
.wbl-dir-editor input[type=color] { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--v-line, #e7ddc9); border-radius: var(--v-r-sm, 12px); background: transparent; }
.btn-danger { background: var(--v-coral, #e0574a); }
.wbl-dir-manager, .wbl-dir-remove, .wbl-dir-next { margin-top: 12px; }
.wbl-dir-remove { border-top: 1px solid var(--v-line, #e7ddc9); padding-top: 12px; }
.wbl-dir-managed { margin: 8px 0 0; }
/* the shell: top bar (ui/topbar) and the launcher wheel (ui/launcher) */
.wbl-top { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.wbl-top-btn { font: inherit; font-size: 1.15rem; line-height: 1; min-width: 44px; min-height: 44px; border: 1px solid var(--v-line, #e7ddc9); background: var(--v-surface, #fffdf8); color: inherit; border-radius: var(--v-r-sm, 12px); cursor: pointer; }
.wbl-top-title { font: inherit; background: transparent; border: 0; color: inherit; cursor: pointer; padding: 6px 4px; font-size: 1.05rem; }
.wbl-top-spacer { flex: 1; }
.wbl-top-me { min-width: 36px; height: 36px; border-radius: 50%; background: var(--v-accent, #0e9c93); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 600; }
.wbl-launcher[hidden] { display: none; }
.wbl-launcher { position: fixed; inset: 0; z-index: 20; }
.wbl-wheel-scrim { position: absolute; inset: 0; background: rgba(20, 16, 10, 0.55); }
.wbl-wheel { position: absolute; left: 50%; top: 50%; width: min(92vw, 520px); height: min(92vw, 520px); transform: translate(-50%, -50%); border-radius: 50%; background: var(--v-surface, #fffdf8); box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
.wbl-wedge { position: absolute; left: var(--wx); top: var(--wy); transform: translate(-50%, -50%); font: inherit; min-width: 96px; min-height: 48px; padding: 8px 12px; border-radius: 24px; border: 1px solid var(--v-line, #e7ddc9); background: var(--v-surface-2, #f4eee1); color: var(--v-ink, #262119); cursor: pointer; }
.wbl-wedge.is-current { outline: 2px solid var(--v-accent, #0e9c93); }
.wbl-wedge:disabled { opacity: 0.5; cursor: not-allowed; }
.wbl-wheel-close { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); min-width: 56px; min-height: 56px; border-radius: 50%; font-size: 1.3rem; }
@media (max-width: 560px) {
  .wbl-wheel { width: 100%; height: 100%; border-radius: 0; transform: none; left: 0; top: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px; }
  .wbl-wedge { position: static; transform: none; width: 100%; }
  .wbl-wheel-close { position: static; transform: none; align-self: center; margin-top: 12px; }
}
/* settings (pages/settings) */
.wbl-set-section { margin: 12px 0; padding: 14px 16px; }
.wbl-set-section h2 { margin: 0 0 8px; }
.wbl-set-section textarea { width: 100%; font: inherit; padding: 10px; border-radius: var(--v-r-sm, 12px); border: 1px solid var(--v-line, #e7ddc9); background: var(--v-surface, #fffdf8); color: inherit; resize: vertical; }
.wbl-set-sent { font-weight: 600; }
.wbl-set-version { margin-top: 20px; }
/* add a staff member (pages/add-staff) and the directory's entry to it */
.wbl-dir-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wbl-dir-tools .wbl-dir-search { flex: 1; min-width: 200px; }
.wbl-dir-add[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.wbl-add-form { padding: 14px 16px; }
.form select, .form input[type=date] { font: inherit; padding: 10px 12px; border: 1px solid var(--v-line, #e7ddc9); border-radius: var(--v-r-sm, 12px); background: var(--v-surface, #fffdf8); color: inherit; min-height: 44px; }
.wbl-add-done { padding: 14px 16px; }
.wbl-add-sent { font-weight: 600; }
/* the bell clock in the top bar (widgets/bell-clock) */
.wbl-top-msgs { display: inline-flex; align-items: center; margin-left: -6px; }               /* the Messages badge beside the launcher (Q824); empty when nothing is unread */
.wbl-wedge-badge { margin-left: 6px; vertical-align: middle; }
.wbl-top-bell { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw; }
.wbl-bell-time { font-weight: 600; font-variant-numeric: tabular-nums; }
/* on a phone the bell line takes its own row under the bar, time and next bell both shown (SE-S0-4) */
@media (max-width: 560px) { .wbl-top { flex-wrap: wrap; } .wbl-top-title { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; } .wbl-top-spacer { display: none; } .wbl-top-bell { order: 10; flex-basis: 100%; max-width: none; padding: 2px 4px 0; } }
/* the tile's rename (SCR-FND-19) */
.wbl-dash-tile-tools { display: inline-flex; gap: 2px; }
.wbl-dash-rename { min-height: 32px; padding: 2px 10px; line-height: 1; color: var(--v-ink-soft, #7a7264); }
.wbl-dash-title-field { font: inherit; font-size: 0.95rem; padding: 4px 8px; border: 1px solid var(--v-line, #e7ddc9); border-radius: var(--v-r-sm, 12px); background: var(--v-surface, #fffdf8); color: inherit; min-width: 8em; }
