/* Logy App — White + #00ACFC Brand Theme */

:root {
    /* ── Backgrounds ── */
    --bg-dark:           #EEF6FF;          /* Very light blue-tinted page bg */
    --bg-card:           #FFFFFF;          /* Pure white cards */
    --bg-card-hover:     #F0F9FF;          /* Pale brand hover */
    --bg-nav:            #FFFFFF;          /* White bottom nav */

    /* ── Borders ── */
    --border-color:      #CBE9FF;          /* Soft brand-tinted border */
    --border-glow:       #00ACFC;          /* Brand accent border on focus/hover */

    /* ── Text ── */
    --color-text-primary:   #0A1628;       /* Very dark navy — max contrast */
    --color-text-secondary: #1E3A5F;       /* Dark blue-gray */
    --color-text-muted:     #5B8DB8;       /* Medium blue-gray */

    /* ── Semantic colours (kept intentional) ── */
    --color-income:         #059669;       /* Emerald green — positive values */
    --color-income-bg:      rgba(5, 150, 105, 0.10);
    --color-expense:        #DC2626;       /* Red — negative values */
    --color-expense-bg:     rgba(220, 38, 38, 0.10);
    --color-conversion:     #D97706;       /* Amber — conversions */
    --color-conversion-bg:  rgba(217, 119, 6, 0.10);

    /* ── Brand ── */
    --color-savings:        #00ACFC;       /* PRIMARY brand blue */
    --color-primary:        var(--color-savings);
    --color-savings-bg:     rgba(0, 172, 252, 0.10);
    --color-savings-dark:   #0088C7;       /* Darker shade for gradients */

    /* ── Typography ── */
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg-dark:           #0B1120;
    --bg-card:           #151F32;
    --bg-card-hover:     #1E2A42;
    --bg-nav:            #151F32;
    --border-color:      #2A3F5F;
    --border-glow:       #00ACFC;
    --color-text-primary:   #E2E8F0;
    --color-text-secondary: #94A3B8;
    --color-text-muted:     #64748B;
    --color-savings-bg:     rgba(0, 172, 252, 0.15);
    --color-income-bg:      rgba(5, 150, 105, 0.15);
    --color-expense-bg:     rgba(220, 38, 38, 0.15);
    --color-conversion-bg:  rgba(217, 119, 6, 0.15);
}

/* ──────────────────────────────────────────────────
   BASE RESETS
────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--color-text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ──────────────────────────────────────────────────
   CARD / PANEL
────────────────────────────────────────────────── */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 172, 252, 0.07), 0 1px 3px rgba(0,0,0,0.04);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--border-glow);
    box-shadow: 0 4px 20px rgba(0, 172, 252, 0.15), 0 1px 3px rgba(0,0,0,0.04);
}

/* ──────────────────────────────────────────────────
   LAYOUT
────────────────────────────────────────────────── */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 16px 16px 90px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    touch-action: pan-y;
}

/* ──────────────────────────────────────────────────
   HEADER
────────────────────────────────────────────────── */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
}

.app-title {
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--color-savings) 0%, var(--color-savings-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.trm-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--color-savings-bg);
    border: 1px solid var(--border-color);
    color: var(--color-savings-dark);
}

/* ──────────────────────────────────────────────────
   CURRENCY TOGGLE
────────────────────────────────────────────────── */
.currency-toggle-container {
    display: flex;
    gap: 8px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.currency-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 13px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.currency-btn.active {
    background: var(--color-savings);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 172, 252, 0.35);
}

/* ──────────────────────────────────────────────────
   BALANCE HERO CARD
────────────────────────────────────────────────── */
.balance-card {
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, var(--bg-card) 60%, var(--bg-card-hover) 100%);
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 172, 252, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.balance-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
}

.balance-amount {
    font-size: 38px;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -1px;
    line-height: 1;
}

.balance-amount.emerald {
    color: var(--color-savings);
}

.balance-split {
    display: flex;
    justify-content: space-around;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.split-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.split-label {
    font-size: 11px;
    color: var(--color-text-muted);
}

.split-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* ──────────────────────────────────────────────────
   ACCOUNTS SECTION
────────────────────────────────────────────────── */
.accounts-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-secondary);
    padding-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

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

.account-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-icon.blue {
    background: var(--color-savings-bg);
    color: var(--color-savings);
}

.account-icon.amber {
    background: var(--color-conversion-bg);
    color: var(--color-conversion);
}

.account-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text-primary);
}

.account-sub {
    font-size: 11px;
    color: var(--color-text-muted);
}

.account-values {
    text-align: right;
}

.account-main-val {
    font-weight: 700;
    font-size: 15px;
}

.account-sub-val {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* ──────────────────────────────────────────────────
   QUICK ACTIONS GRID
────────────────────────────────────────────────── */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 18px;
    transition: var(--transition-smooth);
}

.action-btn:hover {
    border-color: var(--color-savings);
    box-shadow: 0 4px 14px rgba(0, 172, 252, 0.18);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 18px;
    color: var(--color-savings);
}

