/*
 * Canvemo layout: page-level structure shared by every module.
 * Requires canvemo-theme.css (tokens).
 */

/* ------------------------------------------------------------------ */
/* App shell (/home)                                                  */
/* ------------------------------------------------------------------ */
.app-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-main {
    flex: 1;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background-color: var(--cv-white);
    border-radius: var(--cv-radius);
}

/* In a header the logo badge is as tall as the controls (.header-btn), so the row reads as one line */
.navbar .brand-badge {
    height: 2.25rem;
    padding: 0 0.625rem;
}

.brand-badge img {
    height: 25px;
    width: auto;
}

.app-user {
    align-items: center;
    gap: 0.625rem;
    color: var(--cv-white);
    line-height: 1.25;
}

.app-user-org {
    font-size: 0.8125rem;
    opacity: 0.75;
}

/* Module navigation rail */
.app-rail {
    flex: 0 0 auto;
}

.app-rail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    top: 5.5rem;
}

.nav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 88px;
    padding: 0.75rem 0.5rem 0.5rem;
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-sm);
    color: var(--cv-text-muted);
    text-align: center;
    transition: box-shadow var(--cv-transition), transform var(--cv-transition),
                border-color var(--cv-transition), color var(--cv-transition);
}

.nav-tile:hover {
    color: var(--cv-navy);
    border-color: var(--cv-border-strong);
    box-shadow: var(--cv-shadow);
    transform: translateY(-1px);
}

.nav-tile.is-active {
    color: var(--cv-primary-text);
    border-color: var(--cv-primary-border-subtle);
    background-color: var(--cv-primary-subtle);
    box-shadow: var(--cv-shadow-sm);
}

.nav-tile-icon {
    height: 40px;
    width: auto;
}

.nav-tile-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.1;
}

@media (max-width: 767.98px) {
    .app-rail {
        width: 100%;
    }

    .app-rail-list {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .nav-tile {
        flex: 0 0 auto;
        width: 76px;
    }

    .nav-tile-icon {
        height: 32px;
    }

}

/* Home before a module opens: a welcome and the modules as cards (design: App & settings > Home) */
.home-welcome {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-welcome-hero {
    padding: 2rem;
    border-radius: var(--cv-radius-lg);
    background-color: var(--cv-navy);
    color: var(--cv-white);
    box-shadow: var(--cv-shadow);
}

[data-bs-theme="dark"] .home-welcome-hero {
    background-color: #1C273B;
    border: 1px solid var(--cv-border);
}

.home-welcome-title {
    margin: 0 0 0.375rem;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--cv-white);
}

.home-welcome-text {
    margin: 0;
    color: #E2E7EE;
}

.home-modules {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.home-module {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 1.375rem;
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-sm);
    color: var(--cv-text);
    text-decoration: none;
    transition: border-color var(--cv-transition), box-shadow var(--cv-transition);
}

.home-module:hover,
.home-module:focus-visible {
    border-color: var(--cv-primary-border-subtle);
    box-shadow: var(--cv-shadow);
    color: var(--cv-text);
}

.home-module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--cv-radius-lg);
    background-color: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    font-size: 1.125rem;
}

.home-module-name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--cv-heading);
}

.home-module-text {
    color: var(--cv-text-muted);
}

/* One row: copyright left, legal links right; they stack on a phone (design: App & settings > Home) */
.app-footer {
    font-size: 0.8125rem;
}

.app-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}

.app-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
}

.app-footer-links a {
    color: var(--cv-text-muted);
}

.app-footer-links a:hover {
    color: var(--cv-primary-active);
}

/* Signed-in page width (design): fluid up to 1440px with 24px gutters (16px on phones), instead of
   Bootstrap's stepped .container widths, which left empty margins at in-between window sizes */
.container.app-container {
    max-width: 1440px;
    padding-inline: 1.5rem;
}

@media (max-width: 575.98px) {
    .container.app-container {
        padding-inline: 1rem;
    }
}

/* ------------------------------------------------------------------ */
/* Page chrome inside #content                                        */
/* ------------------------------------------------------------------ */

/* Section navigation (module toolbars): a segmented control, the current section filled green
   (design: Shared parts > HR menu). Labels hide below lg, icons stay. */
.section-nav {
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-sm);
}

.section-nav > .btn,
.section-nav > .btn-group > .btn {
    --bs-btn-color: var(--cv-heading);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--cv-heading);
    --bs-btn-hover-bg: var(--cv-surface-sunken);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--cv-heading);
    --bs-btn-active-bg: var(--cv-surface-sunken);
    --bs-btn-active-border-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 7px !important;
    margin-left: 0 !important;
    flex: 0 0 auto; /* not stretched when the toolbar wraps (phones set flex again below) */
}

/* Text-only tabs (design: Settings, CRM, Product, Finance, HR); the icons stand in for the labels on phones.
   A lock (HR's Payroll without the plan) stays: it says something the label doesn't */
@media (min-width: 576px) {
    .section-nav-text .btn > .fa-solid:not(.hr-nav-lock) {
        display: none;
    }
}

/* A table whose last column holds the row actions keeps that column in view when the table scrolls
   sideways, so the buttons can always be reached (not on phones, where .table-stack turns rows into cards).
   The pinned cell is a stacking context: keep a row's modals outside the table, or they open under their backdrop */
@media (min-width: 768px) {
    .table-sticky-actions > :not(caption) > tr > :last-child {
        position: sticky;
        right: 0;
        z-index: 1;
        background-color: var(--cv-surface);
    }

    .table-sticky-actions > thead > tr > :last-child {
        background-color: var(--cv-surface-muted);
    }
}

