:root {
    --primary: #155eef;
    --dark: #08142f;
    --soft: #f4f8ff;
    --muted: #64748b;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --border: #d6e4ff;
    --card: #ffffff;
    --shadow: 0 18px 55px rgba(8, 20, 47, .08);
    --radius: 18px;
    font-family: Inter, "Segoe UI", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body,
input,
select,
textarea,
button {
    font-family: Inter, "Segoe UI", Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0;
}

/* Fakturo app shell and dashboard reference redesign */
.app-body {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: 100vh;
    overflow-x: hidden;
    background: #f7faff;
    color: #08142f;
}

.app-body svg {
    width: 20px;
    height: 20px;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100vh;
    padding: 24px 14px;
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
    background: #fff;
    color: #08142f;
    box-shadow: none;
}

.sidebar .brand,
.sidebar .brand:hover {
    display: block;
    width: fit-content;
    padding: 0 16px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.sidebar .brand img {
    width: 156px;
}

.company-switcher {
    display: none;
}

.app-nav {
    display: grid;
    gap: 8px;
}

.app-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 10px;
    color: #365176;
    font-size: 15px;
    font-weight: 800;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.app-nav a::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}

.app-nav a svg {
    color: #58719a;
}

.app-nav a.active,
.app-nav a:hover {
    background: #f1f6ff;
    color: #155eef;
}

.app-nav a.active::before {
    background: #155eef;
}

.app-nav a.active svg,
.app-nav a:hover svg {
    color: #155eef;
}

.sidebar-footer {
    display: grid;
    gap: 14px;
    margin-top: auto;
    color: #08142f;
}

.sidebar-upgrade,
.sidebar-company-card {
    border: 1px solid #dbe6f7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 20, 47, .05);
}

.sidebar-upgrade {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.sidebar-upgrade svg,
.sidebar-upgrade strong {
    color: #155eef;
}

.sidebar-upgrade p {
    margin: 0;
    color: #52647f;
    font-size: 13px;
    line-height: 1.45;
}

.sidebar-upgrade a,
.sidebar-footer .sidebar-upgrade a {
    display: inline-flex;
    justify-content: center;
    border: 1px solid #155eef;
    border-radius: 8px;
    padding: 10px;
    color: #155eef;
    font-size: 13px;
    font-weight: 900;
}

.sidebar-company-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.sidebar-company-card strong,
.sidebar-company-card small {
    display: block;
}

.sidebar-company-card strong {
    margin-bottom: 5px;
    color: #08142f;
    font-size: 14px;
}

.sidebar-company-card small {
    color: #64748b;
    font-size: 12px;
}

.sidebar-upgrade,
.sidebar-company-card {
    border: 1px solid #dbe6f7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 20, 47, .05);
}

.sidebar-upgrade {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.sidebar-upgrade svg {
    color: #155eef;
}

.sidebar-upgrade strong {
    color: #155eef;
    font-size: 14px;
}

.sidebar-upgrade p {
    margin: 0;
    color: #52647f;
    font-size: 13px;
    line-height: 1.45;
}

.sidebar-upgrade a {
    display: inline-flex;
    justify-content: center;
    border: 1px solid #155eef;
    border-radius: 8px;
    padding: 10px;
    color: #155eef;
    font-size: 13px;
    font-weight: 900;
}

.sidebar-company-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.sidebar-company-card strong,
.sidebar-company-card small {
    display: block;
}

.sidebar-company-card strong {
    margin-bottom: 5px;
    color: #08142f;
    font-size: 14px;
}

.sidebar-company-card small {
    color: #64748b;
    font-size: 12px;
}

.sidebar-company-card svg {
    flex: 0 0 auto;
    color: #64748b;
}

.app-main {
    min-width: 0;
    padding: 0;
    background: #f7faff;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(280px, 520px) minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    min-height: 78px;
    margin: 0;
    padding: 0 28px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: rgba(255, 255, 255, .94);
    box-shadow: none;
    backdrop-filter: blur(16px);
}

.app-menu-button,
.notification-button {
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #58719a;
    cursor: pointer;
}

.app-menu-button {
    width: 40px;
    height: 40px;
}

.app-search {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d9e4f4;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    box-shadow: 0 8px 22px rgba(8, 20, 47, .035);
}

.app-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #08142f;
    font: inherit;
    font-size: 14px;
}

.app-search span {
    border-radius: 6px;
    padding: 3px 7px;
    background: #f1f5fb;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.topbar-actions {
    justify-content: flex-end;
    gap: 18px;
}

.notification-button {
    position: relative;
    width: 42px;
    height: 42px;
}

.notification-button span {
    position: absolute;
    right: 4px;
    top: 4px;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.topbar-user {
    display: grid;
    grid-template-columns: auto minmax(0, auto) auto;
    align-items: center;
    gap: 12px;
    color: #08142f;
}

.user-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #155eef, #86b7ff);
    color: #fff;
    font-weight: 900;
}

.topbar-user strong,
.topbar-user small {
    display: block;
}

.topbar-user strong {
    font-size: 14px;
}

.topbar-user small {
    color: #64748b;
    font-size: 12px;
}

.dashboard-screen {
    padding: 28px;
}

.dashboard-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.68fr) minmax(380px, .95fr);
    gap: 28px;
    align-items: start;
}

.dashboard-primary,
.dashboard-secondary {
    display: grid;
    gap: 18px;
}

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-welcome h1 {
    margin: 0 0 6px;
    color: #08142f;
    font-size: 26px;
    line-height: 1.15;
}

.dashboard-welcome h1 span {
    font-size: 22px;
}

.dashboard-welcome p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.dashboard-date-filter {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #d9e4f4;
    border-radius: 10px;
    background: #fff;
    color: #08142f;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(8, 20, 47, .035);
}

.dashboard-date-filter svg {
    color: #557099;
}

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

.dashboard-kpi-card,
.dashboard-card,
.dashboard-invoice-preview {
    border: 1px solid #dbe6f7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(8, 20, 47, .055);
}

.dashboard-kpi-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    min-height: 130px;
    padding: 18px;
}

.kpi-icon,
.activity-icon,
.quick-action span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.kpi-icon.success,
.activity-icon.success {
    background: #eafaf0;
    color: #16a34a;
}

.kpi-icon.warning,
.activity-icon.warning {
    background: #fff3e8;
    color: #f97316;
}

.kpi-icon.blue,
.activity-icon.info {
    background: #eef5ff;
    color: #155eef;
}

.kpi-icon.purple,
.activity-icon.purple {
    background: #f2edff;
    color: #6d5dfc;
}

.activity-icon.danger {
    background: #fff0f0;
    color: #ef4444;
}

.dashboard-kpi-card small {
    display: block;
    margin-bottom: 16px;
    color: #223452;
    font-size: 13px;
    font-weight: 900;
}

.dashboard-kpi-card strong {
    display: block;
    margin-bottom: 10px;
    color: #08142f;
    font-size: 25px;
    line-height: 1;
}

.dashboard-kpi-card em,
.dashboard-card-head em {
    display: inline-flex;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.positive {
    color: #16a34a !important;
}

.negative {
    color: #ef4444 !important;
}

.dashboard-card {
    padding: 18px;
}

.dashboard-card-head,
.dashboard-card-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-card h2,
.dashboard-card-title h2 {
    margin: 0;
    color: #08142f;
    font-size: 18px;
}

.dashboard-card-head h2 span {
    display: inline-grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border: 1px solid #9aaeca;
    border-radius: 999px;
    color: #64748b;
    font-size: 11px;
}

.dashboard-card-head strong {
    display: inline-block;
    margin: 12px 10px 0 0;
    font-size: 23px;
}

.dashboard-card-title a {
    color: #155eef;
    font-size: 13px;
    font-weight: 900;
}

.chart-controls {
    display: inline-flex;
    gap: 6px;
}

.chart-controls button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    border: 1px solid #dbe6f7;
    border-radius: 8px;
    background: #fff;
    color: #557099;
    font-weight: 800;
}

.chart-controls button.active {
    border-color: #155eef;
    color: #155eef;
}

.revenue-card {
    min-height: 316px;
}

.revenue-chart {
    position: relative;
    height: 236px;
    margin-top: 12px;
    padding: 18px 10px 30px 58px;
    overflow: hidden;
}

