@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --sidebar-bg: #0f172a;
    --sidebar-alt: #1e293b;
    --bg-body: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-lg: 12px;
    --radius-md: 8px;
    --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-premium: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR PREMIUM ===== */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--white);
    height: 100vh;
    position: fixed;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 30px 24px;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.5px;
}

.sidebar-header i {
    color: var(--primary-light);
    font-size: 24px;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 16px;
}

.nav-label {
    padding: 20px 12px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
    letter-spacing: 1px;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    gap: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
}

.sidebar a i {
    width: 20px;
    text-align: center;
    font-size: 18px;
    transition: 0.3s;
}

.sidebar a:hover {
    background: var(--sidebar-alt);
    color: var(--white);
}

.sidebar a:hover i {
    color: var(--primary-light);
    transform: translateX(3px);
}

.sidebar a.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.sidebar a.active i {
    color: var(--white);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 70px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notif-btn {
    position: relative;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}

.notif-btn:hover { color: var(--primary); }

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    border: 2px solid white;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 30px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

.container {
    padding: 40px;
    width: 100%;
}

/* ===== CARDS ELITE ===== */
.card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
    transition: 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-premium);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== FORMULARIOS ===== */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: #fcfcfc;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: white;
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: 0.3s;
}

button[type="submit"], .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

button[type="submit"]:hover, .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
}

/* ===== STAT CARDS PREMIUM ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.stat-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: white;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid var(--border-color);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card:hover { transform: translateY(-8px); }

.stat-card i {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 10px;
}

.stat-card h4 { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.stat-card h2 { font-size: 28px; font-weight: 800; color: var(--text-main); }

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-green { background: #f0fdf4; color: #059669; }
.icon-orange { background: #fff7ed; color: #ea580c; }
.icon-red { background: #fef2f2; color: #dc2626; }

/* ===== TABLAS PROFESIONALES ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f8fafc;
    color: var(--text-muted);
    padding: 16px 20px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
}

table tr:hover td { background: #f8fafceb; }

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-danger { background: #fee2e2; color: #ef4444; }
.badge-success { background: #dcfce7; color: #10b981; }
.badge-warning { background: #fef3c7; color: #f59e0b; }
