/* =========================================================
   LOGIN PAGE
   File: static/css/pages/login.css

   Depends on:
   - style-oiio-main.css
   - body.login-layout class from base.html
========================================================= */

/* =========================
   LOGIN PAGE LAYOUT
========================= */

.login-page {
    min-height: 100dvh;
    width: 100%;

    display: grid;
    place-items: center;

    padding: clamp(18px, 4vw, 42px);

    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.16), transparent 24%),
        radial-gradient(circle at 82% 12%, rgba(7, 23, 42, 0.22), transparent 30%),
        linear-gradient(135deg, var(--brand), #4fc0ba 48%, #7ddbd5 100%);
}

/* =========================
   LOGIN CARD
========================= */

.login-card {
    position: relative;
    overflow: hidden;

    width: min(100%, 760px);
    min-height: min(820px, calc(100dvh - 56px));

    display: grid;
    grid-template-rows: 1fr auto;
    align-content: start;

    padding: clamp(28px, 5vw, 52px);

    /* asymmetric premium shape, inspired by old version */
    border-radius: 175px 28px 28px 28px;

    color: #ffffff;

    background: linear-gradient(145deg, #02070d 0%, var(--navy-950) 52%, #000000 100%);

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 28px 70px rgba(7, 23, 42, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* subtle premium corner accent, not a blob */
.login-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;

    background: linear-gradient(135deg, rgba(89, 196, 190, 0.14) 0%, rgba(89, 196, 190, 0.05) 16%, transparent 28%);

    opacity: 0.85;
}

/* =========================
   LOGIN CONTENT
========================= */

.login-card__top {
    position: relative;
    z-index: 1;

    display: grid;
    justify-items: center;
    align-content: start;

    padding-top: clamp(8px, 3vw, 24px);
}

.login-logo {
    width: 104px;
    height: 104px;

    display: grid;
    place-items: center;

    margin-bottom: 30px;
}

.login-logo img {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.login-title {
    max-width: 620px;
    text-align: center;
}

.login-title span {
    display: inline-block;
    margin-bottom: 8px;

    color: var(--brand);
    font-family: "Galyon Regular", "Figtree", sans-serif;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1;
}

.login-title h1 {
    margin: 0;

    color: #ffffff;
    font-size: clamp(25px, 4vw, 40px);
    line-height: 1.06;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.login-title p {
    width: min(100%, 520px);
    margin: 14px auto 0;

    color: rgba(255, 255, 255, 0.64);
    font-size: 14px;
    line-height: 1.45;
}

/* =========================
   FORM
========================= */

.login-form {
    position: relative;
    z-index: 1;

    width: min(100%, 320px);
    margin: 34px auto 0;

    display: grid;
    gap: 12px;
}

.login-form-group {
    margin: 0;
}

.login-input {
    width: 100%;
    height: 46px;

    padding: 0 15px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.16);

    font-size: 15px;
    font-weight: 700;

    outline: none;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.login-input:focus {
    border-color: rgba(89, 196, 190, 0.72);
    background: rgba(255, 255, 255, 0.12);

    box-shadow:
        0 0 0 4px rgba(89, 196, 190, 0.14),
        0 14px 34px rgba(0, 0, 0, 0.2);
}

.login-submit {
    width: 100%;
    height: 46px;

    border: 0;
    border-radius: 14px;

    color: var(--navy-950);
    background: linear-gradient(135deg, #7ee2dc, var(--brand));

    box-shadow:
        0 16px 34px rgba(89, 196, 190, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);

    font-size: 15px;
    font-weight: 900;
    line-height: 1;

    cursor: pointer;

    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        filter 0.16s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);

    box-shadow:
        0 18px 42px rgba(89, 196, 190, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

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

/* =========================
   FOOTER
========================= */

.login-footer {
    position: relative;
    z-index: 1;

    align-self: end;
    margin-top: 48px;

    display: grid;
    justify-items: center;
    gap: 8px;

    text-align: center;
}

.login-footer__copy {
    display: grid;
    gap: 2px;
}

.login-footer__copy p {
    margin: 0;

    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
    line-height: 1.25;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-footer__powered {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    color: rgba(255, 255, 255, 0.6);
    font-size: 9px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-footer__powered img {
    width: 45px;
    height: 35px;
    object-fit: contain;
}

/* =========================
   SPLASH
========================= */

.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 3000;

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

    background: var(--navy-950);
}

.splash-logo {
    width: 120px;
    height: 120px;

    display: grid;
    place-items: center;

    animation: splashShrinkFade 1.8s ease forwards;
}

.splash-logo img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

@keyframes splashShrinkFade {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    72% {
        transform: scale(0.86);
        opacity: 1;
    }

    100% {
        transform: scale(0.72);
        opacity: 0;
        visibility: hidden;
    }
}

/* =========================
   LOGIN MODAL
========================= */

.oiio-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;

    display: grid;
    place-items: center;

    padding: 18px;
    background: rgba(5, 17, 31, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.oiio-modal__dialog {
    width: min(100%, 420px);
}

.oiio-modal__content {
    position: relative;

    padding: 22px;
    border-radius: 20px;

    color: var(--text);
    background: #ffffff;
    box-shadow: var(--shadow-panel);
}

.oiio-modal__content h4 {
    margin: 0 0 8px;

    color: var(--navy-900);
    font-size: 20px;
    font-weight: 900;
}

.oiio-modal__content p {
    margin: 0;
    color: var(--muted);
}

.oiio-modal__content .errors {
    margin-top: 12px;
    margin-bottom: 0;
}

.oiio-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;

    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 999px;

    color: var(--navy-900);
    background: rgba(7, 23, 42, 0.06);

    font-size: 22px;
    line-height: 1;
}

.oiio-modal__close:hover {
    background: rgba(7, 23, 42, 0.1);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 575.98px) {
    .login-page {
        padding: 14px;
        align-items: stretch;
    }

    .login-card {
        min-height: calc(100dvh - 28px);
        width: 100%;

        padding: 26px 18px 18px;
        border-radius: 115px 24px 24px 24px;
    }

    .login-card::after {
        background: linear-gradient(135deg, rgba(89, 196, 190, 0.12) 0%, rgba(89, 196, 190, 0.04) 18%, transparent 32%);
    }

    .login-logo {
        width: 86px;
        height: 86px;
        margin-bottom: 24px;
    }

    .login-logo img {
        width: 78px;
        height: 78px;
    }

    .login-title span {
        font-size: 26px;
    }

    .login-title h1 {
        font-size: 26px;
    }

    .login-title p {
        font-size: 12px;
    }

    .login-form {
        width: 100%;
        margin-top: 28px;
    }

    .login-input,
    .login-submit {
        height: 44px;
        border-radius: 13px;
    }

    .login-footer {
        margin-top: 34px;
    }

    .login-footer__copy p {
        font-size: 8.5px;
    }

    .login-footer__powered {
        font-size: 8px;
    }

    .login-footer__powered img {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 22px 14px 16px;
        border-radius: 110px 22px 22px 22px;
    }

    .login-title h1 {
        font-size: 23px;
    }

    .login-title p {
        font-size: 11px;
    }
}

/* =========================================================
   LOGIN OFFSET RESET
   Login page uses base.html but has no sidebar / header nav.
   This must stay at bottom to override _header-base.css.
========================================================= */

body.login-layout {
    min-height: 100dvh;
    overflow-x: hidden;
}

/* reset every possible app-shell offset */
body.login-layout main,
body.login-layout .wrapper__base,
body.login-layout .main-content,
body.login-layout .main-content-dashboard,
body.login-layout .page-content,
body.login-layout .container-page,
body.login-layout #main-area,
body.login-layout #wrapperLogin,
body.login-layout .login-page {
    width: 100% !important;
    max-width: none;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* login should not reserve space for dashboard sidebar */
body.login-layout .main-content,
body.login-layout .main-content-dashboard,
body.login-layout .page-content,
body.login-layout #main-area {
    padding-left: 0 !important;
}

/* footer is hidden on login, but reset just in case */
body.login-layout .footer-dashboard {
    width: 100% !important;
    margin-left: 0 !important;
}

/* no header/sidebar on login */
body.login-layout .header-base,
body.login-layout .header-mobile,
body.login-layout .nav__base {
    display: none !important;
}