.revenue-chart::before {
    content: "";
    position: absolute;
    inset: 18px 12px 48px 58px;
    background: repeating-linear-gradient(180deg, #e8eef8 0 1px, transparent 1px 42px);
}

.revenue-chart > span {
    position: relative;
    z-index: 1;
    display: block;
    height: 32px;
    color: #6d7f9e;
    font-size: 12px;
}

.revenue-chart svg {
    position: absolute;
    left: 58px;
    right: 12px;
    bottom: 36px;
    z-index: 2;
    width: calc(100% - 70px);
    height: 170px;
}

.revenue-chart .area {
    fill: url(#revenueFill);
}

.revenue-chart .line {
    fill: none;
    stroke: #155eef;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-days {
    position: absolute;
    left: 58px;
    right: 12px;
    bottom: 6px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    color: #637797;
    font-size: 12px;
}

.dashboard-invoice-preview {
    position: relative;
    overflow: hidden;
    padding: 22px;
}

.invoice-accent {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: #155eef;
}

.invoice-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.invoice-preview-head img {
    width: 128px;
    height: auto;
}

.invoice-preview-head div {
    text-align: right;
}

.invoice-preview-head span,
.invoice-meta-grid span,
.invoice-party-grid span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.invoice-preview-head strong {
    font-size: 22px;
}

.invoice-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.invoice-meta-grid strong {
    color: #08142f;
    font-size: 12px;
}

.invoice-meta-grid .success {
    color: #16a34a;
}

.invoice-meta-grid .warning {
    color: #f97316;
}

.invoice-meta-grid .danger {
    color: #ef4444;
}

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

.invoice-party-grid > div {
    min-width: 0;
    border: 1px solid #dbe6f7;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.invoice-party-grid strong,
.invoice-party-grid small {
    display: block;
}

.invoice-party-grid strong {
    margin-bottom: 6px;
    color: #08142f;
    font-size: 12px;
}

.invoice-party-grid small {
    color: #31405b;
    font-size: 11px;
    line-height: 1.45;
}

.invoice-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.invoice-preview-table th,
.invoice-preview-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #e8eef8;
    text-align: left;
}

.invoice-preview-table th:nth-child(n+3),
.invoice-preview-table td:nth-child(n+3) {
    text-align: right;
}

.invoice-preview-table th {
    color: #334766;
    font-size: 10px;
    font-weight: 900;
}

.invoice-preview-totals {
    display: grid;
    justify-content: end;
    gap: 7px;
    margin: 14px 0 16px auto;
    color: #334766;
    font-size: 12px;
}

.invoice-preview-totals span {
    display: flex;
    justify-content: space-between;
    gap: 22px;
}

.invoice-preview-totals .grand {
    color: #08142f;
    font-weight: 900;
}

.invoice-preview-totals .grand strong {
    color: #155eef;
}

.invoice-payment-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px auto;
    align-items: center;
    gap: 12px;
    border: 1px solid #dbe6f7;
    border-radius: 10px;
    padding: 12px;
    background: #fff;
}

.invoice-payment-box strong,
.invoice-payment-box span {
    display: block;
}

.invoice-payment-box strong {
    margin-bottom: 6px;
    font-size: 12px;
}

.invoice-payment-box span,
.invoice-payment-box small {
    color: #31405b;
    font-size: 11px;
    line-height: 1.45;
}

.dashboard-qr {
    width: 56px;
    height: 56px;
    background:
        linear-gradient(90deg, #111 50%, transparent 0) 0 0 / 8px 8px,
        linear-gradient(#111 50%, transparent 0) 0 0 / 8px 8px,
        #fff;
    border: 5px solid #fff;
    box-shadow: 0 0 0 1px #dbe6f7;
}

.activity-card {
    padding: 18px;
}

.activity-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.activity-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.activity-item strong,
.activity-item small {
    display: block;
}

.activity-item strong {
    color: #203250;
    font-size: 13px;
}

.activity-item small,
.activity-item time {
    color: #64748b;
    font-size: 12px;
}

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

.invoices-card {
    padding: 18px;
}

.dashboard-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
}

.dashboard-table-wrap table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.dashboard-table-wrap th,
.dashboard-table-wrap td {
    padding: 13px 12px;
    border-bottom: 1px solid #e8eef8;
    color: #223452;
    font-size: 13px;
    text-align: left;
}

.dashboard-table-wrap th {
    color: #31405b;
    font-size: 12px;
    font-weight: 900;
}

.dashboard-table-wrap tr:last-child td {
    border-bottom: 0;
}

.dashboard-table-wrap td:first-child a {
    color: #155eef;
    font-weight: 900;
}

.table-more {
    color: #64748b;
    font-weight: 900;
}

.quick-actions-card {
    padding: 18px;
}

.quick-actions-card h2 {
    margin-bottom: 16px;
}

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

.quick-action {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon title" "icon sub";
    align-items: center;
    gap: 3px 14px;
    min-height: 74px;
    border: 1px solid #dbe6f7;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    color: #08142f;
}

.quick-action span {
    grid-area: icon;
    background: #eef5ff;
    color: #155eef;
}

.quick-action strong {
    grid-area: title;
    font-size: 14px;
}

.quick-action small {
    grid-area: sub;
    color: #64748b;
    font-size: 12px;
}

.quick-action.primary {
    border-color: #155eef;
    background: #155eef;
    color: #fff;
    box-shadow: 0 16px 35px rgba(21, 94, 239, .22);
}

.quick-action.primary span {
    background: #fff;
    color: #155eef;
}

.quick-action.primary small {
    color: rgba(255, 255, 255, .8);
}

.dashboard-empty {
    border: 1px dashed #cddbf0;
    border-radius: 10px;
    padding: 16px;
    background: #f8fbff;
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 1280px) {
    .dashboard-top-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-secondary {
        grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
        align-items: start;
    }
}

@media (max-width: 1060px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 18px;
    }

    .sidebar .brand {
        padding: 0;
    }

    .app-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .app-nav a::before,
    .sidebar-footer {
        display: none;
    }

    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .dashboard-secondary,
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .topbar {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        padding: 12px 16px;
    }

    .topbar-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
        width: 100%;
    }

    .topbar-user {
        max-width: 100%;
    }

    .app-search span,
    .topbar-user svg {
        display: none;
    }

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

    .dashboard-screen {
        padding: 18px;
    }

    .dashboard-welcome,
    .dashboard-card-head,
    .dashboard-card-title {
        display: grid;
    }

    .dashboard-date-filter {
        width: 100%;
        justify-content: center;
    }

    .dashboard-kpis,
    .invoice-meta-grid,
    .invoice-party-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-card {
        min-height: 0;
    }

    .revenue-chart {
        height: 210px;
        padding-left: 48px;
    }

    .revenue-chart::before {
        left: 48px;
    }

    .revenue-chart svg,
    .chart-days {
        left: 48px;
        width: calc(100% - 60px);
    }

    .dashboard-invoice-preview {
        padding: 18px 14px;
    }

    .invoice-preview-head,
    .invoice-payment-box {
        grid-template-columns: 1fr;
        display: grid;
        text-align: left;
    }

    .invoice-preview-head div {
        text-align: left;
    }

    .invoice-preview-table {
        font-size: 10px;
    }

    .invoice-preview-table th,
    .invoice-preview-table td {
        padding: 7px 3px;
        white-space: normal;
    }

    .invoice-preview-totals {
        width: 100%;
    }

    .activity-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .activity-item time {
        grid-column: 2;
    }

    .quick-action {
        min-height: 68px;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f8fbff;
    color: var(--dark);
}

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

img {
    max-width: 100%;
}

.public-body {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9ff 42%, #ffffff 100%);
}

.public-nav,
.site-footer {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.public-nav {
    padding: 22px 0;
}

.public-nav nav,
.topbar-actions,
.row-actions,
.form-actions,
.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.brand img {
    width: 148px;
    height: auto;
    display: block;
}

.hero {
    width: min(1160px, calc(100% - 32px));
    margin: 58px auto 34px;
    display: grid;
    grid-template-columns: 1.03fr .97fr;
    gap: 42px;
    align-items: center;
}

.hero-sales {
    grid-template-columns: .95fr 1.05fr;
    margin-top: 44px;
}

.hero-sales h1 {
    max-width: 760px;
    font-size: clamp(44px, 6.5vw, 72px);
    line-height: 1;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.trust-row span {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255,255,255,.72);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.premium-visual {
    transform: none;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.visual-dashboard {
    display: grid;
    gap: 16px;
}

.visual-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.visual-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.visual-kpis div {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
}

.visual-kpis span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.visual-kpis strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
}

.invoice-preview.compact {
    transform: none;
    box-shadow: none;
}

.hero h1 {
    margin: 0 0 18px;
    max-width: 720px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: .95;
    letter-spacing: 0;
}

.hero p {
    margin: 0 0 28px;
    max-width: 620px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.6;
}

.hero-visual,
.invoice-preview,
.card,
.panel,
.kpi,
.auth-card,
.pricing-card,
.client-card,
.invoice-builder,
.public-invoice {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-visual {
    padding: 20px;
    transform: rotate(1deg);
}

.invoice-preview {
    padding: 20px;
    transform: rotate(-1deg);
}

.preview-line {
    height: 8px;
    border-radius: 99px;
    background: var(--primary);
    margin-bottom: 24px;
}

.preview-head,
.preview-total,
.stats-grid,
.features-grid,
.steps-grid,
.faq-grid,
.pricing-grid,
.cards-grid,
.two-col,
.form-grid {
    display: grid;
    gap: 18px;
}

.preview-head {
    grid-template-columns: 1fr auto;
    align-items: start;
    margin-bottom: 20px;
}

.preview-total {
    text-align: right;
    gap: 2px;
}

.preview-total strong {
    font-size: 30px;
}

.mini-pill,
.badge,
.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}

.mini-pill {
    background: #fff7ed;
    color: #c2410c;
}

.badge,
.status.muted {
    background: var(--soft);
    color: var(--primary);
}

.status.success {
    background: #ecfdf5;
    color: var(--success);
}

.status.warning {
    background: #fffbeb;
    color: #b45309;
}

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

.preview-parties {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.preview-party,
.preview-table,
.preview-pay {
    background: var(--soft);
    border-radius: 14px;
    padding: 14px;
}

.preview-table {
    display: grid;
    gap: 10px;
}

.preview-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

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

.section {
    width: min(1160px, calc(100% - 32px));
    margin: 86px auto;
}

.section-head {
    max-width: 720px;
    margin-bottom: 28px;
}

.section h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: 0;
}

.section p,
.muted,
small {
    color: var(--muted);
}

.features-grid {
    grid-template-columns: repeat(4, 1fr);
}

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

.steps-grid,
.pricing-grid {
    grid-template-columns: repeat(4, 1fr);
}

.faq-grid,
.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.card,
.panel,
.pricing-card,
.auth-card,
.kpi,
.client-card {
    padding: 22px;
}

.credibility-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--border);
    margin-top: 38px;
}

.credibility-strip div {
    background: #fff;
    padding: 22px;
}

.credibility-strip strong {
    display: block;
    font-size: 26px;
    color: var(--primary);
}

.credibility-strip span {
    color: var(--muted);
}

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

.doc-card {
    display: grid;
    gap: 10px;
    min-height: 152px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 10px 30px rgba(8, 20, 47, .05);
}

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

.doc-card span {
    color: var(--muted);
    line-height: 1.45;
}

.app-document-grid {
    grid-template-columns: repeat(3, 1fr);
}

.split-band {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 28px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.compliance-list {
    display: grid;
    gap: 10px;
}

.compliance-list span {
    display: block;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 12px 14px;
    background: var(--soft);
    color: var(--dark);
    font-weight: 700;
}

.final-cta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
}

.feature-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--soft);
    color: var(--primary);
    font-weight: 800;
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: translateY(-8px);
}

