body[data-theme] {
    min-height: 100vh;
    background:
        linear-gradient(135deg, #d8f3ef 0%, #dfe8ff 34%, #f7ece4 68%, #e8f7f4 100%);
    background-attachment: fixed;
}

body[data-theme] #wrapper.theme-cyan {
    background: transparent !important;
    min-height: 100vh;
}

.auth-modern-page {
    min-height: 100vh;
    padding: 56px 18px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(1200px 560px at 10% -10%, rgba(89, 196, 188, 0.42), transparent 60%),
        radial-gradient(900px 460px at 100% 110%, rgba(99, 122, 174, 0.32), transparent 65%),
        radial-gradient(800px 420px at 50% 115%, rgba(255, 189, 137, 0.22), transparent 66%);
}

.auth-modern-page::before,
.auth-modern-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
    z-index: -1;
}

.auth-modern-page::before {
    width: 340px;
    height: 340px;
    top: -120px;
    inset-inline-start: -80px;
    background: radial-gradient(circle at 30% 30%, rgba(89, 196, 188, 0.5), rgba(89, 196, 188, 0.05) 72%);
}

.auth-modern-page::after {
    width: 420px;
    height: 420px;
    bottom: -180px;
    inset-inline-end: -120px;
    background: radial-gradient(circle at 40% 40%, rgba(99, 122, 174, 0.38), rgba(99, 122, 174, 0.04) 70%);
}

.auth-modern-shell {
    width: min(1060px, 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.34);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
    backdrop-filter: blur(18px) saturate(145%);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
}

.auth-modern-shell.auth-modern-shell-compact {
    width: min(560px, 100%);
    grid-template-columns: 1fr;
}

.auth-modern-side {
    padding: 56px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    background: linear-gradient(160deg, rgba(89, 196, 188, 0.18) 0%, rgba(99, 122, 174, 0.24) 100%);
    border-inline-end: 1px solid rgba(0, 0, 0, 0.06);
}

.auth-modern-side h2 {
    margin: 6px 0 0;
    font-size: 2rem;
    font-weight: 700;
    color: #2f343b;
}

.auth-modern-side p {
    margin: 0;
    font-size: 0.975rem;
    color: #5d6a75;
    max-width: 420px;
}

.auth-modern-panel {
    padding: 42px 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.auth-modern-card {
    width: min(440px, 100%);
    background: rgba(255, 255, 255, 0.45);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 16px;
    padding: 24px 22px 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.auth-modern-card-head {
    margin-bottom: 20px;
}

.auth-modern-card-head h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: #2f343b;
}

.auth-modern-card-head p {
    margin: 10px 0 0;
    color: #6b7680;
}

.auth-modern-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5560;
}

.auth-modern-form .auth-input {
    position: relative;
}

.auth-modern-form .auth-input i {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    color: #8a97a3;
    z-index: 1;
}

