/* ===== MemoPreço - Premium Design ===== */

/* Tema Claro */
:root {
    --primary: linear-gradient(135deg, #5eceaa 0%, #221e55 100%);
    --primary-solid: #5eceaa;
    --primary-dark: #221e55;
    --accent: linear-gradient(135deg, #77d5b7 0%, #5eceaa 100%);
    --accent-solid: #77d5b7;

    --bg-primary: #f8f9ff;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-modal: rgba(255, 255, 255, 0.95);

    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;

    --border-color: rgba(102, 126, 234, 0.1);
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.08);
    --shadow-md: 0 4px 16px rgba(102, 126, 234, 0.12);
    --shadow-lg: 0 8px 32px rgba(102, 126, 234, 0.16);

    --success: #48bb78;
    --error: #f56565;
    --warning: #ed8936;

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

/* Tema Escuro */
[data-theme="dark"] {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-card: rgba(26, 31, 46, 0.9);
    --bg-modal: rgba(26, 31, 46, 0.95);

    --text-primary: #f7fafc;
    --text-secondary: #cbd5e0;
    --text-muted: #a0aec0;

    --border-color: rgba(102, 126, 234, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

    --glass-bg: rgba(26, 31, 46, 0.7);
    --glass-border: rgba(102, 126, 234, 0.2);
}

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'SF Pro Display', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ===== Utilities ===== */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* ===== Theme Toggle ===== */
/* Removido (integrado ao dropdown) */

/* ===== Buttons ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-solid);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-solid);
}

.item-card {
    position: relative;
    touch-action: pan-y;
    /* Permite scroll vertical, bloqueia horizontal (nós controlamos) */
    user-select: none;
    /* Evita seleção de texto durante arrasto */
    will-change: transform;
}

.item-card.swiping {
    transition: none !important;
}

/* Status Styles */
.item-card.status-in-cart {
    border: 2px solid var(--success);
    background: rgba(72, 187, 120, 0.1);
    /* Light green */
}

.item-card.status-pending {
    border: 2px solid var(--warning);
    background: rgba(237, 137, 54, 0.1);
    /* Light yellow */
}

/* Icon Styles */
.item-status-icon {
    font-size: 1.2em;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 700;
}

.card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 4px 0;
}

.card small {
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    width: 90%;
    max-width: 480px;
    background: var(--bg-modal);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: slideUp 0.3s ease-out;
    overflow: visible;
    /* Permitir que o dropdown saia do modal */
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Auth Container ===== */
.auth-container {
    max-width: 420px;
    margin: 60px auto;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 32px;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 28px;
    font-weight: 800;
}

/* ===== FAB (Floating Action Button) ===== */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 28px;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

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

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-solid);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* ===== Header ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 24px;
}

header h1 {
    font-size: 32px;
    font-weight: 800;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* ===== Error Message ===== */
.error-msg {
    color: var(--error);
    margin-top: 12px;
    font-size: 14px;
    padding: 12px;
    background: rgba(245, 101, 101, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--error);
}

/* ===== Links ===== */
a {
    color: var(--primary-solid);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    #app {
        padding: 16px;
    }

    .auth-container {
        margin: 40px auto;
    }

    header h1 {
        font-size: 24px;
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-solid);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== Budget System ===== */
.budget-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
}

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

