/* =========================================================
   Shared authentication styles for Oracle APEX
   ========================================================= */

:root {
    --auth-primary: #2563eb;
    --auth-primary-soft: #eaf2ff;
    --auth-primary-hover: #dbeafe;
    --auth-heading: #172554;
    --auth-muted: #6b7280;
    --auth-border: #d1d5db;
    --auth-surface: #fff;
    --auth-banner: linear-gradient(145deg, #20c4b5, #14aa9f);
    --auth-radius: 12px;
}


/* =========================================================
   APEX Grid
   ========================================================= */

.login-wrapper .col,
.login-wrapper [class*="col-"],
.login-wrapper .t-Grid-col {
    padding-inline: 0 !important;
}

.login-wrapper .t-Grid-row {
    gap: 0 !important;
}


/* =========================================================
   Login Panel
   ========================================================= */

.login-panel {
    width: 100%;
    min-height: 0;
    height: 660px;
    margin: 0 !important;
}


/* =========================================================
   Login Page Background
   ========================================================= */

body.login-page {
    background:
        linear-gradient(
            rgb(255 255 255 / 28%),
            rgb(255 255 255 / 28%)
        ),
        url(&IMG./bg04.png) center / cover no-repeat;
}


/* =========================================================
   Login Form
   ========================================================= */

.login-panel--form {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    width: 100%;
    min-height: 0;
    height: 660px;

    margin: 0 !important;
    padding: 20px 55px;

    background: var(--auth-surface);

    border-radius: 0 20px 20px 0;

    box-shadow: 0 12px 35px rgb(0 0 0 / 8%);
}


.login-panel--form .t-Form-label {
    color: #374151;
}


.login-panel--form input {
    background: #fff;

    transition:
        border-color 200ms ease,
        box-shadow 200ms ease,
        background-color 200ms ease;
}


.login-panel--form input:focus {
    background: #f8fbff;

    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgb(37 99 235 / 12%);
}


.login-panel--form a {
    color: #475569;

    font-size: 12px;

    text-decoration: none;
}


.login-panel--form a:hover {
    color: #2563eb;

    text-decoration: underline;
}


.login-panel--form h1,
.login-panel--form h2,
.login-panel--form p {
    width: 100%;

    text-align: center !important;
}


.login-panel--form h1 {
    margin-bottom: 12px;
}


.login-panel--form p {
    margin-bottom: 35px;
}


/* =========================================================
   Login Logo
   ========================================================= */

.login-logo img,
.login-panel--form img.logo {
    display: block;

    width: 240px;
    max-width: 240px;

    height: auto;
    max-height: 185px;

    object-fit: contain;

    margin: -12px auto 12px;
}


/* =========================================================
   System Name
   ========================================================= */

.system-name {
    margin-bottom: 30px;

    font-size: 20px;
    font-weight: 600;

    text-align: center;
}


/* =========================================================
   Login Banner
   ========================================================= */

.login-banner {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    color: #fff;

    text-align: center;
}


/* =========================================================
   Visual Panel
   ========================================================= */

.login-panel--visual {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 0;
    height: 660px;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden;

    text-align: center;

    background: #fff;

    border-radius: 20px 0 0 20px;
}


/* =========================================================
   Login Slider
   ========================================================= */

.login-panel--visual .login-banner {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;
}


.login-panel--visual .login-slider {
    position: relative;

    width: 100%;
    max-width: none;

    height: 100%;

    overflow: hidden;

    background: #fff;

    border-radius: 0;
}


/* =========================================================
   Slider Images
   ========================================================= */

.login-panel--visual .login-slide {
    position: absolute;

    inset: 0;

    display: block;

    width: 100% !important;
    max-width: none !important;

    height: 100%;

    object-fit: contain;
    object-position: center;

    opacity: 0;
    visibility: hidden;

    z-index: 0;

    transition:
        opacity 700ms ease,
        visibility 0s linear 700ms;
}


/* Active Slide */

.login-panel--visual .login-slide.is-active {
    opacity: 1;

    visibility: visible;

    z-index: 1;

    transition:
        opacity 700ms ease,
        visibility 0s;
}


/* =========================================================
   Slider Dots
   ========================================================= */

.login-slider-dots {
    position: absolute;

    right: 0;
    bottom: 18px;
    left: 0;

    z-index: 10;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    direction: ltr;
}


.login-slider-dot {
    width: 8px;
    height: 8px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgb(0 0 0 / 25%);

    cursor: pointer;

    transition:
        width 250ms ease,
        background-color 250ms ease;
}


.login-slider-dot:hover {
    background: rgb(37 99 235 / 60%);
}


.login-slider-dot.is-active {
    width: 24px;

    border-radius: 10px;

    background: var(--auth-primary);
}


/* =========================================================
   Dialogs
   ========================================================= */

.otp-dialog .ui-dialog-titlebar {
    display: none !important;
}


.otp-dialog.ui-dialog,
.otp-dialog .ui-dialog {
    padding-top: 0 !important;
}


.otp-dialog .t-ButtonRegion {
    margin-top: 20px;
}


/* =========================================================
   OTP
   ========================================================= */

.otp-box {
    width: 100%;

    text-align: center;
}


.otp-icon {
    width: 72px;
    height: 72px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 0 auto !important;

    background: var(--auth-primary-soft);

    border-radius: 50%;
}


.otp-box h2 {
    margin-top: 18px;

    font-size: 20px;

    color: var(--auth-heading);
}


.otp-box--large h2 {
    margin-top: 20px;

    font-size: 26px;
}


.otp-box p,
.timer {
    color: var(--auth-muted);
}


/* =========================================================
   OTP Inputs
   ========================================================= */

.otp-inputs {
    display: flex;

    justify-content: center;

    gap: 10px;

    margin: 30px 0;

    direction: ltr;
}


.otp-inputs input {
    width: 45px;
    height: 50px;

    border: 1px solid var(--auth-border);

    border-radius: var(--auth-radius);

    font-size: 22px;

    text-align: center;
}


.otp-inputs input:focus {
    border: 2px solid var(--auth-primary);

    outline: none;
}


/* =========================================================
   Timer
   ========================================================= */

.timer {
    margin-bottom: 25px;
}


.timer span {
    color: var(--auth-primary);
}


/* =========================================================
   Buttons
   ========================================================= */

.auth-btn,
.otp-btn,
.login-btn {
    width: 100% !important;

    border: 0 !important;

    border-radius: var(--auth-radius) !important;
}


.otp-btn {
    height: 50px;

    background: var(--auth-primary);

    color: #fff;

    font-size: 18px;
}


.otp-btn--compact {
    height: 40px;

    font-size: 14px;
}


.login-btn {
    height: 46px !important;

    margin-top: 20px;

    font-size: 14px !important;
    font-weight: 600 !important;

    box-shadow:
        0 8px 20px rgb(37 99 235 / 18%);
}


/* =========================================================
   Links
   ========================================================= */

.link-btn,
.change-number {
    display: block;

    margin: 25px auto 0;

    color: var(--auth-primary);

    cursor: pointer;
}


.link-btn {
    background: transparent !important;

    border: 0 !important;

    box-shadow: none !important;
}


.change-number--compact {
    margin-top: 18px;
}


.t-Button .t-Icon {
    margin-right: 6px;
    margin-left: 0;
}


/* =========================================================
   Register Link
   ========================================================= */

.register-link {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 5px;

    margin-top: 10px;

    color: #64748b;

    font-size: 12px;
}


.register-link a {
    color: #24789b;

    font-weight: 700;

    text-decoration: none;
}


.register-link a:hover {
    color: #1d4ed8;

    text-decoration: underline;
}


/* =========================================================
   Captcha
   ========================================================= */

.captcha-wrapper {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    direction: ltr;
}


.captcha-image {
    width: 240px;
    height: 60px;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: var(--auth-surface);

    border: 1px solid var(--auth-border);

    border-radius: var(--auth-radius);
}


.captcha-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: fill;
}


.captcha-image--compact {
    width: 160px;
    height: 50px;
}


.captcha-image--compact img {
    object-fit: contain;
}


.captcha-refresh {
    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: var(--auth-primary);

    background: var(--auth-primary-soft);

    border: 0;

    border-radius: 50%;

    cursor: pointer;

    font-size: 18px;
}


.captcha-refresh:hover {
    background: var(--auth-primary-hover);
}


/* =========================================================
   Responsive - Tablet
   ========================================================= */

@media (max-width: 900px) {

    .login-wrapper .row {
        display: block;
    }


    .login-panel,
    .login-panel--form {
        min-height: 0;

        height: auto;
    }


    .login-panel--visual {
        border-radius: 20px 20px 0 0;
    }


    .login-panel--form {
        border-radius: 0 0 20px 20px;
    }
}


/*
   Visual panel ratio for tablet.
   Keeps slider proportions stable.
*/

@media (min-width: 601px) and (max-width: 900px) {

    .login-panel--visual {
        height: auto;

        aspect-ratio: 312 / 620;
    }
}


/* =========================================================
   Responsive - Mobile
   ========================================================= */

@media (max-width: 600px) {

    .login-panel--visual {
        display: none;
    }


    .login-panel--form {
        height: auto;

        padding: 32px 24px;

        border-radius: 20px;
    }


    .login-panel {
        height: auto;
    }
}


/* =========================================================
   Accessibility
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .login-panel--visual .login-slide {
        transition: none;
    }


    .login-slider-dot {
        transition: none;
    }
}