:root {
    --app-bg: #F5F6FA;
    --app-panel: #FFFFFF;
    --app-ink: #101114;
    --app-muted: #68707D;
    --app-line: #E4E7EC;
    --app-blue: #0000FF;
    --app-orange: #FF6B00;
    --app-green: #10B981;
    --app-red: #EF4444;
    --app-yellow: #F59E0B;
    --app-shadow: 0 18px 48px rgba(16, 17, 20, 0.08);
}

body {
    background: var(--app-bg);
}

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

.app-sidebar {
    background: #FFFFFF;
    color: var(--app-ink);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--app-line);
    box-shadow: 8px 0 32px rgba(16, 17, 20, 0.04);
}

.app-brand {
    display: inline-flex;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--app-line);
}

.app-brand img {
    height: 48px;
    width: auto;
}

.role-switcher button,
.app-nav button,
.icon-btn {
    font: inherit;
    cursor: pointer;
}

.role-switcher button {
    border: 0;
    color: #9A3412;
    background: transparent;
    border-radius: 9px;
    padding: 0.55rem 0.4rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.role-switcher button.active {
    background: var(--app-orange);
    color: #FFFFFF;
}

.account-card {
    border: 1px solid #FED7AA;
    background: #FFF7ED;
    border-radius: 14px;
    padding: 0.9rem;
    display: grid;
    gap: 0.2rem;
}

.account-card span {
    color: #C2410C;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 900;
}

.account-card strong {
    color: var(--app-ink);
}

.account-card small {
    color: var(--app-muted);
}

.app-nav {
    display: grid;
    gap: 0.4rem;
}

.app-nav button {
    min-height: 45px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #3F4654;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    text-align: left;
    font-weight: 700;
}

.app-nav button.active,
.app-nav button:hover {
    color: #9A3412;
    background: #FFF4EC;
}

.nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #F3F4F6;
    color: var(--app-orange);
}

.sidebar-status {
    margin-top: auto;
    border-radius: 16px;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    padding: 1rem;
}

.sidebar-status span {
    display: block;
    color: #9A3412;
    font-size: 0.82rem;
}

.sidebar-status strong {
    display: block;
    margin: 0.25rem 0 0.75rem;
}

.mini-progress {
    height: 8px;
    background: #FFEDD5;
    border-radius: 999px;
    overflow: hidden;
}

.mini-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--app-orange), var(--app-green));
}

.app-main {
    min-width: 0;
}

.app-topbar {
    min-height: 88px;
    padding: 1.25rem 1.75rem;
    background: rgba(245, 246, 250, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--app-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 5;
}

.app-topbar span {
    color: var(--app-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 900;
}

.app-topbar h1 {
    margin: 0.15rem 0;
    font-size: 1.75rem;
}

.app-topbar p {
    margin: 0;
    color: var(--app-muted);
}

.topbar-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--app-line);
    background: #FFFFFF;
    font-size: 1.1rem;
}

