/* * Validar PRO - Estilos Premium
 * Diseño con enfoque en UX, micro-interacciones y estética moderna.
 */

 :root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --secondary: #64748b;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --white: #ffffff;
    --text-dark: #0f172a;
    --text-gray: #475569;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Animaciones --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Layout del Dashboard --- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #1e293b;
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-menu {
    flex: 1;
    padding: 1.5rem 0;
}

.menu-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.menu-item:hover, .menu-item.active {
    color: white;
    background: rgba(255,255,255,0.05);
}

.menu-item.active {
    border-left: 4px solid var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.top-bar {
    height: 70px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
}

/* --- Componentes del Panel --- */
.content-body {
    padding: 2rem;
    animation: fadeInUp 0.5s ease-out;
}

/* --- Tablas Pro --- */
.table-container {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

thead {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

th {
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-gray);
    font-weight: 700;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: var(--text-dark);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: #f8fafc;
}

/* --- Insignias y Botones --- */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-admin { background: #dcfce7; color: #166534; }
.badge-user { background: #eff6ff; color: #1e40af; }

.btn-icon {
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit { background: #fef9c3; color: #854d0e; margin-right: 0.5rem; }
.btn-edit:hover { background: #fde047; }
.btn-delete { background: #fee2e2; color: #991b1b; }
.btn-delete:hover { background: #fecaca; }

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-add:hover { background: var(--primary-dark); }

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 1.25rem;
    font-weight: 700;
}

/* --- Auth Card (Login/Registro) --- */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    background: var(--white);
    width: 100%;
    max-width: 450px;
    padding: 3rem 2.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease-out;
}

.auth-logo { display: block; margin: 0 auto 1.5rem; height: 50px; object-fit: contain; }
.form-group { margin-bottom: 1.5rem; }
.form-control { width: 100%; padding: 0.85rem 1rem 0.85rem 2.75rem; border: 1.5px solid #e2e8f0; border-radius: 0.75rem; }
.btn { width: 100%; padding: 1rem; background: var(--primary); color: var(--white); border: none; border-radius: 0.75rem; font-weight: 700; cursor: pointer; }
.btn-logout { background: #f1f5f9; color: var(--text-dark); padding: 0.5rem 1rem; border-radius: 0.5rem; text-decoration: none; font-size: 0.875rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.btn-logout:hover { background: #e2e8f0; }

@media (max-width: 768px) {
    .sidebar { display: none; }
}