.price {
    font-size: 34px;
    font-weight: 800;
    margin: 16px 0;
}

.pricing-card ul,
.check-list {
    padding: 0;
    margin: 16px 0 0;
    list-style: none;
}

.pricing-card li,
.check-list li {
    padding: 8px 0;
    color: var(--muted);
}

.pricing-card li::before,
.check-list li::before {
    content: "✓";
    color: var(--success);
    font-weight: 800;
    margin-right: 8px;
}

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 28px 0 42px;
    color: var(--muted);
}

.btn {
    border: 0;
    border-radius: 13px;
    padding: 11px 16px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    background: #eef4ff;
    color: var(--primary);
}

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

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

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

.btn-success {
    background: #ecfdf5;
    color: var(--success);
}

.app-body {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    background: #fff;
    border-right: 1px solid var(--border);
}

.sidebar-brand {
    margin-bottom: 8px;
}

.company-switcher label,
.field label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 11px 12px;
    font: inherit;
    color: var(--dark);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.app-nav {
    display: grid;
    gap: 6px;
}

.app-nav a {
    padding: 12px 14px;
    border-radius: 13px;
    color: var(--muted);
    font-weight: 800;
}

.app-nav a.active,
.app-nav a:hover {
    background: var(--soft);
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 4px;
    color: var(--muted);
}

.app-main {
    padding: 24px;
    min-width: 0;
    background: #fbfdff;
}

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

.topbar h1 {
    margin: 5px 0 0;
    font-size: clamp(24px, 3vw, 34px);
}

.eyebrow {
    color: var(--primary);
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
}

.stats-grid {
    grid-template-columns: repeat(4, 1fr);
}

.kpi strong {
    display: block;
    margin-top: 8px;
    font-size: 23px;
}

.kpi {
    box-shadow: 0 8px 24px rgba(8, 20, 47, .045);
}

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

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

.field.full,
.full {
    grid-column: 1 / -1;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

th,
td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #eaf1ff;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    background: var(--soft);
}

tr:last-child td {
    border-bottom: 0;
}

.flash {
    width: min(1160px, calc(100% - 32px));
    margin: 12px auto;
    padding: 13px 16px;
    border-radius: 14px;
    font-weight: 700;
}

.app-main .flash {
    width: auto;
    margin: 0 0 16px;
}

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

.flash.warning {
    background: #fffbeb;
    color: #b45309;
}

.flash.danger,
.errors {
    background: #fef2f2;
    color: var(--danger);
}

.auth-shell {
    min-height: calc(100vh - 90px);
    display: grid;
    place-items: center;
    padding: 40px 16px;
}

.auth-card {
    width: min(460px, 100%);
}

.auth-card h1 {
    margin-top: 0;
}

.invoice-builder {
    padding: 22px;
}

.builder-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 360px;
    gap: 22px;
    align-items: start;
}

.items-editor {
    display: grid;
    gap: 10px;
}

.item-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 90px 90px 120px 44px;
    gap: 10px;
}

.icon-btn {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 12px;
    min-height: 42px;
    cursor: pointer;
    color: var(--danger);
    font-weight: 900;
}

.totals-box {
    background: var(--soft);
    border-radius: 16px;
    padding: 18px;
    display: grid;
    gap: 12px;
    position: sticky;
    top: 24px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.total-line.grand {
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
}

.public-invoice {
    width: min(980px, calc(100% - 32px));
    margin: 34px auto;
    padding: 28px;
}

.public-invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.mini-chart {
    height: 220px;
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(21, 94, 239, .12), transparent),
        repeating-linear-gradient(90deg, transparent 0 58px, rgba(21, 94, 239, .07) 58px 60px);
    border: 1px solid var(--border);
    position: relative;
}

.mini-chart::after {
    content: "";
    position: absolute;
    inset: 70px 24px 34px;
    border-left: 5px solid var(--primary);
    border-bottom: 5px solid var(--primary);
    transform: skewX(-22deg);
    border-radius: 0 0 0 12px;
}

.public-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 16px 0;
    backdrop-filter: blur(18px);
}

.public-nav nav a:not(.btn) {
    color: #31405b;
    font-size: 14px;
    font-weight: 800;
}

.public-nav nav a:not(.btn):hover {
    color: var(--primary);
}

.hero-sales {
    align-items: center;
}

.hero-sales .badge {
    margin-bottom: 18px;
    border: 1px solid rgba(21, 94, 239, .14);
    background: #eef5ff;
}

.premium-visual {
    border-radius: 26px;
    border-color: #cfe0ff;
    box-shadow: 0 30px 80px rgba(21, 94, 239, .14);
}

.visual-dashboard {
    border-radius: 22px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(21, 94, 239, .08), rgba(22, 163, 74, .06)),
        #fff;
}

.visual-top strong,
.visual-kpis strong,
.preview-total strong {
    color: #07142f;
}

.invoice-preview.compact {
    border-radius: 20px;
    border: 1px solid #dbe8ff;
}

.sales-grid .card,
.features-grid .card,
.doc-card,
.pricing-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sales-grid .card:hover,
.features-grid .card:hover,
.doc-card:hover,
.pricing-card:hover {
    transform: translateY(-3px);
    border-color: #bcd3ff;
    box-shadow: 0 20px 55px rgba(8, 20, 47, .09);
}