.app-content {
    padding: 1.5rem 1.75rem 3rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

.cols-2 { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel,
.metric-card,
.task-card,
.upload-drop,
.chat-panel {
    background: var(--app-panel);
    border: 1px solid var(--app-line);
    border-radius: 16px;
    box-shadow: var(--app-shadow);
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--app-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.panel-header h2,
.panel-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.panel-header p {
    margin: 0.2rem 0 0;
    color: var(--app-muted);
}

.panel-body {
    padding: 1rem;
}

.metric-card {
    padding: 1rem;
}

.metric-card span {
    color: var(--app-muted);
    font-size: 0.85rem;
}

.metric-card strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    margin-top: 0.35rem;
}

.metric-card small {
    display: inline-flex;
    margin-top: 0.55rem;
    color: #047857;
    background: #D1FAE5;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-weight: 800;
}

.year-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    background: #FFFFFF;
    border: 1px solid var(--app-line);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    box-shadow: var(--app-shadow);
}

.year-nav label {
    display: block;
    color: var(--app-muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.45rem;
}

.year-buttons,
.quarter-buttons,
.module-tabs {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.year-buttons button,
.quarter-buttons button,
.module-tabs button {
    border: 1px solid var(--app-line);
    background: #FFFFFF;
    color: var(--app-ink);
    border-radius: 11px;
    padding: 0.55rem 0.8rem;
    min-height: 38px;
    font-weight: 800;
    cursor: pointer;
}

.year-buttons button.active,
.quarter-buttons button.active,
.module-tabs button.active {
    background: #EEF2FF;
    border-color: #C7D2FE;
    color: var(--app-blue);
}

.module-tabs {
    margin-bottom: 1rem;
    background: #FFFFFF;
    border: 1px solid var(--app-line);
    border-radius: 16px;
    padding: 0.65rem;
    box-shadow: var(--app-shadow);
}

.annual-panel {
    overflow: hidden;
}

.annual-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--app-line);
}

.quarter-card {
    appearance: none;
    border: 0;
    border-right: 1px solid var(--app-line);
    background: #FFFFFF;
    min-height: 300px;
    padding: 1.1rem;
    text-align: left;
    cursor: pointer;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.75rem;
}

.quarter-card:last-child {
    border-right: 0;
}

.quarter-card.active {
    box-shadow: inset 0 0 0 2px #BFDBFE;
    background: linear-gradient(180deg, #FFFFFF, #F8FBFF);
}

.quarter-title {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.quarter-title strong {
    font-family: var(--font-heading);
    font-size: 1.45rem;
}

.quarter-title span {
    color: var(--app-muted);
    font-weight: 800;
}

.mini-chart {
    width: 100%;
    height: 130px;
    align-self: center;
}

.chart-base {
    stroke: #EEF2F7;
    stroke-width: 1;
}

.chart-area {
    fill: rgba(14, 165, 233, 0.12);
    stroke: none;
}

.chart-line {
    fill: none;
    stroke: #7CC4E8;
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
}

.quarter-lines {
    display: grid;
    gap: 0.45rem;
}

.quarter-lines span {
    display: flex;
    justify-content: space-between;
    color: var(--app-muted);
    gap: 0.75rem;
}

.quarter-lines b {
    color: var(--app-ink);
}

.annual-details {
    padding: 1rem;
}

.annual-details h3 {
    margin: 0 0 0.85rem;
}

.finance-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.finance-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #EEF2F7;
}

.finance-list dt,
.finance-list dd {
    margin: 0;
}

.finance-list dt {
    color: var(--app-muted);
}

.finance-list dd {
    font-weight: 800;
    text-align: right;
}

.finance-list .total {
    margin-top: 0.5rem;
    padding: 0.8rem 0;
    border-bottom: 0;
    border-top: 1px solid var(--app-line);
}

.finance-list .total dt,
.finance-list .total dd {
    color: var(--app-ink);
    font-size: 1.05rem;
}

.soft-note {
    margin: 1rem 0 0;
    color: var(--app-muted);
    background: #F9FAFB;
    border-radius: 12px;
    padding: 0.85rem;
}

.upload-strip {
    min-height: 180px;
    border: 1px dashed #CBD5E1;
    border-radius: 14px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 0.45rem;
    padding: 1.5rem;
}

.upload-strip strong {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

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

.feature-panel {
    margin-top: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1rem;
}

.feature-card {
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: #FFFFFF;
    padding: 0.95rem;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.feature-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #F1F5F9;
    color: #0F1B4D;
    display: grid;
    place-items: center;
    font-weight: 900;
}

.feature-card strong {
    display: block;
}

.feature-card small {
    display: block;
    margin-top: 0.2rem;
    color: var(--app-muted);
    line-height: 1.4;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.green { background: #D1FAE5; color: #047857; }
.orange { background: #FFEDD5; color: #C2410C; }
.red { background: #FEE2E2; color: #B91C1C; }
.blue { background: #DBEAFE; color: #1D4ED8; }
.dark { background: #111827; color: #FFFFFF; }

.route-map {
    background: #090A12;
    color: #FFFFFF;
    border-radius: 16px;
    padding: 1.2rem;
    min-height: 100%;
}

.route-map h2 {
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.route-map p {
    color: rgba(255, 255, 255, 0.72);
}

.route-steps {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.route-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.step-dot {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--app-orange);
    font-weight: 900;
}

.list {
    display: grid;
    gap: 0.75rem;
}

.list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--app-line);
    border-radius: 12px;
    background: #FFFFFF;
}

.list-row strong {
    display: block;
}

.list-row small {
    color: var(--app-muted);
}

.progress-large {
    height: 12px;
    border-radius: 999px;
    background: #E5E7EB;
    overflow: hidden;
}

.progress-large span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--app-orange), var(--app-green));
}

.upload-drop {
    min-height: 230px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem;
    border-style: dashed;
}

.upload-drop i {
    font-size: 2rem;
    color: var(--app-blue);
}

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

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

th,
td {
    padding: 0.85rem;
    border-bottom: 1px solid var(--app-line);
    text-align: left;
}

th {
    color: var(--app-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
}

.amount {
    text-align: right;
}

.chat-panel {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 610px;
}

.messages {
    padding: 1rem;
    display: grid;
    gap: 0.8rem;
    align-content: start;
}

.message {
    max-width: 82%;
    border-radius: 14px;
    padding: 0.85rem;
    line-height: 1.45;
}

.message.agent {
    background: #EEF2FF;
}

.message.user {
    background: #090A12;
    color: #FFFFFF;
    justify-self: end;
}

.chat-form {
    border-top: 1px solid var(--app-line);
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
}

.chat-form input,
.inline-input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--app-line);
    border-radius: 12px;
    padding: 0.75rem;
    font: inherit;
}

.agent-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.agent-card {
    border: 1px solid var(--app-line);
    border-radius: 16px;
    padding: 1rem;
    background: #FFFFFF;
}

.agent-card i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--app-blue);
    color: #FFFFFF;
    margin-bottom: 0.8rem;
}

.decision-card {
    border-left: 5px solid var(--app-blue);
}

.decision-card.auto { border-left-color: var(--app-green); }
.decision-card.ask { border-left-color: var(--app-yellow); }
.decision-card.escalate { border-left-color: var(--app-red); }

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

.kanban-column {
    border: 1px solid var(--app-line);
    border-radius: 16px;
    background: #F9FAFB;
    padding: 1rem;
}

.kanban-column h3 {
    margin-bottom: 1rem;
}

.task-card {
    padding: 0.9rem;
    margin-bottom: 0.75rem;
    box-shadow: none;
}

.handoff {
    background: linear-gradient(135deg, #0000FF, #FF6B00);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 1.2rem;
}

.handoff h2 {
    color: #FFFFFF;
}

.handoff p {
    color: rgba(255, 255, 255, 0.82);
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 20;
    background: #090A12;
    color: #FFFFFF;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: var(--app-shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: 0.2s ease;
}

.toast.active {
    opacity: 1;
    transform: translateY(0);
}

.login-mode .app-frame {
    grid-template-columns: 1fr;
}

.login-mode .app-sidebar,
.login-mode .app-topbar {
    display: none;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 107, 0, 0.14), transparent 28%),
        radial-gradient(circle at 90% 20%, rgba(0, 0, 255, 0.08), transparent 24%),
        var(--app-bg);
}

.login-card {
    width: min(880px, 100%);
    background: #FFFFFF;
    border: 1px solid var(--app-line);
    border-radius: 22px;
    box-shadow: var(--app-shadow);
    padding: 2rem;
}

.login-card img {
    height: 54px;
    width: auto;
    margin-bottom: 1.5rem;
}

.login-card > span {
    display: inline-flex;
    color: var(--app-orange);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

.login-card h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0.35rem 0 0.8rem;
}

.login-card p {
    color: var(--app-muted);
    max-width: 620px;
}

.login-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.login-options button {
    border: 1px solid var(--app-line);
    background: #FFFFFF;
    border-radius: 16px;
    min-height: 160px;
    padding: 1.2rem;
    text-align: left;
    cursor: pointer;
}

.login-options button:hover {
    border-color: var(--app-orange);
    box-shadow: inset 0 0 0 1px var(--app-orange);
}

.login-options strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
}

