h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --color-bg: #f1f5f9;
    --color-surface: #ffffff;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-accent: #0d9488;
    --color-accent-hover: #0f766e;
    --color-accent-soft: #ccfbf1;
    --color-hero-from: #0f172a;
    --color-hero-to: #134e4a;
    --color-danger: #dc2626;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --radius: 10px;
    --radius-lg: 14px;
    --container: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--color-accent-hover);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.site-logo:hover {
    color: var(--color-text);
}

.site-logo__mark {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--color-accent) 0%, #14b8a6 100%);
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

.site-logo__mark--footer {
    width: 1.5rem;
    height: 1.5rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-nav__link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
}

.site-nav__link:hover {
    color: var(--color-accent);
}

.site-nav__user {
    color: var(--color-muted);
    font-size: 0.875rem;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-layout {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.site-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
    flex: 1 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.site-main:has(> .home-page) {
    max-width: none;
    padding: 0;
}

.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
}

.site-footer__brand {
    max-width: 20rem;
}

.site-footer__name {
    font-weight: 700;
    display: block;
    margin-bottom: 0.35rem;
}

.site-footer__tagline {
    margin: 0;
    font-size: 0.9rem;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
}

.site-footer__links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
}

.site-footer__links a:hover {
    color: var(--color-accent);
}

.site-footer__legal {
    padding-bottom: 1.5rem;
    font-size: 0.8125rem;
}

.site-footer__legal p {
    margin: 0;
}

.muted {
    color: var(--color-muted);
}

.eyebrow {
    display: inline-block;
    margin: 0 0 0.75rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #99f6e4;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin-top: 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.hero-lead {
    font-size: 1.125rem;
    line-height: 1.65;
    max-width: 36rem;
    margin: 1rem 0 1.5rem;
    color: #cbd5e1;
}

