/* Layout: one web shell for every role, sidebar + content; staff and client pages keep a narrower content column */
:root {
  --bg: #F2F4F8;
  --surface: #FFFFFF;
  --surface-2: #EBEFF5;
  --surface-3: #E1E6EF;
  --line: #D9DFE9;
  --fg: #131A27;
  --fg-2: #4A556B;
  --fg-3: #7B869B;
  --accent: #2B54D6;
  --accent-hover: #2246B8;
  --accent-soft: #E2E9FC;
  --accent-fg: #FFFFFF;
  --good: #1D8556;
  --good-soft: #DCF1E6;
  --warn: #A86300;
  --warn-soft: #FBEED6;
  --crit: #C3342A;
  --crit-soft: #F9E0DC;
  --info: #0D7488;
  --info-soft: #D9EFF3;
  --shadow: 0 1px 2px rgb(19 26 39 / .06), 0 4px 16px rgb(19 26 39 / .06);
  --shadow-lg: 0 12px 40px rgb(19 26 39 / .18);
  --scrim: rgb(19 26 39 / .38);
  --av-s: 62%;
  --av-l: 87%;
  --av-fl: 27%;

  --font-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --t-xs: .75rem;
  --t-sm: .8125rem;
  --t-md: .9375rem;
  --t-lg: 1.125rem;
  --t-xl: 1.5rem;
  --t-2xl: 2rem;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
#app { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--t-2xl); line-height: 1.1; }
h2 { font-size: var(--t-xl); line-height: 1.2; }
h3 { font-size: var(--t-lg); line-height: 1.25; }
h4 { font-size: var(--t-md); }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--fg-2); }
.faint { color: var(--fg-3); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.eyebrow { font-size: var(--t-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Shell ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.support-bar { flex-basis: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r); background: var(--warn-soft); color: var(--warn); font-size: var(--t-xs); font-weight: 600; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.brand-tag { font-family: var(--font-body); font-weight: 500; font-size: var(--t-xs); color: var(--fg-3); padding: 2px 8px; border: 1px dashed var(--line); border-radius: 99px; }
.topbar-user { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.topbar-who { min-width: 0; max-width: 220px; line-height: 1.25; }
.topbar-me { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 8px; margin: -4px 0 -4px -8px; border-radius: var(--r); color: inherit; text-decoration: none; }
.topbar-me:hover { background: var(--surface-2); }
.topbar-me:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 640px) {
  .topbar { gap: 8px; padding: 8px 16px; flex-wrap: nowrap; }
  /* The support banner takes its own line above the bar on phones. */
  .topbar:has(.support-bar) { flex-wrap: wrap; }
  .brand-tag { display: none; }
  .topbar-who .xs { display: none; }
  .topbar-who { max-width: 140px; }
}

.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.desk { display: grid; grid-template-columns: 220px minmax(0, 1fr); flex: 1 0 auto; }
.sidebar { border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.sidebar .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r); border: 0; background: transparent; color: var(--fg-2); font-weight: 500; text-align: left; width: 100%; }
.sidebar .nav-group { padding: 14px 12px 4px; font-size: var(--t-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); }
.sidebar .nav-group:first-child { padding-top: 0; }
.sidebar .nav-item:hover { background: var(--surface-2); color: var(--fg); }
.sidebar .nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nav-desc { font-size: var(--t-xs); font-weight: 400; color: var(--fg-3); margin-top: 2px; }
.sidebar .nav-item[aria-current="page"] .nav-desc { color: var(--accent); opacity: .8; }
.sidebar .nav-count { margin-left: auto; font-size: var(--t-xs); font-weight: 600; background: var(--crit-soft); color: var(--crit); padding: 1px 7px; border-radius: 99px; }
.main { min-width: 0; padding: 28px 32px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .sub { color: var(--fg-2); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .desk { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .nav-item { width: auto; white-space: nowrap; }
    .main { padding: 20px 16px 40px; }
}

/* Staff and client pages: same web shell, content held to a readable width */
.main-narrow { width: 100%; max-width: 820px; margin-inline: auto; }
.app-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.app-body { display: flex; flex-direction: column; gap: 14px; }

/* Login: what Pulcra does on the left, how to get in on the right */
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.login-intro { padding: 48px clamp(16px, 6vw, 80px); display: flex; flex-direction: column; gap: 32px; justify-content: center; background: var(--surface); border-right: 1px solid var(--line); }
.login-intro h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 14ch; }
.login-lead { color: var(--fg-2); font-size: var(--t-lg); max-width: 46ch; }
.login-scope { align-self: flex-start; padding-left: 0; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.login-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 24px; }
.login-demo { display: flex; flex-direction: column; gap: 8px; }
.login-account { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; color: var(--fg); }
.login-account:hover { border-color: var(--accent); background: var(--accent-soft); }
.login-account strong { display: block; font-size: var(--t-sm); }
.login-account > svg { color: var(--fg-3); }
.login-brand-mobile { display: none; }
.scope-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--fg-2); font-size: var(--t-sm); }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  /* On a phone the form is all that matters: the intro text is left for wide screens. */
  .login-intro { display: none; }
  .login-panel { align-items: flex-start; padding-block: 24px 32px; }
  .login-brand-mobile { display: flex; }
}

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.card-flat { background: var(--surface-2); border-radius: var(--r); padding: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { font-size: var(--t-md); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 600; font-size: var(--t-sm); line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn-danger { color: var(--crit); }
.btn-good, .btn-good:hover { background: var(--good); border-color: var(--good); color: var(--surface); }
.btn-good:hover { filter: brightness(.94); }
.btn-sm { padding: 5px 10px; font-size: var(--t-xs); }
.btn-lg { padding: 13px 18px; font-size: var(--t-md); border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--fg-2); padding: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: var(--t-xs); font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--fg-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.pill[data-tone="good"] { background: var(--good-soft); color: var(--good); }
.pill[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
.pill[data-tone="crit"] { background: var(--crit-soft); color: var(--crit); }
.pill[data-tone="info"] { background: var(--info-soft); color: var(--info); }
.pill[data-tone="accent"] { background: var(--accent-soft); color: var(--accent); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-sm); font-size: var(--t-xs); font-weight: 500; background: var(--surface-2); color: var(--fg-2); border: 1px solid var(--line); }
.chip[data-type="hogar"] { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip[data-type="oficina"] { background: var(--info-soft); color: var(--info); border-color: transparent; }
.chip[data-type="airbnb"] { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

.avatar { --h: 220; width: 32px; height: 32px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-size: .75rem; font-weight: 700; letter-spacing: .02em; background: hsl(var(--h) var(--av-s) var(--av-l)); color: hsl(var(--h) 50% var(--av-fl)); }
.avatar-sm { width: 24px; height: 24px; font-size: .625rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-xl { width: 76px; height: 76px; font-size: 1.5rem; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatar-stack .avatar + .avatar { margin-left: -8px; }
.avatar-empty { background: var(--surface-2); color: var(--fg-3); border: 1.5px dashed var(--fg-3); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: var(--t-sm); color: var(--fg-2); }
.kpi-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: var(--t-xs); color: var(--fg-3); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th { text-align: left; font-weight: 600; font-size: var(--t-xs); letter-spacing: .04em; text-transform: uppercase; color: var(--fg-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--surface-2); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 500; color: var(--fg-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-size: var(--t-sm); font-weight: 600; color: var(--fg-2); }
.input, .select, .textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); font-size: var(--t-md); }
/* Same height for every one-line control. Selects drop the native look, which ignores padding and renders shorter. */
.input, .select { min-height: 44px; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B869B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select:disabled { cursor: not-allowed; opacity: .6; }
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--fg-3); pointer-events: none; }
.search .input { padding-left: 34px; }

.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 22px; height: 22px; flex: none; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; background: var(--surface); transition: background .15s, border-color .15s; }
.check input:checked + .box { background: var(--good); border-color: var(--good); color: var(--surface); }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check input:checked ~ .check-text { color: var(--fg-3); text-decoration: line-through; }

.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }

.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress[data-tone="good"] > span { background: var(--good); }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }

.empty { text-align: center; padding: 32px 16px; color: var(--fg-3); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: var(--t-sm); }
.notice[data-tone="warn"] { background: var(--warn-soft); color: var(--warn); }
.notice[data-tone="crit"] { background: var(--crit-soft); color: var(--crit); }
.notice[data-tone="info"] { background: var(--info-soft); color: var(--info); }
.notice[data-tone="good"] { background: var(--good-soft); color: var(--good); }
.notice[data-tone="accent"] { background: var(--accent-soft); color: var(--accent); }

/* Photo placeholder tiles (real uploads replace the background) */
.photo { position: relative; aspect-ratio: 4 / 3; max-width: 100%; border-radius: var(--r); overflow: hidden; background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface-3) 10px 20px); display: flex; align-items: flex-end; background-size: cover; background-position: center; }
.photo-label { margin: 6px; padding: 2px 7px; border-radius: var(--r-sm); background: var(--surface); color: var(--fg-2); font-size: .6875rem; font-weight: 600; }
.photo-add { aspect-ratio: 4 / 3; border-radius: var(--r); border: 1.5px dashed var(--fg-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--fg-3); font-size: var(--t-xs); font-weight: 600; background: transparent; cursor: pointer; position: relative; }
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }

.stars { display: inline-flex; gap: 2px; color: var(--warn); }

/* Sheet: side drawer */
.sheet-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 60; display: flex; justify-content: flex-end; animation: fade .15s ease-out; }
.sheet { background: var(--surface); width: min(520px, 100%); height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide-in .2s ease-out; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sheet-body { padding: 20px; overflow-y: auto; flex: 1 1 auto; display: flex; flex-direction: column; gap: 16px; }
.sheet-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: .6; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: .6; } }

.toast > svg { flex: none; width: 18px; height: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: var(--r); font-size: var(--t-sm); font-weight: 500; box-shadow: var(--shadow-lg); display: flex; gap: 8px; align-items: center; max-width: calc(100% - 32px); animation: slide-up .2s ease-out; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Shared states and feedback ---------- */
.brand-logo img { display: block; height: 32px; width: auto; max-width: 200px; object-fit: contain; }
@media (max-width: 640px) {
  .brand-logo img { height: 26px; max-width: 140px; }
  /* Next to a company logo there is only room for the avatar, which still opens the account. */
  .topbar:has(.brand-logo) .topbar-who { display: none; }
}
.brand-org { font-family: var(--font-body); font-weight: 500; font-size: var(--t-sm); color: var(--fg-2); padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line); }
@media (max-width: 640px) { .brand-org { display: none; } }
.main:focus { outline: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.state-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 16px; color: var(--fg-2); font-size: var(--t-sm); }
.state-empty, .state-error { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 40px 16px; color: var(--fg-3); }
.state-empty strong, .state-error strong { color: var(--fg); font-size: var(--t-md); }
.state-empty p, .state-error p { max-width: 42ch; font-size: var(--t-sm); color: var(--fg-2); }
.state-empty .btn, .state-error .btn { margin-top: 6px; }
.state-error > svg { color: var(--crit); }
.skeleton-page { display: flex; flex-direction: column; gap: 14px; }
.sk { border-radius: var(--r); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.sk-title { height: 34px; width: min(280px, 60%); }
.sk-line { height: 14px; width: min(420px, 80%); margin-bottom: 8px; }
.sk-card { height: 96px; border-radius: var(--r-lg); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.field-error { color: var(--crit); font-size: var(--t-xs); font-weight: 600; margin: 2px 0 0; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--crit); }
.input.is-invalid:focus, .select.is-invalid:focus, .textarea.is-invalid:focus { box-shadow: 0 0 0 3px var(--crit-soft); }
.sheet-wide { width: min(720px, 100%); }
.sheet-error[hidden] { display: none; }
.sheet-foot .sheet-left { margin-right: auto; }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.btn-primary.is-busy::after, .btn-good.is-busy::after { border-color: rgb(255 255 255 / .35); border-top-color: #fff; }
.btn-wa { text-decoration: none; color: var(--good); }
.btn-wa:hover { background: var(--good-soft); }
a.btn { text-decoration: none; }
body.has-sheet { overflow: hidden; }
.toast[data-tone="crit"] { background: var(--crit); color: #fff; }
.toast-action { border: 0; background: transparent; color: inherit; font-weight: 700; text-decoration: underline; padding: 0 0 0 6px; white-space: nowrap; }
button.photo { border: 0; padding: 0; cursor: zoom-in; width: 100%; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgb(10 14 22 / .88); display: grid; place-items: center; padding: 24px; animation: fade .15s ease-out; }
.lightbox img { display: block; width: auto; height: auto; max-width: min(100%, 1400px); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); object-fit: contain; border-radius: var(--r); box-shadow: var(--shadow-lg); }
.lightbox-close { position: absolute; top: 16px; right: 16px; }
@media (max-width: 640px) {
  .sheet-foot { position: sticky; bottom: 0; background: var(--surface); padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .sheet-foot .btn { flex: 1 1 auto; min-height: 44px; }
}

/* Phones zoom into any field whose text is under 16px when it gets focus; on touch screens every field uses 16px. */
@media (pointer: coarse), (max-width: 760px) {
  input, select, textarea, .input, .select, .textarea { font-size: 16px !important; }
}