.section-nav .btn.active,
.section-nav .btn[aria-current="page"] {
    background-color: var(--cv-primary-btn);
    border-color: var(--cv-primary-btn);
    color: var(--cv-white);
}

/* A page header with a section toolbar wraps when both do not fit, putting the toolbar on its own line
   (rather than squeezing the title and the button labels onto two lines each) */
#content > .d-flex:has(> .btn-toolbar) {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

#content > .d-flex:has(> .btn-toolbar) h2 {
    white-space: nowrap;
}

/* Phones: the page panel gives its width to the content */
@media (max-width: 575.98px) {
    #content.p-4 {
        padding: 1rem !important;
    }

    #content > .d-flex:has(> .btn-toolbar) > .btn-toolbar,
    #content > .d-flex:has(> .btn-toolbar) .section-nav {
        width: 100%;
    }

    #content > .d-flex:has(> .btn-toolbar) .section-nav > .btn {
        flex: 1 1 0;
        justify-content: center;
    }
}

/* A page without the white panel: the title and toolbar sit on the page background (design: Settings) */
.page-title {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--cv-heading);
}

/* Settings: the chosen section in one card; HR pages (.page-panel) put their page in the same card */
.settings-panel,
.page-panel {
    margin-top: 1.25rem;
    padding: 1.5rem;
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-sm);
}

/* A section made of several cards (.panel-stack, e.g. Billing) puts its cards straight on the page */
.settings-panel:has(> .panel-stack) {
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

.panel-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.panel-card {
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-sm);
}

.panel-body {
    padding: 1.25rem;
}

/* A section with its own card header (.panel-head) runs its table to the card edges */
.settings-panel:has(> .panel-head),
.panel-card:has(> .panel-head) {
    padding: 0;
    overflow: hidden;
}

.settings-panel:has(> .panel-head) > .alert,
.panel-card > .alert {
    margin: 1rem 1.25rem 0;
}

.settings-panel:has(> .panel-head) .table,
.panel-card .table {
    margin-bottom: 0;
}

.settings-panel:has(> .panel-head) .table > :not(caption) > * > *,
.panel-card .table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
}

/* Summary figures above a section's cards (Billing: next charge, plan, unpaid) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.125rem 1.25rem;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--cv-text-muted);
}

.stat-value {
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--cv-heading);
    font-variant-numeric: tabular-nums;
}

.stat-value.is-good { color: var(--cv-success-text); }
.stat-value.is-bad { color: var(--cv-danger-text); }

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.stat-note {
    font-size: 0.8125rem;
    color: var(--cv-text-muted);
}

.panel-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid var(--cv-border);
}

.panel-head h2 {
    font-size: 1.125rem;
    margin: 0;
}

.panel-search {
    flex: 0 1 17.5rem;
}

.panel-foot {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--cv-border);
}

@media (max-width: 575.98px) {
    .settings-panel,
    .page-panel {
        padding: 1rem;
    }

    .panel-body {
        padding: 1rem;
    }

    .panel-search {
        flex-basis: 100%;
    }
}

/* Empty / placeholder states */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--cv-text-muted);
}

.empty-state-icon {
    display: block;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: var(--cv-text-subtle);
}

.empty-state-icon.icon-lg {
    font-size: 3rem;
}

/* ------------------------------------------------------------------ */
/* Auth pages (IAM: login, register, verify, reset, organization)     */
/* ------------------------------------------------------------------ */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(var(--cv-primary-rgb), 0.10), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(var(--cv-navy-rgb), 0.08), transparent 60%),
        var(--cv-bg);
}

.auth-card {
    border: 1px solid var(--cv-border);
    box-shadow: var(--cv-shadow-lg);
}

.auth-logo {
    height: 60px;
    width: auto;
}

/* t035: the sign-in page after deleting one's own account */
.closure-done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    font-size: 1.25rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--cv-text-muted);
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--cv-border);
}

/* Google sign-in button (follows Google's branding guidelines); t183: Microsoft's has the same light shape */
.btn-google,
.btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: var(--cv-white);
    border: 1px solid #DADCE0;
    border-radius: var(--cv-radius);
    color: #1F1F1F;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: background-color var(--cv-transition), box-shadow var(--cv-transition);
}

.btn-google:hover,
.btn-microsoft:hover {
    background-color: #F8F9FA;
    color: #1F1F1F;
    box-shadow: var(--cv-shadow-sm);
}

.btn-google-icon {
    display: block;
    height: 22px;
    width: 22px;
}

/* One-time code input */
.code-input {
    letter-spacing: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
}

/* ------------------------------------------------------------------ */
/* t183 Two-step verification: sign-in challenge, set-up, recovery    */
/* codes, Settings > Profile > Sign-in and security, Organization     */
/* ------------------------------------------------------------------ */
.totp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    font-size: 1.5rem;
}

.recovery-code-input {
    font-family: var(--bs-font-monospace);
    font-weight: 600;
    letter-spacing: 0.12em;
}

.totp-progress-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--cv-text-muted);
}

.totp-progress-step.active,
.totp-progress-step.done {
    color: var(--cv-text);
}

.totp-step-number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    border: 2px solid var(--cv-border-strong);
    font-size: 0.75rem;
    font-weight: 700;
}

.totp-progress-step.active .totp-step-number,
.totp-progress-step.done .totp-step-number {
    border-color: var(--cv-primary-btn);
    background: var(--cv-primary-btn);
    color: var(--cv-white);
}

.totp-steps .totp-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0;
}

.totp-steps .totp-step + .totp-step {
    border-top: 1px solid var(--cv-border);
}

.totp-qr-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
}

