:root {
    --bg: #f8f9fb;
    --surface: #ffffff;
    --surface-soft: #f5f7fa;
    --ink: #1a202c;
    --muted: #718096;
    --line: #e2e8f0;
    --brand: #0f766e;
    --brand-light: #14b8a6;
    --brand-dark: #115e59;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --warning: #f97316;
    --info: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow: 0 10px 25px rgba(0, 0, 0, .08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    font-size: 15px;
}

a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4, h5, h6, p { margin-top: 0; }
h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
h2 { font-size: 24px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }
p { margin-bottom: 12px; }

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--surface);
    color: var(--ink);
    outline: none;
    font-size: 15px;
    font-family: inherit;
    transition: all .2s ease;
}

input::placeholder, textarea::placeholder {
    color: var(--muted);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    background: #fafcfb;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .1);
}

input:disabled, textarea:disabled {
    background: var(--surface-soft);
    cursor: not-allowed;
    opacity: 0.65;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

label.required::after {
    content: " *";
    color: var(--danger);
}

.form-group {
    margin-bottom: 20px;
}

.help-text {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
    display: block;
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 118, 110, .15);
    transition: all .2s ease;
}

button:hover, .btn:hover { 
    background: var(--brand-dark);
    box-shadow: 0 4px 12px rgba(15, 118, 110, .25);
    transform: translateY(-1px);
}

button:active, .btn:active {
    transform: translateY(0);
}

button:disabled, .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.btn.ghost { 
    background: transparent;
    color: var(--brand);
    box-shadow: none;
    border: 1px solid var(--line);
}

.btn.ghost:hover { 
    background: var(--surface-soft);
    border-color: var(--brand);
}

.btn.secondary {
    background: var(--muted);
    box-shadow: 0 2px 8px rgba(113, 128, 150, .15);
}

.btn.secondary:hover {
    background: #596775;
}

.btn-small {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 13px;
}

.btn-large {
    min-height: 48px;
    padding: 14px 24px;
    font-size: 16px;
}

.flash {
    position: fixed;
    right: 20px;
    top: 16px;
    z-index: 10;
    border-radius: 8px;
    background: #13231f;
    color: #fff;
    padding: 12px 16px;
    box-shadow: var(--shadow);
}

.flash-success { background: var(--success); }
.flash-error { background: var(--danger); }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 950; }
.bi { line-height: 1; }
.brand-mark .bi { font-size: 18px; }

.public {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(244, 246, 241, .88), rgba(244, 246, 241, .98)),
        url("https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?auto=format&fit=crop&w=1900&q=82") center/cover fixed;
}

.public.narrow { max-width: 1120px; margin: auto; padding: 0; }
.public-nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 5vw; }
.public-nav strong, .public-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 930; }
.public-nav span { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.public-nav a:not(.btn) { color: #394641; font-weight: 760; }

.hero {
    min-height: calc(100vh - 132px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    padding: 5vw;
}

.hero-copy { max-width: 760px; }
.hero-copy h1 { margin-bottom: 18px; font-size: clamp(58px, 10vw, 116px); line-height: .92; }
.hero-copy p:not(.eyebrow) { max-width: 680px; color: #34423d; font-size: clamp(18px, 2vw, 24px); line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.hero-panel {
    border: 1px solid rgba(255, 255, 255, .70);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hero-panel-head span { color: var(--muted); font-weight: 800; }
.hero-panel-head strong { font-size: 30px; }
.mini-bars, .chart { height: 180px; display: flex; align-items: end; gap: 12px; }
.mini-bars span, .chart span { flex: 1; min-width: 22px; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--brand), var(--accent)); }
.invoice-preview { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 14px; }
.invoice-preview p { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; color: var(--muted); }
.invoice-preview p:last-child { margin-bottom: 0; color: var(--ink); font-weight: 850; }
.invoice-preview span { color: var(--brand); font-weight: 850; }
.invoice-preview.muted span { color: var(--danger); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 0 5vw 48px;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
    margin-top: 18px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-title .bi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--brand);
    font-size: 18px;
}

.guide-steps,
.guide-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.guide-steps li,
.guide-list li {
    position: relative;
    padding-left: 24px;
}

.guide-steps li::before,
.guide-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--brand);
}

.feature-grid article, .panel, .stats-grid article, .auth-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(31, 42, 38, .07);
}

.feature-grid article { padding: 24px; }
.feature-kicker { color: var(--accent); font-weight: 950; }
.feature-grid p { color: var(--muted); line-height: 1.55; }

.section-band,
.split-section,
.workflow-section,
.cta-section,
.page-hero,
.legal-content,
.public-footer {
    margin: 0 5vw 48px;
}

.section-band,
.workflow-section,
.page-hero,
.legal-content,
.cta-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 34px rgba(31, 42, 38, .07);
}

.section-band,
.workflow-section,
.page-hero,
.legal-content {
    padding: clamp(24px, 4vw, 44px);
}

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

.section-heading h2,
.split-section h2,
.workflow-section h2,
.cta-section h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.05;
    margin-bottom: 14px;
}

.section-heading p:not(.eyebrow),
.split-section p,
.cta-section p,
.page-hero p {
    color: var(--muted);
    line-height: 1.65;
    font-size: 17px;
}

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

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

.capability-grid article {
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 20px;
}

.capability-grid h2 {
    margin: 8px 0 12px;
}

.capability-grid ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.45;
}

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

.service-grid article {
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 18px;
}

.service-grid strong {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
}

.service-grid p,
.workflow-list span {
    color: var(--muted);
    line-height: 1.55;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    align-items: center;
    gap: 24px;
    padding: clamp(26px, 5vw, 54px);
    border-radius: 8px;
    background: #13231f;
    color: #fff;
}

