:root {
    /* Light Theme (Default-ish but we'll use dark as base) */
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #10b981;
    --expense: #ef4444;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Dynamic Variables */
    --bg-color: #0c111d;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] {
    --bg-color: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(15, 23, 42, 0.08);
    --shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
}

.app-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.header-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 8px;
    border-radius: 12px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 16px;
    margin-bottom: 8px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

/* View Layout */
.view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cards & Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.card {
    padding: 24px;
}

.hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.1));
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.balance-display .label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.balance-display h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
}

/* Fix ordering: Save left, Cancel right */
.modal-footer button.btn-primary,
.modal-footer button[type="submit"] {
    grid-column: 1;
    grid-row: 1;
}

.modal-footer button.btn-ghost,
.modal-footer button[type="button"] {
    grid-column: 2;
    grid-row: 1;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat span {
    font-weight: 600;
}

.income {
    color: var(--secondary);
}

.expense {
    color: var(--expense);
}

/* Savings Card */
.savings-card {
    padding: 20px;
}

.savings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.badge-accent {
    background: var(--primary-glow);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
}

.progress-container {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.5s ease-out;
}

.subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.large-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 10px 0;
}

.large-text.secondary {
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.highlight-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(0, 0, 0, 0.2));
    border: 1px solid var(--primary-glow);
}

/* Advice */
.advice-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.advice-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Month Selector */
.month-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.month-selector h2 {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
    text-transform: capitalize;
}

.btn-nav {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: var(--primary);
    color: white;
}

/* Category Icons */
.cat-icon {
    width: 42px;
    height: 42px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.item .info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Pie Chart */
.pie-chart-wrap {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pie-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    position: relative;
    box-shadow: var(--shadow);
}

.pie-chart::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--bg-color);
    border-radius: 50%;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hidden {
    display: none !important;
}

/* Actions */
.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    padding: 16px;
    border-radius: 16px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    color: white;
}

.btn-primary {
    background: var(--primary);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-secondary {
    background: var(--secondary);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn:active {
    transform: scale(0.95);
}

/* History */
.history-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
}

/* Search Bar */
.search-container {
    position: relative;
    width: 100%;
}

.search-container input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 12px 16px 12px 40px;
    border-radius: 14px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.search-container input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 1rem;
}

/* Recurrent Banner */
.recurrent-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px dashed var(--primary-glow);
    padding: 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.recurrent-banner p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 10px;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.item .info p {
    font-weight: 500;
}

.item .info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.item .amount {
    font-weight: 700;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Content */
.modal {
    width: 92%;
    max-width: 420px;
    max-height: 90vh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    scrollbar-width: thin;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Salary Styling */
.salary-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0;
    margin-bottom: 20px;
    opacity: 0.9;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-icon-small {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.pulse-primary {
    animation: pulse-glow 2s infinite;
    background: var(--primary) !important;
}

@keyframes pulse-glow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* Form Styles */
#transaction-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-left: 4px;
    margin-bottom: 4px;
}

.form-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 14px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Specific for dates */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.5;
    cursor: pointer;
}

/* Charts */
.chart-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
}

.chart-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.bar-outer {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.bar-inner {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
}

/* Textarea Glass Style */
.glass-input,
textarea.glass-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
    resize: vertical;
}

.item-comments {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 4px 0;
    opacity: 0.8;
}

/* Glass Select Style */
.glass-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 14px 16px;
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' 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 16px center;
    background-size: 16px;
    transition: all 0.2s ease;
}

.glass-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background-color: rgba(255, 255, 255, 0.08);
}

.glass-select option {
    background: #1e293b;
    color: white;
    padding: 12px;
}

/* --- Donut Chart Premium Styles --- */
.donut-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.donut-svg {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.2));
    transform: rotate(-90deg);
}

.donut-segment {
    transition: stroke-dasharray 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s;
    cursor: pointer;
}

.donut-segment:hover {
    stroke-width: 30;
    filter: brightness(1.2);
}

.donut-total-label {
    fill: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transform: rotate(90deg);
    transform-origin: center;
}

.donut-total-value {
    fill: var(--text-main);
    font-size: 16px;
    font-weight: 700;
    transform: rotate(90deg);
    transform-origin: center;
}

.chart-legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.legend-item-premium {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.legend-val {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
}

@media (max-width: 400px) {
    .chart-legend-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Gastos Hormiga (Quick Expenses) --- */
.quick-expenses {
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.quick-actions-row {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 8px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar IE/Edge */
}

.quick-actions-row::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.btn-quick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 85px;
    height: 85px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-main);
    flex-shrink: 0;
}

.btn-quick:active {
    transform: scale(0.9);
}

.btn-quick .q-icon {
    font-size: 1.5rem;
}

.btn-quick .q-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
}

.btn-quick:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-4px);
}

/* Toast Notification (Simple) */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--secondary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 3000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* --- User Profile & Auth Modal --- */
.user-profile-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 24px;
}

.avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.user-details p {
    margin: 0;
}

/* --- Category Filters --- */
.filters-row {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 0;
    margin-bottom: 8px;
    scrollbar-width: none;
}

.filters-row::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Custom Checkbox Style */
.checkbox-group {
    flex-direction: row !important;
    align-items: center;
    gap: 12px !important;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
}

.checkbox-group:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
    padding: 0;
    color: var(--text-main);
    width: 100%;
    position: relative;
}

.checkbox-group input {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.checkbox-group input:checked {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.checkbox-group input:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 900;
}

.checkbox-group:has(input:checked) {
    border-color: var(--primary-glow);
    background: rgba(99, 102, 241, 0.05);
}

/* Debt Options Container */
.debt-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 4px 0;
}

.debt-options .checkbox-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 14px;
}

#installments-group {
    margin-top: 8px;
    animation: fadeIn 0.3s ease;
}

.badge-debt {
    background: rgba(239, 68, 68, 0.1);
    color: var(--expense);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.6rem;
}

.badge-loan {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.6rem;
}

/* --- Advanced Debt UI --- */

/* Basic Paid Status */
.item.paid {
    opacity: 0.6 !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.item.paid .amount {
    text-decoration: line-through;
}

/* Overdue Alert */
.item.overdue {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: rgba(239, 68, 68, 0.03) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.1) !important;
}

.due-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.overdue-text {
    color: var(--expense);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* Premium Pagar Button */
.btn-pay {
    padding: 8px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary), #059669);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
    filter: brightness(1.1);
}

.btn-pay:active {
    transform: scale(0.92);
}

/* Revertir Button (Unpay) */
.btn-unpay {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
    border: 1px solid var(--glass-border) !important;
}

.btn-unpay:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: var(--text-main) !important;
}

/* Transaction Actions (Edit/Delete) */
.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transform: translateY(-1px);
}

.btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--expense);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-icon.edit:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.2);
}

footer {
    text-align: center;
    padding: 32px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--glass-border);
}

footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

footer strong {
    color: var(--primary);
    font-weight: 600;
}