.totp-qr-frame {
    padding: 0.75rem;
    background: var(--cv-white);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
}

.totp-qr-frame figcaption {
    color: var(--cv-neutral-text);
}

/* Dark modules on white in both themes: what phone cameras read */
.totp-qr {
    display: block;
    width: 184px;
    height: 184px;
}

.totp-qr .qr-light {
    fill: var(--cv-white);
}

.totp-qr .qr-dark {
    fill: var(--cv-navy);
}

.totp-manual {
    flex: 1 1 14rem;
    min-width: 0;
}

.totp-manual summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.totp-secret {
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: var(--cv-text);
    background: var(--cv-surface-sunken);
    border-radius: var(--cv-radius-sm);
    padding: 0.25rem 0.5rem;
    word-break: break-all;
}

.totp-setup-code {
    max-width: 16rem;
}

.recovery-code-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem 1.25rem;
    margin: 0;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    background: var(--cv-surface-sunken);
    border: 1px dashed var(--cv-border-strong);
    border-radius: var(--cv-radius-lg);
    font-family: var(--bs-font-monospace);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.recovery-code::marker {
    color: var(--cv-text-muted);
    font-weight: 400;
}

.security-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
}

.security-row-main {
    flex: 1 1 18rem;
    min-width: 0;
}

.two-factor-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
    gap: 0.625rem;
}

.two-factor-level {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    min-height: 44px;
    padding: 0.875rem;
    border: 1px solid var(--cv-border-strong);
    border-radius: var(--cv-radius-lg);
    background: var(--cv-surface);
    cursor: pointer;
}

.two-factor-level:has(input:checked) {
    border-color: var(--cv-primary);
    background: var(--cv-primary-subtle);
    box-shadow: inset 0 0 0 1px var(--cv-primary);
}

.two-factor-level .form-check-input {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

/* Print: only the recovery codes (canvemo-iam.js recovery-codes) */
@media print {
    body.print-recovery-codes * {
        visibility: hidden;
    }

    body.print-recovery-codes .recovery-codes.print-target,
    body.print-recovery-codes .recovery-codes.print-target * {
        visibility: visible;
    }

    body.print-recovery-codes .recovery-codes.print-target {
        position: absolute;
        inset: 0 auto auto 0;
        width: 100%;
    }

    body.print-recovery-codes .recovery-codes.print-target button {
        display: none;
    }
}

/* ------------------------------------------------------------------ */
/* Wizards (registration, new hire onboarding link, HR new employee)  */
/* A two-pane card: the steps on a navy side panel, the step beside.  */
/* Markup: canvemo-web-commons templates/canvemo/wizard.html          */
/* ------------------------------------------------------------------ */
.wizard-shell {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-lg);
    overflow: hidden;
}

.wizard-aside {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2.5rem 2rem;
    background-color: var(--cv-navy);
    color: var(--cv-white);
}

.wizard-brand {
    text-align: center;
}

.wizard-brand .brand-badge {
    margin-bottom: 1.25rem;
    padding: 0.375rem 0.75rem;
}

.wizard-brand .brand-badge img {
    height: 32px;
}

.wizard-tagline {
    margin: 0;
    font-size: 1.1875rem;
    font-weight: 500;
    line-height: 1.45;
}

.wizard-subtagline {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    opacity: 0.75;
}

.wizard-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wizard-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding-bottom: 1.75rem;
}

.wizard-step:last-child {
    padding-bottom: 0;
}

/* The line down to the next step */
.wizard-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(1rem - 1px);
    top: 2.375rem;
    bottom: 0.375rem;
    width: 2px;
    border-radius: 1px;
    background-color: rgba(255, 255, 255, 0.35);
}

.wizard-step.is-done:not(:last-child)::after {
    background-color: var(--cv-primary);
}

.wizard-step-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
}

.wizard-step.is-current .wizard-step-marker {
    border-color: var(--cv-primary);
    background-color: var(--cv-primary);
    box-shadow: 0 0 0 4px rgba(var(--cv-primary-rgb), 0.3);
}

.wizard-step.is-done .wizard-step-marker {
    border-color: var(--cv-white);
    background-color: var(--cv-white);
    color: var(--cv-primary-hover);
}

.wizard-step-body {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding-top: 0.25rem;
}

.wizard-step-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

.wizard-step:not(.is-current):not(.is-done) .wizard-step-title {
    opacity: 0.8;
}

.wizard-step-text {
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.85;
}

.wizard-aside-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.875rem;
}

.wizard-aside-footer a,
.wizard-aside-footer .link-button {
    color: var(--cv-white);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.wizard-aside-footer a:hover,
.wizard-aside-footer .link-button:hover {
    color: var(--cv-primary-border-subtle);
}

.wizard-main {
    min-width: 0;
    padding: 2.5rem 3rem;
}

.wizard-title {
    margin-bottom: 1.5rem;
    font-size: 1.625rem;
    font-weight: 500;
}

.wizard-main .form-label {
    font-weight: 500;
}

/* The form keeps a readable width; wide steps (two columns) drop it */
.wizard-form {
    max-width: 36rem;
}

/* End of a wizard or a wait: icon, centred title, then what happens next */
.wizard-result {
    max-width: 36rem;
    margin: 0 auto;
}

.wizard-result-head {
    margin-bottom: 1.5rem;
    text-align: center;
}

.wizard-result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background-color: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    font-size: 1.375rem;
}

.wizard-result-head .wizard-title {
    margin-bottom: 0.75rem;
    font-size: 1.875rem;
}

.wizard-result-lead {
    margin: 0;
    font-size: 1.125rem;
    color: var(--cv-text-muted);
}

.wizard-next {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: wizard-next;
}