.split-section .eyebrow,
.split-section p {
    color: #c9d9d2;
}

.about-metrics {
    display: grid;
    gap: 12px;
}

.about-metrics article {
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    padding: 18px;
}

.about-metrics strong {
    display: block;
    font-size: 34px;
    color: #fff;
}

.about-metrics span {
    color: #c9d9d2;
}

.workflow-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.workflow-list li {
    position: relative;
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
}

.workflow-list li::before {
    content: counter(list-item, decimal-leading-zero);
    display: inline-flex;
    margin-bottom: 22px;
    color: var(--accent);
    font-weight: 950;
}

.workflow-list strong,
.workflow-list span {
    display: block;
}

.workflow-list strong {
    margin-bottom: 8px;
}

.cta-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(26px, 5vw, 46px);
    background: linear-gradient(135deg, #fff, #f2f7ef);
}

.cta-section h2 {
    max-width: 720px;
}

.cta-section p {
    max-width: 680px;
    margin-bottom: 0;
}

.page-hero {
    margin-top: 26px;
    padding-top: clamp(34px, 6vw, 74px);
    padding-bottom: clamp(34px, 6vw, 74px);
}

.page-hero p {
    max-width: 760px;
}

.unified-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    align-items: center;
    gap: clamp(22px, 4vw, 54px);
    margin-top: 0;
}

.unified-hero h1 {
    max-width: 840px;
}

.page-hero-card {
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 22px;
}

.page-hero-card strong {
    display: block;
    margin: 8px 0 10px;
    font-size: 28px;
    line-height: 1.1;
}

.page-hero-card p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.page-grid {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

.legal-content {
    display: grid;
    gap: 18px;
}

.legal-content .section-heading {
    margin-bottom: 8px;
}

.legal-content article {
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 18px;
}

.legal-content article:last-child {
    padding-bottom: 18px;
}

.legal-content p {
    color: var(--muted);
    line-height: 1.65;
}

.public-footer {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(140px, .6fr));
    gap: 24px;
    border-top: 1px solid var(--line);
    padding: 34px 0;
    color: var(--muted);
}

.public-footer p {
    max-width: 440px;
    margin: 14px 0 0;
    line-height: 1.6;
}

.public-footer nav {
    display: grid;
    align-content: start;
    gap: 10px;
}

.public-footer strong {
    color: var(--ink);
}

.public-footer a {
    color: var(--muted);
    font-weight: 720;
}

.public-footer a:hover {
    color: var(--brand);
}

.public-footer small {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: 18px;
}

.auth-card {
    width: min(480px, calc(100vw - 32px));
    margin: 8vh auto;
    padding: 30px;
}

