:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Utils */
.w-100 { width: 100%; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.ml-2 { margin-left: 0.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.d-flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.flex-1 { flex: 1; }
.error-msg { color: var(--danger); font-size: 0.9rem; font-weight: 500; }

/* Background */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}
.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}
.blob-1 {
    top: -10%; left: -10%; width: 50vw; height: 50vw;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}
.blob-2 {
    bottom: -10%; right: -10%; width: 60vw; height: 60vw;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Overlay / Modals */
.overlay-screen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.overlay-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.login-box, .auth-box {
    width: 100%;
    max-width: 400px;
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

header { margin-bottom: 2rem; }
.header-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.header-content h1 {
    font-size: 1.8rem; font-weight: 700;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.input-glass {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}
.input-glass:focus { border-color: var(--accent-primary); }

.tabs {
    display: flex; gap: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}
.tab-btn {
    background: transparent; border: none; color: var(--text-muted);
    font-size: 1rem; font-weight: 500; cursor: pointer;
    padding: 0.5rem 1rem; transition: all 0.3s; border-radius: 8px;
}
.tab-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.tab-btn.active {
    color: var(--text-main); background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
}
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

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

.grid-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2rem; }
@media (max-width: 1024px) { .grid-layout { grid-template-columns: 1fr; } }

/* Tables */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { padding: 0.75rem 0.5rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
th { color: var(--text-muted); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
td input[type="number"], td input[type="text"] {
    width: 100%; max-width: 120px;
    background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
    color: white; padding: 0.4rem; border-radius: 4px; text-align: right;
}
td.right-align { text-align: right; }

.status { padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; display: inline-block; }
.status.cuadrado { background: rgba(16, 185, 129, 0.2); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.4); }
.status.faltante { background: rgba(239, 68, 68, 0.2); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.4); }
.status.sobrante { background: rgba(245, 158, 11, 0.2); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.4); }
.status.admin { background: rgba(139, 92, 246, 0.2); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.4); }

.btn-primary, .btn-secondary {
    border: none; padding: 0.75rem 1.5rem; border-radius: 8px;
    font-weight: 600; cursor: pointer; transition: all 0.3s; font-family: inherit;
}
.btn-primary { background: var(--accent-primary); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: white; }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }
