/* Native hubz login — glass card + orbs (hubx login.php parity) */
*, *::before, *::after { box-sizing: border-box; }

body {
    padding: 0 !important;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(135deg, #1a3d66 0%, #245a8e 35%, #2d6ba3 50%, #1f507a 75%, #163558 100%);
    background-size: 200% 200%;
    animation: bg-shift 20s ease-in-out infinite;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-family: 'Montserrat', system-ui, sans-serif;
    color: #1e293b;
}

@keyframes bg-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}
body::before {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #4a9eff, transparent 65%);
    top: -80px; right: -40px; opacity: 0.55;
    animation: orb1 12s ease-in-out infinite;
}
body::after {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #7ac4ff, transparent 65%);
    bottom: -30px; left: -20px; opacity: 0.5;
    animation: orb2 16s ease-in-out infinite;
}

@keyframes orb1 {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(80px, 40px) scale(1.15); }
    66%  { transform: translate(-30px, -60px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes orb2 {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(-60px, -50px) scale(1.1); }
    66%  { transform: translate(50px, 30px) scale(0.85); }
    100% { transform: translate(0, 0) scale(1); }
}

#log_element {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    position: relative;
    z-index: 1;
}
#log_element::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    width: 400px; height: 400px;
    background: radial-gradient(circle, #3374c0, transparent 65%);
    top: 50%; left: 50%;
    opacity: 0.4;
    animation: orb3 22s ease-in-out infinite;
}
@keyframes orb3 {
    0%   { transform: translate(-50%, -50%) scale(0.8); }
    33%  { transform: translate(-30%, -60%) scale(1.1); }
    66%  { transform: translate(-70%, -40%) scale(0.9); }
    100% { transform: translate(-50%, -50%) scale(0.8); }
}

.login_container {
    width: 100%;
    max-width: 360px;
    margin: 0 auto 12vh;
    text-align: center;
    padding: 32px 28px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.68);
    backdrop-filter: blur(28px) saturate(1.8);
    -webkit-backdrop-filter: blur(28px) saturate(1.8);
    box-shadow:
        0 8px 40px rgba(0,0,0,0.15),
        0 1px 0 rgba(255,255,255,0.65) inset,
        inset 0 0 80px rgba(255,255,255,0.12);
    position: relative;
    z-index: 2;
}

