:root {
    --bg: #11131a;
    --bg-alt: #171a23;
    --surface: rgba(27, 31, 42, 0.92);
    --surface-strong: #212534;
    --surface-soft: rgba(35, 40, 54, 0.96);
    --ink: #f3f4f6;
    --muted: #9ca3b3;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --mint: #4cb69f;
    --mint-soft: rgba(76, 182, 159, 0.18);
    --blue: #6f9df5;
    --blue-soft: rgba(111, 157, 245, 0.2);
    --peach: #f3b37a;
    --peach-soft: rgba(243, 179, 122, 0.18);
    --rose: #eb8e93;
    --rose-soft: rgba(235, 142, 147, 0.18);
    --amber: #e9c46a;
    --amber-soft: rgba(233, 196, 106, 0.2);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    --radius: 22px;
    --body-background:
        radial-gradient(circle at top left, rgba(76, 182, 159, 0.16), transparent 24%),
        radial-gradient(circle at top right, rgba(111, 157, 245, 0.16), transparent 22%),
        linear-gradient(180deg, #0e1017 0%, #131723 52%, #0f1118 100%);
    --grid-line-color: rgba(255, 255, 255, 0.02);
    --sidebar-background: linear-gradient(180deg, rgba(24, 28, 39, 0.98), rgba(19, 22, 31, 0.98));
    --nav-item-bg: rgba(255, 255, 255, 0.03);
    --nav-item-active-bg: rgba(255, 255, 255, 0.06);
    --sidebar-section-bg: rgba(255, 255, 255, 0.03);
    --sidebar-section-border: rgba(255, 255, 255, 0.06);
    --sidebar-note-bg: rgba(255, 255, 255, 0.04);
    --eyebrow-bg: rgba(255, 255, 255, 0.06);
    --eyebrow-ink: #d1d5db;
    --hero-panel-bg: linear-gradient(135deg, rgba(26, 30, 41, 0.98), rgba(31, 35, 48, 0.96));
    --summary-card-bg: rgba(255, 255, 255, 0.04);
    --summary-card-spotlight-bg: linear-gradient(145deg, rgba(76, 182, 159, 0.2), rgba(111, 157, 245, 0.12), rgba(32, 37, 50, 0.98));
    --summary-card-mint-bg: linear-gradient(145deg, rgba(76, 182, 159, 0.14), rgba(31, 37, 51, 0.98));
    --modal-backdrop-bg: rgba(4, 6, 12, 0.66);
    --modal-card-bg:
        radial-gradient(circle at top right, rgba(111, 157, 245, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(37, 42, 58, 0.98), rgba(28, 32, 44, 0.98));
    --modal-card-border: rgba(255, 255, 255, 0.1);
    --form-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
    --form-card-border: rgba(255, 255, 255, 0.06);
    --form-label-ink: #f8fafc;
    --field-bg: rgba(255, 255, 255, 0.055);
    --field-border: rgba(255, 255, 255, 0.1);
    --field-focus-bg: rgba(255, 255, 255, 0.07);
    --field-placeholder: #a4adbd;
    --field-arrow: #cbd5e1;
    --field-shadow: 0 0 0 4px rgba(111, 157, 245, 0.12), 0 16px 32px rgba(0, 0, 0, 0.16);
}

html[data-theme="light"] {
    --bg: #eef2f7;
    --bg-alt: #e5ebf3;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-strong: #f7f9fc;
    --surface-soft: rgba(246, 249, 253, 0.98);
    --ink: #162033;
    --muted: #667085;
    --line: rgba(15, 23, 42, 0.08);
    --line-strong: rgba(15, 23, 42, 0.14);
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    --body-background:
        radial-gradient(circle at top left, rgba(76, 182, 159, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(111, 157, 245, 0.13), transparent 22%),
        linear-gradient(180deg, #f7fafc 0%, #eef3f8 52%, #e9eef5 100%);
    --grid-line-color: rgba(15, 23, 42, 0.045);
    --sidebar-background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(242, 246, 251, 0.98));
    --nav-item-bg: rgba(15, 23, 42, 0.035);
    --nav-item-active-bg: rgba(111, 157, 245, 0.12);
    --sidebar-section-bg: rgba(15, 23, 42, 0.035);
    --sidebar-section-border: rgba(15, 23, 42, 0.08);
    --sidebar-note-bg: rgba(255, 255, 255, 0.86);
    --eyebrow-bg: rgba(111, 157, 245, 0.1);
    --eyebrow-ink: #36527d;
    --hero-panel-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 252, 0.96));
    --summary-card-bg: rgba(255, 255, 255, 0.9);
    --summary-card-spotlight-bg: linear-gradient(145deg, rgba(76, 182, 159, 0.14), rgba(111, 157, 245, 0.12), rgba(255, 255, 255, 0.98));
    --summary-card-mint-bg: linear-gradient(145deg, rgba(76, 182, 159, 0.12), rgba(255, 255, 255, 0.98));
    --modal-backdrop-bg: rgba(226, 232, 240, 0.66);
    --modal-card-bg:
        radial-gradient(circle at top right, rgba(111, 157, 245, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.98));
    --modal-card-border: rgba(15, 23, 42, 0.1);
    --form-card-bg: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(242, 246, 250, 0.96));
    --form-card-border: rgba(15, 23, 42, 0.08);
    --form-label-ink: #172133;
    --field-bg: rgba(255, 255, 255, 0.92);
    --field-border: rgba(15, 23, 42, 0.12);
    --field-focus-bg: rgba(255, 255, 255, 0.98);
    --field-placeholder: #7a8699;
    --field-arrow: #51627d;
    --field-shadow: 0 0 0 4px rgba(111, 157, 245, 0.14), 0 14px 28px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--body-background);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    pointer-events: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

.app-shell {
    width: min(1500px, calc(100% - 36px));
    margin: 0 auto;
    padding: 24px 0 40px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
    position: relative;
    z-index: 1;
    overflow-x: clip;
    transition: grid-template-columns 220ms ease;
}

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

.sidebar,
.panel,
.message,
.modal-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    display: grid;
    gap: 16px;
    background: var(--sidebar-background);
}

.sidebar-top,
.sidebar-section,
.sidebar-info-list,
.sidebar-nav,
.workspace,
.messages,
.balance-grid,
.due-list,
.months-list,
.type-cards,
.year-summary,
.future-stack,
.draggable-list,
.bank-balance-grid,
.alert-list {
    display: grid;
    gap: 14px;
}