.action-btn span {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* ──────────────────────────────────────────────────
   FORM STYLES
────────────────────────────────────────────────── */
.form-panel {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-input {
    background: var(--bg-dark);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--color-text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    outline: none;
    transition: var(--transition-smooth);
}

.form-input:focus {
    border-color: var(--color-savings);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(0, 172, 252, 0.15);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235B8DB8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--color-savings) 0%, var(--color-savings-dark) 100%);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 15px;
    padding: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 172, 252, 0.35);
    letter-spacing: 0.2px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 172, 252, 0.45);
}

.submit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 172, 252, 0.3);
}

/* ──────────────────────────────────────────────────
   AUTOCOMPLETE
────────────────────────────────────────────────── */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.suggestion-chip {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--color-savings-bg);
    border: 1px solid var(--border-color);
    color: var(--color-savings-dark);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.suggestion-chip:hover {
    background: var(--color-savings);
    color: #FFFFFF;
    border-color: var(--color-savings);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-card);
    border: 1.5px solid var(--border-glow);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 172, 252, 0.18);
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.autocomplete-item:hover {
    background: var(--color-savings-bg);
}

.autocomplete-desc {
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text-primary);
}

.autocomplete-meta {
    font-size: 10px;
    color: var(--color-text-muted);
}

/* ──────────────────────────────────────────────────
   LEDGER LIST
────────────────────────────────────────────────── */
.ledger-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ledger-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.ledger-item:hover {
    border-color: var(--border-glow);
    box-shadow: 0 2px 10px rgba(0, 172, 252, 0.1);
}

.ledger-item.egreso {
    border-left: 3px solid var(--color-expense);
}

.ledger-item.ingreso {
    border-left: 3px solid var(--color-income);
}

.ledger-item.conversion {
    border-left: 3px solid var(--color-conversion);
}

.ledger-meta {
    display: flex;
    flex-direction: column;
}

.ledger-desc {
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text-primary);
}

.ledger-sub {
    font-size: 10px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.ledger-value-side {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ledger-val {
    font-weight: 700;
    font-size: 14px;
}

.ledger-val.egreso {
    color: var(--color-expense);
}

.ledger-val.ingreso {
    color: var(--color-income);
}

.ledger-val.conversion {
    color: var(--color-conversion);
}

.delete-btn {
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.delete-btn:hover {
    color: var(--color-expense);
    background: var(--color-expense-bg);
}

/* ──────────────────────────────────────────────────
   BOTTOM NAV
────────────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 70px;
    background: var(--bg-nav);
    border-top: 1.5px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 172, 252, 0.10);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
    flex: 1;
    height: 100%;
}

.nav-item.active {
    color: var(--color-savings);
}

.nav-item i {
    font-size: 18px;
}

.nav-item span {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* ──────────────────────────────────────────────────
   SETTINGS
────────────────────────────────────────────────── */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.setting-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text-primary);
}

/* ──────────────────────────────────────────────────
   TOGGLE SWITCH
────────────────────────────────────────────────── */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CBD5E1;
    transition: .4s;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

input:checked + .slider {
    background-color: var(--color-savings);
    border-color: var(--color-savings);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* ──────────────────────────────────────────────────
   FILTER BAR (LEDGER)
────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.filter-tab.active {
    background: var(--color-savings);
    color: #FFFFFF;
    border-color: var(--color-savings);
    box-shadow: 0 2px 8px rgba(0, 172, 252, 0.3);
}

/* ──────────────────────────────────────────────────
   CHART PANEL
────────────────────────────────────────────────── */
.chart-panel {
    padding: 16px;
    min-height: 200px;
}

/* ──────────────────────────────────────────────────
   HEATMAP
────────────────────────────────────────────────── */
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-top: 10px;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    background: #EEF6FF;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--color-text-muted);
}

/* Use brand blue for heatmap intensity */
.heatmap-cell.filled-1 { background: rgba(0, 172, 252, 0.15); border-color: rgba(0, 172, 252, 0.2); }
.heatmap-cell.filled-2 { background: rgba(0, 172, 252, 0.35); border-color: rgba(0, 172, 252, 0.4); }
.heatmap-cell.filled-3 { background: rgba(0, 172, 252, 0.60); border-color: rgba(0, 172, 252, 0.6); color: #fff; }
.heatmap-cell.filled-4 { background: rgba(0, 172, 252, 0.85); border-color: rgba(0, 172, 252, 0.8); color: #fff; }

/* ──────────────────────────────────────────────────
   MODAL CLASSES
────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ──────────────────────────────────────────────────
   LOGO ANIMATION & DRAWER
────────────────────────────────────────────────── */

.drawer-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.drawer-panel {
    position: fixed;
    top: 0; left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 10001;
    box-shadow: 2px 0 15px rgba(0,0,0,0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.drawer-panel.open {
    left: 0;
}

/* Setup Wizard Responsive Layout */
.wizard-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-gradient);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}
.wizard-panel {
    width: 100%;
    max-width: 800px;
    padding: 40px;
    position: relative;
    margin: auto;
}
.wizard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.wizard-grid-4 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: flex-end;
}
.wizard-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .wizard-wrapper {
        padding: 10px 5px !important;
    }
    .wizard-panel {
        padding: 20px 15px !important;
    }
    .wizard-grid-2, .wizard-grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .wizard-grid-4 {
        grid-template-columns: 1fr;
        gap: 10px;
        align-items: stretch;
    }
}
\n
.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}