/* =========================================
   NESLA - FINANCIAL DASHBOARD UI
   ========================================= */

:root {
    --bg-main: #07111f;
    --bg-sidebar: #0d1726;
    --bg-card: #132238;
    --bg-card-hover: #182b45;
    --primary: #00c2ff;
    --primary-dark: #0077ff;
    --success: #00d68f;
    --danger: #ff5b79;
    --warning: #ffb020;
    --purple: #7b61ff;
    --text-main: #f8fafc;
    --text-secondary: #9fb0c7;
    --border: rgba(255,255,255,.06);
    --shadow: 0 10px 35px rgba(0,0,0,.35);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

/* =========================================
   RESET
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 90%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top left, rgba(0,194,255,.12), transparent 28%), radial-gradient(circle at bottom right, rgba(123,97,255,.10), transparent 30%), var(--bg-main);
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.6;
}

/* =========================================
   SCROLLBAR
   ========================================= */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #08111d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient( 180deg, var(--primary), var(--purple) );
    border-radius: 20px;
}

/* =========================================
   LOGIN
   ========================================= */

.login-container {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient( 135deg, rgba(0,194,255,.15), rgba(123,97,255,.15) ), url('/images/login-bg.jpg');
    background-size: cover;
    background-position: center;
}

    .login-container::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(2, 6, 23, .80);
        backdrop-filter: blur(6px);
    }

.login-card {
    width: 100%;
    max-width: 470px;
    position: relative;
    z-index: 1;
    background: rgba(19,34,56,.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 45px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    transition: .3s ease;
}

    .login-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 45px rgba(0,0,0,.45);
    }

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

    .login-header h1 {
        font-size: 4rem;
        font-weight: 900;
        letter-spacing: 1px;
        background: linear-gradient( 90deg, var(--primary), var(--purple) );
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .login-header p {
        margin-top: 12px;
        color: var(--text-secondary);
        font-size: 18px;
    }

/* =========================================
   FORM
   ========================================= */

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #dce8ff;
}

.custom-input {
    width: 100%;
    height: 62px;
    padding: 0 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: white;
    font-size: 17px;
    transition: .25s ease;
}

    .custom-input:focus {
        color: white;
        outline: none;
        border-color: var(--primary);
        background: rgba(255,255,255,.06);
        box-shadow: 0 0 0 4px rgba(0,194,255,.12);
    }

    .custom-input::placeholder {
        color: #7d8da8;
    }

/* =========================================
   PASSWORD
   ========================================= */

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9fb0c7;
    cursor: pointer;
    font-size: 22px;
}

/* =========================================
   BUTTONS
   ========================================= */

.login-btn {
    width: 100%;
    height: 62px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: white;
    background: linear-gradient( 135deg, var(--primary), var(--primary-dark) );
    box-shadow: 0 10px 25px rgba(0,194,255,.25);
    transition: .25s ease;
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(0,194,255,.35);
    }

/* =========================================
   DASHBOARD
   ========================================= */

.home-container {
    width: 100%;
    max-width: 1450px;
    margin: auto;
    padding: 35px;
}

/* =========================================
   HEADER
   ========================================= */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.dashboard-title h1 {
    font-size: 42px;
    font-weight: 800;
}

.dashboard-title p {
    color: var(--text-secondary);
    font-size: 18px;
}

/* =========================================
   CARDS
   ========================================= */

.cards-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 35px;
}

.dashboard-card {
    background: linear-gradient( 180deg, #132238, #101d31 );
    border-radius: var(--radius-xl);
    padding: 35px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: .3s ease;
}

    .dashboard-card:hover {
        transform: translateY(-3px);
        background: var(--bg-card-hover);
    }

    .dashboard-card.blue {
        border-left: 6px solid var(--primary);
    }

    .dashboard-card.green {
        border-left: 6px solid var(--success);
    }

    .dashboard-card.purple {
        border-left: 6px solid var(--purple);
    }

    .dashboard-card.red {
        border-left: 6px solid var(--danger);
    }

.summary-label {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 14px;
}

.summary-amount {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.2;
}

/* =========================================
   INSIGHT CARD
   ========================================= */

.insight-card {
    margin-bottom: 35px;
    border-radius: var(--radius-xl);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient( 135deg, rgba(0,194,255,.92), rgba(123,97,255,.92) );
    box-shadow: 0 15px 35px rgba(0,0,0,.30);
}

.insight-icon {
    font-size: 70px;
}

.insight-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
}

.insight-text {
    font-size: 18px;
    opacity: .95;
}

/* =========================================
   TRANSACTIONS
   ========================================= */

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    transition: .25s ease;
}

    .transaction-item:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,.05);
    }

