:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Sidebar & Navigation */
.main-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    color: var(--text-muted);
}

.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-dropdown {
    cursor: pointer;
}

.submenu {
    list-style: none;
    padding-left: 2rem;
    display: none;
}

.nav-dropdown.active + .submenu {
    display: block;
}

.nav-dropdown .fa-chevron-down {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.nav-dropdown.active .fa-chevron-down {
    transform: rotate(180deg);
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Auth / Login */
.login-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.4)), url('../img/login_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.login-widgets {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out;
}

.widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    min-width: 150px;
}

.widget h3 { font-size: 2.5rem; margin: 0; font-weight: 700; }
.widget p { font-size: 0.875rem; margin-top: 0.5rem; opacity: 0.8; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: white;
    outline: none;
}

input:focus {
    border-color: var(--primary);
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Tablas */
.table-container {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 1.5rem;
}

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

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-info { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