#logo { margin-bottom: 28px; }
#logo img { display: inline-block; margin-bottom: 10px; }
.logo-h {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #0c2d5a;
    letter-spacing: -0.3px;
}
.logo-s {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.login_container input.login,
.login-select {
    width: 100%;
    padding: 13px 14px;
    margin: 0 0 12px 0;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.55);
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.login_container input.login::placeholder { color: #94a3b8; font-weight: 400; }
.login_container input.login:focus,
.login-select:focus {
    border-color: #1a6fc9;
    box-shadow: 0 0 0 3px rgba(26,111,201,0.1);
    background: rgba(255,255,255,0.75);
    outline: none;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.55);
    color: #0c4d8b;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.01em;
}
.login-submit:hover:not(:disabled) {
    background: rgba(255,255,255,0.8);
    border-color: #1a6fc9;
    box-shadow: 0 2px 8px rgba(12,77,139,0.1);
}
.login-submit:disabled { opacity: 0.45; cursor: not-allowed; }

span.first_time {
    font-size: 12px;
    color: #64748b;
    display: inline-block;
    margin-top: 12px;
}
span.first_time a,
#create_account_link {
    color: #1a6fc9;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
span.first_time a:hover { text-decoration: underline; }

.fail {
    color: #be123c;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.45;
}
.fail-link, .fail a { color: #1a6fc9; }

.auth-pane.is-hidden { display: none !important; }

/* OTP */
.verify_lead {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 18px;
}
.verify_lead strong { color: #0c2d5a; font-weight: 600; }

.otp-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 0 16px;
}
.otp-box {
    flex: 0 0 42px;
    width: 42px !important;
    height: 52px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: 'Roboto Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
    font-size: 21px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    caret-color: #1a6fc9;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 2px 6px -2px rgba(15, 23, 42, 0.08);
}
.otp-box::placeholder { color: transparent; }
.otp-box:focus {
    border-color: #1a6fc9 !important;
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        0 0 0 3px rgba(26, 111, 201, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 4px 10px -3px rgba(26, 111, 201, 0.18);
    transform: translateY(-1px);
}
.otp-box:not(:placeholder-shown) {
    border-color: rgba(26, 111, 201, 0.32) !important;
    background: rgba(232, 242, 254, 0.62);
    color: #0c2d5a;
}

.verify-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 200px;
    padding: 11px 18px;
    border-radius: 8px;
    border: 1.5px solid #0c4d8b;
    background: #0c4d8b;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.12s ease;
    margin-top: 6px;
    box-shadow: 0 4px 14px -6px rgba(12, 77, 139, 0.55);
}
.verify-submit:disabled {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}
.verify-submit:hover:not(:disabled) {
    background: #0a3f72;
    border-color: #0a3f72;
    transform: translateY(-1px);
}

.verify-meta {
    margin-top: 14px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
}
.verify-back {
    color: #64748b;
    text-decoration: none;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 1px;
}
.verify-back:hover { color: #0c4d8b; border-bottom-color: #0c4d8b; }
.verify-resend {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #0c4d8b;
    background: none;
    border: none;
    border-bottom: 1px dashed #9db8d6;
    padding: 0 0 1px;
    cursor: pointer;
}
.verify-resend:disabled {
    color: #94a3b8;
    border-bottom-color: transparent;
    cursor: default;
}
.verify-meta-sep { margin: 0 7px; color: #cbd5e1; }
.verify-resend-status {
    margin-top: 7px;
    min-height: 14px;
    font-size: 11.5px;
    color: #64748b;
}
.verify-resend-status.is-error { color: #b91c1c; }
.verify-resend-status.is-ok { color: #0f7b3f; }

/* Signup stepper */
.signup-section { text-align: center; }

.signup-stepper {
    margin: 0 0 18px;
}
.stepper-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    position: relative;
}
.stepper-track::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: rgba(12, 77, 139, 0.12);
    z-index: 0;
}
.stepper-item {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.stepper-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    border: 2px solid rgba(12, 77, 139, 0.18);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.stepper-check { display: none; font-size: 11px; }
.stepper-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stepper-item.is-active .stepper-dot {
    background: #0c4d8b;
    border-color: #0c4d8b;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(12, 77, 139, 0.12);
}
.stepper-item.is-active .stepper-label { color: #0c2d5a; }
.stepper-item.is-complete .stepper-dot {
    background: #0f7b3f;
    border-color: #0f7b3f;
    color: #fff;
}
.stepper-item.is-complete .stepper-num { display: none; }
.stepper-item.is-complete .stepper-check { display: inline-block; }
.stepper-item.is-complete .stepper-label { color: #0f7b3f; }
/* Progress line fill via completed items — visual via box shadows on dots is enough */

.signup-context {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(12, 77, 139, 0.06);
    border: 1px solid rgba(12, 77, 139, 0.1);
}
.signup-context.is-hidden { display: none !important; }
.signup-context-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.signup-context-value {
    font-size: 13px;
    font-weight: 600;
    color: #0c2d5a;
    word-break: break-word;
}

.signup-step-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #0c2d5a;
    letter-spacing: -0.2px;
}
.signup-lead {
    font-size: 13px;
    color: #475569;
    margin: 0 0 14px;
    line-height: 1.45;
}
.signup-step.is-hidden { display: none !important; }

.signup-results {
    text-align: left;
    /* Padding so selected ring (box-shadow) isn't clipped square by overflow */
    margin: 0 0 8px;
    padding: 4px 6px 4px 2px;
    max-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(12, 77, 139, 0.28) transparent;
}
/* WebKit: slim track, no arrow buttons, transparent gutter */
.signup-results::-webkit-scrollbar {
    width: 6px;
}
.signup-results::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}
.signup-results::-webkit-scrollbar-track {
    background: transparent;
    border: none;
    box-shadow: none;
}
.signup-results::-webkit-scrollbar-track-piece {
    background: transparent;
}
.signup-results::-webkit-scrollbar-thumb {
    background: rgba(12, 77, 139, 0.28);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}
.signup-results::-webkit-scrollbar-thumb:hover {
    background: rgba(12, 77, 139, 0.45);
    background-clip: padding-box;
}
.signup-results::-webkit-scrollbar-corner {
    background: transparent;
}
.signup-result {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 11px 12px;
    margin: 0 0 8px;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.55);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #0c2d5a;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.signup-result:last-child {
    margin-bottom: 2px;
}
.signup-result:hover:not(:disabled) {
    border-color: #1a6fc9;
    background: rgba(255,255,255,0.85);
}
.signup-result:focus,
.signup-result:focus-visible {
    outline: none;
    border-color: #1a6fc9;
    border-radius: 10px;
    box-shadow: 0 0 0 3px rgba(26, 111, 201, 0.14);
}
.signup-result.is-selected,
.signup-result.is-selected:focus,
.signup-result.is-selected:focus-visible {
    border-color: #0c4d8b;
    border-radius: 10px;
    background: rgba(232, 242, 254, 0.85);
    /* Same radius as the chip — ring must not rely on browser outline */
    box-shadow: 0 0 0 3px rgba(12, 77, 139, 0.14);
}
.signup-result:disabled,
.signup-result.is-blocked {
    opacity: 0.72;
    cursor: not-allowed;
}
.signup-result .exist-note {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #b45309;
    margin-top: 3px;
}
.signup-result.is-blocked .exist-note { color: #be123c; }

.signup-email-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 8px;
    padding: 4px 2px;
    text-align: left;
}
.signup-email-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    background: rgba(255,255,255,0.55);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #0c2d5a;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
}
.signup-email-option:hover {
    border-color: #1a6fc9;
    background: rgba(255,255,255,0.85);
}
.signup-email-option:focus,
.signup-email-option:focus-visible {
    outline: none;
    border-color: #1a6fc9;
    border-radius: 10px;
    box-shadow: 0 0 0 3px rgba(26, 111, 201, 0.14);
}
.signup-email-option.is-selected,
.signup-email-option.is-selected:focus,
.signup-email-option.is-selected:focus-visible {
    border-color: #0c4d8b;
    border-radius: 10px;
    background: rgba(232, 242, 254, 0.85);
    box-shadow: 0 0 0 3px rgba(12, 77, 139, 0.14);
}
.signup-email-radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(12, 77, 139, 0.28);
    flex-shrink: 0;
    position: relative;
    background: #fff;
}
.signup-email-option.is-selected .signup-email-radio {
    border-color: #0c4d8b;
    background: #0c4d8b;
    box-shadow: inset 0 0 0 3px #fff;
}

.signup-done-icon {
    width: 56px;
    height: 56px;
    margin: 4px auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 123, 63, 0.1);
    color: #0f7b3f;
    font-size: 22px;
}

.signup-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}
.signup-step-actions--center {
    justify-content: center;
}
.signup-step-actions .signup-primary {
    width: auto;
    min-width: 132px;
    flex: 0 0 auto;
    margin-left: auto;
}
.signup-step-actions--center .signup-primary {
    margin-left: 0;
    min-width: 180px;
}
.signup-step-actions .link-back {
    margin-top: 0;
    flex-shrink: 0;
}

