.gastos-page {
    padding: 0;
}

.gastos-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.gastos-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
}

.gastos-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0;
}

.gastos-header-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.btn-exportar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: #374151;
    display: flex;
    align-items: center;
}

.btn-exportar:hover {
    background: #f3f4f6;
}

.btn-nuevo-gasto {
    background-color: #e02020;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    text-decoration: none;
}

.btn-nuevo-gasto:hover {
    background-color: #c01a1a;
    color: #fff;
}

/* Tarjetas resumen */
.gastos-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.gasto-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.gasto-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gasto-card-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.gasto-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.gasto-card-sub {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}

.gasto-card-icon {
    font-size: 1.6rem;
    color: #d1d5db;
}

/* Filtros */
.gastos-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.gastos-select {
    padding: 0.5rem 0.85rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #fff;
    cursor: pointer;
}

/* Tabla */
.gastos-table-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.gastos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.gastos-table thead tr {
    border-bottom: 1px solid #e5e7eb;
}

.gastos-table th {
    text-align: left;
    padding: 0.85rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gastos-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    white-space: nowrap;
}

.gastos-table tbody tr:last-child td {
    border-bottom: none;
}

.gastos-table tbody tr:hover {
    background-color: #f9fafb;
}

.gastos-row-clickable {
    cursor: pointer;
}

.gastos-empty {
    text-align: center;
    color: #6b7280;
    padding: 1.5rem 1rem;
}

.matricula-badge {
    display: inline-flex;
    align-items: center;
    background-color: #f3f4f6;
    color: #1a1a1a;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.sin-asignar {
    color: #9ca3af;
}

.badge-categoria {
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    border-radius: 9999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid #e5e7eb;
    color: #374151;
    letter-spacing: 0.03em;
}

.badge-categoria-rojo {
    color: #ef4444;
    border-color: #fecaca;
}

.badge-recurrencia {
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    border-radius: 9999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.badge-recurrencia-activa {
    color: #3b82f6;
    border-color: #bfdbfe;
}

.btn-acciones {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #6b7280;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.btn-acciones:hover {
    background-color: #f3f4f6;
    color: #1a1a1a;
}

/* == NUEVO GASTO == */

.nt-upload-box {
    border: 2px dashed #e5e7eb;
    border-radius: 10px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
}

.nt-upload-box:hover {
    background: #f3f4f6;
}

.nt-upload-icon {
    font-size: 1.5rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    display: block;
}

.nt-upload-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.nt-upload-hint {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* == MIS REPOSTAJES == */

.mis-repostajes-page {
    padding: 1rem;
    padding-bottom: 6rem;
}

.mr-header {
    margin-bottom: 1.25rem;
}

.mr-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem;
}

.mr-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0;
}

.mr-filtros {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.mr-filtro-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.mr-filtro-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mr-filtro-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    padding-right: 2.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 0.9rem;
    color: #1a1a1a;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.mr-filtro-input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.mr-filtro-input:focus {
    border-color: #e02020;
    box-shadow: 0 0 0 3px rgba(224, 32, 32, 0.10);
}

.mr-filtro-icon {
    position: absolute;
    right: 0.85rem;
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
}

.mr-total-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mr-total-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.3rem;
}

.mr-total-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #e02020;
}

.mr-lista {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mr-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background 0.2s ease;
}

.mr-item:hover {
    background: #f9fafb;
}

.mr-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.mr-item-fecha {
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.mr-item-fecha i {
    color: #9ca3af;
    font-size: 1rem;
}

.mr-item-descripcion {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mr-item-importe {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    flex-shrink: 0;
}

.mr-empty {
    text-align: center;
    color: #6b7280;
    padding: 2rem 1rem;
    font-size: 0.95rem;
}
