/* ============================================================================
   IMS Platform — Authentication pages
   Premium split-screen SaaS layout with animated background and glass card.
   ============================================================================ */

.auth-page {
    min-height: 100vh;
    background-color: var(--ims-bg);
    color: var(--ims-text);
    overflow: hidden;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

/* ----------------------------------------------------------------------------
   Left brand panel
   ---------------------------------------------------------------------------- */
.auth-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 3rem 3.5rem;
    color: #fff;
    background:
        radial-gradient(circle at 18% 22%, rgba(124, 58, 237, 0.55), transparent 55%),
        radial-gradient(circle at 80% 75%, rgba(14, 165, 233, 0.45), transparent 55%),
        linear-gradient(135deg, #0b1226 0%, #1d2c5d 55%, #2b1e54 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.35;
    mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 75%, transparent 100%);
    pointer-events: none;
}

.auth-brand-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.auth-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    animation: imsAuthFloat 12s ease-in-out infinite;
}

.auth-shape--1 {
    width: 380px;
    height: 380px;
    background: rgba(99, 102, 241, 0.65);
    top: -120px;
    left: -90px;
    animation-delay: 0s;
}

.auth-shape--2 {
    width: 320px;
    height: 320px;
    background: rgba(236, 72, 153, 0.5);
    bottom: -100px;
    right: 10%;
    animation-delay: 3s;
}

.auth-shape--3 {
    width: 240px;
    height: 240px;
    background: rgba(34, 211, 238, 0.6);
    top: 40%;
    right: -80px;
    animation-delay: 6s;
}

@keyframes imsAuthFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(20px, -30px, 0) scale(1.08); }
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 32rem;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--ims-radius);
    backdrop-filter: blur(8px);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.auth-brand-logo i {
    color: #a5b4fc;
}

.auth-brand-title {
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.6rem;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.auth-brand-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.auth-brand-tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 2.5rem;
    max-width: 28rem;
}

.auth-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1.5rem;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.auth-feature-list li i {
    color: #6ee7b7;
    background: rgba(110, 231, 183, 0.15);
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
}

.auth-brand-footer .auth-brand-quote {
    max-width: 18rem;
    line-height: 1.5;
}

/* ----------------------------------------------------------------------------
   Right form panel
   ---------------------------------------------------------------------------- */
.auth-form-panel {
    position: relative;
    padding: 2.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% -10%, rgba(37, 99, 235, 0.08), transparent 55%),
        var(--ims-bg);
}

.auth-form-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.6;
    mask-image: radial-gradient(circle at center, #000 30%, transparent 75%);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-radius: var(--ims-radius-lg);
    padding: 2.25rem;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.12),
        0 2px 6px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .auth-card {
    background: rgba(19, 28, 51, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

.auth-card-header {
    margin-bottom: 1.75rem;
}

.auth-card-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--ims-primary-soft);
    color: var(--ims-primary-dark);
    margin-bottom: 1rem;
}

.auth-card-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--ims-heading);
}

.auth-card-subtitle {
    color: var(--ims-text-muted);
    margin-bottom: 0;
}

/* Floating-label inputs */
.auth-field {
    margin-bottom: 1rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .form-control {
    padding: 1.15rem 1rem 0.45rem 2.8rem;
    height: 3.4rem;
    border-radius: var(--ims-radius);
    background-color: rgba(248, 250, 252, 0.9);
}

.auth-input-wrap .form-control:focus {
    background-color: #ffffff;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--ims-text-soft);
    pointer-events: none;
    font-size: 1.1rem;
}

.auth-input-wrap .form-control:focus + .auth-input-icon,
.auth-input-wrap .form-control:not(:placeholder-shown) + .auth-input-icon {
    color: var(--ims-primary);
}

.auth-input-wrap .auth-input-label {
    position: absolute;
    top: 50%;
    left: 2.8rem;
    transform: translateY(-50%);
    color: var(--ims-text-soft);
    font-size: 0.95rem;
    pointer-events: none;
    transition: transform var(--ims-transition-fast), font-size var(--ims-transition-fast), color var(--ims-transition-fast);
    background: transparent;
    padding: 0;
}

.auth-input-wrap .form-control:focus ~ .auth-input-label,
.auth-input-wrap .form-control:not(:placeholder-shown) ~ .auth-input-label {
    transform: translateY(-1.35rem);
    font-size: 0.72rem;
    color: var(--ims-primary);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-toggle-pwd {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: var(--ims-text-soft);
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ims-radius-sm);
    transition: color var(--ims-transition-fast), background-color var(--ims-transition-fast);
}

.auth-toggle-pwd:hover {
    background-color: var(--ims-primary-soft);
    color: var(--ims-primary);
}

.auth-field-error {
    color: var(--ims-danger);
    font-size: 0.78rem;
    margin-top: 0.35rem;
    display: block;
    min-height: 1rem;
}

.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.25rem 0 1.25rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    color: var(--ims-text);
}

.auth-checkbox .form-check-input {
    margin: 0;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.35rem;
    cursor: pointer;
}

.auth-link {
    color: var(--ims-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

.auth-submit {
    width: 100%;
    height: 3rem;
    border: 0;
    border-radius: var(--ims-radius);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--ims-primary) 0%, #4f46e5 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
    transition: transform var(--ims-transition-fast), box-shadow var(--ims-transition-fast), filter var(--ims-transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-submit:hover {
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--ims-text-soft);
    font-size: 0.8rem;
    margin: 1.5rem 0;
    gap: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ims-divider);
}

.auth-helper {
    text-align: center;
    color: var(--ims-text-muted);
    font-size: 0.85rem;
}

.auth-creds {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(124, 58, 237, 0.05));
    border: 1px dashed rgba(37, 99, 235, 0.3);
    border-radius: var(--ims-radius);
    color: var(--ims-text-muted);
    font-size: 0.78rem;
    text-align: center;
}

.auth-creds code {
    background: rgba(37, 99, 235, 0.1);
    color: var(--ims-primary-dark);
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    font-weight: 600;
}

/* Branded footer line shown directly below the Sign-in button. */
.auth-version-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
    font-size: 0.78rem;
    color: var(--ims-text-soft);
    letter-spacing: 0.01em;
}

.auth-version {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: #4f46e5;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.auth-version-sep {
    color: #cbd5e1;
}

.auth-version-by strong {
    color: var(--ims-text-strong, #0f172a);
    font-weight: 600;
}

/* ----------------------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-brand-panel {
        display: none;
    }
    .auth-form-panel {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--ims-radius);
    }
    .auth-card-title {
        font-size: 1.4rem;
    }
}