.transaction-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.transaction-icon {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient( 135deg, rgba(0,194,255,.20), rgba(123,97,255,.20) );
}

.transaction-title {
    font-size: 25px;
    font-weight: 700;
}

.transaction-category,
.transaction-date {
    color: var(--text-secondary);
    font-size: 16px;
}

.transaction-amount {
    font-size: 25px;
    font-weight: 800;
}

    .transaction-amount.positive {
        color: var(--success);
    }

    .transaction-amount.negative {
        color: var(--danger);
    }

/* =========================================
   TABLES
   ========================================= */

.financial-summary {
    background: linear-gradient( 180deg, #132238, #101d31 );
    border-radius: var(--radius-xl);
    padding: 35px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    color: white;
    border-collapse: collapse;
}

    .table thead {
        background: rgba(255,255,255,.04);
    }

        .table thead th {
            padding: 20px;
            font-size: 18px;
            font-weight: 700;
            text-align: left;
        }

    .table tbody td {
        padding: 20px;
        border-top: 1px solid rgba(255,255,255,.04);
    }

    .table tbody tr:hover {
        background: rgba(255,255,255,.03);
    }

/* =========================================
   FAB MENU CORREGIDO
   ========================================= */

/* CONTENEDOR PRINCIPAL */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

/* MENÚ DESPLEGABLE - Aparece ARRIBA del botón */
.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
    width: auto;
    min-width: 200px;
}

/* BOTÓN PRINCIPAL */
.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    transition: 0.25s ease;
    flex-shrink: 0;
}

    .fab-main:hover {
        transform: scale(1.06);
        box-shadow: 0 12px 25px rgba(102, 126, 234, 0.5);
    }

/* OPCIONES DEL MENÚ */
.fab-item {
    width: auto;
    min-width: 200px;
    padding: 12px 18px;
    border-radius: 50px;
    border: none;
    background: white;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: 0.25s ease;
    text-align: left;
    white-space: nowrap;
}

    .fab-item:hover {
        transform: translateX(-5px);
        background: #f8f9fa;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }

    /* ICONOS DENTRO DE LAS OPCIONES */
    .fab-item .icon {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex-shrink: 0;
    }

    /* COLORES DE LAS OPCIONES */
    .fab-item.ingreso {
        color: #2ecc71;
    }

        .fab-item.ingreso .icon {
            background: rgba(46, 204, 113, 0.15);
            color: #2ecc71;
        }

    .fab-item.volver {
        color: #667eea;
    }

        .fab-item.volver .icon {
            background: rgba(102, 126, 234, 0.15);
            color: #667eea;
        }

/* SEPARADOR */
.fab-divider {
    margin: 5px 0;
    border: none;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .fab-container {
        right: 20px;
        bottom: 20px;
    }

    .fab-main {
        width: 54px;
        height: 54px;
        font-size: 24px;
    }

    .fab-item {
        min-width: 180px;
        padding: 10px 16px;
        font-size: 14px;
    }

        .fab-item .icon {
            width: 30px;
            height: 30px;
            font-size: 16px;
        }
}

@media (max-width: 480px) {
    .fab-container {
        right: 15px;
        bottom: 15px;
    }

    .fab-main {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .fab-item {
        min-width: 160px;
        padding: 10px 14px;
        font-size: 13px;
        gap: 10px;
    }

        .fab-item .icon {
            width: 28px;
            height: 28px;
            font-size: 14px;
        }
}

/* =========================================
   LOADER
   ========================================= */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,.82);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-container {
    padding: 35px;
    border-radius: var(--radius-xl);
    background: #132238;
    border: 1px solid var(--border);
}

.spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,.08);
    border-top: 5px solid var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   ALERTS
   ========================================= */

.alert-danger {
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,91,121,.12);
    border: 1px solid rgba(255,91,121,.25);
    color: #ffd4dd;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media(max-width:768px) {

    .home-container {
        padding: 20px;
    }

    .dashboard-title h1 {
        font-size: 32px;
    }

    .summary-amount {
        font-size: 38px;
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .login-card {
        padding: 30px;
    }

    .login-header h1 {
        font-size: 3rem;
    }
}

.month-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #E0F7E9;
    border-radius: 20px;
    padding: 0.25rem 0.5rem;
    font-size: 2.0rem;
}

.form-groupCenter {
    display: flex;
    /* flex-direction: column;*/
    align-items: center;
    /* margin-bottom: 1rem;
   display: flex;
    flex-direction: column;*/
    gap: 0.5rem;
}

.button-group {
    display: flex;
    /* flex-direction: column;
    gap: 0.5rem;*/
}

.delete-button {
    width: 90%;
    padding: 16px;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .delete-button:hover {
        background: linear-gradient(135deg, #FF5252 0%, #FF0000 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
 

 
