/* ==========================================================================
   LOGIN STRANICA - TECH/CORPORATE STIL
   ========================================================================== */

:root {
    /* Iste varijable kao u glavnom style.css */
    --bg-primary: #0c0f1c;
    --bg-secondary: #151e2f;
    --bg-tertiary: #1f2a3f;
    
    --blue: #3b8aff;
    --blue-dark: #2a5bb5;
    --blue-glow: #5c9cff;
    
    --teal: #2dd4bf;
    --teal-dark: #14b8a6;
    --teal-glow: #5eead4;
    
    --purple: #a78bfa;
    --purple-dark: #8b5cf6;
    --purple-glow: #c4b5fd;
    
    --amber: #fbbf24;
    --amber-dark: #f59e0b;
    --amber-glow: #fcd34d;
    
    --rose: #fb7185;
    --rose-dark: #f43f5e;
    --rose-glow: #fda4af;
    
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --font-primary: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    line-height: 1.6;
    color: var(--gray-200);
    letter-spacing: 0.02em;
}

/* Tech mreža u pozadini - isto kao na indexu */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(45, 212, 191, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167, 139, 250, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* Radijalni gradijent za dubinu */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(45, 212, 191, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(167, 139, 250, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Login wrapper */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Login karta - tech stil */
.login-card {
    background: var(--bg-tertiary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 4px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

/* Tech gornji rub s gradijentom */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--teal), var(--purple), var(--blue), transparent);
}

/* Svjetleći efekt na kartici */
.login-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    animation: cardGlow 8s infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes cardGlow {
    0% { opacity: 0.3; transform: translate(0, 0); }
    100% { opacity: 0.6; transform: translate(-20px, 20px); }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.login-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.login-icon i {
    color: var(--teal);
    filter: drop-shadow(0 0 10px var(--teal));
}

.login-header h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: -0.01em;
    text-shadow: 0 0 20px rgba(45, 212, 191, 0.3);
}

.login-header p {
    color: var(--gray-400);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Forma */
.form-group {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-300);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    transition: all var(--transition-normal);
    color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.2);
    background: var(--bg-secondary);
}

.form-control::placeholder {
    color: var(--gray-600);
}

/* Button - tech stil */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--teal), var(--purple));
    color: white;
    border: none;
    border-radius: 2px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(45, 212, 191, 0.3);
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.4);
}

.btn-login i {
    font-size: 1.1rem;
}

/* Error message - tech stil */
.error-message {
    background: rgba(251, 113, 133, 0.1);
    color: var(--rose);
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 25px;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid rgba(251, 113, 133, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.error-message i {
    font-size: 1.1rem;
    color: var(--rose);
}

/* Link za povratak */
.back-link {
    text-align: center;
    margin-top: 25px;
    position: relative;
    z-index: 1;
}

.back-link a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link a:hover {
    color: var(--teal);
    transform: translateX(-3px);
}

.back-link a i {
    font-size: 0.9rem;
    transition: transform var(--transition-normal);
}

.back-link a:hover i {
    transform: translateX(-3px);
}

/* Footer info */
.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray-600);
    font-size: 0.8rem;
    position: relative;
    z-index: 1;
}

.login-footer .nfrancis-glow {
    color: rgba(255,255,255,0.8);
    display: inline-block;
    text-shadow: 
        0 0 5px var(--teal),
        0 0 10px var(--purple);
    transition: all var(--transition-normal);
    font-weight: 500;
}

.login-footer .nfrancis-glow:hover {
    text-shadow: 
        0 0 8px var(--teal),
        0 0 15px var(--purple),
        0 0 25px var(--blue);
    transform: scale(1.05);
    color: white;
}

/* ==========================================================================
   SIGURNOSNI ELEMENTI - TECH STIL
   ========================================================================== */

/* HTTPS indikator */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 2px;
    animation: glowPulse 2s infinite;
    position: relative;
    z-index: 1;
}

.security-badge.https-active {
    background: rgba(45, 212, 191, 0.15);
    border-color: rgba(45, 212, 191, 0.3);
}

.security-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal);
    font-size: 1.2rem;
}

.security-text {
    color: var(--teal);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.security-text small {
    font-weight: 400;
    opacity: 0.8;
    margin-left: 4px;
}

/* Glow animacija za HTTPS badge */
@keyframes glowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.2);
    }
    50% {
        box-shadow: 0 0 10px 2px rgba(45, 212, 191, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.2);
    }
}

/* SSL certifikat info */
.ssl-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: -10px;
    margin-bottom: 20px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 2px;
    font-size: 0.75rem;
    color: var(--gray-400);
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
}

.ssl-info i {
    color: var(--purple);
    font-size: 0.8rem;
}

/* Loading state za button */
.btn-login.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* CAPTCHA placeholder */
.captcha-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 2px;
    color: var(--gray-500);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.captcha-placeholder i {
    color: var(--amber);
    font-size: 1.2rem;
}

/* IP info (samo za debug) */
.ip-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.7rem;
    color: var(--gray-600);
    text-align: center;
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
}

.ip-info i {
    margin-right: 4px;
    color: var(--amber);
}

/* Rate limit warning */
.rate-limit-warning {
    background: rgba(251, 191, 36, 0.1);
    color: var(--amber);
    padding: 8px 12px;
    border-radius: 2px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
}

.rate-limit-warning i {
    font-size: 1rem;
    color: var(--amber);
}

/* Session info */
.session-info {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
}

.session-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.session-info i {
    color: var(--purple);
    font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .security-text {
        font-size: 0.75rem;
    }
    
    .session-info {
        flex-direction: column;
        gap: 8px;
    }
}