.wizard-next > li {
    position: relative;
    padding: 0 0 1.25rem 2.75rem;
    counter-increment: wizard-next;
}

.wizard-next > li:last-child {
    padding-bottom: 0;
}

.wizard-next > li::before {
    content: counter(wizard-next);
    position: absolute;
    left: 0;
    top: -0.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 50%;
    background-color: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    font-weight: 600;
}

.wizard-next-title {
    display: block;
    font-weight: 500;
    color: var(--cv-heading);
}

@media (max-width: 991.98px) {
    .wizard-main {
        padding: 2rem;
    }
}

/* Phones: the side panel becomes a band on top, the steps a row of markers */
@media (max-width: 767.98px) {
    .wizard-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .wizard-aside {
        gap: 1.25rem;
        padding: 1.5rem 1rem;
    }

    .wizard-brand .brand-badge {
        margin-bottom: 0.75rem;
    }

    .wizard-tagline {
        font-size: 1rem;
    }

    .wizard-steps {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    .wizard-step {
        align-items: center;
        gap: 0.5rem;
        padding-bottom: 0;
    }

    .wizard-step:not(:last-child)::after,
    .wizard-step-text {
        display: none;
    }

    .wizard-step-body {
        padding-top: 0;
    }

    /* Only the current step is named; the others stay readable to screen readers */
    .wizard-step:not(.is-current) .wizard-step-body {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .wizard-main {
        padding: 1.5rem 1rem;
    }
}

/* ------------------------------------------------------------------ */
/* Error pages (all modules + gateway)                                */
/* Markup uses Bootstrap utilities too, so the page still lays out if */
/* this stylesheet cannot be loaded (e.g. the UI service is down).    */
/* ------------------------------------------------------------------ */
.error-page {
    background-color: var(--cv-bg);
}

.error-container {
    width: 100%;
    max-width: 560px;
}

.error-logo {
    height: 36px;
    width: auto;
    margin-bottom: 2rem;
}

/* One large brand-green code for every error (design: Errors) */
.error-code {
    font-size: clamp(5.5rem, 16vw, 9rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--cv-primary);
}

/* ------------------------------------------------------------------ */
/* Legal documents (terms, DPA, privacy policy)                       */
/* ------------------------------------------------------------------ */
.legal-body {
    line-height: 1.65;
    padding: 2.5rem 1.25rem;
}

.legal-doc {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem;
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow);
}

.legal-brand {
    display: inline-block;
}

.legal-brand img {
    height: 32px;
    width: auto;
}

.legal-doc h1 {
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--cv-border);
}

.legal-doc h2 {
    margin-top: 2rem;
    font-size: 1.3rem;
    color: var(--cv-primary-active);
}

.legal-doc h3 {
    font-size: 1.1rem;
}

.legal-doc ul {
    padding-left: 1.25rem;
}

.legal-doc li {
    margin-bottom: 0.625rem;
}

.legal-doc hr {
    border: 0;
    border-top: 1px solid var(--cv-border);
    margin: 1.25rem 0;
    opacity: 1;
}

.legal-updated {
    font-style: italic;
    color: var(--cv-text-muted);
}

.legal-callout {
    margin: 1.25rem 0;
    padding: 1rem;
    background-color: #FFF8E1;
    border-left: 4px solid var(--cv-warning);
    border-radius: var(--cv-radius-sm);
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .legal-body {
        padding: 1rem;
    }

    .legal-doc {
        padding: 1.25rem;
    }
}

/* ------------------------------------------------------------------ */
/* Landing page                                                       */
/* ------------------------------------------------------------------ */
.hero-section {
    padding: 6rem 0;
    background:
        radial-gradient(900px 400px at 50% 0%, rgba(var(--cv-primary-rgb), 0.12), transparent 70%),
        linear-gradient(180deg, var(--cv-surface) 0%, var(--cv-bg) 100%);
}

.hero-title {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.hero-lead {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cv-shadow-lg);
}

.feature-card-icon {
    height: 72px;
    width: auto;
}

.cta-band {
    background-color: var(--cv-navy);
    color: var(--cv-white);
}

.cta-band h2 {
    color: var(--cv-white);
}

/* ------------------------------------------------------------------ */
/* Cookie consent banner                                              */
/* ------------------------------------------------------------------ */
/* A centred dialog over a dimmed, blocked page until the visitor chooses */
.cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(var(--cv-navy-rgb), 0.6);
    backdrop-filter: blur(3px);
    overscroll-behavior: contain;
}

.cookie-consent.d-none {
    display: none !important;
}

body.cookie-consent-open {
    overflow: hidden;
}

.cookie-consent-card {
    width: 100%;
    max-width: 30rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 2rem;
    text-align: center;
    color: var(--cv-text);
    background: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-lg);
    animation: cookie-consent-in 0.2s ease-out;
}

.cookie-consent-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--cv-primary-text);
    background: var(--cv-primary-subtle);
    border-radius: 50%;
}

.cookie-consent-title {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--cv-heading);
}