.budget-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.budget-edit-btn {
    padding: 6px 14px;
    font-size: 13px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.budget-edit-btn:hover {
    border-color: var(--primary-solid);
    color: var(--primary-solid);
}

/* Barra de Progresso */
.budget-progress {
    margin: 16px 0;
}

.budget-progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.budget-progress-fill {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.budget-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.budget-progress-fill.safe {
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
}

.budget-progress-fill.warning {
    background: linear-gradient(90deg, #ed8936 0%, #dd6b20 100%);
}

.budget-progress-fill.danger {
    background: linear-gradient(90deg, #f56565 0%, #e53e3e 100%);
}

/* Badges Informativos */
.budget-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.budget-badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.budget-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-solid);
}

.budget-badge-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.budget-badge-value {
    font-size: 18px;
    font-weight: 800;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.budget-badge.spent .budget-badge-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.budget-badge.target .budget-badge-value {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.budget-badge.remaining .budget-badge-value {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modal de Orçamento */
.modal.budget-modal h3 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
}

.modal.budget-modal p {
    text-align: center;
    color: var(--text-secondary);
    margin: 8px 0;
    font-size: 15px;
}

.modal.budget-modal .highlight {
    font-size: 32px;
    font-weight: 800;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 16px 0;
}

/* Linha de Economia */
.budget-economy {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.budget-economy-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.budget-economy-value {
    font-size: 24px;
    font-weight: 800;
}

.budget-economy-value.positive {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.budget-economy-value.negative {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Intl Tel Input Fix ===== */
.iti {
    width: 100% !important;
    display: block !important;
    margin-bottom: 0 !important;
}

.iti__flag-container {
    gap: 10px;
}

.notification {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-solid);
    display: flex;
    align-items: center;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: var(--success);
}


.notification-error {
    border-left-color: var(--error);
}

/* ===== Dropdown ===== */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--bg-card);
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    z-index: 1001;
    overflow: hidden;
    margin-top: 8px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideUp 0.2s ease-out;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-icon {
    margin-right: 10px;
    font-size: 16px;
}

.dropdown-item:hover {
    background-color: var(--bg-primary);
    color: var(--primary-solid);
}

.dropdown-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* ===== Sticky Budget Bar ===== */
.budget-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    /* Above modal (1000) and everything else usually */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .budget-sticky-bar {
    background: rgba(26, 31, 46, 0.95);
}

.budget-sticky-bar.visible {
    transform: translateY(0);
}

/* ===== Autocomplete Suggestions ===== */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 2000;
    /* Maior que o modal (1000) */
    list-style: none;
    padding: 0;
    margin-top: 4px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.suggestions-list li {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.suggestions-list li:last-child {
    border-bottom: none;
}

.suggestions-list li:hover {
    background: var(--bg-primary);
}

.sticky-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.sticky-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 2px;
    font-weight: 700;
}

.sticky-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.sticky-value.spent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sticky-value.target {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sticky-value.success {
    color: var(--success);
}

.sticky-value.danger {
    color: var(--error);
}

.sticky-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
}

/* Update Notification */
.update-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

.update-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.update-content button {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.update-content button:hover {
    background-color: #f0f0f0;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
}

.toast-show {
    opacity: 1;
    transform: translateX(0);
}

.toast-hide {
    opacity: 0;
    transform: translateX(120%);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Tipos de toast */
.toast-info {
    border-left: 4px solid var(--primary-solid);
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-error {
    border-left: 4px solid var(--error);
}

/* Dark mode support */
[data-theme="dark"] .toast {
    background: rgba(26, 31, 46, 0.95);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .toast-container {
        top: 60px;
        right: 16px;
        left: 16px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* ===== Toast Item Específico ===== */
.toast-item {
    border-left: 4px solid var(--success);
}

.toast-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.toast-item-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.toast-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-item-name {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.toast-item-user {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

/* ===== List Card Stats ===== */
.list-stats-left {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    width: fit-content;
}

.stat-badge.pending {
    background-color: rgba(237, 137, 54, 0.1);
    color: var(--warning);
    border: 1px solid rgba(237, 137, 54, 0.2);
}

.stat-badge.in-cart {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--success);
    border: 1px solid rgba(72, 187, 120, 0.2);
}

.list-meta {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 700;
}

.list-stats-right {
    display: flex;
    /* justify-content: center; */
    align-self: center;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 12px;
    min-width: 200px;
    border: 1px solid var(--border-color);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    gap: 12px;
}

.stat-row small {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.stat-row strong {
    color: var(--text-primary);
    font-weight: 700;
}

.text-success {
    color: var(--success) !important;
    font-weight: 700;
}

.text-danger {
    color: var(--error) !important;
    font-weight: 700;
}

/* Gradient Text Utilities */
.text-gradient {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    /* Ensure gradient works on inline elements */
}

.text-gradient-spent {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.text-gradient-target {
    background-image: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.text-gradient-success {
    background-image: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.text-gradient-danger {
    background-image: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

/* ===== Landing Page ===== */
.landing-page {
    background: var(--bg-primary);
    min-height: 100vh;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.landing-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.landing-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 80px;
    padding: 40px 0;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-text {
    background: none;
    color: var(--text-primary);
    padding: 12px 16px;
}

.btn-text:hover {
    color: var(--primary-solid);
    background: var(--bg-secondary);
}

/* Mockup Animation */
.mockup-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 24px;
    border: 1px solid var(--border-color);
    max-width: 380px;
    margin: 0 auto;
    position: relative;
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.mockup-card:hover {
    transform: rotate(0deg) scale(1.02);
}

.mockup-header {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.mockup-dot.red {
    background: #ff5f56;
}

.mockup-dot.yellow {
    background: #ffbd2e;
}

.mockup-dot.green {
    background: #27c93f;
}

.mockup-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mockup-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    opacity: 0.6;
}

.mockup-row.active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--primary-solid);
}

.mockup-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.active .mockup-check {
    background: var(--success);
    border-color: var(--success);
}

.mockup-line {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    flex: 1;
}

.mockup-price {
    width: 60px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
}

.mockup-total {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-primary);
    padding-top: 16px;
    border-top: 2px dashed var(--border-color);
}

/* Features */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.feature-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-solid);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.landing-footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

/* Mobile Responsive Landing */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
    }

    .landing-header {
        flex-direction: column;
        gap: 20px;
    }

    .hero-content h1 {
        font-size: 36px;
    }
}

/* ===== Enhanced Landing Page Sections ===== */

.section-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    padding: 20px 0;
}

/* Coming Soon Section */
.coming-soon-section {
    background: var(--bg-card);
    padding: 100px 0;
    margin: 80px 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.coming-soon-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-solid), transparent);
}

.coming-soon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.coming-soon-card {
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.coming-soon-card:hover {
    border-color: var(--primary-solid);
    transform: translateY(-5px);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

.cs-icon {
    font-size: 32px;
    margin-bottom: 16px;
    background: var(--bg-primary);
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 24px;
}

.coming-soon-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.coming-soon-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    max-width: 800px;
    margin: 0 auto;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 20px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary-solid);
}

.faq-item details {
    padding: 24px;
}

.faq-item summary {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 32px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--primary-solid);
    transition: transform 0.2s ease;
}

.faq-item details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item p {
    margin-top: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer Enhanced */
.landing-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.footer-logo img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.footer-links h4,
.footer-credits h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 500;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary-solid);
}

.footer-links a::after {
    display: none;
    /* Remove underline animation from global styles */
}

.footer-credits p {
    color: var(--text-secondary);
}

.footer-credits strong {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 28px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }
}

/* ===== Layout Overrides ===== */
#app.full-width {
    max-width: 100%;
    padding: 0;
}

/* ===== Landing Page Container Fix ===== */
.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.landing-header {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 20px 24px;
}

.hero-section {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 40px 24px;
}

.features-section {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 24px;
}

.faq-section {
    padding: 80px 24px;
}

.landing-footer .footer-content {
    /* Already has max-width and padding in previous CSS, checking priority */
    padding: 0 24px;
}

/* ===== Features Section Fix ===== */
/* Override previous grid display which caused side-by-side layout with header */
.features-section {
    display: block;
}

/* Ensure the grid inside features section still behaves as grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    padding: 20px 0;
}

/* ===== Coming Soon Grid Tweak ===== */
/* With 4 items, we want a 2x2 grid on desktop, not 3x1. Increasing min-width forces this. */
.coming-soon-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

/* ===== Offline Banner CTA ===== */
.offline-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.4s ease-out;
}

.offline-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.offline-banner-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.offline-banner-text {
    flex: 1;
    min-width: 180px;
    color: white;
    font-size: 13px;
    line-height: 1.4;
}

.offline-banner-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.offline-banner-cta {
    background: rgba(255, 255, 255, 0.95);
    color: #764ba2 !important;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.offline-banner-cta::after {
    display: none;
}

.offline-banner-cta:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.offline-banner-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.offline-banner-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 480px) {
    .offline-banner-content {
        gap: 8px;
    }

    .offline-banner-cta {
        width: 100%;
        text-align: center;
    }
}

/* ===== Recovery Password Premium Modal ===== */
.modal-content.recovery-modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 245, 255, 0.95) 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    max-width: 440px;
    padding: 32px;
}

