﻿:root {
    --bg: #0f172a;
    --panel: #151f35;
    --panel-light: #1f2a41;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --success: #10b981;
    --warning: #f97316;
    --danger: #ef4444;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.9);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

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

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

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: #0b1222;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.brand-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.8);
}

.mobile-menu-toggle {
    display: none;
}

.primary-btn {
    border: none;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.primary-btn:hover {
    background: var(--primary-dark);
}

.primary-btn.outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.ghost-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: border 0.2s ease, color 0.2s ease;
}

.ghost-btn:hover {
    border-color: var(--border);
    color: white;
}

.ghost-btn.small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.primary-btn.full {
    width: 100%;
    justify-content: center;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--text-muted);
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-item.active,
.menu-item:hover {
    background: rgba(124, 58, 237, 0.2);
    color: white;
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.content {
    padding: 32px 48px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(8, 47, 73, 0.8) 100%);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
    gap: 16px;
    flex-wrap: wrap;
}

.summary-header {
    justify-content: center;
    align-items: center;
}

.summary-header .summary-inline {
    width: 100%;
    justify-content: center;
}

.page-header--minimal h1 {
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.summary-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.summary-inline--center {
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

.accounts-header {
    justify-content: center;
    align-items: center;
}

.cards-header {
    justify-content: center;
    align-items: center;
}

.summary-card {
    border-radius: 16px;
    padding: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
    min-width: 150px;
}

.summary-card.small {
    padding: 14px 16px;
    min-width: 140px;
}

.summary-card.warning {
    border: 1px solid rgba(249, 115, 22, 0.4);
}

.summary-card.success {
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.summary-card--link {
    display: block;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.summary-card--link:hover,
.summary-card--link.active {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.75);
    background: rgba(249, 115, 22, 0.12);
}

.summary-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.summary-card strong {
    font-size: 1.4rem;
}

.filters-panel {
    background: var(--panel);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.dashboard-filters {
    margin-bottom: 18px;
}

.dashboard-filters[hidden] {
    display: none !important;
}

.dashboard-filters .filter-field--actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dashboard-filters .filter-field--order {
    min-width: 260px;
}

.dashboard-filters .filter-field--order select {
    min-width: 260px;
    padding-right: 34px;
}

label span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

input,
select,
textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--panel-light);
    color: var(--text);
    padding: 12px;
}

.search-field input {
    padding-left: 18px;
}

.table-wrapper {
    margin-top: 28px;
    background: var(--panel);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.table-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.legend {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.green {
    background: var(--success);
}

.dot.red {
    background: var(--danger);
}

.dot.orange {
    background: var(--warning);
}

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

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

th,
td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

thead th {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 92px;
}

.status-pill.pendente {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-pill.atrasado {
    background: rgba(249, 115, 22, 0.22);
    color: #fb923c;
}

.status-pill.pago {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.category-tag {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: color-mix(in srgb, var(--tag-color) 15%, transparent);
    border: 1px solid var(--tag-color);
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.category-tag.neutral {
    border-color: var(--border);
    background: transparent;
}

.inline-form {
    display: inline-flex;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.toast-area {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 300;
}

.notification {
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 10px 30px rgba(7, 12, 22, 0.6);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.hide {
    opacity: 0;
    transform: translateY(-10px);
}

.notification.success {
    border-color: rgba(16, 185, 129, 0.4);
}

.notification.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.month-selector {
    background: var(--panel);
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.month-selector__controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

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

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

.switch {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.35);
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.repeat-options {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.35);
    display: grid;
    gap: 10px;
    grid-column: 1 / -1;
}

.repeat-options legend {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    padding: 0 4px;
}

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

.repeat-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.55);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.repeat-option input[type="radio"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.45);
    position: relative;
}

.repeat-option input[type="radio"]::after {
    content: '✓';
    position: absolute;
    top: -3px;
    left: 3px;
    font-size: 12px;
    color: #0f172a;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.repeat-option input[type="radio"]:checked {
    border-color: #a855f7;
    background: #a855f7;
}

.repeat-option input[type="radio"]:checked::after {
    opacity: 1;
}

.repeat-option span {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.repeat-option.active {
    border-color: rgba(124, 58, 237, 0.6);
    background: rgba(124, 58, 237, 0.2);
}

.repeat-option.active span {
    color: #ede9fe;
}

.toggle-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.toggle-icon svg {
    width: 14px;
    height: 14px;
}

.toggle {
    position: relative;
    width: 44px;
    height: 22px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(248, 113, 113, 0.6);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 2px;
    background: #f87171;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-slider {
    background: rgba(52, 211, 153, 0.4);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: #22c55e;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal.open {
    display: flex;
}

.modal__panel {
    width: min(560px, 100%);
    background: var(--panel-light);
    border-radius: 28px;
    padding: 28px 32px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 25px 80px rgba(8, 15, 40, 0.85);
}

.modal__panel header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.modal__panel--wide {
    width: min(560px, 100%);
}

.modal__panel header h3 {
    margin: 0;
}

.modal__panel footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-form--compact {
    gap: 14px;
}

.modal-form--compact .grid-2 {
    gap: 12px;
}

.modal__panel--compact {
    padding: 24px 28px;
}

.input-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.hidden {
    display: none;
}

.transactions-board {
    margin: 32px auto 0;
    padding: 32px;
    background: var(--panel);
    border-radius: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-width: 1320px;
    width: 100%;
}

.transactions-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.section-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.chevron {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.summary-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: var(--text-muted);
}

.summary-dot.purple {
    background: #a855f7;
}

.summary-dot.danger,
.summary-dot.red {
    background: var(--danger);
}

.summary-dot.success,
.summary-dot.green {
    background: var(--success);
}

.summary-dot.info {
    background: #38bdf8;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    justify-content: center;
}

.month-nav--static {
    justify-content: center;
    flex-wrap: wrap;
}

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

.filter-toggle-btn {
    min-height: 46px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.34);
    color: var(--text);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.filter-toggle-btn svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.filter-toggle-btn:hover,
.filter-toggle-btn.is-open {
    border-color: rgba(139, 92, 246, 0.72);
    background: rgba(139, 92, 246, 0.12);
}

.filter-toggle-btn.has-active-filters {
    border-color: rgba(139, 92, 246, 0.8);
    color: var(--accent);
    background: rgba(139, 92, 246, 0.14);
}

.filter-toggle-btn:active {
    transform: translateY(1px);
}

.nature-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: var(--panel-light);
    border: 1px solid var(--border);
}

.nature-toggle__btn {
    padding: 6px 12px;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.nature-toggle__btn:hover {
    color: white;
}

.nature-toggle__btn.active {
    background: var(--primary);
    color: white;
}

.nature-toggle--form {
    justify-content: center;
    margin: 8px auto 16px;
}

.month-label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
}

.nav-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--panel-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.transactions-layout {
    width: 100%;
}

.transactions-table {
    margin-top: 0;
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--panel-light);
    width: 100%;
}

.insights-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.insight-card {
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--panel-light);
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 220px;
}

.transactions-table table {
    width: 100%;
    table-layout: auto;
}

.transactions-table th:nth-child(3),
.transactions-table td:nth-child(3) {
    width: 46%;
}

.transactions-table th:nth-child(4),
.transactions-table td:nth-child(4) {
    width: 170px;
}

.transactions-table th:nth-child(5),
.transactions-table td:nth-child(5) {
    width: 140px;
    white-space: nowrap;
    text-align: right;
}

.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.action-form {
    margin: 0;
}

.card-block {
    margin-top: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}

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

.accounts-table th,
.accounts-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.accounts-table tbody tr:last-child td {
    border-bottom: none;
}

.accounts-table td .muted {
    display: block;
    margin-top: 4px;
}

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

.free-accounts-area {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.free-accounts-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.free-accounts-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.free-accounts-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 14px;
    align-items: stretch;
    justify-items: stretch;
}

@media (max-width: 1400px) {
    .free-accounts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .free-accounts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .free-accounts-grid {
        grid-template-columns: 1fr;
    }
}

.cards-header {
    margin-bottom: 12px;
}

.cards-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.cards-filters .filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cards-filters input,
.cards-filters select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text);
}

.cards-filters .filter-field.filter-field--actions {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.credit-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

@media (max-width: 1400px) {
    .credit-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .credit-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .credit-cards-grid {
        grid-template-columns: 1fr;
    }
}

.account-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-card header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.account-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
}

.account-card--compact {
    padding: 16px;
    border-radius: 20px;
    gap: 12px;
    flex: 1 1 280px;
    max-width: 320px;
    min-width: 240px;
}

.credit-card-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow);
}

.credit-card-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow);
    min-height: 260px;
    position: relative;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.credit-card-card strong {
    word-break: break-word;
}

