/* ==========================================================================
   Auth / Login page only.
   Every rule is scoped under .ptg-login-page (or the login body classes),
   so nothing here can leak into the authenticated shell.
   The layout reproduces the supplied reference: one centered rounded white
   card, 41% artwork column + 59% form column.
   ========================================================================== */

body.controller-auth.action-login {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    background: #ececee;
}

body.controller-auth.action-login .boltz-public-shell {
    display: block;
    min-height: 100vh;
}

.ptg-login-page,
.ptg-login-page *,
.ptg-login-page *::before,
.ptg-login-page *::after {
    box-sizing: border-box;
}

.ptg-login-page {
    --lg-page-bg: #ececee;
    --lg-card-bg: #ffffff;
    --lg-art-bg: #f4f4f4;
    --lg-form-bg: #fafafa;
    --lg-heading: #1b333f;
    --lg-muted: #63707a;
    --lg-field-bg: #edf1f1;
    --lg-field-label: #6d7a80;
    --lg-field-text: #1b333f;
    --lg-accent: #d9605c;
    --lg-accent-hover: #cc514d;
    --lg-link: #c0504c;

    display: block;
    min-height: 100svh;
    padding: 18px;
    direction: ltr;
    text-align: left;
    color: var(--lg-heading);
    background: var(--lg-page-bg);
    font-family: "Poppins", "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ----- Card ------------------------------------------------------------- */
.ptg-login-card {
    display: grid;
    grid-template-columns: 41% 59%;
    width: 100%;
    min-height: calc(100svh - 36px);
    overflow: hidden;
    border-radius: 26px;
    background: var(--lg-card-bg);
}

/* ----- Artwork column --------------------------------------------------- */
.ptg-login-art {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: var(--lg-art-bg);
    user-select: none;
}

.ptg-login-brand {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin: 0;
    padding: 42px 0 0 52px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1;
    color: #1c1f24;
}

.ptg-login-brand b {
    font-weight: 700;
    color: var(--lg-accent);
}

/* Abstract artwork. The source JPEG has a white ground, so it is blended with
   the panel instead of being masked. */
.ptg-login-ribbon {
    position: absolute;
    left: -10%;
    bottom: -26%;
    z-index: 1;
    width: 118%;
    height: auto;
    mix-blend-mode: multiply;
    pointer-events: none;
}

/* ----- Form column ------------------------------------------------------ */
.ptg-login-panel {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0 6% 0 15.7%;
    background: var(--lg-form-bg);
}

.ptg-login-form {
    width: min(100%, 372px);
    direction: ltr;
    text-align: left;
}

/* Heading block: title on its own line with the one-line subtitle under it,
   both centered over the left-aligned fields. */
.ptg-login-heading {
    text-align: center;
}

.ptg-login-heading .ptg-login-subtitle {
    margin-top: 6px;
}

.ptg-login-title {
    margin: 0;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.34;
    letter-spacing: -.005em;
    color: var(--lg-heading);
}

.ptg-login-subtitle {
    margin: 0;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--lg-muted);
}

.ptg-login-alert {
    margin: 22px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #b3312c;
}

.ptg-login-alert:empty,
.ptg-login-alert.validation-summary-valid {
    display: none;
}

.ptg-login-alert ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ptg-login-fields {
    margin-top: 40px;
    display: grid;
    gap: 11px;
}

/* Floating-label field: label sits centered while empty, lifts when filled. */
.ptg-login-field {
    position: relative;
}

.ptg-login-input {
    display: block;
    width: 100%;
    height: 53px;
    margin: 0;
    padding: 20px 18px 6px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: var(--lg-field-bg);
    font: inherit;
    font-size: 14.5px;
    line-height: 1.4;
    color: var(--lg-field-text);
    appearance: none;
    transition: background-color .18s ease, border-color .18s ease;
}

.ptg-login-input::placeholder {
    color: transparent;
}

.ptg-login-input:hover {
    background: #e7ecec;
}

.ptg-login-input:focus {
    outline: none;
    border-color: #cfdada;
    background: #eaf0f0;
}

.ptg-login-input:-webkit-autofill,
.ptg-login-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--lg-field-text);
    -webkit-box-shadow: 0 0 0 40px #edf1f1 inset;
}

.ptg-login-label {
    position: absolute;
    top: 9px;
    left: 19px;
    margin: 0;
    font-size: 11px;
    line-height: 1;
    color: var(--lg-field-label);
    pointer-events: none;
    transition: top .16s ease, font-size .16s ease;
}

.ptg-login-input:placeholder-shown:not(:focus) + .ptg-login-label {
    top: 19px;
    font-size: 14.5px;
}

.ptg-login-error {
    display: block;
    margin: 6px 0 0 2px;
    font-size: 12px;
    line-height: 1.5;
    color: #b3312c;
}

.ptg-login-error:empty {
    display: none;
}

/* ----- Remember row ----------------------------------------------------- */
.ptg-login-remember {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 30px;
    font-size: 14px;
    color: #33454e;
    cursor: pointer;
}

.ptg-login-remember input[type="checkbox"] {
    width: 19px;
    height: 19px;
    margin: 0;
    border: 1.5px solid #d3dadd;
    border-radius: 5px;
    background: #ffffff;
    appearance: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.ptg-login-remember input[type="checkbox"]:checked {
    border-color: var(--lg-accent);
    background: var(--lg-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5 6.4 12 13 4.6'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

.ptg-login-remember input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--lg-accent);
    outline-offset: 2px;
}

/* ----- Submit ----------------------------------------------------------- */
.ptg-login-submit {
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 36px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: var(--lg-accent);
    font: inherit;
    font-size: 14.5px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    transition: background-color .16s ease;
}

.ptg-login-submit:hover {
    background: var(--lg-accent-hover);
}

.ptg-login-submit:focus-visible {
    outline: 2px solid var(--lg-accent);
    outline-offset: 3px;
}

.ptg-login-submit[disabled] {
    opacity: .7;
    cursor: default;
}

.ptg-login-help {
    display: inline-block;
    margin-top: 28px;
    font-size: 13px;
    color: var(--lg-link);
    text-decoration: underline;
    text-underline-offset: 3px;
    background: none;
    border: 0;
    padding: 0;
    cursor: default;
}

/* ----- Responsive ------------------------------------------------------- */
@media (max-width: 1100px) {
    .ptg-login-panel {
        padding: 0 6% 0 11%;
    }
}

@media (max-width: 900px) {
    .ptg-login-page {
        padding: 12px;
    }

    .ptg-login-card {
        min-height: calc(100svh - 24px);
        border-radius: 20px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .ptg-login-art {
        min-height: 250px;
    }

    .ptg-login-ribbon {
        width: 78%;
        left: 4%;
    }

    .ptg-login-panel {
        padding: 42px 26px 46px;
        justify-content: center;
    }

    .ptg-login-form {
        width: min(100%, 400px);
    }
}

@media (max-width: 520px) {
    .ptg-login-art {
        min-height: 190px;
    }

    .ptg-login-title {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ptg-login-page * {
        transition: none;
    }
}