.cookie-consent-text {
    margin-bottom: 1.5rem;
    color: var(--cv-text-muted);
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.cookie-consent-actions .btn {
    flex: 1 1 10rem;
}

@keyframes cookie-consent-in {
    from { opacity: 0; transform: translateY(0.5rem) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent-card { animation: none; }
}

@media (max-width: 575.98px) {
    .cookie-consent-card { padding: 1.5rem; }
}

/* ------------------------------------------------------------------ */
/* Confirm dialog over another modal (hx-confirm in a modal, discard   */
/* unsaved changes when closing one): it and its backdrop sit on top   */
/* ------------------------------------------------------------------ */
#confirm-dialog {
    z-index: 1065;
}

body:has(#confirm-dialog.show) > .modal-backdrop ~ .modal-backdrop {
    z-index: 1060;
}

/* ------------------------------------------------------------------ */
/* Request progress bar + skip link (shell)                           */
/* ------------------------------------------------------------------ */
.app-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    height: 3px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Only appears for requests slower than 150ms, so fast swaps do not flicker */
.app-progress.is-active {
    opacity: 1;
    transition-delay: 0.15s;
}

.app-progress::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 40%;
    background-color: var(--cv-primary);
    animation: cv-progress 1.1s ease-in-out infinite;
}

@keyframes cv-progress {
    to { left: 100%; }
}

#content[aria-busy="true"] {
    cursor: progress;
}

.nav-tile.is-busy {
    opacity: 0.7;
}

/* The area a request will replace (.is-loading, set by canvemo-app.js): a veil and a spinner over the old content.
   They fade in after 250ms, so fast swaps do not flicker; the veil blocks clicks on content about to go away.
   The spinner sits near the top of tall areas, where it is on screen. .is-loading-anchor is added only to a statically
   positioned area, so a sticky or absolute one keeps its position. */
.is-loading-anchor {
    position: relative;
}

.is-loading::before,
.is-loading::after {
    content: "";
    position: absolute;
    z-index: 5;
    opacity: 0;
    animation: cv-loading-in 0.2s ease 0.25s forwards;
}

.is-loading::before {
    inset: 0;
    background-color: color-mix(in srgb, var(--cv-surface) 65%, transparent);
    border-radius: inherit;
    cursor: progress;
}

.is-loading::after {
    top: min(calc(50% - 1.25rem), 8rem);
    left: calc(50% - 1.25rem);
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid color-mix(in srgb, var(--cv-primary) 20%, transparent);
    border-top-color: var(--cv-primary);
    border-radius: 50%;
    animation: cv-loading-in 0.2s ease 0.25s forwards, cv-spin 0.8s linear infinite;
}

@keyframes cv-loading-in {
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .is-loading::after {
        animation: cv-loading-in 0.01ms linear 0.25s forwards;
        border-style: dotted;
        border-color: var(--cv-primary);
    }
}

.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1200;
    padding: 0.5rem 1rem;
    background-color: var(--cv-surface);
    border-radius: var(--cv-radius);
    box-shadow: var(--cv-shadow);
}

/* ------------------------------------------------------------------ */
/* Header controls                                                    */
/* ------------------------------------------------------------------ */
/* Every control in a page header (language, theme, settings, sign out, log in / sign up) is a .header-btn: one height,
   radius, border and type size, so they line up as a set. Icon-only controls add .header-btn-icon (a square); the one
   call to action adds .header-btn-primary. Light by default (sign-in and legal pages); on the navy header they turn
   translucent white. Built on Bootstrap's --bs-btn-* variables, so focus, hover and the open dropdown keep working. */
.header-actions {
    display: flex;
    flex-direction: row;                 /* also inside .navbar-nav, which Bootstrap lays out as a column */
    align-items: center;
    gap: 0.5rem;
}

.header-btn {
    --cv-header-btn-size: 2.75rem;       /* 44px: the touch-target size (design: Shared parts > App header) */
    --bs-btn-padding-x: 1rem;
    --bs-btn-padding-y: 0;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-font-weight: 500;
    --bs-btn-line-height: 1;
    --bs-btn-border-width: 1px;
    --bs-btn-border-radius: var(--cv-radius);
    --bs-btn-color: var(--cv-text);
    --bs-btn-bg: var(--cv-surface);
    --bs-btn-border-color: var(--cv-border-strong);
    --bs-btn-hover-color: var(--cv-heading);
    --bs-btn-hover-bg: var(--cv-surface-sunken);
    --bs-btn-hover-border-color: var(--cv-border-strong);
    --bs-btn-active-color: var(--cv-heading);
    --bs-btn-active-bg: var(--cv-surface-sunken);
    --bs-btn-active-border-color: var(--cv-border-strong);
    --bs-btn-focus-box-shadow: var(--cv-focus-ring);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: var(--cv-header-btn-size);
    white-space: nowrap;
}

.header-btn-icon {
    --bs-btn-padding-x: 0;
    width: var(--cv-header-btn-size);
    font-size: 0.9375rem;
}

.header-btn-primary {
    --bs-btn-color: var(--cv-white);
    --bs-btn-bg: var(--cv-primary-btn);
    --bs-btn-border-color: var(--cv-primary-btn);
    --bs-btn-hover-color: var(--cv-white);
    --bs-btn-hover-bg: var(--cv-primary-btn-hover);
    --bs-btn-hover-border-color: var(--cv-primary-btn-hover);
    --bs-btn-active-color: var(--cv-white);
    --bs-btn-active-bg: var(--cv-primary-active);
    --bs-btn-active-border-color: var(--cv-primary-active);
}

.navbar-dark .header-btn:not(.header-btn-primary) {
    --bs-btn-color: var(--cv-white);
    --bs-btn-bg: rgba(255, 255, 255, 0.06);
    --bs-btn-border-color: rgba(255, 255, 255, 0.22);
    --bs-btn-hover-color: var(--cv-white);
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.14);
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.34);
    --bs-btn-active-color: var(--cv-white);
    --bs-btn-active-bg: rgba(255, 255, 255, 0.18);
    --bs-btn-active-border-color: rgba(255, 255, 255, 0.4);
}

/* Signed-in user's avatar, name and organization, a little apart from the controls */
.header-actions .app-user {
    margin-right: 0.5rem;
}