.credit-card-card.is-selection-muted {
    border-color: rgba(148, 163, 184, 0.16);
}

.credit-card-card.is-selection-muted .credit-card-stats,
.credit-card-card.is-selection-muted .credit-card-progress {
    opacity: 0.58;
}

.credit-card-selector {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    display: inline-flex;
    cursor: pointer;
}

.credit-card-selector input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.credit-card-selector__box {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.72);
    color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.credit-card-selector__box svg {
    width: 18px;
    height: 18px;
}

.credit-card-selector input:checked + .credit-card-selector__box {
    border-color: rgba(16, 185, 129, 0.88);
    background: rgba(5, 150, 105, 0.22);
    color: #34d399;
}

.credit-card-selector input:focus-visible + .credit-card-selector__box {
    outline: 2px solid rgba(139, 92, 246, 0.75);
    outline-offset: 3px;
}

.credit-card-selector:hover .credit-card-selector__box {
    transform: translateY(-1px);
}

.credit-card-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    min-height: 38px;
    padding-right: 44px;
}

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

.credit-card-actions .status-pill {
    margin-right: 4px;
}

.credit-card-meta {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
    min-height: 78px;
}

.credit-card-meta .category-tag {
    justify-self: start;
}

.credit-card-meta p {
    margin: 0;
    min-height: 38px;
    line-height: 1.25;
}

.credit-card-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.credit-card-stats div {
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.credit-card-stats .credit-card-stat--parcel {
    border-width: 1.5px;
}

.credit-card-stats .credit-card-stat--pending {
    border-color: rgba(248, 113, 113, 0.62);
    background: rgba(127, 29, 29, 0.12);
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.08), 0 10px 24px rgba(127, 29, 29, 0.12);
}

.credit-card-stats .credit-card-stat--paid {
    border-color: rgba(16, 185, 129, 0.68);
    background: rgba(6, 95, 70, 0.14);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1), 0 10px 24px rgba(6, 95, 70, 0.12);
}

.credit-card-stats strong {
    font-size: 1rem;
}

.credit-card-stats p {
    margin: 0;
}

.credit-card-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.credit-card-progress .progress-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
    overflow: hidden;
}

.credit-card-progress .progress-fill {
    height: 100%;
    background: var(--primary);
    width: var(--progress, 0%);
    border-radius: 999px;
}

.credit-card-progress .progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.credit-card-card header {
    gap: 12px;
}

.free-card {
    min-height: 230px;
    padding: 14px;
    gap: 8px;
}

.free-card .credit-card-stats {
    gap: 8px;
}

.free-card .credit-card-stats div {
    padding: 8px;
}

.free-card .credit-card-stats strong {
    font-size: 0.95rem;
}

.free-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.free-card__actions {
    display: flex;
    gap: 8px;
}

.free-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cards-installments .table-header {
    margin-bottom: 12px;
}

.cards-installments .table-scroll {
    margin-top: 12px;
}

.account-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.account-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.account-summary div {
    background: rgba(15, 23, 42, 0.4);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.account-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-card__stats > div {
    flex: 1 1 120px;
}

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

.account-meta dt {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.account-meta dd {
    margin: 4px 0 0;
    font-weight: 600;
}

.payment-log {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.35);
}

.payment-log--compact {
    max-height: 170px;
    overflow-y: auto;
    padding: 12px;
}

.payment-log--compact ul {
    gap: 8px;
}

.payment-log--compact li {
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.payment-log--compact li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.free-payments-mini {
    list-style: none;
    padding: 6px 2px 2px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.free-payments-mini li {
    display: block;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.free-payments-mini li:last-child {
    border-bottom: none;
}

.free-payment-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.free-payment-line span,
.free-payment-line strong {
    white-space: nowrap;
}

.payment-log__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-log__actions strong {
    white-space: nowrap;
}

.payment-log__buttons {
    display: flex;
    gap: 6px;
}

.payment-log__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.payment-log li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.payment-log li div span {
    display: block;
}

.account-actions {
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px dashed var(--border);
    text-align: center;
}
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

.icon-btn:hover {
    border-color: rgba(124, 58, 237, 0.5);
    color: white;
}

.icon-btn.success {
    border-color: rgba(16, 185, 129, 0.5);
    color: var(--success);
    background: rgba(16, 185, 129, 0.12);
}

.icon-btn.danger {
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
}

.icon-btn:disabled,
.icon-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.danger-btn {
    background: var(--danger);
    border: 1px solid var(--danger);
}

.danger-btn:hover {
    background: #dc2626;
}

.delete-summary {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 16px;
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}

.delete-summary p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.delete-summary strong {
    display: block;
    font-size: 1rem;
    margin-top: 4px;
}

.delete-options {
    border: none;
    padding: 0;
    margin: 0;
}

.delete-options legend {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.radio-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 14px 16px 14px 54px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.4);
    transition: border 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.radio-option span {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.radio-option.active {
    border-color: rgba(34, 197, 94, 0.8);
    background: rgba(34, 197, 94, 0.2);
}

.radio-option.active span {
    color: #e2fbe5;
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.7);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
}

.radio-option input[type="radio"]::after {
    content: '✓';
    font-size: 14px;
    color: #0f172a;
    position: absolute;
    top: -3px;
    left: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.radio-option input[type="radio"]:checked {
    border-color: #22c55e;
    background: #22c55e;
}

.radio-option input[type="radio"]:checked::after {
    opacity: 1;
}

.category-manager {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-list {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.category-list ul {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.4);
}

.category-list button {
    width: 32px;
    height: 32px;
}

.category-list strong {
    font-size: 0.95rem;
}

.category-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.category-list li > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-actions {
    display: flex;
    gap: 6px;
}

.form-feedback {
    font-size: 0.85rem;
    min-height: 18px;
    margin: 0;
    color: var(--text-muted);
}

.form-feedback.success {
    color: var(--success);
}

.form-feedback.error {
    color: var(--danger);
}

.insight-card.warning {
    border-color: rgba(239, 68, 68, 0.4);
}

.insight-card.balance {
    border-color: rgba(59, 130, 246, 0.4);
}

.insight-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.insight-card strong {
    font-size: 1.4rem;
}

.icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.2);
}

.icon.bank {
    background: rgba(59, 130, 246, 0.25);
}

.icon.down {
    background: rgba(239, 68, 68, 0.25);
}

.icon.scale {
    background: rgba(16, 185, 129, 0.25);
}

@media (max-width: 1100px) {
    .transactions-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .sidebar {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 16px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        width: 100%;
        max-width: 100%;
    }

    .sidebar .menu {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .sidebar .primary-btn.full {
        width: 100%;
        max-width: 100%;
    }

    .menu-item {
        text-align: center;
        width: 100%;
    }

    .content {
        width: 100%;
        max-width: 100%;
    }
}
.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.reports-filter {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.reports-filter--nav {
    align-items: center;
    width: 100%;
}

.reports-filter--nav .month-nav {
    flex: 1;
    justify-content: center;
}

.reports-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 18px 0 12px;
}

.reports-titlebar h2 {
    margin: 0;
}

.reports-export {
    padding: 12px 18px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.25);
}

.reports-filter label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.reports-filter select {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6);
    color: var(--text);
}

.reports-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.reports-category-card {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    grid-template-areas:
        "header header"
        "chart list";
    gap: 32px;
    align-items: center;
}

.reports-category-header {
    grid-area: header;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reports-category-card .month-label {
    padding: 6px 18px;
    border-radius: 999px;
    border: 1px solid var(--primary);
    color: var(--primary);
    letter-spacing: 0.12em;
}

.reports-category-graphic {
    grid-area: chart;
}

.reports-category-list {
    grid-area: list;
}

.reports-category-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
}

.donut-chart {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: conic-gradient(var(--donut, #334155 0% 100%));
    position: relative;
    padding: 14px;
}

.donut-chart::after {
    content: '';
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: var(--panel);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

.donut-center strong {
    display: block;
    font-size: 1.1rem;
}

.donut-center span {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.reports-category-list h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
}

.reports-category-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reports-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.reports-category-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}

.reports-category-values {
    text-align: right;
}

.reports-category-values strong {
    display: block;
    color: var(--danger);
}

.reports-chart {
    width: 140px;
    height: 140px;
    position: relative;
}

.chart-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--success) var(--paid, 0%), rgba(239, 68, 68, 0.3) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.chart-ring::after {
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--panel);
}

.chart-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

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

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

.reports-list,
.reports-categories,
.trend-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reports-list li,
.trend-list li {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.4);
}

.reports-progress {
    margin-top: 8px;
}

.reports-progress .progress-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
    overflow: hidden;
}

.reports-progress .progress-track span {
    display: block;
    height: 100%;
    background: var(--primary);
}

.reports-progress-meta,
.trend-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.reports-categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.4);
}