.app-shell { display: grid; grid-template-columns: 276px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #13231f;
    color: #fff;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 19px; font-weight: 930; margin-bottom: 28px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border-radius: 8px;
    color: #d8e7e0;
    padding: 9px 11px;
    font-weight: 760;
}
.sidebar nav a i {
    display: inline-grid;
    place-items: center;
    width: 22px;
    color: #b8cbc3;
    font-size: 16px;
}
.sidebar nav a span { color: #82958e; font-size: 11px; font-weight: 900; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar nav a:hover i { color: #fff; }
.sidebar-card { margin-top: auto; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; background: rgba(255, 255, 255, .06); padding: 14px; }
.sidebar-card strong, .sidebar-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-card small { margin-top: 5px; color: #aabbb4; }

.workspace { min-width: 0; padding: 28px; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}
.topbar h1 { margin: 2px 0 0; }
.account { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 800; }
.top-search input {
    width: min(260px, 22vw);
    min-height: 40px;
    background: #fff;
}
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.stats-grid article { padding: 20px; }
.stat-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #edf5f1;
    color: var(--brand);
    font-size: 18px;
    margin-bottom: 14px;
}
.stat-alert .stat-icon {
    background: var(--danger-soft);
    color: var(--danger);
}
.stats-grid article span, .stats-grid article small { display: block; color: var(--muted); font-weight: 820; }
.stats-grid article strong { display: block; margin: 8px 0 6px; font-size: clamp(24px, 3vw, 34px); letter-spacing: 0; }
.stat-alert { border-color: #fac9bf !important; background: #fff8f6 !important; }

.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.panel { padding: 20px; min-width: 0; }
.panel-wide { grid-column: 1 / -1; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-title h2 { margin: 0; }
.panel-title a { font-weight: 850; }

.table-wrap { overflow-x: auto; overflow-y: visible; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid #edf1ec; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
tbody tr:hover { background: var(--surface-soft); }
tbody tr:has(.row-menu .dropdown-menu.show) { position: relative; z-index: 25; }

.badge { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; background: #eaf4ef; color: var(--brand-dark); padding: 4px 9px; font-size: 12px; font-weight: 900; }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.empty { color: var(--muted); text-align: center; padding: 24px; }
.list-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; border-bottom: 1px solid #edf1ec; padding: 12px 0; margin: 0; }
.list-line strong { white-space: nowrap; }

.tabs {
    display: inline-flex;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px;
    background: var(--surface-soft);
}

.tabs a {
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--muted);
    font-weight: 850;
}

.tabs a.active {
    background: var(--surface);
    color: var(--brand-dark);
    box-shadow: var(--shadow-sm);
}

.planning-list {
    display: grid;
    gap: 12px;
}

.planning-calendar-panel {
    overflow: hidden;
}

.planning-calendar-head {
    align-items: flex-start;
}

.planning-status-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.planning-status-strip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.planning-status-strip i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.calendar-scroll {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: 74px repeat(var(--day-count), minmax(158px, 1fr));
    grid-template-rows: 68px auto;
    min-width: min(100%, calc(74px + (var(--day-count) * 158px)));
}

.calendar-scroll.is-month .calendar-grid {
    grid-template-columns: 74px repeat(var(--day-count), minmax(162px, 162px));
}

.calendar-corner,
.calendar-day-head {
    position: sticky;
    top: 0;
    z-index: 8;
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
}

.calendar-corner {
    left: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.calendar-day-head {
    display: grid;
    align-content: center;
    gap: 1px;
    border-left: 1px solid var(--line);
    padding: 8px 10px;
}

.calendar-day-head span,
.calendar-day-head small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.calendar-day-head strong {
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
}

.calendar-day-head.is-today {
    background: #ecfdf5;
    box-shadow: inset 0 -3px 0 var(--brand);
}

.calendar-day-head.is-today strong {
    color: var(--brand-dark);
}

.calendar-hours {
    position: sticky;
    left: 0;
    z-index: 7;
    grid-column: 1;
    grid-row: 2;
    background: #fff;
}

.calendar-hour {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    height: 72px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    padding-top: 8px;
    font-size: 11px;
    font-weight: 850;
}

.calendar-day-column {
    position: relative;
    display: grid;
    grid-template-rows: repeat(var(--hour-count), 72px);
    grid-row: 2;
    min-height: calc(var(--hour-count) * 72px);
    border-left: 1px solid var(--line);
    background: #fff;
}

.calendar-day-column.is-today {
    background: linear-gradient(180deg, rgba(15, 118, 110, .08), rgba(15, 118, 110, .02));
}

.calendar-slot {
    border-bottom: 1px solid #eef2f7;
    background:
        linear-gradient(180deg, transparent 49%, rgba(226, 232, 240, .45) 50%, transparent 51%);
}

.calendar-event {
    position: absolute;
    top: var(--event-top);
    left: 7px;
    right: 7px;
    min-height: 42px;
    height: max(42px, var(--event-height));
    border: 1px solid #dbe4ef;
    border: 1px solid color-mix(in srgb, var(--event-color) 55%, #ffffff);
    border-left: 5px solid var(--event-color);
    border-radius: 8px;
    background: #ffffff;
    background: color-mix(in srgb, var(--event-color) 13%, #ffffff);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
    overflow: hidden;
}

.calendar-event.status-cancelled {
    opacity: .62;
}

.calendar-event-main {
    display: grid;
    gap: 1px;
    height: 100%;
    width: 100%;
    min-height: 0;
    border: 0;
    background: transparent;
    color: #0f172a;
    padding: 7px 34px 7px 9px;
    text-align: left;
    box-shadow: none;
}

.calendar-event-main:hover {
    background: transparent;
    color: #0f172a;
    transform: none;
}

.calendar-event-main strong,
.calendar-event-main span,
.calendar-event-main small,
.calendar-event-main em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-main strong {
    font-size: 12px;
    font-weight: 900;
}

.calendar-event-main span {
    color: #334155;
    font-size: 11px;
    font-weight: 850;
}

.calendar-event-main small,
.calendar-event-main em {
    color: #64748b;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 750;
}

.calendar-event-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    gap: 3px;
}

.calendar-event-actions form {
    margin: 0;
}

.calendar-event-actions button {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    min-height: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, .78);
    color: #334155;
    padding: 0;
    box-shadow: none;
    font-size: 12px;
}

.calendar-event-actions button:hover {
    background: #fff;
    color: var(--brand-dark);
    transform: none;
}

.planning-modal .modal-content {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.planning-modal .modal-header,
.planning-modal .modal-footer {
    border-color: var(--line);
}

.planning-modal .modal-footer {
    gap: 8px;
}

.planning-modal .modal-footer form {
    margin: 0;
}

.planning-modal-form {
    margin: 0;
}

.planning-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.planning-modal-grid label,
.planning-modal-grid .form-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.planning-modal-grid input,
.planning-modal-grid select,
.planning-modal-grid textarea {
    width: 100%;
}

.planning-modal-span {
    grid-column: 1 / -1;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.event-detail-grid div,
.event-detail-block {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 12px;
}

.event-detail-grid span,
.event-detail-block span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.event-detail-grid strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 3px;
    color: var(--ink);
    font-size: 13px;
}

.event-detail-block {
    margin-top: 12px;
}

.event-detail-block p {
    margin: 6px 0 0;
    color: var(--ink);
}

.event-color-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 999px;
}

.planning-dropzones {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.planning-dropzones button {
    min-height: 40px;
    border: 1px dashed var(--line);
    background: var(--surface-soft);
    color: var(--muted);
    box-shadow: none;
}

.planning-dropzones button.is-over {
    border-color: var(--brand);
    background: #eaf4ef;
    color: var(--brand-dark);
}

.planning-event {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    border: 1px solid var(--line);
    border-left: 6px solid var(--event-color);
    border-radius: 8px;
    background: var(--surface);
    padding: 14px;
}

.planning-event[draggable="true"] {
    cursor: grab;
}

.planning-event.is-dragging {
    opacity: .55;
}

.planning-event h3 {
    margin-bottom: 4px;
}

.planning-event-time strong,
.planning-event-time span {
    display: block;
}

.planning-event-time span {
    color: var(--muted);
    font-weight: 750;
}

.planning-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.planning-actions form {
    display: flex;
    flex: 1;
    align-items: center;
    margin: 0;
    gap: 10px;
    flex-wrap: wrap;
}

.team-invite-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px repeat(3, minmax(130px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.team-invite-form label {
    margin: 0;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr)) auto;
    gap: 8px;
    align-items: end;
    min-width: 520px;
}

.permission-grid label {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.permission-grid select {
    min-height: 34px;
    margin: 2px 0 0;
    padding: 6px 8px;
    font-size: 12px;
}

.btn-small.danger {
    background: var(--danger-soft);
    color: var(--danger);
    box-shadow: none;
}

.btn-small.ghost {
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--line);
    box-shadow: none;
}
.form-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(31, 42, 38, .06);
}

.form-panel form > div { margin-bottom: 16px; }

.smart-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    align-items: start;
}

.smart-form > div {
    margin-bottom: 0 !important;
    background: rgba(15, 118, 110, .03);
    border: 1px solid rgba(15, 118, 110, .08);
    border-radius: 14px;
    padding: 18px;
}

.smart-form > div:has(label) {
    padding: 18px 18px 12px;
}

.smart-form > div:has(textarea),
.smart-form > div:has(input[type="file"]),
.smart-form > div:has([type="hidden"]),
.smart-form > .actions,
.smart-form > fieldset {
    grid-column: 1 / -1;
    background: transparent;
    border: 0;
    padding: 0;
}

.smart-form textarea {
    min-height: 110px;
}

.smart-form .actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(226, 232, 240, .8);
}
.rowline { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1ec; padding: 12px 0; }
.inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inline-actions a { display: inline-flex; align-items: center; gap: 5px; font-weight: 850; }
.inline-actions form { margin: 0; }
.inline-actions button, td button { min-height: 32px; padding: 6px 9px; font-size: 12px; box-shadow: none; }

.table-actions {
    width: 1%;
    min-width: 64px;
    text-align: right;
    vertical-align: top;
    overflow: visible;
}

.row-menu {
    position: relative;
    display: inline-block;
    text-align: left;
    z-index: 4;
}

.row-menu.show,
.row-menu:has(.dropdown-menu.show) { z-index: 30; }

.row-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    box-shadow: none;
}

.row-menu-toggle::after { display: none; }
.row-menu-toggle:hover { border-color: var(--brand); color: var(--brand-dark); }

.row-menu-list {
    z-index: 40;
    min-width: 180px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    box-shadow: var(--shadow);
}

.dropdown-menu.row-menu-list { display: none; }
.dropdown-menu.row-menu-list.show { display: grid; }

.row-menu-list a,
.row-menu-list button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    padding: 7px 9px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: none;
    text-align: left;
}

.row-menu-list a:hover,
.row-menu-list button:hover {
    background: var(--surface-soft);
    color: var(--brand-dark);
    transform: none;
    box-shadow: none;
}

.row-menu-list form { margin: 0; }

.account-menu {
    position: relative;
}

.account-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #334155;
    padding: 5px 10px 5px 6px;
    cursor: pointer;
    box-shadow: none;
}

