:root {
    color-scheme: light;
    --ink: #17313a;
    --ink-soft: #48616a;
    --muted: #6c7f87;
    --line: #dbe7ea;
    --line-strong: #c6d8dd;
    --surface: #ffffff;
    --surface-alt: #f5f8f9;
    --canvas: #eef4f5;
    --brand-950: #063449;
    --brand-900: #075675;
    --brand-800: #087087;
    --brand-700: #078995;
    --brand-600: #0a98a0;
    --accent: #087b62;
    --accent-dark: #06634f;
    --accent-soft: #e5f7f2;
    --blue: #2468d2;
    --blue-soft: #eaf2ff;
    --purple: #7557c8;
    --purple-soft: #f0ecfc;
    --amber: #a66108;
    --amber-soft: #fff5db;
    --orange: #bd531a;
    --orange-soft: #fff0e7;
    --red: #be3434;
    --red-soft: #fff0f0;
    --shadow-sm: 0 1px 2px rgba(6, 52, 73, .06), 0 2px 8px rgba(6, 52, 73, .04);
    --shadow-md: 0 12px 36px rgba(6, 52, 73, .14);
    --radius-sm: .55rem;
    --radius: .85rem;
    --radius-lg: 1.2rem;
    --sidebar-width: 16.5rem;
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 20rem;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
form, fieldset { margin: 0; }
fieldset.field { min-width: 0; padding: 0; border: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
svg { display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.025em; }
h1 { font-size: clamp(1.45rem, 2.5vw, 2rem); }
h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h3 { font-size: 1.08rem; }
small { color: var(--muted); }
code { padding: .12rem .35rem; border-radius: .3rem; background: #edf2f0; color: #29443f; font-size: .88em; }
:focus-visible { outline: 3px solid rgba(36, 104, 210, .28); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.muted { color: var(--muted); }
.danger-text { color: var(--red); }
.success-text { color: var(--accent-dark); }
.nowrap { white-space: nowrap; }

/* Authentication and installer */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 10%, rgba(67, 198, 157, .18), transparent 30rem),
        linear-gradient(135deg, var(--brand-950), var(--brand-900) 58%, #078b91);
}
.auth-shell {
    display: grid;
    grid-template-columns: minmax(20rem, 1fr) minmax(24rem, 35rem);
    min-height: 100vh;
}
.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
    padding: clamp(2rem, 6vw, 5.5rem);
    color: rgba(255,255,255,.8);
}
.auth-brand h1 { max-width: 43rem; color: #fff; font-size: clamp(2.25rem, 5vw, 4.5rem); }
.auth-brand p { max-width: 39rem; font-size: 1.05rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; }
.brand-light { color: #fff; }
.brand-logo { width: 2.45rem; height: 2.45rem; flex: 0 0 auto; border-radius: .72rem; box-shadow: 0 6px 18px rgba(2, 29, 42, .2); }
.brand-word { display: inline-flex; align-items: baseline; letter-spacing: -.045em; }
.brand-word b, .brand-word strong { font: inherit; }
.brand-word b { color: #fff; }
.brand-word strong { color: #45d1a5; }
.auth-points { display: flex; flex-wrap: wrap; gap: .75rem 1.6rem; padding: 0; margin: 0; list-style: none; font-weight: 650; }
.auth-points li { display: flex; align-items: center; gap: .55rem; }
.auth-points span { display: grid; width: 1.55rem; height: 1.55rem; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; font-size: .75rem; }
.auth-card {
    align-self: center;
    margin: 2rem;
    padding: clamp(1.5rem, 4vw, 2.6rem);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 1.4rem;
    background: rgba(255,255,255,.97);
    box-shadow: 0 2rem 5rem rgba(2, 34, 30, .28);
}
.auth-card-header { margin-bottom: 1.75rem; }
.auth-card-header h2 { margin-bottom: .45rem; }
.auth-card-header p:last-child { color: var(--ink-soft); }
.auth-links { display: flex; justify-content: center; gap: .35rem; margin-top: 1.4rem; color: var(--ink-soft); font-size: .92rem; }
.auth-links a { color: var(--accent-dark); font-weight: 750; }
.install-shell .auth-card { max-height: calc(100vh - 3rem); overflow-y: auto; }
.eyebrow { margin-bottom: .7rem; font-size: .75rem !important; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.accent { color: var(--accent-dark); }
.success-panel { text-align: center; }
.success-icon { display: grid; width: 4rem; height: 4rem; place-items: center; margin: 0 auto 1.3rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-size: 2rem; }
.demo-credentials { display: grid; gap: .3rem; padding: 1rem; margin: 1.3rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-alt); text-align: left; font-size: .9rem; }

/* Application shell */
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow-y: auto;
    padding: 1.2rem .85rem;
    color: rgba(255,255,255,.78);
    background: linear-gradient(180deg, var(--brand-950), #052f43);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: .25rem .55rem 1.2rem; }
.sidebar-close { display: none !important; color: #fff !important; }
.workspace-pill { display: flex; align-items: center; gap: .7rem; padding: .75rem; margin-bottom: .9rem; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: rgba(255,255,255,.07); }
.workspace-avatar { display: grid; width: 2.3rem; height: 2.3rem; flex: 0 0 auto; place-items: center; border-radius: .7rem; background: #fff; color: var(--brand-800); font-weight: 850; }
.workspace-pill strong, .workspace-pill small { display: block; max-width: 9.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-pill strong { color: #fff; font-size: .88rem; }
.workspace-pill small { color: rgba(255,255,255,.58); font-size: .72rem; }
.side-nav { display: grid; gap: .18rem; }
.nav-link { position: relative; display: flex; min-height: 2.85rem; align-items: center; gap: .75rem; padding: .65rem .8rem; border-radius: .65rem; font-size: .9rem; font-weight: 640; transition: background .18s, color .18s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: #fff; background: rgba(17,163,106,.28); box-shadow: inset 3px 0 var(--accent); }
.nav-link em { display: grid; min-width: 1.3rem; height: 1.3rem; place-items: center; margin-left: auto; padding: 0 .3rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .67rem; font-style: normal; }
.sidebar-notice { display: grid; gap: .35rem; padding: .9rem; margin: auto .2rem 1rem; border: 1px solid rgba(255,210,111,.24); border-radius: var(--radius); background: rgba(255,201,80,.09); font-size: .78rem; }
.sidebar-notice .icon { color: #ffd57d; }
.sidebar-notice strong { color: #fff; }
.sidebar-logout { margin-top: auto; padding-top: .85rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-logout button { display: flex; width: 100%; min-height: 2.75rem; align-items: center; gap: .75rem; padding: .6rem .8rem; border: 0; border-radius: .65rem; background: transparent; color: rgba(255,255,255,.7); cursor: pointer; }
.sidebar-logout button:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-scrim { display: none; }
.app-main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; min-height: 5.15rem; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1.2rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.topbar-title { display: flex; min-width: 0; align-items: center; gap: .8rem; }
.topbar-title p { margin: 0 0 .1rem; color: var(--muted); font-size: .76rem; font-weight: 700; }
.topbar-title h1 { margin: 0; overflow: hidden; font-size: 1.33rem; text-overflow: ellipsis; white-space: nowrap; }
.menu-button { display: none !important; }
.topbar-actions { display: flex; align-items: center; gap: .75rem; }
.notification-button { position: relative; display: grid; width: 2.7rem; height: 2.7rem; place-items: center; border: 1px solid var(--line); border-radius: .75rem; background: #fff; color: var(--ink-soft); }
.notification-button span { position: absolute; top: -.35rem; right: -.35rem; display: grid; min-width: 1.25rem; height: 1.25rem; place-items: center; padding: 0 .25rem; border: 2px solid #fff; border-radius: 999px; background: var(--red); color: #fff; font-size: .62rem; font-weight: 800; }
.profile-chip { display: flex; align-items: center; gap: .55rem; }
.profile-chip span { display: grid; width: 2.45rem; height: 2.45rem; place-items: center; border-radius: .75rem; background: var(--brand-800); color: #fff; font-weight: 800; }
.profile-chip strong { font-size: .87rem; }
.page-content { width: 100%; max-width: 95rem; min-height: calc(100vh - 8.5rem); margin: 0 auto; padding: clamp(1.1rem, 3vw, 2.5rem); }
.app-footer { display: flex; justify-content: space-between; padding: 1rem 2.5rem 1.5rem; color: var(--muted); font-size: .75rem; }

/* Page building blocks */
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.page-heading h2 { margin-bottom: .35rem; }
.page-heading p { max-width: 45rem; margin-bottom: 0; color: var(--ink-soft); }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .85rem; color: var(--ink-soft); font-size: .88rem; font-weight: 700; }
.back-link:hover { color: var(--brand-700); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(18rem, .75fr); gap: 1.25rem; align-items: start; }
.content-grid.wide-aside { grid-template-columns: minmax(0, 1.25fr) minmax(21rem, .85fr); }
.stack { display: grid; gap: 1.15rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; }
.card-header p { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; }
.card-body { padding: 1.25rem; }
.card-footer { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; padding: 1rem 1.25rem; border-top: 1px solid var(--line); background: #fbfcfc; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.empty-state { display: grid; place-items: center; padding: 3rem 1.5rem; text-align: center; }
.empty-state .empty-icon { display: grid; width: 3.5rem; height: 3.5rem; place-items: center; margin-bottom: 1rem; border-radius: 1rem; background: var(--accent-soft); color: var(--accent-dark); }
.empty-state h3 { margin-bottom: .4rem; }
.empty-state p { max-width: 28rem; margin-bottom: 1.25rem; color: var(--muted); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.7rem 0 .9rem; }
.section-title h2, .section-title h3 { margin: 0; }
.section-title a { color: var(--accent-dark); font-size: .88rem; font-weight: 750; }

/* Buttons and controls */
.button { display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; gap: .48rem; padding: .62rem 1rem; border: 1px solid transparent; border-radius: .65rem; font-size: .9rem; font-weight: 760; line-height: 1.2; cursor: pointer; transition: transform .08s, background .16s, border-color .16s, color .16s; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); color: #fff; box-shadow: 0 5px 14px rgba(17,163,106,.2); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { border-color: var(--line-strong); background: #fff; color: var(--ink); }
.button.secondary:hover { border-color: #9eb9b1; background: var(--surface-alt); }
.button.ghost { border-color: transparent; background: transparent; color: var(--brand-700); }
.button.danger { background: var(--red); color: #fff; }
.button.warning { background: var(--amber); color: #fff; }
.button.small { min-height: 2.25rem; padding: .45rem .72rem; font-size: .8rem; }
.button.full { width: 100%; }
.button[disabled] { opacity: .48; cursor: not-allowed; box-shadow: none; }
.icon-button { display: grid; width: 2.65rem; height: 2.65rem; place-items: center; padding: 0; border: 0; border-radius: .7rem; background: transparent; color: var(--ink); cursor: pointer; }
.icon-button:hover { background: rgba(255,255,255,.1); }
.link-button { padding: 0; border: 0; background: none; color: var(--brand-700); font-size: .86rem; font-weight: 750; cursor: pointer; }
.button-row { display: flex; flex-wrap: wrap; gap: .65rem; }

/* Forms */
.stack-form { display: grid; gap: 1.1rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.05rem; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: .42rem; min-width: 0; }
.field > span, fieldset > legend { color: var(--ink); font-size: .88rem; font-weight: 720; }
.field.required > span::after { content: " *"; color: var(--red); }
.field small { font-size: .76rem; }
.field input, .field select, .field textarea,
.filter-input, .filter-select {
    width: 100%;
    min-height: 2.85rem;
    padding: .65rem .78rem;
    border: 1px solid var(--line-strong);
    border-radius: .62rem;
    background: #fff;
    color: var(--ink);
    line-height: 1.35;
    transition: border-color .16s, box-shadow .16s;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9eb9b1; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-input:focus, .filter-select:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(13,138,117,.12); }
.field input[readonly] { background: var(--surface-alt); color: var(--ink-soft); }
.form-section { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.form-section-head { display: flex; gap: .85rem; margin-bottom: 1.15rem; }
.step-number { display: grid; width: 2rem; height: 2rem; flex: 0 0 auto; place-items: center; border-radius: .6rem; background: var(--brand-800); color: #fff; font-size: .82rem; font-weight: 850; }
.form-section-head h2, .form-section-head h3 { margin: .15rem 0 .25rem; }
.form-section-head p { margin: 0; color: var(--muted); font-size: .87rem; }
.form-actions { position: sticky; bottom: 1rem; z-index: 10; display: flex; justify-content: flex-end; gap: .65rem; padding: .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.95); box-shadow: var(--shadow-md); backdrop-filter: blur(10px); }
.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.radio-card { position: relative; display: flex; min-height: 4.5rem; align-items: flex-start; gap: .7rem; padding: .85rem; border: 1px solid var(--line-strong); border-radius: .72rem; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--brand-600); background: #eefaf6; box-shadow: inset 0 0 0 1px var(--brand-600); }
.radio-card input { margin-top: .18rem; accent-color: var(--brand-700); }
.radio-card strong, .radio-card small { display: block; }
.choice-row { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; }
.choice-row input { width: 1.1rem; height: 1.1rem; margin-top: .17rem; accent-color: var(--brand-700); }
.choice-row strong, .choice-row small { display: block; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.check-card { display: flex; align-items: center; gap: .6rem; padding: .72rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; cursor: pointer; }
.check-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check-card input { accent-color: var(--accent-dark); }
.dropzone { display: grid; min-height: 8rem; place-items: center; gap: .4rem; padding: 1.2rem; border: 1.5px dashed #a8bdb7; border-radius: var(--radius); background: var(--surface-alt); text-align: center; cursor: pointer; }
.dropzone:hover { border-color: var(--brand-600); background: #f0faf6; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .icon { width: 1.6rem; height: 1.6rem; color: var(--brand-700); }
.file-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .65rem; margin-top: .7rem; }
.file-preview figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .6rem; background: #fff; }
.file-preview img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.file-preview figcaption { overflow: hidden; padding: .45rem; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.form-help { display: block; margin-top: .8rem; color: var(--muted); font-size: .8rem; }
.form-help:empty { display: none; }
.form-block { margin-top: 1rem; }
.location-panel { display: grid; gap: .8rem; margin-top: .85rem; }
.gps-controls { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-alt); }
.gps-controls .form-help { margin: 0; }
.card-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.compact-card-header { padding: 0 0 .9rem; border: 0; }
.panel-title { margin-top: .7rem; }
.panel-form { margin-top: 1rem; }
.inline-fields { display: flex; gap: .7rem; align-items: flex-end; }
.inline-fields .field { flex: 1; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: .78rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.input-prefix input { padding-left: 2rem; }

/* Services and dashboard */
.welcome-strip { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.3rem, 3vw, 2rem); margin-bottom: 1.35rem; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(115deg, var(--brand-900), var(--brand-700)); box-shadow: 0 14px 35px rgba(7,76,71,.18); }
.welcome-strip::after { content: ""; position: absolute; width: 15rem; height: 15rem; right: -5rem; top: -7rem; border: 2.8rem solid rgba(255,255,255,.055); border-radius: 50%; }
.welcome-strip > * { position: relative; z-index: 1; }
.welcome-strip h2 { margin-bottom: .4rem; color: #fff; }
.welcome-strip p { max-width: 42rem; margin: 0; color: rgba(255,255,255,.74); }
.welcome-strip .button { flex: 0 0 auto; background: #fff; color: var(--brand-800); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat-card { position: relative; overflow: hidden; padding: 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.stat-card-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.stat-card-head span:first-child { color: var(--ink-soft); font-size: .83rem; font-weight: 680; }
.stat-icon { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .7rem; background: var(--accent-soft); color: var(--accent-dark); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-value { margin: .65rem 0 .1rem; font-size: 1.75rem; font-weight: 820; letter-spacing: -.04em; }
.stat-note { color: var(--muted); font-size: .75rem; }
.period-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.period-card { padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.period-card.current { border-color: #a9ddd2; background: linear-gradient(135deg, #f5fffc, #f4fbfd); }
.period-card-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .75rem; color: var(--ink-soft); font-size: .82rem; font-weight: 750; }
.period-card > strong { display: block; color: var(--ink); font-size: clamp(1.65rem, 4vw, 2.25rem); letter-spacing: -.05em; }
.period-card > p { margin: .1rem 0 .85rem; color: var(--muted); font-size: .8rem; }
.period-breakdown { display: grid; gap: .35rem; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .78rem; }
.period-breakdown span { display: flex; justify-content: space-between; gap: .8rem; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.service-card { display: flex; min-height: 8.4rem; flex-direction: column; justify-content: space-between; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .16s, transform .16s, box-shadow .16s; }
.service-card:hover { transform: translateY(-2px); border-color: #9eb9b1; box-shadow: var(--shadow-md); }
.service-card-icon { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: .75rem; background: var(--accent-soft); color: var(--accent-dark); font-weight: 850; }
.service-card h3 { margin: 1rem 0 .2rem; font-size: .94rem; }
.service-card small { font-size: .75rem; }
.service-card .arrow { margin-left: auto; color: var(--brand-700); }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .8rem; }
.quick-action { display: flex; align-items: center; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.quick-action > span:first-child { display: grid; width: 2.65rem; height: 2.65rem; flex: 0 0 auto; place-items: center; border-radius: .75rem; background: var(--surface-alt); color: var(--brand-700); }
.quick-action strong, .quick-action small { display: block; }
.quick-action small { font-size: .74rem; }

/* Jobs, tables, filters */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.filters { display: flex; flex: 1; flex-wrap: wrap; gap: .6rem; }
.filter-input { max-width: 18rem; }
.filter-select { width: auto; min-width: 10rem; }
.job-list { display: grid; gap: .75rem; }
.job-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1.05rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); transition: border-color .16s; }
.job-card:hover { border-color: #a9bdb7; }
.job-card-main { display: flex; min-width: 0; gap: .9rem; }
.job-service-icon { display: grid; width: 2.8rem; height: 2.8rem; flex: 0 0 auto; place-items: center; border-radius: .78rem; background: var(--accent-soft); color: var(--accent-dark); font-weight: 850; }
.job-card h3 { margin: .12rem 0 .28rem; font-size: 1rem; }
.job-card p { display: -webkit-box; max-width: 52rem; overflow: hidden; margin: 0; color: var(--ink-soft); font-size: .87rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.job-meta { display: flex; flex-wrap: wrap; gap: .55rem 1rem; margin-top: .72rem; color: var(--muted); font-size: .77rem; }
.job-meta span { display: inline-flex; align-items: center; gap: .32rem; }
.job-meta .icon { width: .95rem; height: .95rem; }
.job-card-side { display: flex; min-width: 8rem; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: .7rem; }
.job-pay-preview { display: grid; gap: .08rem; text-align: right; }
.job-pay-preview strong, .job-pay-preview span { display: block; }
.job-pay-preview span { color: var(--accent-dark); }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: .75rem .9rem; border-bottom: 1px solid var(--line); background: #f8faf9; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; }
.data-table td { padding: .86rem .9rem; border-bottom: 1px solid var(--line); font-size: .86rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfc; }
.table-primary { display: flex; align-items: center; gap: .65rem; }
.table-avatar { display: grid; width: 2.25rem; height: 2.25rem; flex: 0 0 auto; place-items: center; border-radius: .65rem; background: var(--surface-alt); color: var(--brand-700); font-size: .78rem; font-weight: 850; }
.table-primary strong, .table-primary small { display: block; }
.table-primary small { font-size: .72rem; }
.table-actions { display: flex; justify-content: flex-end; gap: .45rem; }
.badge { display: inline-flex; min-height: 1.7rem; align-items: center; gap: .35rem; padding: .25rem .55rem; border-radius: 999px; background: #edf1f0; color: #50635f; font-size: .7rem; font-weight: 780; line-height: 1.1; white-space: nowrap; }
.badge::before { content: ""; width: .38rem; height: .38rem; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.success { background: var(--accent-soft); color: #087347; }
.badge.teal { background: #e3f7f5; color: #08766d; }
.badge.blue { background: var(--blue-soft); color: #235fb8; }
.badge.purple { background: var(--purple-soft); color: #6848b9; }
.badge.warning { background: var(--amber-soft); color: #905407; }
.badge.orange { background: var(--orange-soft); color: #a84918; }
.badge.danger { background: var(--red-soft); color: #aa2d2d; }
.badge.neutral { background: #edf1f0; color: #52645f; }
.badge.no-dot::before { display: none; }
.pagination { display: flex; justify-content: center; gap: .35rem; margin-top: 1rem; }
.pagination a, .pagination span { display: grid; min-width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid var(--line); border-radius: .55rem; background: #fff; font-size: .82rem; font-weight: 700; }
.pagination .active { border-color: var(--brand-700); background: var(--brand-700); color: #fff; }

/* Job details */
.job-hero { padding: 1.25rem; margin-bottom: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.job-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.job-hero h2 { margin: .35rem 0 .4rem; }
.job-id { color: var(--muted); font-size: .78rem; font-weight: 760; letter-spacing: .04em; }
.job-progress { display: grid; grid-template-columns: repeat(8, 1fr); margin-top: 1.35rem; }
.progress-step { position: relative; display: grid; justify-items: center; gap: .38rem; color: var(--muted); font-size: .66rem; text-align: center; }
.progress-step:not(:first-child)::before { content: ""; position: absolute; width: calc(100% - 1.5rem); height: 2px; right: calc(50% + .75rem); top: .68rem; background: var(--line-strong); }
.progress-dot { position: relative; z-index: 1; display: grid; width: 1.4rem; height: 1.4rem; place-items: center; border: 2px solid var(--line-strong); border-radius: 50%; background: #fff; color: transparent; font-size: .62rem; }
.progress-step.done { color: var(--accent-dark); font-weight: 750; }
.progress-step.done::before { background: var(--accent); }
.progress-step.done .progress-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.progress-step.current .progress-dot { box-shadow: 0 0 0 4px rgba(17,163,106,.14); }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: .72rem 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { color: var(--muted); font-size: .8rem; }
.detail-row dd { margin: 0; font-size: .88rem; font-weight: 610; }
.description-box { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-alt); }
.description-box strong { display: block; margin-bottom: .35rem; font-size: .82rem; }
.description-box p { margin-bottom: 0; color: var(--ink-soft); white-space: pre-line; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .7rem; }
.photo-tile { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface-alt); }
.photo-tile img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-tile figcaption { display: flex; justify-content: space-between; gap: .4rem; padding: .5rem .6rem; color: var(--muted); font-size: .7rem; }
.quote-card { overflow: hidden; border: 1px solid #b9ddd0; border-radius: var(--radius); background: #fbfffd; }
.quote-head { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-bottom: 1px solid #d9eee7; }
.quote-head h3 { margin: 0; }
.price-lines { display: grid; gap: .45rem; padding: 1rem; }
.price-line { display: flex; justify-content: space-between; gap: 1rem; color: var(--ink-soft); font-size: .87rem; }
.price-line.total { padding-top: .65rem; margin-top: .25rem; border-top: 1px solid var(--line); color: var(--ink); font-size: 1rem; font-weight: 820; }
.internal-fee { display: grid; gap: .4rem; padding: .75rem; margin-top: .35rem; border: 1px dashed #8dc9bd; border-radius: .65rem; background: var(--accent-soft); color: var(--ink-soft); font-size: .78rem; }
.internal-fee span { display: flex; justify-content: space-between; gap: .8rem; }
.internal-fee strong { color: var(--accent-dark); }
.provider-money-line { margin-top: .18rem; color: var(--accent-dark); }
.payment-qr, .qr-admin-preview { display: grid; grid-template-columns: minmax(9rem, 12rem) 1fr; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #b9dce3; border-radius: var(--radius); background: #f5fcfd; }
.payment-qr img, .qr-admin-preview img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
.payment-qr strong, .payment-qr span, .payment-qr small { display: block; }
.payment-qr span { margin: .2rem 0 .55rem; color: var(--ink-soft); font-size: .85rem; }
.qr-admin-preview p { margin: .25rem 0; color: var(--ink-soft); }
.payment-method-detail { padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f9fcfc; }
.payment-method-detail[hidden], .tip-custom[hidden] { display: none; }
.payment-instructions { margin: .75rem 0 0; color: var(--ink-soft); font-size: .88rem; }
.account-number { display: inline-block; margin-top: .25rem; color: var(--brand-900); font-size: 1.15rem; font-weight: 800; letter-spacing: .04em; }
.payment-method-admin code { padding: .15rem .35rem; border-radius: .35rem; background: var(--surface-alt); color: var(--brand-900); }
.pricing-summary { display: grid; gap: .25rem; padding: 1rem; border: 1px solid #b9dce3; border-radius: var(--radius-sm); background: #f5fcfd; }
.pricing-summary small, .field-help { color: var(--ink-soft); font-size: .82rem; }
.field-help { margin: 0 0 .7rem; }
.tip-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem; }
.tip-options input { position: absolute; opacity: 0; pointer-events: none; }
.tip-options span { display: grid; min-height: 2.6rem; place-items: center; padding: .45rem; border: 1px solid var(--line); border-radius: .65rem; background: #fff; color: var(--ink-soft); font-weight: 700; cursor: pointer; }
.tip-options input:checked + span { border-color: var(--brand-700); background: var(--accent-soft); color: var(--brand-900); box-shadow: 0 0 0 2px rgba(9, 145, 159, .12); }
.availability-fieldset { margin: 0; }
.availability-grid { display: grid; gap: .45rem; }
.availability-row { display: grid; grid-template-columns: 4rem minmax(6.5rem, 1fr) auto minmax(6.5rem, 1fr); align-items: center; gap: .5rem; padding: .55rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface-alt); opacity: .7; }
.availability-row.selected { border-color: #acd8cc; background: #f3fcf8; opacity: 1; }
.availability-row input[type="time"] { width: 100%; }
.day-toggle { position: relative; }
.day-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.day-toggle span { display: grid; min-height: 2.55rem; place-items: center; border: 1px solid var(--line); border-radius: .6rem; background: #fff; color: var(--ink-soft); font-weight: 800; cursor: pointer; }
.day-toggle input:checked + span { border-color: var(--brand-700); background: var(--brand-700); color: #fff; }
.choice-row.compact { padding: .4rem 0; border: 0; background: transparent; }
.quote-actions { display: flex; flex-wrap: wrap; gap: .55rem; padding: .8rem 1rem; border-top: 1px solid #d9eee7; background: #f2fbf7; }
.assignment-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.provider-option { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem; border-bottom: 1px solid var(--line); }
.provider-option:last-child { border-bottom: 0; }
.provider-option-main { display: flex; align-items: center; gap: .65rem; }
.provider-option strong, .provider-option small { display: block; }
.provider-option small { font-size: .73rem; }
.provider-option.unavailable { background: #f7f8f9; opacity: .72; }
.provider-option.unavailable input { cursor: not-allowed; }
.provider-avatar { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: .7rem; background: var(--brand-800); color: #fff; font-size: .82rem; font-weight: 850; }
.timeline { position: relative; display: grid; gap: 1rem; padding-left: 1.55rem; }
.timeline::before { content: ""; position: absolute; top: .4rem; bottom: .4rem; left: .43rem; width: 1px; background: var(--line-strong); }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; width: .65rem; height: .65rem; left: -1.45rem; top: .3rem; border: 2px solid #fff; border-radius: 50%; background: var(--brand-600); box-shadow: 0 0 0 1px var(--line-strong); }
.timeline-item strong, .timeline-item span { display: block; }
.timeline-item strong { font-size: .84rem; }
.timeline-item p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .78rem; }
.timeline-item time { color: var(--muted); font-size: .7rem; }
.sticky-card { position: sticky; top: 6.4rem; }
.action-panel { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.action-panel h3 { margin-bottom: .35rem; }
.action-panel > p { color: var(--muted); font-size: .82rem; }
.action-panel .button + .button { margin-top: .55rem; }
.action-panel > :last-child, .card-body > :last-child, .modal-body > :last-child, .form-section > :last-child { margin-bottom: 0; }
.location-map-link { display: block; width: 240px; max-width: 100%; border-radius: .7rem; }
.location-map { display: block; width: 240px; max-width: 100%; height: 110px; border: 1px solid var(--line); border-radius: .7rem; object-fit: cover; background: var(--surface-alt); }
.location-map-placeholder { display: grid; place-items: center; align-content: center; gap: .25rem; color: var(--brand-700); background: radial-gradient(circle at center, #e2f7ef, #f3f8f8); }
.location-map-placeholder .icon { width: 1.6rem; height: 1.6rem; margin: 0 auto; }
.location-map-placeholder small { display: block; color: var(--ink-soft); }
.callout { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem; border: 1px solid #d8e7e2; border-radius: .7rem; background: #f4faf8; color: var(--ink-soft); font-size: .82rem; }
.callout .icon { color: var(--brand-700); }
.callout.warning { border-color: #efdba9; background: var(--amber-soft); }
.callout.danger { border-color: #efc2c2; background: var(--red-soft); }

/* Providers, reviews and reports */
.profile-hero { display: flex; align-items: center; gap: 1.1rem; }
.profile-hero .provider-avatar { width: 4rem; height: 4rem; border-radius: 1rem; font-size: 1.2rem; }
.profile-hero h2 { margin: 0 0 .25rem; }
.profile-meta { display: flex; flex-wrap: wrap; gap: .45rem .8rem; color: var(--muted); font-size: .8rem; }
.rating { display: inline-flex; align-items: center; gap: .28rem; color: #a55b00; font-weight: 800; }
.rating .icon { width: .95rem; height: .95rem; fill: #f4a72c; stroke: #d98c13; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; margin-top: 1rem; }
.metric { padding: .75rem; border-radius: .7rem; background: var(--surface-alt); text-align: center; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: 1.15rem; }
.metric span { color: var(--muted); font-size: .7rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .45rem; }
.skill-tag { padding: .35rem .58rem; border: 1px solid #c8e5da; border-radius: 999px; background: var(--accent-soft); color: #116c4d; font-size: .75rem; font-weight: 720; }
.document-list { display: grid; gap: .55rem; }
.document-row { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .7rem; border: 1px solid var(--line); border-radius: .65rem; }
.document-row > span { display: flex; min-width: 0; align-items: center; gap: .55rem; }
.document-row strong, .document-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-card { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.review-card:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.review-card p { margin: .6rem 0 0; color: var(--ink-soft); }
.review-flags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; }
.review-flags span { padding: .24rem .5rem; border-radius: 999px; background: var(--surface-alt); color: var(--ink-soft); font-size: .7rem; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .18rem; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { color: #cad4d1; font-size: 2rem; line-height: 1; cursor: pointer; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #f2a42b; }
.bar-list { display: grid; gap: .75rem; }
.bar-row { display: grid; grid-template-columns: 8rem 1fr 3rem; align-items: center; gap: .7rem; font-size: .8rem; }
.bar-track { overflow: hidden; height: .55rem; border-radius: 999px; background: #e7eeeb; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-700), var(--accent)); }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

/* Alerts and modal */
.alert { display: flex; align-items: flex-start; gap: .65rem; padding: .8rem .9rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: .72rem; background: #fff; box-shadow: var(--shadow-sm); }
.alert > span:first-child { display: grid; width: 1.4rem; height: 1.4rem; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: .73rem; font-weight: 850; }
.alert p { flex: 1; margin: 0; font-size: .85rem; }
.alert button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.alert.success { border-color: #bde7d4; background: #f5fcf8; }
.alert.success > span { background: var(--accent-soft); color: var(--accent-dark); }
.alert.warning { border-color: #ead89f; background: #fffaf0; }
.alert.danger { border-color: #efc1c1; background: #fff7f7; }
.alert.danger > span { background: var(--red-soft); color: var(--red); }
.global-alert { position: fixed; z-index: 100; top: 1rem; left: 50%; width: min(32rem, calc(100% - 2rem)); transform: translateX(-50%); }
.modal { width: min(34rem, calc(100% - 2rem)); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: 0 2rem 6rem rgba(0,0,0,.28); }
.modal::backdrop { background: rgba(5,34,30,.56); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 1.2rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; padding: .9rem 1.2rem; border-top: 1px solid var(--line); background: var(--surface-alt); }
.lightbox { width: min(68rem, calc(100% - 1.5rem)); max-height: 94vh; padding: 2.7rem 1rem 1rem; border: 0; border-radius: 1rem; background: #071814; color: #fff; box-shadow: 0 2rem 6rem rgba(0,0,0,.5); }
.lightbox::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(4px); }
.lightbox img { display: block; width: 100%; max-height: 78vh; object-fit: contain; border-radius: .55rem; }
.lightbox button { position: absolute; top: .55rem; right: .7rem; width: 2.1rem; height: 2.1rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 1.4rem; cursor: pointer; }
.lightbox p { margin: .65rem 0 0; color: #dceae5; text-align: center; }
.view-toggle { display: inline-flex; gap: .25rem; padding: .25rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; }
.view-toggle button { padding: .45rem .75rem; border: 0; border-radius: .5rem; background: transparent; color: var(--muted); font-weight: 750; cursor: pointer; }
.view-toggle button.active { background: var(--brand-700); color: #fff; }
.job-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .55rem; }
.calendar-day { min-height: 9rem; padding: .65rem; border: 1px solid var(--line); border-radius: .75rem; background: #fff; }
.calendar-day > strong { display: block; margin-bottom: .55rem; font-size: .8rem; }
.calendar-job { display: block; padding: .45rem; margin-bottom: .4rem; border-left: 3px solid var(--brand-600); border-radius: .35rem; background: var(--surface-alt); color: var(--ink); font-size: .72rem; text-decoration: none; }
.calendar-job span { display: block; color: var(--muted); }
.message-thread { display: grid; gap: .65rem; max-height: 28rem; padding: .25rem; overflow-y: auto; }
.message-bubble { width: min(88%, 34rem); padding: .7rem .8rem; border-radius: .8rem .8rem .8rem .2rem; background: var(--surface-alt); }
.message-bubble.mine { justify-self: end; border-radius: .8rem .8rem .2rem .8rem; background: var(--accent-soft); }
.message-bubble p { margin: .2rem 0; white-space: pre-wrap; }
.message-bubble small { color: var(--muted); }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .65rem; }
.push-enable { white-space: nowrap; }
.view-more { display: block; margin: 1rem auto; }

@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .content-grid { grid-template-columns: minmax(0, 1.35fr) minmax(17rem, .75fr); }
}

@media (max-width: 900px) {
    .app-shell { display: block; }
    .app-main { min-width: 0; }
    .sidebar { width: min(20rem, 88vw); transform: translateX(-103%); box-shadow: var(--shadow-md); transition: transform .22s ease; }
    body.menu-open { overflow: hidden; }
    body.menu-open .sidebar { transform: translateX(0); }
    .sidebar-close, .menu-button { display: grid !important; }
    .sidebar-scrim { position: fixed; z-index: 40; inset: 0; background: rgba(3,31,27,.5); opacity: 0; pointer-events: none; transition: opacity .2s; }
    body.menu-open .sidebar-scrim { display: block; opacity: 1; pointer-events: auto; }
    .content-grid, .content-grid.wide-aside { grid-template-columns: 1fr; }
    .sticky-card { position: static; }
    .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-chip strong { display: none; }
    .app-footer { padding-inline: 1.2rem; }
    .job-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { min-height: auto; padding: 1.4rem 1.2rem 2rem; }
    .auth-brand > div { margin-top: 1.5rem; }
    .auth-brand h1 { font-size: 2.05rem; }
    .auth-points { display: none; }
    .auth-card { align-self: start; margin: 0; border-radius: 1.35rem 1.35rem 0 0; box-shadow: none; }
    .install-shell .auth-card { max-height: none; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .heading-actions { justify-content: flex-start; }
    .form-grid, .form-grid.three, .radio-cards, .check-grid, .report-grid, .period-grid { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .job-progress { overflow-x: auto; grid-template-columns: repeat(8, minmax(5rem, 1fr)); padding: .4rem 0 .6rem; }
    .metric-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
    .topbar { min-height: 4.65rem; padding: .65rem .9rem; }
    .topbar-title p { display: none; }
    .topbar-title h1 { max-width: 12.5rem; font-size: 1.08rem; }
    .notification-button { width: 2.45rem; height: 2.45rem; }
    .profile-chip span { width: 2.35rem; height: 2.35rem; }
    .page-content { padding: 1rem .85rem 1.5rem; }
    .app-footer { display: none; }
    .welcome-strip { align-items: stretch; flex-direction: column; }
    .welcome-strip .button { width: 100%; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .stat-card { padding: .9rem; }
    .stat-value { font-size: 1.45rem; }
    .stat-note { display: none; }
    .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
    .service-card { min-height: 7.6rem; padding: .85rem; }
    .card-header, .card-body { padding: 1rem; }
    .card-footer { align-items: stretch; flex-direction: column-reverse; padding: .85rem 1rem; }
    .card-footer .button { width: 100%; }
    .job-card { grid-template-columns: 1fr; }
    .job-card-side { min-width: 0; align-items: flex-start; flex-direction: row; }
    .job-card-main { gap: .7rem; }
    .job-service-icon { width: 2.5rem; height: 2.5rem; }
    .job-meta { gap: .4rem .7rem; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .filters { display: grid; grid-template-columns: 1fr 1fr; }
    .filter-input { grid-column: 1 / -1; max-width: none; }
    .filter-select { width: 100%; min-width: 0; }
    .data-table, .data-table thead, .data-table tbody, .data-table tr, .data-table td { display: block; }
    .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .data-table tr { padding: .75rem .9rem; border-bottom: 1px solid var(--line); }
    .data-table td { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .35rem 0; border: 0; text-align: right; }
    .data-table td::before { content: attr(data-label); color: var(--muted); font-size: .7rem; font-weight: 800; text-align: left; text-transform: uppercase; }
    .data-table td.primary-cell { display: block; margin-bottom: .35rem; text-align: left; }
    .data-table td.primary-cell::before { display: none; }
    .table-actions { justify-content: flex-end; }
    .detail-row { grid-template-columns: 1fr; gap: .2rem; }
    .profile-hero { align-items: flex-start; }
    .form-actions { bottom: .5rem; align-items: stretch; flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .inline-fields { align-items: stretch; flex-direction: column; }
    .quote-actions, .button-row { align-items: stretch; flex-direction: column; }
    .quote-actions .button, .button-row .button { width: 100%; }
    .bar-row { grid-template-columns: 6rem 1fr 2.5rem; }
    .payment-qr, .qr-admin-preview { grid-template-columns: 1fr; }
    .payment-qr img, .qr-admin-preview img { max-width: 15rem; margin-inline: auto; }
    .tip-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .availability-row { grid-template-columns: 3.6rem 1fr auto 1fr; gap: .35rem; }
    .availability-row input[type="time"] { padding-inline: .4rem; font-size: .8rem; }
    .job-calendar { grid-template-columns: 1fr; }
    .push-enable { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
[hidden] { display: none !important; }
.wrap-anywhere { overflow-wrap: anywhere; }
.scroll-records { max-height: 640px; overflow: auto; }
.scroll-list { max-height: 560px; overflow: auto; }
.metric-value { display: block; margin: .55rem 0; color: var(--ink, #123b46); font-size: 1.8rem; line-height: 1.3; }
.payment-checkout { max-width: 580px; margin: auto; }
.dynamic-qr { display: block; width: min(100%, 320px); height: auto; margin: 0 auto; }
.calendar-scroll { overflow-x: auto; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); min-width: 630px; }
.month-label { padding: .8rem; background: #f0f7f7; }
.month-day { min-height: 105px; max-height: 240px; padding: .55rem; overflow: auto; border: 1px solid #e8eeee; }
.month-day time { display: inline-block; padding: .15rem .35rem; font-weight: 700; }
.month-day.is-today time { border-radius: 50%; color: white; background: #087d83; }
.month-day.other-month { color: #82928f; background: #f7f9f9; }
.month-day a { display: block; margin: .25rem 0; padding: .3rem; border-radius: 5px; color: #145b54; background: #e1f3ec; font-size: .72rem; line-height: 1.35; }
.month-day small { display: block; font-size: .66rem; }
.month-day.is-today { box-shadow: inset 0 0 0 2px #179f8e; }
.message-thread { max-height: 420px; overflow-y: auto; }
.message-bubble { overflow-wrap: anywhere; }
.data-table-wrap thead { position: sticky; z-index: 1; top: 0; background: #f3f8f6; }
.stat-card { text-decoration: none; }
.payment-checkout .button { max-width: 100%; }
.card-body > p { overflow-wrap: anywhere; }

@media (max-width: 640px) {
    .topbar [data-enable-push]:not([hidden]) { display: inline-flex !important; padding: .4rem; font-size: .7rem; }
    .metric-value { font-size: 1.4rem; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .month-day { min-height: 85px; }
    .scroll-records { max-height: 560px; }
}

/* =========================================================
   BALAYWORKS PUBLIC LANDING / AUTH HERO
   ========================================================= */

.auth-landing {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    background: #edf5f5;
}


/* ---------------------------------------------------------
   ROTATING BACKGROUND IMAGES
   --------------------------------------------------------- */

.auth-hero-slides {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-hero-slide {
    position: absolute;
    inset: -1.5rem;

    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;

    opacity: 0;
    transform: scale(1.025);

    will-change: opacity, transform;
}


/* Your four service images */

.hero-slide-1 {
    background-image:
        url('../images/hero/aircon.png');

    animation: balayHero1 24s linear infinite;
}

.hero-slide-2 {
    background-image:
        url('../images/hero/electrical.png');

    animation: balayHero2 24s linear infinite;
}

.hero-slide-3 {
    background-image:
        url('../images/hero/handyman.png');

    animation: balayHero3 24s linear infinite;
}

.hero-slide-4 {
    background-image:
        url('../images/hero/plumbing.png');

    animation: balayHero4 24s linear infinite;
}


/*
   Each photo is the dominant image for about 6 seconds.
   The transitions overlap to create the cross-fade.
*/

@keyframes balayHero1 {

    0%,
    20% {
        opacity: 1;
        transform: scale(1.025);
    }

    25%,
    95% {
        opacity: 0;
    }

    100% {
        opacity: 1;
        transform: scale(1.065);
    }
}


@keyframes balayHero2 {

    0%,
    20% {
        opacity: 0;
    }

    25%,
    45% {
        opacity: 1;
        transform: scale(1.025);
    }

    50%,
    100% {
        opacity: 0;
        transform: scale(1.065);
    }
}


@keyframes balayHero3 {

    0%,
    45% {
        opacity: 0;
    }

    50%,
    70% {
        opacity: 1;
        transform: scale(1.025);
    }

    75%,
    100% {
        opacity: 0;
        transform: scale(1.065);
    }
}


@keyframes balayHero4 {

    0%,
    70% {
        opacity: 0;
    }

    75%,
    95% {
        opacity: 1;
        transform: scale(1.025);
    }

    100% {
        opacity: 0;
        transform: scale(1.065);
    }
}


/* Very subtle photographic treatment */

.auth-hero-overlay {
    position: absolute;
    z-index: 1;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, .03) 0%,
            rgba(255, 255, 255, 0) 55%,
            rgba(224, 246, 245, .13) 100%
        ),
        linear-gradient(
            0deg,
            rgba(0, 93, 98, .15) 0%,
            transparent 30%
        );
}


/* ---------------------------------------------------------
   LEFT HERO SECTION
   --------------------------------------------------------- */

.auth-landing .auth-brand {
    position: relative;
    z-index: 4;

    display: block;

    min-width: 0;
    min-height: 100vh;

    padding:
        clamp(1.6rem, 3vw, 3rem)
        clamp(2rem, 4vw, 4.5rem)
        3rem;

    background: none;
}


/* =========================================================
   BALAYWORKS LOGO — soft white outer glow / halo
   ========================================================= */

.hero-logo-panel {
    position: relative;
    z-index: 7;

    display: inline-flex;
    align-items: center;

    width: min(22rem, 88%);

    padding: .2rem .3rem;

    /* No visible card */
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;

    isolation: isolate;
}


/* Broad soft white haze behind the logo */

.hero-logo-panel::before {
    content: "";

    position: absolute;
    z-index: -1;

    inset: -.7rem -1rem;

    background: rgba(255, 255, 255, .72);

    filter: blur(16px);

    border-radius: .5rem;

    pointer-events: none;
}


/* Actual logo */

.hero-logo-panel img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;

    /* Smaller glow directly around the PNG/logo */
    filter:
        drop-shadow(0 0 4px rgba(255, 255, 255, .95))
        drop-shadow(0 0 9px rgba(255, 255, 255, .65));
}


/* =========================================================
   HERO HEADLINE — soft white glow, not a visible card
   ========================================================= */

.hero-copy-panel {
    position: absolute;
    z-index: 7;

    top: 51%;
    left: clamp(2rem, 4vw, 4.5rem);

    width: max-content;
    max-width: calc(100% - 5rem);

    padding: .25rem .4rem;

    transform: translateY(-50%);

    /* IMPORTANT:
       remove the obvious white rounded rectangle */
    background: transparent;
    border-radius: 0;
    box-shadow: none;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}


/* Soft glowing white haze behind the entire slogan */

.hero-copy-panel::before {
    content: "";

    position: absolute;
    z-index: -1;

    inset: -1rem -1.5rem;

    background: rgba(255, 255, 255, .68);

    filter: blur(18px);

    border-radius: .5rem;

    pointer-events: none;
}


/* Main headline */

.auth-landing .hero-headline {
    max-width: none;
    margin: 0;

    font-size: clamp(2.3rem, 3.7vw, 4.1rem);
    font-weight: 900;

    line-height: .98;
    letter-spacing: -.055em;

    /* Very subtle white halo directly around letters */
    text-shadow:
        0 0 5px rgba(255,255,255,.95),
        0 0 12px rgba(255,255,255,.65);
}


/* Force exactly TWO lines */

.hero-headline-dark,
.hero-headline-accent {
    display: block;
    white-space: nowrap;
}


/* First line */

.auth-landing .hero-headline-dark {
    color: #063449;
}


/* Second line */

.auth-landing .hero-headline-accent {
    color: #079878;
}


/* ---------------------------------------------------------
   LOCATION / TRUST INFO
   --------------------------------------------------------- */

.hero-local-proof {
    position: absolute;
    z-index: 8;

    bottom: 2.2rem;
    left: clamp(2rem, 4vw, 4.5rem);

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 1.5rem 3.2rem;

    color: #fff;
}


.hero-proof-item {
    display: flex;
    align-items: center;

    gap: .8rem;
}


.hero-proof-icon {
    display: grid;

    width: 2.6rem;
    height: 2.6rem;

    place-items: center;

    color: #fff;
}


.hero-proof-icon .icon {
    width: 2rem;
    height: 2rem;
}


.hero-proof-copy {
    display: grid;
    gap: .08rem;
}


.hero-proof-copy strong {
    color: #fff;

    font-size: .88rem;
    font-weight: 750;

    text-shadow:
        0 2px 10px rgba(0, 60, 65, .45);
}


.hero-proof-copy small {
    color: rgba(255, 255, 255, .92);

    font-size: .55rem;
    font-weight: 800;

    letter-spacing: .19em;

    text-shadow:
        0 2px 8px rgba(0, 60, 65, .45);
}


/* ---------------------------------------------------------
   HTML-GENERATED WAVES
   --------------------------------------------------------- */

.auth-hero-waves {
    position: absolute;
    z-index: 3;

    right: 0;
    bottom: -1px;
    left: 0;

    height: clamp(7rem, 15vw, 12.5rem);

    overflow: hidden;

    pointer-events: none;
}


.auth-hero-waves svg {
    display: block;

    width: 100%;
    height: 100%;
}


/* ---------------------------------------------------------
   LOGIN / REGISTER CARD
   Existing form remains unchanged.
   --------------------------------------------------------- */

.auth-landing .auth-card {
    position: relative;
    z-index: 10;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .hero-copy-panel {
        width: min(34rem, calc(100% - 4rem));
    }

    .auth-landing .hero-headline {
        font-size: clamp(2.4rem, 5vw, 4rem);
    }

    .hero-local-proof {
        gap: 1rem 2rem;
    }

}


@media (max-width: 720px) {

    .auth-landing {
        grid-template-columns: 1fr;
    }

    .auth-landing .auth-brand {
        min-height: 32rem;

        padding:
            1.2rem
            1.2rem
            2rem;
    }

    .hero-logo-panel {
        width: min(19rem, 82vw);
    }

    .hero-copy-panel {
        top: 49%;
        left: 1.2rem;

        width: min(31rem, calc(100% - 2.4rem));

        padding: .5rem .65rem;
    }

    .auth-landing .hero-headline {
        font-size: clamp(2.15rem, 9vw, 3.4rem);
    }

    .hero-local-proof {
        right: 1rem;
        bottom: 1.15rem;
        left: 1.2rem;

        gap: .75rem 1.4rem;
    }

    .hero-proof-copy strong {
        font-size: .72rem;
    }

    .hero-proof-copy small {
        font-size: .48rem;
    }

    .hero-proof-icon {
        width: 2.1rem;
        height: 2.1rem;
    }

    .hero-proof-icon .icon {
        width: 1.6rem;
        height: 1.6rem;
    }

    .auth-hero-waves {
        height: 8rem;
    }

    .auth-landing .auth-card {
        margin: 0;

        border-radius: 1.35rem 1.35rem 0 0;
    }

}


@media (max-width: 480px) {

    .hero-local-proof {
        align-items: flex-start;
        flex-direction: column;

        gap: .55rem;
    }

    .auth-hero-waves {
        height: 9rem;
    }

}


/* Accessibility: no slideshow motion when reduced motion is requested */

@media (prefers-reduced-motion: reduce) {

    .auth-hero-slide {
        animation: none !important;
        opacity: 0;
        transform: none;
    }

    .hero-slide-1 {
        opacity: 1;
    }

}

/* =========================================================
   PROVIDER APPLICATION
   Long-form public page
   ========================================================= */

.provider-application-page {
    align-items: start;
}

.provider-application-page .auth-card {
    align-self: start;
    margin-top: 2rem;
    margin-bottom: 2rem;
}


/*
   Keep the marketing content visible on the left while
   the long provider form scrolls on desktop.
*/

@media (min-width: 721px) {

    .provider-application-page .auth-brand-landing {
        position: sticky;
        top: 0;
        height: 100vh;
        min-height: 100vh;
    }

}


/* Return to normal stacked layout on phones */

@media (max-width: 720px) {

    .provider-application-page .auth-brand-landing {
        position: relative;
        top: auto;
        height: auto;
        min-height: 32rem;
    }

    .provider-application-page .auth-card {
        margin: 0;
    }

}
