:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --dark-bg: #020617;
    --glass: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

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

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: var(--dark-bg);
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-main);
    position: relative;
    overflow: hidden;
}

/* Orbital Glows */
body::before, body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
}

body::before {
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

body::after {
    bottom: -200px;
    right: -200px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

/* Background Grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
}

/* Logo Section */
.brand-container {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-viva {
    height: 60px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0;
}

/* Login Container */
.login-container {
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 3rem;
    border-radius: 32px;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-container h2 {
    font-size: 1.75rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #fff, var(--text-dim));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-container p.subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.25rem;
}

.input-icon {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    transition: 0.3s;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.input-icon:focus-within {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.input-icon svg.icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--text-dim);
    transition: 0.3s;
}

.input-icon:focus-within svg.icon {
    fill: var(--primary-light);
}

.form-group input {
    width: 100%;
    padding: 1.1rem 1.1rem 1.1rem 54px;
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

/* Fix autofill white background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0f172a inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 1.1rem;
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 1rem;
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.4);
}

.login-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -10px rgba(99, 102, 241, 0.5);
}

.login-button:active { transform: translateY(-1px); }

/* Error/Success Messages */
.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    text-align: center;
    border-left: 4px solid #ef4444;
}

.alert-box {
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Footer & Links */
.footer-links {
    margin-top: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--text-dim);
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.back-home {
    margin-top: 3rem;
    opacity: 0.6;
    transition: 0.3s;
}

.back-home:hover { opacity: 1; }

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

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

