/* ========================================
   Login Page - Cisalak Pasar Cimanggis Depok Live CCTV
   ======================================== */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.25);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.2);
    --success: #10b981;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);

    --bg-base: #0c1222;
    --bg-surface: rgba(17, 25, 44, 0.85);
    --bg-card: rgba(30, 41, 65, 0.65);
    --bg-input: rgba(20, 30, 52, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);

    --text-primary: #f0f4f8;
    --text-secondary: #8b9dc3;
    --text-muted: #5a6d8a;

    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
    --radius: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* Background animated orbs */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px; height: 500px;
    background: var(--primary);
    top: -100px; left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px; height: 400px;
    background: var(--accent);
    bottom: -80px; right: -80px;
    animation-delay: -7s;
    animation-duration: 25s;
}

.orb-3 {
    width: 300px; height: 300px;
    background: #10b981;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    animation-duration: 30s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.03); }
}

/* Login Container */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    animation: fadeUp 0.6s var(--ease) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login Card */
.login-card {
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: calc(var(--radius) + 4px);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(59, 130, 246, 0.06);
    text-align: center;
}

/* Logo */
.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
}

.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 12px var(--primary-glow));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 12px var(--primary-glow)); }
    50% { filter: drop-shadow(0 0 24px var(--primary-glow)); }
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 2px;
}

.login-subtitle {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.login-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-group label i { width: 14px; height: 14px; }

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: all 0.25s var(--ease);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), 0 0 20px var(--primary-glow);
}

.form-group input::placeholder { color: var(--text-muted); }

.password-wrapper {
    position: relative;
}

.password-wrapper input { padding-right: 44px; }

.toggle-pass {
    position: absolute;
    right: 4px; top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}

.toggle-pass:hover { color: var(--primary); background: var(--primary-glow); }
.toggle-pass i { width: 16px; height: 16px; }

/* Error */
.form-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 600;
    animation: shake 0.4s var(--ease);
}

.form-error i { width: 16px; height: 16px; flex-shrink: 0; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    box-shadow: 0 4px 20px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-login:active { transform: translateY(0); }

.btn-login-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Footer */
.login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
}

.login-footer i { width: 14px; height: 14px; }

/* Responsive */
@media (max-width: 480px) {
    .login-card { padding: 30px 24px; }
    .login-title { font-size: 1.35rem; }
    .login-container { padding: 16px; }
}