.app-body {
    background: #f4f7fb;
}

.sidebar {
    background: linear-gradient(180deg, #07142f 0%, #0f2761 64%, #0a1735 100%);
    border-right: 0;
    color: #fff;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08);
}

.sidebar .brand {
    display: block;
    border-radius: 18px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
}

.sidebar .brand img {
    width: 136px;
}

.sidebar .company-switcher label {
    color: rgba(255, 255, 255, .62);
}

.sidebar select {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.sidebar select option {
    color: var(--dark);
}

.app-nav a {
    color: rgba(255, 255, 255, .72);
}

.app-nav a.active,
.app-nav a:hover {
    background: rgba(255, 255, 255, .13);
    color: #fff;
}

.sidebar-footer {
    color: rgba(255, 255, 255, .68);
}

.sidebar-footer a {
    color: #fff;
    font-weight: 800;
}

.app-main {
    background: linear-gradient(180deg, #f5f8ff 0%, #fbfdff 44%, #fff 100%);
    padding: 28px;
}

.topbar {
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid #dde8fb;
    border-radius: 22px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 36px rgba(8, 20, 47, .06);
}

.topbar h1 {
    font-size: clamp(24px, 2.6vw, 32px);
}

.btn-light {
    background: #fff;
    color: #0b1734;
}

.dashboard-hero,
.client-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 30px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(21, 94, 239, .92), rgba(7, 20, 47, .98)),
        #07142f;
    box-shadow: 0 28px 70px rgba(7, 20, 47, .2);
}

.dashboard-hero h2,
.client-hero h2 {
    margin: 8px 0 10px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.05;
}

.dashboard-hero p,
.client-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, .76);
    font-size: 16px;
    line-height: 1.65;
}

.hero-badge {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .13);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-actions,
.client-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-stats,
.client-stats {
    margin: 18px 0;
}

.kpi span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.kpi-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #155eef, #0b3bb4);
    color: #fff;
}

.kpi-primary span {
    color: rgba(255, 255, 255, .72);
}

.document-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 22px;
}

.document-strip a {
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 16px;
    border: 1px solid #dbe8ff;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 20, 47, .05);
}

.document-strip a:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.document-strip strong {
    font-size: 15px;
}

.document-strip span {
    align-self: end;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
    gap: 22px;
    align-items: start;
    margin-top: 20px;
}

.premium-panel {
    border-color: #dbe8ff;
    border-radius: 22px;
    box-shadow: 0 18px 50px rgba(8, 20, 47, .06);
}

.premium-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.panel-title h2 {
    margin: 4px 0 0;
}

.clean-table {
    border-color: #e3ecfb;
}

.clean-table table {
    min-width: 720px;
}

.clean-table th {
    background: #f7faff;
}

.payment-summary {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.payment-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e3ecfb;
    border-radius: 16px;
    background: #f8fbff;
}

.payment-summary span {
    color: var(--muted);
    font-weight: 800;
}

.refined-chart {
    height: 180px;
    margin: 16px 0;
    background:
        linear-gradient(180deg, rgba(21, 94, 239, .12), rgba(22, 163, 74, .04)),
        repeating-linear-gradient(90deg, transparent 0 46px, rgba(21, 94, 239, .07) 46px 48px),
        #fff;
}

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

.refined-client-card {
    box-shadow: none;
    border-color: #dbe8ff;
}

.refined-client-card h3 {
    margin: 0 0 8px;
}

.refined-client-card p {
    margin: 0 0 10px;
    color: var(--muted);
}

.client-hero-main {
    display: flex;
    align-items: center;
    gap: 18px;
}

.client-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 34px;
    font-weight: 900;
}

.client-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.client-tags span {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .84);
    font-size: 12px;
    font-weight: 800;
}

.client-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 22px;
    align-items: start;
    margin-top: 20px;
}

.client-side-stack {
    display: grid;
    gap: 22px;
}

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

.info-field {
    padding: 15px;
    border: 1px solid #e3ecfb;
    border-radius: 16px;
    background: #f8fbff;
}

.info-field span,
.note-card span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.info-field strong {
    overflow-wrap: anywhere;
}

.note-card {
    margin-top: 14px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e3ecfb;
}

.note-card p {
    margin: 0;
    color: #31405b;
    line-height: 1.6;
}

.activity-list,
.timeline {
    display: grid;
    gap: 14px;
}

.activity-item,
.timeline-event {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.activity-dot,
.event-dot {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 5px rgba(21, 94, 239, .1);
}

.activity-dot.success {
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(22, 163, 74, .1);
}

.activity-item p,
.timeline-event p {
    margin: 4px 0 0;
    color: var(--muted);
}

.client-table-section {
    margin-top: 22px;
}

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.hero-proof span {
    border: 1px solid #dbe8ff;
    border-radius: 999px;
    padding: 8px 11px;
    background: #fff;
    color: #31405b;
    font-size: 13px;
    font-weight: 900;
}

.sales-band {
    padding: 34px;
    border: 1px solid #dbe8ff;
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(21, 94, 239, .06), rgba(22, 163, 74, .04)),
        #fff;
    box-shadow: var(--shadow);
}

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

.template-card {
    padding: 18px;
    border: 1px solid #dbe8ff;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(8, 20, 47, .06);
}

.template-card h3 {
    margin: 16px 0 8px;
}

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

.template-mini {
    display: grid;
    gap: 10px;
    min-height: 210px;
    padding: 18px;
    border: 1px solid #e3ecfb;
    border-radius: 18px;
    background: #fbfdff;
}

.template-mini span {
    display: block;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: var(--template-color);
}

.template-mini strong {
    color: var(--template-color);
    font-size: 22px;
}

.template-mini div {
    height: 42px;
    border-radius: 13px;
    border: 1px solid #dbe8ff;
    background: #fff;
}

.template-mini em {
    justify-self: end;
    width: 44%;
    height: 52px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--template-color) 12%, white);
    border: 1px solid #dbe8ff;
}

.brand-swatches {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #dbe8ff;
    border-radius: 18px;
    background: #fff;
}

.brand-swatches span {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,.72), 0 8px 18px rgba(8,20,47,.12);
}

.brand-swatches strong {
    color: #31405b;
}

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

.template-option {
    position: relative;
    display: grid;
    gap: 7px;
    min-height: 112px;
    padding: 14px;
    border: 1px solid #dbe8ff;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}

.template-option.selected,
.template-option:has(input:checked) {
    border-color: var(--primary);
    background: #f4f8ff;
}

.template-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.template-option span {
    font-weight: 900;
}

.template-option small {
    line-height: 1.45;
}

.color-control {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.color-control input[type="color"] {
    min-height: 46px;
    padding: 4px;
    cursor: pointer;
}

.check-inline {
    display: flex;
    gap: 9px;
    align-items: center;
    color: #31405b;
    font-weight: 800;
}

.check-inline input {
    width: auto;
    min-height: auto;
}

.totals-title {
    display: block;
    font-size: 22px;
}

.settings-form {
    display: grid;
    gap: 24px;
}

.settings-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    padding: 20px;
    border: 1px solid #dbe8ff;
    border-radius: 22px;
    background: #f8fbff;
}

.settings-band h2 {
    margin: 5px 0 8px;
}

.brand-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e3ecfb;
}

.brand-preview img {
    max-width: 120px;
    max-height: 42px;
    object-fit: contain;
}

.brand-preview strong {
    max-width: 140px;
    overflow-wrap: anywhere;
}

.brand-preview span {
    width: 24px;
    height: 24px;
    border-radius: 999px;
}

.product-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
    align-items: stretch;
}

.product-copy,
.product-panel {
    border: 1px solid #dbe8ff;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(8, 20, 47, .06);
}

.product-copy {
    padding: 32px;
}

.product-copy h2 {
    margin-top: 8px;
}

.workflow-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.workflow-list div {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e3ecfb;
    border-radius: 16px;
    background: #f8fbff;
}

.workflow-list strong {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
}

.workflow-list span {
    color: #31405b;
    line-height: 1.45;
    font-weight: 700;
}

.product-panel {
    padding: 22px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.product-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

.module-list {
    display: grid;
    gap: 10px;
}

.module-list span {
    padding: 13px 14px;
    border: 1px solid #e3ecfb;
    border-radius: 14px;
    background: #fff;
    color: #31405b;
    font-weight: 800;
}

.product-modules {
    padding: 32px;
    border-radius: 28px;
    background: #07142f;
    color: #fff;
}

.product-modules .section-head p,
.product-modules .section-head,
.product-modules .eyebrow {
    color: rgba(255, 255, 255, .72);
}

.product-modules h2 {
    color: #fff;
}

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

.module-grid article {
    padding: 20px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: rgba(255,255,255,.06);
}

.module-grid h3 {
    margin: 0 0 8px;
    color: #fff;
}

.module-grid p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    line-height: 1.55;
}

