/**
 * CashFlowX - Estilos del Dashboard
 * Autoría: Expressatech, CEO Gustavo A. Tomasi
 */

/* ==================== LOGIN ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--espacio-md);
    background: var(--gradiente-oscuro);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: var(--espacio-2xl);
}

.login-header {
    text-align: center;
    margin-bottom: var(--espacio-2xl);
}

.login-header .logo {
    font-size: 2.5rem;
    margin-bottom: var(--espacio-sm);
}

.login-form {
    margin-bottom: var(--espacio-lg);
}

/* ==================== DASHBOARD GRID ==================== */
.dashboard-grid {
    display: grid;
    gap: var(--espacio-lg);
    grid-template-columns: 1fr;
}

/* ==================== WIDGETS ==================== */
.widget {
    background: var(--gris-oscuro);
    border-radius: var(--radio-lg);
    padding: var(--espacio-lg);
    box-shadow: var(--sombra-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transicion-normal);
}

.widget:hover {
    border-color: var(--verde-neon-expressa);
    box-shadow: var(--sombra-neon);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--espacio-lg);
    padding-bottom: var(--espacio-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.widget-icon {
    font-size: 1.5rem;
}

/* ==================== BALANCE CARDS ==================== */
.balance-card {
    text-align: center;
    padding: var(--espacio-xl);
}

.balance-label {
    font-size: 0.875rem;
    color: var(--texto-secundario);
    margin-bottom: var(--espacio-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradiente-principal);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--espacio-sm);
}

.balance-subtitle {
    font-size: 0.875rem;
    color: var(--texto-secundario);
}

/* ==================== STAT CARDS ==================== */
.stat-grid {
    display: grid;
    gap: var(--espacio-md);
    grid-template-columns: 1fr;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--espacio-md);
    padding: var(--espacio-lg);
    background: var(--gris-medio);
    border-radius: var(--radio-md);
    border-left: 4px solid var(--verde-neon-expressa);
}

.stat-icon {
    font-size: 2rem;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--texto-secundario);
    margin-bottom: var(--espacio-xs);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-change {
    font-size: 0.875rem;
    margin-top: var(--espacio-xs);
}

.stat-change.positive {
    color: var(--verde-neon-expressa);
}

.stat-change.negative {
    color: #FF3B30;
}

/* ==================== TABLAS ==================== */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--gris-medio);
}

.table th {
    padding: var(--espacio-md);
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--texto-secundario);
}

.table td {
    padding: var(--espacio-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table tbody tr {
    transition: background var(--transicion-rapida);
}

.table tbody tr:hover {
    background: var(--gris-medio);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-block;
    padding: var(--espacio-xs) var(--espacio-sm);
    border-radius: var(--radio-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(0, 230, 118, 0.2);
    color: var(--verde-neon-expressa);
}

.badge-warning {
    background: rgba(255, 215, 0, 0.2);
    color: var(--amarillo-flecha);
}

.badge-danger {
    background: rgba(255, 59, 48, 0.2);
    color: #FF3B30;
}

.badge-info {
    background: rgba(0, 122, 255, 0.2);
    color: #007AFF;
}

/* ==================== PROGRESS BAR ==================== */
.progress-bar {
    height: 8px;
    background: var(--gris-medio);
    border-radius: var(--radio-sm);
    overflow: hidden;
    margin-top: var(--espacio-sm);
}

.progress-fill {
    height: 100%;
    background: var(--gradiente-principal);
    transition: width var(--transicion-normal);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: var(--espacio-2xl);
    color: var(--texto-secundario);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--espacio-md);
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.125rem;
    margin-bottom: var(--espacio-md);
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: var(--espacio-md);
}

.modal {
    background: var(--gris-oscuro);
    border-radius: var(--radio-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--sombra-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    padding: var(--espacio-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--blanco);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--espacio-sm);
    line-height: 1;
}

.modal-body {
    padding: var(--espacio-lg);
}

.modal-footer {
    padding: var(--espacio-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: var(--espacio-md);
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .widget-full {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}