.app-user .avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

/* Theme toggle and language switch on pages without a header (sign-in, onboarding) */
.auth-theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Language switch (canvemo/layout :: languageSwitcher): a flag in a square button, no caret */
.language-switcher .dropdown-toggle::after {
    display: none;
}

.language-flag {
    width: 1.25rem;
    height: 0.875rem;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* Inside the header's .navbar-nav Bootstrap makes dropdown menus static (collapsed-navbar style), which pushes the
   menu into the header row; keep it floating below the flag. */
.language-switcher .dropdown-menu {
    position: absolute;
    min-width: 10rem;
    margin-top: 0.375rem;
}

.language-switcher .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.legal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ------------------------------------------------------------------ */
/* Landing: product preview illustration                              */
/* ------------------------------------------------------------------ */
.app-preview {
    overflow: hidden;
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-lg);
    transform: perspective(1600px) rotateY(-6deg) rotateX(2deg);
}

.app-preview-bar {
    display: flex;
    gap: 6px;
    padding: 0.625rem 0.875rem;
    background-color: var(--cv-navy);
}

.app-preview-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.35);
}

.app-preview-body {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--cv-bg);
}

.app-preview-rail {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.app-preview-rail img {
    width: 44px;
    height: 44px;
    padding: 6px;
    object-fit: contain;
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
}

.app-preview-rail img:first-child {
    border-color: var(--cv-primary);
    background-color: var(--cv-primary-subtle);
}

.app-preview-main {
    flex: 1;
    min-width: 0;
    padding: 0.875rem;
    background-color: var(--cv-surface);
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
}

.app-preview-title {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--cv-border);
    font-weight: 700;
    color: var(--cv-heading);
}

.app-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
}

.app-preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    background-color: var(--cv-surface-muted);
    border-radius: var(--cv-radius);
    text-align: center;
    font-size: 0.75rem;
}

.app-preview-card b {
    margin-top: 0.25rem;
    color: var(--cv-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.app-preview-card small {
    color: var(--cv-text-muted);
}

@media (max-width: 575.98px) {
    .app-preview {
        transform: none;
    }

    .app-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-preview-rail {
        display: none;
    }
}

/* ------------------------------------------------------------------ */
/* Dark-mode adjustments that tokens alone cannot express             */
/* ------------------------------------------------------------------ */

/* The logo artwork is dark-on-light: give it a light plate in dark mode */
[data-bs-theme="dark"] .error-logo,
[data-bs-theme="dark"] .legal-brand img,
[data-bs-theme="dark"] .auth-logo {
    padding: 6px 10px;
    background-color: #FFFFFF;
    border-radius: var(--cv-radius);
    box-sizing: content-box;
}

/* Google's dark sign-in button variant */
[data-bs-theme="dark"] .btn-google {
    background-color: #131314;
    border-color: #8E918F;
    color: #E3E3E3;
}

[data-bs-theme="dark"] .btn-google:hover {
    background-color: #1F1F20;
    color: #E3E3E3;
}

/* t183: Microsoft's dark sign-in button variant, as Google's */
[data-bs-theme="dark"] .btn-microsoft {
    background-color: #131314;
    border-color: #8E918F;
    color: #E3E3E3;
}

[data-bs-theme="dark"] .btn-microsoft:hover {
    background-color: #1F1F20;
    color: #E3E3E3;
}

[data-bs-theme="dark"] .legal-callout {
    background-color: rgba(var(--cv-warning-rgb), 0.12);
}

[data-bs-theme="dark"] .nav-tile-icon,
[data-bs-theme="dark"] .feature-card-icon {
    filter: brightness(1.1);
}

/* ------------------------------------------------------------------ */
/* Accounting firms: organization switcher and the "working for" bar   */
/* ------------------------------------------------------------------ */
.org-switch {
    margin-right: 0.5rem;
}

.org-switch-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.25rem 0.625rem 0.25rem 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: var(--cv-white);
    background: rgba(255, 255, 255, 0.06);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.org-switch-toggle:hover,
.org-switch-toggle:focus-visible,
.org-switch-toggle.show {
    color: var(--cv-white);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.32);
}

.org-switch-avatar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 50%;
    background: var(--cv-primary-btn);
    color: var(--cv-white);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
}

.org-switch-labels {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    text-align: left;
    max-width: 14rem;
}

.org-switch-user {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.org-switch-org {
    font-size: 0.75rem;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.org-switch-menu {
    min-width: 17rem;
    max-height: 24rem;
    overflow-y: auto;
    padding: 0.375rem;
    border-color: var(--cv-border);
    border-radius: var(--cv-radius-lg);
    box-shadow: var(--cv-shadow-lg);
}

.org-switch-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: var(--cv-radius);
}

.org-switch-item .org-switch-avatar {
    width: 1.75rem;
    height: 1.75rem;
    background: var(--cv-surface-sunken);
    color: var(--cv-heading);
}

.org-switch-item.active,
.org-switch-item:disabled {
    background: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    opacity: 1;
}

.org-switch-item.active .org-switch-avatar {
    background: var(--cv-primary-btn);
    color: var(--cv-white);
}

.org-switch-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.org-switch-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-switch-meta {
    font-size: 0.75rem;
    color: var(--cv-text-muted);
}

.delegation-bar {
    background: linear-gradient(90deg, var(--cv-primary-active), var(--cv-primary));
    color: var(--cv-white);
    font-size: 0.875rem;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.delegation-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.delegation-bar-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.delegation-bar-back {
    --bs-btn-color: var(--cv-white);
    --bs-btn-border-color: rgba(255, 255, 255, 0.5);
    --bs-btn-hover-color: var(--cv-primary-active);
    --bs-btn-hover-bg: var(--cv-white);
    --bs-btn-hover-border-color: var(--cv-white);
    --bs-btn-active-color: var(--cv-primary-active);
    --bs-btn-active-bg: var(--cv-white);
    font-weight: 600;
}

/* Module icon: straight on the white tile; a green square with a white icon on the active tile
   (design: Shared parts > Module rail) */
.nav-tile-icon-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background-color: transparent;
    color: var(--cv-heading);
    font-size: 1.0625rem;
    transition: background-color var(--cv-transition), color var(--cv-transition);
}

.nav-tile.is-active .nav-tile-icon-symbol {
    background-color: var(--cv-primary-btn);
    color: var(--cv-white);
}

@media (max-width: 767.98px) {
    .nav-tile-icon-symbol {
        width: 32px;
        height: 32px;
        font-size: 0.9375rem;
    }
}

/* Sign-up through an accounting firm's referral link (IAM organization-choice) */
.referral-box {
    padding: 1rem 1.125rem;
    border: 1px solid var(--cv-primary-border-subtle);
    border-radius: var(--cv-radius-lg);
    background: var(--cv-primary-subtle);
}

.referral-box-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.625rem;
    font-weight: 700;
    color: var(--cv-primary-text);
}

