/* =========================================================
   Shiv27 Child — login (login.tpl) and sign-up (clientregister.tpl) pages. 27 Nov 2026.
   Also the password reset pages (password-reset-*.tpl, 27 Nov 2026) — they reuse the login frame.
   Linked by those templates only (?v= in login.tpl, clientregister.tpl and password-reset-container.tpl;
   bump it in all three when this file changes).
   1.2.0 (27 Nov 2026): sign-up page in the login frame (two columns), Google button area.
   Colours come from the theme variables in custom.css; dark mode swaps those variables
   (css/dark.css, html[data-theme="dark"]), so most of the dark look follows by itself —
   the few fixed colours are set again at the end of this file.
   ========================================================= */

.ph-auth { --pa-radius: 18px; --pa-line: var(--border, #e2e8f0); --pa-surface: var(--bg, #fff); --pa-ring: 0 0 0 4px rgba(3, 93, 237, 0.12); }

/* ---------- shared pieces ---------- */
.ph-auth-kicker { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.ph-auth-points { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.ph-auth-points li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(255, 255, 255, 0.92); }
.ph-auth-points li > span { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 14px; }
.ph-auth-help, body .ph-auth-help { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 9px 16px; border-radius: 999px; background: #fff; color: var(--primary-900, #031974); font-size: 13.5px; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); transition: transform .15s ease, box-shadow .15s ease; }
.ph-auth-help:hover, .ph-auth-help:focus { color: var(--primary-900, #031974); text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2); }
.ph-auth-help .fa-whatsapp { font-size: 18px; }

/* ---------- login ---------- */
.ph-auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); max-width: 980px; margin: 28px auto 48px; border-radius: var(--pa-radius); overflow: hidden; background: var(--pa-surface); border: 1px solid var(--pa-line); box-shadow: 0 18px 50px rgba(3, 25, 116, 0.12); }
.ph-auth-brand { position: relative; overflow: hidden; padding: 44px 40px; color: #fff; background: linear-gradient(150deg, #031974 0%, #0a3fb8 55%, #035ded 100%); display: flex; flex-direction: column; justify-content: center; }
.ph-auth-brand::before { content: ""; position: absolute; right: -90px; top: -120px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); pointer-events: none; }
.ph-auth-brand::after { content: ""; position: absolute; left: -70px; bottom: -130px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); pointer-events: none; }
.ph-auth-brand > * { position: relative; z-index: 1; }
.ph-auth-brand .ph-auth-help { align-self: flex-start; }
.ph-auth-brand-title { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #fff; }
.ph-auth-brand-sub { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }

.ph-auth-card { padding: 40px 44px 0; display: flex; flex-direction: column; min-width: 0; }
.ph-auth-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.ph-auth-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-50, #f4f7ff); color: var(--primary, #035ded); font-size: 19px; }
.ph-auth-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--neutral-900, #0f172a); line-height: 1.2; }
.ph-auth-sub { margin: 3px 0 0; font-size: 14px; color: var(--neutral-500, #64748b); }

.ph-auth-form .form-group { margin-bottom: 18px; }
.ph-auth-label { display: block; margin: 0 0 7px; font-size: 13.5px; font-weight: 600; color: var(--neutral-700, #334155); }
.ph-auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ph-auth-forgot, body .ph-auth-forgot { font-size: 13px; font-weight: 600; color: var(--primary, #035ded); margin-bottom: 7px; }
.ph-auth-forgot:hover { color: var(--primary-700, #004bc3); }

/* one rounded field: icon + input (+ eye button) */
.ph-auth .ph-auth-input { flex-wrap: nowrap; border: 1px solid var(--pa-line); border-radius: 12px; background: var(--pa-surface); transition: border-color .15s ease, box-shadow .15s ease; }
.ph-auth .ph-auth-input:focus-within { border-color: var(--primary-400, #6a9cff); box-shadow: var(--pa-ring); }
.ph-auth .ph-auth-input .input-group-text,
.ph-auth .ph-auth-input .form-control,
.ph-auth .ph-auth-input .btn { height: 48px; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; }
.ph-auth .ph-auth-input .input-group-text { padding: 0 2px 0 15px; color: var(--neutral-400, #94a3b8); }
.ph-auth .ph-auth-input .form-control { padding: 0 12px; font-size: 15px; color: var(--neutral-900, #0f172a); }
.ph-auth .ph-auth-input .form-control::placeholder { color: var(--neutral-400, #94a3b8); }
.ph-auth .ph-auth-input .btn-reveal-pw { padding: 0 15px; color: var(--neutral-400, #94a3b8); }
.ph-auth .ph-auth-input .btn-reveal-pw:hover { color: var(--primary, #035ded); }
.ph-auth .ph-auth-input .input-group-prepend, .ph-auth .ph-auth-input .input-group-append { margin: 0; }

.ph-auth-remember { display: inline-flex; align-items: center; gap: 9px; margin: 2px 0 20px; font-size: 14px; color: var(--neutral-600, #475569); cursor: pointer; user-select: none; }
.ph-auth-remember input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary, #035ded); cursor: pointer; }

.ph-auth-submit { margin: 4px 0 0; }
.ph-auth .ph-auth-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 12px; font-size: 16px; font-weight: 700; box-shadow: 0 8px 20px rgba(3, 93, 237, 0.28); transition: transform .15s ease, box-shadow .15s ease; }
.ph-auth .ph-auth-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(3, 93, 237, 0.34); }
.ph-auth .ph-auth-btn i { font-size: 13px; }
.ph-auth .ph-auth-form .row.justify-content-center { margin: 0 0 12px; }   /* WHMCS's own captcha block, if enabled */

.ph-auth-linked { margin-top: 6px; }
.ph-auth-linked .social-signin-btns { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.ph-auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--neutral-400, #94a3b8); }
.ph-auth-or::before, .ph-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--pa-line); }

.ph-auth-foot { margin: auto -44px 0; padding: 18px 44px; margin-top: 28px; border-top: 1px solid var(--border-muted, #f1f5f9); background: var(--neutral-50, #f8fafc); font-size: 14px; color: var(--neutral-500, #64748b); }
.ph-auth-foot a, body .ph-auth-foot a { margin-left: 4px; font-weight: 700; color: var(--primary, #035ded); white-space: nowrap; }
.ph-auth-foot a i { font-size: 11px; margin-left: 2px; }

@media (max-width: 991.98px) {
    .ph-auth { grid-template-columns: 1fr; max-width: 560px; margin-top: 16px; }
    .ph-auth-brand { padding: 26px 28px; }
    .ph-auth-brand-title { font-size: 24px; }
    .ph-auth-brand .ph-auth-points, .ph-auth-brand .ph-auth-help, .ph-auth-brand .ph-auth-steps { display: none; }
    .ph-auth-card { padding: 30px 28px 0; }
    .ph-auth-foot { margin-left: -28px; margin-right: -28px; padding: 16px 28px; }
}
@media (max-width: 479.98px) {
    .ph-auth { margin: 8px -4px 32px; border-radius: 16px; }
    .ph-auth-brand { padding: 22px 20px; }
    .ph-auth-card { padding: 24px 20px 0; }
    .ph-auth-foot { margin-left: -20px; margin-right: -20px; padding: 16px 20px; }
    .ph-auth-title { font-size: 23px; }
}

/* ---------- password reset (same frame as the login page) ---------- */
.ph-auth-steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.ph-auth-steps li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(255, 255, 255, 0.7); }
.ph-auth-steps li > span { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid rgba(255, 255, 255, 0.35); font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.ph-auth-steps li.is-active { color: #fff; font-weight: 600; }
.ph-auth-steps li.is-active > span { background: #fff; border-color: #fff; color: var(--primary-700, #004bc3); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18); }
.ph-auth-steps li.is-done > span { background: #34d399; border-color: #34d399; color: #052e16; font-size: 12px; }
.ph-auth-steps li.is-done { color: rgba(255, 255, 255, 0.85); }
.ph-auth-reset .ph-auth-card > .alert { border-radius: 12px; font-size: 14px; }
.ph-auth-alt { margin: 8px 0 40px; }
.ph-auth-done { text-align: center; padding: 6px 0 18px; }
.ph-auth-done-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(22, 163, 74, 0.12); color: var(--success, #16a34a); font-size: 26px; }
.ph-auth-done .ph-auth-sub { margin-top: 8px; font-size: 15px; line-height: 1.55; }
/* the strength meter's script marks the field: show it on the rounded box */
.ph-auth .ph-auth-input:has(.is-invalid) { border-color: var(--error, #dc2626); }
.ph-auth .ph-auth-input:has(.is-warning) { border-color: var(--warning, #f59e0b); }
.ph-auth .ph-auth-input:has(.is-valid) { border-color: var(--success, #16a34a); }
.ph-auth .ph-auth-input .form-control.is-invalid, .ph-auth .ph-auth-input .form-control.is-valid, .ph-auth .ph-auth-input .form-control.is-warning { background-image: none; padding-right: 12px; }
.ph-auth-strength > br { display: none; }
.ph-auth-strength .progress { height: 8px; border-radius: 999px; margin-bottom: 12px !important; }
.ph-auth-strength .alert { border-radius: 12px; margin: 0; }
.ph-auth #inputNewPassword2Msg .form-text { margin: 6px 0 0; color: var(--error, #dc2626) !important; font-size: 13px; }
.ph-auth .ph-auth-submit input.ph-auth-btn:disabled { opacity: 0.55; transform: none; box-shadow: none; }
.ph-auth-reset-clear { margin: 6px 0 0; text-align: center; }
.ph-auth-reset-clear .btn-link { font-size: 13.5px; color: var(--neutral-500, #64748b); }

/* ---------- sign-up (same frame as the login page, wider; clientregister.tpl) ---------- */
.ph-auth-signup { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); max-width: 1160px; }
.ph-auth-signup .ph-auth-brand { justify-content: flex-start; }
.ph-auth-brand-inner { position: sticky; top: 110px; display: flex; flex-direction: column; }
.ph-auth-brand-inner .ph-auth-help { align-self: flex-start; }
.ph-auth-signup .ph-auth-card { padding-top: 36px; }
.ph-auth-inline-link, body .ph-auth-inline-link { font-weight: 700; color: var(--primary, #035ded); }
.ph-auth-optional { font-weight: 500; color: var(--neutral-400, #94a3b8); }

.ph-auth-linked-top { margin: 0 0 4px; }
.ph-auth-signup .ph-auth-linked .sub-heading { display: none; }   /* WHMCS's "Sign up with" line: our "or" divider says it */

.ph-auth-signup form { counter-reset: phsignup; }
.ph-signup-sec { padding: 22px 0 6px; border-top: 1px solid var(--border-muted, #f1f5f9); }
.ph-signup-sec:first-child, .ph-auth-or + .ph-signup-sec { border-top: 0; padding-top: 4px; }
.ph-signup-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 16.5px; font-weight: 700; color: var(--neutral-900, #0f172a); }
.ph-signup-title::before { counter-increment: phsignup; content: counter(phsignup); flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--primary-50, #f4f7ff); color: var(--primary, #035ded); font-size: 13px; font-weight: 800; }
.ph-signup-note { margin: -10px 0 14px 38px; font-size: 12.5px; color: var(--neutral-500, #64748b); }
.ph-auth-signup .form-group { margin-bottom: 18px; }

/* fields without an icon box (phone with its flag, custom fields, security question): the same rounded look */
.ph-auth-signup .form-control { height: 48px; border: 1px solid var(--pa-line); border-radius: 12px; font-size: 15px; color: var(--neutral-900, #0f172a); background-color: var(--pa-surface); box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; }
.ph-auth-signup .form-control:focus { border-color: var(--primary-400, #6a9cff); box-shadow: var(--pa-ring); }
.ph-auth-signup .ph-auth-input select.form-control { padding-left: 10px; }
.ph-auth-signup .intl-tel-input { display: block; width: 100%; }
.ph-auth-signup .intl-tel-input .flag-container { border-radius: 12px 0 0 12px; }
.ph-auth-signup .field-help-text { display: block; margin-top: 6px; font-size: 12.5px; color: var(--neutral-500, #64748b); }

.ph-signup-generate, body .ph-signup-generate { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--pa-line); background: var(--pa-surface); font-weight: 600; color: var(--primary-700, #004bc3); }
.ph-signup-generate:hover { background: var(--primary-50, #f4f7ff); }
.ph-auth-signup .password-strength-meter .progress { height: 8px; border-radius: 999px; margin: 6px 0 8px; }
.ph-auth-signup #passwordStrengthTextLabel { margin: 0; }

.ph-signup-optin-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ph-signup-optin-row p { margin: 0; font-size: 14px; color: var(--neutral-600, #475569); }

.ph-signup-finish { margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--border-muted, #f1f5f9); }
.ph-signup-finish > .row.justify-content-center { margin: 0 0 14px; }   /* WHMCS's own captcha block, if enabled */
.ph-reg-tos { margin: 0 0 16px; }
.ph-reg-tos .form-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 0; font-size: 14.5px; color: var(--neutral-700, #334155); cursor: pointer; }
.ph-reg-tos .form-check-input { position: static; flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary, #035ded); }
.ph-reg-tos a { font-weight: 600; }
.ph-reg-submit { margin: 0; }
.ph-reg-submit .btn.ph-auth-btn { width: 100%; height: 52px; font-size: 16.5px; }
.ph-reg-secure { margin: 12px 0 0; text-align: center; font-size: 12.5px; color: var(--neutral-500, #64748b); }
.ph-reg-secure i { color: var(--success, #16a34a); margin-right: 4px; }

@media (max-width: 991.98px) {
    .ph-auth-signup { max-width: 720px; }
    .ph-auth-brand-inner { position: static; }
}
@media (max-width: 575.98px) {
    .ph-signup-note { margin-left: 0; }
    .ph-signup-optin-row { flex-direction: column; align-items: flex-start; }
}

/* ---------- Google sign-in button (drawn by Google; see includes/shiv27-google-button.tpl) ---------- */
.ph-auth .g_id_signin.btn, .ph-auth .g_id_signin { display: flex; justify-content: center; width: 100%; padding: 0; margin: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
.ph-auth .social-signin-btns { text-align: center; }
.ph-auth .social-signin-btns .btn { margin-bottom: 0; }
.ph-auth .g_id_signin iframe { margin: 0 auto !important; }

/* ---------- dark mode: the fixed colours ---------- */
html[data-theme="dark"] .ph-auth { --pa-line: var(--ph-d-line, #24314f); --pa-surface: var(--ph-d-surface, #111a33); --pa-ring: 0 0 0 4px rgba(96, 150, 255, 0.25); }
html[data-theme="dark"] .ph-auth { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
html[data-theme="dark"] .ph-auth-icon { color: var(--ph-d-link, #7fb0ff); }
html[data-theme="dark"] .ph-auth-forgot, html[data-theme="dark"] .ph-auth-foot a, html[data-theme="dark"] .ph-reg-tos a { color: var(--ph-d-link, #7fb0ff); }
html[data-theme="dark"] .ph-auth .ph-auth-input .form-control { color: var(--neutral-900); }
html[data-theme="dark"] .ph-auth-signup .form-control { color: var(--neutral-900); }
html[data-theme="dark"] .ph-auth-inline-link, html[data-theme="dark"] .ph-signup-generate { color: var(--ph-d-link, #7fb0ff); }
html[data-theme="dark"] .ph-signup-title::before { color: var(--ph-d-link, #7fb0ff); }
html[data-theme="dark"] .ph-auth-done-icon { background: rgba(52, 211, 153, 0.15); color: #34d399; }
