:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #19271f;
  background: #f3f5ef;
  font-synthesis: none;
  --ink: #19271f;
  --muted: #56655c;
  --line: #dee5db;
  --accent: #245d45;
  --paper: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #328469; outline-offset: 4px; }
.frame { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.topbar { background: #fafcf8; border-bottom: 1px solid var(--line); }
.topbar-inner, .workspace, .heading, .booking-top, .actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar-inner { min-height: 76px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 740; letter-spacing: -.06em; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; background: var(--accent); color: white; border-radius: 11px; font-size: 23px; letter-spacing: 0; }
.workspace { font-size: 14px; color: var(--muted); }
.appointments { padding-block: clamp(40px, 7vw, 88px); }
.heading { align-items: end; margin-bottom: 34px; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: clamp(37px, 6vw, 70px); line-height: 1.04; letter-spacing: -.066em; font-weight: 730; }
h2 { font-size: 23px; letter-spacing: -.042em; }
.muted { color: var(--muted); line-height: 1.55; }
.heading .muted, .login .muted, dialog .muted { margin-top: 10px; }
.button { min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.primary { background: var(--accent); color: white; }
.primary:hover:not(:disabled) { background: #194b35; }
.secondary { background: var(--paper); border-color: var(--line); color: var(--ink); }
.secondary:hover:not(:disabled) { border-color: #83988a; }
.subtle { background: transparent; color: var(--accent); }
.filters { display: flex; gap: 6px; padding: 5px; margin-bottom: 24px; width: max-content; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #e9eee6; }
.filters button { padding: 10px 15px; min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: #44574b; font-size: 14px; font-weight: 650; }
.filters [aria-pressed="true"] { background: var(--paper); box-shadow: 0 1px 4px #19271f17; color: var(--ink); }
.bookings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.booking, .empty, .login, dialog { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 12px 24px -22px #19271f55; }
.booking { display: flex; flex-direction: column; padding: clamp(19px, 3vw, 26px); min-width: 0; }
.booking-top { margin-bottom: 17px; flex-wrap: wrap; }
.status { padding: 5px 10px; border-radius: 20px; background: #eaf0e8; color: #365643; font-weight: 670; font-size: 12px; }
.booking[data-status="pending_approval"] .status { color: #69470f; background: #fbf0d8; }
.booking[data-status="declined"] .status { color: #754545; background: #f7ebeb; }
.requested { font-size: 12px; color: var(--muted); }
.customer, .description, dd { overflow-wrap: anywhere; }
.description { margin-top: 7px; line-height: 1.55; color: var(--muted); white-space: pre-wrap; }
.details { display: grid; gap: 13px; margin-top: 20px; padding-block: 16px; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: 12px; font-weight: 650; margin-bottom: 3px; }
dd { font-size: 14px; line-height: 1.45; }
.actions { justify-content: flex-end; flex-wrap: wrap; }
.booking-actions { margin-top: auto; padding-top: 10px; }
.booking-actions:empty { display: none; }
.empty { padding: 38px 24px; }
.empty p { margin-top: 6px; }
.boot, .notice, .error { padding: 13px 15px; border-radius: 12px; margin-bottom: 16px; }
.boot { margin-top: 32px; }
.notice { background: #e0eee4; color: #24553c; }
.error { background: #fae9e7; color: #802e29; }
.login { max-width: 460px; margin: clamp(40px, 10vh, 100px) auto; padding: clamp(22px, 5vw, 38px); }
.login h1 { font-size: clamp(33px, 5vw, 45px); }
.login form { display: grid; gap: 9px; margin-top: 26px; }
.login label { font-weight: 650; font-size: 14px; }
.login input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #a6b4a9; border-radius: 10px; margin-bottom: 8px; color: var(--ink); }
dialog { color: var(--ink); width: min(460px, calc(100% - 32px)); padding: 26px; }
dialog .actions { margin-top: 22px; }
dialog::backdrop { background: #172c2380; }
@media (max-width: 550px) {
  .frame { width: calc(100% - 32px); }
  .workspace { gap: 2px; }
  .workspace span { max-width: 124px; overflow-wrap: anywhere; }
  .heading { align-items: start; flex-direction: column; margin-bottom: 22px; }
  .filters { width: 100%; gap: 3px; }
  .filters button { flex: 1; min-width: 0; padding-inline: 3px; font-size: 12px; }
}

/* iTradie business overview */
.overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0 0 20px; }
.overview-card { background:var(--paper); border:1px solid var(--line); border-radius:20px; padding:22px; min-width:0; }
.overview-card span { display:block; font-size:13px; color:var(--muted); font-weight:600; line-height:1.4; }
.overview-card strong { display:block; margin-top:14px; font-size:clamp(32px,4vw,46px); letter-spacing:-.06em; line-height:1; font-variant-numeric:tabular-nums; }
.integration-note { display:flex; gap:16px; align-items:baseline; flex-wrap:wrap; background:#e9eee6; border-radius:16px; padding:17px 20px; margin-bottom:26px; }
.integration-note strong { font-size:14px; }
.integration-note p { flex:1; min-width:200px; font-size:13px; color:var(--muted); line-height:1.5; }
@media(max-width:750px) { .overview { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:420px) { .overview-card { padding:16px; } }

.workspace-nav { margin-block: 18px; flex-wrap: wrap; }
#workspace-detail { margin-bottom: 20px; }
#workspace-detail form { max-width: 36rem; margin-block: 18px; }
#workspace-detail textarea { display: block; width: 100%; min-height: 5rem; margin-bottom: 12px; }
#workspace-detail li { margin-block: 8px; overflow-wrap: anywhere; }
#workspace-detail > button { margin: 4px; }
#reschedule-time { margin-bottom: 16px; }
.filters { flex-wrap: wrap; }
@media (max-width: 480px) { .filters button { flex: 1 1 30%; } }
.workspace-row { border-top: 1px solid var(--line); padding-block: 14px; }
.workspace-row h3, .workspace-row p { margin: 0 0 5px; overflow-wrap: anywhere; }
.workspace-row time { display: inline-block; color: var(--muted); margin-inline-end: 14px; }
.workspace-row .button { margin-top: 6px; }
#workspace-detail label select { display: block; margin: 6px 0 18px; font: inherit; padding: 8px; }