.referral-box-note {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--cv-text-muted);
}

/* ------------------------------------------------------------------ */
/* Landing page: Canvemo HR (landing.html, Product's landing-pricing)  */
/* ------------------------------------------------------------------ */
.landing-body {
    background: var(--cv-bg);
}

.landing-nav {
    gap: 1.75rem;
    margin: 0 auto;
}

.landing-nav a {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.landing-nav a:hover,
.landing-nav a:focus-visible {
    color: var(--cv-white);
}

.landing-hero {
    padding: 5.5rem 0 5rem;
    background:
        radial-gradient(760px 420px at 85% 10%, rgba(var(--cv-primary-rgb), 0.16), transparent 70%),
        radial-gradient(600px 360px at 0% 100%, rgba(var(--cv-navy-rgb), 0.10), transparent 70%),
        linear-gradient(180deg, var(--cv-surface) 0%, var(--cv-bg) 100%);
}

.landing-eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cv-primary-text);
}

.landing-title {
    margin: 0 0 1.25rem;
    font-size: clamp(2.3rem, 5.4vw, 3.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--cv-heading);
}

.landing-title span {
    display: block;
    background: linear-gradient(90deg, var(--cv-primary), var(--cv-primary-active));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.landing-lead {
    max-width: 34rem;
    margin: 0 auto 2rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--cv-text-muted);
}

@media (min-width: 992px) {
    .landing-lead {
        margin-left: 0;
    }
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .landing-actions {
        justify-content: flex-start;
    }
}

.landing-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--cv-text);
}

.landing-trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.landing-trust i {
    color: var(--cv-primary);
}

@media (min-width: 992px) {
    .landing-trust {
        justify-content: flex-start;
    }
}

/* The product illustration: an onboarding on its way to payroll */
.hr-preview {
    max-width: 34rem;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    background: var(--cv-surface);
    box-shadow: var(--cv-shadow-lg), 0 30px 60px -20px rgba(var(--cv-navy-rgb), 0.25);
    transform: perspective(1600px) rotateY(-5deg) rotateX(2deg);
}

.hr-preview-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--cv-bg);
}

.hr-preview-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    background: var(--cv-surface);
}

.hr-preview-head div {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.hr-preview-head small {
    color: var(--cv-text-muted);
}

.hr-preview-status {
    margin-left: auto;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    background: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    font-size: 0.75rem;
    font-weight: 700;
}

.hr-preview-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    background: var(--cv-surface);
    list-style: none;
    font-size: 0.875rem;
}

.hr-preview-steps li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.hr-preview-steps .done i {
    color: var(--cv-primary);
}

.hr-preview-steps .next {
    color: var(--cv-text-muted);
}

.hr-preview-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.hr-preview-tiles div {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius);
    background: var(--cv-surface);
}

.hr-preview-tiles small {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cv-text-muted);
}

.hr-preview-tiles b {
    color: var(--cv-heading);
}

/* Sections */
.landing-section {
    padding: 5rem 0;
}

.landing-section-muted {
    background: var(--cv-surface);
    border-top: 1px solid var(--cv-border);
    border-bottom: 1px solid var(--cv-border);
}

.landing-h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 3.6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--cv-heading);
}

.landing-sub {
    max-width: 40rem;
    margin: 0 auto 2.5rem;
    font-size: 1.0625rem;
    color: var(--cv-text-muted);
}

.landing-flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1.25rem;
    margin: 3rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: flow;
}

.landing-flow li {
    position: relative;
    padding: 1.5rem;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    background: var(--cv-surface);
    box-shadow: var(--cv-shadow-sm);
    counter-increment: flow;
}

.landing-flow li::after {
    content: counter(flow, decimal-leading-zero);
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--cv-text-subtle);
}

.landing-flow h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--cv-heading);
}

.landing-flow p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--cv-text-muted);
}

.landing-flow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    font-size: 1.125rem;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 2rem 2.5rem;
    margin-top: 3rem;
}

.landing-features > div > i {
    font-size: 1.375rem;
    color: var(--cv-primary);
}

.landing-features h3 {
    margin: 0.75rem 0 0.375rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cv-heading);
}

.landing-features p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--cv-text-muted);
}

/* Pricing */
.landing-pricing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.landing-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
    width: 100%;
    max-width: 60rem;
}

