/* ICU Login Page Styles
   Brand look from shop.icuserver.com: black chrome, logo orange #e18409, forest green #0b5233
   Logo: /css/icu/logo.png (orange mark + wordmark, transparent) */

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

.login-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1100px 620px at 14% 88%, rgba(225, 132, 9, 0.22) 0%, rgba(225, 132, 9, 0) 58%),
        radial-gradient(900px 560px at 86% 12%, rgba(11, 82, 51, 0.28) 0%, rgba(11, 82, 51, 0) 60%),
        radial-gradient(760px 420px at 50% 108%, rgba(225, 132, 9, 0.10) 0%, rgba(225, 132, 9, 0) 55%),
        linear-gradient(150deg, #121212 0%, #1a1a1a 44%, #242833 100%);
    background-size: 130% 130%, 125% 125%, 140% 140%, 100% 100%;
    background-position: 0% 78%, 100% 12%, 50% 100%, 0 0;
    animation: icu-drift 26s ease-in-out infinite alternate;
}

.login-background::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 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 icu-drift {
    0% {
        background-position: 0% 78%, 100% 12%, 50% 100%, 0 0;
    }

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

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

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

.login-shape:nth-child(2) {
    width: 420px;
    height: 420px;
    background: linear-gradient(135deg, #0b5233 0%, #147a4c 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 {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(18, 18, 18, 0.12);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 4px 14px rgba(0, 0, 0, 0.18);
    animation: slideUp 0.6s ease-out;
}

.login-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #8a4f06 0%, #e18409 45%, #0b5233 100%);
}

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

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

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

.login-logo {
    content: url('/css/icu/logo.png');
    width: min(260px, 82%);
    height: auto;
    display: block;
    margin: 0 auto 1.1rem;
}

.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(135deg, #8a4f06 0%, #e18409 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.login-content {
    width: 100%;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #121212;
    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(0.55);
    opacity: 0.75;
}

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

.form-control-modern::placeholder {
    color: #717c8d;
}

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

.form-control-modern:focus {
    outline: none;
    background: #ffffff;
    border-color: #e18409;
    box-shadow: 0 0 0 3px rgba(225, 132, 9, 0.18);
}

.twofactor-subtext {
    color: #3f495a;
    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 {
    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: #293142;
    font-size: 0.9rem;
    margin: 0;
}

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

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

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

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #c46e0a 0%, #e18409 100%);
    border: none;
    border-radius: 10px;
    color: #121212;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(225, 132, 9, 0.35);
}

.btn-login:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #e18409 0%, #f59a2a 100%);
    box-shadow:
        0 6px 20px rgba(225, 132, 9, 0.45),
        0 0 0 2px rgba(11, 82, 51, 0.35);
}

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

.btn-login:focus-visible {
    outline: none;
    box-shadow:
        0 4px 15px rgba(225, 132, 9, 0.35),
        0 0 0 3px rgba(11, 82, 51, 0.55);
}

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

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

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

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

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

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

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

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

.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 #dde2e5;
}

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

.validation-summary {
    background: rgba(201, 51, 43, 0.08);
    border: 1px solid rgba(201, 51, 43, 0.4);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.validation-summary-info {
    background: rgba(225, 132, 9, 0.1);
    border-color: rgba(225, 132, 9, 0.4);
}

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

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

.alert-danger {
    background: rgba(201, 51, 43, 0.08);
    border: 1px solid rgba(201, 51, 43, 0.4);
    color: #a82923;
}

.alert-success {
    background: rgba(11, 82, 51, 0.1);
    border: 1px solid rgba(11, 82, 51, 0.4);
    color: #0b5233;
}

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

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

@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 {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-external-login {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #cfd6da;
    border-radius: 10px;
    background: #ffffff;
    color: #293142;
    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: #fdf4ea;
    border-color: #e18409;
    transform: translateY(-1px);
}

.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; }
