/* LPHS auth theme — selaras portal_v2 (www.lphs.gov.my) */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&display=swap");

:root {
    --lphs-primary: #14505B;
    --lphs-primary-dark: #0e3a44;
    --lphs-primary-rgb: 20, 80, 91;
    --lphs-secondary: #C2922F;
    --lphs-secondary-rgb: 194, 146, 47;
    --lphs-accent-1: #F3E8D0;
    --lphs-accent-1-rgb: 243, 232, 208;
    --lphs-accent-2: #5E6B73;
    --lphs-accent-2-rgb: 94, 107, 115;
}

body.lphs-auth {
    background-color: var(--lphs-accent-1);
    background-image:
        radial-gradient(ellipse 90% 60% at 0% 0%, rgba(var(--lphs-primary-rgb), 0.14) 0%, transparent 58%),
        radial-gradient(ellipse 80% 55% at 100% 8%, rgba(var(--lphs-secondary-rgb), 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(var(--lphs-primary-rgb), 0.10) 0%, transparent 60%);
    background-attachment: fixed;
}

.lphs-auth .auth-page .card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(var(--lphs-primary-rgb), 0.15);
}

.lphs-auth .auth-side-wrapper {
    background: linear-gradient(135deg, var(--lphs-primary) 0%, var(--lphs-primary-dark) 100%) !important;
    min-height: 320px;
    position: relative;
}

.lphs-auth .auth-side-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(var(--lphs-secondary-rgb), 0.18) 0%, transparent 55%);
    pointer-events: none;
}

.lphs-auth .auth-side-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 1.5rem;
}

.lphs-auth .auth-side-brand .lphs-logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lphs-accent-1);
    padding: 0.75rem 1rem;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
    margin-bottom: 1rem;
}

.lphs-auth .auth-side-brand .lphs-logo-badge img {
    max-height: 100px;
    max-width: 100px;
    width: auto;
    height: auto;
    display: block;
}

.lphs-auth .auth-side-brand h3 {
    font-family: "Montserrat", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.35rem;
}

.lphs-auth .auth-side-brand p {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-bottom: 0;
}

.lphs-auth .auth-form-wrapper {
    background: #fff;
}

.lphs-auth .lphs-auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.lphs-auth .lphs-auth-logo img {
    max-height: 48px;
    width: auto;
    height: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
}

.lphs-auth .auth-form-wrapper h5 {
    font-family: "Montserrat", Arial, sans-serif;
    font-weight: 600;
    color: var(--lphs-primary) !important;
}

.lphs-auth .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #343a40;
}

.lphs-auth .form-control:focus {
    border-color: var(--lphs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--lphs-primary-rgb), 0.2);
}

.lphs-auth .form-check-input:checked {
    background-color: var(--lphs-primary);
    border-color: var(--lphs-primary);
}

.lphs-auth .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--lphs-primary);
    --bs-btn-border-color: var(--lphs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--lphs-primary-dark);
    --bs-btn-hover-border-color: var(--lphs-primary-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--lphs-primary-dark);
    --bs-btn-active-border-color: var(--lphs-primary-dark);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--lphs-primary);
    --bs-btn-disabled-border-color: var(--lphs-primary);
    --bs-btn-focus-shadow-rgb: var(--lphs-primary-rgb);
    color: #fff;
    font-weight: 600;
    padding: 0.6rem 1rem;
}

.lphs-auth .btn-outline-primary {
    --bs-btn-color: var(--lphs-primary);
    --bs-btn-border-color: var(--lphs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--lphs-primary);
    --bs-btn-hover-border-color: var(--lphs-primary);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--lphs-primary-dark);
    --bs-btn-active-border-color: var(--lphs-primary-dark);
    font-weight: 600;
}

.lphs-auth a:not(.btn) {
    color: var(--lphs-primary);
    text-decoration: none;
}

.lphs-auth a:not(.btn):hover {
    color: var(--lphs-primary-dark);
    text-decoration: underline;
}

/* Button-as-link: keep button text colors (avoid teal-on-teal) */
.lphs-auth a.btn {
    text-decoration: none;
}

.lphs-auth a.btn:hover {
    text-decoration: none;
}

.lphs-auth a.btn-primary,
.lphs-auth a.btn-primary:hover,
.lphs-auth a.btn-primary:focus,
.lphs-auth a.btn-primary:active {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    color: #fff !important;
}

.lphs-auth a.btn-outline-primary {
    --bs-btn-color: var(--lphs-primary);
    color: var(--lphs-primary);
}

