:root {
    --ink: #17211d;
    --forest: #245447;
    --moss: #5d6f67;
    --stone: #64717b;
    --canvas: #f3f4f1;
    --surface: #ffffff;
    --paper: #fbfaf7;
    --line: #d7ded9;
    --soft: #edf3ef;
    --soft-blue: #edf3f7;
    --warning-surface: #fbf2df;
    --warning-text: #785a16;
    --danger-surface: #f8e8e6;
    --danger-text: #9f352c;
    --shadow: 0 1px 2px rgba(23, 33, 29, 0.08), 0 10px 26px rgba(23, 33, 29, 0.04);
    --shadow-soft: 0 1px 2px rgba(23, 33, 29, 0.06);
    --radius-xl: 12px;
    --radius-lg: 10px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --sidebar-width: 286px;
    --font-sans: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.u-mt-0 {
    margin-top: 0;
}

.u-mt-8 {
    margin-top: 8px;
}

.u-mt-12 {
    margin-top: 12px;
}

.u-mt-14 {
    margin-top: 14px;
}

.u-mt-16 {
    margin-top: 16px;
}

.u-mt-18 {
    margin-top: 18px;
}

.u-mt-20 {
    margin-top: 20px;
}

.u-mt-24 {
    margin-top: 24px;
}

.u-mb-0 {
    margin-bottom: 0;
}

.u-mb-12 {
    margin-bottom: 12px;
}

.u-mb-16 {
    margin-bottom: 16px;
}

.u-text-left {
    text-align: left;
}

.u-p-14 {
    padding: 14px;
}

.u-p-22 {
    padding: 22px;
}

.u-flex-fill-min-320 {
    flex: 1 1 320px;
}

.field-align-end {
    justify-content: end;
}

.panel-grid-audit-filters {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-section-spacer {
    margin: 24px 0 12px;
}

.review-rating-meter {
    display: block;
    width: 100%;
    height: 12px;
    margin-top: 18px;
    border: 0;
    background: #e8efee;
}

.review-rating-meter::-webkit-meter-bar {
    border-radius: 999px;
    background: #e8efee;
}

.review-rating-meter::-webkit-meter-optimum-value,
.review-rating-meter::-webkit-meter-suboptimum-value,
.review-rating-meter::-webkit-meter-even-less-good-value {
    height: 100%;
    border-radius: 999px;
    background: var(--forest);
}

.review-rating-meter::-moz-meter-bar {
    border-radius: 999px;
    background: var(--forest);
}

.info-box.danger {
    border-color: #f4c7c4;
    background: #fff3f2;
}

.info-box.success {
    border-color: #a6f4c5;
    background: #effaf5;
    color: #0f5132;
}

.info-box.notice {
    border-color: #d2e1ff;
    background: #f5f8ff;
    color: #1d4ed8;
}

.client-admin-contact-notice {
    display: grid;
    gap: 6px;
}

.client-admin-contact-notice p,
.client-admin-contact-notice a {
    color: var(--danger-text);
}

.client-admin-contact-notice a {
    font-weight: 800;
    overflow-wrap: anywhere;
}

html {
    background: var(--canvas);
}

body {
    background: linear-gradient(90deg, rgba(36, 84, 71, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #f8f8f5 0%, var(--canvas) 48%, #eef2ef 100%);
    background-size: 32px 32px, auto;
    color: var(--ink);
    font-family: var(--font-sans);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

h1,
h2,
h3,
.display-title,
.page-header h1 {
    font-family: var(--font-display);
    letter-spacing: 0;
}

h1,
.page-header h1 {
    font-weight: 700;
}

p {
    color: var(--stone);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(47, 93, 80, 0.2);
    outline-offset: 2px;
}

.app-shell {
    background: var(--canvas);
}

.app-sidebar {
    gap: 22px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    box-shadow: none;
    backdrop-filter: none;
}

.public-brand-logo {
    width: min(270px, 78vw);
    margin-bottom: 20px;
}

.brand-kicker,
.nav-section-label,
.eyebrow,
.eyebrow-label {
    color: #52606d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav-stack {
    gap: 20px;
}

.nav-section {
    gap: 4px;
}

.nav-link {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: #33404c;
    font-size: 15px;
    font-weight: 700;
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.cookie-settings-button {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    color: #33404c;
    font: inherit;
    font-weight: 700;
    text-align: left;
    transform: none;
}

.cookie-settings-button:hover {
    background: rgba(51, 64, 76, 0.06);
    box-shadow: none;
    color: #33404c;
    transform: none;
}

.public-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem auto 0;
    color: var(--stone);
    font-size: 0.9rem;
}

.public-legal-links a {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.public-legal-links a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.site-notice {
    display: block;
    box-sizing: border-box;
    position: fixed;
    right: auto;
    bottom: 1rem;
    left: 50%;
    z-index: 10000;
    width: calc(100vw - 2rem);
    min-height: 96px;
    max-width: 960px;
    margin: 0;
    padding: 0.9rem 1rem;
    overflow: visible;
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-left: 4px solid var(--forest);
    border-radius: 8px;
    background: rgba(251, 250, 247, 0.98);
    box-shadow: 0 14px 38px rgba(23, 33, 29, 0.16);
    color: var(--ink);
}

.site-notice-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
}

.site-notice-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.site-notice-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 0.35rem;
    padding: 0.18rem 0.5rem;
    border: 1px solid #cbded8;
    border-radius: 999px;
    background: #eef4f2;
    color: var(--forest);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.site-notice-copy h2 {
    margin: 0 0 0.2rem;
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.3;
}

.site-notice-copy p {
    margin: 0;
    color: var(--stone);
    font-size: 0.92rem;
    line-height: 1.5;
}

.site-notice-copy a {
    color: var(--forest);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.site-notice-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.6rem;
}

.site-notice-accept {
    margin: 0;
    min-height: 42px;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--forest);
    border-radius: 8px;
    background: var(--forest);
    color: #ffffff;
    cursor: pointer;
    font: 800 0.92rem/1 var(--font-sans);
    white-space: nowrap;
}

.site-notice-accept:hover,
.site-notice-accept:focus-visible {
    background: #1d4339;
    border-color: #1d4339;
}

@media (max-width: 640px) {
    .site-notice {
        bottom: 0.65rem;
        width: calc(100vw - 1rem);
        min-height: 0;
        padding: 0.65rem 0.75rem;
    }

    .site-notice-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.75rem;
        min-height: 0;
    }

    .site-notice-kicker {
        margin-bottom: 0.2rem;
        padding: 0.14rem 0.42rem;
        font-size: 0.64rem;
    }

    .site-notice-copy h2 {
        margin-bottom: 0.1rem;
        font-size: 0.92rem;
    }

    .site-notice-copy p {
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .site-notice-actions {
        align-items: center;
        flex-direction: row;
    }

    .site-notice-actions .button,
    .site-notice-accept {
        width: auto;
        min-height: 38px;
        padding: 0.55rem 0.85rem;
        font-size: 0.85rem;
    }
}

.nav-link:hover {
    background: #f7f8f9;
    border-color: var(--line);
    color: var(--forest);
    transform: none;
}

.nav-link.is-active {
    background: #eef4f2;
    border-color: #cbded8;
    color: #244d43;
}

.nav-link-danger {
    color: var(--danger-text);
}

.account-chip {
    border-color: var(--line);
    border-radius: var(--radius-lg);
    background: #fafbfc;
    box-shadow: none;
}

.account-avatar {
    background: #e8eef2;
    color: #264d43;
}

.app-main,
.public-shell {
    padding: clamp(20px, 3vw, 38px);
}

.app-main > *,
.public-shell > * {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.public-shell {
    display: grid;
    min-height: 100vh;
    align-items: center;
}

.public-auth-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 520px);
    gap: clamp(24px, 5vw, 72px);
    align-items: start;
    width: min(100%, 1120px);
}

.public-auth-layout.register-layout {
    grid-template-columns: minmax(260px, 0.7fr) minmax(420px, 780px);
    width: min(100%, 1240px);
}

.public-intro {
    padding-top: clamp(12px, 4vh, 52px);
}

.public-intro h1 {
    max-width: 620px;
    margin: 14px 0 16px;
    color: var(--ink);
    font-size: clamp(2.25rem, 1.8rem + 1.4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.06;
}

.public-intro > p {
    max-width: 560px;
    font-size: 17px;
    line-height: 1.65;
}

.public-assurance-list {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

.public-assurance-list p {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.public-assurance-list strong {
    color: var(--ink);
    font-size: 15px;
}

.public-assurance-list span {
    color: var(--stone);
}

.page-header {
    margin-bottom: 22px;
}

.page-header h1 {
    max-width: 820px;
    font-size: clamp(2rem, 1.7rem + 1vw, 2.8rem);
    line-height: 1.08;
}

.page-lead,
.panel-subtitle {
    color: var(--stone);
}

.hero-panel,
.panel,
.auth-panel,
.metric-card,
.list-card,
.empty-state,
.state-card,
.surface-card,
.profile-panel,
.request-card,
.payment-container,
.reviews-container,
.credentials-panel,
.status-card,
.guidance-card,
.hero-copy,
.card,
.little-cards,
.tradesman-card,
.request-list {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-panel,
.hero-copy {
    padding: clamp(22px, 2.8vw, 32px);
    background: var(--surface);
}

.hero-panel {
    border-left: 5px solid var(--forest);
}

.hero-copy::after {
    display: none;
}

.panel,
.auth-panel,
.credentials-panel {
    padding: clamp(22px, 2.6vw, 30px);
}

.auth-panel {
    width: 100%;
}

.login-panel,
.register-panel {
    margin: 0;
}

.panel-header {
    gap: 16px;
    margin-bottom: 20px;
}

.panel-title,
.panel-header h2 {
    color: var(--ink);
    font-size: clamp(1.25rem, 1.1rem + 0.4vw, 1.6rem);
    font-weight: 800;
}

.metric-grid,
.panel-grid,
.two-column-grid,
.three-column-grid {
    gap: 16px;
}

.metric-card {
    padding: 18px;
}

.metric-card p {
    color: #52606d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.metric-card strong {
    color: var(--ink);
    font-size: clamp(1.45rem, 1.2rem + 0.7vw, 2rem);
    font-weight: 800;
}

.list-card,
.state-card,
.empty-state {
    padding: clamp(18px, 2.2vw, 24px);
}

.list-card h3,
.state-card h3,
.empty-state h3 {
    color: var(--ink);
    font-weight: 800;
}

.meta-list {
    gap: 0;
    border-top: 1px solid var(--line);
}

.meta-list p,
.detail-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.meta-list p:last-child,
.detail-row:last-child {
    border-bottom: 0;
}

.meta-list strong,
.detail-label {
    color: #33404c;
}

.badge,
.status-pill {
    border: 1px solid #cbded8;
    background: #eef4f2;
    color: #244d43;
    font-weight: 800;
}

.status-pill.pending,
.status-pill.pending_review,
.status-pill.checkout_created,
.status-pill.hold_requested,
.status-pill.disputed,
.status-pill.cash_due,
.status-pill.cash_agreed,
.status-pill.cash_paid_unconfirmed,
.status-pill.bank_transfer_due,
.status-pill.bank_transfer_marked_sent,
.status-pill.setup_needed,
.status-pill.needs-video-call,
.status-pill.needs_video_call {
    border-color: #ead6aa;
    background: var(--warning-surface);
    color: var(--warning-text);
}

.status-pill.denied,
.status-pill.archived,
.status-pill.payment_failed,
.status-pill.cancelled,
.status-pill.rejected {
    border-color: #efc4bf;
    background: var(--danger-surface);
    color: var(--danger-text);
}

.button,
.button-link,
button,
input[type="submit"],
.save-button {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--forest);
    color: #ffffff;
    box-shadow: none;
    font-size: 15px;
    font-weight: 800;
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.button:hover,
.button-link:hover,
button:hover,
input[type="submit"]:hover,
.save-button:hover {
    background: #254b41;
    box-shadow: none;
    transform: none;
}

.button.secondary,
.button-link.secondary,
button.secondary,
button[type="button"].secondary {
    border-color: var(--line);
    background: var(--surface);
    color: #33404c;
}

.button.secondary:hover,
.button-link.secondary:hover,
button.secondary:hover,
button[type="button"].secondary:hover {
    border-color: #b8c4cc;
    background: #f7f8f9;
    color: var(--forest);
}

.button.danger,
.button-link.danger,
button.danger {
    background: var(--danger-text);
    color: #ffffff;
}

.logout-form .logout-button {
    color: var(--danger-text);
}

.logout-form .logout-button:hover {
    background: var(--danger-surface);
    color: var(--danger-text);
}

form {
    display: block;
    margin: 0;
}

.form-grid {
    gap: 18px;
}

.login-form {
    grid-template-columns: minmax(0, 1fr);
}

.register-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field,
.field-group,
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.field label,
.field-label,
.field-group label,
.form-field label {
    color: #33404c;
    font-size: 14px;
    font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
select,
textarea,
.input-field,
.field-group .input-field {
    min-height: 48px;
    border: 1px solid #cbd5de;
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--ink);
}

input:focus,
select:focus,
textarea:focus,
.input-field:focus,
.field-group .input-field:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(47, 93, 80, 0.12);
}

input::placeholder,
textarea::placeholder {
    color: #8d9aa5;
}

input[type="file"] {
    background: #ffffff;
    border-color: #cbd5de;
}

.helper-text,
.field-note,
.muted-text {
    color: #63717d;
}

.flash,
.toast {
    border-color: var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.loader {
    border-color: rgba(47, 93, 80, 0.15);
    border-top-color: var(--forest);
}

.beta-slot-hint {
    border-color: #cbded8;
    background: #eef4f2;
    color: #244d43;
}

.availability-switch-shell,
.payment-rail-card,
.payment-journey-card,
.payment-step,
.document-card,
.saved-card-item,
.file-drop {
    border-color: var(--line);
    background: var(--surface);
}

.availability-switch-shell.is-on,
.payment-rail-card:hover {
    box-shadow: none;
}

.payment-rail-card:hover {
    border-color: #b8c4cc;
    transform: none;
}

.payment-rail-option input:checked + .payment-rail-card,
.payment-journey-card.is-selected {
    border-color: #9dbeb4;
    background: #eef4f2;
    box-shadow: inset 0 0 0 1px rgba(47, 93, 80, 0.06);
}

.credentials-shell {
    --panel-bg: var(--surface);
    --panel-border: var(--line);
    --page-accent: var(--forest);
    --page-accent-soft: #eef4f2;
    --page-ink: var(--ink);
    --page-muted: var(--stone);
    --page-surface: var(--surface);
    padding: 0;
}

.accepted-types,
.status-note {
    background: #f7f8f9;
    color: #33404c;
}

.status-row {
    border-top-color: var(--line);
}

.modal {
    background: rgba(31, 41, 51, 0.48);
    backdrop-filter: none;
}

.modal-content {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: 0 20px 52px rgba(31, 41, 51, 0.22);
}

.surface-table td,
.surface-table th {
    border-bottom-color: var(--line);
}

.review-rating,
.stars,
.rating-stars {
    color: #8f641b;
}

.main-content,
.container,
.payment-container,
.request-card,
.reviews-container {
    width: min(100%, 900px);
    margin: 0 auto;
}

.main-content {
    max-width: 1180px;
    padding: 0;
}

.card,
.request-list {
    max-width: 980px;
}

.job-requests-list {
    gap: 16px;
}

.little-cards {
    flex: 1 1 260px;
    max-width: none;
    text-align: left;
}

@media (max-width: 1040px) {
    .public-auth-layout,
    .public-auth-layout.register-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        width: min(100%, 760px);
    }

    .public-intro {
        padding-top: 0;
    }

    .public-intro h1 {
        font-size: clamp(2rem, 1.7rem + 1vw, 2.65rem);
    }

    .public-assurance-list {
        margin-top: 22px;
    }
}

@media (max-width: 980px) {
    .app-sidebar {
        box-shadow: none;
    }

    .nav-stack {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }
}

@media (max-width: 700px) {
    .register-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .app-main,
    .public-shell {
        padding: 16px;
    }

    .hero-panel,
    .panel,
    .auth-panel,
    .list-card,
    .state-card,
    .empty-state,
    .credentials-panel,
    .status-card,
    .hero-copy {
        border-radius: var(--radius-lg);
    }

    .public-intro h1,
    .page-header h1 {
        font-size: 2rem;
    }
}

/* Third-pass service layout: calmer, clearer, and less card-heavy. */
.service-page {
    display: grid;
    gap: 20px;
    width: min(100%, 1180px);
    margin: 0 auto;
}

.service-dashboard {
    gap: 20px;
}

.service-header {
    display: grid;
    grid-template-columns: minmax(0, 860px);
    gap: clamp(22px, 4vw, 52px);
    align-items: start;
    padding: 8px 0 24px;
    border-bottom: 1px solid var(--line);
}

.service-header-simple {
    grid-template-columns: minmax(0, 820px);
}

.service-header h1 {
    max-width: 860px;
    margin: 8px 0 10px;
    color: var(--ink);
    font-size: clamp(2.1rem, 1.6rem + 1.45vw, 3.15rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: 0;
}

.service-header .page-lead {
    max-width: 680px;
    font-size: 16px;
}

.service-metrics {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.service-metrics .metric-card {
    display: grid;
    align-content: space-between;
    min-height: 112px;
    border-left: 4px solid #c7d8d1;
    background: var(--surface);
}

.service-metrics .metric-card strong {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.records-panel {
    overflow: hidden;
    padding: 0;
}

.records-panel > .panel-header {
    align-items: center;
    margin: 0;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, var(--paper));
}

.records-panel > .record-stack {
    gap: 12px;
    padding: 18px;
    background: #ffffff;
}

.record-stack .list-card {
    border-color: #dde4df;
    border-radius: var(--radius-lg);
    box-shadow: none;
    transition: border-color 0.14s ease, background-color 0.14s ease;
}

.record-stack .list-card:hover {
    border-color: #b9cbc3;
    background: #fcfdfb;
}

.record-stack .list-card h3 {
    margin-bottom: 0;
    font-size: 19px;
}

.record-description {
    max-width: 64rem;
    margin-top: 8px;
}

.compact-row {
    margin-top: 10px;
}

.card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0 18px;
    margin-top: 14px;
    padding-top: 6px;
}

.card-meta p {
    display: grid;
    gap: 2px;
    align-content: start;
}

.card-meta strong {
    color: #52606d;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.centered-actions {
    justify-content: center;
    margin-top: 18px;
}

.badge-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.badge-success {
    border-color: #bed8ce;
    background: var(--soft);
    color: var(--forest);
}

.badge-warning {
    border-color: #ead6aa;
    background: var(--warning-surface);
    color: var(--warning-text);
}

.badge-danger {
    border-color: #efc4bf;
    background: var(--danger-surface);
    color: var(--danger-text);
}

.client-report-badge {
    justify-content: center;
    min-width: 34px;
    padding-inline: 10px;
    text-align: center;
}

.search-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.search-panel {
    position: sticky;
    top: 24px;
}

.stacked-form {
    grid-template-columns: minmax(0, 1fr);
}

.stacked-form .helper-text {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #f7f9f7;
}

.stacked-form .button {
    width: 100%;
}

.search-results-panel {
    min-height: 420px;
}

.public-shell {
    background: radial-gradient(circle at 14% 20%, rgba(36, 84, 71, 0.08), transparent 28%),
    radial-gradient(circle at 80% 8%, rgba(99, 113, 125, 0.07), transparent 30%);
}

.auth-panel {
    position: relative;
    overflow: hidden;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--forest), #8aa39a);
}

@media (max-width: 900px) {
    .service-header,
    .search-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-panel {
        position: static;
    }
}

@media (max-width: 640px) {
    .service-page {
        gap: 16px;
    }

    .service-header {
        padding-bottom: 18px;
    }

    .service-header h1 {
        font-size: 2rem;
    }

    .records-panel > .panel-header,
    .records-panel > .record-stack {
        padding: 16px;
    }

    .badge-cluster {
        justify-content: flex-start;
    }

    .card-meta {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Final polish pass: richer depth without adding duplicate navigation. */
:root {
    --accent-gold: #b7791f;
    --accent-sage: #789487;
    --accent-ink: #10241d;
    --glow-sage: rgba(36, 84, 71, 0.12);
    --glow-gold: rgba(183, 121, 31, 0.1);
}

body {
    background: radial-gradient(circle at 82% 4%, rgba(183, 121, 31, 0.08), transparent 26%),
    radial-gradient(circle at 8% 18%, rgba(36, 84, 71, 0.11), transparent 28%),
    linear-gradient(90deg, rgba(36, 84, 71, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #faf9f4 0%, #f3f5f1 48%, #edf2ee 100%);
    background-size: auto, auto, 34px 34px, auto;
}

.app-shell {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 34%),
    transparent;
}

.app-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 249, 245, 0.94)),
    var(--surface);
    box-shadow: 10px 0 36px rgba(23, 33, 29, 0.045);
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 0;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}

.nav-link:hover {
    background: #f3f7f4;
}

.nav-link.is-active {
    background: linear-gradient(90deg, rgba(36, 84, 71, 0.12), rgba(36, 84, 71, 0.04)),
    #eef4f2;
    box-shadow: inset 0 0 0 1px rgba(36, 84, 71, 0.03);
}

.nav-link.is-active::before {
    background: var(--forest);
}

.account-chip {
    background: linear-gradient(135deg, #ffffff, #f5f7f4),
    var(--surface);
}

.account-avatar {
    background: radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.8), transparent 32%),
    linear-gradient(135deg, #dfece5, #cbded8);
}

.service-page {
    gap: 22px;
}

.service-metrics {
    gap: 18px;
}

.service-metrics .metric-card {
    position: relative;
    min-height: 124px;
    overflow: hidden;
    border: 1px solid rgba(198, 210, 203, 0.92);
    border-left: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 246, 0.96)),
    var(--surface);
    box-shadow: 0 1px 2px rgba(23, 33, 29, 0.06), 0 16px 34px rgba(23, 33, 29, 0.055);
}

.service-metrics .metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--forest), var(--accent-sage));
}

.service-metrics .metric-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -38px;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-sage), transparent 68%);
    pointer-events: none;
}

