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

:root {
    --bg-dark: #0f172a;
    --primary: #00f2fe;
    --accent: #4facfe;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- LOGIN SPECIFIC CSS --- */
body.login-bg {
    overflow: hidden; /* Elimina la barra de desplazamiento */
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#universe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.login-card {
    position: relative;
    padding: 2rem 2.5rem; /* Padding reducido para evitar overflow */
    width: 100%;
    max-width: 390px; /* Tarjeta más pequeña y centrada */
    background: rgba(15, 23, 42, 0.4); /* Más transparente para ver el universo */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

/* Mouse hover glow effect */
.login-card::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, -1000px);
    left: var(--mouse-x, -1000px);
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

.login-card > * {
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: -2px;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.login-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: #fff;
}

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

.label-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.form-group label {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.forgot-link {
    color: var(--primary);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.3s;
}
.forgot-link:hover { color: #fff; text-shadow: 0 0 8px var(--primary); }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #64748b;
    width: 18px;
    height: 18px;
    transition: color 0.3s;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 0 15px rgba(0, 242, 254, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.form-group input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.glow-btn {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    padding: 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 0.2rem;
}
.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.2rem 0;
    color: #64748b;
    font-size: 0.8rem;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.divider span {
    padding: 0 1rem;
}

.social-login {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.65rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.btn-social:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.signup-text {
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}
.signup-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.signup-text a:hover {
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

/* --- DASHBOARD STYLES (Retained & Adapted) --- */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-header { padding: 2rem 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.sidebar-header h3 { font-size: 1.5rem; color: var(--primary); }
.badge { padding: 0.3rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; margin-top: 0.5rem; display: inline-block; }
.badge-admin { background: rgba(0, 242, 254, 0.1); color: var(--primary); border: 1px solid rgba(0, 242, 254, 0.3); }
.badge-client { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.sidebar-nav { padding: 1.5rem 0; display: flex; flex-direction: column; flex-grow: 1; }
.sidebar-nav a { padding: 1rem 1.5rem; color: var(--text-muted); text-decoration: none; transition: all 0.2s; border-left: 3px solid transparent; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255, 255, 255, 0.03); color: var(--text-main); border-left-color: var(--primary); }
.logout-link { color: #fca5a5 !important; margin-top: auto; }
.main-content { flex-grow: 1; padding: 2.5rem; overflow-y: auto; }
.topbar { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.stat-card { padding: 1.5rem; background: rgba(30, 41, 59, 0.5); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; }
.stat-value { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin-top: 0.5rem; }
.table-container { padding: 1.5rem; overflow-x: auto; background: rgba(30, 41, 59, 0.5); border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 1.2rem 1rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.table th { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:hover { background: rgba(255, 255, 255, 0.02); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.875rem; background: var(--primary); color: #000; border: none; border-radius: 6px; cursor: pointer; }

/* --- RESPONSIVE DESIGN GLOBAL --- */
@media (max-width: 768px) {
    /* Login */
    .login-card { max-width: 90%; padding: 1.5rem; }
    
    /* Layout */
    .dashboard-layout { flex-direction: column; }
    
    /* Sidebar */
    .sidebar { 
        width: 100%; 
        border-right: none; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.08); 
    }
    .sidebar-header { padding: 1.5rem 1rem; }
    .sidebar-nav { 
        flex-direction: row; 
        flex-wrap: wrap; 
        justify-content: center; 
        padding: 0.5rem; 
        gap: 0.5rem;
    }
    .sidebar-nav a { 
        padding: 0.8rem 1rem; 
        border-left: none; 
        border-bottom: 3px solid transparent; 
        flex: 1; 
        text-align: center; 
        min-width: 120px;
        background: rgba(255,255,255,0.02);
        border-radius: 8px;
    }
    .sidebar-nav a:hover, .sidebar-nav a.active { 
        border-left: none; 
        border-bottom-color: var(--primary); 
    }
    
    /* Main Content */
    .main-content { padding: 1.25rem; }
    .topbar { padding-bottom: 1rem; margin-bottom: 1.5rem; flex-direction: column; gap: 1rem; align-items: flex-start; }
    
    /* Stats Grid Admin */
    .stats-grid { grid-template-columns: 1fr; }
    
    /* Tables */
    .table-container { padding: 1rem; overflow-x: auto; }
    .table th, .table td { padding: 1rem 0.5rem; font-size: 0.9rem; }
}