[data-theme="dark"] .modal-content.recovery-modal {
    background: linear-gradient(135deg, rgba(30, 36, 52, 0.95) 0%, rgba(20, 24, 35, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

.recovery-step {
    text-align: center;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.recovery-step h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recovery-step p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Input de Telefone Bonito */
.recovery-step .iti {
    margin-bottom: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

.recovery-step input {
    height: 52px;
    border-radius: 12px;
    font-size: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.recovery-step input:focus {
    border-color: var(--primary-solid);
    box-shadow: 0 0 0 4px rgba(94, 206, 170, 0.15);
    outline: none;
}

/* OTP Input Estilizado */
#otpInput {
    font-family: 'Courier New', monospace;
    font-size: 28px !important;
    letter-spacing: 12px !important;
    text-align: center;
    font-weight: 700;
    color: var(--primary-solid);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#otpInput:focus {
    letter-spacing: 12px !important;
}

/* Botões */
.full-width {
    width: 100%;
    margin-top: 8px;
    font-size: 16px;
    padding: 14px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 10px 20px -5px rgba(94, 206, 170, 0.4);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.full-width:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(94, 206, 170, 0.5);
}

.full-width:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    background: transparent;
    color: var(--text-secondary);
    box-shadow: none;
    font-size: 14px;
}

.btn-text:hover {
    color: var(--primary-solid);
    background: rgba(0, 0, 0, 0.05);
    box-shadow: none;
    transform: none;
}

/* Mensagens */
.success-msg {
    background: rgba(72, 187, 120, 0.1);
    color: #38a169;
    border: 1px solid rgba(72, 187, 120, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
}

.error-msg {
    background: rgba(245, 101, 101, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(245, 101, 101, 0.2);
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}