.auth-modern-form .auth-input .form-control {
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(47, 52, 59, 0.16);
    background: #ffffff;
    padding-inline-start: 40px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-modern-form .auth-input .form-control:focus {
    border-color: #59c4bc;
    box-shadow: 0 0 0 0.2rem rgba(89, 196, 188, 0.15);
}

.auth-modern-form .btn.btn-primary {
    height: 46px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.auth-modern-card .alert {
    border-radius: 12px;
    border-width: 1px;
    border-style: solid;
    padding: 12px 14px 12px 14px;
    margin-bottom: 16px;
    position: relative;
    font-size: 0.92rem;
}

.auth-modern-card .alert strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.auth-modern-card .alert ul {
    margin: 10px 0 0;
    padding-inline-start: 18px;
}

.auth-modern-card .alert ul li + li {
    margin-top: 4px;
}

.auth-modern-card .alert .close {
    opacity: 0.7;
    text-shadow: none;
}

.auth-modern-card .alert .close:hover {
    opacity: 1;
}

.auth-modern-card .alert-danger {
    color: #842029;
    background: rgba(248, 215, 218, 0.92);
    border-color: rgba(220, 53, 69, 0.35);
}

.auth-modern-card .alert-success,
.auth-modern-card .alert-msg {
    color: #0f5132;
    background: rgba(209, 231, 221, 0.92);
    border-color: rgba(25, 135, 84, 0.35);
}

.auth-modern-card .alert-warning {
    color: #664d03;
    background: rgba(255, 243, 205, 0.92);
    border-color: rgba(255, 193, 7, 0.38);
}

.auth-modern-card .alert-info {
    color: #055160;
    background: rgba(207, 244, 252, 0.92);
    border-color: rgba(13, 202, 240, 0.38);
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.auth-brand-logo {
    width: auto;
    height: 34px;
    max-width: 220px;
}

.auth-brand-logo-white {
    display: none;
}

html[data-theme='dark'] .auth-modern-page,
html[data-theme='high-contrast'] .auth-modern-page {
    background:
        radial-gradient(1200px 560px at 10% -10%, rgba(89, 196, 188, 0.2), transparent 60%),
        radial-gradient(900px 460px at 100% 110%, rgba(99, 122, 174, 0.24), transparent 65%),
        radial-gradient(800px 420px at 50% 115%, rgba(255, 189, 137, 0.12), transparent 66%);
}

html[data-theme='dark'],
html[data-theme='high-contrast'] {
    min-height: 100%;
}

html[data-theme='dark'] body[data-theme],
html[data-theme='high-contrast'] body[data-theme] {
    background:
        linear-gradient(135deg, #102126 0%, #1a1f34 34%, #251f2a 68%, #13242a 100%);
    background-attachment: fixed;
}

html[data-theme='dark'] .auth-modern-page::before,
html[data-theme='high-contrast'] .auth-modern-page::before {
    background: radial-gradient(circle at 35% 35%, rgba(89, 196, 188, 0.36), rgba(89, 196, 188, 0.05) 72%);
    opacity: 0.48;
}

html[data-theme='dark'] .auth-modern-page::after,
html[data-theme='high-contrast'] .auth-modern-page::after {
    background: radial-gradient(circle at 40% 40%, rgba(99, 122, 174, 0.3), rgba(99, 122, 174, 0.03) 72%);
    opacity: 0.48;
}

html[data-theme='dark'] .auth-modern-shell,
html[data-theme='high-contrast'] .auth-modern-shell {
    background: rgba(26, 32, 39, 0.36);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

html[data-theme='dark'] .auth-modern-side,
html[data-theme='high-contrast'] .auth-modern-side {
    background: linear-gradient(160deg, rgba(89, 196, 188, 0.1) 0%, rgba(99, 122, 174, 0.18) 100%);
    border-inline-end-color: rgba(255, 255, 255, 0.08);
}

html[data-theme='dark'] .auth-modern-side h2,
html[data-theme='high-contrast'] .auth-modern-side h2,
html[data-theme='dark'] .auth-modern-card-head h1,
html[data-theme='high-contrast'] .auth-modern-card-head h1 {
    color: #eef3f8;
}

html[data-theme='dark'] .auth-modern-side p,
html[data-theme='high-contrast'] .auth-modern-side p,
html[data-theme='dark'] .auth-modern-card-head p,
html[data-theme='high-contrast'] .auth-modern-card-head p,
html[data-theme='dark'] .auth-modern-form label,
html[data-theme='high-contrast'] .auth-modern-form label {
    color: #c6d0da;
}

html[data-theme='dark'] .auth-modern-form .auth-input .form-control,
html[data-theme='high-contrast'] .auth-modern-form .auth-input .form-control {
    background: #1c2229;
    border-color: rgba(255, 255, 255, 0.16);
    color: #f3f7fb;
}

html[data-theme='dark'] .auth-modern-form .auth-input i,
html[data-theme='high-contrast'] .auth-modern-form .auth-input i {
    color: #a8b5c1;
}

html[data-theme='dark'] .auth-modern-form .auth-input .form-control::placeholder,
html[data-theme='high-contrast'] .auth-modern-form .auth-input .form-control::placeholder {
    color: #8f9aa5;
}

html[data-theme='dark'] .auth-modern-panel,
html[data-theme='high-contrast'] .auth-modern-panel {
    background: rgba(0, 0, 0, 0.12);
}

html[data-theme='dark'] .auth-modern-card,
html[data-theme='high-contrast'] .auth-modern-card {
    background: rgba(17, 23, 31, 0.48);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

html[data-theme='dark'] .auth-modern-card .alert-danger,
html[data-theme='high-contrast'] .auth-modern-card .alert-danger {
    color: #ffd7db;
    background: rgba(220, 53, 69, 0.18);
    border-color: rgba(220, 53, 69, 0.45);
}

html[data-theme='dark'] .auth-modern-card .alert-success,
html[data-theme='dark'] .auth-modern-card .alert-msg,
html[data-theme='high-contrast'] .auth-modern-card .alert-success,
html[data-theme='high-contrast'] .auth-modern-card .alert-msg {
    color: #d8ffe8;
    background: rgba(25, 135, 84, 0.2);
    border-color: rgba(25, 135, 84, 0.45);
}

html[data-theme='dark'] .auth-modern-card .alert-warning,
html[data-theme='high-contrast'] .auth-modern-card .alert-warning {
    color: #ffe8ae;
    background: rgba(255, 193, 7, 0.18);
    border-color: rgba(255, 193, 7, 0.42);
}

html[data-theme='dark'] .auth-modern-card .alert-info,
html[data-theme='high-contrast'] .auth-modern-card .alert-info {
    color: #cbf5ff;
    background: rgba(13, 202, 240, 0.16);
    border-color: rgba(13, 202, 240, 0.42);
}

html[data-theme='dark'] .auth-modern-card .alert .close,
html[data-theme='high-contrast'] .auth-modern-card .alert .close {
    color: #f3f7fb;
}

html[data-theme='dark'] .auth-brand-logo-dark,
html[data-theme='high-contrast'] .auth-brand-logo-dark {
    display: none;
}

html[data-theme='dark'] .auth-brand-logo-white,
html[data-theme='high-contrast'] .auth-brand-logo-white {
    display: inline-block;
}

@media (max-width: 991.98px) {
    .auth-modern-page {
        padding: 86px 14px 24px;
        align-items: center;
        justify-content: center;
    }

    .auth-modern-shell {
        grid-template-columns: 1fr;
        width: min(560px, 100%);
    }

    .auth-modern-panel {
        padding: 24px 18px;
    }
}

/* Smooth animated bubbles for auth background */
body[data-theme] #wrapper.theme-cyan {
    position: relative;
    overflow: hidden;
}

.auth-bg-bubbles {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.auth-bg-bubbles .bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.16) 70%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    filter: blur(0.2px);
    opacity: 0.35;
    animation: authBubbleFloat 18s ease-in-out infinite;
}

.auth-bg-bubbles .b1 { width: 220px; height: 220px; left: 4%; top: 68%; animation-duration: 18s; animation-delay: -2s; }
.auth-bg-bubbles .b2 { width: 140px; height: 140px; left: 18%; top: 22%; animation-duration: 14s; animation-delay: -8s; }
.auth-bg-bubbles .b3 { width: 180px; height: 180px; left: 34%; top: 78%; animation-duration: 21s; animation-delay: -5s; }
.auth-bg-bubbles .b4 { width: 100px; height: 100px; left: 56%; top: 26%; animation-duration: 13s; animation-delay: -3s; }
.auth-bg-bubbles .b5 { width: 260px; height: 260px; left: 70%; top: 66%; animation-duration: 24s; animation-delay: -11s; }
.auth-bg-bubbles .b6 { width: 120px; height: 120px; left: 84%; top: 18%; animation-duration: 15s; animation-delay: -7s; }
.auth-bg-bubbles .b7 { width: 90px; height: 90px; left: 48%; top: 8%; animation-duration: 12s; animation-delay: -4s; }
.auth-bg-bubbles .b8 { width: 160px; height: 160px; left: 88%; top: 84%; animation-duration: 19s; animation-delay: -9s; }

@keyframes authBubbleFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    25% {
        transform: translate3d(14px, -20px, 0) scale(1.04);
    }

    50% {
        transform: translate3d(-10px, -42px, 0) scale(0.98);
    }

    75% {
        transform: translate3d(8px, -18px, 0) scale(1.02);
    }

    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

html[data-theme='dark'] .auth-bg-bubbles .bubble,
html[data-theme='high-contrast'] .auth-bg-bubbles .bubble {
    background: radial-gradient(circle at 30% 30%, rgba(137, 187, 255, 0.22), rgba(89, 196, 188, 0.06) 70%);
    border-color: rgba(160, 198, 255, 0.25);
    opacity: 0.3;
}

@media (max-width: 767.98px) {
    .auth-bg-bubbles .bubble {
        opacity: 0.26;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-bg-bubbles .bubble {
        animation: none !important;
    }
}