.trend-bars {
    display: flex;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.2);
    margin: 10px 0;
}

.trend-bar {
    display: block;
    height: 100%;
}

.trend-bar.paid {
    background: var(--success);
}

.trend-bar.pending {
    background: var(--warning);
}
.settings-header {
    margin-bottom: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.settings-category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    min-height: 48px;
}

.settings-category-list li > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-category-list .category-actions {
    gap: 4px;
}

.settings-category-list .icon-btn {
    width: 30px;
    height: 30px;
}

.settings-category-list .icon-btn svg {
    width: 14px;
    height: 14px;
}

.toggle-label {
    margin-left: 10px;
}

@media (max-width: 900px) {
    .content {
        padding: 24px 24px;
    }

    .sidebar {
        padding: 20px 16px;
    }

    .summary-card {
        min-width: 130px;
    }

    .reports-category-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "chart"
            "list";
    }

    .reports-category-values {
        text-align: left;
    }

    .donut-chart {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 720px) {
    .sidebar {
        padding: 16px;
    }

    .menu {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .content {
        padding: 20px 16px;
    }

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

    .summary-inline {
        justify-content: flex-start;
    }

    .summary-card {
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
    }

    .filters-panel,
    .cards-filters {
        grid-template-columns: 1fr;
    }

    .filters-form {
        grid-template-columns: 1fr;
    }

    .cards-filters .filter-field.filter-field--actions,
    .filters-form .filter-field--actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cards-filters .filter-field.filter-field--actions .primary-btn,
    .cards-filters .filter-field.filter-field--actions .ghost-btn,
    .filters-form .filter-field--actions .primary-btn,
    .filters-form .filter-field--actions .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .legend {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .credit-card-stats,
    .account-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-meta {
        grid-template-columns: 1fr;
    }

    .transactions-board {
        padding: 20px;
        border-radius: 24px;
    }

    .transactions-header {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 16px;
    }

    .month-nav {
        justify-content: space-between;
        width: 100%;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .header-actions .primary-btn {
        width: 100%;
        justify-content: center;
    }

    .free-accounts-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .free-accounts-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .transactions-table table,
    .accounts-table table {
        min-width: 720px;
    }

    .modal {
        padding: 16px;
    }
}

@media (max-width: 520px) {
    .summary-card {
        flex: 1 1 100%;
    }

    .account-summary {
        grid-template-columns: 1fr;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .repeat-options__grid {
        grid-template-columns: 1fr;
    }

    .input-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .modal__panel {
        border-radius: 18px;
        padding: 18px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal__panel footer {
        flex-direction: column;
        align-items: stretch;
    }

    .modal__panel footer .primary-btn,
    .modal__panel footer .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .sidebar-footer {
        display: none;
    }

    .menu {
        grid-template-columns: 1fr;
    }

    .transactions-board {
        padding: 16px;
        border-radius: 20px;
    }

    .nav-arrow {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .month-label {
        font-size: 0.85rem;
        letter-spacing: 0.12em;
    }
}

@media (max-width: 680px) {
    .summary-inline {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        justify-content: stretch;
        width: 100%;
        align-self: stretch;
        justify-items: stretch;
    }

    .summary-card,
    .summary-card.small {
        width: 100%;
        min-width: 0;
    }

    .transactions-board,
    .card-block {
        padding: 16px;
        border-radius: 18px;
    }

    .transactions-header {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .month-nav {
        width: 100%;
        justify-content: space-between;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .table-scroll {
        overflow: visible;
    }

    .transactions-table table,
    .accounts-table table {
        width: 100%;
        display: block;
        min-width: 0;
    }

    .transactions-table thead,
    .accounts-table thead {
        display: none;
    }

    .transactions-table tbody,
    .accounts-table tbody {
        display: block;
        width: 100%;
    }

    .transactions-table tr,
    .accounts-table tr {
        display: block;
        padding: 12px 10px;
        border-bottom: 1px solid var(--border);
    }

    .transactions-table td,
    .accounts-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 0;
        border-bottom: none;
    }

    .transactions-table td::before,
    .accounts-table td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 0.7rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        flex: 0 0 auto;
        padding-right: 10px;
    }

    .transactions-table td.empty-state,
    .accounts-table td.empty-state {
        display: block;
        text-align: center;
    }

    .transactions-table td.empty-state::before,
    .accounts-table td.empty-state::before {
        content: '';
    }
}

@media (max-width: 420px) {
    .summary-inline {
        grid-template-columns: 1fr;
    }
}

/* Mobile layout hardening */
html {
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

body,
.app-shell,
.content,
.transactions-board,
.card-block,
.table-wrapper,
.table-scroll,
.transactions-table,
.accounts-table,
.account-card,
.credit-card-card,
.free-card,
.modal__panel {
    min-width: 0;
}

button,
input,
select,
textarea {
    max-width: 100%;
}

.account-card,
.credit-card-card,
.free-card {
    overflow: hidden;
}

.account-card header,
.account-card__header,
.credit-card-card header,
.free-card__head,
.payment-log__header {
    min-width: 0;
}

.credit-card-card strong,
.account-card strong,
.free-card strong,
.category-tag,
.status-pill,
.month-label {
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
        width: 100%;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 90;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand action"
            "menu menu";
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        background: rgba(11, 18, 34, 0.96);
        backdrop-filter: blur(14px);
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        grid-area: brand;
        min-width: 0;
        font-size: 0.95rem;
        letter-spacing: 0.06em;
    }

    .brand strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar .primary-btn.full {
        grid-area: action;
        width: auto;
        max-width: none;
        padding: 10px 14px;
        white-space: nowrap;
    }

    .sidebar .menu {
        grid-area: menu;
        display: flex;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding: 0 0 2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar .menu::-webkit-scrollbar {
        display: none;
    }

    .menu-item {
        flex: 0 0 auto;
        width: auto;
        border-radius: 999px;
        padding: 9px 12px;
        text-align: center;
        white-space: nowrap;
    }

    .sidebar-footer {
        display: none;
    }

    .content {
        width: 100%;
        max-width: 100%;
        padding: 18px max(14px, env(safe-area-inset-right)) 28px max(14px, env(safe-area-inset-left));
    }
}

@media (max-width: 720px) {
    .page-header,
    .reports-header,
    .reports-titlebar,
    .reports-overview,
    .free-accounts-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .page-header--minimal h1 {
        font-size: 1.2rem;
        letter-spacing: 0.05em;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .eyebrow,
    .summary-label,
    label span,
    thead th,
    .badge,
    .section-pill,
    .delete-options legend,
    .radio-option span {
        letter-spacing: 0.11em;
    }

    .summary-inline {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        justify-content: stretch;
    }

    .summary-card,
    .summary-card.small {
        min-width: 0;
        width: 100%;
        padding: 14px;
        border-radius: 14px;
    }

    .summary-label {
        margin-bottom: 8px;
        font-size: 0.68rem;
    }

    .summary-card strong,
    .insight-card strong {
        font-size: clamp(1rem, 4.8vw, 1.28rem);
        line-height: 1.2;
    }

    .filters-panel,
    .month-selector,
    .transactions-board,
    .card-block {
        padding: 14px;
        border-radius: 18px;
    }

    .filters-form,
    .cards-filters,
    .reports-filter {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .cards-filters .filter-field.filter-field--actions,
    .filters-form .filter-field--actions,
    .reports-filter {
        align-items: stretch;
    }

    .primary-btn,
    .ghost-btn,
    .danger-btn {
        min-height: 42px;
    }

    input,
    select,
    textarea {
        min-height: 44px;
        font-size: 16px;
    }

    .transactions-board {
        margin-top: 18px;
    }

    .transactions-header {
        grid-template-columns: 1fr;
        justify-items: stretch;
        gap: 12px;
    }

    .section-pill {
        width: 100%;
        justify-content: center;
        padding: 10px 12px;
        font-size: 0.78rem;
    }

    .month-nav {
        width: 100%;
        gap: 8px;
        justify-content: space-between;
    }

    .month-label {
        flex: 1;
        text-align: center;
        font-size: 0.78rem;
        letter-spacing: 0.08em;
    }

    .header-actions,
    .free-accounts-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 10px;
    }

    .header-actions .primary-btn,
    .free-accounts-actions .primary-btn,
    .free-accounts-actions .ghost-btn,
    .filters-form .primary-btn,
    .filters-form .ghost-btn,
    .cards-filters .primary-btn,
    .cards-filters .ghost-btn,
    .reports-filter .primary-btn,
    .reports-filter .ghost-btn {
        width: 100%;
        justify-content: center;
    }

    .accounts-grid,
    .credit-cards-grid,
    .free-accounts-grid,
    .settings-grid,
    .settings-category-list,
    .reports-grid,
    .reports-meta {
        grid-template-columns: 1fr;
    }

    .account-card,
    .credit-card-card,
    .free-card {
        padding: 14px;
        border-radius: 18px;
    }

    .credit-card-card header,
    .account-card__header,
    .free-card__head {
        flex-direction: column;
        align-items: stretch;
    }

    .credit-card-actions,
    .account-card__actions,
    .free-card__actions,
    .action-buttons,
    .payment-log__buttons,
    .category-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .credit-card-stats,
    .account-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .credit-card-stats div {
        white-space: normal;
    }

    .table-header {
        padding: 16px;
    }

    .table-scroll {
        overflow: visible;
    }

    .transactions-table table,
    .accounts-table table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .transactions-table thead,
    .accounts-table thead {
        display: none;
    }

    .transactions-table tbody,
    .accounts-table tbody {
        display: block;
        width: 100%;
    }

    .transactions-table tr,
    .accounts-table tr {
        display: block;
        margin: 0 0 10px;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 16px;
        background: rgba(15, 23, 42, 0.32);
    }

    .transactions-table tr:last-child,
    .accounts-table tr:last-child {
        margin-bottom: 0;
    }

    .transactions-table td,
    .accounts-table td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        min-width: 0;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: right;
    }

    .transactions-table td:last-child,
    .accounts-table td:last-child {
        border-bottom: none;
    }

    .transactions-table td::before,
    .accounts-table td::before {
        content: attr(data-label);
        flex: 0 0 42%;
        max-width: 42%;
        color: var(--text-muted);
        font-size: 0.68rem;
        letter-spacing: 0.11em;
        line-height: 1.35;
        text-align: left;
        text-transform: uppercase;
    }

    .transactions-table td.empty-state,
    .accounts-table td.empty-state {
        display: block;
        text-align: center;
    }

    .transactions-table td.empty-state::before,
    .accounts-table td.empty-state::before {
        content: '';
    }

    .category-tag,
    .status-pill {
        justify-content: center;
        max-width: 100%;
        min-width: 0;
        white-space: normal;
        text-align: center;
    }

    .modal {
        align-items: flex-start;
        padding: 10px;
        overflow-y: auto;
    }

    .modal__panel,
    .modal__panel--compact,
    .modal__panel--wide {
        width: 100%;
        max-height: none;
        margin: 8px 0;
        padding: 16px;
        border-radius: 18px;
        overflow: visible;
    }

    .modal__panel header {
        align-items: flex-start;
        gap: 12px;
    }

    .modal__panel footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .modal__panel footer .primary-btn,
    .modal__panel footer .ghost-btn,
    .modal__panel footer .danger-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-form,
    .modal-form--compact,
    .settings-form {
        gap: 12px;
    }

    .delete-summary,
    .reports-category-card {
        grid-template-columns: 1fr;
    }

    .reports-category-card {
        grid-template-areas:
            "header"
            "chart"
            "list";
        gap: 18px;
    }

    .donut-chart {
        width: min(220px, 70vw);
        height: min(220px, 70vw);
    }

    .reports-category-item,
    .reports-categories li,
    .settings-category-list li,
    .payment-log__header,
    .payment-log__actions,
    .free-payment-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 520px) {
    .sidebar {
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "action"
            "menu";
    }

    .sidebar .primary-btn.full {
        width: 100%;
        justify-content: center;
    }

    .summary-inline,
    .account-summary,
    .grid-2,
    .repeat-options__grid {
        grid-template-columns: 1fr;
    }

    .input-inline {
        display: grid;
        grid-template-columns: 1fr;
    }

    .nature-toggle {
        width: 100%;
    }

    .nature-toggle__btn {
        flex: 1;
        text-align: center;
    }

    .toggle-field {
        align-items: flex-start;
        gap: 12px;
    }

    .radio-option {
        padding: 12px 12px 12px 44px;
    }

    .transactions-table td,
    .accounts-table td {
        flex-direction: column;
        gap: 6px;
        text-align: left;
    }

    .transactions-table td::before,
    .accounts-table td::before {
        flex: none;
        max-width: none;
        padding-right: 0;
    }
}

@media (max-width: 380px) {
    .content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .summary-card,
    .filters-panel,
    .transactions-board,
    .card-block,
    .modal__panel {
        padding: 12px;
    }

    .nav-arrow {
        width: 30px;
        height: 30px;
    }
}

.positive {
    color: var(--success);
}

.negative {
    color: var(--danger);
}

.ride-page-header {
    align-items: center;
    margin-bottom: 20px;
}

.ride-page-header h1 {
    margin: 0;
    font-size: 2rem;
}

.ride-date-switch,
.ride-month-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.ride-date-switch label,
.ride-month-form input {
    min-width: 170px;
}

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

.ride-kpi,
.ride-panel,
.ride-report-card {
    border: 1px solid var(--border);
    background: rgba(21, 31, 53, 0.94);
    box-shadow: var(--shadow);
}

.ride-kpi {
    min-height: 118px;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ride-kpi--free {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(56, 189, 248, 0.16));
    border-color: rgba(16, 185, 129, 0.38);
}

.ride-kpi span,
.ride-live-total span,
.ride-live-grid span,
.ride-report-card header span,
.ride-report-main span {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ride-kpi strong {
    display: block;
    margin: 8px 0;
    font-size: 1.45rem;
}

.ride-kpi small {
    color: var(--text-muted);
    line-height: 1.35;
}

.ride-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
    gap: 18px;
    align-items: start;
}

.ride-panel {
    border-radius: 24px;
    padding: 22px;
}

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

.ride-panel__head h2,
.ride-form-section h3,
.ride-breakdown h3,
.ride-days-list h3 {
    margin: 0 0 6px;
}

.ride-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ride-lock-note {
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(251, 191, 36, 0.1);
    color: #fde68a;
    font-weight: 700;
    line-height: 1.35;
}

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

.ride-form-section {
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.ride-form textarea {
    resize: vertical;
    min-height: 96px;
}

.ride-live-card {
    position: sticky;
    top: 18px;
    background: linear-gradient(180deg, rgba(31, 42, 65, 0.98), rgba(12, 20, 38, 0.98));
}

.ride-live-total {
    border-radius: 22px;
    padding: 22px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-bottom: 14px;
}

.ride-live-total strong {
    display: block;
    margin-top: 8px;
    font-size: 2rem;
}

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

.ride-live-grid div {
    border-radius: 16px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.ride-live-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 1.05rem;
}

.ride-report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0;
}

.ride-report-card {
    border-radius: 22px;
    padding: 18px;
}

.ride-report-card header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.ride-report-main {
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.44);
    margin-bottom: 12px;
}

.ride-report-main strong {
    display: block;
    margin-top: 6px;
    font-size: 1.45rem;
}

.ride-report-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.ride-report-card dl div {
    border-radius: 14px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.ride-report-card dt {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.ride-report-card dd {
    margin: 5px 0 0;
    font-weight: 700;
}

.ride-month-panel {
    margin-top: 0;
}

.ride-month-toolbar {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) auto;
    align-items: end;
    gap: 12px;
    min-width: min(100%, 560px);
}

.ride-month-picker {
    display: grid;
    gap: 7px;
    min-width: 260px;
}

.ride-month-picker span {
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ride-month-picker input {
    width: 100%;
}

.ride-month-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.ride-month-actions .primary-btn {
    min-height: 46px;
    padding-left: 18px;
    padding-right: 18px;
}

.ride-month-content {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
}

.ride-breakdown,
.ride-days-list {
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.35);
    border-radius: 20px;
    padding: 16px;
}

.ride-breakdown-row {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.ride-breakdown-row:last-child {
    border-bottom: 0;
}

.ride-breakdown-row > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.ride-breakdown-row span {
    color: var(--text-muted);
}

.ride-breakdown-track {
    height: 7px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.18);
}

.ride-breakdown-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #10b981);
}

.ride-days-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    align-content: start;
}

.ride-days-list h3,
.ride-days-list .empty-state {
    grid-column: 1 / -1;
}

.ride-day-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 188px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(31, 42, 65, 0.68);
}

.ride-day-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.ride-day-card__head strong {
    display: block;
}

.ride-day-card__head span,
.ride-day-card__metrics dt {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ride-day-card__free {
    text-align: right;
    white-space: nowrap;
}

.ride-day-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.ride-day-card__metrics div {
    min-width: 0;
    border-radius: 14px;
    padding: 9px 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.34);
}

.ride-day-card__metrics dd {
    margin: 4px 0 0;
    color: #f8fafc;
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.ride-day-card footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 10px;
    margin-top: auto;
}

.ride-day-card footer form {
    margin: 0;
}

.ride-month-panel--pro {
    display: grid;
    gap: 18px;
    padding: 24px;
    overflow: hidden;
}

.ride-month-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, auto);
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.42);
}

.ride-month-title {
    display: grid;
    gap: 8px;
}

.ride-month-title > span,
.ride-month-kpis span,
.ride-month-insights span,
.ride-month-primary > span,
.ride-month-primary__grid span {
    color: #93c5fd;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ride-month-title h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    line-height: 1.05;
}

.ride-month-dashboard {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.35fr);
    gap: 14px;
}