.dashboard-hero {
    color: #07142f;
    background:
        linear-gradient(135deg, rgba(21, 94, 239, .08), rgba(22, 163, 74, .05)),
        #fff;
    border: 1px solid #dbe8ff;
    box-shadow: 0 18px 50px rgba(8, 20, 47, .06);
}

.dashboard-hero p {
    color: #64748b;
}

.dashboard-hero .hero-badge {
    background: #eef5ff;
    color: var(--primary);
}

.dashboard-hero .btn-light {
    border: 1px solid #dbe8ff;
}

.dashboard-stats .kpi,
.document-strip a,
.premium-panel {
    box-shadow: 0 10px 30px rgba(8, 20, 47, .045);
}

.document-strip a {
    min-height: 82px;
    border-radius: 16px;
}

.dashboard-grid {
    gap: 18px;
}

.tm-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 44px auto 32px;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr);
    gap: 42px;
    align-items: center;
}

.tm-hero h1 {
    margin: 16px 0;
    max-width: 760px;
    font-size: 66px;
    line-height: .98;
}

.tm-hero-copy p {
    max-width: 640px;
    margin: 0 0 24px;
    color: #52617a;
    font-size: 18px;
    line-height: 1.65;
}

.tm-proof-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.tm-proof-row span {
    border: 1px solid #dbe8ff;
    border-radius: 999px;
    padding: 8px 11px;
    background: #fff;
    color: #31405b;
    font-size: 13px;
    font-weight: 900;
}

.tm-product-shot {
    border-radius: 30px;
    padding: 12px;
    background: #0b1734;
    box-shadow: 0 26px 76px rgba(8, 20, 47, .18);
}

.tm-app-frame {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 560px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.14);
    background: #f7faff;
}

.tm-app-sidebar {
    display: grid;
    align-content: start;
    gap: 13px;
    padding: 20px 16px;
    background: #07142f;
    color: #fff;
}

.tm-app-sidebar strong {
    margin-bottom: 18px;
    font-size: 18px;
}

.tm-app-sidebar span {
    height: 34px;
    border-radius: 11px;
    background: rgba(255,255,255,.12);
}

.tm-app-main {
    padding: 22px;
}

.tm-app-top,
.tm-invoice-head,
.tm-pay-block,
.tm-stats {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.tm-app-top small,
.tm-kpis span,
.tm-invoice-head span,
.tm-pay-block span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.tm-app-top strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
}

.tm-app-top em {
    border-radius: 999px;
    padding: 8px 12px;
    background: #ecfdf5;
    color: var(--success);
    font-style: normal;
    font-weight: 900;
}

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

.tm-kpis div,
.tm-invoice-card {
    border: 1px solid #dbe8ff;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(8, 20, 47, .055);
}

.tm-kpis div {
    padding: 14px;
}

.tm-kpis strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
}

.tm-invoice-card {
    overflow: hidden;
}

.tm-blue-line {
    height: 7px;
    background: var(--primary);
}

.tm-invoice-head {
    align-items: flex-start;
    padding: 22px;
    border-bottom: 1px solid #e6eefb;
}

.tm-invoice-head h2 {
    margin: 7px 0 6px;
    font-size: 24px;
}

.tm-invoice-head p {
    margin: 0;
    color: var(--muted);
}

.tm-invoice-head > strong {
    color: var(--primary);
    font-size: 30px;
    white-space: nowrap;
}

.tm-invoice-table {
    display: grid;
    padding: 0 22px;
}

.tm-invoice-table div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #edf3ff;
}

.tm-invoice-table span {
    color: #31405b;
}

.tm-pay-block {
    margin: 18px 22px 22px;
    padding: 14px;
    border-radius: 16px;
    background: #eef5ff;
}

.tm-pay-block strong {
    color: #0b1734;
}

.tm-stats {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 72px;
    align-items: stretch;
    border: 1px solid #dbe8ff;
    border-radius: 22px;
    overflow: hidden;
    background: #dbe8ff;
}

.tm-stats div {
    flex: 1;
    padding: 24px;
    background: #fff;
}

.tm-stats strong {
    display: block;
    color: var(--primary);
    font-size: 28px;
}

.tm-stats span {
    color: var(--muted);
}

.tm-centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

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

.tm-use-card {
    min-height: 250px;
    padding: 24px;
    border: 1px solid #dbe8ff;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(8, 20, 47, .055);
}

.tm-use-card span {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #16a34a);
}

.tm-use-card h3 {
    margin: 22px 0 10px;
    font-size: 22px;
}

.tm-use-card p,
.tm-module-grid p,
.tm-flow-copy p,
.tm-accountant p,
.tm-final-cta p,
.tm-faq p {
    color: var(--muted);
    line-height: 1.6;
}

.tm-flow-section {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 26px;
    align-items: start;
}

.tm-flow-copy {
    position: sticky;
    top: 92px;
    padding: 28px;
    border: 1px solid #dbe8ff;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(8, 20, 47, .055);
}

.tm-steps {
    display: grid;
    gap: 14px;
}

.tm-steps article {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 22px;
    border: 1px solid #dbe8ff;
    border-radius: 22px;
    background: #fff;
}

.tm-steps strong {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 18px;
    background: #eef5ff;
    color: var(--primary);
    font-size: 18px;
}

.tm-steps h3 {
    margin: 0 0 7px;
}

.tm-steps p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.tm-bento {
    padding: 34px;
    border-radius: 30px;
    background: #07142f;
    color: #fff;
}

.tm-bento .eyebrow,
.tm-bento .section-head p {
    color: rgba(255,255,255,.72);
}

.tm-bento h2 {
    color: #fff;
}

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

.tm-module-grid article {
    min-height: 210px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    background: rgba(255,255,255,.065);
}

.tm-module-grid article.wide {
    grid-column: span 2;
}

.tm-module-grid span {
    color: #92b2ff;
    font-weight: 900;
}

.tm-module-grid h3 {
    margin: 18px 0 8px;
    color: #fff;
}

.tm-module-grid p {
    margin: 0;
    color: rgba(255,255,255,.72);
}

.tm-accountant-card,
.tm-final-cta {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 26px;
    align-items: center;
    padding: 30px;
    border: 1px solid #dbe8ff;
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--shadow);
}

.tm-responsibility {
    display: grid;
    grid-template-columns: 1fr 58px 1fr 58px 1fr;
    gap: 10px;
    align-items: center;
}

.tm-responsibility div {
    display: grid;
    gap: 8px;
    min-height: 190px;
    padding: 18px;
    border: 1px solid #dbe8ff;
    border-radius: 20px;
    background: #f8fbff;
}

.tm-responsibility div.core {
    background: #07142f;
    color: #fff;
}

.tm-responsibility span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.tm-responsibility .core span {
    color: rgba(255,255,255,.72);
}