.hero-note {
    margin: 1rem 0 0;
    font-size: 0.875rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.hero--marketing {
    background: linear-gradient(155deg, var(--color-hero-from) 0%, var(--color-hero-to) 55%, #115e59 100%);
    color: #f8fafc;
    padding: 3.5rem 0 4rem;
}

.hero--marketing a:not(.btn-primary):not(.btn-secondary) {
    color: #99f6e4;
}

.hero--marketing__inner {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.home-page .section {
    padding: 3.5rem 0;
}

.section--muted {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.section-header {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto 2.5rem;
}

.section-header h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    letter-spacing: -0.02em;
}

.audience-strip__inner {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 720px) {
    .audience-strip__inner {
        grid-template-columns: 1fr 1fr;
    }
}

.audience-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
}

.audience-card__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

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

.feature-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.feature-card p {
    margin: 0;
    font-size: 0.9375rem;
}

.steps-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.steps-list li {
    counter-increment: step;
    position: relative;
    padding: 0 0 1.75rem 3rem;
    border-left: 2px solid var(--color-border);
    margin-left: 0.75rem;
}

.steps-list li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: -0.75rem;
    top: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
}

.steps-list li strong {
    display: block;
    margin-bottom: 0.25rem;
}

.steps-list li span {
    display: block;
    font-size: 0.9375rem;
}

.cta-band {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
    color: #f0fdfa;
}

.cta-band h2 {
    margin: 0 0 0.35rem;
    color: #fff;
}

.cta-band .muted {
    color: #ccfbf1;
}

.cta-band__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cta-band .btn-primary {
    background: #fff;
    color: var(--color-accent-hover);
}

.cta-band .btn-primary:hover {
    background: #f0fdfa;
    color: #115e59;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

.page-header p {
    margin: 0;
}

.page-shell {
    max-width: 40rem;
}

.page-shell--centered {
    text-align: center;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.25rem 0 0;
}

.error-request-id {
    font-size: 0.875rem;
    word-break: break-all;
}

.error-dev-hint {
    text-align: left;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.error-dev-hint h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.page-shell h1 {
    margin-top: 0;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.breadcrumb a {
    text-decoration: none;
    font-weight: 500;
}

.auth-page {
    display: flex;
    justify-content: center;
    padding: 1rem 0 2rem;
}

.auth-card {
    width: 100%;
    max-width: 26rem;
    padding: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-card__header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.auth-card__header p {
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.field-invalid {
    border-color: #dc2626 !important;
    outline-color: #dc2626;
}

.field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #dc2626;
}

.password-requirements {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    font-size: 0.85rem;
}

.password-requirements li {
    padding: 0.15rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.password-requirements li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-muted);
    font-weight: bold;
}

.password-requirement-met {
    color: #15803d;
}

.password-requirement-met::before {
    content: "✓";
    color: #15803d;
}

.password-requirement-unmet {
    color: var(--color-muted);
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-lg {
    padding: 0.7rem 1.35rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    color: #fff;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.hero--marketing .btn-secondary {
    background: transparent;
    color: #f8fafc;
    border-color: rgba(248, 250, 252, 0.45);
}

.hero--marketing .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #f8fafc;
    color: #fff;
}

.btn-link-pill {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--color-accent);
    border-radius: 999px;
    text-decoration: none;
}

.btn-link-nav {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font: inherit;
    font-weight: 500;
    text-decoration: underline;
    padding: 0;
}

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-field.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-field.checkbox label {
    display: inline;
    margin: 0;
    font-weight: inherit;
}

.form-field.checkbox input[type="checkbox"],
.form-field.checkbox input[type="radio"] {
    width: auto;
    flex-shrink: 0;
    margin: 0;
}

.form-error {
    color: var(--color-danger);
}

.form-footer {
    margin-top: 1.5rem;
    color: var(--color-muted);
}

.dashboard-org {
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.dashboard-org h2 {
    margin-top: 0;
}

.dashboard-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.dashboard-section h3 {
    margin-top: 0;
}

.dashboard-overview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-stat {
    flex: 1 1 7rem;
    min-width: 7rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.dashboard-stat__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.dashboard-stat__label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 0.25rem;
}

.properties-page-header,
.properties-org-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.properties-org-header h2 {
    margin: 0;
}

.properties-dashboard-link .btn-secondary {
    margin-top: 0.5rem;
}

.cleaners-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cleaners-org-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cleaners-org-header h2 {
    margin: 0;
}

.cleaners-pending-section {
    background: rgba(255, 193, 7, 0.08);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 193, 7, 0.25);
}

.cleaners-dashboard-link .btn-secondary {
    margin-top: 0.5rem;
}

.profile-org {
    margin-bottom: 2rem;
}

.dashboard-org h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.dashboard-payment-settings,
.dashboard-team,
.dashboard-notification-preferences,
.dashboard-in-app-alerts,
.dashboard-notifications,
.dashboard-add-property {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.dashboard-payment-settings {
    margin-top: 1rem;
}

.property-list {
    margin: 0;
    padding-left: 1.25rem;
}

#blazor-error-ui {
    background: #7f1d1d;
    color: #fff;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
}

.property-section {
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.property-section h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.property-section h3 {
    margin-top: 1.5rem;
    font-size: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.data-table th,
.data-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    font-weight: 600;
    color: var(--color-muted);
    font-size: 0.875rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    background: var(--color-accent);
    color: #fff;
    margin-right: 0.25rem;
}

.btn-small:hover {
    background: var(--color-accent-hover);
}

.btn-small:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.status-active {
    color: #28a745;
}

.status-error {
    color: #dc3545;
}

.status-disabled {
    color: var(--color-muted);
}

.confidence-review {
    background: rgba(255, 193, 7, 0.15);
}

.confidence-changed {
    background: rgba(23, 162, 184, 0.1);
}

.confidence-cancelled {
    opacity: 0.6;
    text-decoration: line-through;
}

.form-success {
    color: #28a745;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.form-row > .form-field,
.form-row > .form-field-action {
    margin-bottom: 0;
}

/* Keep controls aligned when one field shows a validation message */
.form-row > .form-field:has(input, select, textarea) {
    position: relative;
    padding-bottom: 1.35rem;
}

.form-row > .form-field .field-error {
    position: absolute;
    left: 0;
    bottom: 0;
    margin-top: 0;
}

.form-row > .form-field-action {
    padding-top: 1.5rem;
}

.form-field-grow {
    flex: 1;
    min-width: 200px;
}

.form-field-action {
    margin-bottom: 1rem;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    width: 100%;
    box-sizing: border-box;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    accent-color: var(--color-accent);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.job-completed {
    opacity: 0.6;
}

.job-cancelled {
    opacity: 0.5;
    text-decoration: line-through;
}

.job-attention {
    background: rgba(255, 193, 7, 0.15);
}

.priority-high {
    color: #ffc107;
    font-weight: 600;
}

.priority-urgent {
    color: #dc3545;
    font-weight: 700;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--color-surface);
    border-radius: 8px;
    padding: 1.5rem;
    min-width: 320px;
    max-width: 500px;
    border: 1px solid var(--color-border);
}

.modal h3 {
    margin-top: 0;
}

.modal h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.modal ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.modal ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.on-platform-checkout-hint {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-muted, #f8f9fa);
}

.stripe-payment-element,
.sync-payment-element {
    margin: 0.75rem 0;
}

.sync-history-table {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.sync-run-failed td {
    color: var(--color-danger, #b42318);
}

.sync-run-error-detail td {
    font-size: 0.875rem;
    padding-top: 0;
}

/* Cleaner Portal */
.cleaner-portal {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

.cleaner-portal > section + section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.cleaner-portal > section h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
}

.cleaner-settings-form .form-field.checkbox {
    margin-bottom: 0.75rem;
}

.cleaner-portal-error {
    text-align: center;
    padding-top: 3rem;
}

.cleaner-header {
    margin-bottom: 1.5rem;
}

.cleaner-header h1 {
    margin-bottom: 0.25rem;
}

.cleaner-empty {
    text-align: center;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: 8px;
}

.cleaner-jobs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cleaner-job-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
}

.cleaner-job-card.job-card-pending {
    border-left: 4px solid #ffc107;
}

.cleaner-job-card.job-card-accepted {
    border-left: 4px solid #28a745;
}

.cleaner-job-card.job-card-in-progress {
    border-left: 4px solid var(--color-accent);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.job-type {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--color-muted);
}

.cleaner-job-card h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
}

.job-location {
    margin: 0 0 0.75rem 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.job-details {
    margin-bottom: 1rem;
}

.job-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.job-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.magic-link-display {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(58, 165, 255, 0.1);
    border: 1px solid var(--color-accent);
    border-radius: 4px;
}

.magic-link-display label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.magic-link-display input {
    width: 100%;
    font-family: monospace;
    font-size: 0.85rem;
}

.magic-link-display .muted {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

/* Checklist Templates */
.template-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.template-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.template-card.template-default {
    border-color: var(--color-accent);
}

.template-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.template-name {
    font-weight: 600;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: 4px;
}

.badge-small {
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
}

.modal-wide {
    min-width: 400px;
    max-width: 600px;
}

.checklist-item-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.checklist-item-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.checklist-item-list .item-title {
    flex: 1;
}

textarea {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-bg);
    color: var(--color-text);
    font: inherit;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Cleaner Checklist */
.job-checklist {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.job-checklist h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.cleaner-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cleaner-checklist li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.cleaner-checklist li:last-child {
    border-bottom: none;
}

.cleaner-checklist label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.cleaner-checklist input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.cleaner-checklist .item-text {
    flex: 1;
}

.cleaner-checklist .item-description {
    margin: 0.25rem 0 0 1.5rem;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.cleaner-checklist .checklist-done .item-text {
    text-decoration: line-through;
    opacity: 0.7;
}

.checklist-progress {
    margin: 0.75rem 0 0 0;
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Photo Upload */
.badge-photo {
    background: #2563eb;
    color: white;
}

.checklist-photo-section {
    margin: 0.5rem 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.photo-count {
    font-size: 0.85rem;
    color: var(--color-muted);
}

.photo-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    background: var(--color-accent);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s;
}

.photo-upload-btn:hover {
    background: #0a8060;
}

/* Photo Modal & Gallery */
.photo-modal {
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #1c2534;
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.photo-item .photo-date {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    font-size: 0.75rem;
    color: #fff;
    text-align: center;
}

/* Host Photo Gallery */
.host-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.host-photo-item {
    border-radius: 8px;
    overflow: hidden;
    background: #1c2534;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.host-photo-item a {
    display: block;
}

.host-photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.host-photo-item:hover img {
    transform: scale(1.05);
}

.host-photo-item .photo-meta {
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--color-muted);
}

/* Issue Reporting */
.btn-warning {
    background: #f59e0b;
    color: #1a1a2e;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-warning:hover {
    background: #d97706;
}

.issue-modal {
    max-width: 480px;
}

.issue-modal .form-field {
    margin-bottom: 1rem;
}

.issue-modal label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.issue-modal select,
.issue-modal textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: #1c2534;
    color: #e8e8e8;
    font-size: 1rem;
}

.issue-modal textarea {
    resize: vertical;
    min-height: 100px;
}

/* Issue List Styles */
.issue-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.issue-item {
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
}

.issue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.issue-category {
    font-weight: 600;
}

.issue-severity {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.issue-severity.severity-low {
    background: #374151;
    color: #9ca3af;
}

.issue-severity.severity-medium {
    background: #1e3a5f;
    color: #60a5fa;
}

.issue-severity.severity-high {
    background: #7c2d12;
    color: #fb923c;
}

.issue-severity.severity-critical {
    background: #7f1d1d;
    color: #fca5a5;
}

.issue-description {
    margin: 0.5rem 0;
    color: var(--color-muted);
}

.issue-meta {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.issue-status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

.issue-status.status-open {
    background: #1e3a5f;
    color: #60a5fa;
}

.issue-status.status-in-progress {
    background: #365314;
    color: #a3e635;
}

.issue-status.status-resolved {
    background: #14532d;
    color: #86efac;
}

.issue-status.status-dismissed {
    background: #374151;
    color: #9ca3af;
}

.issue-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.issue-resolution {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(20, 83, 45, 0.3);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Property Readiness */
.property-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.property-item:last-child {
    border-bottom: none;
}

.property-info {
    flex: 1;
    min-width: 200px;
}

.readiness-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.readiness-ready {
    background: #14532d;
    color: #86efac;
}

.readiness-not-ready {
    background: #7f1d1d;
    color: #fca5a5;
}

.readiness-at-risk {
    background: #7c2d12;
    color: #fb923c;
}

.readiness-unknown {
    background: #374151;
    color: #9ca3af;
}

.readiness-factors {
    width: 100%;
    font-size: 0.8rem;
    color: var(--color-muted);
    padding-left: 0.5rem;
    border-left: 2px solid #4a5568;
}

.dashboard-readiness-meta {
    width: 100%;
    margin: 0;
    font-size: 0.85rem;
}

.dashboard-notifications {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.dashboard-notifications-table {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.dashboard-notification-preferences {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.notification-pref-list {
    list-style: none;
    margin: 0.75rem 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.notification-pref-list .form-field.checkbox {
    justify-content: flex-start;
}

.notification-preferences-form .form-field.checkbox {
    margin: 0;
}

.quiet-hours-fieldset {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.quiet-hours-fieldset legend {
    font-weight: 600;
    padding: 0 0.25rem;
}

.quiet-hours-times {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.dashboard-web-push {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-border);
}

.dashboard-web-push h4 {
    margin: 0 0 0.35rem;
}

@media (min-width: 640px) {
    .quiet-hours-times {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.dashboard-in-app-alerts {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.dashboard-in-app-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.dashboard-in-app-header h3 {
    margin: 0;
}

.in-app-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--color-accent, #2563eb);
    color: #fff;
}

.in-app-mark-all-form {
    margin: 0;
}

.in-app-alert-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.in-app-alert-item {
    display: grid;
    gap: 0.15rem;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.in-app-alert-unread {
    border-color: rgba(37, 99, 235, 0.45);
    background: rgba(37, 99, 235, 0.06);
}

.in-app-alert-open-form {
    margin: 0;
}

.in-app-alert-subject {
    font-weight: 600;
    text-align: left;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-link, #2563eb);
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

/* Property Detail Readiness Section */
.readiness-section {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.readiness-section.ready {
    background: rgba(20, 83, 45, 0.2);
    border: 1px solid #14532d;
}

.readiness-section.not-ready {
    background: rgba(127, 29, 29, 0.2);
    border: 1px solid #7f1d1d;
}

.readiness-section.at-risk {
    background: rgba(124, 45, 18, 0.2);
    border: 1px solid #7c2d12;
}

.readiness-section.unknown {
    background: rgba(55, 65, 81, 0.2);
    border: 1px solid #374151;
}

.readiness-section h3 {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.readiness-section .status-icon {
    font-size: 1.25rem;
}

.readiness-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.readiness-stat {
    display: flex;
    flex-direction: column;
}

.readiness-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.readiness-stat .stat-label {
    font-size: 0.8rem;
    color: var(--color-muted);
}

.blocking-factors {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.blocking-factors h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.blocking-factors ul {
    margin: 0;
    padding-left: 1.25rem;
}

.blocking-factors li {
    margin-bottom: 0.25rem;
}

/* Scrollable tables on narrow screens */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-scroll .data-table {
    margin-bottom: 0;
}

.assign-inline-form {
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.assign-inline-form select {
    min-width: 10rem;
    flex: 1 1 10rem;
}

/* Mobile / phone layouts */
@media (max-width: 639px) {
    .site-header__inner {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-end;
    }

    .site-nav__user {
        max-width: 8rem;
    }

    .site-main {
        padding: 1.25rem 1rem 2rem;
    }

    .modal-backdrop {
        padding: 1rem;
        align-items: center;
    }

    .modal,
    .modal-wide {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 2rem);
        overflow-y: auto;
    }

    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
        width: 100%;
    }

    .job-card-header {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .template-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .btn-small {
        min-height: 2.25rem;
        padding: 0.35rem 0.65rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn-lg {
        width: 100%;
        text-align: center;
    }
}

@supports (padding: env(safe-area-inset-top)) {
    .site-header {
        padding-top: env(safe-area-inset-top);
    }

    .site-header__inner,
    .site-main,
    .site-footer__inner,
    .site-footer__legal,
    .cleaner-portal {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Host property page — mobile-friendly tables as cards */
.property-page h1 {
    font-size: clamp(1.35rem, 5vw, 1.85rem);
    letter-spacing: -0.02em;
}

.property-page .breadcrumb {
    margin-bottom: 0.75rem;
}

@media (max-width: 639px) {
    .property-page .property-section {
        margin-bottom: 2rem;
        padding-bottom: 1.25rem;
        border-bottom: 1px solid var(--color-border);
    }

    .property-page .property-section:last-child {
        border-bottom: none;
    }

    .property-page .readiness-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .property-page .readiness-stat .stat-value {
        font-size: 1.25rem;
    }

    .property-page .readiness-section h3 {
        flex-wrap: wrap;
    }

    .property-responsive-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .property-responsive-table thead {
        display: none;
    }

    .property-responsive-table tbody tr:not(.sync-run-error-detail) {
        display: block;
        margin-bottom: 0.85rem;
        padding: 0.85rem;
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
    }

    .property-responsive-table tbody tr.sync-run-error-detail {
        display: block;
        margin: -0.35rem 0 0.85rem;
        padding: 0.65rem 0.85rem;
        border-radius: var(--radius);
        background: rgba(220, 38, 38, 0.08);
        border: 1px solid rgba(220, 38, 38, 0.2);
    }

    .property-responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.35rem 0;
        border: none;
        text-align: right;
    }

    .property-responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--color-muted);
        text-align: left;
        flex: 0 0 38%;
    }

    .property-responsive-table .sync-run-error-detail td {
        display: block;
        text-align: left;
    }

    .property-responsive-table .sync-run-error-detail td::before {
        content: none;
    }

    .property-row-actions {
        flex-direction: column;
        align-items: stretch !important;
        text-align: left !important;
    }

    .property-row-actions::before {
        margin-bottom: 0.15rem;
    }

    .property-row-actions form,
    .property-row-actions .btn-small,
    .property-row-actions a.btn-small {
        width: 100%;
        margin: 0.15rem 0 0;
    }

    .property-row-actions .assign-inline-form {
        width: 100%;
    }

    .property-row-actions .assign-inline-form select {
        width: 100%;
        min-width: 0;
    }

    .property-page .issue-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .property-page .issue-actions form,
    .property-page .issue-actions .btn-small {
        width: 100%;
    }

    .property-page .issue-resolve-form {
        display: block !important;
        width: 100%;
    }

    .property-page .template-actions {
        flex-wrap: wrap;
    }
}