/* ========================================
   S.A.B.E Login — Branded Stylesheet
   eWorkForce brand: Deep teal #0c3547
   ======================================== */

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

body {
    font-family: "Inter", "Rubik", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0e14;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* ---- Animated background ---- */
.login-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(12, 53, 71, 0.45) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(66, 72, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 20% 80%, rgba(12, 53, 71, 0.2) 0%, transparent 50%);
    animation: gradientShift 12s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes gradientShift {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.85; }
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

/* ---- Login card ---- */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 1.5rem;
}

.login-card {
    background: rgba(18, 22, 30, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem 2rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ---- Brand section ---- */
.brand-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: radial-gradient(circle at center, rgba(12, 53, 71, 0.25) 0%, transparent 70%);
    box-shadow:
        0 0 40px rgba(12, 53, 71, 0.3),
        0 0 80px rgba(12, 53, 71, 0.1);
    margin-bottom: 1.25rem;
    animation: logoFloat 4s ease-in-out infinite;
}

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

.sabe-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: contain;
}

.brand-title {
    font-family: "Outfit", "Inter", sans-serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #ffffff;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #ffffff 0%, #8ec8db 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: rgba(142, 200, 219, 0.7);
}

/* ---- Form ---- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

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

.input-icon {
    position: absolute;
    left: 0.85rem;
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.25);
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-wrapper:focus-within .input-icon {
    color: rgba(142, 200, 219, 0.7);
}

.input-group input {
    width: 100%;
    padding: 0.8rem 0.85rem 0.8rem 2.75rem;
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.65rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.input-group input:focus {
    border-color: rgba(12, 53, 71, 0.6);
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
        0 0 0 3px rgba(12, 53, 71, 0.15),
        inset 0 0 0 1px rgba(142, 200, 219, 0.1);
}

/* ---- Login button ---- */
.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem 1rem;
    margin-top: 0.5rem;
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #ffffff;
    background: linear-gradient(135deg, #0c3547 0%, #164b63 50%, #0c3547 100%);
    background-size: 200% 200%;
    border: 1px solid rgba(142, 200, 219, 0.15);
    border-radius: 0.65rem;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 16px rgba(12, 53, 71, 0.3);
}

.login-button:hover {
    background-position: 100% 100%;
    box-shadow:
        0 6px 24px rgba(12, 53, 71, 0.45),
        0 0 0 1px rgba(142, 200, 219, 0.2);
    transform: translateY(-1px);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(12, 53, 71, 0.3);
}

.btn-arrow {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.login-button:hover .btn-arrow {
    transform: translateX(3px);
    opacity: 1;
}

/* ---- Error message ---- */
.error-message {
    color: #ef6b6b;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.6rem 0.8rem;
    background: rgba(239, 107, 107, 0.08);
    border: 1px solid rgba(239, 107, 107, 0.15);
    border-radius: 0.5rem;
    margin-top: 0.25rem;
}

/* ---- Footer / eWorkForce signature ---- */
.brand-footer {
    margin-top: 2rem;
    text-align: center;
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    margin-bottom: 1.25rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.ewf-logo {
    height: 24px;
    width: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.ewf-logo:hover {
    opacity: 0.8;
}

.footer-link {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: rgba(142, 200, 219, 0.7);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem 1.5rem;
    }

    .brand-title {
        font-size: 1.7rem;
    }

    .sabe-logo {
        width: 60px;
        height: 60px;
    }

    .logo-glow {
        width: 74px;
        height: 74px;
    }
}