.tm-responsibility em {
    color: var(--primary);
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.tm-document-grid .doc-card {
    border-radius: 20px;
}

.tm-pricing .pricing-card {
    display: flex;
    flex-direction: column;
}

.tm-pricing .pricing-card .btn {
    margin-top: auto;
}

.tm-final-cta {
    grid-template-columns: minmax(0, 1fr) auto;
    background: linear-gradient(135deg, #07142f, #12337d);
    color: #fff;
}

.tm-final-cta h2 {
    color: #fff;
}

.tm-final-cta p,
.tm-final-cta .eyebrow {
    color: rgba(255,255,255,.78);
}

.tm-final-cta .btn-ghost {
    border-color: rgba(255,255,255,.22);
    background: rgba(255,255,255,.1);
    color: #fff;
}

@media (max-width: 980px) {
    .hero,
    .features-grid,
    .sales-grid,
    .steps-grid,
    .pricing-grid,
    .faq-grid,
    .two-col,
    .builder-grid,
    .stats-grid,
    .cards-grid,
    .document-grid,
    .app-document-grid,
    .split-band,
    .credibility-strip,
    .final-cta,
    .dashboard-hero,
    .dashboard-grid,
    .client-hero,
    .client-profile-grid,
    .client-mini-grid,
    .template-showcase,
    .template-options,
    .settings-band,
    .product-overview,
    .module-grid,
    .tm-hero,
    .tm-three,
    .tm-flow-section,
    .tm-module-grid,
    .tm-accountant-card,
    .tm-final-cta {
        grid-template-columns: 1fr;
    }

    .tm-hero {
        gap: 28px;
    }

    .tm-hero h1 {
        font-size: 46px;
    }

    .tm-product-shot {
        max-width: 720px;
    }

    .tm-app-frame {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .tm-app-sidebar {
        display: none;
    }

    .tm-flow-copy {
        position: static;
    }

    .tm-module-grid article.wide {
        grid-column: auto;
    }

    .tm-responsibility {
        grid-template-columns: 1fr;
    }

    .tm-responsibility em {
        text-align: left;
    }

    .tm-final-cta {
        align-items: start;
    }

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

    .app-body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .sidebar .brand {
        width: fit-content;
    }

    .app-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar {
        flex-direction: column;
    }

    .totals-box {
        position: static;
    }

    .dashboard-actions,
    .client-actions {
        justify-content: flex-start;
    }

    .brand-preview {
        min-width: 0;
    }
}

@media (max-width: 620px) {
    .public-nav,
    .site-footer,
    .preview-parties,
    .visual-kpis,
    .tm-stats,
    .tm-kpis,
    .form-grid,
    .info-grid,
    .item-row,
    .public-invoice-head {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .public-nav nav,
    .hero-actions,
    .topbar-actions,
    .form-actions,
    .row-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .hero {
        margin-top: 32px;
    }

    .tm-hero {
        margin-top: 30px;
    }

    .tm-hero h1 {
        font-size: 38px;
        line-height: 1.04;
    }

    .tm-hero-copy p {
        font-size: 16px;
    }

    .tm-app-main {
        padding: 14px;
    }

    .tm-invoice-head {
        display: grid;
    }

    .tm-invoice-head > strong {
        font-size: 24px;
    }

    .tm-stats div {
        width: 100%;
    }

    .tm-steps article {
        grid-template-columns: 1fr;
    }

    .tm-bento,
    .tm-accountant-card,
    .tm-final-cta {
        padding: 22px;
        border-radius: 24px;
    }

    .section {
        margin: 54px auto;
    }

    .app-main {
        padding: 18px;
    }

    .dashboard-hero,
    .client-hero {
        padding: 22px;
        border-radius: 24px;
    }

    .client-hero-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .document-strip {
        grid-template-columns: 1fr;
    }
}

.sidebar {
    overflow-y: auto;
}

.app-nav a {
    padding: 10px 12px;
    font-size: 13px;
}

.module-stats {
    margin-bottom: 18px;
}

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

.module-card {
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 160px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.module-card strong {
    font-size: 17px;
}

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

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

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

@media (max-width: 900px) {
    .module-grid {
        grid-template-columns: 1fr;
    }

    .inline-form {
        display: grid;
    }
}

/* TaxMate-style public sales page, adapted for Fakturo branding. */
.public-body {
    padding-top: 82px;
    background:
        linear-gradient(180deg, #f8fbff 0%, #ffffff 34%, #f4f8ff 68%, #ffffff 100%);
}

.public-nav {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 60;
    width: min(1280px, calc(100% - 32px));
    min-height: 54px;
    margin: 0;
    padding: 0 14px;
    transform: translateX(-50%);
    border: 1px solid rgba(214, 228, 255, .74);
    border-radius: 18px;
    background: rgba(255, 255, 255, .74);
    box-shadow: 0 12px 38px rgba(8, 20, 47, .08), inset 0 1px 0 rgba(255,255,255,.92);
    backdrop-filter: blur(18px);
}

.public-nav .brand img {
    width: 126px;
}

.public-nav nav {
    gap: 4px;
}

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

.public-nav nav a:not(.btn):hover {
    background: #eef5ff;
    color: var(--primary);
}

.public-nav .btn {
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 10px;
}

.tm-hero,
.tm-stats,
.section {
    width: min(1280px, calc(100% - 32px));
}

.tm-hero {
    min-height: calc(100vh - 128px);
    margin-top: 18px;
    grid-template-columns: minmax(0, .86fr) minmax(560px, 1.14fr);
    gap: 48px;
}

.tm-hero h1 {
    max-width: 760px;
    font-size: clamp(48px, 6.3vw, 84px);
    line-height: .94;
}

.tm-hero-copy .badge {
    border: 1px solid #d6e4ff;
    background: rgba(255, 255, 255, .82);
    color: var(--primary);
}

.tm-product-shot {
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 34px;
    box-shadow: 0 32px 90px rgba(8, 20, 47, .22);
}

.tm-app-frame {
    min-height: 620px;
}

.tm-app-sidebar {
    background: #08142f;
}

.tm-kpis div,
.tm-invoice-card,
.tm-use-card,
.tm-flow-copy,
.tm-steps article,
.tm-accountant-card,
.doc-card,
.pricing-card,
.tm-quote-grid article {
    border-color: #e2e8f5;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(8, 20, 47, .055);
}

.tm-stats {
    max-width: 1280px;
    margin-top: 8px;
    margin-bottom: 92px;
    border-color: #e2e8f5;
    background: #e2e8f5;
}

.tm-bento {
    padding: 0;
    background: transparent;
    color: var(--dark);
}

.tm-bento .eyebrow,
.tm-bento .section-head p,
.tm-bento h2 {
    color: inherit;
}

.tm-module-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tm-module-grid article {
    min-height: 230px;
    border: 1px solid #e2e8f5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(8, 20, 47, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tm-module-grid article:hover {
    transform: translateY(-4px);
    border-color: #bfd2ff;
    box-shadow: 0 18px 46px rgba(8, 20, 47, .09);
}

.tm-module-grid article.wide {
    grid-column: span 2;
}

.tm-module-grid h3 {
    color: #08142f;
}

.tm-module-grid p {
    color: var(--muted);
}

.tm-module-grid span {
    color: var(--primary);
}

.tm-testimonials {
    margin-top: 72px;
}

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

.tm-quote-grid article {
    min-height: 190px;
    padding: 24px;
    background: #fff;
}

.tm-quote-grid strong {
    display: inline-flex;
    margin-bottom: 18px;
    border-radius: 999px;
    padding: 7px 10px;
    background: #eef5ff;
    color: var(--primary);
    font-size: 13px;
}

.tm-quote-grid p {
    margin: 0;
    color: #31405b;
    font-size: 18px;
    line-height: 1.55;
}

.tm-pricing .pricing-card {
    border-radius: 18px;
}

.tm-pricing .pricing-card.featured {
    transform: translateY(-10px);
    box-shadow: 0 22px 60px rgba(21, 94, 239, .16);
}

.tm-final-cta {
    border-radius: 26px;
    background: #08142f;
    box-shadow: 0 28px 80px rgba(8, 20, 47, .18);
}

@media (max-width: 980px) {
    .tm-hero,
    .tm-module-grid,
    .tm-quote-grid {
        grid-template-columns: 1fr;
    }

    .tm-hero {
        min-height: 0;
    }

    .tm-module-grid article.wide {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .public-body {
        padding-top: 124px;
    }

    .public-nav {
        align-items: stretch;
        padding: 10px;
    }

    .public-nav nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .public-nav nav a {
        justify-content: center;
        text-align: center;
    }

    .public-nav nav a:nth-child(2),
    .public-nav nav a:nth-child(3) {
        display: none;
    }

    .tm-hero h1 {
        font-size: 40px;
    }
}

/* Fakturo reference landing page */
.landing-page {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 36%, #ffffff 74%);
    color: #08142f;
    font-family: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.landing-page * {
    box-sizing: border-box;
}

.landing-page svg {
    width: 18px;
    height: 18px;
}

.lp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    min-height: 86px;
    padding: 0 max(48px, calc((100vw - 1320px) / 2));
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(16px);
}

.lp-logo {
    display: inline-flex;
    align-items: center;
    width: fit-content;
}

.lp-logo img {
    width: 150px;
    height: auto;
}

.lp-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
}

.lp-nav a {
    position: relative;
    padding: 30px 0 24px;
    color: #08142f;
    font-size: 15px;
    font-weight: 800;
}

.lp-nav a.active,
.lp-nav a:hover {
    color: #155eef;
}

.lp-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    height: 3px;
    border-radius: 999px;
    background: #155eef;
}

.lp-header-actions,
.lp-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    border-radius: 8px;
    padding: 0 22px;
    border: 1px solid #d7e0ef;
    background: #fff;
    color: #08142f;
    box-shadow: 0 8px 18px rgba(8, 20, 47, .06);
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.lp-btn-primary {
    border-color: #155eef;
    background: #155eef;
    color: #fff;
    box-shadow: 0 14px 34px rgba(21, 94, 239, .24);
}

.lp-btn-light,
.lp-btn-outline {
    background: #fff;
    color: #155eef;
}

.lp-btn-large {
    min-height: 52px;
    padding: 0 26px;
}

.lp-hero {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(560px, 1.08fr);
    align-items: center;
    gap: 34px;
    width: min(1320px, calc(100% - 96px));
    margin: 0 auto;
    padding: 74px 0 58px;
}

.lp-hero-copy h1 {
    margin: 0;
    max-width: 610px;
    color: #08142f;
    font-size: 52px;
    line-height: 1.08;
    font-weight: 900;
}

.lp-hero-copy p {
    max-width: 570px;
    margin: 30px 0 28px;
    color: #51617a;
    font-size: 20px;
    line-height: 1.55;
}

.lp-hero-copy .lp-hero-actions {
    justify-content: flex-start;
}

.lp-feature-strip {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 16px;
    width: fit-content;
    margin-top: 74px;
    padding: 15px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(8, 20, 47, .08);
}

.lp-feature-strip span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.lp-feature-strip .red svg { color: #ef4444; }
.lp-feature-strip .green svg { color: #16a34a; }
.lp-feature-strip .blue svg { color: #155eef; }
.lp-feature-strip .purple svg { color: #6d5dfc; }

.lp-hero-visual {
    position: relative;
    min-height: 520px;
}

.lp-dashboard-card,
.lp-invoice-preview,
.lp-feature-card,
.lp-step-card,
.lp-plan,
.lp-accordion details {
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 18px 46px rgba(8, 20, 47, .08);
}

.lp-dashboard-card {
    width: 390px;
    min-height: 460px;
    margin: 25px 0 0 12px;
    padding: 22px;
    border-radius: 12px;
}

.lp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lp-card-head h2 {
    margin: 0;
    font-size: 18px;
}

.lp-card-head button {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 10px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
}

.lp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.lp-kpi-grid div {
    min-height: 88px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.lp-kpi-grid span,
.lp-invoice-meta span,
.lp-parties span,
.lp-invoice-top span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.lp-kpi-grid strong {
    display: block;
    margin: 10px 0 5px;
    font-size: 20px;
}

.lp-kpi-grid em {
    font-style: normal;
    font-size: 10px;
    font-weight: 800;
}

.lp-kpi-grid .up { color: #16a34a; }
.lp-kpi-grid .down { color: #f97316; }

.lp-chart-card {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.lp-chart-card > strong {
    display: block;
    margin-bottom: 12px;
}

.lp-chart {
    position: relative;
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    height: 138px;
    color: #94a3b8;
    font-size: 10px;
}

.lp-chart::before {
    content: "";
    position: absolute;
    inset: 0 0 0 42px;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, #e8eef8 34px);
}

.lp-chart svg {
    position: absolute;
    inset: 8px 0 10px 42px;
    width: calc(100% - 42px);
    height: calc(100% - 18px);
}

.lp-chart path {
    fill: none;
    stroke: #155eef;
    stroke-width: 4;
}

.lp-chart-labels {
    display: flex;
    justify-content: space-between;
    padding-left: 42px;
    color: #64748b;
    font-size: 10px;
}

.lp-invoice-preview {
    position: absolute;
    top: 0;
    right: 0;
    width: 405px;
    min-height: 520px;
    overflow: hidden;
    border-radius: 12px;
}

.lp-invoice-line {
    height: 5px;
    background: #155eef;
}

.lp-invoice-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 22px 14px;
}

.lp-invoice-top img {
    width: 118px;
}

.lp-invoice-top div {
    text-align: right;
}

.lp-invoice-top strong {
    font-size: 22px;
}

.lp-invoice-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0 22px 16px;
}

.lp-invoice-meta strong {
    display: block;
    margin-top: 5px;
    font-size: 11px;
}

.lp-invoice-meta .paid {
    color: #16a34a;
}

.lp-parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 22px 14px;
}

.lp-parties div {
    min-height: 98px;
    padding: 11px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.lp-parties strong {
    display: block;
    margin: 6px 0;
    font-size: 12px;
}

.lp-parties small {
    color: #64748b;
    font-size: 10px;
    line-height: 1.45;
}

.lp-invoice-table {
    width: calc(100% - 44px);
    margin: 0 22px;
    border-collapse: collapse;
    font-size: 10px;
}

.lp-invoice-table th,
.lp-invoice-table td {
    padding: 7px 5px;
    border-bottom: 1px solid #e8eef8;
    text-align: left;
}

.lp-invoice-table th {
    color: #64748b;
    font-weight: 900;
}

.lp-invoice-table th:nth-child(n+3),
.lp-invoice-table td:nth-child(n+3),
.lp-invoice-table th:last-child,
.lp-invoice-table td:last-child {
    text-align: right;
}

.lp-invoice-totals {
    display: grid;
    gap: 8px;
    margin: 16px 22px;
    padding-left: 170px;
    font-size: 11px;
}

.lp-invoice-totals span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.lp-invoice-totals .total {
    color: #155eef;
    font-size: 14px;
    font-weight: 900;
}

.lp-payment-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px 58px;
    align-items: center;
    gap: 12px;
    margin: 0 22px 20px;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fbfdff;
}

.lp-payment-box strong,
.lp-payment-box span {
    display: block;
    color: #08142f;
    font-size: 10px;
}

.lp-payment-box div span {
    margin-top: 6px;
    color: #64748b;
    line-height: 1.45;
}

.lp-qr {
    width: 58px;
    height: 58px;
    background:
        linear-gradient(90deg, #08142f 50%, transparent 0) 0 0 / 12px 12px,
        linear-gradient(#08142f 50%, transparent 0) 0 0 / 12px 12px,
        #fff;
    border: 5px solid #fff;
    box-shadow: inset 0 0 0 1px #08142f;
}

.lp-features,
.lp-how,
.lp-pricing,
.lp-faq,
.lp-footer-main,
.lp-footer-bottom {
    width: min(1320px, calc(100% - 96px));
    margin-left: auto;
    margin-right: auto;
}

.lp-features {
    padding: 18px 0 34px;
}

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

.lp-feature-card {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 18px;
    min-height: 112px;
    padding: 16px;
    border-radius: 10px;
}

.lp-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 14px;
    background: #edf5ff;
    color: #155eef;
}

.lp-icon.trend { background: #ecfdf5; color: #16a34a; }
.lp-icon.code { background: #f5f3ff; color: #6d5dfc; }

.lp-feature-card h3,
.lp-step-card h3 {
    margin: 0 0 9px;
    color: #08142f;
    font-size: 17px;
}

.lp-feature-card p,
.lp-step-card p,
.lp-plan p,
.lp-faq-copy p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.lp-how {
    padding: 14px 0 32px;
    text-align: center;
}

.lp-how > h2,
.lp-pricing > h2 {
    margin: 0 0 24px;
    font-size: 28px;
    line-height: 1.2;
}

.lp-steps {
    display: grid;
    grid-template-columns: 1fr 58px 1fr 58px 1fr;
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
}

.lp-step-card {
    position: relative;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 18px;
    min-height: 120px;
    padding: 20px 18px;
    border-radius: 10px;
    text-align: left;
}

.lp-step-number {
    position: absolute;
    top: 14px;
    left: 14px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: #155eef;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.lp-step-card .lp-icon {
    margin-left: 42px;
}

.lp-dotted-arrow {
    height: 2px;
    background-image: linear-gradient(90deg, #94a3b8 45%, transparent 45%);
    background-size: 8px 2px;
    position: relative;
}

.lp-dotted-arrow::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -5px;
    width: 10px;
    height: 10px;
    border-top: 2px solid #94a3b8;
    border-right: 2px solid #94a3b8;
    transform: rotate(45deg);
}

.lp-pricing {
    padding: 10px 0 34px;
    text-align: center;
}

.lp-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px;
    max-width: 1060px;
    margin: 0 auto;
}

.lp-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 270px;
    padding: 24px;
    border-radius: 10px;
    text-align: left;
}

.lp-plan.featured {
    border: 2px solid #155eef;
    box-shadow: 0 24px 58px rgba(21, 94, 239, .16);
}

.lp-popular {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 7px;
    padding: 8px 38px;
    background: #155eef;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.lp-plan h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.lp-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.lp-price strong {
    font-size: 38px;
    line-height: 1;
}

.lp-price span {
    color: #64748b;
}

.lp-plan ul {
    display: grid;
    gap: 9px;
    margin: 22px 0 24px;
    padding: 0;
    list-style: none;
}

.lp-plan li {
    position: relative;
    padding-left: 24px;
    color: #08142f;
    font-size: 14px;
}

.lp-plan li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 900;
}

.lp-plan .lp-btn {
    margin-top: auto;
    width: 100%;
}

.lp-faq {
    display: grid;
    grid-template-columns: .72fr 1.28fr;
    gap: 48px;
    padding: 28px 0 26px;
}

.lp-faq-copy h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.lp-faq-copy a {
    display: inline-flex;
    margin-top: 22px;
    color: #155eef;
    font-weight: 900;
}

.lp-accordion {
    display: grid;
}

.lp-accordion details {
    border-radius: 0;
    box-shadow: none;
}

.lp-accordion details:first-child {
    border-radius: 10px 10px 0 0;
}

.lp-accordion details:last-child {
    border-radius: 0 0 10px 10px;
}

.lp-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 22px;
    cursor: pointer;
    color: #08142f;
    font-size: 15px;
    font-weight: 800;
    list-style: none;
}

.lp-accordion summary::-webkit-details-marker {
    display: none;
}

.lp-accordion summary::after {
    content: "⌄";
    color: #08142f;
    font-size: 20px;
}

.lp-accordion details[open] summary::after {
    transform: rotate(180deg);
}

.lp-accordion details p {
    margin: 0;
    padding: 0 22px 18px;
    color: #64748b;
    line-height: 1.55;
}

.lp-footer {
    margin-top: 18px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.lp-footer-main {
    display: grid;
    grid-template-columns: 1.5fr .72fr .72fr .72fr 1.5fr;
    gap: 44px;
    padding: 36px 0 28px;
}

.lp-footer-brand img {
    width: 142px;
}

.lp-footer-brand p {
    max-width: 220px;
    margin: 14px 0 18px;
    color: #64748b;
    line-height: 1.45;
}

.lp-footer-brand .lp-footer-company {
    max-width: 310px;
    margin-top: -8px;
    font-size: 12px;
}

.lp-socials {
    display: flex;
    gap: 10px;
}

.lp-socials span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 7px;
    background: #eef5ff;
    color: #155eef;
    font-size: 12px;
    font-weight: 900;
}

.lp-footer-main h3 {
    margin: 0 0 12px;
    color: #08142f;
    font-size: 13px;
}

.lp-footer-main a {
    display: block;
    margin: 8px 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.lp-newsletter h3 {
    max-width: 280px;
}

.lp-newsletter div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    overflow: hidden;
}

.lp-newsletter input {
    min-width: 0;
    border: 0;
    padding: 0 14px;
    outline: 0;
    color: #08142f;
}

.lp-newsletter button {
    border: 0;
    padding: 12px 18px;
    background: #155eef;
    color: #fff;
    font-weight: 900;
}

.lp-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0 20px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
}

.lp-footer-bottom div {
    display: flex;
    gap: 32px;
}

@media (max-width: 1180px) {
    .lp-header {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 14px 24px;
    }

    .lp-header-actions {
        justify-content: center;
    }

    .lp-hero {
        grid-template-columns: 1fr;
    }

    .lp-hero-visual {
        min-height: 610px;
    }

    .lp-dashboard-card {
        margin-left: 0;
    }

    .lp-invoice-preview {
        right: 0;
    }

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

    .lp-steps {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .lp-dotted-arrow {
        width: 2px;
        height: 38px;
        margin: 0 auto;
        background-image: linear-gradient(180deg, #94a3b8 45%, transparent 45%);
        background-size: 2px 8px;
    }

    .lp-dotted-arrow::after {
        right: -4px;
        top: auto;
        bottom: 0;
        transform: rotate(135deg);
    }

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

@media (max-width: 760px) {
    .lp-header {
        position: relative;
        top: auto;
        gap: 14px;
    }

    .lp-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 18px;
        width: 100%;
        text-align: center;
    }

    .lp-nav a {
        padding: 8px 0;
    }

    .lp-nav a.active::after {
        bottom: 2px;
    }

    .lp-header-actions,
    .lp-hero-actions {
        width: 100%;
    }

    .lp-header-actions .lp-btn,
    .lp-hero-actions .lp-btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .lp-hero,
    .lp-features,
    .lp-how,
    .lp-pricing,
    .lp-faq,
    .lp-footer-main,
    .lp-footer-bottom {
        width: min(100% - 32px, 1320px);
    }

    .lp-hero {
        padding-top: 44px;
    }

    .lp-hero-copy h1 {
        font-size: 40px;
    }

    .lp-hero-copy p {
        font-size: 17px;
    }

    .lp-feature-strip {
        grid-template-columns: 1fr;
        width: 100%;
        margin-top: 28px;
    }

    .lp-hero-visual {
        min-height: 0;
    }

    .lp-dashboard-card,
    .lp-invoice-preview {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin: 0 0 18px;
    }

    .lp-kpi-grid,
    .lp-invoice-meta,
    .lp-parties,
    .lp-feature-grid,
    .lp-pricing-grid,
    .lp-faq,
    .lp-footer-main {
        grid-template-columns: 1fr;
    }

    .lp-feature-card,
    .lp-step-card {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .lp-step-card .lp-icon {
        margin-left: 0;
        margin-top: 34px;
    }

    .lp-pricing-grid {
        gap: 18px;
    }

    .lp-invoice-top {
        padding: 18px 14px 12px;
    }

    .lp-invoice-meta,
    .lp-parties {
        padding-left: 14px;
        padding-right: 14px;
    }

    .lp-invoice-table {
        width: calc(100% - 28px);
        margin: 0 14px;
        font-size: 9px;
    }

    .lp-invoice-table th,
    .lp-invoice-table td {
        padding: 6px 3px;
        white-space: normal;
    }

    .lp-invoice-totals,
    .lp-payment-box {
        margin-left: 14px;
        margin-right: 14px;
    }

    .lp-invoice-totals {
        padding-left: 0;
    }

    .lp-payment-box,
    .lp-newsletter div,
    .lp-footer-bottom {
        grid-template-columns: 1fr;
    }

    .lp-footer-bottom,
    .lp-footer-bottom div {
        flex-direction: column;
        gap: 12px;
    }
}

/* Final app shell override: must stay after legacy and landing styles. */
.app-body {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    min-height: 100vh;
    overflow-x: hidden;
    background: #f7faff;
    color: #08142f;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100vh;
    padding: 24px 14px;
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
    background: #fff;
    color: #08142f;
    box-shadow: none;
}

.sidebar .brand,
.sidebar .brand:hover {
    display: block;
    width: fit-content;
    padding: 0 16px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.sidebar .brand img {
    width: 156px;
}

.company-switcher {
    display: none;
}

.app-nav {
    display: grid;
    gap: 8px;
}

.app-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 0 18px;
    border-radius: 10px;
    color: #365176;
    font-size: 15px;
    font-weight: 800;
}

.app-nav a::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
}

.app-nav a svg {
    color: #58719a;
}

.app-nav a.active,
.app-nav a:hover {
    background: #f1f6ff;
    color: #155eef;
}

.app-nav a.active::before {
    background: #155eef;
}

.app-nav a.active svg,
.app-nav a:hover svg {
    color: #155eef;
}

.sidebar-footer {
    display: grid;
    gap: 14px;
    margin-top: auto;
    color: #08142f;
}

.app-main {
    min-width: 0;
    padding: 0;
    background: #f7faff;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(280px, 520px) minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    min-height: 78px;
    margin: 0;
    padding: 0 28px;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: rgba(255, 255, 255, .94);
    box-shadow: none;
    backdrop-filter: blur(16px);
}

.topbar h1 {
    font-size: inherit;
}

.topbar-actions {
    justify-content: flex-end;
    gap: 18px;
}

@media (max-width: 1060px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 18px;
    }

    .sidebar .brand {
        padding: 0;
    }

    .app-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .app-nav a::before,
    .sidebar-footer {
        display: none;
    }

    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
}

@media (max-width: 760px) {
    .topbar {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
        padding: 12px 16px;
    }

    .topbar-actions {
        grid-column: 1 / -1;
        justify-content: space-between;
        width: 100%;
    }

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