.lphs-auth a.btn-outline-primary:hover,
.lphs-auth a.btn-outline-primary:focus,
.lphs-auth a.btn-outline-primary:active {
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    color: #fff !important;
}

/* 2FA method toggle: equal height + vertical center */
.lphs-auth .two-factor-method-toggle {
    display: flex;
    width: 100%;
}

.lphs-auth .two-factor-method-toggle > .btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.5rem;
    padding: 0.55rem 0.75rem;
    line-height: 1.25;
    white-space: nowrap;
}

.lphs-auth .two-factor-method-toggle > .btn i {
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.lphs-auth .auth-form-wrapper .position-relative hr {
    border-color: rgba(var(--lphs-accent-2-rgb), 0.25);
}

@media (max-width: 767.98px) {
    .lphs-auth .auth-side-wrapper {
        min-height: 200px;
    }

    .lphs-auth .auth-side-brand .lphs-logo-badge {
        padding: 0.6rem 0.8rem;
    }

    .lphs-auth .auth-side-brand .lphs-logo-badge img {
        max-height: 80px;
        max-width: 80px;
    }
}

/* === Hard overrides: kill NobleUI / Bootstrap purple (#6571ff) on auth === */
body.lphs-auth,
.lphs-auth {
    --bs-primary: #14505B;
    --bs-primary-rgb: 20, 80, 91;
    --bs-link-color: #14505B;
    --bs-link-hover-color: #0e3a44;
    --bs-link-color-rgb: 20, 80, 91;
}

.lphs-auth .text-primary,
.lphs-auth a.text-primary,
.lphs-auth .link-primary {
    --bs-text-opacity: 1;
    color: #14505B !important;
}

.lphs-auth a.text-primary:hover,
.lphs-auth .link-primary:hover {
    color: #0e3a44 !important;
}

.lphs-auth .btn-primary,
.lphs-auth a.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #14505B;
    --bs-btn-border-color: #14505B;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0e3a44;
    --bs-btn-hover-border-color: #0e3a44;
    --bs-btn-focus-shadow-rgb: 20, 80, 91;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0e3a44;
    --bs-btn-active-border-color: #0e3a44;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #14505B;
    --bs-btn-disabled-border-color: #14505B;
    color: #fff !important;
    background-color: #14505B !important;
    border-color: #14505B !important;
}

.lphs-auth .btn-primary:hover,
.lphs-auth .btn-primary:focus,
.lphs-auth .btn-primary:active,
.lphs-auth .btn-primary.active,
.lphs-auth a.btn-primary:hover,
.lphs-auth a.btn-primary:focus,
.lphs-auth a.btn-primary:active {
    color: #fff !important;
    background-color: #0e3a44 !important;
    border-color: #0e3a44 !important;
    box-shadow: 0 0 0 0.2rem rgba(20, 80, 91, 0.25) !important;
}

.lphs-auth .btn-outline-primary,
.lphs-auth a.btn-outline-primary,
.lphs-auth .btn-outline-primary.text-primary {
    --bs-btn-color: #14505B;
    --bs-btn-border-color: #14505B;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #14505B;
    --bs-btn-hover-border-color: #14505B;
    --bs-btn-focus-shadow-rgb: 20, 80, 91;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0e3a44;
    --bs-btn-active-border-color: #0e3a44;
    --bs-btn-disabled-color: #14505B;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #14505B;
    color: #14505B !important;
    background-color: transparent !important;
    border-color: #14505B !important;
}

.lphs-auth .btn-outline-primary:hover,
.lphs-auth .btn-outline-primary:focus,
.lphs-auth .btn-outline-primary:active,
.lphs-auth .btn-outline-primary.active,
.lphs-auth a.btn-outline-primary:hover,
.lphs-auth a.btn-outline-primary:focus,
.lphs-auth a.btn-outline-primary:active {
    color: #fff !important;
    background-color: #14505B !important;
    border-color: #14505B !important;
    box-shadow: 0 0 0 0.2rem rgba(20, 80, 91, 0.25) !important;
}

.lphs-auth .form-check-input:focus {
    border-color: #14505B;
    box-shadow: 0 0 0 0.2rem rgba(20, 80, 91, 0.25);
}

.lphs-auth .form-check-input:checked {
    background-color: #14505B !important;
    border-color: #14505B !important;
}

/* Manual login submit — selaras tinggi butang SSO */
.lphs-auth .btn-outline-primary.d-inline-flex {
    padding: 0.6rem 1rem;
    line-height: 1.25;
}

.lphs-auth .btn-outline-primary.d-inline-flex svg {
    flex-shrink: 0;
}

