/* GSI Intelligence - Login Styles */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --bg-input: #222222;
    --border-color: #2a2a2a;
    --border-focus: #00d4ff;
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --text-muted: #555555;
    --accent-cyan: #00d4ff;
    --accent-red: #dc2626;
    --accent-green: #059669;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* Lado Esquerdo */
.login-left {
    flex: 1;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    border-right: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.login-branding {
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.logo-container svg {
    max-width: 100%;
    height: auto;
}

.logo-text {
    font-family: var(--font-mono);
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--text-primary);
    line-height: 1;
}

.logo-subtitle {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 6px;
    color: var(--accent-cyan);
    margin-top: 8px;
    font-weight: 500;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 8px 16px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 100px;
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 2px;
    color: var(--accent-cyan);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.login-info {
    margin-top: 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.info-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

/* Lado Direito */
.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    background: var(--bg-primary);
    position: relative;
}

.login-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23222' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.form-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-erro {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #ef4444;
}

.alert-sucesso {
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.3);
    color: #10b981;
}

/* Form */
.login-form.hidden {
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-login:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-recuperar {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

.btn-recuperar:hover {
    background: #00b8d4;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.link-recuperar {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-family: var(--font-main);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.link-recuperar:hover {
    color: #00b8d4;
}

/* ===== 2FA CODE INPUTS ===== */
.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0;
}

.code-inputs input {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-family: var(--font-mono);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: all 0.2s;
    outline: none;
}

.code-inputs input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.timer-2fa {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    font-family: var(--font-mono);
}

.reenviar-2fa {
    text-align: center;
    margin-top: 16px;
}

.reenviar-2fa button {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.reenviar-2fa button:hover {
    color: #00b8d4;
}

.reenviar-2fa button:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    text-decoration: none;
}

/* ===== RESPONSIVE - TABLET ===== */
@media (max-width: 1024px) {
    .login-left {
        padding: 40px;
    }

    .login-right {
        padding: 40px;
    }

    .logo-text {
        font-size: 48px;
    }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        padding: 32px 20px;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .login-right {
        padding: 32px 20px;
        flex: none;
    }

    .logo-text {
        font-size: 36px;
        letter-spacing: 6px;
    }

    .logo-container svg {
        width: 70px;
        height: 70px;
    }

    .logo-subtitle {
        font-size: 10px;
        letter-spacing: 4px;
    }

    .security-badge {
        margin-top: 20px;
        padding: 6px 12px;
        font-size: 10px;
    }

    .login-info {
        margin-top: 20px;
    }

    .info-text {
        font-size: 11px;
    }

    .login-form-container {
        max-width: 100%;
    }

    .form-header {
        margin-bottom: 24px;
    }

    .form-header h2 {
        font-size: 20px;
    }

    .form-subtitle {
        font-size: 12px;
    }

    .alert {
        padding: 12px;
        font-size: 12px;
    }

    .input-group input {
        padding: 14px 14px 14px 42px;
        font-size: 16px; /* Evita zoom no iOS */
    }

    .btn-login {
        padding: 16px;
        font-size: 13px;
    }

    /* 2FA inputs */
    .code-inputs {
        gap: 6px;
    }

    .code-inputs input {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }
}

/* ===== RESPONSIVE - MOBILE PEQUENO ===== */
@media (max-width: 480px) {
    .login-left {
        padding: 24px 16px;
    }

    .login-right {
        padding: 24px 16px;
    }

    .logo-text {
        font-size: 28px;
        letter-spacing: 4px;
    }

    .logo-container svg {
        width: 56px;
        height: 56px;
    }

    .logo-subtitle {
        font-size: 9px;
        letter-spacing: 3px;
    }

    .security-badge {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .form-header h2 {
        font-size: 18px;
    }

    .form-group label {
        font-size: 10px;
    }

    .input-group input {
        padding: 14px 12px 14px 38px;
        font-size: 16px;
    }

    .input-icon {
        left: 12px;
    }

    .input-icon svg {
        width: 16px;
        height: 16px;
    }

    .btn-login {
        padding: 14px;
        font-size: 11px;
        letter-spacing: 1px;
    }

    .link-recuperar {
        font-size: 11px;
    }

    /* 2FA */
    .code-inputs {
        gap: 4px;
    }

    .code-inputs input {
        width: 36px;
        height: 44px;
        font-size: 16px;
    }

    .timer-2fa {
        font-size: 11px;
    }
}

/* ===== RESPONSIVE - MOBILE MUITO PEQUENO ===== */
@media (max-width: 360px) {
    .logo-text {
        font-size: 24px;
        letter-spacing: 3px;
    }

    .code-inputs input {
        width: 32px;
        height: 40px;
        font-size: 14px;
    }
}

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

.login-form {
    animation: fadeIn 0.3s ease-out;
}