.signup-status {
    font-size: 13px;
    color: #0c4d8b;
    margin: 0 0 12px;
    line-height: 1.45;
    min-height: 0;
}
.signup-status:empty { display: none; }
.signup-status.is-error { color: #be123c; }
.signup-status.is-ok { color: #0f7b3f; }

.link-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #64748b;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    cursor: pointer;
    border-bottom: 1px dashed #cbd5e1;
    padding: 0 0 1px;
}
.link-back:hover { color: #0c4d8b; border-bottom-color: #0c4d8b; }

@media (max-width: 380px) {
    .stepper-label { font-size: 9px; }
    .stepper-dot { width: 26px; height: 26px; font-size: 11px; }
    .signup-step-actions { flex-wrap: wrap; }
    .signup-step-actions .signup-primary {
        width: 100%;
        margin-left: 0;
    }
}

.noscriptmsg {
    padding: 40px;
    text-align: center;
    color: #fff;
    font-family: Montserrat, sans-serif;
}

@media (max-width: 480px) {
    #log_element { padding: 16px 12px; }
    .login_container { margin-bottom: 4vh; padding: 28px 22px; }
    #logo { margin-bottom: 22px; }
    #logo img { width: 150px; }
    .otp-box { flex: 0 0 44px !important; width: 44px !important; height: 52px !important; }
}
@media (max-width: 380px) {
    .login_container { padding: 26px 18px; }
    .otp-box { flex: 0 0 40px !important; width: 40px !important; height: 50px !important; font-size: 20px; }
    .verify-submit { width: 100%; max-width: 220px; }
}
@media (max-width: 340px) {
    .login_container { padding: 22px 14px; }
    #logo img { width: 130px; }
    .otp-box { flex: 0 0 38px !important; width: 38px !important; height: 48px !important; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    body, body::before, body::after, #log_element::after { animation: none !important; }
}
