/* ===================================================================
   CONTROL DE PRESUPUESTO - Stylesheet
   =================================================================== */

:root {
    /* Colors */
    --primary: #4CAF50;
    --primary-dark: #1B5E20;
    --primary-light: #81C784;
    --primary-lighter: #C8E6C9;
    --danger: #E53935;
    --danger-light: #FFCDD2;
    --warning: #FFA726;
    --background: #F8F9F5;
    --surface: #FFFFFF;
    --text: #1B5E20;
    --text-muted: #689F38;
    --border: rgba(76, 175, 80, 0.2);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    --gradient-danger: linear-gradient(135deg, #E53935 0%, #EF5350 100%);

    /* Effects */
    --shadow-sm: 0 2px 8px rgba(27, 94, 32, 0.08);
    --shadow-md: 0 4px 16px rgba(27, 94, 32, 0.12);
    --shadow-lg: 0 8px 32px rgba(27, 94, 32, 0.16);

    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --container-max: 600px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 20px 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

.logo span:last-child {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main */
.main {
    padding: 24px 0 40px;
}

/* Income Section */
.income-card {
    background: var(--gradient-primary);
    color: white;
    padding: 32px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
}

.income-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.income-header h2 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-edit {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-edit:hover {
    background: rgba(255, 255, 255, 0.3);
}

.income-amount {
    font-size: 3rem;
    font-weight: 800;
    display: block;
    word-break: break-word;
    overflow-wrap: break-word;
}

.income-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.income-form input {
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.25rem;
    font-family: var(--font-family);
    width: 150px;
    text-align: center;
}

.income-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.income-form input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.3);
}

.hidden {
    display: none !important;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--surface);
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.summary-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.summary-card.spent .summary-value {
    color: var(--danger);
}

.summary-card.available .summary-value {
    color: var(--primary);
}

/* Progress Bar */
.progress-section {
    margin-bottom: 24px;
}

.progress-bar {
    height: 20px;
    background: var(--primary-lighter);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-danger);
    border-radius: 10px;
    transition: width 0.5s ease;
    min-width: 0;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Section Card */
.section-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.section-card h2 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 0;
}

/* Expense Form */
.expense-form .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.expense-form .form-row:last-child {
    margin-bottom: 0;
}

.expense-form input,
.expense-form select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    background: var(--background);
    color: var(--text);
}

.expense-form input:focus,
.expense-form select:focus {
    outline: none;
    border-color: var(--primary);
}

.expense-form input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary-dark);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-lighter);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Expenses List */
.expenses-list {
    max-height: 400px;
    overflow-y: auto;
}

.expense-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--background);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    animation: slideIn 0.3s ease;
}

.expense-item:last-child {
    margin-bottom: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.expense-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--surface);
    border-radius: var(--border-radius-sm);
}

.expense-info {
    flex: 1;
}

.expense-desc {
    font-weight: 600;
    color: var(--primary-dark);
}

.expense-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.expense-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--danger);
}

.delete-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: all 0.2s;
}

.expense-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: var(--danger-light);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Category Chart */
.category-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-label {
    width: 100px;
    font-size: 0.875rem;
    font-weight: 500;
}

.category-bar-wrapper {
    flex: 1;
    height: 24px;
    background: var(--primary-lighter);
    border-radius: 12px;
    overflow: hidden;
}

.category-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 12px;
    transition: width 0.5s ease;
}

.category-value {
    width: 80px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-dark);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 94, 32, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.modal-content h3 {
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-lighter);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===================================================================
   AUTHENTICATION SCREENS
   =================================================================== */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo .logo-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.auth-logo h1 {
    color: white;
    font-size: 2rem;
    font-weight: 800;
}

.auth-form {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary-dark);
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.auth-form .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.auth-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    background: var(--background);
    color: var(--text);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

.auth-error {
    color: var(--danger);
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 16px;
    padding: 8px;
    background: var(--danger-light);
    border-radius: var(--border-radius-sm);
}

.btn-block {
    width: 100%;
    margin-bottom: 16px;
}

.auth-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
    color: white;
    font-weight: 600;
}

.loading-screen.hidden {
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Google Button */
.btn-google {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-google:hover {
    background: var(--background);
    border-color: var(--primary);
}

.btn-google svg {
    flex-shrink: 0;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 16px;
    font-size: 0.875rem;
}

/* ===================================================================
   APP SCREEN & HEADER UPDATES
   =================================================================== */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-lighter);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-light);

    transform: scale(1.1);
}

/* ===================================================================
   VARIABLE INCOME STYLES
   =================================================================== */
.variable-income-form .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.variable-income-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    background: var(--background);
    color: var(--text);
}

.variable-income-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    width: 50px;
    /* Square button for + */
    height: 48px;
    /* Match input height roughly */
    padding: 0;
    font-size: 1.5rem;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.variable-income-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.variable-income-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--background);
    border-radius: var(--border-radius-sm);
    animation: slideIn 0.3s ease;
}

.variable-income-desc {
    font-weight: 600;
    color: var(--primary-dark);
    flex: 1;
}

.variable-income-amount {
    font-weight: 700;
    color: var(--primary);
    /* Green for income */
    font-size: 1.125rem;
    margin-right: 16px;
}

/* REMOVED VARIABLE INCOME STYLES BLOCK */

