:root {
    --ink: #1a1611;
    --muted: #655b4b;
    --paper: #f4efe6;
    --cream: #fffdfa;
    --sand: #ead8b5;
    --accent: #c7850a;
    --accent-deep: #9f6808;
    --forest: #2a241d;
    --line: rgba(26, 22, 17, 0.1);
    --shadow: 0 24px 80px rgba(26, 22, 17, 0.12);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(199, 133, 10, 0.16), transparent 32%),
        radial-gradient(circle at top right, rgba(26, 22, 17, 0.1), transparent 26%),
        linear-gradient(180deg, #fdf9f2 0%, #f4efe6 100%);
    color: var(--ink);
    font-family: 'Manrope', sans-serif;
}

body {
    overflow-x: hidden;
}

.app-loading-shell {
    width: min(1180px, calc(100vw - 32px));
    margin: 18px auto 48px;
    padding-bottom: 48px;
}

.app-loading-header {
    margin-bottom: 32px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 34px;
    background: rgba(255, 250, 243, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 48px rgba(26, 22, 17, 0.08);
}

.app-loading-header img {
    width: 320px;
    height: auto;
}

.app-loading-content {
    display: grid;
    gap: 18px;
    max-width: 820px;
}

.app-loading-content h1,
.app-loading-content h2 {
    font-family: 'Fraunces', serif;
}

* {
    box-sizing: border-box;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    width: min(1280px, calc(100vw - 32px));
    margin: 0 auto;
    padding-bottom: 64px;
}

h1, h2, h3 {
    margin: 0;
    font-family: 'Fraunces', serif;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

p {
    margin: 0;
    line-height: 1.7;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: min(1280px, calc(100vw - 32px));
    margin: 14px auto 22px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 34px;
    background: rgba(255, 250, 243, 0.9);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 48px rgba(26, 22, 17, 0.08);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    max-width: 272px;
    padding: 10px 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(199, 133, 10, 0.18);
    box-shadow: 0 10px 30px rgba(26, 22, 17, 0.06);
}

.brand-mark img {
    display: block;
    width: 100%;
    max-width: 244px;
    height: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.92rem;
    font-weight: 700;
    flex-shrink: 1;
    min-width: 0;
    flex: 1 1 auto;
}

.site-nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.site-socials {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding-left: 10px;
    margin-left: auto;
    border-left: 1px solid rgba(26, 22, 17, 0.08);
    flex-shrink: 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    color: #746957;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.social-link:hover {
    background: rgba(199, 133, 10, 0.08);
    color: var(--accent-deep);
    transform: translateY(-1px);
}

.site-nav a:not(.nav-cta) {
    color: #4f4639;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:not(.nav-cta):hover {
    background: rgba(199, 133, 10, 0.08);
    color: var(--ink);
    transform: translateY(-1px);
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
    box-shadow: 0 18px 40px rgba(199, 133, 10, 0.28);
}

.ghost-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.nav-cta {
    min-height: 44px;
    padding: 0 18px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-section,
.content-section,
.feature-band,
.not-found,
.admin-page {
    animation: rise 0.7s ease both;
}

.hero-section {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 32px;
    align-items: center;
    padding: 28px 0 24px;
}

.eyebrow {
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(3.2rem, 8vw, 6.4rem);
    text-wrap: balance;
}

.hero-lead,
.section-lead {
    margin-top: 18px;
    color: var(--ink);
    font-size: 1.2rem;
    font-weight: 700;
}

.hero-body {
    max-width: 62ch;
    margin-top: 16px;
    color: var(--muted);
    font-size: 1.06rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.hero-visual {
    position: relative;
}

.hero-visual img,
.story-visual img {
    width: 100%;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    object-fit: cover;
}

.hero-badge {
    position: absolute;
    right: 24px;
    bottom: 24px;
    max-width: 240px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(31, 25, 18, 0.88);
    color: white;
}

.hero-badge strong {
    display: block;
    line-height: 1.4;
}

.hero-badge span,
.service-accent {
    display: block;
    margin-bottom: 6px;
    color: var(--sand);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.trust-row,
.feature-band,
.check-grid,
.priority-guide,
.split-grid,
.location-cloud,
.admin-grid {
    display: grid;
    gap: 16px;
}

.trust-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
}

.trust-row div,
.feature-band > div,
.timeline article,
.testimonial-card,
.contact-card,
.coverage-card,
.admin-card,
.login-card,
.status-banner,
.request-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 252, 247, 0.84);
    box-shadow: var(--shadow);
}

.trust-row div,
.feature-band > div {
    padding: 22px;
}

.trust-row span,
.feature-band p,
.service-subtitle,
.request-meta {
    color: var(--muted);
}

.feature-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 20px 0 48px;
}

.content-section {
    margin-top: 56px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.section-heading h2,
.coverage-card h2,
.contact-copy h2,
.login-card h1,
.admin-header h1,
.not-found h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.section-heading p:last-child {
    color: var(--muted);
}

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

.service-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, #fffdf9 0%, #f7f0e3 100%);
    box-shadow: var(--shadow);
}

.service-card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

.service-card div {
    padding: 22px;
}

.story-section,
.contact-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: center;
}

