/* ================================================
   GASTOS CSS - GAMMA FINANZAS
   Page-specific styles (base in theme.css)
   ================================================ */

/* ============================================
   LAYOUT
   ============================================ */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.container {
    display: grid;
    gap: 2rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.section-header button,
.header-actions button {
    padding: 0.5rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    font-size: 0.85rem;
}

/* ============================================
   COLUMNAS
   ============================================ */
.fondos-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.fondo-column {
    min-height: 400px;
}

.fondo-column-content {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================
   GASTO ITEM CARD (dentro de columna)
   ============================================ */
.fondo-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    padding: 0.85rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    margin-bottom: 0.5rem;
}

.fondo-item:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

.fondo-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.fondo-item .fondo-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fondo-item .fondo-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--danger);
}

.fondo-persona .persona-label {
    font-size: 0.75rem;
    color: var(--danger-text);
    font-weight: 500;
    background: var(--danger-subtle);
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(248, 113, 113, 0.15);
}

.fondo-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
    min-width: 170px;
    width: 190px;
}

.fondo-actions {
    width: 100%;
}

.fondo-actions-row {
    display: flex;
    gap: 0.35rem;
    justify-content: space-between;
    width: 100%;
}

.fondo-actions-row button {
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    flex: 1;
    min-width: 68px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.fondo-actions-col {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
}

/* ============================================
   GASTO ITEM CARD (grid layout)
   ============================================ */
.data-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.gasto-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.gasto-item:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

.gasto-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.75rem;
}

.gasto-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}

.gasto-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--danger);
}

.gasto-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.gasto-meta label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

.gasto-meta span {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.gasto-status {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
    justify-content: center;
}

.gasto-actions {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.4rem;
}

/* ============================================
   FORMULARIOS (page-specific)
   ============================================ */
form {
    padding: 1.5rem;
}

.form-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
}

.checkbox-group,
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.checkbox-group label,
.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius);
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: all var(--transition);
    font-size: 0.9rem;
}

.checkbox-group label:hover,
.radio-group label:hover {
    border-color: var(--primary);
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .fondos-columns {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    main {
        padding: 1rem;
    }

    .fondos-columns {
        grid-template-columns: 1fr;
    }

    .fondo-column {
        min-height: 300px;
    }

    .data-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .checkbox-group,
    .radio-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.5rem;
    }

    .data-list {
        grid-template-columns: 1fr;
    }

    .gasto-title {
        font-size: 0.75rem;
    }

    .gasto-amount {
        font-size: 0.9rem;
    }
}
