:root {
    --ink: #171716;
    --ink-soft: #242321;
    --ink-raised: #2e2c29;
    --gold: #f2a000;
    --gold-dark: #c77d00;
    --gold-pale: #fff6df;
    --paper: #ffffff;
    --canvas: #f4f1eb;
    --text: #24211d;
    --muted: #706a61;
    --line: #e6e0d7;
    --danger: #a9342f;
    --danger-bg: #fff0ee;
    --success: #397553;
    --shadow-lg: 0 28px 80px rgba(27, 24, 19, 0.15);
    --shadow-sm: 0 10px 28px rgba(27, 24, 19, 0.08);
    --radius-lg: 24px;
    --radius-md: 14px;
    --focus: 0 0 0 4px rgba(242, 160, 0, 0.23);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--canvas);
}

body {
    margin: 0;
    color: var(--text);
    background: var(--canvas);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

svg {
    display: block;
}

.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;
}

.auth-page {
    min-height: 100vh;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(420px, 0.92fr) minmax(540px, 1.08fr);
    min-height: 100vh;
    background: var(--canvas);
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: clamp(36px, 5vw, 72px);
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 19% 8%, rgba(242, 160, 0, 0.20), transparent 30%),
    linear-gradient(145deg, #111110 0%, #201f1c 56%, #171716 100%);
    isolation: isolate;
}

.auth-brand::before {
    content: "";
    position: absolute;
    inset: auto -13% -26% 13%;
    height: 56%;
    border: 1px solid rgba(242, 160, 0, 0.18);
    border-radius: 50%;
    transform: rotate(-12deg);
    z-index: -1;
}

.auth-brand::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--gold) 24%, var(--gold) 76%, transparent);
    opacity: 0.88;
}

.auth-brand__texture {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    z-index: -1;
    background-image: linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, .035) 48.4% 49%, transparent 49.4%),
    linear-gradient(25deg, transparent 0 59%, rgba(255, 255, 255, .025) 59.4% 60%, transparent 60.4%);
    background-size: 190px 130px, 230px 170px;
}

.auth-brand__content {
    width: min(100%, 560px);
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    min-height: 74px;
    margin-bottom: clamp(52px, 8vh, 96px);
    text-decoration: none;
}

.brand-logo img {
    width: min(100%, 318px);
    height: auto;
    filter: drop-shadow(0 7px 16px rgba(0, 0, 0, 0.24));
}

.eyebrow,
.auth-card__kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.eyebrow svg {
    width: 20px;
    fill: currentColor;
}

.auth-brand h1 {
    margin: 22px 0 20px;
    color: #fff;
    font-size: clamp(3.35rem, 6vw, 6.2rem);
    font-weight: 800;
    letter-spacing: -0.065em;
    line-height: 0.88;
}

.auth-brand__intro {
    max-width: 500px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.7;
}

.brand-points {
    display: grid;
    gap: 22px;
    margin-top: clamp(42px, 6vh, 72px);
}

.brand-point {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.69);
    font-size: 0.91rem;
    line-height: 1.45;
}

.brand-point strong {
    display: block;
    margin-bottom: 2px;
    color: #fff;
    font-size: 0.94rem;
}

.brand-point__icon {
    display: grid;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(242, 160, 0, 0.28);
    border-radius: 13px;
    color: var(--gold);
    background: rgba(242, 160, 0, 0.08);
}

.brand-point__icon svg {
    width: 22px;
    fill: currentColor;
}

.auth-brand__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 54px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.82rem;
    letter-spacing: 0.025em;
}

.auth-brand__footer a {
    text-decoration: none;
}

.auth-brand__footer a:hover {
    color: var(--gold);
}

.auth-form-panel {
    display: grid;
    min-height: 100vh;
    padding: clamp(32px, 6vw, 84px);
    place-items: center;
    background: radial-gradient(circle at 87% 12%, rgba(242, 160, 0, 0.08), transparent 27%),
    var(--canvas);
}

.auth-form-wrap {
    width: min(100%, 490px);
}

.mobile-logo {
    display: none;
}

.auth-card {
    padding: clamp(30px, 4vw, 48px);
    border: 1px solid rgba(29, 25, 19, 0.07);
    border-radius: var(--radius-lg);
    background: var(--paper);
    box-shadow: var(--shadow-lg);
}

.auth-card__header {
    margin-bottom: 34px;
}

.auth-card h2 {
    margin: 10px 0 9px;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 2.65rem);
    letter-spacing: -0.045em;
    line-height: 1;
}

.auth-card__header p,
.lockout-card > p {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.65;
}

.form-alert {
    display: flex;
    gap: 12px;
    margin: 0 0 24px;
    padding: 14px 15px;
    border: 1px solid rgba(169, 52, 47, 0.22);
    border-radius: 12px;
    color: var(--danger);
    background: var(--danger-bg);
}

.form-alert svg {
    flex: 0 0 auto;
    width: 20px;
    margin-top: 1px;
    fill: currentColor;
}

.form-alert p {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.5;
}

.login-form {
    display: grid;
    gap: 23px;
}

.form-group {
    display: grid;
    gap: 9px;
}

.form-group label,
.label-row label {
    color: var(--text);
    font-size: 0.83rem;
    font-weight: 750;
}

.label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.password-help {
    color: #918a80;
    font-size: 0.72rem;
}

.input-shell {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 20px;
    pointer-events: none;
    fill: #918a80;
    transform: translateY(-50%);
    transition: fill 160ms ease;
}

.form-control {
    width: 100%;
    min-height: 56px;
    padding: 0 50px 0 49px;
    border: 1px solid #d9d2c8;
    border-radius: var(--radius-md);
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: 0.96rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-control::placeholder {
    color: #aaa39a;
}

.form-control:hover {
    border-color: #bfb6aa;
}

.form-control:focus {
    border-color: var(--gold-dark);
    box-shadow: var(--focus);
}

.input-shell:focus-within .input-icon {
    fill: var(--gold-dark);
}

.form-group--error .form-control {
    border-color: var(--danger);
    background: #fffafa;
}

.field-error {
    margin: 0;
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 650;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #817a70;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--ink);
    background: #f5f2ed;
}

.password-toggle:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.password-toggle svg {
    width: 21px;
    fill: currentColor;
}

.password-toggle__hide {
    display: none;
}

.password-toggle.is-visible .password-toggle__show {
    display: none;
}

.password-toggle.is-visible .password-toggle__hide {
    display: block;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 54px;
    border: 0;
    border-radius: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button {
    width: 100%;
    margin-top: 5px;
    padding: 0 20px;
    color: #18140d;
    background: linear-gradient(135deg, #ffb21c, var(--gold));
    box-shadow: 0 10px 22px rgba(199, 125, 0, 0.23);
}

.primary-button svg {
    width: 19px;
    fill: currentColor;
}

.primary-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffc03a, #f6a80a);
    box-shadow: 0 13px 27px rgba(199, 125, 0, 0.29);
    transform: translateY(-1px);
}

.primary-button:active:not(:disabled) {
    transform: translateY(0);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.primary-button--link {
    margin-top: 26px;
    text-decoration: none;
}

.auth-assistance {
    display: flex;
    gap: 11px;
    margin-top: 27px;
    padding-top: 23px;
    border-top: 1px solid var(--line);
    color: #7e776e;
}

.auth-assistance svg {
    flex: 0 0 auto;
    width: 18px;
    margin-top: 1px;
    fill: var(--gold-dark);
}

.auth-assistance p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.55;
}

.auth-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding: 0 8px;
    color: #817b72;
    font-size: 0.72rem;
    line-height: 1.5;
}

.auth-legal p {
    max-width: 280px;
    margin: 0;
}

.auth-legal a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5a554e;
    font-weight: 750;
    text-decoration: none;
}

.auth-legal a:hover {
    color: var(--gold-dark);
}

.auth-legal svg {
    width: 14px;
    fill: currentColor;
}

.lockout-card {
    text-align: center;
}

.lockout-card > p + p {
    margin-top: 14px;
}

.lockout-icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 25px;
    place-items: center;
    border-radius: 50%;
    color: var(--gold-dark);
    background: var(--gold-pale);
}

.lockout-icon svg {
    width: 34px;
    fill: currentColor;
}