.workspace,
.sidebar-nav,
.sidebar-info-list,
.sidebar-section,
.sidebar-info,
.sidebar-note {
    min-width: 0;
}

.workspace {
    overflow-x: hidden;
}

.sidebar-header,
.panel-header,
.panel-tools,
.card-top,
.month-meta,
.balance-line,
.due-item,
.year-summary > div,
.bank-actions,
.subheading,
.alert-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-header {
    align-items: center;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mint), var(--blue));
    box-shadow: 0 8px 22px rgba(76, 182, 159, 0.35);
    flex: 0 0 auto;
}

.brand-copy strong,
.summary-card strong,
.metric-card strong,
.balance-line strong,
.type-card strong,
.year-summary strong,
.future-card strong,
.sidebar-info strong,
.balance-chip strong {
    display: block;
}

.brand-copy small,
.sidebar-section-title small,
.nav-item small,
.summary-card p,
.metric-card p,
.panel p,
.future-card p,
.sidebar-note p,
.section-heading p,
.alert-item p,
small {
    color: var(--muted);
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
}

.sidebar-toggle span {
    display: block;
    width: 8px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #7d8598, #d1d5db);
}

.sidebar-button {
    width: 100%;
}

.nav-item {
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: var(--nav-item-bg);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-item strong {
    display: block;
    margin-bottom: 4px;
}

.nav-item:hover,
.nav-item.is-active {
    transform: translateY(-1px);
    border-color: var(--line-strong);
    background: var(--nav-item-active-bg);
}

.sidebar-section {
    padding: 16px;
    border-radius: 18px;
    background: var(--sidebar-section-bg);
    border: 1px solid var(--sidebar-section-border);
}

.sidebar-section-title span,
.metric-label,
.sidebar-info span,
.future-card span,
.type-card span,
.summary-card span,
.year-summary span,
.balance-line span,
.balance-chip span {
    font-size: 0.92rem;
    color: var(--muted);
}

.sidebar-info-list {
    grid-template-columns: 1fr;
    gap: 12px;
}

.sidebar-info,
.sidebar-note {
    padding: 14px;
    border-radius: 16px;
    background: var(--sidebar-note-bg);
    border: 1px solid var(--line);
}

.theme-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.theme-switch-copy {
    min-width: 0;
}

.theme-switch-copy strong {
    display: block;
    margin-bottom: 6px;
}

.theme-switch-copy p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.sidebar-info {
    gap: 8px;
    align-content: start;
}

.sidebar-info strong {
    font-size: clamp(0.82rem, 0.52rem + 0.38vw, 0.96rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    margin-left: 6px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.role-pill.is-admin {
    color: #d8e5ff;
    background: rgba(111, 157, 245, 0.2);
    border: 1px solid rgba(111, 157, 245, 0.24);
}

.role-pill.is-daily {
    color: #cdeee7;
    background: rgba(76, 182, 159, 0.18);
    border: 1px solid rgba(76, 182, 159, 0.24);
}

.sidebar-info.mint {
    background: linear-gradient(180deg, rgba(76, 182, 159, 0.16), rgba(34, 39, 53, 0.96));
}

.sidebar-info.blue {
    background: linear-gradient(180deg, rgba(111, 157, 245, 0.16), rgba(34, 39, 53, 0.96));
}

.sidebar-info.peach {
    background: linear-gradient(180deg, rgba(243, 179, 122, 0.16), rgba(34, 39, 53, 0.96));
}

.sidebar-extra {
    display: none;
}

.app-shell.sidebar-wide .sidebar-extra {
    display: grid;
}

.app-shell.sidebar-wide .sidebar-info-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.messages {
    display: grid;
    gap: 10px;
}

.message {
    padding: 14px 18px;
}

.message.success {
    background: rgba(76, 182, 159, 0.14);
    border-color: rgba(76, 182, 159, 0.24);
}

.message.error {
    background: rgba(235, 142, 147, 0.14);
    border-color: rgba(235, 142, 147, 0.26);
}

.hero-panel {
    padding: 28px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    background: var(--hero-panel-bg);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--eyebrow-bg);
    color: var(--eyebrow-ink);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2,
.panel h2 {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    letter-spacing: -0.04em;
}

.hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.7rem, 4vw, 4.2rem);
    line-height: 0.95;
}

.quick-actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-summary {
    display: grid;
    gap: 14px;
    align-content: start;
}

.summary-card {
    position: relative;
    overflow: hidden;
    padding: 20px 20px 22px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: var(--summary-card-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.summary-card::before,
.metric-card::before {
    content: "";
    position: absolute;
    inset: auto auto 0 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 68%);
    transform: translate(-32%, 38%);
    pointer-events: none;
}

.summary-card.spotlight {
    background: var(--summary-card-spotlight-bg);
}

.summary-card.mint-tint {
    background: var(--summary-card-mint-bg);
}

.summary-card strong {
    font-size: clamp(1.8rem, 2.6vw, 2.8rem);
    letter-spacing: -0.05em;
    line-height: 0.95;
}

.summary-card p {
    max-width: 26ch;
    line-height: 1.5;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 2px;
}

.zone-heading {
    position: relative;
    margin-top: 8px;
    padding: 20px 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.zone-heading::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 22px;
    width: 88px;
    height: 2px;
    border-radius: 999px;
}

.zone-heading h2 {
    font-size: clamp(1.7rem, 2.4vw, 2.3rem);
}

.zone-heading p {
    max-width: 62ch;
    margin: 0;
}

.zone-heading-operativa::before {
    background: linear-gradient(90deg, var(--mint), rgba(76, 182, 159, 0.1));
}

.zone-heading-analitica::before {
    background: linear-gradient(90deg, var(--blue), rgba(111, 157, 245, 0.1));
}

.zone-heading-contexto::before {
    background: linear-gradient(90deg, var(--peach), rgba(243, 179, 122, 0.12));
}

.metric-grid,
.workspace-grid,
.three-column-grid,
.lower-grid,
.two-column-grid {
    display: grid;
    gap: 20px;
}

.zone-heading-operativa .eyebrow {
    background: rgba(76, 182, 159, 0.14);
    color: #b8f0e4;
}

.zone-heading-analitica .eyebrow {
    background: rgba(111, 157, 245, 0.16);
    color: #d6e3ff;
}

.zone-heading-contexto .eyebrow {
    background: rgba(243, 179, 122, 0.15);
    color: #ffe1be;
}

.zone-grid {
    position: relative;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.zone-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0.9;
}

.zone-grid-operativa {
    background:
        radial-gradient(circle at top left, rgba(76, 182, 159, 0.09), transparent 35%),
        rgba(255, 255, 255, 0.02);
}

.zone-grid-operativa-main {
    background:
        radial-gradient(circle at top left, rgba(76, 182, 159, 0.08), transparent 28%),
        radial-gradient(circle at bottom right, rgba(111, 157, 245, 0.06), transparent 24%),
        rgba(255, 255, 255, 0.02);
}

.zone-grid-analitica {
    background:
        radial-gradient(circle at top right, rgba(111, 157, 245, 0.09), transparent 34%),
        rgba(255, 255, 255, 0.02);
}

.zone-grid-contexto {
    background:
        radial-gradient(circle at top left, rgba(243, 179, 122, 0.07), transparent 30%),
        rgba(255, 255, 255, 0.02);
}

.zone-grid-operativa .board-card,
.zone-grid-operativa-main .board-card {
    border-color: rgba(76, 182, 159, 0.08);
}

.zone-grid-analitica .board-card {
    border-color: rgba(111, 157, 245, 0.1);
}

.zone-grid-contexto .board-card {
    border-color: rgba(243, 179, 122, 0.1);
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

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

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

.lower-grid {
    grid-template-columns: 1.2fr 0.8fr;
}

.panel {
    padding: 22px;
}

.metric-card,
.board-card {
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card:hover,
.board-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 158px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
    border-color: rgba(255, 255, 255, 0.08);
}

.zone-grid .metric-card,
.zone-grid .board-card {
    backdrop-filter: blur(8px);
}

.zone-grid .panel-header {
    margin-bottom: 18px;
}

.zone-grid .panel-header h2 {
    font-size: 1.45rem;
}

.zone-grid .eyebrow {
    margin-bottom: 10px;
}

.metric-card.mint {
    background: linear-gradient(180deg, rgba(76, 182, 159, 0.16), rgba(30, 34, 46, 0.96));
}

.metric-card.blue {
    background: linear-gradient(180deg, rgba(111, 157, 245, 0.16), rgba(30, 34, 46, 0.96));
}

.metric-card.amber {
    background: linear-gradient(180deg, rgba(233, 196, 106, 0.18), rgba(30, 34, 46, 0.96));
}

.metric-card.rose {
    background: linear-gradient(180deg, rgba(235, 142, 147, 0.16), rgba(30, 34, 46, 0.96));
}

.metric-card strong,
.type-card strong,
.year-summary strong,
.future-card strong,
.balance-chip strong {
    font-size: 1.65rem;
    letter-spacing: -0.05em;
    line-height: 1;
    margin: 2px 0 0;
}

.metric-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-card p {
    margin: 6px 0 0;
    max-width: 22ch;
    line-height: 1.45;
}

.drag-handle {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    padding: 6px 9px;
    cursor: grab;
    line-height: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

[data-draggable-card].is-dragging {
    opacity: 0.55;
    transform: rotate(1deg);
}

[data-draggable-card].drag-target {
    border-color: rgba(111, 157, 245, 0.4);
    box-shadow: 0 14px 34px rgba(111, 157, 245, 0.16);
}

.panel-tag,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
}

.panel-tag {
    background: var(--blue-soft);
    color: #c7d7ff;
    font-weight: 600;
}

.balance-line,
.due-item,
.year-summary > div,
.type-card,
.future-card,
.balance-chip,
.alert-item {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.zone-grid .balance-line,
.zone-grid .due-item,
.zone-grid .year-summary > div,
.zone-grid .type-card,
.zone-grid .future-card,
.zone-grid .balance-chip,
.zone-grid .alert-item {
    background: rgba(255, 255, 255, 0.045);
}

.balance-line.emphasis.mint {
    background: linear-gradient(135deg, rgba(76, 182, 159, 0.18), rgba(255, 255, 255, 0.02));
}

.balance-chip.mint,
.type-card.positive,
.future-card.mint {
    background: linear-gradient(180deg, rgba(76, 182, 159, 0.18), rgba(35, 40, 54, 0.96));
}

.balance-chip.blue,
.type-card.neutral,
.future-card.blue {
    background: linear-gradient(180deg, rgba(111, 157, 245, 0.18), rgba(35, 40, 54, 0.96));
}

.balance-chip.amber,
.type-card.warning {
    background: linear-gradient(180deg, rgba(233, 196, 106, 0.18), rgba(35, 40, 54, 0.96));
}

.balance-chip.rose,
.type-card.negative,
.future-card.peach {
    background: linear-gradient(180deg, rgba(235, 142, 147, 0.18), rgba(35, 40, 54, 0.96));
}

.due-item {
    align-items: center;
}

.due-item.is-overdue,
.alert-item.is-overdue {
    background: linear-gradient(135deg, rgba(235, 142, 147, 0.18), rgba(35, 40, 54, 0.96));
}

.recurring-item.is-active {
    background: linear-gradient(135deg, rgba(76, 182, 159, 0.16), rgba(35, 40, 54, 0.96));
}

.recurring-item.is-paused {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(35, 40, 54, 0.96));
}

.due-item p,
.alert-item p,
td p {
    margin: 4px 0 0;
    color: var(--muted);
}

.due-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.history-resend-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.history-resend-form .field-input {
    min-height: 46px;
    padding: 10px 14px;
}

.history-download-row {
    margin-top: 10px;
}

.bank-grid {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 14px;
    margin-bottom: 16px;
}

.bank-grid label,
.form-grid label {
    display: block;
    margin-bottom: 14px;
    font-weight: 600;
}

.bank-actions {
    justify-content: flex-end;
    margin-bottom: 16px;
}

.subheading {
    align-items: center;
}

.month-row {
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.month-row:first-child {
    padding-top: 0;
    border-top: none;
}

.bars {
    display: grid;
    gap: 8px;
}

.bar-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.bar-track.mint {
    background: rgba(76, 182, 159, 0.14);
}

.bar-track.peach {
    background: rgba(243, 179, 122, 0.14);
}

.bar {
    height: 100%;
    border-radius: inherit;
}

.bar.income {
    background: linear-gradient(90deg, var(--mint), #8ce0cd);
}

.bar.outgoing {
    background: linear-gradient(90deg, var(--peach), var(--rose));
}

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

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
}

.zone-grid-contexto .table-wrap {
    border-color: rgba(243, 179, 122, 0.1);
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
}

.activity-table thead th {
    padding: 16px 16px;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: #b9c2d0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
}

.activity-table td {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.activity-table tbody tr {
    transition: background 160ms ease, transform 160ms ease;
}

.activity-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.activity-table tbody tr:first-child td {
    border-top: none;
}

.entry-concept strong {
    display: block;
    margin-bottom: 2px;
}

.date-cell,
.amount-cell {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.amount-cell {
    font-weight: 700;
    color: #f8fafc;
}

.action-cell {
    white-space: nowrap;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.entry-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}

.entry-type-badge.income {
    background: rgba(76, 182, 159, 0.16);
    border-color: rgba(76, 182, 159, 0.24);
    color: #b6f2e5;
}

.entry-type-badge.expense {
    background: rgba(235, 142, 147, 0.14);
    border-color: rgba(235, 142, 147, 0.24);
    color: #ffd1d3;
}

.entry-type-badge.service {
    background: rgba(233, 196, 106, 0.14);
    border-color: rgba(233, 196, 106, 0.24);
    color: #ffe5a0;
}

.entry-type-badge.loan {
    background: rgba(111, 157, 245, 0.15);
    border-color: rgba(111, 157, 245, 0.24);
    color: #d8e5ff;
}

.status-pill {
    font-size: 0.82rem;
    font-weight: 700;
}

.status-pill.paid {
    background: var(--mint-soft);
    color: #a6f0df;
}

.status-pill.pending {
    background: var(--amber-soft);
    color: #ffe5a0;
}

.done-text,
.empty-state,
.empty-row {
    color: var(--muted);
}

.primary-button,
.ghost-button,
.tiny-button,
.icon-button {
    border: none;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button,
.ghost-button,
.tiny-button {
    border-radius: 14px;
    padding: 12px 16px;
}

.primary-button {
    background: linear-gradient(135deg, #f3f4f6, #cbd5e1);
    color: #111827;
    box-shadow: 0 16px 26px rgba(255, 255, 255, 0.1);
}

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

.ghost-button.mint {
    background: var(--mint-soft);
}

.ghost-button.rose {
    background: var(--rose-soft);
}

.ghost-button.amber {
    background: var(--amber-soft);
}

.ghost-button.blue {
    background: var(--blue-soft);
}

.tiny-button {
    padding: 8px 12px;
    font-size: 0.92rem;
}

.icon-button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.primary-button:hover,
.ghost-button:hover,
.tiny-button:hover,
.icon-button:hover,
.sidebar-toggle:hover {
    transform: translateY(-1px);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 50;
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--modal-backdrop-bg);
    backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    width: min(880px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 28px;
    background: var(--modal-card-bg);
    border-color: var(--modal-card-border);
}

.modal-header,
.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.entry-form {
    margin-top: 20px;
}

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

.form-grid > div {
    padding: 18px;
    border: 1px solid var(--form-card-border);
    border-radius: 22px;
    background: var(--form-card-bg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.form-grid label {
    display: block;
    margin-bottom: 16px;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--form-label-ink);
}

.form-grid small {
    display: block;
    margin-top: 10px;
    line-height: 1.45;
}

.field-input {
    width: 100%;
    min-height: 64px;
    padding: 16px 18px;
    border: 1px solid var(--field-border);
    border-radius: 20px;
    background: var(--field-bg);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.field-input:focus {
    outline: none;
    border-color: rgba(111, 157, 245, 0.5);
    background: var(--field-focus-bg);
    box-shadow: var(--field-shadow);
    transform: translateY(-1px);
}

.field-input::placeholder {
    color: var(--field-placeholder);
}

select.field-input {
    appearance: none;
    padding-right: 52px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--field-arrow) 50%),
        linear-gradient(135deg, var(--field-arrow) 50%, transparent 50%);
    background-position:
        calc(100% - 24px) 50%,
        calc(100% - 18px) 50%;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
}

input[type="date"].field-input {
    color-scheme: dark;
}

html[data-theme="light"] input[type="date"].field-input {
    color-scheme: light;
}

input[type="date"].field-input::-webkit-calendar-picker-indicator {
    opacity: 0.85;
    cursor: pointer;
}

textarea.field-input {
    resize: vertical;
    min-height: 132px;
}

.switch-field,
.switch-line {
    display: flex;
    align-items: center;
    gap: 14px;
}

.switch-field {
    min-height: 52px;
    padding: 4px 0;
    color: var(--ink);
}

.switch-line {
    justify-content: space-between;
}

.recurring-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recurring-archive-button {
    padding: 8px 12px;
}

.archive-collapsible {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.archive-collapsible summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 700;
    list-style: none;
}

.archive-collapsible summary::-webkit-details-marker {
    display: none;
}

.archive-list {
    margin-top: 14px;
}

.switch {
    --button-width: 3.5em;
    --button-height: 2em;
    --toggle-diameter: 1.5em;
    --button-toggle-offset: calc((var(--button-height) - var(--toggle-diameter)) / 2);
    --toggle-shadow-offset: 10px;
    --toggle-wider: 3em;
    --color-grey: rgba(255, 255, 255, 0.18);
    --color-green: #4296f4;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.switch.switch-auto {
    width: fit-content;
}

.switch input[type="checkbox"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.slider {
    display: inline-block;
    width: var(--button-width);
    height: var(--button-height);
    background-color: var(--color-grey);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: calc(var(--button-height) / 2);
    position: relative;
    transition: 0.3s all ease-in-out;
}

.slider::after {
    content: "";
    display: inline-block;
    width: var(--toggle-diameter);
    height: var(--toggle-diameter);
    background: linear-gradient(180deg, #ffffff, #e5e7eb);
    border-radius: calc(var(--toggle-diameter) / 2);
    position: absolute;
    top: var(--button-toggle-offset);
    transform: translateX(var(--button-toggle-offset));
    box-shadow: var(--toggle-shadow-offset) 0 calc(var(--toggle-shadow-offset) * 2.4) rgba(0, 0, 0, 0.2);
    transition: 0.3s all ease-in-out;
}

.switch input[type="checkbox"]:checked + .slider {
    background-color: var(--color-green);
    border-color: rgba(66, 150, 244, 0.38);
}

.switch input[type="checkbox"]:checked + .slider::after {
    transform: translateX(calc(var(--button-width) - var(--toggle-diameter) - var(--button-toggle-offset)));
    box-shadow: calc(var(--toggle-shadow-offset) * -1) 0 calc(var(--toggle-shadow-offset) * 2.4) rgba(0, 0, 0, 0.2);
}

.switch input[type="checkbox"]:focus-visible + .slider {
    box-shadow: 0 0 0 4px rgba(66, 150, 244, 0.2);
}

.switch input[type="checkbox"]:active + .slider::after {
    width: var(--toggle-wider);
}

.switch input[type="checkbox"]:checked:active + .slider::after {
    transform: translateX(calc(var(--button-width) - var(--toggle-wider) - var(--button-toggle-offset)));
}

.full-width {
    grid-column: 1 / -1;
}

.field-is-hidden {
    display: none;
}

.entry-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.entry-meta-chip,
.counterparty-badge,
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

.counterparty-badge.client {
    background: rgba(76, 182, 159, 0.16);
    border-color: rgba(76, 182, 159, 0.24);
}

.counterparty-badge.supplier {
    background: rgba(235, 142, 147, 0.16);
    border-color: rgba(235, 142, 147, 0.24);
}

.counterparty-badge.lender {
    background: rgba(111, 157, 245, 0.16);
    border-color: rgba(111, 157, 245, 0.24);
}

.catalog-form-stack,
.catalog-list,
.tag-cloud,
.user-grid,
.user-meta-list,
.user-actions {
    display: grid;
    gap: 14px;
}

.catalog-item,
.inline-panel-form {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.catalog-item p,
.catalog-item small {
    display: block;
    margin-top: 6px;
}

.tag-cloud {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.form-hint {
    margin: 18px 0 20px;
    padding: 18px 20px;
    border: 1px solid rgba(111, 157, 245, 0.16);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(111, 157, 245, 0.18), rgba(66, 150, 244, 0.08));
    color: #dbe8ff;
    line-height: 1.5;
}

.error-text {
    display: block;
    margin-top: 8px;
    color: #ffb0b5;
}

.user-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.user-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    display: grid;
    gap: 16px;
}

.user-card.is-inactive {
    opacity: 0.82;
    border-color: rgba(235, 142, 147, 0.18);
}

.user-card-top,
.user-meta-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.user-card-top p,
.user-meta-item span {
    color: var(--muted);
}

.user-meta-item strong {
    text-align: right;
}

.user-actions {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.user-actions form,
.user-actions button {
    width: 100%;
}

.pagination-row {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.compact-note {
    margin-bottom: 0;
    font-size: 0.94rem;
}

.modal-close-button {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.15rem;
    background: var(--nav-item-bg);
}

.modal-actions {
    margin-top: 6px;
}

.modal-cancel-button,
.modal-submit-button {
    min-width: 180px;
    min-height: 58px;
    border-radius: 20px;
    font-size: 1.02rem;
}

.modal-cancel-button {
    background: var(--nav-item-bg);
}

.modal-submit-button {
    background: linear-gradient(135deg, #f5f7fb, #cfd8e8);
    box-shadow: 0 20px 36px rgba(255, 255, 255, 0.08);
}

.page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 28px;
    background: var(--hero-panel-bg);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 3vw, 3.4rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 64ch;
    margin-bottom: 0;
}

.compact-grid {
    margin-top: 2px;
}

.tasks-metric-grid {
    gap: 22px;
    margin-bottom: 8px;
}

.two-column-grid {
    grid-template-columns: 1.05fr 0.95fr;
}

.loan-plan-list,
.invoice-list {
    display: grid;
    gap: 16px;
}

.loan-plan-card,
.invoice-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.loan-plan-top,
.invoice-card-top,
.invoice-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.loan-plan-top p,
.invoice-card-top p,
.invoice-notes {
    margin: 4px 0 0;
    color: var(--muted);
}

.loan-progress-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 16px 0;
}

.loan-progress-row span {
    min-width: 42px;
    text-align: right;
    color: #d6deed;
    font-weight: 700;
}

.loan-progress-track {
    flex: 1;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(111, 157, 245, 0.14);
}

.loan-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--blue), #a9c3ff);
}

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

.loan-meta-grid div,
.invoice-meta-grid div {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.loan-meta-grid span,
.invoice-meta-grid span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.86rem;
    color: var(--muted);
}

.loan-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.loan-detail-layout {
    align-items: start;
}

.loan-detail-progress {
    margin-top: 8px;
}

.loan-detail-sidebar {
    gap: 18px;
}

.invoice-card.is-overdue {
    border-color: rgba(235, 142, 147, 0.24);
    background: linear-gradient(135deg, rgba(235, 142, 147, 0.14), rgba(255, 255, 255, 0.025));
}

.invoice-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.invoice-status-badge.draft {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.invoice-status-badge.sent {
    background: rgba(111, 157, 245, 0.15);
    border-color: rgba(111, 157, 245, 0.24);
    color: #d8e5ff;
}

.invoice-status-badge.pending {
    background: rgba(233, 196, 106, 0.14);
    border-color: rgba(233, 196, 106, 0.24);
    color: #ffe5a0;
}

.invoice-status-badge.paid {
    background: rgba(76, 182, 159, 0.16);
    border-color: rgba(76, 182, 159, 0.24);
    color: #b6f2e5;
}

.invoice-notes {
    margin-top: 14px;
    line-height: 1.5;
}

.invoice-actions {
    margin-top: 16px;
    flex-wrap: wrap;
}

.invoice-actions form {
    margin: 0;
}

.inline-form {
    margin: 0;
}

.invoice-log-preview,
.invoice-history-item {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.invoice-log-preview span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.86rem;
    color: var(--muted);
}

.invoice-log-preview p,
.invoice-history-item p {
    margin: 4px 0 0;
    color: var(--muted);
}

.invoice-history-list {
    display: grid;
    gap: 14px;
}

.invoice-history-item {
    margin-top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.invoice-history-item.is-failed {
    border-color: rgba(235, 142, 147, 0.22);
    background: rgba(235, 142, 147, 0.1);
}

.aligned-right {
    justify-content: flex-end;
}

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

.field-file {
    min-height: auto;
    padding: 14px 16px;
}

.brand-preview {
    margin-top: 18px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.brand-preview img {
    display: block;
    max-width: 180px;
    max-height: 96px;
    margin-top: 12px;
    object-fit: contain;
}

.invoice-template-preview {
    display: grid;
}

.invoice-modal-card {
    width: min(1120px, 100%);
}

.invoice-core-grid {
    margin-bottom: 20px;
}

.invoice-lines-builder {
    display: grid;
    gap: 14px;
}

.invoice-template-picker {
    display: grid;
    gap: 10px;
}

.invoice-template-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.invoice-template-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    position: relative;
    z-index: 1;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    inset: auto;
    border-radius: 999px;
    filter: blur(18px);
    pointer-events: none;
}

.auth-shell::before {
    width: 220px;
    height: 220px;
    top: 8%;
    left: max(24px, 7vw);
    background: rgba(76, 182, 159, 0.14);
}

.auth-shell::after {
    width: 260px;
    height: 260px;
    right: max(20px, 8vw);
    bottom: 10%;
    background: rgba(111, 157, 245, 0.12);
}

.auth-card {
    width: min(560px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(24, 28, 39, 0.98), rgba(19, 22, 31, 0.98));
    box-shadow: var(--shadow);
    display: grid;
    gap: 22px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

.auth-copy h1 {
    margin: 8px 0 12px;
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1.02;
}

.auth-copy p,
.auth-error {
    color: var(--muted);
}

.auth-copy p {
    max-width: 40ch;
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form > div {
    display: grid;
    gap: 12px;
}

.auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.auth-form input {
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-form input::placeholder {
    color: rgba(156, 163, 179, 0.9);
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(111, 157, 245, 0.45);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(111, 157, 245, 0.12);
}

.auth-submit {
    width: 100%;
    justify-content: center;
    min-height: 54px;
    margin-top: 6px;
}

.auth-error {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(235, 142, 147, 0.22);
    background: rgba(235, 142, 147, 0.08);
}

.auth-meta {
    display: grid;
    gap: 10px;
    color: var(--muted);
    line-height: 1.55;
}

.auth-meta a {
    color: #d8e5ff;
    font-weight: 600;
}

.auth-meta-stack {
    padding-top: 4px;
}

.auth-shell-mobile {
    padding: 18px;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.16), transparent 28%),
        linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
}

.auth-shell-mobile::before {
    width: 180px;
    height: 180px;
    top: 4%;
    left: 8%;
    background: rgba(56, 189, 248, 0.16);
}

.auth-shell-mobile::after {
    width: 210px;
    height: 210px;
    right: 4%;
    bottom: 8%;
    background: rgba(52, 211, 153, 0.14);
}

.auth-card-mobile {
    width: min(420px, 100%);
    padding: 26px 22px 24px;
    border-radius: 30px;
    gap: 18px;
    box-shadow: 0 30px 90px rgba(8, 15, 30, 0.52);
}

.auth-card-mobile .auth-copy h1 {
    font-size: clamp(1.9rem, 7vw, 2.35rem);
}

.auth-card-mobile .auth-copy p,
.auth-card-mobile .auth-meta {
    max-width: none;
}

.permission-note,
.readonly-line {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.permission-note {
    margin-bottom: 16px;
    color: #d8e5ff;
    background: rgba(111, 157, 245, 0.12);
    border-color: rgba(111, 157, 245, 0.22);
}

.readonly-stack {
    display: grid;
    gap: 12px;
}

.readonly-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.readonly-line span {
    color: var(--muted);
}

.readonly-line strong {
    text-align: right;
}

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

.invoice-line-form {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.invoice-line-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.35fr 0.45fr auto;
    gap: 14px;
    align-items: end;
}

.invoice-line-remove {
    display: flex;
    align-items: center;
    gap: 12px;
}

.invoice-line-remove input[type="checkbox"] {
    display: none;
}

.invoice-detail-panel {
    padding: 34px;
    background: rgba(17, 19, 26, 0.58);
}

.invoice-edit-layout {
    align-items: start;
}

.invoice-edit-sidebar {
    gap: 18px;
}

.invoice-edit-stats {
    display: grid;
    gap: 12px;
}

.invoice-edit-stat,
.invoice-edit-note {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

.invoice-edit-stat span,
.invoice-edit-note p {
    color: var(--muted);
}

.invoice-edit-stat span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.86rem;
}

.invoice-edit-stat strong {
    font-size: 1.05rem;
}

.invoice-edit-note strong {
    display: block;
    margin-bottom: 8px;
}

.invoice-edit-note p {
    margin: 0;
    line-height: 1.6;
}

.invoice-paper {
    width: min(860px, 100%);
    margin: 0 auto;
    padding: 54px 58px 42px;
    border-radius: 30px;
    background: #fff;
    color: #171717;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.28);
    page-break-inside: avoid;
}

.invoice-paper.mini {
    width: 100%;
    max-width: 100%;
    padding: 34px 36px 28px;
    box-shadow: none;
}

.invoice-paper-top {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.invoice-paper h2,
.invoice-paper h3 {
    margin: 0 0 18px;
    color: #111;
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: 0.08em;
}

.invoice-paper h3 {
    font-size: 1.8rem;
}

.issuer-meta p,
.invoice-party-row p,
.multiline-text {
    margin: 0 0 4px;
    color: #4b5563;
    line-height: 1.45;
}

.invoice-logo-block {
    min-width: 160px;
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.invoice-logo-block img {
    max-width: 124px;
    max-height: 124px;
    object-fit: contain;
}

.logo-placeholder {
    width: 110px;
    height: 110px;
    display: grid;
    place-items: center;
    border: 3px solid #111;
    color: #111;
    font-size: 4.4rem;
    font-weight: 200;
    line-height: 1;
}

.invoice-logo-block strong {
    color: #111;
    letter-spacing: 0.08em;
}

.invoice-party-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0 22px;
}

.invoice-party-row > div {
    max-width: 48%;
}

.invoice-party-row span,
.invoice-date-block span {
    display: block;
    margin-bottom: 6px;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.invoice-party-row strong,
.invoice-date-block strong {
    color: #111;
}

.invoice-table-head,
.invoice-table-row,
.invoice-total-row,
.invoice-signature-row {
    display: grid;
    grid-template-columns: 1.8fr 0.45fr 0.75fr 0.65fr;
    gap: 12px;
    align-items: center;
}

.invoice-table-head {
    padding: 12px 16px;
    border-radius: 0;
    background: #ff640a;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
}

.invoice-table-row {
    padding: 15px 4px;
    border-bottom: 1px solid #ececec;
    color: #4b5563;
}

.invoice-table-row.sample {
    color: #6b7280;
}

.invoice-table-head span:nth-child(n+2),
.invoice-table-row span:nth-child(n+2) {
    text-align: center;
}

.invoice-total-row {
    margin-top: 12px;
    padding: 14px 0 0;
    border-top: 3px solid #1f2937;
    grid-template-columns: 1fr auto;
}

.invoice-total-row span {
    justify-self: end;
    font-weight: 700;
}

.invoice-total-row strong {
    display: block;
    font-size: 1.85rem;
    line-height: 1;
}

.invoice-total-row small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    text-align: right;
}

.invoice-signature-row {
    margin-top: 22px;
    padding-top: 12px;
    border-top: 3px solid #1f2937;
    grid-template-columns: 1fr auto;
}

.invoice-signature-row.is-paid {
    align-items: end;
    gap: 18px;
}

.invoice-signature-row.preview-only {
    margin-top: 16px;
    padding-top: 12px;
}

.invoice-signature-block {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.invoice-signature-name {
    font-family: "Snell Roundhand", "Brush Script MT", cursive;
    font-size: 3rem;
    color: #222;
    line-height: 1;
}

.invoice-signature-block span {
    align-self: end;
    color: #6b7280;
}

.invoice-paid-stamp {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.invoice-paid-stamp strong {
    color: #ef4444;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.invoice-paid-stamp span {
    width: 260px;
    height: 0;
    border-top: 6px solid #ff5a1f;
    border-radius: 999px;
    transform: rotate(-2deg);
    box-shadow:
        0 7px 0 -3px rgba(255, 90, 31, 0.95),
        0 14px 0 -8px rgba(255, 90, 31, 0.88);
}

@media (max-width: 1320px) {
    .app-shell,
    .app-shell.sidebar-wide {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
        max-height: none;
        overflow: visible;
    }

    .sidebar-extra {
        display: grid;
    }
}

@media (max-width: 1100px) {
    .hero-panel,
    .page-hero,
    .metric-grid,
    .workspace-grid,
    .three-column-grid,
    .lower-grid,
    .two-column-grid,
    .type-cards,
    .form-grid,
    .bank-grid,
    .sidebar-info-list,
    .loan-meta-grid,
    .invoice-meta-grid,
    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

@media (max-width: 720px) {
    .app-shell {
        width: min(100% - 20px, 100%);
        padding-top: 16px;
    }

    .sidebar,
    .panel,
    .modal-card {
        border-radius: 18px;
    }

    .sidebar-header,
    .panel-header,
    .panel-tools,
    .month-meta,
    .balance-line,
    .due-item,
    .year-summary > div,
    .modal-header,
    .modal-actions,
    .subheading,
    .alert-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .due-actions,
    .bank-actions {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .activity-table th:nth-child(3),
    .activity-table td:nth-child(3),
    .activity-table th:nth-child(6),
    .activity-table td:nth-child(6) {
        display: none;
    }

    .loan-plan-top,
    .invoice-card-top,
    .invoice-actions,
    .loan-progress-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .invoice-paper,
    .invoice-paper.mini {
        padding: 26px 20px;
    }

    .invoice-paper-top,
    .invoice-party-row {
        flex-direction: column;
    }

    .invoice-party-row > div {
        max-width: 100%;
    }

    .invoice-table-head,
    .invoice-table-row,
    .invoice-line-grid {
        grid-template-columns: 1fr;
    }

    .invoice-table-head span:nth-child(n+2),
    .invoice-table-row span:nth-child(n+2),
    .invoice-total-row span {
        text-align: left;
        justify-self: start;
    }

    .invoice-total-row,
    .invoice-signature-row {
        grid-template-columns: 1fr;
    }

    .invoice-signature-block {
        justify-items: start;
    }

    .invoice-paid-stamp span {
        width: 180px;
    }
}

.crm-card-list,
.crm-proposal-list {
    display: grid;
    gap: 1rem;
}

.crm-card,
.crm-proposal-card {
    padding: 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 1.2rem;
    background: rgba(17, 24, 39, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.crm-proposal-card.archived {
    opacity: 0.78;
    background: rgba(15, 23, 42, 0.28);
}

.crm-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.crm-card-top p,
.crm-mini-notes p,
.crm-proposal-card p,
.crm-timeline-item p {
    margin: 0.3rem 0 0;
    color: rgba(226, 232, 240, 0.76);
}

.crm-contact-grid,
.crm-mini-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.crm-contact-grid span,
.crm-mini-notes span,
.crm-proposal-meta span {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.78);
}

.crm-contact-grid strong,
.crm-mini-notes p {
    font-size: 0.95rem;
}

.crm-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.crm-action-row form {
    margin: 0;
}

.crm-action-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.crm-action-form .field-input {
    min-width: 12rem;
    width: auto;
    flex: 1 1 12rem;
}

.crm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.85rem;
}

.crm-calendar-day {
    padding: 1rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 24, 39, 0.34);
    min-height: 17rem;
}

.crm-calendar-day.is-today {
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.crm-calendar-day-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.crm-calendar-day-head p {
    margin: 0.22rem 0 0;
    color: rgba(148, 163, 184, 0.78);
}

.crm-calendar-event-list {
    display: grid;
    gap: 0.7rem;
}

.crm-calendar-event {
    display: block;
    padding: 0.8rem 0.85rem;
    border-radius: 0.9rem;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.44);
}

.crm-calendar-event span {
    display: block;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.82);
}

.crm-calendar-event strong {
    display: block;
    margin-top: 0.3rem;
    color: rgba(248, 250, 252, 0.96);
}

.crm-calendar-event p {
    margin: 0.28rem 0 0;
    color: rgba(226, 232, 240, 0.74);
}

.crm-calendar-event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

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

.crm-calendar-event-actions .crm-action-form .field-input {
    min-width: 0;
}

.crm-calendar-event.blue {
    border-color: rgba(96, 165, 250, 0.24);
}

.crm-calendar-event.amber {
    border-color: rgba(251, 191, 36, 0.24);
}

.crm-calendar-event.mint {
    border-color: rgba(52, 211, 153, 0.24);
}

.compact-empty {
    font-size: 0.9rem;
    margin: 0;
}

.tasks-layout {
    align-items: start;
    gap: 28px;
}

.task-overdue-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(248, 113, 113, 0.16);
    border-radius: 1rem;
    background: rgba(127, 29, 29, 0.18);
    color: rgba(248, 250, 252, 0.94);
}

.task-reminder-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(96, 165, 250, 0.16);
    border-radius: 1rem;
    background: rgba(30, 64, 175, 0.18);
    color: rgba(248, 250, 252, 0.94);
}

.task-panel-divider {
    height: 1px;
    margin: 1.4rem 0;
    background: rgba(148, 163, 184, 0.14);
}

.task-inline-header {
    margin-bottom: 0.8rem;
}

.task-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.task-day-column {
    display: grid;
    align-content: start;
    border-radius: 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(17, 24, 39, 0.34);
    min-height: 0;
    overflow: hidden;
}

.task-day-column.is-today {
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.task-day-column header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.9rem;
    padding: 1rem 1.05rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.task-day-column header span {
    flex: 1 0 100%;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.82);
}

.task-day-column header strong {
    color: rgba(248, 250, 252, 0.96);
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.task-day-column header small {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: rgba(148, 163, 184, 0.78);
}

.task-day-list {
    display: grid;
    gap: 0.85rem;
    padding: 1.05rem;
}

.task-card {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.44);
}

.task-card.is-done {
    opacity: 0.75;
}

.task-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.task-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.alert-chip {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.24);
    background: rgba(127, 29, 29, 0.28);
}

.task-card p {
    margin: 0;
    color: rgba(226, 232, 240, 0.74);
    line-height: 1.5;
}

.task-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.between-actions {
    justify-content: space-between;
}

.task-plan-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.task-plan-card {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.38);
}

.task-plan-card.is-paused {
    opacity: 0.72;
}

.crm-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.crm-status-pill.amber {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

.crm-status-pill.blue {
    background: rgba(96, 165, 250, 0.18);
    color: #93c5fd;
}

.crm-status-pill.mint {
    background: rgba(52, 211, 153, 0.18);
    color: #6ee7b7;
}

.crm-status-pill.peach {
    background: rgba(251, 146, 60, 0.18);
    color: #fdba74;
}

.crm-status-pill.rose {
    background: rgba(244, 114, 182, 0.18);
    color: #f9a8d4;
}

.crm-compact-list {
    max-height: 37rem;
    overflow: auto;
}

.crm-inline-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.crm-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.2rem;
}

.crm-timeline {
    display: grid;
    gap: 0.85rem;
}

.crm-timeline-group-list {
    display: grid;
    gap: 0.85rem;
}

.crm-timeline-group {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.34);
    overflow: hidden;
}

.crm-timeline-group summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.05rem;
    cursor: pointer;
    color: rgba(226, 232, 240, 0.94);
    font-weight: 600;
}

.crm-timeline-group summary::-webkit-details-marker {
    display: none;
}

.crm-timeline-group[open] summary {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.crm-timeline-group .crm-timeline {
    padding: 0.9rem;
}

.crm-timeline-item {
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.crm-timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.crm-timeline-head span,
.crm-timeline-item small,
.crm-proposal-meta {
    color: rgba(148, 163, 184, 0.78);
}

.crm-proposal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.85rem;
    font-size: 0.84rem;
}

.crm-conversion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.crm-conversion-grid.single {
    grid-template-columns: 1fr;
}

.crm-conversion-grid label {
    display: block;
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.85);
}

.mobile-app-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.18), transparent 34%),
        linear-gradient(180deg, #0f172a 0%, #111827 52%, #0b1220 100%);
    color: #e5e7eb;
    padding: 1rem 1rem 5.5rem;
}

.mobile-app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mobile-app-header h1 {
    margin: 0.2rem 0 0;
    font-size: 1.55rem;
}

.mobile-app-body {
    display: grid;
    gap: 1rem;
}

.mobile-install-banner {
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(30, 64, 175, 0.22);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.mobile-install-banner strong {
    display: block;
    margin-bottom: 0.2rem;
}

.mobile-install-banner p {
    margin: 0;
    color: rgba(191, 219, 254, 0.9);
}

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

.mobile-panel {
    padding: 1rem;
}

.mobile-stack {
    display: grid;
    gap: 0.85rem;
}

.mobile-crm-card {
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 0.95rem;
    display: grid;
    gap: 0.8rem;
}

.mobile-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.mobile-meta-grid span,
.mobile-card-copy {
    color: rgba(148, 163, 184, 0.82);
}

.mobile-meta-grid span {
    display: block;
    margin-bottom: 0.22rem;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-meta-grid strong,
.mobile-card-copy {
    font-size: 0.92rem;
    line-height: 1.45;
}

.mobile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.mobile-actions form {
    margin: 0;
}

.mobile-actions .ghost-button,
.mobile-actions .primary-button {
    width: auto;
}

.mobile-inline-form .form-grid {
    gap: 0.8rem;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom));
    background: rgba(7, 10, 20, 0.94);
    backdrop-filter: blur(18px);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-bottom-nav a {
    text-decoration: none;
    color: rgba(226, 232, 240, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(30, 41, 59, 0.5);
    border-radius: 1rem;
    padding: 0.7rem 0.8rem;
    text-align: center;
    display: grid;
    gap: 0.15rem;
}

.mobile-bottom-nav a strong {
    font-size: 0.82rem;
}

.mobile-bottom-nav a small {
    font-size: 0.7rem;
    color: rgba(148, 163, 184, 0.85);
}

.mobile-bottom-nav a.is-active {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(30, 64, 175, 0.25);
    color: #eff6ff;
}

@media (max-width: 720px) {
    .crm-card-top,
    .crm-inline-card,
    .crm-timeline-head,
    .crm-calendar-day-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .crm-calendar-grid,
    .crm-contact-grid,
    .crm-mini-notes,
    .crm-conversion-grid,
    .task-week-grid,
    .mobile-kpi-grid,
    .mobile-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm 12mm;
    }

    html,
    body {
        background: #fff;
    }

    body::before,
    .sidebar,
    .page-hero,
    .messages,
    .quick-actions,
    .modal {
        display: none !important;
    }

    .app-shell,
    .workspace {
        width: 100%;
        margin: 0;
        padding: 0;
        display: block;
    }

    .invoice-detail-panel,
    .panel,
    .board-card {
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .invoice-paper {
        width: 100%;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .invoice-paper-top,
    .invoice-party-row,
    .invoice-signature-row {
        break-inside: avoid;
    }
}
