* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #0a0c14;
    color: #e0e4f0;
    line-height: 1.5;
}

.header {
    background: #141b2b;
    border-bottom: 1px solid #253040;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #fff, #a0b0d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    font-size: 0.75rem;
    color: #6b7b98;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.nav a {
    color: #8896b0;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: 0.3s;
    font-size: 0.9rem;
}

.nav a:hover {
    background: #1e2639;
    color: white;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 120px);
}

.footer {
    background: #141b2b;
    border-top: 1px solid #253040;
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: #6b7b98;
}

/* Tarjetas */
.card {
    background: #141b2b;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #253040;
    margin-bottom: 24px;
}

.card h2 {
    margin-bottom: 20px;
    color: #a0b0d0;
}

/* Grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #141b2b;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #253040;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #3b82f6;
}

.stat-card .label {
    font-size: 0.8rem;
    color: #6b7b98;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-card .value.positive { color: #10b981; }
.stat-card .value.warning { color: #f59e0b; }
.stat-card .value.info { color: #3b82f6; }
.stat-card .value.danger { color: #ef4444; }

/* Botones */
.btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}

.btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.btn-danger {
    background: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: #10b981;
}

.btn-success:hover {
    background: #059669;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #8896b0;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #1e2639;
    border: 1px solid #2f3a50;
    border-radius: 10px;
    color: #e0e4f0;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px;
    background: #1e2639;
    color: #8896b0;
    font-weight: 500;
    border-bottom: 1px solid #2f3a50;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #253040;
}

.data-table tr:hover td {
    background: #1e2639;
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.activo { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.badge.pagado { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.badge.moroso { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.badge.activo-prestamo { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge.info { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.badge.warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .nav {
        justify-content: center;
    }
    .container {
        padding: 20px 15px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .stat-card .value {
        font-size: 1.4rem;
    }
}