/* Reusing delete-btn styles from expenses */

/* Welcome Banner */
.welcome-banner {
    background: var(--primary-lighter);
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-dark);
}

/* ===================================================================
   SAVE/LOAD MODALS
   =================================================================== */
.modal-lg {
    max-width: 500px;
}

.modal-content .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.modal-content label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-content input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    background: var(--background);
    color: var(--text);
}

.modal-content input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.save-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: left;
}

/* Saved Budgets List */
.saved-budgets-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.budget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--background);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.budget-item:hover {
    background: var(--primary-lighter);
}

.budget-item:last-child {
    margin-bottom: 0;
}

.budget-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--surface);
    border-radius: var(--border-radius-sm);
}

.budget-info {
    flex: 1;
}

.budget-name {
    font-weight: 600;
    color: var(--primary-dark);
}

.budget-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.budget-actions {
    display: flex;
    gap: 4px;
}

.budget-actions button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.5;
    transition: all 0.2s;
}

.budget-item:hover .budget-actions button {
    opacity: 1;
}

.budget-actions button:hover {
    background: var(--danger-light);
}

/* ===================================================================
   TOAST NOTIFICATION
   =================================================================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--gradient-primary);
    color: white;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    font-weight: 600;
    font-size: 1rem;
}

/* Income Form with Currency */
.form-row-income {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.currency-select {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    background: var(--background);
    color: var(--text);
    font-size: 1rem;
    width: 110px;
    cursor: pointer;
}

.currency-select:focus {
    outline: none;
    border-color: var(--primary);
}

.income-form input {
    flex: 1;
    /* Take remaining space */
}

/* ===================================================================
   MOBILE OPTIMIZATION
   =================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    /* Header Compacto - keep horizontal, allow wrapping */
    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }

    .header-actions {
        gap: 4px;
    }

    .btn-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .logo span:last-child {
        font-size: 1.15rem;
    }

    .header {
        padding: 10px 0;
    }

    /* Tarjetas principales */
    .income-card,
    .savings-card-container {
        padding: 20px 14px;
        overflow: hidden;
    }

    .income-amount {
        font-size: 2rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Income Form Mobile */
    .form-row-income {
        flex-direction: column;
        margin-bottom: 8px;
    }

    .income-form input {
        width: 100%;
        margin-bottom: 0;
    }

    .income-form {
        flex-direction: column;
    }

    .currency-select {
        width: 100%;
    }

    /* Savings section */
    .savings-card-container .section-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .savings-card-container .section-header h2 {
        font-size: 1rem;
    }

    #savingsForm {
        flex-direction: column;
    }

    #savingsForm input {
        width: 100%;
    }

    #savingsForm button {
        width: 100%;
    }

    /* Summary Cards */
    .summary-cards {
        gap: 12px;
    }

    .summary-value {
        font-size: 1.15rem;
        word-break: break-word;
    }

    /* Formularios verticales */
    .expense-form .form-row,
    .variable-income-form .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .expense-form input,
    .expense-form select,
    .variable-income-form input,
    .expense-form .btn {
        width: 100%;
        min-height: 42px;
        padding: 10px 14px;
    }

    /* Fix Limpiar button too large */
    .section-header .btn {
        width: auto;
        padding: 8px 16px;
    }

    /* Lista de gastos optimizada */
    .expense-item {
        padding: 12px;
        padding-right: 60px;
        position: relative;
    }

    .expense-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .expense-desc {
        font-size: 0.95rem;
    }

    .expense-amount {
        display: block;
        margin-top: 4px;
        font-size: 1rem;
    }

    .delete-btn {
        position: absolute;
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        opacity: 0.7;
        width: 36px;
        height: 36px;
        background: rgba(229, 57, 53, 0.1);
        color: var(--danger);
    }

    .delete-btn:hover {
        opacity: 1;
        background: rgba(229, 57, 53, 0.2);
    }

    /* Modales */
    .modal-content {
        width: 95%;
        padding: 20px 16px;
        margin: 0 10px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions button {
        width: 100%;
    }

    /* Feedback widget */
    .feedback-popup {
        right: 16px;
        width: calc(100vw - 32px);
        max-width: 300px;
    }
}

/* SAVINGS FORM FIX */
#savingsForm {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
}

#savingsForm .form-row-income {
    flex: 1;
}

#savingsForm input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#savingsForm input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#savingsForm button {
    white-space: nowrap;
    padding: 12px 20px;
}


/* ===================================================================
   FEEDBACK WIDGET (Pop-up Style)
   =================================================================== */
.feedback-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feedback-fab svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
}

.feedback-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: var(--primary-dark);
}

.feedback-fab:hover svg {
    transform: scale(1.1);
}

.feedback-fab:active {
    transform: scale(0.95);
}

/* POPUP Container */
.feedback-popup {
    position: fixed;
    bottom: 85px;
    right: 24px;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 1000;
    
    /* Animation State: Hidden */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Decoration */
    border: 1px solid rgba(0,0,0,0.05);
}

.feedback-popup.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

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

.popup-header h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-popup-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

.close-popup-btn:hover {
    color: var(--danger);
}

.feedback-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.9rem;
    outline: none;
}

.feedback-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 0.9rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
}

.feedback-textarea:focus {
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .variable-income-form .btn-success {
        width: 100%;
    }
}