.check-grid,
.priority-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
}

.check-grid div,
.priority-guide div {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(199, 133, 10, 0.1);
    font-weight: 600;
}

.check-grid div {
    color: var(--ink);
}

.priority-guide span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 500;
}

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

.timeline article {
    padding: 24px;
}

.timeline span,
.quote-mark {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--accent);
    font-family: 'Fraunces', serif;
    font-size: 2rem;
}

.coverage-card,
.contact-card,
.admin-card,
.login-card,
.not-found,
.status-banner,
.request-card {
    padding: 28px;
}

.location-cloud {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
}

.location-cloud span,
.priority-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(199, 133, 10, 0.12);
    color: #8b5a07;
    font-weight: 700;
}

.testimonial-card {
    padding: 24px;
}

.text-link {
    display: inline-flex;
    margin-top: 10px;
    color: var(--accent-deep);
    font-weight: 800;
}

.custom-section-actions {
    margin-top: 22px;
}

.text-input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid rgba(16, 33, 44, 0.12);
    border-radius: 16px;
    background: white;
    color: var(--ink);
    font: inherit;
}

select.text-input {
    appearance: none;
}

.text-area {
    min-height: 160px;
    padding-top: 16px;
    resize: vertical;
}

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

.split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 0;
}

.contact-card {
    display: grid;
    gap: 18px;
}

.contact-submit {
    margin-top: 6px;
}

.contact-submit,
.admin-login-button,
.small-button {
    width: 100%;
    margin-top: 8px;
}

.validation-summary,
.validation-message {
    color: #a71d2a;
}

.status-banner {
    margin-bottom: 18px;
    background: rgba(199, 133, 10, 0.12);
    color: #8b5a07;
    font-weight: 700;
}

.admin-page {
    padding-top: 24px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 18px;
}

.admin-sidebar-card,
.dashboard-card,
.user-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 252, 247, 0.84);
    box-shadow: var(--shadow);
}

.admin-sidebar-card {
    padding: 20px;
}

.admin-nav-button {
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    text-align: left;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.admin-nav-button.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    border-color: transparent;
    color: white;
}

.admin-main,
.admin-stage {
    min-width: 0;
}

.admin-stage {
    display: grid;
    gap: 20px;
}

.admin-header-panel {
    margin-bottom: 22px;
}

.dashboard-grid,
.admin-users-grid {
    display: grid;
    gap: 18px;
}

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

.dashboard-card,
.user-card {
    padding: 24px;
}

.dashboard-card h3 {
    margin-bottom: 12px;
    font-size: 1.6rem;
}

.dashboard-button {
    width: 100%;
    margin-top: 18px;
}

.mini-stat + .mini-stat {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.mini-stat strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
}

.mini-stat span {
    color: var(--muted);
}

.admin-users-grid {
    grid-template-columns: 0.95fr 1.05fr;
}

.admin-header,
.admin-block-head,
.request-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.admin-grid {
    grid-template-columns: 1.35fr 0.9fr;
    align-items: start;
}