.ride-month-primary {
    display: grid;
    gap: 14px;
    min-height: 100%;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(20, 184, 166, 0.38);
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.2), rgba(15, 23, 42, 0.72));
    box-shadow: 0 22px 42px rgba(8, 13, 28, 0.24);
}

.ride-month-primary > strong {
    display: block;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1;
}

.ride-month-primary p {
    margin: 0;
    color: var(--text-muted);
}

.ride-month-primary__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ride-month-primary__grid div,
.ride-month-kpis div,
.ride-month-insights article {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.42);
    border-radius: 16px;
    padding: 13px;
}

.ride-month-primary__grid strong,
.ride-month-kpis strong,
.ride-month-insights strong {
    display: block;
    margin-top: 6px;
    color: #f8fafc;
    font-size: 1.05rem;
    line-height: 1.15;
}

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

.ride-month-kpis div {
    min-height: 120px;
}

.ride-month-kpis small,
.ride-month-insights p {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    line-height: 1.35;
}

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

.ride-month-insights article:nth-child(1) {
    border-color: rgba(16, 185, 129, 0.28);
}

.ride-month-insights article:nth-child(2) {
    border-color: rgba(245, 158, 11, 0.3);
}

.ride-month-insights article:nth-child(3) {
    border-color: rgba(56, 189, 248, 0.28);
}

