/* Prestamos - estilos especificos */

/* Page Header */
.page-header {
    margin-top: 70px;
    padding: 60px 20px;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.page-header h1 i {
    margin-right: 12px;
    color: #f39c12;
}

.page-header p {
    font-size: 1.05rem;
    opacity: 0.9;
    max-width: 680px;
    margin: 0 auto;
}

/* Section */
.prestamos-section {
    padding: 60px 20px;
    background-color: #f8f9fa;
    min-height: 60vh;
}

.card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eee;
    padding: 25px;
}

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

.section-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls {
    display: flex;
    gap: 10px;
}

/* Loading */
.loading-spinner {
    text-align: center;
    padding: 30px 10px;
    color: #7f8c8d;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #eaecef;
    border-radius: 12px;
    overflow: hidden;
}

.results-table thead th {
    background: #f3f6fa;
    color: #2c3e50;
    text-align: left;
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 1px solid #eaecef;
    font-size: 0.95rem;
}

.results-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f5;
    color: #34495e;
    vertical-align: top;
}

.results-table tbody tr:hover {
    background: #fafcff;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status badge */
.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success { background: #eafaf1; color: #27ae60; border: 1px solid #cdeedb; }
.badge-warning { background: #fff8e6; color: #f39c12; border: 1px solid #ffe7b3; }
.badge-info    { background: #eaf6ff; color: #2980b9; border: 1px solid #cfe7fb; }

/* Action button in table */
.table-action {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #1abc9c, #16a085);
    color: #fff;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 188, 156, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .results-table thead {
        display: none;
    }

    .results-table, .results-table tbody, .results-table tr, .results-table td {
        display: block;
        width: 100%;
    }

    .results-table tr {
        margin-bottom: 15px;
        border: 1px solid #eaecef;
        border-radius: 10px;
        overflow: hidden;
    }

    .results-table td {
        border: none;
        border-bottom: 1px solid #f0f2f5;
        position: relative;
        padding-left: 50%;
        min-height: 44px;
    }

    .results-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 700;
        color: #7f8c8d;
        width: calc(50% - 24px);
        white-space: nowrap;
    }
}

/* === THEME OVERRIDES (Prestamos) === */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800)) !important;
  color: #fff !important;
}
.page-header h1, .page-header p { color: #fff !important; }
.page-header h1 i { color: var(--color-accent-yellow) !important; }

.card { border: 1px solid var(--color-border) !important; }
.section-header h2 { color: var(--color-primary-700) !important; }

.results-table thead th {
  background-color: var(--color-primary-600) !important;
  color: #fff !important;
}
.results-table tbody tr:hover { background: #f3f7f5 !important; }

.badge-success { background: #eafaf1 !important; color: var(--color-primary-600) !important; border: 1px solid #cdeedb !important; }
.badge-warning { background: #fff8e6 !important; color: #b78600 !important; border: 1px solid #ffe7b3 !important; }
.badge-info    { background: #edf7f3 !important; color: var(--color-primary-600) !important; border: 1px solid #d6eee5 !important; }

.table-action {
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700)) !important;
  color: #fff !important;
}
.table-action:hover {
  box-shadow: 0 6px 16px rgba(45,106,79,0.3) !important;
}