/* =========================================================
   SISTEMA DE DISEÑO ADMIN (Pastel & Responsivo)
   ========================================================= */

/* --- RESET Y CONTENEDOR PRINCIPAL --- */
.admin-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .admin-wrapper { padding: 15px; }
}

/* --- TARJETAS (CARDS) --- */
.admin-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 25px;
    border: 1px solid rgba(146, 168, 209, 0.1);
    box-sizing: border-box;
    width: 100%;
}

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

.admin-card-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #4a4a4a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .admin-card { padding: 20px 15px; border-radius: 15px; }
    .admin-card-header { flex-direction: column; align-items: flex-start; }
    .admin-card-title { font-size: 1.3rem; }
}

/* --- FORMULARIOS (INPUTS Y LABELS) --- */
.admin-form-group {
    margin-bottom: 20px;
    width: 100%;
}

.admin-label {
    display: block;
    font-weight: 800;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.admin-input, .admin-select, .admin-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eef2f6;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    color: #444;
    background-color: #fcfdfd;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
    outline: none;
    border-color: var(--p-azul, #92A8D1);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(146, 168, 209, 0.15);
}

.admin-textarea { resize: vertical; min-height: 120px; }

/* Grid para Formularios 2 columnas */
.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .admin-form-grid { grid-template-columns: 1fr; gap: 15px; }
}

/* --- BOTONES MODERNOS --- */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.admin-btn:hover {
    transform: translateY(-2px);
}

.admin-btn:active {
    transform: scale(0.96);
}

/* Variantes Botones */
.admin-btn-primary {
    background: var(--p-azul, #92A8D1);
    color: white !important;
    box-shadow: 0 4px 15px rgba(146, 168, 209, 0.3);
}
.admin-btn-primary:hover { box-shadow: 0 6px 20px rgba(146, 168, 209, 0.4); }

.admin-btn-success {
    background: var(--p-verde, #88B04B);
    color: white !important;
    box-shadow: 0 4px 15px rgba(136, 176, 75, 0.3);
}

.admin-btn-warning {
    background: var(--p-naranja, #FFB347);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 179, 71, 0.3);
}

.admin-btn-danger {
    background: #FF6B6B;
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.admin-btn-secondary {
    background: #eef2f6;
    color: #666 !important;
}
.admin-btn-secondary:hover { background: #e2e8f0; color: #444 !important; }

/* Botones Icono (Cuadrados/Redondos para tablas) */
.admin-btn-icon {
    padding: 10px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .admin-btn { width: 100%; text-align: center; } /* Botones anchos en celular */
    .admin-btn-icon { width: auto; flex: 1; } /* Si son varios botones de icono, que se repartan el espacio */
}

/* --- TABLAS RESPONSIVAS COMO TARJETAS --- */
/* En lugar de <table>, usaremos Divs Flexibles para que no se rompan */
.admin-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-list-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    transition: transform 0.2s;
}

.admin-list-item:hover {
    transform: translateX(5px);
    border-color: rgba(146, 168, 209, 0.3);
}

.admin-list-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 20px;
    background: #f4f4f4;
    flex-shrink: 0;
}

.admin-list-info {
    flex-grow: 1;
    min-width: 0; /* Permite truncar texto si es largo */
}

.admin-list-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-list-meta {
    font-size: 0.85rem;
    color: #777;
    font-weight: 600;
}

.admin-list-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 15px;
}

@media (max-width: 768px) {
    .admin-list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    .admin-list-thumb { width: 100%; height: 180px; margin-right: 0; margin-bottom: 15px; }
    .admin-list-title { white-space: normal; } /* En celular sí puede ocupar varias líneas */
    .admin-list-actions { width: 100%; margin-top: 15px; margin-left: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .admin-list-info { width: 100%; }
}

/* --- UTILIDADES --- */
.admin-alert {
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}
.admin-alert-info { background: #e8f4f8; color: #31708f; border-left: 5px solid var(--p-azul, #92A8D1); }
.admin-alert-warning { background: #fff8e1; color: #8a6d3b; border-left: 5px solid var(--p-naranja, #FFB347); }