.admin-block-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.admin-block-create-card {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.field-group {
    margin-bottom: 14px;
}

.compact-field {
    margin-bottom: 0;
}

.field-label {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 800;
}

.field-help {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.admin-block-head {
    margin-bottom: 14px;
}

.admin-block-head span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.request-card + .request-card {
    margin-top: 16px;
}

.user-card + .user-card {
    margin-top: 14px;
}

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

.timesheet-sidebar {
    display: grid;
    gap: 18px;
}

.timesheet-card {
    padding: 24px;
}

.compact-heading {
    margin-bottom: 14px;
}

.timesheet-employee {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.timesheet-employee strong,
.timesheet-entry-row strong,
.timesheet-toolbar h3 {
    display: block;
}

.timesheet-employee span {
    color: var(--muted);
    font-size: 0.9rem;
}

.timesheet-employee small {
    color: var(--accent-deep);
    font-weight: 800;
}

.timesheet-employee.is-selected {
    border-color: rgba(199, 133, 10, 0.45);
    background: rgba(199, 133, 10, 0.1);
}

.timesheet-main {
    display: grid;
    gap: 18px;
}

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

.email-template-sidebar,
.email-template-main {
    display: grid;
    gap: 18px;
}

.email-template-picker,
.email-custom-token-list {
    display: grid;
    gap: 14px;
}

.email-template-card {
    width: 100%;
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.email-template-card:hover,
.email-template-card.is-selected {
    transform: translateY(-1px);
    border-color: rgba(199, 133, 10, 0.42);
    background: rgba(199, 133, 10, 0.08);
}

.email-template-card span,
.email-template-card small,
.email-template-preview-meta p {
    color: var(--muted);
}

.email-template-body-input {
    min-height: 28rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92rem;
    line-height: 1.55;
}

.email-token-panel {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
}

.email-token-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.email-token-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(199, 133, 10, 0.08);
    color: var(--accent-deep);
    font-size: 0.84rem;
}

.email-template-actions {
    margin-top: 18px;
}

.email-template-preview-meta {
    margin-bottom: 16px;
}

.email-template-preview-meta strong {
    display: block;
    margin-bottom: 6px;
}

.email-template-preview-shell {
    min-height: 34rem;
}

.timesheet-toolbar,
.timesheet-entry-row,
.timesheet-entry-actions,
.timesheet-editor-actions,
.admin-modal-header {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    align-items: flex-start;
}

.timesheet-calendar-host {
    min-height: 720px;
    margin-top: 18px;
}

.timesheet-entry-row {
    padding: 18px 0;
    border-top: 1px solid var(--line);
}

.timesheet-entry-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.timesheet-entry-actions {
    align-items: center;
}

.timesheet-editor-actions {
    margin-top: 18px;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background: rgba(20, 17, 14, 0.24);
    backdrop-filter: blur(4px);
}

.admin-modal {
    width: min(760px, 100%);
    max-height: min(88vh, 920px);
    overflow: hidden;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #fffdf8;
    box-shadow: var(--shadow);
}

.admin-modal-large {
    width: min(820px, 100%);
}

.modal-close {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.request-filter-bar,
.request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.timesheet-week-actions {
    margin-top: 14px;
}

.request-filter-bar {
    margin-bottom: 18px;
}

.filter-chip,
.action-button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    border-color: transparent;
    color: white;
}

.user-pill-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
}

.status-pill.active {
    background: rgba(49, 122, 74, 0.12);
    color: #2c6f42;
}

.status-pill.inactive {
    background: rgba(120, 42, 42, 0.12);
    color: #8a2e2e;
}

.status-pill.warning {
    background: rgba(199, 133, 10, 0.14);
    color: #9f6808;
}

.status-pill.draft {
    background: rgba(61, 79, 99, 0.1);
    color: #42586f;
}

.user-actions {
    margin-top: 16px;
}

.destructive-button {
    color: #8a2e2e;
    border-color: rgba(138, 46, 46, 0.24);
    background: rgba(138, 46, 46, 0.06);
}

.reply-preview {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(199, 133, 10, 0.08);
}

.planning-preview {
    background: rgba(42, 36, 29, 0.06);
}

.reply-preview strong {
    display: block;
    margin-bottom: 6px;
}

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

.reply-textarea {
    min-height: 120px;
}

.plan-notify-field {
    margin-bottom: 0;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.invoice-admin-grid {
    grid-template-columns: 1.1fr 0.9fr;
}

.invoice-side-grid {
    display: grid;
    gap: 18px;
}

.invoice-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invoice-card {
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.invoice-error-text {
    color: #8a2e2e;
}

.builder-image-tools {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.builder-image-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    cursor: pointer;
}

.builder-image-input::file-selector-button {
    margin-right: 12px;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.builder-image-status {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.builder-image-preview {
    display: block;
    width: min(100%, 340px);
    aspect-ratio: 4 / 3;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.78);
}

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

.invoice-preview-frame {
    max-height: 860px;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
}

.invoice-template-area {
    min-height: 220px;
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace;
}

.invoice-lines-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin: 20px 0 14px;
}

.invoice-lines-header h4 {
    margin: 0;
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
}

.invoice-line-editor {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
}

.invoice-composer-form {
    display: grid;
    gap: 18px;
    max-height: calc(88vh - 150px);
    overflow-y: auto;
    padding-right: 6px;
}

.modal-form-scroll {
    display: grid;
    gap: 18px;
    max-height: calc(88vh - 150px);
    overflow-y: auto;
    padding-right: 6px;
}

.invoice-line-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.invoice-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 50px;
    font-weight: 700;
}

.invoice-line-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 12px 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.modal-actions-sticky {
    position: sticky;
    bottom: 0;
    padding-top: 14px;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0), #fffdf8 22%);
}

.admin-login {
    display: grid;
    place-items: center;
    min-height: 70vh;
}

.login-card {
    width: min(560px, 100%);
}

.not-found {
    max-width: 720px;
    margin: 72px auto;
    text-align: center;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

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

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .hero-section,
    .story-section,
    .contact-section,
    .admin-shell,
    .timesheet-layout,
    .email-template-layout,
    .dashboard-grid,
    .invoice-stat-grid,
    .admin-users-grid,
    .admin-grid,
    .invoice-admin-grid,
    .feature-band,
    .service-grid,
    .testimonial-grid,
    .timeline,
    .trust-row,
    .location-cloud,
    .check-grid,
    .priority-guide {
        grid-template-columns: 1fr;
    }

    .site-header {
        position: static;
        flex-direction: column;
        align-items: stretch;
        border-radius: 28px;
        gap: 14px;
    }

    .brand-mark {
        max-width: 296px;
        margin: 0 auto;
    }

    .site-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .site-nav-links {
        justify-content: center;
        gap: 10px 12px;
    }

    .site-socials {
        justify-content: center;
        align-self: center;
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }

    .admin-sidebar {
        position: static;
    }

    .nav-cta {
        min-width: 220px;
    }

    .hero-section {
        gap: 24px;
    }
}

@media (max-width: 640px) {
    main,
    .site-header {
        width: min(100vw - 20px, 1280px);
    }

    main {
        padding-bottom: 40px;
    }

    .site-header {
        margin: 10px auto 16px;
        padding: 14px;
        border-radius: 24px;
    }

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

    .hero-copy h1 {
        max-width: none;
        font-size: clamp(2.6rem, 13vw, 4.25rem);
    }

    .brand-mark {
        max-width: 220px;
    }

    .site-nav {
        font-size: 0.9rem;
        width: 100%;
    }

    .site-nav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .site-nav-links a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.62);
        border: 1px solid var(--line);
        text-align: center;
    }

    .nav-cta {
        width: 100%;
    }

    .site-socials {
        width: 100%;
        justify-content: center;
    }

    .hero-section {
        padding: 8px 0 8px;
        gap: 20px;
    }

    .hero-lead,
    .section-lead {
        margin-top: 12px;
        font-size: 1.05rem;
    }

    .hero-body {
        margin-top: 12px;
        font-size: 0.98rem;
    }

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

    .hero-actions .primary-button,
    .hero-actions .ghost-button {
        width: 100%;
    }

    .hero-badge {
        position: static;
        max-width: none;
        margin-top: 14px;
        border-radius: 18px;
    }

    .trust-row {
        margin-top: 18px;
    }

    .trust-row div,
    .feature-band > div,
    .timeline article,
    .testimonial-card,
    .coverage-card,
    .contact-card,
    .admin-card,
    .login-card,
    .status-banner,
    .request-card {
        padding: 20px;
    }

    .feature-band {
        margin: 12px 0 32px;
    }

    .content-section {
        margin-top: 36px;
    }

    .section-heading {
        margin-bottom: 18px;
    }

    .service-card div {
        padding: 18px;
    }

    .story-section,
    .contact-section {
        gap: 20px;
    }

    .check-grid,
    .priority-guide {
        margin-top: 16px;
    }

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

    .location-cloud span,
    .priority-pill {
        min-height: 40px;
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .text-input {
        min-height: 52px;
        padding: 0 16px;
    }

    .text-area {
        min-height: 140px;
        padding-top: 14px;
    }

    .section-heading h2,
    .coverage-card h2,
    .contact-copy h2,
    .login-card h1,
    .admin-header h1,
    .not-found h1 {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .admin-header,
    .admin-block-head,
    .request-head {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-nav-button {
        text-align: center;
    }

    .field-help {
        font-size: 0.84rem;
    }

    .request-filter-bar,
    .request-actions {
        flex-direction: column;
    }

    .timesheet-toolbar,
    .timesheet-entry-row,
    .timesheet-entry-actions,
    .timesheet-editor-actions,
    .admin-modal-header,
    .invoice-lines-header {
        flex-direction: column;
        align-items: stretch;
    }

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

    .filter-chip,
    .action-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    main,
    .site-header {
        width: calc(100vw - 16px);
    }

    .site-header {
        padding: 12px;
    }

    .brand-mark {
        max-width: 190px;
    }

    .site-nav {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .site-nav a:not(.nav-cta) {
        min-height: 40px;
    }

    .eyebrow {
        font-size: 0.72rem;
        letter-spacing: 0.14em;
    }

    .hero-copy h1 {
        font-size: clamp(2.2rem, 12vw, 3.2rem);
    }

    .hero-lead,
    .section-lead,
    .hero-body,
    .feature-band p,
    .service-subtitle,
    .request-meta {
        font-size: 0.95rem;
    }

    .location-cloud {
        grid-template-columns: 1fr;
    }
}