.login-options small {
    display: block;
    margin-top: 0.5rem;
    color: var(--app-muted);
    line-height: 1.45;
}

.login-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
    margin-top: 1.4rem;
}

.demo-logins {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.demo-logins button {
    border: 1px solid var(--app-line);
    background: #FFFFFF;
    border-radius: 14px;
    padding: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.demo-logins button:hover {
    border-color: var(--app-orange);
}

.demo-logins strong,
.demo-logins small {
    display: block;
}

.demo-logins small {
    margin-top: 0.25rem;
    color: var(--app-muted);
}

.today-hero {
    border: 1px solid var(--app-line);
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: var(--app-shadow);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.today-hero span {
    color: var(--app-orange);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 900;
}

.today-hero h2 {
    margin: 0.25rem 0;
    font-size: clamp(1.35rem, 3vw, 2.2rem);
}

.today-hero p {
    margin: 0;
    color: var(--app-muted);
}

.today-hero > strong {
    min-width: 96px;
    height: 96px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #FFF4EC;
    color: #C2410C;
    font-size: 1.35rem;
}

.checklist-list {
    display: grid;
    gap: 0.75rem;
}

.check-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    padding: 0.85rem;
    background: #FFFFFF;
}

.check-item label {
    display: grid;
    place-items: center;
}

.check-item input {
    width: 22px;
    height: 22px;
    accent-color: var(--app-orange);
}

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

.check-item small {
    margin-top: 0.2rem;
    color: var(--app-muted);
}

.check-item.done {
    background: #F0FDF4;
}

.check-item.done strong {
    text-decoration: line-through;
    color: #047857;
}

.period-tabs {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.period-tabs button {
    border: 1px solid var(--app-line);
    background: #FFFFFF;
    color: var(--app-ink);
    border-radius: 11px;
    padding: 0.55rem 0.8rem;
    min-height: 38px;
    font-weight: 800;
    cursor: pointer;
}

.period-tabs button.active {
    background: #FFF4EC;
    border-color: #FDBA74;
    color: #C2410C;
}

.single-chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 1rem;
    padding: 1rem;
}

.large-chart {
    min-height: 310px;
    border: 1px solid var(--app-line);
    border-radius: 16px;
    background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
    padding: 1rem;
}

.bar-chart {
    height: 280px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(46px, 1fr);
    gap: 0.75rem;
    align-items: end;
}

.bar-item {
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 0.55rem;
    align-items: end;
}

.bar-item span {
    width: 100%;
    border-radius: 12px 12px 4px 4px;
    background: linear-gradient(180deg, #FF6B00, #0000FF);
    min-height: 8px;
}

.bar-item small {
    color: var(--app-muted);
    text-align: center;
    font-weight: 800;
}

.period-summary {
    border: 1px solid var(--app-line);
    border-radius: 16px;
    padding: 1rem;
    background: #FFFFFF;
}

.period-summary h3 {
    margin: 0.75rem 0;
}

.invoice-start,
.bank-connect {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.invoice-start h2,
.bank-connect h2 {
    margin: 0 0 0.35rem;
}

.invoice-start p,
.bank-connect p {
    margin: 0;
    color: var(--app-muted);
}

.invoice-builder {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 1rem;
    align-items: start;
}

.form-grid-app {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.app-field {
    display: grid;
    gap: 0.4rem;
}

.app-field span {
    color: #384150;
    font-weight: 800;
    font-size: 0.88rem;
}

.app-field input,
.app-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--app-line);
    border-radius: 12px;
    padding: 0.75rem;
    font: inherit;
    background: #FFFFFF;
}

.invoice-tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.file-btn input {
    display: none;
}

.toggle-line {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--app-muted);
    font-weight: 700;
}

.invoice-total-box {
    display: grid;
    gap: 0.45rem;
    background: #F9FAFB;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    padding: 0.9rem;
    margin-bottom: 1rem;
}

.invoice-total-box span {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.invoice-preview {
    padding: 1rem;
}

.invoice-paper {
    background: #FFFFFF;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    min-height: 600px;
    padding: 1.4rem;
}

.invoice-paper-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 3px solid var(--app-orange);
    padding-bottom: 1rem;
}

.invoice-logo {
    min-width: 120px;
    min-height: 60px;
    display: grid;
    place-items: center;
    background: #F9FAFB;
    border-radius: 12px;
    overflow: hidden;
}

.invoice-logo img {
    max-height: 74px;
    width: auto;
}

.invoice-paper-top h2 {
    margin: 0;
    color: #0F1B4D;
}

.invoice-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.25rem 0;
}

.invoice-addresses div {
    display: grid;
    gap: 0.25rem;
}

.invoice-addresses span {
    color: var(--app-muted);
}

.invoice-lines {
    min-width: 0;
}

.invoice-lines th,
.invoice-lines td {
    padding: 0.75rem 0.5rem;
}

.invoice-preview-total {
    margin-top: 1.25rem;
    margin-left: auto;
    width: min(280px, 100%);
    background: #FFF7ED;
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.invoice-preview-total strong {
    color: #9A3412;
}

@media (max-width: 1180px) {
    .cols-4,
    .cols-3,
    .cols-2,
    .agent-flow,
    .kanban,
    .annual-grid,
    .feature-grid,
    .invoice-builder,
    .single-chart-layout {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

    .app-topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .cols-4,
    .cols-3,
    .cols-2,
    .agent-flow,
    .kanban,
    .annual-grid,
    .feature-grid,
    .invoice-builder,
    .form-grid-app,
    .login-options,
    .login-form,
    .demo-logins,
    .single-chart-layout {
        grid-template-columns: 1fr;
    }

    .year-nav {
        align-items: stretch;
        flex-direction: column;
    }

    .quarter-card {
        border-right: 0;
        border-bottom: 1px solid var(--app-line);
    }

    .route-step,
    .list-row,
    .check-item,
    .invoice-start,
    .bank-connect,
    .invoice-addresses {
        grid-template-columns: 1fr;
        display: grid;
    }

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