/* ============================================================================
   FRANZ FINANÇAS - GUARDAR.CSS (V_FINAL_CORES_FIX)
   ============================================================================ */
:root {
    --invest-primary: #00623B;
    --invest-dark: #003B23;
    --bg-graph: #0a2e2b;
    --gold: #D4AF37;
    --gold-light: #F4EBD0;
    --bg-body: #F3F4F6;
    --text-dark: #1F2937;
    --danger: #EF4444;
}

/* LAYOUT FLEXÍVEL */
html,
body {
    height: 100%;
    margin: 0;
}

body {
    background-color: var(--bg-body);
    font-family: 'Mulish', sans-serif;
    display: flex;
    flex-direction: column;
    color: var(--text-dark);
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239CA3AF' fill-opacity='0.12' font-family='Arial' font-weight='bold'%3E%3Ctext x='10' y='30' transform='rotate(15 10,30)' font-size='24'%3E$%3C/text%3E%3Ctext x='50' y='80' transform='rotate(-20 50,80)' font-size='28'%3E€%3C/text%3E%3Ctext x='120' y='40' transform='rotate(45 120,40)' font-size='20'%3E£%3C/text%3E%3Ctext x='160' y='20' transform='rotate(-10 160,20)' font-size='30'%3E¥%3C/text%3E%3Ctext x='30' y='150' transform='rotate(90 30,150)' font-size='22'%3ER$%3C/text%3E%3Ctext x='90' y='120' transform='rotate(-45 90,120)' font-size='26'%3E₿%3C/text%3E%3C/g%3E%3C/svg%3E");
}

header {
    background: linear-gradient(180deg, var(--invest-primary) 0%, var(--invest-dark) 100%);
    padding: 15px 24px;
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 20;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    flex: 1;
    text-align: center;
}

.btn-icon-head {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--gold);
    color: var(--gold);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    backdrop-filter: blur(5px);
}

.dashboard-curved {
    position: relative;
    width: 100%;
    height: 320px;
    display: flex;
    background-color: var(--bg-graph);
    padding-top: 20px;
    overflow: hidden;
    margin-bottom: 0;
    flex-shrink: 0;
}

.dash-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    transition: filter 0.2s;
    position: relative;
    z-index: 5;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

.dash-col:last-child {
    border-right: none;
}

.dash-col:active {
    filter: brightness(1.2);
}

.dash-col-bar {
    width: 100%;
    min-height: 60px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    opacity: 0.9;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 15px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
}

.col-title {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.col-circle {
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.curve-overlay {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100px;
    background-color: var(--bg-body);
    border-top-left-radius: 100% 100%;
    border-top-right-radius: 100% 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 25px;
    z-index: 15;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--gold);
}

.total-label {
    font-weight: 700;
    font-size: 0.8rem;
    color: #6B7280;
    text-transform: uppercase;
}

.total-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--invest-primary);
    margin: 0;
    line-height: 1;
}

.container {
    padding: 0 20px;
    position: relative;
    z-index: 15;
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
}

.section-header {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--invest-primary);
    border-bottom: 2px solid var(--gold);
    display: inline-block;
    padding-bottom: 5px;
    margin: 15px 0 15px 0;
    text-transform: uppercase;
}

#goals-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.goal-card {
    background: white;
    padding: 15px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.goal-card:active {
    transform: scale(0.98);
    border-color: var(--gold);
}

.goal-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 10px;
}

.goal-info {
    flex: 1;
    overflow: hidden;
}

.goal-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #4B5563;
}

.goal-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--invest-primary);
}

.goal-add-btn {
    background: #f3f4f6;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    color: var(--invest-primary);
    font-weight: bold;
    cursor: pointer;
}

.trans-card {
    background: white;
    padding: 15px;
    border-radius: 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    border-left: 3px solid var(--gold);
}

.trans-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
}

.trans-meta {
    font-size: 0.75rem;
    color: #999;
    margin-top: 2px;
}

.trans-amount {
    font-weight: 800;
    font-size: 1rem;
}

.text-green {
    color: var(--invest-primary);
}

.text-red {
    color: #DC2626;
}

.text-blue {
    color: #2563EB;
}

.app-footer {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    margin-top: auto;
    background: linear-gradient(180deg, var(--invest-primary) 0%, var(--invest-dark) 100%);
    border-top: 3px solid var(--gold);
    color: var(--gold-light);
    padding: 15px 20px 100px 20px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
    z-index: 10;
}

.app-footer strong {
    color: var(--gold);
}

.footer-link {
    color: var(--gold);
    text-decoration: none;
    display: block;
    margin-top: 15px;
    font-weight: 700;
    font-size: 0.8rem;
    opacity: 0.8;
}

.fab-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    bottom:100px;
    z-index: 1000;
}

.fab {
    background: var(--invest-primary);
    color: var(--gold);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bottom-nav {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 380px;
    background: #0f393b;
    border: 1px solid var(--gold);
    border-radius: 50px;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 900;
}

.nav-item {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
    font-weight: 600;
}

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

.nav-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-sheet {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 25px;
    animation: popUp 0.2s;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes popUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

.modal-title {
    color: var(--invest-primary);
    font-weight: 800;
    font-size: 1.3rem;
}

.close-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    cursor: pointer;
}

.form-input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-bottom: 10px;
    box-sizing: border-box;
    background: #f9fafb;
    font-size: 1rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 5px;
    display: block;
    margin-top: 10px;
}

/* --- BOTÕES FORÇADOS (CORES) --- */
.action-row {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn-act {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Verde (Guardar) */
.btn-act-green {
    background-color: #059669 !important;
    color: #FFFFFF !important;
    border: 1px solid #047857 !important;
}

/* Azul (Transferir) */
.btn-act-blue {
    background-color: #2563EB !important;
    color: #FFFFFF !important;
    border: 1px solid #1D4ED8 !important;
}

/* Laranja (Resgatar) */
.btn-act-orange {
    background-color: #F97316 !important;
    color: #FFFFFF !important;
    border: 1px solid #EA580C !important;
}

/* Vermelho/Branco (Lixeira) */
.btn-act-del {
    background-color: #FEF2F2 !important;
    color: #EF4444 !important;
    border: 2px solid #FCA5A5 !important;
}

#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    padding: 16px;
    position: fixed;
    z-index: 10000;
    left: 50%;
    bottom: 120px;
    transform: translateX(-50%);
    opacity: 0;
    transition: 0.3s;
}

#toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 140px;
}