.ride-month-content--pro {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
}

.ride-month-left-column {
    display: grid;
    gap: 14px;
}

.ride-breakdown--income .ride-breakdown-track span {
    background: linear-gradient(90deg, #22c55e, #38bdf8);
}

.ride-days-list--pro {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
}

.ride-days-list__head {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 4px;
}

.ride-days-list__head h3,
.ride-days-list__head p {
    margin: 0;
}

.ride-days-list__head h3 {
    margin-bottom: 5px;
}

.ride-days-list__head > strong {
    color: #10b981;
    font-size: 1.25rem;
    white-space: nowrap;
}

.ride-day-card--pro {
    min-height: 242px;
    background: rgba(18, 28, 50, 0.84);
}

.ride-day-card--pro .ride-day-card__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ride-day-card--pro .ride-day-card__metrics div {
    padding: 10px;
}

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

.ride-form-grid--quick {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.ride-main-entry {
    padding-top: 16px;
}

.ride-big-field {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.32);
}

.ride-big-field span {
    margin-bottom: 10px;
}

.ride-big-field input {
    min-height: 58px;
    border-radius: 16px;
    font-size: 1.42rem;
    font-weight: 800;
}

.ride-date-locked input[readonly],
.ride-form input:disabled,
.ride-form select:disabled,
.ride-form textarea:disabled {
    cursor: not-allowed;
    opacity: 0.78;
}

.ride-advanced {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.28);
}

