@import url('../fonts/galanogrotesquealt.css');

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #0f172a;
    --accent-color: #06b6d4;
    --text-color: #334155;
    --text-muted: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --success-color: #10b981;
    --error-color: #ef4444;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --input-focus: #2563eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

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

body {
    font-family: 'GalanoGrotesqueRegular', sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    background: 
        radial-gradient(ellipse at top left, rgba(37, 99, 235, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    animation: gradientMove 20s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-2%, -2%) rotate(1deg); }
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 380px;
    padding: 20px;
    margin: 0 auto;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
    max-width: 380px;
    margin: 0 auto;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.logo-wrapper svg {
    font-size: 28px;
    color: white;
}

.logo-wrapper span {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.login-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.form-group > label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 6px;
}

/* .input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 15px;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    font-family: 'GalanoGrotesqueRegular', sans-serif;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--text-color);
    transition: all 0.3s ease;
    outline: none;
}

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

.input-wrapper input:focus {
    background: white;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-wrapper input:focus + i {
    color: var(--primary-color);
}

.input-wrapper.has-error input {
    border-color: var(--error-color);
    background: white;
}

.input-wrapper.has-error input:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
} */

/* .toggle-password removido - integrado no .input-group */

.btn-login {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'GalanoGrotesqueRegular', sans-serif;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

.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 {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-login:hover::before {
    left: 100%;
}

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

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

.btn-login .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

.btn-login.loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-login.loading .btn-text {
    opacity: 0.7;
}

.remember-forgot {
    display: none;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-wrapper label {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 0;
}

.forgot-link {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--error-color);
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
    animation: shake 0.5s ease;
}

.alert-error.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--input-border);
}

.divider span {
    padding: 0 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.social-login {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    background: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.social-btn:hover {
    background: white;
    border-color: var(--input-border);
}

.social-btn img {
    width: 20px;
    height: 20px;
}

.footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-muted);
}

.footer-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* Decorative elements */
.decoration {
    position: fixed;
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
}

.decoration-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.1));
    top: -100px;
    right: -100px;
    animation: pulse 4s ease-in-out infinite;
}

.decoration-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(37, 99, 235, 0.1));
    bottom: -80px;
    left: -80px;
    animation: pulse 4s ease-in-out infinite 2s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .logo-wrapper {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }
    
    .logo-wrapper svg,
    .logo-wrapper span {
        font-size: 24px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .remember-forgot {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

/* Shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.login-card.shake {
    animation: shake 0.5s ease;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group .input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-size: 14px;
    font-family: 'GalanoGrotesqueRegular', sans-serif;
    background: #ffffff;
    border: 1.5px solid #93c5fd;
    border-radius: 12px;
    color: #334155;
    transition: all 0.3s ease;
    outline: none;
}

.input-group .input::placeholder {
    color: transparent;
    font-size: 0.8rem;
}

.input-group .input:focus::placeholder {
    color: #94a3b8;
    font-size: 0.8rem;
}

.input-group .input:focus {
    border-width: 2px;
    background: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    z-index: 1;
    transition: all 0.3s ease;
}

.input-group .input-icon.active {
    color: var(--primary-color);
    transform: translateY(-50%) rotate(0deg);
}

.input-group .user-label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.2s ease;
    font-size: 14px;
    z-index: 0;
}

.input-group .input:focus, 
.input-group .input:not(:placeholder-shown) {
    background: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.input-group .input:focus ~ .input-icon, 
.input-group .input:not(:placeholder-shown) ~ .input-icon {
    color: var(--primary-color);
}

.input-group .user-label.floated {
    top: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--card-bg);
    padding: 0 6px;
    transform: translateY(-50%) scale(1);
}

.input-group .input-icon.active {
    color: var(--primary-color);
}

.input-group .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 15px;
    padding: 0;
    z-index: 2;
    transition: color 0.3s ease;
}

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