/* Authenticated placeholder dashboard */
.dashboard-page {
    min-height: 100vh;
    background: radial-gradient(circle at 90% 0, rgba(242, 160, 0, .11), transparent 23%),
    var(--canvas);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 88px;
    padding: 14px clamp(24px, 5vw, 72px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: #fff;
    background: var(--ink);
}

.app-header__logo img {
    width: 250px;
    height: auto;
}

.app-header__account {
    display: flex;
    align-items: center;
    gap: 20px;
}

.app-header__account > div {
    display: grid;
    gap: 3px;
    text-align: right;
}

.app-header__account span {
    color: rgba(255, 255, 255, .5);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.app-header__account strong {
    font-size: .82rem;
}

.secondary-button {
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, .12);
}

.dashboard-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(48px, 7vw, 92px) 0;
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.dashboard-heading h1 {
    margin: 11px 0 12px;
    color: var(--ink);
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    letter-spacing: -.06em;
    line-height: .95;
}

.dashboard-heading p {
    max-width: 640px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.dashboard-cta {
    width: auto;
    min-width: 190px;
    margin: 0;
    opacity: .58;
    cursor: not-allowed;
}

.dashboard-cta span {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .1);
    font-size: .62rem;
    text-transform: uppercase;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 52px;
}

.dashboard-card {
    min-height: 260px;
    padding: 30px;
    border: 1px solid rgba(29, 25, 19, .07);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.dashboard-card__number {
    color: var(--gold-dark);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .14em;
}

.dashboard-card h2 {
    margin: 39px 0 12px;
    font-size: 1.5rem;
    letter-spacing: -.035em;
}

.dashboard-card p {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.65;
}

.status-pill {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    color: #7b5a14;
    background: var(--gold-pale);
    font-size: .67rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.security-banner {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 24px;
    padding: 19px 21px;
    border: 1px solid rgba(57, 117, 83, .18);
    border-radius: 15px;
    color: var(--success);
    background: rgba(231, 247, 238, .72);
}

.security-banner svg {
    flex: 0 0 auto;
    width: 28px;
    fill: currentColor;
}

.security-banner div {
    display: grid;
    gap: 3px;
}

.security-banner strong {
    font-size: .9rem;
}

.security-banner span {
    color: #587363;
    font-size: .8rem;
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        min-height: 100vh;
        padding: 34px 22px;
    }

    .mobile-logo {
        display: block;
        margin: 0 auto 26px;
        text-align: center;
    }

    .mobile-logo img {
        width: min(82vw, 310px);
        height: auto;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .auth-card {
        padding: 28px 22px;
        border-radius: 19px;
    }

    .auth-legal {
        justify-content: center;
        text-align: center;
    }

    .auth-legal p {
        max-width: none;
    }

    .app-header,
    .app-header__account,
    .dashboard-heading {
        align-items: flex-start;
    }

    .app-header {
        flex-direction: column;
        padding-block: 20px;
    }

    .app-header__account {
        width: 100%;
        justify-content: space-between;
    }

    .app-header__account > div {
        text-align: left;
    }

    .dashboard-heading {
        flex-direction: column;
    }

    .dashboard-cta {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* White Beard Admin v0.2 application UI */
.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 82px;
    padding: 0;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

.app-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(24px, 4vw, 52px);
    width: min(1440px, calc(100% - 48px));
    min-height: 82px;
    margin: 0 auto;
}

.app-header__logo img {
    width: 220px;
}

.app-nav {
    display: flex;
    align-items: stretch;
    height: 82px;
    gap: 2px;
}

.app-nav a,
.app-nav__disabled {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 17px;
    color: rgba(255, 255, 255, .67);
    font-size: .84rem;
    font-weight: 720;
    text-decoration: none;
}

.app-nav a::after {
    content: "";
    position: absolute;
    right: 17px;
    bottom: 0;
    left: 17px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--gold);
    opacity: 0;
    transform: scaleX(.55);
    transition: 150ms ease;
}

.app-nav a:hover,
.app-nav a.is-active {
    color: #fff;
}

.app-nav a.is-active::after,
.app-nav a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.app-nav__disabled {
    opacity: .45;
    cursor: default;
}

.app-nav small,
.disabled-button small {
    padding: 3px 6px;
    border-radius: 999px;
    color: #d8a641;
    background: rgba(242, 160, 0, .12);
    font-size: .57rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.flash-stack {
    position: fixed;
    top: 98px;
    right: 24px;
    z-index: 60;
    display: grid;
    gap: 10px;
    width: min(390px, calc(100% - 48px));
}

.flash-message {
    padding: 14px 17px;
    border: 1px solid rgba(57, 117, 83, .18);
    border-radius: 12px;
    color: #285c40;
    background: #eff9f3;
    box-shadow: var(--shadow-sm);
    font-size: .86rem;
    font-weight: 700;
}

.app-shell {
    width: min(1320px, calc(100% - 48px));
    margin: 0 auto;
    padding: clamp(42px, 5vw, 72px) 0 86px;
}

.app-shell--narrow {
    width: min(940px, calc(100% - 48px));
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 34px;
    margin-bottom: 32px;
}

.page-heading--compact {
    align-items: flex-start;
}

.page-heading h1 {
    margin: 7px 0 10px;
    color: var(--ink);
    font-size: clamp(2.45rem, 5vw, 4.4rem);
    letter-spacing: -.06em;
    line-height: .96;
}

.page-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.page-heading__company {
    color: var(--gold-dark) !important;
    font-weight: 760;
}

.section-kicker {
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: #686159;
    font-size: .82rem;
    font-weight: 750;
    text-decoration: none;
}

.back-link:hover,
.text-link:hover {
    color: var(--gold-dark);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.button-auto {
    width: auto;
    min-width: 150px;
    margin: 0;
    padding-inline: 22px;
    text-decoration: none;
}

.button-full {
    width: 100%;
}

.outline-button,
.danger-button,
.disabled-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #d8d0c6;
    border-radius: 11px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-size: .82rem;
    font-weight: 780;
    text-decoration: none;
    cursor: pointer;
    transition: 150ms ease;
}

.outline-button:hover {
    border-color: #b8aea2;
    background: #faf8f4;
}

.outline-button:focus-visible,
.danger-button:focus-visible,
.app-field:focus-visible,
.status-action:focus-visible,
.icon-link:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.disabled-button {
    gap: 8px;
    color: #8d857b;
    background: #eeeae4;
    cursor: not-allowed;
}

.text-link {
    color: #625b52;
    font-size: .8rem;
    font-weight: 780;
    text-decoration: none;
}

.panel {
    padding: 28px;
    border: 1px solid rgba(29, 25, 19, .075);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(27, 24, 19, .055);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.panel-heading h2 {
    margin: 5px 0 0;
    font-size: 1.45rem;
    letter-spacing: -.035em;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 22px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.toolbar--wrap {
    flex-wrap: wrap;
}

.search-field {
    flex: 1 1 380px;
}

.filter-field {
    flex: 0 1 185px;
}

.app-field {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #d7d0c7;
    border-radius: 10px;
    outline: 0;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-size: .88rem;
    transition: 150ms ease;
}

textarea.app-field {
    min-height: 110px;
    resize: vertical;
    line-height: 1.55;
}

select.app-field {
    appearance: auto;
}

.app-field:hover {
    border-color: #bcb3a7;
}

.app-field:focus {
    border-color: var(--gold-dark);
    box-shadow: var(--focus);
}

.field-block {
    display: grid;
    align-content: start;
    gap: 7px;
}

.field-block > label,
.field-label-row label,
.private-label label {
    color: #3d3934;
    font-size: .78rem;
    font-weight: 790;
}

.field-block > label span {
    color: var(--gold-dark);
}

.field-block small {
    color: #8a8278;
    font-size: .7rem;
    line-height: 1.45;
}

.field-block--error .app-field {
    border-color: var(--danger);
}

.field-label-row,
.private-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.field-label-row a {
    color: var(--gold-dark);
    font-size: .69rem;
    font-weight: 820;
    text-decoration: none;
}

.private-label span {
    padding: 4px 7px;
    border-radius: 999px;
    color: #7a6030;
    background: #fff3d6;
    font-size: .59rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.form-panel {
    padding: 0 34px;
}

.form-section {
    padding: 34px 0;
    border-top: 1px solid var(--line);
}

.form-section:first-child,
.form-section--first {
    border-top: 0;
}

.form-section__heading {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.form-section__heading > span {
    padding-top: 3px;
    color: var(--gold-dark);
    font-size: .69rem;
    font-weight: 850;
    letter-spacing: .1em;
}

.form-section__heading h2 {
    margin: 0 0 5px;
    font-size: 1.22rem;
    letter-spacing: -.025em;
}

.form-section__heading p {
    margin: 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.5;
}

.form-grid {
    display: grid;
    gap: 18px;
}

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

.form-grid--state-zip {
    grid-template-columns: .65fr 1.35fr;
}

.form-grid__wide {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 25px 0 32px;
    border-top: 1px solid var(--line);
}

.customer-grid {
    display: grid;
    gap: 12px;
    padding-top: 16px;
}

.customer-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 17px;
    padding: 16px 18px;
    border: 1px solid #eee9e2;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: 150ms ease;
}

.customer-card:hover {
    border-color: #decaa0;
    background: #fffdf8;
    transform: translateY(-1px);
}

.customer-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 13px;
    color: #7f5500;
    background: var(--gold-pale);
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .05em;
}

.customer-card__body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.customer-card__body > strong {
    font-size: .95rem;
}

.customer-card__body > span {
    color: var(--gold-dark);
    font-size: .76rem;
    font-weight: 700;
}

.customer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin-top: 5px;
    color: #777067;
    font-size: .72rem;
}

.customer-card__stats {
    display: grid;
    gap: 2px;
    min-width: 75px;
    text-align: right;
}

.customer-card__stats strong {
    font-size: 1.35rem;
}

.customer-card__stats span {
    color: var(--muted);
    font-size: .66rem;
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 70px 24px;
    text-align: center;
    color: var(--muted);
}

.empty-state strong {
    color: var(--ink);
    font-size: 1.08rem;
}

.empty-state span {
    max-width: 470px;
    margin-bottom: 12px;
    font-size: .83rem;
    line-height: 1.55;
}

.empty-state--compact {
    justify-items: start;
    padding: 28px 2px 12px;
    text-align: left;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 20px;
}

.detail-main,
.detail-sidebar {
    display: grid;
    gap: 20px;
}

.detail-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
}

.detail-list div,
.mini-detail-list div {
    display: grid;
    align-content: start;
    gap: 5px;
}

.detail-list dt,
.mini-detail-list dt {
    color: #958d82;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.detail-list dd,
.mini-detail-list dd {
    margin: 0;
    color: var(--ink);
    font-size: .82rem;
    line-height: 1.55;
}

.detail-list a,
.mini-detail-list a {
    color: inherit;
    text-decoration-color: #d6c49a;
    text-underline-offset: 3px;
}

.preline {
    white-space: pre-line;
}

.note-box {
    margin-top: 24px;
    padding: 16px;
    border-left: 3px solid var(--gold);
    border-radius: 8px;
    background: #faf7f1;
}

.note-box strong {
    font-size: .76rem;
}

.note-box p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.55;
}

.icon-link {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    color: var(--ink);
    background: var(--gold-pale);
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
}

.site-card {
    display: grid;
    gap: 5px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.site-card:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.site-card strong {
    font-size: .82rem;
}

.site-card span,
.site-card small,
.empty-mini {
    color: var(--muted);
    font-size: .73rem;
    line-height: 1.5;
}

.empty-mini {
    padding: 4px 0 18px;
}

.danger-panel {
    border-color: rgba(169, 52, 47, .12);
    background: #fffafa;
}

.danger-panel > strong {
    color: var(--danger);
    font-size: .85rem;
}

.danger-panel p {
    margin: 7px 0 14px;
    color: #826b68;
    font-size: .72rem;
    line-height: 1.5;
}

.danger-button {
    border-color: rgba(169, 52, 47, .25);
    color: var(--danger);
    background: #fff;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
}

.data-table th {
    padding: 12px 13px;
    border-bottom: 1px solid #ddd6cc;
    color: #8b8378;
    font-size: .63rem;
    font-weight: 850;
    letter-spacing: .075em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 15px 13px;
    border-bottom: 1px solid #eee9e2;
    color: #4a453f;
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover td {
    background: #fdfbf7;
}

.data-table a {
    color: var(--ink);
    text-decoration: none;
}

.data-table td small {
    display: block;
    margin-top: 3px;
    color: #999187;
    font-size: .65rem;
}

.numeric {
    text-align: right !important;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #6d6356;
    background: #eeeae4;
    font-size: .63rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-badge--large {
    min-height: 32px;
    padding-inline: 12px;
}

.status-badge--draft {
    color: #735c28;
    background: #fff3d6;
}

.status-badge--sent {
    color: #275b78;
    background: #e8f4fb;
}

.status-badge--accepted {
    color: #286144;
    background: #e8f6ed;
}

.status-badge--declined {
    color: #88403b;
    background: #fcebea;
}

.status-badge--expired {
    color: #6a6260;
    background: #ece9e8;
}

.status-badge--converted {
    color: #5a4a86;
    background: #f0ecfb;
}

.dashboard-card--link {
    color: inherit;
    text-decoration: none;
    transition: 160ms ease;
}

.dashboard-card--link:hover {
    border-color: rgba(199, 125, 0, .28);
    box-shadow: 0 16px 35px rgba(27, 24, 19, .1);
    transform: translateY(-2px);
}

.dashboard-card__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card__topline > strong {
    color: #d3cdc5;
    font-size: 2.2rem;
    letter-spacing: -.05em;
}

.dashboard-cta {
    opacity: 1;
    cursor: pointer;
    text-decoration: none;
}

.dashboard-cta span {
    min-width: 23px;
    text-align: center;
    font-size: 1rem;
}

.recent-panel {
    margin-top: 24px;
}

/* Estimate builder */
.estimate-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 20px;
}

.estimate-builder__sidebar {
    position: sticky;
    top: 102px;
    display: grid;
    gap: 14px;
}

.estimate-builder .form-panel {
    padding: 0 30px;
}

.line-items {
    display: grid;
    gap: 8px;
}

.line-item-head,
.line-item-row {
    display: grid;
    grid-template-columns: minmax(210px, 2.6fr) .72fr 1fr 1fr .95fr 34px;
    gap: 8px;
    align-items: start;
}

.line-item-head {
    padding: 0 2px 4px;
    color: #948b7f;
    font-size: .61rem;
    font-weight: 830;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.line-item-head span:nth-last-child(2) {
    text-align: right;
}

.line-item-row {
    padding: 11px;
    border: 1px solid #e8e2d9;
    border-radius: 12px;
    background: #fdfcf9;
}

.line-item-row.is-deleted {
    display: none;
}

.line-item-field .app-field {
    min-height: 42px;
    padding: 8px 10px;
    font-size: .78rem;
}

.money-input,
.suffix-input {
    position: relative;
}

.money-input > span,
.suffix-input > span {
    position: absolute;
    top: 50%;
    z-index: 2;
    color: #8b8379;
    font-size: .74rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.money-input > span {
    left: 10px;
}

.money-input .app-field {
    padding-left: 22px;
}

.suffix-input > span {
    right: 11px;
}

.suffix-input .app-field {
    padding-right: 27px;
}

.line-item-amount {
    min-height: 42px;
    padding: 11px 4px 0;
    color: var(--ink);
    font-size: .8rem;
    font-weight: 820;
    text-align: right;
}

.remove-line-button {
    display: grid;
    width: 32px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: #a59d93;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
}

.remove-line-button:hover {
    color: var(--danger);
    background: #fff0ee;
}

.add-line-button {
    margin-top: 12px;
}

.line-item-errors {
    grid-column: 1 / -1;
    color: var(--danger);
    font-size: .72rem;
}

.form-alert--wide {
    grid-column: 1 / -1;
}

.totals-card {
    padding: 25px;
}

.grand-total {
    margin: 8px 0 23px;
    color: var(--ink);
    font-size: 2.55rem;
    font-weight: 880;
    letter-spacing: -.055em;
}

.totals-form {
    display: grid;
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.compact-field {
    grid-template-columns: 1fr 125px;
    align-items: center;
}

.compact-field > label {
    padding-right: 10px;
}

.compact-field > .money-input,
.compact-field > .suffix-input,
.compact-field > .field-error {
    grid-column: 2;
}

.compact-field .app-field {
    min-height: 39px;
    font-size: .78rem;
}

.totals-list {
    display: grid;
    gap: 10px;
    margin: 20px 0 22px;
}

.totals-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.totals-list dt,
.totals-list dd {
    margin: 0;
    font-size: .75rem;
}

.totals-list dt {
    color: var(--muted);
}

.totals-list dd {
    color: var(--ink);
    font-weight: 760;
}

.totals-list__total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.totals-list__total dt,
.totals-list__total dd {
    color: var(--ink);
    font-size: .92rem;
    font-weight: 850;
}

.totals-card .button-full {
    margin-top: 9px;
}

.sidebar-tip {
    padding: 16px 18px;
    border: 1px solid #e2d4b3;
    border-radius: 13px;
    color: #6e5b37;
    background: #fff9eb;
}

.sidebar-tip strong {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.sidebar-tip p {
    margin: 5px 0 0;
    font-size: .7rem;
    line-height: 1.5;
}

/* Estimate detail */
.estimate-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.estimate-paper {
    padding: 36px;
}

.estimate-paper__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 26px;
    border-bottom: 2px solid var(--ink);
}

.estimate-paper__header h2 {
    margin: 5px 0 0;
    font-size: 2rem;
    letter-spacing: -.04em;
}

.estimate-paper__dates {
    display: flex;
    gap: 28px;
}

.estimate-paper__dates span {
    display: grid;
    gap: 4px;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 760;
}

.estimate-paper__dates small,
.estimate-parties small,
.scope-block small,
.estimate-notes small {
    color: #90887e;
    font-size: .61rem;
    font-weight: 850;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.estimate-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.estimate-parties > div {
    display: grid;
    align-content: start;
    gap: 5px;
}

.estimate-parties strong {
    margin-top: 3px;
    font-size: .9rem;
}

.estimate-parties span {
    color: var(--muted);
    font-size: .73rem;
    line-height: 1.5;
}

.scope-block {
    padding: 26px 0;
}

.scope-block p,
.estimate-notes p {
    margin: 8px 0 0;
    color: #4f4942;
    font-size: .78rem;
    line-height: 1.7;
}

.estimate-paper__bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    padding-top: 28px;
}

.estimate-total-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.estimate-total-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.estimate-total-list dt,
.estimate-total-list dd {
    margin: 0;
    font-size: .75rem;
}

.estimate-total-list dt {
    color: var(--muted);
}

.estimate-total-list dd {
    color: var(--ink);
    font-weight: 780;
}

.estimate-total-list__grand {
    margin-top: 3px;
    padding-top: 13px;
    border-top: 2px solid var(--ink);
}

.estimate-total-list__grand dt,
.estimate-total-list__grand dd {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 880;
}

.private-note-panel {
    border-color: #e5d5b1;
    background: #fffbf1;
}

.private-note-panel > span {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    color: #76591c;
    background: #f9e6b8;
    font-size: .58rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.private-note-panel h2 {
    margin: 10px 0 6px;
    font-size: 1rem;
}

.private-note-panel p {
    margin: 0;
    color: #6f6044;
    font-size: .75rem;
    line-height: 1.6;
}

.sidebar-title {
    margin: 6px 0 18px;
    font-size: 1.2rem;
}

.status-actions {
    display: grid;
    gap: 8px;
}

.status-action {
    width: 100%;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid #ded8cf;
    border-radius: 10px;
    color: #4c4640;
    background: #fff;
    font: inherit;
    font-size: .76rem;
    font-weight: 760;
    text-align: left;
    cursor: pointer;
}

.status-action:hover {
    background: #faf8f4;
}

.status-action--success {
    border-color: #bcd9c7;
    color: #2d6848;
    background: #f2faf5;
}

.next-step-card {
    margin-top: 15px;
    padding: 14px;
    border-radius: 10px;
    color: #2e6447;
    background: #ebf7ef;
}

.next-step-card strong {
    font-size: .75rem;
}

.next-step-card p {
    margin: 4px 0 0;
    font-size: .68rem;
    line-height: 1.45;
}

.mini-detail-list {
    display: grid;
    gap: 15px;
    margin: 18px 0 0;
}

@media (max-width: 1120px) {
    .app-header__inner {
        grid-template-columns: auto 1fr;
        padding: 10px 0;
    }

    .app-nav {
        grid-column: 1 / -1;
        order: 3;
        width: 100%;
        height: 42px;
    }

    .app-nav a,
    .app-nav__disabled {
        padding-inline: 13px;
    }

    .app-header__account {
        justify-self: end;
    }

    .estimate-builder,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .estimate-builder__sidebar {
        position: static;
    }

    .totals-card {
        max-width: none;
    }
}

@media (max-width: 820px) {
    .app-shell,
    .app-shell--narrow,
    .dashboard-shell {
        width: min(100% - 28px, 1320px);
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-actions,
    .page-actions > * {
        width: 100%;
    }

    .form-grid--2,
    .detail-list,
    .estimate-parties,
    .estimate-paper__bottom {
        grid-template-columns: 1fr;
    }

    .form-grid__wide {
        grid-column: auto;
    }

    .line-item-head {
        display: none;
    }

    .line-item-row {
        grid-template-columns: 1fr 1fr;
    }

    .line-item-description {
        grid-column: 1 / -1;
    }

    .line-item-amount {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-height: 42px;
        padding: 0;
    }

    .line-item-remove {
        display: flex;
        justify-content: flex-end;
    }

    .estimate-paper__header {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .app-header__inner {
        grid-template-columns: 1fr auto;
        width: calc(100% - 28px);
    }

    .app-header__logo img {
        width: 180px;
    }

    .app-header__account > div {
        display: none;
    }

    .app-nav {
        overflow-x: auto;
    }

    .app-nav a,
    .app-nav__disabled {
        flex: 0 0 auto;
    }

    .panel,
    .estimate-paper {
        padding: 20px;
        border-radius: 15px;
    }

    .form-panel,
    .estimate-builder .form-panel {
        padding: 0 20px;
    }

    .form-grid--state-zip {
        grid-template-columns: 1fr 1.25fr;
    }

    .customer-card {
        grid-template-columns: auto 1fr;
    }

    .customer-card__stats {
        grid-column: 2;
        text-align: left;
    }

    .line-item-row {
        grid-template-columns: 1fr;
    }

    .line-item-description {
        grid-column: auto;
    }

    .line-item-amount {
        justify-content: flex-start;
    }

    .line-item-remove {
        justify-content: flex-start;
    }

    .estimate-paper__dates {
        flex-direction: column;
        gap: 12px;
    }
}

/* --------------------------------------------------------------------------
   White Beard Admin v0.6 — centered two-panel portal login
   The background layers are intentionally self-contained placeholders. Swap
   them for real project photography later without changing the page markup.
   -------------------------------------------------------------------------- */
.auth-page--portal {
    min-height: 100svh;
    overflow-x: hidden;
    background: #171716;
}

.portal-login {
    position: relative;
    display: grid;
    min-height: 100svh;
    padding: clamp(28px, 5vw, 76px);
    place-items: center;
    overflow: hidden;
    isolation: isolate;
}

.portal-login__background {
    position: absolute;
    inset: -28px;
    z-index: -3;
    overflow: hidden;
    background: #25231f;
}

.portal-login__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.06);
    filter: blur(8px) saturate(.88);
    transition: opacity 1.6s ease, transform 9s ease;
    will-change: opacity, transform;
}

.portal-login__slide.is-active {
    opacity: 1;
    transform: scale(1.01);
}

/* Abstract placeholders: interior, exterior, and deck/project scenes. */
.portal-login__slide--one {
    background-image: linear-gradient(90deg, rgba(25, 24, 22, .25), rgba(25, 24, 22, .05) 38%, rgba(25, 24, 22, .28)),
    url("#"),
    radial-gradient(ellipse at 71% 30%, rgba(242, 160, 0, .42) 0 6%, transparent 18%),
    linear-gradient(88deg, transparent 0 12%, rgba(232, 218, 193, .86) 12% 28%, transparent 28% 74%, rgba(68, 79, 84, .84) 74% 100%),
    linear-gradient(180deg, #b8a18b 0 47%, #594c43 47% 70%, #d7c8ad 70% 100%);
    background-position: center;
    background-size: cover;
}

.portal-login__slide--two {
    background-image: linear-gradient(110deg, rgba(11, 18, 22, .25), rgba(11, 18, 22, .04) 45%, rgba(11, 18, 22, .34)),
    url("#"),
    radial-gradient(ellipse at 50% 31%, rgba(249, 222, 154, .72) 0 8%, transparent 19%),
    linear-gradient(155deg, transparent 0 34%, rgba(44, 69, 78, .92) 34% 62%, transparent 62%),
    linear-gradient(25deg, transparent 0 48%, rgba(223, 220, 204, .88) 48% 71%, transparent 71%),
    linear-gradient(180deg, #8499a1 0 54%, #667160 54% 72%, #b6a17f 72% 100%);
    background-position: center;
    background-size: cover;
}

.portal-login__slide--three {
    background-image: linear-gradient(100deg, rgba(30, 21, 16, .25), rgba(30, 21, 16, .02) 48%, rgba(30, 21, 16, .36)),
    url("#"),
    radial-gradient(circle at 23% 28%, rgba(255, 223, 154, .65) 0 5%, transparent 15%),
    linear-gradient(77deg, transparent 0 15%, rgba(234, 223, 205, .85) 15% 34%, transparent 34% 69%, rgba(62, 64, 60, .8) 69% 100%),
    linear-gradient(180deg, #8e7666 0 50%, #695244 50% 71%, #baa37f 71% 100%);
    background-position: center;
    background-size: cover;
}

.portal-login__background-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, .02), rgba(0, 0, 0, .22) 62%, rgba(0, 0, 0, .42)),
    rgba(17, 16, 14, .22);
    backdrop-filter: blur(2px);
}

.portal-login__window {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: min(1060px, 100%);
    min-height: 610px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 34px 95px rgba(0, 0, 0, .34), 0 8px 28px rgba(0, 0, 0, .19);
}

.portal-login__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(48px, 5vw, 70px) clamp(42px, 4.5vw, 66px) 30px;
    overflow: hidden;
    color: var(--text);
    background: radial-gradient(circle at 15% 9%, rgba(242, 160, 0, .13), transparent 27%),
    linear-gradient(135deg, #fff8ed 0%, #f7efe3 100%);
}

.portal-login__brand::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: rgba(35, 31, 26, .08);
}

.portal-login__brand-copy {
    position: relative;
    z-index: 2;
    max-width: 390px;
}

.portal-login__logo {
    display: inline-block;
    margin-bottom: clamp(42px, 7vh, 70px);
    text-decoration: none;
}

.portal-login__logo img {
    display: block;
    width: min(100%, 286px);
    height: auto;
    filter: drop-shadow(0 7px 13px rgba(45, 32, 18, .08));
}

.portal-login__brand-kicker,
.portal-login__form-kicker {
    display: block;
    margin-bottom: 12px;
    color: var(--gold-dark);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.portal-login__brand h1 {
    margin: 0 0 14px;
    color: var(--ink);
    font-size: clamp(2.25rem, 3.45vw, 3.35rem);
    font-weight: 820;
    letter-spacing: -.055em;
    line-height: .98;
}

.portal-login__brand-copy > p {
    max-width: 365px;
    margin: 0;
    color: #655f56;
    font-size: 1rem;
    line-height: 1.66;
}

.portal-login__brand-art {
    position: absolute;
    right: -26px;
    bottom: 42px;
    left: -18px;
    z-index: 1;
    color: #7f776d;
    opacity: .33;
    pointer-events: none;
}

.portal-login__brand-art svg {
    width: 100%;
    height: auto;
    stroke-width: 1.8;
}

.portal-login__brand-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: auto;
    padding-top: 185px;
    color: #81796f;
    font-size: .72rem;
    letter-spacing: .01em;
}

.portal-login__brand-footer a {
    font-weight: 700;
    text-decoration: none;
}

.portal-login__brand-footer a:hover {
    color: var(--gold-dark);
}

.portal-login__form-panel {
    display: grid;
    min-width: 0;
    padding: clamp(50px, 6vw, 82px) clamp(44px, 5vw, 74px);
    place-items: center;
    background: #fff;
}

.portal-login__form-inner {
    width: min(100%, 390px);
}

.portal-login__mobile-logo {
    display: none;
}

.portal-login__form-kicker {
    margin-bottom: 14px;
}

.portal-login__form-inner h2 {
    margin: 0 0 30px;
    color: var(--ink);
    font-size: clamp(2.05rem, 3.4vw, 2.7rem);
    font-weight: 820;
    letter-spacing: -.047em;
    line-height: 1;
}

.portal-login__intro {
    margin: 0 0 26px;
    color: #4d4943;
    font-size: 1rem;
    line-height: 1.55;
}

.portal-login__alert {
    display: flex;
    gap: 11px;
    margin: 0 0 18px;
    padding: 12px 13px;
    border: 1px solid rgba(169, 52, 47, .23);
    border-radius: 4px;
    color: var(--danger);
    background: var(--danger-bg);
}

.portal-login__alert svg {
    flex: 0 0 auto;
    width: 18px;
    margin-top: 1px;
    fill: currentColor;
}

.portal-login__alert p {
    margin: 0;
    font-size: .79rem;
    font-weight: 650;
    line-height: 1.45;
}

.portal-login__form {
    display: grid;
    gap: 14px;
}

.portal-login__field {
    position: relative;
}

.portal-login .form-control {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border: 1px solid #d2cec7;
    border-radius: 3px;
    outline: none;
    color: var(--ink);
    background: #fff;
    box-shadow: none;
    font-size: .96rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.portal-login .form-control::placeholder {
    color: #9a958d;
    opacity: 1;
}

.portal-login .form-control:hover {
    border-color: #b7b0a6;
}

.portal-login .form-control:focus {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(242, 160, 0, .17);
}

.portal-login__field--password .form-control {
    padding-right: 52px;
}

.portal-login__field--error .form-control {
    border-color: var(--danger);
    background: #fffafa;
}

.portal-login__field-error {
    margin: 7px 0 0;
    color: var(--danger);
    font-size: .74rem;
    font-weight: 650;
}

.portal-login__password-toggle {
    position: absolute;
    top: 29px;
    right: 9px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 4px;
    outline: none;
    color: #8b857d;
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
}

.portal-login__password-toggle:hover {
    color: var(--ink);
    background: #f5f2ed;
}

.portal-login__password-toggle:focus-visible {
    box-shadow: var(--focus);
}

.portal-login__password-toggle svg {
    width: 20px;
    fill: currentColor;
}

.portal-login__password-toggle .password-toggle__hide {
    display: none;
}

.portal-login__password-toggle.is-visible .password-toggle__show {
    display: none;
}

.portal-login__password-toggle.is-visible .password-toggle__hide {
    display: block;
}

.portal-login__submit {
    width: 100%;
    min-height: 56px;
    margin-top: 8px;
    padding: 0 18px;
    border: 0;
    border-radius: 3px;
    outline: none;
    color: #18140d;
    background: linear-gradient(135deg, #ffb21c, var(--gold));
    box-shadow: 0 9px 22px rgba(199, 125, 0, .20);
    font-size: .93rem;
    font-weight: 850;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.portal-login__submit:hover {
    background: linear-gradient(135deg, #ffc03a, #f6a80a);
    box-shadow: 0 12px 27px rgba(199, 125, 0, .27);
    transform: translateY(-1px);
}

.portal-login__submit:active {
    transform: translateY(0);
}

.portal-login__submit:focus-visible {
    box-shadow: var(--focus), 0 12px 27px rgba(199, 125, 0, .27);
}

.portal-login__help {
    display: grid;
    gap: 3px;
    margin-top: 24px;
    padding-top: 19px;
    border-top: 1px solid #ece8e1;
    color: #857f76;
    font-size: .72rem;
    line-height: 1.5;
}

.portal-login__help span:first-child {
    color: #615c55;
    font-weight: 750;
}

.portal-login__public-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 17px;
    color: #6c665e;
    font-size: .74rem;
    font-weight: 750;
    text-decoration: none;
}

.portal-login__public-link:hover {
    color: var(--gold-dark);
}

.portal-login__public-link svg {
    width: 13px;
    fill: currentColor;
}

.portal-login__slide-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    z-index: 3;
    display: flex;
    gap: 7px;
    transform: translateX(-50%);
}

.portal-login__slide-dots span {
    display: block;
    width: 22px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .31);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
    transition: width 300ms ease, background 300ms ease;
}

.portal-login__slide-dots span.is-active {
    width: 36px;
    background: var(--gold);
}

@media (max-width: 900px) {
    .portal-login {
        padding: 26px;
    }

    .portal-login__window {
        grid-template-columns: minmax(0, 42%) minmax(0, 58%);
        min-height: 570px;
    }

    .portal-login__brand {
        padding: 44px 34px 27px;
    }

    .portal-login__logo img {
        width: min(100%, 240px);
    }

    .portal-login__brand h1 {
        font-size: 2.35rem;
    }

    .portal-login__brand-copy > p {
        font-size: .91rem;
    }

    .portal-login__form-panel {
        padding: 48px 36px;
    }
}

@media (max-width: 700px) {
    .auth-page--portal {
        overflow-y: auto;
    }

    .portal-login {
        min-height: 100svh;
        padding: 20px;
    }

    .portal-login__window {
        display: block;
        width: min(100%, 500px);
        min-height: 0;
    }

    .portal-login__brand {
        display: none;
    }

    .portal-login__form-panel {
        padding: 38px 27px 34px;
    }

    .portal-login__form-inner {
        width: 100%;
    }

    .portal-login__mobile-logo {
        display: block;
        margin: 0 0 36px;
    }

    .portal-login__mobile-logo img {
        width: min(100%, 258px);
        height: auto;
    }

    .portal-login__form-kicker {
        margin-bottom: 10px;
    }

    .portal-login__form-inner h2 {
        margin-bottom: 22px;
        font-size: 2.15rem;
    }

    .portal-login__intro {
        margin-bottom: 22px;
        font-size: .94rem;
    }
}

@media (max-height: 700px) and (min-width: 701px) {
    .portal-login {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .portal-login__window {
        min-height: 540px;
    }

    .portal-login__brand,
    .portal-login__form-panel {
        padding-top: 38px;
        padding-bottom: 26px;
    }

    .portal-login__logo {
        margin-bottom: 30px;
    }

    .portal-login__brand-footer {
        padding-top: 130px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-login__slide {
        transition: none !important;
        transform: scale(1.02) !important;
    }
}

/* --------------------------------------------------------------------------
   White Beard Admin v0.6.1 — login logo contrast fix
   The supplied logo uses white wordmark lettering intended for dark surfaces.
   Keep the original artwork intact and place it on a compact branded plaque.
   -------------------------------------------------------------------------- */

.portal-login__logo {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 12px 17px 11px 13px;
    border: 1px solid rgba(229, 161, 10, .28);
    border-left: 4px solid var(--gold);
    border-radius: 5px;
    background: linear-gradient(135deg, #171714 0%, #24231f 100%);
    box-shadow: 0 12px 28px rgba(33, 28, 22, .13);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.portal-login__logo:hover {
    transform: translateY(-1px);
    border-color: rgba(229, 161, 10, .45);
    box-shadow: 0 15px 32px rgba(33, 28, 22, .17);
}

.portal-login__logo:focus-visible {
    outline: 3px solid rgba(229, 161, 10, .28);
    outline-offset: 4px;
}

.portal-login__logo img {
    width: min(100%, 272px);
    filter: none;
}

@media (max-width: 900px) {
    .portal-login__logo img {
        width: min(100%, 232px);
    }
}

@media (max-width: 700px) {
    .portal-login__mobile-logo {
        display: inline-flex;
        align-items: center;
        width: fit-content;
        max-width: 100%;
        padding: 10px 14px 9px 11px;
        border: 1px solid rgba(229, 161, 10, .25);
        border-left: 4px solid var(--gold);
        border-radius: 5px;
        background: linear-gradient(135deg, #171714 0%, #24231f 100%);
        box-shadow: 0 10px 24px rgba(33, 28, 22, .12);
    }

    .portal-login__mobile-logo img {
        width: min(100%, 230px);
        filter: none;
    }
}

/* --------------------------------------------------------------------------
   White Beard Admin v0.7 — invoices & payments
   -------------------------------------------------------------------------- */

.dashboard-heading__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-activity-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.status-badge--partial {
    color: #805b13;
    background: #fff3d3;
    border-color: #ead293;
}

.status-badge--paid {
    color: #286647;
    background: #e8f4ec;
    border-color: #b7d8c3;
}

.status-badge--overdue {
    color: #9b3f35;
    background: #fceeee;
    border-color: #e8c1c1;
}

.status-badge--void {
    color: #68635c;
    background: #f0efec;
    border-color: #d7d2ca;
}

.invoice-balance-panel {
    overflow: hidden;
}

.invoice-balance {
    margin: 5px 0 4px;
    color: var(--ink, #171714);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -.045em;
}

.invoice-balance-panel > p {
    margin: 0 0 20px;
    color: #777168;
    font-size: .78rem;
    line-height: 1.5;
}

.next-step-card--success {
    border-color: #b7d8c3;
    background: #eef8f1;
}

.status-action--danger {
    color: #9b3f35;
    border-color: #e4b7b1;
    background: #fffafa;
}

.status-action--danger:hover {
    border-color: #cf8f87;
    background: #fceeee;
}

.payment-row {
    padding: 10px 0;
    border-top: 1px solid #ece8e1;
}

.payment-row:first-of-type {
    border-top: 0;
}

.payment-row > div {
    display: grid;
    gap: 2px;
}

.payment-row strong {
    color: #171714;
    font-size: .95rem;
}

.payment-row span,
.payment-row small {
    color: #716b63;
    font-size: .72rem;
}

.payment-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.payment-summary-card {
    position: sticky;
    top: 98px;
}

.payment-summary-card > strong {
    display: block;
    margin: 6px 0 18px;
    color: #171714;
    font-size: 2.15rem;
    letter-spacing: -.04em;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 22px;
    flex-wrap: wrap;
}

.data-table--invoices th:nth-last-child(-n+2),
.data-table--invoices td:nth-last-child(-n+2) {
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .dashboard-activity-grid {
        grid-template-columns: 1fr;
    }

    .payment-form-layout {
        grid-template-columns: 1fr;
    }

    .payment-summary-card {
        position: static;
    }
}

@media (max-width: 700px) {
    .dashboard-heading__actions {
        width: 100%;
        justify-content: stretch;
    }

    .dashboard-heading__actions > * {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* ==========================================================================\n   White Beard Operations v0.8\n   CRM, projects, scheduling, follow-ups, reporting, public portal\n   ========================================================================== */

/* Login logo contrast fix: preserve the white-letter logo asset on a dark plaque. */
.portal-login__logo,
.portal-login__mobile-logo {
    position: relative;
    padding: 11px 15px 10px 17px;
    border: 1px solid rgba(229, 161, 10, .34);
    border-left: 4px solid var(--gold);
    border-radius: 5px;
    background: #191917;
    box-shadow: 0 12px 25px rgba(30, 24, 16, .12);
}

.portal-login__logo img,
.portal-login__mobile-logo img {
    filter: none !important;
}

.app-nav--expanded {
    gap: 4px;
}

.app-nav--expanded > a {
    padding-inline: 10px;
}

.app-nav-more {
    position: relative;
}

.app-nav-more summary {
    list-style: none;
    padding: 21px 10px 20px;
    color: #c5c0b8;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.app-nav-more summary::-webkit-details-marker {
    display: none;
}

.dashboard-page .app-nav-more summary::after {
    content: "";

    display: block;
    flex: 0 0 auto;

    width: 7px;
    height: 7px;
    margin-left: 9px;

    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);

    transform: translateY(-2px) rotate(45deg);

    transition: transform 160ms ease,
    border-color 160ms ease;
}

.dashboard-page .app-nav-more[open] summary::after {
    transform: translateY(2px) rotate(225deg);
}

.dashboard-page .app-nav-more summary {
    gap: 0;
}

.dashboard-page .app-nav-more summary:hover::after,
.dashboard-page .app-nav-more[open] summary::after {
    border-color: #ffb21c;
}

.app-nav-more[open] summary {
    color: #fff;
}

.app-nav-more__menu {
    position: absolute;
    top: calc(100% - 6px);
    right: 0;
    z-index: 40;
    display: grid;
    min-width: 210px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 8px;
    background: #1d1c1a;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

.app-nav-more__menu a {
    padding: 10px 12px;
    border-radius: 5px;
    color: #ded9d0;
    text-decoration: none;
    font-size: .82rem;
}

.app-nav-more__menu a:hover {
    background: rgba(229, 161, 10, .12);
    color: #fff;
}

.dashboard-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-grid--five .dashboard-card {
    min-height: 220px;
}

.dashboard-grid--five .dashboard-card h2 {
    font-size: 1.35rem;
}

.dashboard-grid--five .dashboard-card p {
    font-size: .84rem;
}

.ops-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}

.ops-kpi {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.ops-kpi span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.ops-kpi strong {
    color: var(--ink);
    font-size: 1.55rem;
    letter-spacing: -.035em;
}

.kanban-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(220px, 1fr));
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.kanban-column {
    min-width: 220px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #eeeae3;
}

.kanban-column__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 4px 12px;
}

.kanban-column__header strong {
    font-size: .83rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.kanban-column__header span {
    min-width: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fff;
    text-align: center;
    font-size: .72rem;
    font-weight: 800;
}

.kanban-card {
    display: grid;
    gap: 5px;
    margin-bottom: 9px;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, .05);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .04);
    text-decoration: none;
}

.kanban-card:hover {
    border-color: rgba(229, 161, 10, .55);
    transform: translateY(-1px);
}

.kanban-card strong {
    font-size: .9rem;
}

.kanban-card span {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.4;
}

.kanban-card small {
    color: var(--gold-dark);
    font-size: .7rem;
    font-weight: 750;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.filter-pill {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 700;
}

.filter-pill.is-active, .filter-pill:hover {
    border-color: var(--gold);
    color: var(--ink);
    background: var(--gold-pale);
}

.record-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.record-row:last-child {
    border-bottom: 0;
}

.record-row > div {
    min-width: 0;
}

.record-row strong, .record-row a {
    color: var(--ink);
}

.record-row span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .78rem;
}

.record-row__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
}

.record-row__meta span {
    display: inline-flex;
    margin: 0;
}

.record-row--total {
    margin-top: 10px;
    padding-top: 14px;
    font-size: 1.05rem;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.file-card {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--warm, #f7f4ee);
    text-decoration: none;
}

.file-card:hover {
    border-color: var(--gold);
}

.file-card span {
    color: var(--muted);
    font-size: .75rem;
}

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

.field-block--checkbox {
    align-content: end;
}

.field-block--checkbox input {
    width: auto;
}

.field-block--compact label {
    font-size: .7rem;
}

.form-section-heading {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.line-formset {
    display: grid;
    gap: 8px;
}

.line-formset__row {
    display: grid;
    grid-template-columns: minmax(180px, 2.4fr) .7fr 1fr 1fr .65fr;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #faf8f4;
}

.template-applied {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 9px;
    border-radius: 5px;
    background: var(--gold-pale);
    color: var(--gold-dark);
    font-size: .78rem;
}

.template-picker {
    min-width: 220px;
}

.template-picker label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: -5px 0 14px;
}

.calendar-grid {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

.calendar-weekdays, .calendar-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    background: #171714;
    color: #fff;
}

.calendar-weekdays strong {
    padding: 10px;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-align: center;
}

.calendar-day {
    min-height: 126px;
    padding: 8px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day.is-muted {
    background: #f8f6f2;
    color: #aaa49b;
}

.calendar-day.is-today {
    box-shadow: inset 0 0 0 2px var(--gold);
}

.calendar-day__number {
    display: block;
    margin-bottom: 7px;
    font-size: .74rem;
    font-weight: 800;
}

.calendar-event {
    display: grid;
    gap: 1px;
    margin: 4px 0;
    padding: 5px 6px;
    border-left: 3px solid var(--gold);
    border-radius: 3px;
    background: var(--gold-pale);
    text-decoration: none;
    font-size: .68rem;
}

.calendar-event strong {
    font-size: .63rem;
}

.calendar-event span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event--follow_up {
    border-color: #bc5b4d;
    background: #fff0ee;
}

.calendar-event--meeting {
    border-color: #527da1;
    background: #edf5fb;
}

.report-bar-row {
    display: grid;
    grid-template-columns: 78px minmax(100px, 1fr) 95px;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.report-bar-row > span {
    color: var(--muted);
    font-size: .76rem;
}

.report-bar-row > strong {
    text-align: right;
    font-size: .82rem;
}

.report-bar {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #ede8df;
}

.report-bar i {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--gold);
}

.row-alert {
    background: #fff8f0;
}

.table-actions {
    display: flex;
    gap: 9px;
    justify-content: flex-end;
}

.text-button {
    padding: 0;
    border: 0;
    color: var(--gold-dark);
    background: transparent;
    font-weight: 750;
    cursor: pointer;
}

.muted-block {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.inline-role-form {
    display: contents;
}

/* Secure customer portal */
.public-portal-page {
    min-height: 100vh;
    background: #f2efe9;
    color: var(--text);
}

.public-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px max(24px, calc((100vw - 1080px) / 2));
    border-bottom: 4px solid var(--gold);
    background: #171714;
    color: #d8d3ca;
}

.public-portal-header img {
    display: block;
    width: 220px;
    max-height: 62px;
    object-fit: contain;
    object-position: left center;
}

.public-portal-header span {
    font-size: .72rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.public-portal-shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 60px;
}

.public-portal-shell--narrow {
    width: min(760px, calc(100% - 32px));
}

.public-portal-hero {
    margin-bottom: 32px;
}

.public-portal-hero h1 {
    margin: 7px 0 10px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -.055em;
    line-height: .98;
}

.public-portal-hero p {
    max-width: 680px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.public-portal-section {
    margin: 20px 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.public-portal-section h2 {
    margin: 0 0 14px;
}

.public-doc-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}

.public-doc-card:first-of-type {
    border-top: 0;
}

.public-doc-card h3 {
    margin: 7px 0 3px;
    font-size: 1.05rem;
}

.public-doc-card p {
    margin: 0;
    color: var(--muted);
}

.public-doc-card--nested {
    margin-left: 20px;
    padding-left: 14px;
    border-left: 3px solid var(--gold);
}

.public-approved {
    color: var(--success);
    font-weight: 800;
}

.public-portal-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: .8rem;
}

.public-accept-card {
    margin-top: 24px;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.public-accept-card h1 {
    margin: 7px 0 18px;
    font-size: clamp(2rem, 5vw, 3.3rem);
    letter-spacing: -.05em;
}

.public-total {
    margin: 6px 0 22px;
    color: var(--ink);
    font-size: 2.5rem;
    font-weight: 850;
    letter-spacing: -.05em;
}

.public-accept-form {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.public-accept-form > label:not(.public-check) {
    display: grid;
    gap: 7px;
    font-size: .8rem;
    font-weight: 750;
}

.public-field {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid #ccc4b9;
    border-radius: 5px;
    font: inherit;
}

.public-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--muted);
    font-size: .85rem;
    line-height: 1.45;
}

.public-check input {
    margin-top: 2px;
}

.public-success-mark {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    background: #e8f4ec;
    color: var(--success);
    font-size: 1.8rem;
    font-weight: 900;
}

.public-accept-card--success {
    text-align: center;
}

.public-accept-card--success .public-success-mark {
    margin: 0 auto 16px;
}

.status-badge--scheduled {
    background: #eaf3f8;
    color: #2d627c;
}

.status-badge--in_progress {
    background: #fff3d3;
    color: #8d5a00;
}

.status-badge--waiting {
    background: #f3efe8;
    color: #6d6256;
}

.status-badge--complete {
    background: #e8f4ec;
    color: #2f724d;
}

.status-badge--cancelled {
    background: #fceeee;
    color: #9c3d3d;
}

.status-badge--approved {
    background: #e8f4ec;
    color: #2f724d;
}

@media (max-width: 1220px) {
    .dashboard-grid--five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .app-nav--expanded > a:nth-of-type(5) {
        display: none;
    }
}

@media (max-width: 980px) {
    .dashboard-grid--five {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .calendar-day {
        min-height: 105px;
    }

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

    .line-formset__row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .dashboard-grid--five, .ops-kpi-grid, .form-panel .form-grid--two, .form-grid--two, .file-grid {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        overflow-x: auto;
    }

    .calendar-weekdays, .calendar-week {
        min-width: 760px;
    }

    .public-doc-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-portal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-portal-header img {
        width: 190px;
    }
}

/* v0.8 refinements */
.dashboard-grid--five {
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
}

.public-doc-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .public-doc-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ---------- Shared attachments (projects, estimates, invoices) ---------- */
.attachment-help {
    margin: -4px 0 16px;
    max-width: 760px;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.55;
}

.attachment-grid {
    display: grid;
    gap: 10px;
}

.attachment-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--warm, #f7f4ee);
}

.attachment-card__type {
    display: grid;
    min-height: 42px;
    place-items: center;
    padding: 7px 9px;
    border-left: 3px solid var(--gold);
    border-radius: 7px;
    background: #171714;
    color: #fff;
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .07em;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
}

.attachment-card__body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.attachment-card__body strong {
    overflow: hidden;
    color: var(--ink);
    font-size: .86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-card__body span,
.attachment-card__body small {
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: .7rem;
    line-height: 1.45;
}

.attachment-card__body em {
    justify-self: start;
    margin-top: 2px;
    padding: 3px 6px;
    border: 1px solid #dcc887;
    border-radius: 999px;
    background: var(--gold-pale, #fff3d3);
    color: #7b5300;
    font-size: .6rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.attachment-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.attachment-card__actions a,
.attachment-card__actions button {
    appearance: none;
    padding: 6px 8px;
    border: 1px solid #d8d1c6;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .67rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.attachment-card__actions a:hover {
    border-color: var(--gold);
}

.attachment-card__actions button {
    color: #9d3434;
}

.attachment-card__actions button:hover {
    border-color: #d6a6a6;
    background: #fff7f7;
}

.attachment-card__actions form {
    margin: 0;
}

@media (max-width: 760px) {
    .attachment-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .attachment-card__actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 3px;
    }
}

/* ========================================================================== 
   White Beard Admin v0.10 — unified application UI / UX system
   Normalizes authenticated pages introduced across v0.2–v0.9 without
   altering the public portal, login screen, or PDF renderers.
   ========================================================================== */

.dashboard-page {
    --app-surface: #ffffff;
    --app-surface-soft: #f8f5ef;
    --app-surface-muted: #efebe4;
    --app-border: #e4ddd3;
    --app-border-strong: #d5ccc0;
    --app-shadow: 0 10px 30px rgba(27, 24, 19, .055);
    --app-shadow-hover: 0 16px 38px rgba(27, 24, 19, .09);
    --app-radius: 16px;
    --app-radius-sm: 11px;
    background: radial-gradient(circle at 94% -3%, rgba(242, 160, 0, .075), transparent 24rem),
    #f5f2ec;
}

/* ----- Global authenticated layout ----- */
.dashboard-page .app-header {
    min-height: 74px;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .11);
}

.dashboard-page .app-header__inner {
    width: min(1480px, calc(100% - 40px));
    min-height: 74px;
    gap: clamp(18px, 2.4vw, 34px);
}

.dashboard-page .app-header__logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.dashboard-page .app-header__logo img {
    display: block;
    width: clamp(176px, 15vw, 212px);
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
}

.dashboard-page .app-nav {
    min-width: 0;
    height: 74px;
    gap: 0;
}

.dashboard-page .app-nav--expanded > a,
.dashboard-page .app-nav-more summary {
    padding-inline: 10px;
    white-space: nowrap;
    font-size: .79rem;
    font-weight: 720;
}

.dashboard-page .app-nav a::after {
    right: 10px;
    left: 10px;
    height: 2px;
}

.dashboard-page .app-nav-more summary {
    display: flex;
    align-items: center;
    height: 74px;
    padding-block: 0;
}

.dashboard-page .app-nav-more.is-active summary,
.dashboard-page .app-nav-more[open] summary {
    color: #fff;
}

.dashboard-page .app-nav-more.is-active summary::before {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--gold);
}

.dashboard-page .app-nav-more__menu {
    top: calc(100% - 2px);
    min-width: 230px;
    padding: 8px;
    border-radius: 12px;
    background: #1d1c1a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .32);
}

.dashboard-page .app-nav-more__menu a {
    padding: 10px 12px;
    border-radius: 8px;
}

.dashboard-page .app-header__account {
    gap: 12px;
    min-width: 0;
}

.dashboard-page .app-header__account > div {
    max-width: 190px;
}

.dashboard-page .app-header__account strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-page .app-shell,
.dashboard-page .dashboard-shell {
    min-width: 0;
}

.dashboard-page .app-shell {
    width: min(1360px, calc(100% - 40px));
    padding: clamp(36px, 4vw, 58px) 0 78px;
}

.dashboard-page .dashboard-shell {
    width: min(1360px, calc(100% - 40px));
    padding: clamp(38px, 4vw, 62px) 0 78px;
}

/* ----- Typography and page headers ----- */
.dashboard-page .page-heading,
.dashboard-page .dashboard-heading {
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 26px;
}

.dashboard-page .page-heading > div:first-child,
.dashboard-page .dashboard-heading > div:first-child {
    min-width: 0;
}

.dashboard-page .page-heading h1,
.dashboard-page .dashboard-heading h1 {
    margin: 7px 0 10px;
    font-size: clamp(2.25rem, 3.8vw, 3.55rem);
    letter-spacing: -.052em;
    line-height: .98;
}

.dashboard-page .page-heading p,
.dashboard-page .dashboard-heading p {
    max-width: 760px;
    color: #746d64;
    font-size: .94rem;
    line-height: 1.62;
}

.dashboard-page .section-kicker,
.dashboard-page .auth-card__kicker {
    color: var(--gold-dark);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .14em;
}

/* ----- Unified buttons ----- */
.dashboard-page .primary-button,
.dashboard-page .outline-button,
.dashboard-page .danger-button,
.dashboard-page .secondary-button,
.dashboard-page .disabled-button {
    width: auto;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 0 15px;
    border-radius: 10px;
    gap: 8px;
    font-size: .8rem;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-page .primary-button {
    border: 1px solid #e99b00;
    background: linear-gradient(180deg, #ffb12a 0%, #f2a000 100%);
    box-shadow: 0 7px 16px rgba(199, 125, 0, .17);
}

.dashboard-page .primary-button:hover:not(:disabled) {
    background: linear-gradient(180deg, #ffba3d 0%, #f7a70a 100%);
    box-shadow: 0 10px 20px rgba(199, 125, 0, .22);
}

.dashboard-page .outline-button {
    border-color: var(--app-border-strong);
    background: #fff;
    box-shadow: 0 2px 6px rgba(27, 24, 19, .025);
}

.dashboard-page .outline-button:hover {
    border-color: #bbae9e;
    background: #fbfaf7;
}

.dashboard-page .button-full,
.dashboard-page .totals-card > .primary-button,
.dashboard-page .totals-card > .outline-button,
.dashboard-page .invoice-balance-panel > .primary-button,
.dashboard-page .invoice-balance-panel > .outline-button {
    width: 100%;
}

.dashboard-page .page-actions,
.dashboard-page .dashboard-heading__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.dashboard-page .page-actions .primary-button,
.dashboard-page .page-actions .outline-button,
.dashboard-page .dashboard-heading__actions .primary-button,
.dashboard-page .dashboard-heading__actions .outline-button {
    min-width: 0;
}

/* ----- Cards / panels ----- */
.dashboard-page .panel,
.dashboard-page .dashboard-card,
.dashboard-page .ops-kpi {
    border-color: rgba(29, 25, 19, .07);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.dashboard-page .panel {
    padding: 24px;
}

.dashboard-page .panel-heading {
    align-items: center;
    margin-bottom: 18px;
}

.dashboard-page .panel-heading h2 {
    margin-top: 3px;
    font-size: 1.26rem;
}

.dashboard-page .dashboard-activity-grid {
    align-items: start;
    gap: 16px;
    margin-top: 16px;
}

.dashboard-page .dashboard-activity-grid > .panel,
.dashboard-page .recent-panel {
    margin-top: 0;
}

.dashboard-page .dashboard-activity-grid + .panel {
    margin-top: 16px;
}

.dashboard-page .ops-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.dashboard-page .ops-kpi {
    padding: 17px 18px;
}

.dashboard-page .ops-kpi strong {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
}

/* ----- Search, filters, and toolbars ----- */
.dashboard-page .list-toolbar,
.dashboard-page .filter-bar,
.dashboard-page .toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    margin: 0 0 18px;
}

.dashboard-page .list-toolbar,
.dashboard-page .filter-bar {
    padding: 0;
    border: 0;
}

.dashboard-page .list-toolbar .app-field,
.dashboard-page .filter-bar .app-field,
.dashboard-page .toolbar .search-field {
    flex: 1 1 360px;
    min-width: 180px;
}

.dashboard-page .list-toolbar > .app-field,
.dashboard-page .filter-bar > .app-field {
    width: auto;
}

.dashboard-page .app-field {
    min-height: 43px;
    padding: 9px 12px;
    border-color: #d9d1c7;
    border-radius: 9px;
    background: #fff;
    font-size: .84rem;
}

.dashboard-page .app-field:focus {
    border-color: #c98200;
    box-shadow: 0 0 0 3px rgba(242, 160, 0, .16);
}

.dashboard-page .filter-pills {
    gap: 7px;
    margin-bottom: 16px;
}

.dashboard-page .filter-pill {
    padding: 7px 11px;
    border-color: var(--app-border);
    font-size: .75rem;
}

/* ----- Tables ----- */
.dashboard-page .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: #c9c0b5 transparent;
}

.dashboard-page .table-wrap::-webkit-scrollbar {
    height: 8px;
}

.dashboard-page .table-wrap::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #c9c0b5;
    background-clip: padding-box;
}

.dashboard-page .data-table {
    font-size: .78rem;
}

.dashboard-page .data-table th {
    padding: 11px 12px;
    background: #faf8f4;
    color: #81796f;
    font-size: .61rem;
    letter-spacing: .08em;
}

.dashboard-page .data-table td {
    padding: 13px 12px;
    line-height: 1.45;
}

.dashboard-page .data-table tbody tr:hover td {
    background: #fcfaf6;
}

.dashboard-page .data-table td:first-child,
.dashboard-page .data-table th:first-child {
    padding-left: 12px;
}

.dashboard-page .data-table td:last-child,
.dashboard-page .data-table th:last-child {
    padding-right: 12px;
}

.dashboard-page .table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: max-content;
    white-space: nowrap;
}

.dashboard-page .table-actions form {
    display: inline-flex;
    margin: 0;
}

.dashboard-page .text-button,
.dashboard-page .text-link {
    white-space: nowrap;
    text-decoration: none;
}

.dashboard-page .text-button {
    font-size: .75rem;
}

.dashboard-page .row-alert td {
    background: #fff9f1;
}

.dashboard-page .row-alert:hover td {
    background: #fff5e7 !important;
}

/* ----- Records / dashboard queue rows ----- */
.dashboard-page .record-row {
    gap: 14px;
    padding: 12px 0;
}

.dashboard-page .record-row > strong:last-child,
.dashboard-page .record-row__meta > strong {
    flex: 0 0 auto;
    white-space: nowrap;
}

.dashboard-page .record-row__meta {
    flex: 0 0 auto;
}

/* ----- Lead pipeline ----- */
.dashboard-page .kanban-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    padding: 0;
}

.dashboard-page .kanban-column {
    min-width: 0;
    padding: 10px;
    border-color: #e2dcd3;
    border-radius: 14px;
    background: #efebe4;
}

.dashboard-page .kanban-column__header {
    padding: 3px 3px 10px;
}

.dashboard-page .kanban-column__header strong {
    overflow: hidden;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-page .kanban-card {
    padding: 11px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .035);
}

.dashboard-page .kanban-card:hover {
    box-shadow: 0 9px 20px rgba(27, 24, 19, .07);
}

.dashboard-page .kanban-card strong {
    font-size: .84rem;
}

.dashboard-page .kanban-card span {
    font-size: .73rem;
}

.dashboard-page .kanban-card small {
    font-size: .67rem;
}

/* ----- Forms ----- */
.dashboard-page .field-label-row {
    align-items: center;
    flex-wrap: wrap;
    row-gap: 5px;
}

.dashboard-page .field-label-row > label {
    min-width: 0;
}

.dashboard-page .field-label-row a {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

.dashboard-page .form-panel {
    overflow: visible;
}

.dashboard-page .form-section {
    padding: 28px 0;
}

.dashboard-page .form-section__heading {
    margin-bottom: 20px;
}

.dashboard-page .form-actions {
    justify-content: flex-end;
    margin-top: 0;
    padding: 22px 0 28px;
}

.dashboard-page .field-block--checkbox .app-field,
.dashboard-page .inline-role-form .app-field {
    min-height: auto;
}

/* ----- Builders / detail sidebars ----- */
.dashboard-page .estimate-builder {
    grid-template-columns: minmax(0, 1fr) 318px;
    gap: 18px;
}

.dashboard-page .estimate-builder__sidebar {
    top: 90px;
}

.dashboard-page .totals-card {
    padding: 22px;
}

.dashboard-page .grand-total {
    font-size: 2.3rem;
}

.dashboard-page .detail-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 18px;
}

.dashboard-page .sidebar-tip,
.dashboard-page .next-step-card {
    border-radius: 12px;
}

/* ----- Catalog / report visual rhythm ----- */
.dashboard-page .report-bar-row {
    grid-template-columns: 84px minmax(120px, 1fr) 100px;
    padding: 7px 0;
}

.dashboard-page .report-bar {
    height: 8px;
}

/* ----- Attachments ----- */
.dashboard-page .attachment-card {
    border-radius: 12px;
    background: #faf8f4;
}

/* ----- Responsive behavior ----- */
@media (max-width: 1240px) {
    .dashboard-page .app-header__inner {
        grid-template-columns: auto 1fr auto;
        width: min(100% - 32px, 1480px);
        gap: 16px;
    }

    .dashboard-page .app-nav--expanded > a,
    .dashboard-page .app-nav-more summary {
        padding-inline: 8px;
        font-size: .75rem;
    }

    .dashboard-page .app-nav a::after,
    .dashboard-page .app-nav-more.is-active summary::before {
        right: 8px;
        left: 8px;
    }

    .dashboard-page .app-header__account > div {
        display: none;
    }
}

@media (max-width: 1080px) {
    .dashboard-page .app-header__inner {
        grid-template-columns: auto auto;
        padding: 8px 0 0;
    }

    .dashboard-page .app-header__account {
        justify-self: end;
    }

    .dashboard-page .app-nav {
        grid-column: 1 / -1;
        order: 3;
        width: 100%;
        height: 42px;
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
    }

    .dashboard-page .app-nav::-webkit-scrollbar {
        display: none;
    }

    .dashboard-page .app-nav--expanded > a,
    .dashboard-page .app-nav-more summary {
        flex: 0 0 auto;
        height: 42px;
    }

    .dashboard-page .app-nav-more__menu {
        position: fixed;
        top: 116px;
        right: 16px;
    }

    .dashboard-page .estimate-builder,
    .dashboard-page .detail-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-page .estimate-builder__sidebar {
        position: static;
    }

    .dashboard-page .kanban-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(220px, 30vw);
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding-bottom: 8px;
        scrollbar-width: thin;
        scrollbar-color: #c8c0b5 transparent;
    }
}

@media (max-width: 820px) {
    .dashboard-page .app-shell,
    .dashboard-page .app-shell--narrow,
    .dashboard-page .dashboard-shell {
        width: min(100% - 28px, 1360px);
    }

    .dashboard-page .page-heading,
    .dashboard-page .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 22px;
    }

    .dashboard-page .page-actions,
    .dashboard-page .dashboard-heading__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .dashboard-page .page-actions > *,
    .dashboard-page .dashboard-heading__actions > * {
        flex: 0 0 auto;
        width: auto;
    }

    .dashboard-page .list-toolbar,
    .dashboard-page .filter-bar,
    .dashboard-page .toolbar {
        flex-wrap: wrap;
    }

    .dashboard-page .list-toolbar > .app-field,
    .dashboard-page .filter-bar > .app-field,
    .dashboard-page .toolbar .search-field {
        flex-basis: 100%;
        width: 100%;
    }

    .dashboard-page .data-table {
        min-width: 680px;
    }

    .dashboard-page .ops-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dashboard-page .app-header__inner {
        width: calc(100% - 24px);
    }

    .dashboard-page .app-header__logo img {
        width: 166px;
    }

    .dashboard-page .page-heading h1,
    .dashboard-page .dashboard-heading h1 {
        font-size: clamp(2rem, 11vw, 2.65rem);
    }

    .dashboard-page .page-actions,
    .dashboard-page .dashboard-heading__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-page .page-actions > *,
    .dashboard-page .dashboard-heading__actions > * {
        width: 100%;
    }

    .dashboard-page .page-actions > :only-child,
    .dashboard-page .dashboard-heading__actions > :only-child {
        grid-column: 1 / -1;
    }

    .dashboard-page .panel {
        padding: 18px;
        border-radius: 14px;
    }

    .dashboard-page .panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .dashboard-page .ops-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-page .record-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-page .record-row__meta {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    .dashboard-page .kanban-grid {
        grid-auto-columns: minmax(230px, 82vw);
    }

    .dashboard-page .attachment-card {
        grid-template-columns: 1fr;
    }

    .dashboard-page .attachment-card__type {
        justify-self: start;
        min-height: 34px;
    }

    .dashboard-page .attachment-card__actions {
        justify-content: flex-start;
    }
}

/* =========================================================
   Dashboard — Upcoming Projects
   ========================================================= */

.dashboard-page .upcoming-projects-panel .upcoming-project-date {
    font-size: 0.86rem;
    line-height: 1.2;
    font-weight: 750;
}

/*
 * .record-row span sets all spans to .78rem.
 * Restore the standard application badge sizing here.
 */
.dashboard-page .upcoming-projects-panel .record-row__meta > .status-badge {
    font-size: 0.63rem !important;
}

/* =========================================================
   Dashboard — Upcoming Projects links
   ========================================================= */

.dashboard-page .upcoming-projects-panel .upcoming-project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--ink);
    text-decoration: none;
    text-underline-offset: 3px;

    transition: color 150ms ease;
}

.dashboard-page .upcoming-projects-panel .upcoming-project-link strong {
    color: inherit;
}

.dashboard-page .upcoming-projects-panel .upcoming-project-link__icon {
    display: inline-flex;
    margin: 0;

    color: var(--gold-dark);
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;

    transform: translateY(-1px);
    transition: transform 150ms ease, color 150ms ease;
}

.dashboard-page .upcoming-projects-panel .upcoming-project-link:hover {
    color: var(--gold-dark);
}

.dashboard-page .upcoming-projects-panel .upcoming-project-link:hover
.upcoming-project-link__icon {
    color: var(--gold);
    transform: translate(2px, -3px);
}

/* =========================================================
   Invoice detail — Balance Due action spacing
   ========================================================= */

.dashboard-page .invoice-balance-panel > .primary-button {
    margin-top: 4px;
    margin-bottom: 10px;
}

.dashboard-page .invoice-balance-panel > .outline-button {
    margin-bottom: 14px;
}

.dashboard-page .invoice-balance-panel > .text-link {
    display: inline-flex;
    align-items: center;
    margin-top: 2px;
}

/* =========================================================
   Estimate detail — workflow card spacing
   ========================================================= */

.dashboard-page .next-step-card {
    padding: 16px;
}

.dashboard-page .next-step-card > strong {
    display: block;
    margin-bottom: 5px;
}

.dashboard-page .next-step-card > p {
    margin: 0;
    line-height: 1.5;
}

/* Space between description and action */
.dashboard-page .next-step-card > p + .outline-button,
.dashboard-page .next-step-card > p + .primary-button,
.dashboard-page .next-step-card > p + form {
    margin-top: 11px;
}

/* Make form-contained action buttons behave the same */
.dashboard-page .next-step-card > form > .primary-button,
.dashboard-page .next-step-card > form > .outline-button {
    width: 100%;
}

/* Consistent separation between multiple workflow cards */
.dashboard-page .next-step-card + .next-step-card {
    margin-top: 16px;
}

/* =========================================================
   Page heading — back-link / kicker spacing
   ========================================================= */

.dashboard-page .page-heading .back-link {
    display: flex;
    width: fit-content;
    margin: 0 0 10px;

    color: #6f685f;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none;
}

.dashboard-page .page-heading .back-link:hover {
    color: var(--gold-dark);
}

.dashboard-page .page-heading .section-kicker {
    display: block;
    width: fit-content;
    margin-bottom: 24px;
}