.ride-advanced summary {
    cursor: pointer;
    color: #cbd5e1;
    font-weight: 700;
    list-style-position: inside;
}

.ride-advanced .ride-form-grid {
    margin-top: 14px;
}

.ride-save-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    padding-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.ride-save-footer .primary-btn {
    min-width: 220px;
    min-height: 52px;
    border-radius: 18px;
    font-size: 1rem;
}

.ride-save-footer .primary-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.ride-locked-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.ride-locked-label:hover {
    background: rgba(139, 92, 246, 0.22);
    color: #f8fafc;
}

/* Mobile repair pass: keep header in flow and make menus/cards readable. */
@media (max-width: 980px) {
    .sidebar {
        position: static !important;
        display: grid !important;
        grid-template-columns: 1fr;
        grid-template-areas:
            "brand"
            "action"
            "menu";
        gap: 10px;
        padding: 12px;
    }

    .brand {
        justify-content: flex-start;
        width: 100%;
    }

    .sidebar .primary-btn.full {
        width: 100%;
        min-height: 42px;
    }

    .sidebar .menu {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
        width: 100%;
    }

    .menu-item {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        width: 100%;
        padding: 8px 6px;
        border-radius: 999px;
        font-size: 0.84rem;
        line-height: 1.15;
        white-space: normal;
        text-align: center;
    }

    .content {
        padding-top: 14px;
    }
}

