:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #34495e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--primary);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.content-section {
    display: none;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.content-section.active {
    display: block;
}

h2 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.estado-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.estado-pendiente {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.estado-aprobado {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.estado-rechazado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.credito-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.credito-summary h4 {
    margin-bottom: 15px;
    color: white;
}

.credito-summary p {
    margin: 5px 0;
    font-size: 14px;
}

button {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.tutor-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--warning);
    margin: 15px 0;
}

.minor-badge {
    background-color: var(--warning);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 5px;
}

.tutor-info {
    background-color: #e8f4fd;
    padding: 10px;
    border-radius: 4px;
    margin: 5px 0;
}

button:hover {
    background-color: #2980b9;
}

button.danger {
    background-color: var(--danger);
}

button.danger:hover {
    background-color: #c0392b;
}

button.success {
    background-color: var(--success);
}

button.success:hover {
    background-color: #219955;
}

button.warning {
    background-color: var(--warning);
}

button.warning:hover {
    background-color: #e67e22;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background-color: #f8f9fa;
}

.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.card-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary);
}

.balance {
    font-size: 24px;
    font-weight: bold;
    color: var(--success);
}

.tab-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.tab.active {
    border-bottom: 3px solid var(--secondary);
    color: var(--secondary);
    font-weight: 600;
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.commission-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
}

.commission-ranges {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 15px;
}

.commission-range {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.cliente-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cliente-info p {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.cuentas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.cuenta-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cuenta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.moneda-badge {
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.cuenta-saldo {
    font-size: 24px;
    font-weight: bold;
    color: var(--success);
    margin: 10px 0;
}

.cuenta-fecha, .cuenta-tarjeta {
    font-size: 12px;
    color: #666;
}

.credito-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.credito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.credito-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.credito-info p {
    margin: 5px 0;
}

.desglose-cuotas {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.desglose-cuotas h5 {
    margin-bottom: 10px;
    color: var(--primary);
}

.table-container {
    overflow-x: auto;
}

.cuotas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cuotas-table th,
.cuotas-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cuotas-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.cuotas-table tfoot {
    background-color: #f8f9fa;
    font-weight: bold;
}

.estado-pago {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.estado-pago.pendiente {
    background-color: #fff3cd;
    color: #856404;
}

.estado-pago.pagado {
    background-color: #d1ecf1;
    color: #0c5460;
}

.estado-pago.vencido {
    background-color: #f8d7da;
    color: #721c24;
}


@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 15px;
        justify-content: center;
    }

    nav ul li {
        margin: 0 10px;
    }

    .commission-ranges {
        grid-template-columns: 1fr;
    }

        .cliente-info {
        grid-template-columns: 1fr;
    }
    
    .credito-info {
        grid-template-columns: 1fr;
    }
    
    .cuentas-grid {
        grid-template-columns: 1fr;
    }
}