:root {
    --hp-teal: #1BA7C8;
    --hp-teal-deep: #0E6F8A;
    --hp-teal-soft: #e6f7fb;
    --hp-ink: #182c39;
    --hp-muted: #5b6b76;
    --hp-line: #dce5ea;
    --hp-bg: #fbfcfe;
    --hp-soft: #f3faf9;
    --hp-card: #ffffff;
    --hp-shadow: 0 18px 40px rgba(24, 44, 57, 0.08);
    --hp-font: "Plus Jakarta Sans", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

body.auth-v2 {
    margin: 0;
    min-height: 100vh;
    font-family: var(--hp-font);
    color: var(--hp-ink);
    background:
        radial-gradient(circle at 12% 10%, rgba(27, 167, 200, 0.16), transparent 42%),
        radial-gradient(circle at 88% 0%, rgba(24, 44, 57, 0.12), transparent 36%),
        linear-gradient(180deg, #f3f9fc, var(--hp-bg));
    -webkit-font-smoothing: antialiased;
}

.auth-v2 .auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-v2 .auth-card {
    width: min(100%, 480px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--hp-line);
    border-radius: 22px;
    box-shadow: var(--hp-shadow);
    padding: 1.75rem;
}

.auth-v2 .auth-card-wide { width: min(100%, 560px); }
.auth-v2 .signup-card { width: min(100%, 640px); }

.auth-v2 .logo-section {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-v2 .logo-image {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    display: block;
}

.auth-v2 .logo-section h1 {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}

.auth-v2 .tagline,
.auth-v2 .form-hint {
    color: var(--hp-muted);
    font-size: 0.92rem;
}

.auth-v2 .auth-form .form-group { margin-bottom: 0.95rem; }

.auth-v2 label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-v2 .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-v2 .input-icon {
    position: absolute;
    inset-inline-start: 0.9rem;
    color: var(--hp-muted);
    pointer-events: none;
}

.auth-v2 input,
.auth-v2 select {
    width: 100%;
    min-height: 46px;
    border: 1.5px solid var(--hp-line);
    border-radius: 12px;
    padding-block: 0.65rem;
    padding-inline-start: 2.5rem;
    padding-inline-end: 0.9rem;
    font: inherit;
    background: #fff;
    color: var(--hp-ink);
}

.auth-v2 select { appearance: none; }

.auth-v2 .input-wrapper:has(.toggle-password) input {
    padding-inline-end: 2.6rem;
}

.auth-v2 input:focus,
.auth-v2 select:focus {
    outline: none;
    border-color: var(--hp-teal);
    box-shadow: 0 0 0 3px rgba(13, 102, 103, 0.15);
}

.auth-v2 .toggle-password {
    position: absolute;
    inset-inline-end: 0.45rem;
    border: 0;
    background: transparent;
    color: var(--hp-muted);
    cursor: pointer;
    padding: 0.45rem;
}

.auth-v2 .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 46px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.auth-v2 .btn-primary {
    background: var(--hp-teal);
    color: #fff;
}
.auth-v2 .btn-primary:hover { background: var(--hp-teal-deep); }
.auth-v2 .btn-secondary {
    background: #fff;
    border-color: var(--hp-line);
    color: var(--hp-ink);
}
.auth-v2 .btn-block { width: 100%; }
.auth-v2 .btn-sm { min-height: 38px; padding: 0.4rem 0.85rem; font-size: 0.86rem; }

.auth-v2 .auth-footer {
    margin-top: 1rem;
    text-align: center;
    color: var(--hp-muted);
}
.auth-v2 .link {
    color: var(--hp-teal);
    font-weight: 700;
    text-decoration: none;
}

.auth-v2 .message-box {
    display: none;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    font-weight: 600;
}
.auth-v2 .message-box.success {
    display: block;
    background: #e8f7ef;
    color: #0E6F8A;
}
.auth-v2 .message-box.error {
    display: block;
    background: #fdecec;
    color: #b42318;
}

.auth-v2 .captcha-box {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin: 1rem 0;
    padding: 0.85rem;
    border-radius: 14px;
    background: var(--hp-soft);
    border: 1px solid var(--hp-line);
}
.auth-v2 .captcha-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: #fff;
}
.auth-v2 .captcha-label { margin: 0 0 0.4rem; font-weight: 700; }
.auth-v2 .required-star { color: #b42318; }
.auth-v2 .inline-error { color: #b42318; }
.auth-v2 .inline-ok { color: #0E6F8A; }
.auth-v2 .hidden-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}
.auth-v2 .checkbox-wrapper {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    font-size: 0.92rem;
}
.auth-v2 .auth-top-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: var(--hp-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.auth-v2 .auth-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}
.auth-v2 .auth-card-top .auth-top-link { margin-bottom: 0; }
.auth-v2 .auth-lang {
    border: 1px solid var(--hp-line);
    background: #fff;
    color: var(--hp-ink);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}
.auth-v2 .auth-lang:hover { border-color: var(--hp-teal); color: var(--hp-teal-deep); }
html.is-rtl body.auth-v2 {
    font-family: "Noto Sans Arabic", "Plus Jakarta Sans", sans-serif;
}
.auth-v2 .auth-top-link:hover { color: var(--hp-teal); }

.auth-v2 .org-mode-box {
    margin: 0 0 1rem;
    padding: 0.85rem 0.9rem 0.95rem;
    border: 1.5px solid var(--hp-line);
    border-radius: 14px;
    background: #fff;
}
.auth-v2 .org-mode-box legend {
    padding: 0 0.4rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--hp-ink);
}
.auth-v2 .org-mode-options {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
}
.auth-v2 .org-mode-option {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.7rem;
    margin: 0;
    padding: 0.7rem 0.8rem;
    border: 1.5px solid var(--hp-line);
    border-radius: 12px;
    background: #f8fbfc;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.auth-v2 .org-mode-option:hover {
    border-color: #b9d5df;
    background: #fff;
}
.auth-v2 .org-mode-option:has(input:checked) {
    border-color: var(--hp-teal);
    background: var(--hp-teal-soft);
    box-shadow: inset 0 0 0 1px rgba(27, 167, 200, 0.18);
}
.auth-v2 .org-mode-option input {
    margin: 0;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--hp-teal);
    flex-shrink: 0;
}
.auth-v2 .org-mode-option-copy {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}
.auth-v2 .org-mode-option-copy strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--hp-ink);
}
.auth-v2 .org-mode-option-copy small {
    display: block;
    color: var(--hp-muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.35;
}
.auth-v2 .org-mode-panel {
    padding-top: 0.15rem;
    border-top: 1px solid var(--hp-line);
}
.auth-v2 .org-mode-panel[hidden] { display: none !important; }
.auth-v2 .org-mode-panel label {
    display: block;
    margin: 0.7rem 0 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.auth-v2 .org-check-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: stretch;
}
.auth-v2 .org-check-row .btn {
    white-space: nowrap;
    min-height: 46px;
    padding-inline: 1rem;
}
.auth-v2 .org-mode-panel .form-hint {
    margin: 0.45rem 0 0;
    min-height: 1.15em;
}
.auth-v2 .signup-success {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}
.auth-v2 .signup-success-icon {
    color: var(--hp-teal);
    font-size: 2.4rem;
    margin-bottom: 0.4rem;
}
.auth-v2 .signup-success h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
}
.auth-v2 .signup-success-meta {
    margin: 1.1rem 0;
    text-align: start;
    display: grid;
    gap: 0.85rem;
}
.auth-v2 .signup-success-meta div {
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--hp-line);
    border-radius: 12px;
    background: #fff;
}
.auth-v2 .signup-success-meta dt {
    margin: 0 0 0.25rem;
    color: var(--hp-muted);
    font-size: 0.82rem;
    font-weight: 600;
}
.auth-v2 .signup-success-meta dd {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-weight: 700;
}
.auth-v2 .signup-success-meta code {
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    color: var(--hp-teal-deep);
}
.auth-v2 .signup-success-note {
    margin: 0 0 1.1rem;
    color: var(--hp-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

@media (max-width: 560px) {
    .auth-v2 .auth-card { padding: 1.25rem; border-radius: 18px; }
    .auth-v2 .captcha-box { flex-direction: column; align-items: stretch; }
    .auth-v2 .org-check-row { grid-template-columns: 1fr; }
}