.account-menu-toggle::after { margin-left: 2px; }
.account-menu-toggle:hover { border-color: var(--brand); color: var(--brand-dark); }

.account-avatar {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.account-name {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-list {
    z-index: 20;
    min-width: 210px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    box-shadow: var(--shadow);
}

.dropdown-menu.account-menu-list { display: none; }
.dropdown-menu.account-menu-list.show { display: grid; }

.account-menu-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    border-radius: 6px;
    color: #334155;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 800;
}

.account-menu-list a:hover {
    background: var(--surface-soft);
    color: var(--brand-dark);
}

.wizard-shell {
    display: grid;
    gap: 18px;
    max-width: 980px;
}

.wizard-body {
    display: grid;
    gap: 18px;
}

.wizard-sidebar {
    display: grid;
    gap: 16px;
}

.wizard-sidebar .mini-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(31, 42, 38, .05);
}

.wizard-sidebar h3,
.settings-aside h3 {
    margin-bottom: 12px;
    font-size: 16px;
}

.wizard-sidebar ol,
.wizard-sidebar ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.wizard-sidebar li {
    margin-bottom: 10px;
}

.wizard-sidebar .sidebar-note {
    margin-top: 18px;
    padding: 14px;
    background: var(--surface-soft);
    border-radius: 10px;
    color: var(--muted);
}

.wizard-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: clamp(22px, 4vw, 34px);
    box-shadow: 0 12px 34px rgba(31, 42, 38, .07);
}

.wizard-card h2 {
    margin-bottom: 22px;
    font-size: clamp(24px, 4vw, 36px);
}

.settings-shell {
    display: grid;
    gap: 22px;
    max-width: 1120px;
    width: 100%;
}

.settings-panel {
    display: grid;
    gap: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 26px;
    box-shadow: 0 18px 46px rgba(31, 42, 38, .06);
}

.settings-panel .panel-head {
    display: grid;
    gap: 10px;
}

.settings-panel .panel-head h2 {
    margin: 0;
}

.settings-aside {
    display: grid;
    gap: 18px;
    min-width: 280px;
}

.info-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 22px;
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.info-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.settings-shell .actions {
    justify-content: flex-start;
}

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

.wizard-steps span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    padding: 10px 12px;
    font-weight: 820;
}

.wizard-steps strong {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #edf5f1;
    color: var(--brand-dark);
}

.wizard-steps .active {
    border-color: rgba(29, 111, 95, .35);
    background: #edf5f1;
    color: var(--brand-dark);
}

.wizard-steps .done strong {
    background: var(--brand);
    color: #fff;
}

.wizard-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: clamp(22px, 4vw, 34px);
    box-shadow: 0 12px 34px rgba(31, 42, 38, .07);
}

.wizard-card h2 {
    margin-bottom: 22px;
    font-size: clamp(24px, 4vw, 36px);
}

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

.summary-grid article {
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 16px;
}

.summary-grid span,
.summary-grid small {
    display: block;
    color: var(--muted);
    font-weight: 760;
}

.summary-grid strong {
    display: block;
    margin: 8px 0 5px;
    overflow-wrap: anywhere;
}

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

.wizard-lines-list {
    display: grid;
    gap: 8px;
}

