/* =====================================================================
   Sign-in pages (admin + branch). Loaded after premium.css.
   Markup ids and form field names are unchanged.
   ===================================================================== */

body.pm-auth-body { background: #fff !important; }

.pm-auth { display: flex; min-height: 100vh; }

/* ---- Brand panel ----------------------------------------------------- */
.pm-auth__brand {
    position: relative;
    flex: 1 1 52%;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 56px;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 100% 0%, rgba(226, 61, 61, .38), transparent 62%),
        radial-gradient(700px 480px at 0% 100%, rgba(224, 178, 92, .14), transparent 60%),
        linear-gradient(160deg, #3B111A 0%, #2A0B12 55%, #1E070C 100%);
}
.pm-auth__brand::before, .pm-auth__brand::after {
    content: ""; position: absolute; border-radius: 50%;
    border: 1px solid rgba(224, 178, 92, .22); pointer-events: none;
}
.pm-auth__brand::before { width: 520px; height: 520px; inset-inline-end: -180px; top: -160px; }
.pm-auth__brand::after { width: 340px; height: 340px; inset-inline-start: -120px; bottom: -120px; }

.pm-auth__logo {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; justify-content: center;
    height: 64px; min-width: 64px; padding: 10px 16px;
    background: #fff; border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}
.pm-auth__logo img { max-height: 44px; max-width: 200px; object-fit: contain; }

.pm-auth__pitch { position: relative; z-index: 1; max-width: 460px; }
.pm-auth__pitch h1 {
    color: #fff; font-size: 2.5rem; line-height: 1.2; font-weight: 700; margin: 0 0 14px; letter-spacing: -.02em;
}
.pm-auth__pitch p { color: rgba(255, 255, 255, .86); font-size: 1rem; line-height: 1.7; margin: 0; }

.pm-auth__features { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.pm-auth__features span {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    font-size: .8125rem; font-weight: 500;
}
.pm-auth__features i { font-size: 1rem; }

/* ---- Form side -------------------------------------------------------- */
.pm-auth__panel {
    flex: 1 1 48%;
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
    background: #fff;
}
.pm-auth__form { width: 100%; max-width: 420px; }

.pm-auth__mobile-logo { display: none; margin-bottom: 28px; }
.pm-auth__mobile-logo img { max-height: 44px; max-width: 180px; object-fit: contain; }

.pm-auth__title { font-size: 1.875rem; font-weight: 700; color: var(--pm-ink, #1A1D29); margin: 0 0 6px; letter-spacing: -.02em; }
.pm-auth__subtitle { color: var(--pm-muted, #667085); margin: 0 0 20px; font-size: .9375rem; }

.pm-auth__switch {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; margin-bottom: 26px;
    background: var(--pm-subtle, #F9FAFB); border: 1px solid var(--pm-border, #EAECF0); border-radius: 12px;
    font-size: .8125rem; color: var(--pm-muted, #667085);
}
.pm-auth__switch .pm-auth__role { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--pm-text, #344054); }
.pm-auth__switch .pm-auth__role i { color: var(--brand-primary); font-size: 1.1rem; }
.pm-auth__switch a { font-weight: 700; color: var(--brand-primary); white-space: nowrap; }
.pm-auth__switch a:hover { color: var(--brand-primary-dark); text-decoration: none; }

.pm-auth .form-group { margin-bottom: 1.1rem; }
.pm-auth .input-label { margin-bottom: .45rem; }
.pm-auth .form-control-lg { font-size: .9375rem; }
.pm-auth .input-group-merge .input-group-append .input-group-text { background: transparent !important; border: 0 !important; }

/* Captcha row */
.pm-auth .pm-captcha { display: flex; gap: 10px; align-items: stretch; margin: 0 0 1.25rem !important; padding: 0 !important; }
.pm-auth .pm-captcha > div { flex: 1 1 50%; max-width: none; padding: 0 !important; }
.pm-auth .pm-captcha .input-icons {
    position: relative; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--pm-border-strong, #D0D5DD); border-radius: 10px !important; overflow: hidden; min-height: 48px;
}
.pm-auth .pm-captcha .re-captcha { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; cursor: pointer; }
.pm-auth .pm-captcha .default-recaptcha { max-height: 46px; width: auto; max-width: 100%; }
.pm-auth .pm-captcha .tio-refresh {
    position: absolute; inset-inline-end: 6px; top: 6px;
    width: 26px; height: 26px; display: grid; place-items: center;
    border-radius: 8px; background: rgba(255, 255, 255, .9); color: var(--brand-primary);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

.pm-auth #signInBtn { height: 50px !important; font-size: 1rem; border-radius: 12px !important; }

.pm-auth__foot { margin-top: 28px; text-align: center; color: var(--pm-muted, #667085); font-size: .75rem; }
.pm-auth__foot i { color: var(--pm-success, #079455); }

.pm-auth__demo { margin-top: 22px; padding: 14px; border: 1px dashed var(--pm-border-strong, #D0D5DD); border-radius: 12px; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 991.98px) {
    .pm-auth__brand { display: none; }
    .pm-auth__mobile-logo { display: block; }
    .pm-auth__panel { align-items: flex-start; padding-top: 56px; }
}

[dir="rtl"] .pm-auth__title, [dir="rtl"] .pm-auth__pitch h1 { letter-spacing: 0; }

/* ---- Neutralise the old template's auth rules ------------------------- */
.pm-auth.auth-wrapper { flex-wrap: nowrap; }
.pm-auth .auth-wrapper-left.pm-auth__brand { width: auto; flex-wrap: nowrap; align-items: flex-start; justify-content: space-between; background-repeat: no-repeat; background-size: auto; }
.pm-auth .auth-wrapper-right.pm-auth__panel { max-width: none; min-height: 100vh; flex-wrap: nowrap; }
.pm-auth .auth-wrapper-right .auth-wrapper-form { transform: none !important; max-width: 420px; }
.pm-auth .auth-wrapper-right .auth-header { margin-bottom: 0 !important; font-size: inherit !important; color: inherit; font-weight: 400; line-height: 1.5; }
.pm-auth .auth-wrapper-right .auth-header .title { font-size: 1.875rem !important; margin-bottom: 6px !important; text-transform: none; }
.pm-auth .auth-wrapper-right .auth-header a { text-decoration: none; }

/* ---- Identity on the sign-in page ------------------------------------- */
.pm-auth__seal-row { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 14px; }
.pm-brand__seal--lg { width: 56px !important; height: 56px !important; min-width: 56px !important; max-width: 56px !important; border-radius: 16px; font-size: 1.5rem; }
.pm-auth__brand-name { color: #fff; font-size: 1.25rem; font-weight: 700; }
.pm-auth__pitch h1 { color: #fff; }
.pm-auth__pitch p { color: rgba(255, 240, 234, .78); }
.pm-auth__features span { background: rgba(255, 255, 255, .07); border-color: rgba(224, 178, 92, .28); color: rgba(255, 240, 234, .9); }
.pm-auth__features i { color: #E0B25C; }
.pm-auth__mobile-logo .pm-brand__seal { width: 48px; height: 48px; }
.pm-auth .pm-captcha { flex-wrap: nowrap !important; }
.pm-auth .input-group-merge .form-control { border-radius: 10px !important; border-width: 1px !important; }
.pm-auth .input-group-merge { position: relative; flex-wrap: nowrap; }
.pm-auth .input-group-merge .form-control { padding-inline-end: 46px; }
.pm-auth .input-group-merge .input-group-append { position: absolute; inset-block: 0; inset-inline-end: 0; z-index: 4; margin: 0 !important; }
.pm-auth .input-group-merge .input-group-append .input-group-text { height: 100%; padding-inline: 14px !important; }