.landing-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid var(--cv-border);
    border-radius: var(--cv-radius-lg);
    background: var(--cv-surface);
    box-shadow: var(--cv-shadow-sm);
}

.landing-plan-featured {
    border-color: var(--cv-primary);
    box-shadow: 0 0 0 1px var(--cv-primary), var(--cv-shadow-lg);
}

@media (min-width: 992px) {
    .landing-plan-featured {
        transform: translateY(-0.75rem);
    }
}

.landing-plan-enterprise {
    border-color: transparent;
    background: linear-gradient(160deg, var(--cv-navy), #2b4266);
    color: var(--cv-white);
}

.landing-plan-enterprise .landing-plan-name,
.landing-plan-enterprise .plan-price-amount,
.landing-plan-enterprise .plan-features {
    color: var(--cv-white);
}

.landing-plan-enterprise .landing-plan-tagline {
    color: rgba(255, 255, 255, 0.75);
}

.landing-plan-enterprise .plan-features {
    border-top-color: rgba(255, 255, 255, 0.18);
}

.landing-plan-enterprise .plan-features i {
    color: #9fd6a2;
}

.landing-plan-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--cv-heading);
}

.landing-plan-tagline {
    margin: -0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--cv-text-muted);
    min-height: 2.6em;
}

.landing-plan-quote {
    font-size: 1.75rem;
}

.landing-pricing-foot {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--cv-text-muted);
    text-align: center;
}

/* Accounting firms */
.landing-partner {
    background:
        radial-gradient(700px 360px at 100% 0%, rgba(var(--cv-primary-rgb), 0.35), transparent 70%),
        linear-gradient(135deg, var(--cv-navy), #23395c);
    color: var(--cv-white);
}

.landing-partner .landing-eyebrow {
    color: #9fd6a2;
}

.landing-partner .landing-h2 {
    color: var(--cv-white);
}

.landing-partner .landing-sub {
    margin-left: 0;
    color: rgba(255, 255, 255, 0.8);
}

.landing-partner-points {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-partner-points li {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--cv-radius-lg);
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.88);
}

.landing-partner-big {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--cv-white);
    text-align: center;
}

@media (max-width: 575.98px) {
    .landing-hero {
        padding: 3.5rem 0;
    }

    .landing-section {
        padding: 3.5rem 0;
    }

    .hr-preview {
        transform: none;
    }

    .hr-preview-tiles {
        grid-template-columns: 1fr;
    }

    .landing-partner-points li {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: left;
    }

    .landing-partner-big {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hr-preview,
    .landing-plan-featured {
        transform: none;
    }
}

/* ------------------------------------------------------------------ */
/* Sign-out links                                                       */
/* ------------------------------------------------------------------ */
/* Signing out is a POST with the CSRF token (security review t111), so a sign-out "link" in running text is a small
   form whose button reads as a link: .inline-form keeps the form in the line, .link-button looks like an <a>. */
.inline-form {
    display: inline;
    margin: 0;
}

.link-button {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: var(--bs-link-color);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.link-button:hover {
    color: var(--bs-link-hover-color);
}

/* ------------------------------------------------------------------ */
/* HTMX request indicator                                             */
/* HTMX would add these rules as a <style> element, which the         */
/* Content-Security-Policy (style-src 'self') refuses; the htmx-config */
/* meta in canvemo/layout.html turns that off (includeIndicatorStyles) */
/* ------------------------------------------------------------------ */
.htmx-indicator {
    opacity: 0;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
    transition: opacity 200ms ease-in;
}

/* ------------------------------------------------------------------ */
/* Marketing opt-out (t151): CRM's public unsubscribe page and the     */
/* Marketing contacts tab                                              */
/* ------------------------------------------------------------------ */
.unsubscribe-card {
    max-width: 30rem;
    margin: 0 auto;
}

/* The address the link names, as on the UnsubscribePage board */
.unsubscribe-address {
    padding: 0.625rem 0.875rem;
    border-radius: var(--cv-radius);
    background-color: var(--cv-surface-sunken);
    font-weight: 600;
    word-break: break-all;
}

/* A link that doesn't work */
.wizard-result-icon.is-warning {
    background-color: rgba(var(--cv-warning-rgb), 0.16);
    color: var(--cv-warning-text);
}

/* A contact's history (newest first) */
.marketing-history > li {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--cv-border);
}

.marketing-history > li:first-child {
    border-top: 0;
}

.marketing-history-time {
    flex: none;
    width: 7.5rem;
    font-size: 0.8125rem;
    color: var(--cv-text-muted);
}

/* ---------- Help and support dialog (header (?) button; IAM fragments/support-dialog). Design: Help and support dialog ---------- */
.support-modal { max-width: 520px; }

.support-dialog .modal-title {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.support-body {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.support-block {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}

.support-icon {
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--cv-primary-subtle);
    color: var(--cv-primary-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.support-block-text {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
    flex: 1 1 auto;
}

.support-block-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
}

.support-sep {
    margin: 0;
    border-color: var(--cv-border);
    opacity: 1;
}

.support-admins {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.support-admin {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.support-admin-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.support-admin-text a {
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.25rem;
}

.support-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
}

.support-hours {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    margin: 0.25rem 0 0;
    padding: 0.75rem 0.875rem;
    background: var(--cv-surface-sunken);
    border-radius: var(--cv-radius-lg);
    font-size: 0.8125rem;
}

.support-hours dt { font-weight: 600; }

.support-hours dd {
    margin: 0;
    color: var(--cv-text-muted);
}

.support-other {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8125rem;
}

@media (max-width: 420px) {
    .support-hours { grid-template-columns: 1fr; }
    .support-hours dd { margin-bottom: 0.25rem; }
}