@media (max-width: 720px) {
    .page-header,
    .transactions-board,
    .card-block,
    .table-wrapper {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .page-header h1,
    .transactions-header h1,
    .table-header h2 {
        margin-top: 0;
        line-height: 1.25;
    }

    .transactions-board {
        margin-top: 12px;
    }

    .transactions-table tr,
    .accounts-table tr {
        padding: 14px;
    }

    .transactions-table td,
    .accounts-table td {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: start;
        text-align: left;
        gap: 5px;
        padding: 9px 0;
    }

    .transactions-table td::before,
    .accounts-table td::before {
        max-width: 100%;
        flex: none;
        padding: 0;
    }

    .transactions-table td > *,
    .accounts-table td > * {
        max-width: 100%;
    }

    .action-buttons {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .sidebar .menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-item {
        min-height: 36px;
        font-size: 0.86rem;
    }
}

/* Mobile professional polish: compact dashboard, app-like cards. */
@media (max-width: 720px) {
    body {
        background: #0b1220;
    }

    .sidebar {
        background: #0b1020;
        box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
    }

    .brand {
        font-size: 0.86rem;
        letter-spacing: 0.08em;
    }

    .brand-dot {
        width: 12px;
        height: 12px;
    }

    .sidebar .primary-btn.full {
        min-height: 38px;
        padding: 9px 14px;
        border-radius: 16px;
        box-shadow: 0 10px 20px rgba(124, 58, 237, 0.22);
    }

    .sidebar .menu {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px;
    }

    .menu-item {
        min-height: 34px;
        padding: 7px 5px;
        border-radius: 12px;
        background: rgba(148, 163, 184, 0.06);
        font-size: 0.76rem;
        color: #b7c2d5;
    }

    .menu-item.active,
    .menu-item:hover {
        background: rgba(124, 58, 237, 0.28);
        color: #fff;
    }

    .content {
        padding: 14px 12px 26px;
        background: linear-gradient(180deg, #0c1426 0%, #101b31 48%, #0b1220 100%);
    }

    .summary-header {
        margin-bottom: 12px;
    }

    .summary-inline {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    .summary-card,
    .summary-card.small {
        min-height: 72px;
        padding: 12px 13px;
        border-radius: 14px;
        background: #17233a;
        box-shadow: none;
    }

    .summary-card:first-child {
        grid-column: 1 / -1;
        min-height: 82px;
        background: linear-gradient(135deg, rgba(23, 35, 58, 1), rgba(31, 42, 65, 1));
    }

    .summary-card.warning {
        border-color: rgba(249, 115, 22, 0.28);
    }

    .summary-card.success {
        border-color: rgba(16, 185, 129, 0.28);
    }

    .summary-label {
        margin: 0 0 8px;
        font-size: 0.64rem;
        letter-spacing: 0.14em;
    }

    .summary-card strong {
        font-size: clamp(1.04rem, 4.2vw, 1.35rem);
        line-height: 1.1;
    }

    .transactions-board {
        margin-top: 10px;
        padding: 12px;
        border-radius: 18px;
        background: rgba(23, 35, 58, 0.92);
        box-shadow: none;
    }

    .transactions-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .section-pill {
        min-height: 36px;
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 0.72rem;
        letter-spacing: 0.14em;
    }

    .month-nav {
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.42);
    }

    .month-label {
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }

    .nav-arrow {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        background: rgba(148, 163, 184, 0.1);
    }

    .header-actions .primary-btn.outline {
        display: none;
    }

    .nature-toggle {
        width: 100%;
        padding: 4px;
        border-radius: 14px;
        background: rgba(15, 23, 42, 0.48);
    }

    .nature-toggle__btn {
        min-height: 32px;
        border-radius: 11px;
        font-size: 0.68rem;
        letter-spacing: 0.14em;
    }

    .transactions-table {
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .table-header {
        padding: 2px 2px 12px;
        border-bottom: none;
    }

    .table-header h2 {
        font-size: 1.02rem;
        line-height: 1.25;
        margin: 0 0 4px;
    }

    .legend {
        gap: 12px;
        font-size: 0.82rem;
    }

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

    .transactions-table tr {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "desc value"
            "date status"
            "cat actions";
        gap: 10px 12px;
        margin: 0;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.14);
        border-radius: 16px;
        background: #1a253d;
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
    }

    .transactions-table td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
        text-align: left;
    }

    .transactions-table td::before {
        display: none;
    }

    .transactions-table td:nth-child(1) {
        grid-area: status;
        align-self: center;
        justify-self: end;
    }

    .transactions-table td:nth-child(2) {
        grid-area: date;
        align-self: center;
        color: #cbd5e1;
        font-size: 0.86rem;
    }

    .transactions-table td:nth-child(2)::before {
        content: 'Venc. ';
        display: inline;
        color: var(--text-muted);
        font-size: 0.74rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .transactions-table td:nth-child(3) {
        grid-area: desc;
        padding-right: 2px;
    }

    .transactions-table td:nth-child(3) strong {
        display: block;
        margin-bottom: 4px;
        font-size: 0.98rem;
        line-height: 1.18;
    }

    .transactions-table td:nth-child(3) .muted {
        display: block;
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .transactions-table td:nth-child(4) {
        grid-area: cat;
        align-self: center;
    }

    .transactions-table td:nth-child(5) {
        grid-area: value;
        align-self: start;
        justify-self: end;
        font-size: 0.98rem;
        font-weight: 700;
        color: #f8fafc;
        white-space: nowrap;
    }

    .transactions-table td:nth-child(6) {
        grid-area: actions;
        justify-self: end;
    }

    .status-pill {
        min-width: 0;
        padding: 5px 10px;
        border-radius: 999px;
        font-size: 0.72rem;
    }

    .category-tag {
        padding: 5px 9px;
        border-radius: 999px;
        font-size: 0.75rem;
    }

    .action-buttons {
        justify-content: flex-end;
        gap: 7px;
    }

    .icon-btn {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .modal__panel {
        background: #1a253d;
    }
}

@media (max-width: 380px) {
    .content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .sidebar .menu {
        gap: 5px;
    }

    .menu-item {
        font-size: 0.72rem;
        padding-left: 3px;
        padding-right: 3px;
    }

    .summary-card,
    .summary-card.small {
        padding: 10px;
    }

    .transactions-table tr {
        grid-template-columns: 1fr;
        grid-template-areas:
            "status"
            "desc"
            "value"
            "date"
            "cat"
            "actions";
    }

    .transactions-table td:nth-child(1),
    .transactions-table td:nth-child(5),
    .transactions-table td:nth-child(6) {
        justify-self: start;
    }
}