.wizard-lines-list a {
    display: block;
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 12px;
}

.wizard-lines-list a.active {
    border-color: rgba(29, 111, 95, .35);
    background: #edf5f1;
}

.wizard-lines-list strong,
.wizard-lines-list span {
    display: block;
}

.wizard-lines-list span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

.wizard-line-form {
    min-width: 0;
}

.remove-line-form {
    margin-top: 12px;
}

.document-editor {
    display: grid;
    gap: 18px;
}

.document-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.document-toolbar h2 {
    margin: 2px 0 0;
    font-size: clamp(24px, 3vw, 34px);
}

.document-toolbar-actions,
.line-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.document-paper {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(31, 42, 38, .10);
    padding: clamp(20px, 3vw, 34px);
}

.editor-mode-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.editor-mode-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid #dce8e2;
    border-radius: 999px;
    background: #f5faf7;
    color: var(--brand-dark);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 900;
}

.document-editor.is-flipped .document-paper {
    background: #fbfcfa;
    box-shadow: inset 0 0 0 1px #e6eee9, 0 10px 28px rgba(31, 42, 38, .06);
}

.document-editor.is-flipped .document-meta-card,
.document-editor.is-flipped .totals-card {
    background: #f2f7f4;
    color: var(--ink);
}

.document-editor.is-flipped .totals-card span {
    color: var(--muted);
}

.document-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #e9eee8;
    padding-bottom: 22px;
    margin-bottom: 22px;
}

.document-brand-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.document-brand-block strong,
.document-brand-block small {
    display: block;
}

.document-brand-block small {
    color: var(--muted);
    margin-top: 4px;
}

.document-meta-card {
    min-width: 220px;
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 16px;
    text-align: right;
}

.document-meta-card span,
.document-meta-card small {
    display: block;
    color: var(--muted);
    font-weight: 820;
}

.document-meta-card strong {
    display: block;
    margin: 6px 0;
    font-size: 22px;
}

.document-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.document-field label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.line-editor {
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: #f8faf7;
    overflow: hidden;
}

.line-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #e8eee7;
    background: #fff;
    padding: 18px;
}

.line-editor-head h3 {
    margin: 2px 0 0;
    font-size: 20px;
}

.price-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.price-mode select {
    min-height: 40px;
    min-width: 86px;
    background: #fff;
}

.line-table {
    overflow-x: auto;
}

.line-table-header,
.line-row {
    display: grid;
    grid-template-columns: minmax(190px, 1.25fr) minmax(180px, 1.05fr) 88px 98px 120px 112px 96px 120px 38px;
    gap: 8px;
    align-items: stretch;
    min-width: 1120px;
}

.line-table-header {
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    padding: 12px 14px;
    text-transform: uppercase;
}

.line-list {
    display: grid;
    gap: 8px;
    padding: 0 14px 14px;
}

.line-row {
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 8px 22px rgba(31, 42, 38, .06);
}

.line-cell input,
.line-cell textarea,
.line-cell select {
    min-height: 42px;
    border-color: #edf1ec;
    background: #fffdf0;
    font-size: 13px;
}

.line-cell textarea {
    resize: vertical;
}

.line-total {
    display: grid;
    place-items: center end;
    min-height: 42px;
    border-radius: 8px;
    background: #eef3f0;
    color: var(--ink);
    padding: 0 10px;
    font-weight: 900;
}

.line-remove {
    min-height: 42px;
    width: 34px;
    border-radius: 8px;
    background: #fff1ee;
    color: var(--danger);
    box-shadow: none;
    font-size: 22px;
    line-height: 1;
}

.line-remove:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.document-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
    margin-top: 22px;
}

.document-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.wide-field {
    grid-column: 1 / -1;
}

.totals-card {
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: #13231f;
    color: #fff;
    padding: 18px;
}

