/* ==========================================================================
   VILEC Admin Dashboard Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: #F4F5FF;
    margin: 0;
    color: #4A4E69;
}

/* Layout General del Admin */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #002B49;
    color: #fff;
    padding: 20px;
    flex-shrink: 0;
}

.sidebar h2 {
    font-size: 18px;
    margin-bottom: 30px;
    text-align: center;
    color: #fff;
    letter-spacing: 0.5px;
}

.sidebar a {
    display: block;
    color: #CBD5E1;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.sidebar a:hover, 
.sidebar a.active {
    background: #0056b3;
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    max-width: calc(100% - 260px);
}

/* Tarjetas y Contenedores */
.card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: background 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    font-size: 14px;
    vertical-align: middle;
}

th {
    background: #F8FAFC;
    color: #002B49;
    font-weight: 700;
}

/* Formularios */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group.full {
    grid-column: span 2;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #1E293B;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #0056b3;
}

textarea {
    height: 100px;
    resize: vertical;
}

/* Botones */
.btn {
    background: #002B49;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.btn:hover {
    background: #001A2C;
}

.btn-danger {
    background: #DC2626;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger:hover {
    background: #B91C1C;
}

.btn-warning {
    background: #D97706;
    padding: 6px 12px;
    font-size: 12px;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
}

.btn-warning:hover {
    background: #B45309;
}

/* Alertas */
.alert-success {
    background: #DCFCE7;
    color: #166534;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .main-content {
        max-width: 100%;
        padding: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full {
        grid-column: span 1;
    }
}