.service-metrics .metric-card:nth-child(2)::before,
.service-metrics .metric-card:nth-child(4)::before {
    background: linear-gradient(90deg, var(--accent-gold), #d3a34f);
}

.service-metrics .metric-card:nth-child(2)::after,
.service-metrics .metric-card:nth-child(4)::after {
    background: radial-gradient(circle, var(--glow-gold), transparent 68%);
}

.service-metrics .metric-card p,
.records-panel .eyebrow-label {
    color: #506157;
}

.service-metrics .metric-card strong {
    position: relative;
    z-index: 1;
    font-size: clamp(1.65rem, 1.3rem + 0.95vw, 2.35rem);
    letter-spacing: 0;
}

.tradesman-dashboard {
    gap: 16px;
}

.tradesman-dashboard .tradesman-metrics {
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
    gap: 10px;
}

.tradesman-dashboard .tradesman-metrics .metric-card {
    min-height: 82px;
    padding: 12px 14px;
    border-color: rgba(207, 217, 212, 0.95);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(23, 33, 29, 0.05);
}

.tradesman-dashboard .tradesman-metrics .metric-card::before {
    height: 3px;
}

.tradesman-dashboard .tradesman-metrics .metric-card::after {
    display: none;
}

.tradesman-dashboard .tradesman-metrics .metric-card p {
    color: #596960;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.tradesman-dashboard .tradesman-metrics .metric-card strong {
    margin-top: 6px;
    font-size: clamp(1.2rem, 1rem + 0.45vw, 1.55rem);
    font-weight: 700;
    line-height: 1.15;
}

.tradesman-dashboard .tradesman-metrics .metric-card:nth-child(5) strong {
    font-size: clamp(1rem, 0.9rem + 0.3vw, 1.25rem);
}

.service-dashboard {
    gap: 12px;
}

.service-dashboard .service-metrics,
.service-dashboard .tradesman-metrics {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
}

.service-dashboard .service-metrics .metric-card,
.service-dashboard .tradesman-metrics .metric-card {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
}

.service-dashboard .service-metrics .metric-card::before,
.service-dashboard .service-metrics .metric-card::after,
.service-dashboard .tradesman-metrics .metric-card::before,
.service-dashboard .tradesman-metrics .metric-card::after {
    display: none;
}

.service-dashboard .service-metrics .metric-card p,
.service-dashboard .tradesman-metrics .metric-card p {
    margin: 0;
    color: #596960;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.service-dashboard .service-metrics .metric-card strong,
.service-dashboard .tradesman-metrics .metric-card strong,
.tradesman-dashboard .tradesman-metrics .metric-card:nth-child(5) strong {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: right;
}

.service-dashboard .dashboard-records-panel {
    border-radius: 6px;
    box-shadow: none;
}

.service-dashboard .dashboard-records-panel > .panel-header {
    padding: 12px 16px;
    background: #f7f9f7;
}

.service-dashboard .dashboard-records-panel > .panel-header::before {
    display: none;
}

.service-dashboard .dashboard-records-panel .eyebrow-label {
    font-size: 10px;
    letter-spacing: 0.08em;
}

.service-dashboard .dashboard-records-panel .panel-title {
    font-size: 17px;
}

.service-dashboard .dashboard-records-panel .panel-subtitle {
    margin-top: 2px;
    font-size: 13px;
}

.service-dashboard .dashboard-records-panel > .record-stack {
    gap: 8px;
    padding: 10px;
    background: #ffffff;
}

.service-dashboard .record-stack .dashboard-request-card {
    padding: 12px 14px;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none;
}

.service-dashboard .record-stack .dashboard-request-card::before {
    display: none;
}

.service-dashboard .record-stack .dashboard-request-card:hover {
    border-color: #c2d0ca;
    background: #ffffff;
    box-shadow: none;
    transform: none;
}

.service-dashboard .dashboard-request-card h3 {
    font-size: 16px;
    font-weight: 700;
}

.service-dashboard .dashboard-request-card .card-meta {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 4px 16px;
    margin-top: 8px;
    font-size: 13px;
}

.service-dashboard .dashboard-request-card .compact-row {
    margin-top: 4px;
    font-size: 12px;
}

.service-dashboard .dashboard-request-card .card-actions {
    margin-top: 10px;
}

.service-dashboard .dashboard-request-card .button {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 6px;
    font-size: 13px;
}

.records-panel {
    border-color: rgba(199, 211, 205, 0.95);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(23, 33, 29, 0.06), 0 18px 42px rgba(23, 33, 29, 0.05);
}

.records-panel > .panel-header {
    position: relative;
    padding: 24px 26px;
    background: linear-gradient(90deg, rgba(36, 84, 71, 0.045), transparent 52%),
    linear-gradient(180deg, #ffffff, #fbfaf7);
}

.records-panel > .panel-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: linear-gradient(180deg, var(--forest), var(--accent-gold));
}

.records-panel > .record-stack {
    gap: 14px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(250, 250, 247, 0.78), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.record-stack .list-card {
    position: relative;
    border-color: rgba(211, 220, 215, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 253, 249, 0.97)),
    var(--surface);
}

.record-stack .list-card::before {
    content: "";
    position: absolute;
    inset: 18px auto 18px 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #d6e2dc;
}

.record-stack .list-card:hover {
    border-color: #adc5bb;
    background: linear-gradient(180deg, #ffffff, #fbfdf9),
    var(--surface);
    box-shadow: 0 14px 28px rgba(23, 33, 29, 0.07);
    transform: translateY(-1px);
}

.record-stack .list-card:hover::before {
    background: var(--forest);
}

.list-card-header {
    align-items: flex-start;
}

.tradesman-result-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.tradesman-result-heading > div {
    min-width: 0;
}

.tradesman-result-avatar,
.tradesman-result-avatar-link {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.tradesman-result-avatar {
    display: grid;
    place-items: center;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #e8eef2;
    color: var(--forest);
    font-weight: 800;
}

.tradesman-result-avatar-link {
    display: inline-flex;
    overflow: hidden;
}

.tradesman-result-avatar-link:focus-visible {
    outline: 3px solid rgba(36, 84, 71, 0.24);
    outline-offset: 3px;
}

.search-option-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.search-option-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--forest);
    flex: 0 0 auto;
}

.search-option-row strong,
.search-option-row small {
    display: block;
}

.search-option-row strong {
    color: var(--ink);
}

.search-option-row small {
    margin-top: 2px;
    color: var(--muted);
    line-height: 1.35;
}

.business-search-card {
    border-color: rgba(36, 84, 71, 0.24);
}

.tradesman-result-avatar.business-avatar {
    background: var(--forest);
    color: var(--paper);
}

.status-pill,
.badge {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.button,
.button-link,
button,
input[type="submit"] {
    letter-spacing: 0.005em;
}

.button:not(.secondary):not(.danger),
.button-link:not(.secondary):not(.danger),
button:not(.secondary):not(.danger):not(.logout-button),
input[type="submit"] {
    background: linear-gradient(180deg, #2d6657, var(--forest));
    box-shadow: 0 10px 18px rgba(36, 84, 71, 0.14);
}

.button:not(.secondary):not(.danger):hover,
.button-link:not(.secondary):not(.danger):hover,
button:not(.secondary):not(.danger):not(.logout-button):hover,
input[type="submit"]:hover {
    background: linear-gradient(180deg, #285c4f, #1f493e);
    box-shadow: 0 12px 22px rgba(36, 84, 71, 0.18);
}

.button.secondary,
.button-link.secondary,
button.secondary,
button[type="button"].secondary {
    background: linear-gradient(180deg, #ffffff, #f8faf8);
}

.public-legal-links .public-copyright,
.public-legal-links a {
    color: var(--stone);
}

.public-legal-links {
    flex-wrap: wrap;
}

.public-legal-links a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.search-panel {
    border-color: rgba(199, 211, 205, 0.95);
    background: linear-gradient(180deg, #ffffff, #fbfaf7),
    var(--surface);
    box-shadow: 0 1px 2px rgba(23, 33, 29, 0.06), 0 18px 42px rgba(23, 33, 29, 0.05);
}

.search-panel .panel-header {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
select,
textarea,
.input-field,
.field-group .input-field {
    background: linear-gradient(180deg, #ffffff, #fcfcfa),
    #ffffff;
}

.stacked-form .helper-text {
    background: linear-gradient(135deg, rgba(36, 84, 71, 0.055), rgba(183, 121, 31, 0.035)),
    #f8faf7;
}

@media (prefers-reduced-motion: no-preference) {
    .service-page > * {
        animation: surface-in 0.36s ease both;
    }

    .service-page > *:nth-child(2) {
        animation-delay: 0.04s;
    }

    .service-page > *:nth-child(3) {
        animation-delay: 0.08s;
    }

    .record-stack .list-card {
        transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
    }
}

@keyframes surface-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .service-metrics .metric-card {
        min-height: 108px;
    }

    .records-panel > .panel-header {
        padding: 18px;
    }

    .records-panel > .record-stack {
        padding: 14px;
    }

    .record-stack .list-card:hover {
        transform: none;
    }
}

.payment-method-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #153b32, #245447 52%, #577669);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.payment-method-mark.brand-visa {
    background: linear-gradient(135deg, #173b70, #2e6097 55%, #75a6ce);
}

.payment-method-mark.brand-mastercard {
    background: linear-gradient(135deg, #3c1f18, #7a3821 54%, #d98532);
}

.payment-method-mark.brand-amex,
.payment-method-mark.brand-american-express {
    background: linear-gradient(135deg, #15384f, #27728a 54%, #72b6c0);
}

.payment-method-picker {
    display: grid;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(213, 223, 217, 0.95);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 246, 0.96)),
    #ffffff;
}

.payment-method-picker.is-selected {
    border-color: rgba(36, 84, 71, 0.28);
    background: linear-gradient(90deg, rgba(36, 84, 71, 0.052), transparent 72%),
    #ffffff;
}

.payment-method-picker.is-empty {
    border-style: dashed;
}

.payment-method-picker-actions {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.payment-method-picker-actions .button {
    min-height: 38px;
    padding: 8px 12px;
}

/* Login page override: keep the public sign-in card compact below the full-width brand band. */
.app-public .public-shell > .login-page-layout {
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 64px);
    margin-inline: auto;
}

.app-public .public-shell:has(> .login-page-layout) {
    padding-inline: 0;
}

.app-public .login-page-layout .login-brand-band {
    width: 100%;
    margin-left: 0;
}

.app-public .login-page-layout .login-auth-layout,
.app-public .login-page-layout .public-auth-layout.login-auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    width: min(calc(100% - 32px), 320px);
    max-width: none;
    margin-inline: auto;
}

.app-public .login-auth-layout .login-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}

.app-public .login-auth-layout .login-actions {
    flex-direction: column;
}

.app-public .login-auth-layout .login-actions .button {
    width: 100%;
}

.app-public .login-page-layout + .public-legal-links {
    display: none;
}

/* Product-wide compact alignment pass. Keep screens calm and scan-friendly. */
:root {
    --content-max: 1120px;
    --shadow: 0 1px 2px rgba(23, 33, 29, 0.07), 0 10px 24px rgba(23, 33, 29, 0.04);
    --shadow-soft: 0 1px 2px rgba(23, 33, 29, 0.05);
}

.app-main > * {
    max-width: var(--content-max);
}

.app-main,
.public-shell {
    padding: clamp(18px, 2.4vw, 30px);
}

.app-sidebar {
    gap: 18px;
    padding: 22px 20px;
}

.nav-stack {
    gap: 16px;
}

.nav-link,
.cookie-settings-button,
.logout-form .logout-button {
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.25;
}

.sidebar-footer {
    gap: 8px;
}

.sidebar-identity {
    min-height: 56px;
    padding: 9px 10px;
}

.hero-panel,
.panel,
.auth-panel,
.metric-card,
.list-card,
.empty-state,
.state-card,
.surface-card,
.profile-panel,
.request-card,
.payment-container,
.reviews-container,
.credentials-panel,
.status-card,
.guidance-card,
.card,
.little-cards,
.tradesman-card,
.request-list {
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.panel,
.auth-panel,
.credentials-panel,
.list-card,
.state-card,
.empty-state {
    padding: clamp(16px, 2vw, 22px);
}

.page-header {
    margin-bottom: 18px;
}

.page-header h1,
.service-header h1 {
    font-size: clamp(1.85rem, 1.55rem + 0.8vw, 2.45rem);
    line-height: 1.08;
}

.page-lead,
.panel-subtitle {
    font-size: 0.94rem;
    line-height: 1.5;
}

.panel-header {
    gap: 12px;
    margin-bottom: 16px;
}

.panel-title,
.panel-header h2 {
    font-size: clamp(1.1rem, 1rem + 0.3vw, 1.35rem);
    line-height: 1.22;
}

.metric-grid,
.panel-grid,
.two-column-grid,
.three-column-grid,
.stack,
.vertical-list {
    gap: 12px;
}

.record-stack .list-card {
    border-radius: 8px;
}

.records-panel > .panel-header {
    padding: 16px 18px;
}

.records-panel > .record-stack {
    gap: 10px;
    padding: 12px;
}

.card-meta {
    gap: 4px 14px;
    margin-top: 10px;
}

.card-actions {
    margin-top: 12px;
    padding-top: 12px;
}

.button,
.button-link,
button,
input[type="submit"],
.save-button {
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.92rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="tel"],
select,
textarea,
.input-field,
.field-group .input-field {
    min-height: 44px;
    padding: 11px 13px;
    border-radius: 8px;
}

.status-pill,
.badge {
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    line-height: 1.15;
}

.empty-state,
.state-card {
    text-align: left;
}

.loading-inline {
    justify-content: flex-start;
}

@media (max-width: 980px) {
    .app-sidebar {
        padding: 18px;
    }

    .nav-stack {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }
}

@media (max-width: 640px) {
    .app-main,
    .public-shell {
        padding: 14px;
    }

    .app-sidebar {
        padding: 14px;
    }

    .page-header h1,
    .service-header h1 {
        font-size: 1.85rem;
    }
}