.totals-card p {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.totals-card span {
    color: #c9d9d2;
}

.totals-card .grand-total {
    border-bottom: 0;
    margin-top: 8px;
    font-size: 20px;
}

.document-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.email-composer {
    display: grid;
    gap: 18px;
    max-width: 820px;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.search-panel {
    display: grid;
    gap: 12px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

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

.result-list {
    display: grid;
    gap: 8px;
}

.result-row {
    display: grid;
    gap: 4px;
    border: 1px solid #e8eee7;
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 12px;
}

.result-row span,
.muted {
    color: var(--muted);
}

.export-hero h2 {
    margin-bottom: 8px;
    font-size: clamp(26px, 4vw, 42px);
}

.export-hero p {
    color: var(--muted);
    margin-bottom: 0;
}

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

.export-card {
    display: flex;
    min-height: 210px;
    flex-direction: column;
    justify-content: space-between;
}

.export-card p {
    color: var(--muted);
    line-height: 1.55;
}

@media (min-width: 980px) {
    .wizard-body {
        grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
        align-items: start;
    }

    .settings-shell {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
        align-items: start;
    }
}

@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; padding-top: 26px; }
    .unified-hero { grid-template-columns: 1fr; }
    .hero-panel { max-width: 560px; }
    .feature-grid, .stats-grid, .service-grid, .capability-grid, .workflow-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split-section, .public-footer { grid-template-columns: 1fr; }
    .cta-section { align-items: flex-start; flex-direction: column; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar-card { margin-top: 18px; }
    .panel-grid { grid-template-columns: 1fr; }
    .wizard-steps, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wizard-lines-layout { grid-template-columns: 1fr; }
    .document-head, .line-editor-head { align-items: flex-start; flex-direction: column; }
    .document-grid, .document-bottom, .document-options { grid-template-columns: 1fr; }
    .document-meta-card { width: 100%; text-align: left; }
    .export-grid, .search-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .public-nav { align-items: flex-start; flex-direction: column; padding: 18px; }
    .hero { min-height: auto; padding: 24px 18px 34px; }
    .hero-copy h1 { font-size: 58px; }
    .feature-grid, .stats-grid, .service-grid, .capability-grid, .workflow-list { grid-template-columns: 1fr; padding-left: 18px; padding-right: 18px; }
    .section-band, .split-section, .workflow-section, .cta-section, .page-hero, .legal-content, .public-footer { margin-left: 18px; margin-right: 18px; }
    .service-grid, .workflow-list { padding-left: 0; padding-right: 0; }
    .workspace { padding: 18px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .account { width: 100%; justify-content: space-between; flex-wrap: wrap; }
    .top-search, .top-search input { width: 100%; }
    .account-menu { width: 100%; margin-left: 0; }
    .account-menu-toggle { width: 100%; justify-content: space-between; }
    .account-menu-list { left: 0; right: 0; }
    .sidebar nav { grid-template-columns: 1fr; }
    .list-line { grid-template-columns: 1fr; }
    .wizard-steps, .summary-grid { grid-template-columns: 1fr; }
    .document-toolbar { grid-template-columns: 1fr; }
    .document-actions { justify-content: stretch; flex-direction: column; }
    .document-toolbar-actions, .line-editor-actions, .price-mode { align-items: stretch; flex-direction: column; width: 100%; }
    .search-form { grid-template-columns: 1fr; }
    .document-actions .btn, .document-toolbar .btn, .line-editor-actions .btn { width: 100%; }
    .export-grid, .search-results { grid-template-columns: 1fr; }
    .planning-modal-grid,
    .event-detail-grid { grid-template-columns: 1fr; }
}

/* Bootstrap professional theme */
:root {
    --bs-body-bg: #f6f8fb;
    --bs-body-color: #1f2937;
    --bs-font-sans-serif: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ink: #1f2937;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --accent: #2563eb;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

body {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 13px;
    line-height: 1.45;
}

h1 { font-size: clamp(22px, 2.5vw, 30px); font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin-bottom: .75rem; }

input,
select,
textarea,
.form-control,
.form-select {
    min-height: 36px;
    border-color: var(--line);
    border-radius: .375rem;
    padding: .45rem .65rem;
    font-size: 13px;
}

textarea {
    min-height: 80px;
}

label,
.document-field label,
.stack-form label {
    margin-bottom: .4rem;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

button,
.btn {
    min-height: 36px;
    border-radius: .375rem;
    padding: .45rem .75rem;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
}

button:hover,
.btn:hover {
    background: var(--brand-dark);
    color: #fff;
}

.btn.ghost {
    border: 1px solid var(--line);
    background: #fff;
    color: #334155;
}

.btn.ghost:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
}

.form-panel .actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.form-panel .actions .btn {
    min-width: 140px;
}

.eyebrow {
    margin-bottom: .25rem;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.brand-mark {
    width: 30px;
    height: 30px;
    border-radius: .5rem;
    background: var(--brand);
}

.app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
    border-right: 1px solid #1e293b;
    background: #0f172a;
    padding: 18px 14px;
}

.brand {
    margin-bottom: 18px;
    padding: 0 8px;
    font-size: 16px;
}

.sidebar nav {
    gap: 2px;
}

.sidebar nav a {
    min-height: 36px;
    border-radius: .375rem;
    color: #cbd5e1;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 650;
}

.sidebar nav a i {
    width: 18px;
    color: #94a3b8;
    font-size: 14px;
}

.sidebar nav a span {
    width: 20px;
    color: #64748b;
    font-size: 10px;
}

.sidebar nav a:hover {
    background: #1e293b;
}

.sidebar-card {
    border-color: #334155;
    border-radius: .5rem;
    background: #111827;
    padding: 12px;
}

.workspace {
    padding: 22px;
}

.topbar {
    min-height: 58px;
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: #fff;
    padding: 14px 16px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.topbar h1 {
    margin: 0;
}

.account {
    gap: 10px;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
}

.account-menu-toggle {
    min-height: 34px;
    border-radius: .5rem;
}

.top-search input {
    width: 220px;
    min-height: 34px;
    border-radius: 999px;
    padding-left: 14px;
}

.actions {
    gap: 8px;
    margin-bottom: 14px;
}

.panel,
.feature-grid article,
.stats-grid article,
.auth-card,
.wizard-card,
.summary-grid article,
.line-editor,
.document-paper,
.page-hero,
.section-band,
.workflow-section,
.legal-content,
.cta-section,
.result-row,
.export-card {
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: #fff;
    box-shadow: var(--shadow);
}

.panel {
    padding: 16px;
}

.panel-grid,
.stats-grid,
.export-grid,
.search-results {
    gap: 14px;
}

.stats-grid article {
    padding: 16px;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: .5rem;
    font-size: 15px;
    margin-bottom: 10px;
}

.stats-grid article strong {
    margin: 6px 0 4px;
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 750;
}

.stats-grid article span,
.stats-grid article small {
    font-size: 12px;
}

table {
    font-size: 12.5px;
}

th,
td {
    padding: 10px 11px;
    border-color: var(--line);
}

th {
    color: #64748b;
    font-size: 10.5px;
    letter-spacing: .04em;
}

tbody tr:hover {
    background: #f8fafc;
}

.badge {
    min-height: 22px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 750;
}

.badge.danger {
    background: #fef2f2;
    color: var(--danger);
}

.inline-actions {
    gap: 8px;
}

.inline-actions a,
.inline-actions button,
td button {
    min-height: 28px;
    padding: 4px 8px;
    border-radius: .375rem;
    font-size: 11.5px;
}

.inline-actions a {
    color: #0f766e;
}

.document-toolbar {
    gap: 12px;
}

.document-toolbar h2 {
    font-size: 22px;
}

.document-paper {
    padding: 22px;
}

.editor-mode-strip span {
    min-height: 24px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    padding: 3px 9px;
    font-size: 11px;
}

.document-head {
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.document-meta-card {
    border-radius: .625rem;
    background: #f8fafc;
    padding: 14px;
}

.document-meta-card strong {
    font-size: 18px;
}

.document-grid {
    gap: 12px;
    margin-bottom: 18px;
}

.line-editor-head {
    padding: 14px;
}

.line-editor-head h3 {
    font-size: 16px;
}

.line-table-header,
.line-row {
    grid-template-columns: minmax(180px, 1.25fr) minmax(170px, 1fr) 78px 90px 110px 100px 86px 112px 34px;
    min-width: 1040px;
}

.line-table-header {
    padding: 10px 12px;
    font-size: 10px;
}

.line-list {
    gap: 6px;
    padding: 0 12px 12px;
}

.line-row {
    border-left-color: var(--brand);
    border-radius: .5rem;
    padding: 8px;
    box-shadow: none;
}

.line-cell input,
.line-cell textarea,
.line-cell select {
    min-height: 34px;
    background: #fff;
    font-size: 12px;
}

.line-total,
.line-remove {
    min-height: 34px;
    border-radius: .375rem;
}

.line-total {
    font-size: 12px;
}

.document-bottom {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    margin-top: 18px;
}

.totals-card {
    border-radius: .75rem;
    background: #0f172a;
    padding: 14px;
    font-size: 12px;
}

.totals-card p {
    padding: 8px 0;
}

.totals-card .grand-total {
    font-size: 16px;
}

.wizard-steps span,
.wizard-lines-list a,
.result-row,
.page-hero-card,
.capability-grid article,
.service-grid article,
.workflow-list li,
.legal-content article {
    border-radius: .625rem;
    box-shadow: none;
}

.wizard-steps span {
    min-height: 48px;
    padding: 9px 10px;
    font-size: 12px;
}

.wizard-card h2,
.export-hero h2,
.section-heading h2,
.split-section h2,
.workflow-section h2,
.cta-section h2,
.page-hero h1 {
    font-size: clamp(22px, 3vw, 34px);
}

.public {
    background:
        linear-gradient(180deg, rgba(246, 248, 251, .96), rgba(246, 248, 251, .99)),
        url("https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?auto=format&fit=crop&w=1900&q=82") center/cover fixed;
}

.public-nav {
    min-height: 66px;
    padding: 0 4vw;
}

.public-nav a:not(.btn) {
    color: #475569;
    font-size: 13px;
}

.hero {
    min-height: calc(100vh - 110px);
    gap: clamp(24px, 4vw, 48px);
    padding: 4vw;
}

.hero-copy h1 {
    font-size: clamp(42px, 7vw, 74px);
    line-height: .98;
}

.hero-copy p:not(.eyebrow),
.section-heading p:not(.eyebrow),
.split-section p,
.cta-section p,
.page-hero p {
    font-size: 14px;
    line-height: 1.6;
}

.hero-panel,
.invoice-preview,
.feature-grid article,
.section-band,
.workflow-section,
.page-hero,
.legal-content,
.cta-section {
    border-radius: .75rem;
}

.hero-panel-head strong {
    font-size: 24px;
}

.mini-bars,
.chart {
    height: 130px;
}

.feature-grid,
.service-grid,
.capability-grid,
.workflow-list {
    gap: 14px;
}

.feature-grid article,
.service-grid article,
.capability-grid article {
    padding: 16px;
}

.feature-grid p,
.service-grid p,
.capability-grid ul,
.workflow-list span,
.legal-content p,
.export-card p {
    font-size: 13px;
}

.public-footer {
    margin-bottom: 22px;
    padding: 24px 0;
    font-size: 13px;
}

.invoice-filters {
    margin-bottom: 14px;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(170px, 1.2fr) 150px 160px 140px 140px auto;
    gap: 10px;
    align-items: end;
}

.filter-grid label {
    margin: 0;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.push-toggle.is-active {
    border-color: rgba(15, 118, 110, .35);
    background: #ecfdf5;
    color: #047857;
}

.billing-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 6px;
}

.usage-grid article {
    border: 1px solid var(--line);
    border-radius: .625rem;
    background: #f8fafc;
    padding: 12px;
}

.usage-grid span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.usage-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.billing-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
}

.billing-alert > i {
    color: var(--danger);
    font-size: 20px;
}

.trial-callout,
.trial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.trial-callout h2 {
    margin: 0 0 6px;
}

.trial-banner {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #b8dccb;
    border-radius: 8px;
    background: #f1fbf6;
}

.trial-banner.is-urgent {
    border-color: #fac9bf;
    background: #fff8f6;
}

.trial-banner div {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trial-banner span {
    color: var(--muted);
    font-weight: 800;
}

.trial-conversion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    border-color: #b8dccb;
    background: #f1fbf6;
}

.trial-conversion h2 {
    margin: 0 0 6px;
}

.trial-conversion-urgent {
    border-color: #fac9bf;
    background: #fff8f6;
}

.trial-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.trial-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 4px 10px;
    color: var(--muted);
    font-weight: 750;
}

.trial-metrics strong {
    color: var(--ink);
}

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

.chart-labelled {
    align-items: end;
    padding-bottom: 24px;
}

.chart-labelled span {
    position: relative;
}

.chart-labelled em {
    position: absolute;
    right: 0;
    bottom: -22px;
    left: 0;
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    text-align: center;
}

.onboarding-panel {
    margin-bottom: 18px;
}

.onboarding-panel .panel-title form {
    margin: 0;
}

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

.onboarding-checklist a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px 12px;
    color: var(--ink);
    font-weight: 760;
}

.onboarding-checklist a.is-done {
    border-color: #b8dccb;
    background: #f1fbf6;
    color: var(--brand-dark);
}

.onboarding-checklist i {
    color: var(--brand);
}

.public-document {
    min-height: 100vh;
    padding: clamp(18px, 4vw, 48px);
    background: var(--bg);
}

.public-document-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 980px;
    margin: 0 auto 18px;
}

.public-document-head h1 {
    margin: 0 0 6px;
}

.public-document-card {
    max-width: 980px;
    margin: 0 auto;
}

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

.pricing-card {
    display: flex;
    min-height: 360px;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-card.is-current {
    border-color: rgba(15, 118, 110, .35);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, .08);
}

.pricing-card .price {
    display: block;
    margin: 10px 0;
    font-size: 24px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pricing-card ul {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.pricing-card li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.public-pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.public-pricing-card {
    display: flex;
    min-height: 430px;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 28px;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 8px;
    background: #fff;
}

.public-pricing-card.is-featured {
    border-color: rgba(15, 118, 110, .35);
    box-shadow: 0 16px 42px rgba(15, 118, 110, .12);
}

.public-pricing-card h2 {
    margin: 0;
    font-size: 34px;
}

.public-pricing-card p {
    margin: 0;
    color: #46544f;
}

.public-pricing-card ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-pricing-card li {
    display: flex;
    gap: 8px;
}

.public-pricing-card li::before {
    content: "✓";
    color: #0f766e;
    font-weight: 900;
}

.pricing-highlight strong {
    font-size: 32px;
}

.sidebar-upgrade {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #0f766e;
    font-weight: 850;
}

.inline-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.inline-form select {
    min-width: 110px;
}

.faq-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.faq-list article {
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: #fff;
    padding: 16px;
}

.faq-list h3 {
    margin-bottom: 8px;
}

/* Enhanced Flash/Alert Messages */
.flash {
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 1000;
    min-width: 300px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

.flash::before {
    content: "ℹ";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.flash-success {
    background: var(--success);
}

.flash-success::before {
    content: "✓";
}

.flash-error {
    background: var(--danger);
}

.flash-error::before {
    content: "✕";
}

.flash-warning {
    background: var(--warning);
}

.flash-warning::before {
    content: "⚠";
}

.flash-info {
    background: var(--info);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash.hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Form Validation */
.form-error {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-error::before {
    content: "⚠";
    font-weight: bold;
}

input.error,
textarea.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.02);
}

/* Authentication Forms */
.auth-card {
    width: min(500px, calc(100vw - 32px));
    margin: 6vh auto 2vh;
    padding: 40px 32px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.auth-card h1 {
    margin-bottom: 8px;
    font-size: 32px;
}

.auth-card .auth-subtitle {
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-bottom: 24px;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-form label {
    margin-bottom: 8px;
}

.auth-form input {
    min-height: 44px;
}

.auth-actions {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-actions button {
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    border-top: 1px solid var(--line);
    padding-top: 20px;
}

.auth-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.auth-footer a {
    font-weight: 600;
    color: var(--brand);
}

.auth-footer a:hover {
    color: var(--brand-dark);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.auth-links a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-links a:hover {
    background: var(--surface);
    border-color: var(--brand);
}

.row-menu-list a,
.row-menu-list button,
td .row-menu-list button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #334155;
    padding: 7px 9px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: none;
    text-align: left;
}

.row-menu-list a:hover,
.row-menu-list button:hover,
td .row-menu-list button:hover {
    background: var(--surface-soft);
    color: var(--brand-dark);
    transform: none;
    box-shadow: none;
}

@media (max-width: 980px) {
    .account-menu { margin-left: auto; }
}

/* Info Box */
.info-box {
    padding: 16px 20px;
    border-radius: 8px;
    background: #e3f2fd;
    border-left: 4px solid var(--info);
    color: #1565c0;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.info-box strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.success-box {
    padding: 16px 20px;
    border-radius: 8px;
    background: #f0fdf4;
    border-left: 4px solid var(--success);
    color: #166534;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.error-box {
    padding: 16px 20px;
    border-radius: 8px;
    background: #fef2f2;
    border-left: 4px solid var(--danger);
    color: #991b1b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.error-box p { margin: 0 0 6px; }
.error-box p:last-child { margin-bottom: 0; }

.invitation-card { max-width: 560px; }

.invitation-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 18px 0 20px;
}

.invitation-steps span {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 850;
    text-align: center;
}

.invitation-steps .is-active {
    border-color: var(--brand);
    background: #ecfdf5;
    color: var(--brand-dark);
}

.invitation-steps .is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--line);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 980px) {
    .pricing-grid, .public-pricing-grid { grid-template-columns: 1fr; }
    .onboarding-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .billing-summary { align-items: flex-start; flex-direction: column; }
    .trial-callout,
    .trial-banner,
    .trial-conversion { align-items: flex-start; flex-direction: column; }
    .usage-grid { grid-template-columns: 1fr; width: 100%; }
    .faq-list { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; }
    .workspace { padding: 16px; }
    .filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .planning-event {
        grid-template-columns: 1fr;
    }
    .planning-dropzones {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .planning-actions {
        justify-content: flex-start;
    }
    .team-invite-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body { font-size: 12.5px; }
    .hero-copy h1 { font-size: 38px; }
    .topbar { padding: 12px; }
    .document-paper { padding: 14px; }
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .onboarding-checklist {
        grid-template-columns: 1fr;
    }
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .smart-form {
        grid-template-columns: 1fr;
    }
    .smart-form .actions {
        flex-direction: column;
    }
}
