/* smart360 Login Page Styles */
/* Dark brand look of smart360.at: deep navy, mint #57cc99, sky blue from the headline gradient */
/* Logo: /css/smart360/logo.png (mint on transparent, sits directly on the dark card) */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    padding-top: 10vh;
    position: relative;
    overflow: hidden;
}

/* Deep navy background with drifting mint and blue glows */
.login-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1100px 620px at 15% 88%, rgba(87, 204, 153, 0.13) 0%, rgba(87, 204, 153, 0) 58%),
        radial-gradient(900px 560px at 85% 15%, rgba(79, 159, 255, 0.13) 0%, rgba(79, 159, 255, 0) 60%),
        linear-gradient(170deg, #0f1c24 0%, #0c1017 58%, #0a0d12 100%);
    background-size: 130% 130%, 125% 125%, 100% 100%;
    background-position: 0% 78%, 100% 12%, 0 0;
    animation: s360-drift 26s ease-in-out infinite alternate;
}

/* Fine technical grid, barely visible */
.login-background::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(900px 640px at 50% 24%, rgba(0, 0, 0, 0.9) 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(900px 640px at 50% 24%, rgba(0, 0, 0, 0.9) 0%, transparent 75%);
}

@keyframes s360-drift {
    0% {
        background-position: 0% 78%, 100% 12%, 0 0;
    }

    100% {
        background-position: 12% 62%, 86% 30%, 0 0;
    }
}

.login-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.2;
    animation: float 22s infinite ease-in-out;
}

    .login-shape:nth-child(1) {
        width: 520px;
        height: 520px;
        background: linear-gradient(135deg, #57cc99 0%, #2e9d82 100%);
        top: -260px;
        left: -240px;
        animation-delay: 0s;
    }

    .login-shape:nth-child(2) {
        width: 420px;
        height: 420px;
        background: linear-gradient(135deg, #4db8dc 0%, #4f9fff 100%);
        bottom: -210px;
        right: -190px;
        animation-delay: -11s;
    }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, 50px) scale(1.1);
    }

    50% {
        transform: translate(30px, -30px) scale(0.9);
    }

    75% {
        transform: translate(-50px, 30px) scale(1.05);
    }
}

/* Login Card: navy surface with the mint-to-blue accent edge. The explicit color keeps inherited
   imprint and legal links readable on the dark card. */
.login-card {
    position: relative;
    overflow: hidden;
    background: rgba(17, 24, 36, 0.9);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    color: #e2e8f0;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.5),
        0 4px 14px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

    .login-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #57cc99 0%, #4db8dc 55%, #4f9fff 100%);
    }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    content: url('/css/smart360/logo.png');
    width: min(270px, 82%);
    height: auto;
    display: block;
    margin: 0.35rem auto 1.5rem;
}

.login-logo-icon {
    width: min(180px, 55%);
    height: auto;
    display: block;
    margin: 0 auto 0.75rem;
}

    .login-header h1 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        background: linear-gradient(90deg, #57cc99 0%, #4db8dc 60%, #4f9fff 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .login-header p {
        color: #94a3b8;
        font-size: 0.95rem;
        margin: 0;
    }

/* Form Styles */
.login-content {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        color: #e2e8f0;
        font-size: 0.9rem;
        font-weight: 600;
    }

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

.input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 1;
    filter: grayscale(1) brightness(1.5);
    opacity: 0.7;
}

.form-control-modern {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    background: #0f1620;
    border: 1px solid #2b3a4d;
    border-radius: 10px;
    color: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

    .form-control-modern::placeholder {
        color: #8493a8;
    }

    .form-control-modern:hover {
        border-color: #475569;
    }

    .form-control-modern:focus {
        outline: none;
        background: #0c1017;
        border-color: #57cc99;
        box-shadow: 0 0 0 3px rgba(87, 204, 153, 0.2);
    }

    /* Browser autofill keeps the dark field */
    .form-control-modern:-webkit-autofill,
    .form-control-modern:-webkit-autofill:hover,
    .form-control-modern:-webkit-autofill:focus {
        -webkit-text-fill-color: #f8fafc;
        -webkit-box-shadow: 0 0 0 1000px #0f1620 inset;
        caret-color: #f8fafc;
    }

.twofactor-subtext {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.twofactor-code-input {
    letter-spacing: 0.18rem;
    font-weight: 600;
}

    .twofactor-code-input::placeholder {
        letter-spacing: normal;
        font-weight: 400;
    }

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #cbd5e1;
    font-size: 0.9rem;
    margin: 0;
}

.checkbox-modern {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #57cc99;
}

.forgot-password {
    color: #7ee8b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .forgot-password:hover {
        color: #b9f2d8;
        text-decoration: underline;
    }

/* Login Button: mint with dark label like the call to action on smart360.at */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: #57cc99;
    border: none;
    border-radius: 10px;
    color: #0c1017;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(87, 204, 153, 0.25);
}

    .btn-login:hover {
        transform: translateY(-2px);
        background: #7ee8b8;
        box-shadow: 0 6px 20px rgba(87, 204, 153, 0.38);
    }

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

    .btn-login:focus-visible {
        outline: none;
        box-shadow:
            0 4px 15px rgba(87, 204, 153, 0.25),
            0 0 0 3px rgba(79, 159, 255, 0.75);
    }

    .btn-login .arrow {
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }

    .btn-login:hover .arrow {
        transform: translateX(4px);
    }

/* Footer Links */
.login-footer {
    margin-top: 2rem;
    text-align: center;
}

    .login-footer p {
        color: #94a3b8;
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

.link-register {
    color: #7ee8b8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

    .link-register:hover {
        color: #b9f2d8;
    }

.link-secondary {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

    .link-secondary:hover {
        color: #f8fafc;
    }

/* External Login Section */
.external-login-section {
    margin-top: 2rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0 1.5rem 0;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #2b3a4d;
    }

    .divider span {
        padding: 0 1rem;
        color: #94a3b8;
        font-size: 0.85rem;
    }

/* Validation Messages */
.validation-summary {
    background: rgba(255, 115, 105, 0.1);
    border: 1px solid rgba(255, 115, 105, 0.4);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.validation-summary-info {
    background: rgba(87, 204, 153, 0.1);
    border-color: rgba(87, 204, 153, 0.4);
}

.text-danger {
    color: #ff958d !important;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

/* Alert / Status Messages */
.alert {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alert-danger {
    background: rgba(255, 115, 105, 0.1);
    border: 1px solid rgba(255, 115, 105, 0.4);
    color: #ffc2bd;
}

.alert-success {
    background: rgba(87, 204, 153, 0.1);
    border: 1px solid rgba(87, 204, 153, 0.4);
    color: #b9f2d8;
}

.login-info-text {
    color: #cbd5e1;
}

.btn-login-link {
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 640px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.75rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* External Login Buttons */
.external-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-external-login {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #2b3a4d;
    border-radius: 10px;
    background: #121a27;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

    .btn-external-login:hover {
        background: #1a2433;
        border-color: #57cc99;
        transform: translateY(-1px);
    }

/* Provider-specific hover colors */
.btn-external-microsoft:hover { border-color: #00a4ef; }
.btn-external-google:hover    { border-color: #4285f4; }
.btn-external-azuread:hover   { border-color: #0078d4; }
.btn-external-okta:hover      { border-color: #007dc1; }
