:root {
    --bg-base: #020617;
    --bg-panel: #1e293b;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(12px);
    --input-bg: rgba(15, 23, 42, 0.5);
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    /* Tema Claro (Contraste Mejorado) */
    --bg-base: #cbd5e1;
    --bg-panel: #ffffff;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: rgba(0, 0, 0, 0.1);
    --input-bg: #f8fafc;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilidades de Centrado (Especial para Login) */
.centered-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.glass {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    color: var(--text-main);
}

.card-login {
    width: 100%;
    max-width: 420px;
    padding: 3rem;
    text-align: center;
}

.card-login h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    letter-spacing: -0.05rem;
}

.card-login h1 span {
    color: var(--primary);
}

.theme-toggle {
    position: fixed;
    top: 25px;
    right: 25px;
    cursor: pointer;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.logo {
    transition: filter 0.3s ease;
}

[data-theme="dark"] .logo,
:root:not([data-theme="light"]) .logo {
    filter: invert(1) brightness(2);
}

/* Inputs y Botones */
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

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

input,
select {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}

select option {
    background: var(--bg-base);
    color: var(--text-main);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Dashboard & Admin */
.main-wrapper {
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.panel-card {
    padding: 2.5rem;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--border);
}

.status-pill {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}