html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', Arial, sans-serif;
}

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.web-bg {
    background-image: url('/_content/SPIC.MauiBlazorApp.Shared/images/LoginImages/WebLoginBg.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.app-bg {
    background-image: url('/_content/SPIC.MauiBlazorApp.Shared/images/LoginImages/AppLoginBg.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

.top-header {
    background-color: #ffffff;
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
}

.brand-logo {
    margin: 0;
    color: #1e3a8a;
    font-size: 1.75rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 1px;
}

.btn-contact {
    background-color: #1e7045;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 24px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

    .btn-contact:hover {
        background-color: #155d38;
    }

.login-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 0;
}

.app-only-wrapper {
    flex: 1 1 auto;
    min-height: 0;
}

.login-logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.20);
}

.login-secure-img {
    width: 50%;
    height: 50%;
    object-fit: contain;
}
.login-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-header-text {
    text-align: center;
    color: #ffffff;
    margin-bottom: 25px;
}

    .login-header-text h1 {
        margin: 0 0 5px 0;
        font-size: 1.3rem;
        font-weight: 600;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    }

    .login-header-text p {
        margin: 0;
        font-size: 0.7rem;
        opacity: 0.95;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    }

.login-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 35px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.30);
}

    .login-card h5 {
        margin: 0 0 20px 0;
        font-size: 0.8rem;
        color: #000000a8;
        font-weight: 600;
    }

.validation-summary {
    color: #b91c1c;
    font-size: 0.82rem;
    margin-bottom: 12px;
}

.input-group-custom {
    margin-bottom: 1rem;
}

.custom-with-icon {
    position: relative;
}

.form-control-custom {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 44px 10px 15px;
    font-size: 0.85rem;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

    .form-control-custom:focus {
        outline: none;
        border-color: #1e7045;
        box-shadow: none;
    }

.input-icon,
.icon-button {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #9ca3af;
}

.icon-button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

.login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0 16px;
    gap: 10px;
    flex-wrap: wrap;
}

.form-check-label-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6b7280;
}

.remember-checkbox {
    margin: 0;
}

.forgot-link {
    font-size: 0.8rem;
    color: #9ca3af;
    text-decoration: none;
}

    .forgot-link:hover {
        color: #1e7045;
    }

.btn-login {
    background-color: #1e7045;
    color: white;
    width: 100%;
    padding: 8px 12px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    margin-top: 15px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}

    .btn-login:hover {
        background-color: #155d38;
    }

.auth-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.auth-icon-btn {
    width: 47px;
    height: 47px;
    border: 1px solid #22d2804a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e7045;
    font-size: 1.1rem;
    background: transparent;
    text-decoration: none;
    transition: 0.2s;
}

    .auth-icon-btn:hover {
        background-color: #f0fdf4;
        border-color: #1e7045;
        color: #1e7045;
    }

.register-text {
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280c9;
    letter-spacing: 0.6px;
}

    .register-text a {
        color: #0a58ca;
        font-size: 0.8rem;
        font-weight: 500;
        text-decoration: none;
    }

.footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 20px 40px;
    font-size: 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.footer-brand {
    color: #ffffff;
    font-weight: 800;
    font-style: italic;
    font-size: 1rem;
    justify-self: start;
    text-align: left;
}

.footer-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

    .footer-links li {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

        .footer-links li::before {
            content: "•";
            color: #9ca3af;
            margin-right: 8px;
            font-size: 1.2rem;
            line-height: 0;
        }

.footer-text {
    justify-self: end;
    text-align: right;
}

/* Desktop / large screens: no full-page scroll */
@media (min-width: 993px) and (min-height: 701px) {
    html, body {
        overflow: hidden;
    }

    .login-page {
        height: 100vh;
        overflow: hidden;
    }

    .login-wrapper {
        overflow: hidden;
    }

    .app-only-wrapper {
        overflow: hidden;
    }
}

/* Tablet */
@media (max-width: 992px) {
    html, body {
        overflow-y: auto;
    }

    .login-page {
        min-height: 100vh;
        height: auto;
    }

    .footer {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 16px 20px;
    }

    .footer-brand,
    .footer-text {
        justify-self: center;
        text-align: center;
    }

    .footer-center {
        justify-content: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px), (max-height: 700px) {
    html, body {
        overflow-y: auto;
    }

    .login-page {
        min-height: 100vh;
        height: auto;
    }

    .top-header {
        padding: 12px 20px;
    }

    .login-wrapper {
        justify-content: flex-start;
        padding: 16px;
    }

    .login-card {
        padding: 24px;
    }

    .footer-text {
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .footer {
        gap: 10px;
        padding: 14px 16px;
    }

    .footer-links {
        gap: 12px;
    }

        .footer-links li::before {
            margin-right: 6px;
        }

    .footer-brand {
        font-size: 0.95rem;
    }

    .footer-text {
        font-size: 0.72rem;
    }
}
