@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Login sempre em modo escuro */
:root {
    --bg-color: #0f172a;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --box-bg-color: rgba(30, 41, 59, 0.95);
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --text-color: #e2e8f0;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --error-color: #ef4444;
    --success-color: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Brasão em Alto Relevo no Fundo */
.background-emblem {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background-image: url('cronos.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.03;
    filter: blur(1px);
    z-index: 0;
    pointer-events: none;
}

.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease-out;
}

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

/* Logo SEJUS */
.sejus-logo {
    text-align: center;
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sejus-logo img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.sejus-logo img:hover {
    transform: scale(1.05);
}

.login-box {
    background: var(--box-bg-color);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    max-width: 420px;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.lock-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 8px 32px rgba(59, 130, 246, 0.5);
    }
}

.lock-icon i {
    font-size: 2rem;
    color: white;
}

.login-header h2 {
    color: var(--text-color);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.header-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-group label i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: rgba(15, 23, 42, 0.5);
    color: var(--text-color);
    font-weight: 500;
}

.input-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

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

button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: linear-gradient(135deg, #64748b, #94a3b8);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button i {
    font-size: 1.125rem;
}

#error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    text-align: center;
    min-height: 20px;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: none;
}

#error-message:not(:empty) {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.footer-login {
    text-align: center;
    animation: fadeIn 1s ease-out 0.4s both;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-dev {
    font-size: 0.75rem !important;
    color: rgba(148, 163, 184, 0.6) !important;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-box {
        padding: 2rem 1.5rem;
        max-width: 90%;
    }

    .sejus-logo img {
        width: 100px;
    }

    .lock-icon {
        width: 60px;
        height: 60px;
    }

    .lock-icon i {
        font-size: 1.75rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .background-emblem {
        width: 400px;
        height: 400px;
    }
}