/* ==========================================================================
   Auth pages – enhanced UI
   Self-contained styles for the login screen: animated brand panel,
   glass-style card, icon inputs, password toggle, button micro-interactions.
   Loads on top of the existing Metronic (default/style.bundle) styles.
   ========================================================================== */

:root {
    --auth-primary: #2b6cb0;
    --auth-primary-dark: #1a4971;
    --auth-accent: #34c38f;
}

/* ---- Layout shell ---- */
.auth-shell {
    min-height: 100vh;
}

/* ---- Animated brand / aside panel ---- */
.auth-aside {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 60%, #123a5c 100%);
    background-size: 200% 200%;
    animation: authGradientShift 12s ease infinite;
}

@keyframes authGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-aside__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-aside__icon {
    position: absolute;
    color: rgba(255, 255, 255, 0.14);
    animation: authFloat 9s ease-in-out infinite;
}

.auth-aside__icon:nth-child(1) { top: 12%;  left: 10%; font-size: 3.2rem;  animation-duration: 10s; }
.auth-aside__icon:nth-child(2) { top: 65%;  left: 18%; font-size: 2.2rem;  animation-duration: 8s;  animation-delay: .6s; }
.auth-aside__icon:nth-child(3) { top: 22%;  left: 78%; font-size: 4rem;    animation-duration: 11s; animation-delay: 1.2s; }
.auth-aside__icon:nth-child(4) { top: 78%;  left: 72%; font-size: 2.6rem;  animation-duration: 9s;  animation-delay: .3s; }
.auth-aside__icon:nth-child(5) { top: 48%;  left: 46%; font-size: 5.5rem;  animation-duration: 13s; animation-delay: .9s; }

@keyframes authFloat {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50%      { transform: translate3d(0, -22px, 0) rotate(8deg); }
}

.auth-aside__content {
    position: relative;
    z-index: 2;
    animation: authFadeInUp .8s ease both;
}

.auth-aside__logo {
    max-width: 55%;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .25));
}

.auth-aside__title {
    color: #fff;
    font-weight: 700;
    letter-spacing: .3px;
}

.auth-aside__subtitle {
    color: rgba(255, 255, 255, 0.8);
    max-width: 420px;
}

/* ---- Card / form panel ---- */
.auth-card {
    animation: authFadeInUp .7s ease .1s both;
}

@keyframes authFadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-card__eyebrow {
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: .72rem;
    color: var(--auth-primary);
    font-weight: 700;
}

/* ---- Icon inputs ---- */
.auth-input-group {
    position: relative;
}

.auth-input-group .auth-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #9aa5b1;
    transition: color .2s ease;
    pointer-events: none;
}

.auth-input-group .form-control {
    padding-left: 42px;
    padding-right: 42px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #e4e8ee;
    transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.auth-input-group .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 .2rem rgba(43, 108, 176, .15);
    transform: translateY(-1px);
}

.auth-input-group .form-control:focus ~ .auth-input-icon,
.auth-input-group.is-focused .auth-input-icon {
    color: var(--auth-primary);
}

.auth-toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #9aa5b1;
    cursor: pointer;
    padding: 4px 6px;
}

.auth-toggle-password:hover,
.auth-toggle-password:focus {
    color: var(--auth-primary);
    outline: none;
}

/* ---- Submit button ---- */
.auth-submit-btn {
    height: 48px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: .3px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    border: none;
    transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
    box-shadow: 0 8px 18px rgba(43, 108, 176, .3);
}

.auth-submit-btn:hover,
.auth-submit-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(43, 108, 176, .38);
}

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

.auth-submit-btn.is-loading {
    pointer-events: none;
    opacity: .85;
}

.auth-submit-btn .fa-spinner {
    display: none;
}

.auth-submit-btn.is-loading .fa-sign-in-alt {
    display: none;
}

.auth-submit-btn.is-loading .fa-spinner {
    display: inline-block;
}

/* ---- Footer hint ---- */
.auth-footnote {
    color: #9aa5b1;
    font-size: .85rem;
}

.auth-footnote i {
    color: var(--auth-primary);
}

/* ---- Responsive tweaks ---- */
@media (max-width: 991.98px) {
    .auth-aside {
        min-height: 220px;
    }

    .auth-aside__icon:nth-child(5) { font-size: 3.4rem; }
}

/* ---- Header toggle button, fixed to the corner of the login screen ---- */
.auth-theme-toggle {
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

/* ==========================================================================
   Dark mode overrides
   Metronic already themes most Bootstrap-based utility classes via
   [data-bs-theme]; the rules below only cover the bespoke pieces this
   stylesheet introduces (gradient aside, glass card, icon inputs, button).
   ========================================================================== */

[data-bs-theme="dark"] .auth-aside {
    background: linear-gradient(135deg, #0b355e 0%, #0a2540 60%, #05111f 100%);
    background-size: 200% 200%;
}

[data-bs-theme="dark"] .auth-aside__icon {
    color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .auth-input-group .form-control {
    border-color: var(--bs-border-color, #363843);
    background-color: var(--bs-body-bg, #1b1c22);
    color: var(--bs-gray-700, #9a9cae);
}

[data-bs-theme="dark"] .auth-input-group .form-control:focus {
    box-shadow: 0 0 0 .2rem rgba(0, 106, 230, .25);
}

[data-bs-theme="dark"] .auth-input-group .auth-input-icon,
[data-bs-theme="dark"] .auth-toggle-password {
    color: var(--bs-gray-500, #636674);
}

[data-bs-theme="dark"] .auth-submit-btn {
    background: linear-gradient(135deg, var(--auth-primary), #0a2540);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .45);
}

[data-bs-theme="dark"] .auth-footnote {
    color: var(--bs-gray-500, #636674);
}
