/* =====================================================================
   Hishabee — account pages, Soft UI 3D skin
   Loaded after account.css and scoped to body.hb-auth.hb-neu (set in
   _Layout.cshtml). Same "Ledger & Jade" palette: the porcelain form side
   becomes raised/pressed neumorphic paper, the pine-ink brand panel a
   raised ink surface with floating shapes. Remove hb-neu to go back.
   ===================================================================== */
body.hb-auth.hb-neu {
    --hn-bg: #efede6;
    --hn-bg-2: #f6f5f0;
    --hn-hi: rgba(255, 255, 255, .95);
    --hn-lo: rgba(150, 140, 112, .38);
    --hn-raise-sm: 5px 5px 12px var(--hn-lo), -5px -5px 12px var(--hn-hi);
    --hn-raise: 10px 10px 24px var(--hn-lo), -10px -10px 24px var(--hn-hi);
    --hn-raise-lg: 20px 20px 46px rgba(150, 140, 112, .45), -16px -16px 38px var(--hn-hi);
    --hn-press-sm: inset 3px 3px 7px var(--hn-lo), inset -3px -3px 7px var(--hn-hi);
    --hn-press: inset 6px 6px 14px var(--hn-lo), inset -6px -6px 14px var(--hn-hi);
    --hn-ink: #15302a;
    --hn-ink-hi: rgba(54, 92, 82, .55);
    --hn-ink-lo: rgba(4, 12, 10, .62);
    --hn-ink-raise-sm: 5px 5px 12px var(--hn-ink-lo), -4px -4px 10px var(--hn-ink-hi);
    --hn-ink-raise: 12px 12px 28px var(--hn-ink-lo), -8px -8px 22px var(--hn-ink-hi);
    --hn-ink-press-sm: inset 3px 3px 7px var(--hn-ink-lo), inset -3px -3px 7px var(--hn-ink-hi);
    --hn-brass-fill: linear-gradient(145deg, #d8bc7e, var(--hb-brass) 45%, var(--hb-brass-deep));
    background: var(--hn-bg) !important;
}

/* ===================== brand panel (ink) ===================== */
body.hb-neu .hb-auth-brand { perspective: 1200px; }
body.hb-neu .hb-auth-brand > *:not(.hn-shape) { position: relative; z-index: 1; }

body.hb-neu .hn-shape {
    position: absolute; z-index: 0;
    border-radius: 50%;
    background: linear-gradient(145deg, #1c3a33, #112621);
    box-shadow: var(--hn-ink-raise);
    pointer-events: none;
    transition: transform .25s ease-out;
}
body.hb-neu .hn-shape::after { content: ""; position: absolute; inset: 22%; border-radius: inherit; box-shadow: var(--hn-ink-press-sm); }
body.hb-neu .hn-shape--a { width: 170px; height: 170px; top: -50px; right: -50px; animation: hnFloat 12s ease-in-out infinite; }
body.hb-neu .hn-shape--b { width: 80px; height: 80px; top: 58%; right: 5%; border-radius: 24px; animation: hnFloat 9s ease-in-out -3s infinite; }
body.hb-neu .hn-shape--c { width: 120px; height: 120px; bottom: 6%; right: -30px; animation: hnFloat 14s ease-in-out -6s infinite; }
body.hb-neu .hn-shape--d {
    width: 30px; height: 30px; top: 21%; right: 7%;
    background: var(--hn-brass-fill);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, .35), -3px -3px 8px rgba(255, 255, 255, .1);
    animation: hnFloat 7s ease-in-out -1s infinite;
}
body.hb-neu .hn-shape--d::after { display: none; }
@keyframes hnFloat {
    0%, 100% { translate: 0 0; rotate: 0deg; }
    50% { translate: 0 -16px; rotate: 8deg; }
}

body.hb-neu .hb-auth-mark {
    background: var(--hn-brass-fill);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, .3), -3px -3px 8px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .5);
    animation: hnCoin 6s ease-in-out infinite;
}
@keyframes hnCoin {
    0%, 70%, 100% { transform: rotateY(0); }
    80% { transform: rotateY(180deg); }
    90% { transform: rotateY(360deg); }
}

/* bullet points: brass LEDs that pulse one after another */
body.hb-neu .hb-auth-points li::before {
    background: var(--hn-brass-fill);
    box-shadow: 0 0 0 4px #10231e, 0 0 0 5px rgba(255, 255, 255, .06), 0 0 12px rgba(190, 157, 90, .6);
    animation: hnLed 3.6s ease-in-out infinite;
}
body.hb-neu .hb-auth-points li:nth-child(2)::before { animation-delay: 1.2s; }
body.hb-neu .hb-auth-points li:nth-child(3)::before { animation-delay: 2.4s; }
@keyframes hnLed {
    0%, 60%, 100% { box-shadow: 0 0 0 4px #10231e, 0 0 0 5px rgba(255, 255, 255, .06), 0 0 6px rgba(190, 157, 90, .35); }
    20% { box-shadow: 0 0 0 4px #10231e, 0 0 0 5px rgba(255, 255, 255, .06), 0 0 18px rgba(216, 188, 126, .95); }
}

/* proof block: raised ink slab, figures in pressed wells, tilts with the pointer */
body.hb-neu .hb-auth-proof {
    border: 1px solid rgba(255, 255, 255, .05);
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(150deg, #1a3731, #11251f);
    box-shadow: var(--hn-ink-raise);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}
body.hb-neu .hb-auth-proof-row { gap: 12px; }
body.hb-neu .hb-auth-stat {
    flex: 1 1 0;
    padding: 10px 14px;
    border-radius: 14px;
    background: #12271f;
    box-shadow: var(--hn-ink-press-sm);
}
body.hb-neu .hb-auth-ai { border-top-color: rgba(255, 255, 255, .06); }
body.hb-neu .hb-auth-ai i { animation: hnSpark 2.4s ease-in-out infinite; display: inline-block; }
@keyframes hnSpark { 50% { transform: scale(1.35) rotate(45deg); text-shadow: 0 0 10px rgba(216, 188, 126, .9); } }

/* staggered entrance */
@media (prefers-reduced-motion: no-preference) {
    body.hb-neu .hb-auth-brand > *:not(.hn-shape) { animation: hnRise .7s cubic-bezier(.22, .61, .36, 1) backwards; }
    body.hb-neu .hb-auth-brand > :nth-child(2) { animation-delay: .06s; }
    body.hb-neu .hb-auth-brand > :nth-child(3) { animation-delay: .14s; }
    body.hb-neu .hb-auth-brand > :nth-child(4) { animation-delay: .22s; }
    body.hb-neu .hb-auth-brand > :nth-child(5) { animation-delay: .30s; }
    body.hb-neu .hb-auth-brand > :nth-child(6) { animation-delay: .38s; }
    body.hb-neu .hb-auth-panel .content { animation: hnCardIn .8s .15s cubic-bezier(.22, .61, .36, 1) backwards; }
}
@keyframes hnRise { from { opacity: 0; transform: translateY(20px); } }
@keyframes hnCardIn { from { opacity: 0; transform: perspective(1200px) translateY(30px) rotateX(10deg); } }

/* ===================== form side (porcelain) ===================== */
body.hb-neu .hb-auth-panel { background: var(--hn-bg); perspective: 1400px; }

/* the card: raised paper */
body.hb-auth.hb-neu .content {
    position: relative;
    border: 0;
    border-radius: 28px;
    background: var(--hn-bg);
    box-shadow: var(--hn-raise-lg);
    padding: 36px 34px 30px;
}
body.hb-auth.hb-neu .content.is-shaking { animation: hnShake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes hnShake {
    15%, 85% { transform: translateX(-3px); }
    30%, 70% { transform: translateX(6px); }
    45% { transform: translateX(-9px); }
    55% { transform: translateX(9px); }
}

body.hb-neu .hb-auth-cardlogo {
    width: fit-content;
    margin: 0 auto 24px;
    padding: 12px 22px;
    border-radius: 18px;
    background: var(--hn-bg);
    box-shadow: var(--hn-raise-sm);
}

/* fields: pressed wells, brass focus ring, icon lights up */
body.hb-auth.hb-neu .content .form-control {
    height: 50px !important;
    border: 0 !important;
    border-radius: 15px !important;
    background: var(--hn-bg) !important;
    box-shadow: var(--hn-press-sm) !important;
}
body.hb-auth.hb-neu .content .form-control:focus,
body.hb-auth.hb-neu .content .form-control:active {
    background: var(--hn-bg-2) !important;
    box-shadow: var(--hn-press-sm), 0 0 0 3px rgba(190, 157, 90, .28) !important;
}
body.hb-auth.hb-neu .hb-field > .fa { transition: color .2s ease, transform .2s ease; z-index: 1; }
body.hb-auth.hb-neu .hb-field:focus-within > .fa { color: var(--hb-brass-deep); transform: translateY(-50%) scale(1.15); }
body.hb-auth.hb-neu .content .form-control.error { box-shadow: var(--hn-press-sm), 0 0 0 2px rgba(192, 79, 48, .45) !important; }

/* autofill: Chrome's pale yellow would break the pressed well; keep the paper fill in every state */
body.hb-auth.hb-neu .content .form-control:-webkit-autofill,
body.hb-auth.hb-neu .content .form-control:-webkit-autofill:hover,
body.hb-auth.hb-neu .content .form-control:-webkit-autofill:focus,
body.hb-auth.hb-neu .content .form-control:-webkit-autofill:active {
    -webkit-text-fill-color: var(--hb-text) !important;
    caret-color: var(--hb-text);
    -webkit-box-shadow: var(--hn-press-sm), inset 0 0 0 1000px var(--hn-bg) !important;
    box-shadow: var(--hn-press-sm), inset 0 0 0 1000px var(--hn-bg) !important;
    transition: background-color 600000s 0s, color 600000s 0s;
}
body.hb-auth.hb-neu .content .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: var(--hn-press-sm), 0 0 0 3px rgba(190, 157, 90, .28), inset 0 0 0 1000px var(--hn-bg-2) !important;
    box-shadow: var(--hn-press-sm), 0 0 0 3px rgba(190, 157, 90, .28), inset 0 0 0 1000px var(--hn-bg-2) !important;
}

/* remember me: a soft pressed check */
body.hb-auth.hb-neu .content .rememberme input[type=checkbox] {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; flex: none;
    border-radius: 7px;
    background: var(--hn-bg);
    box-shadow: var(--hn-raise-sm);
    display: inline-grid; place-items: center;
    cursor: pointer;
    transition: box-shadow .2s ease;
}
body.hb-auth.hb-neu .content .rememberme input[type=checkbox]::after {
    content: "";
    width: 6px; height: 11px; margin-top: -3px;
    border: solid var(--hb-jade); border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
body.hb-auth.hb-neu .content .rememberme input[type=checkbox]:checked { box-shadow: var(--hn-press-sm); }
body.hb-auth.hb-neu .content .rememberme input[type=checkbox]:checked::after { transform: rotate(45deg) scale(1); }
body.hb-auth.hb-neu .content .rememberme input[type=checkbox]:focus-visible { outline: 3px solid rgba(190, 157, 90, .55); outline-offset: 2px; }
/* uniform.js wraps checkboxes in its own span; show the real input instead */
body.hb-auth.hb-neu .content .rememberme .checker,
body.hb-auth.hb-neu .content .rememberme .checker span { display: contents; background: none !important; }
body.hb-auth.hb-neu .content .rememberme .checker input { opacity: 1 !important; filter: none !important; }

/* buttons: brass pill raised off the paper, presses in */
body.hb-auth.hb-neu .content .form-actions .btn,
body.hb-auth.hb-neu .content .btn-success,
body.hb-auth.hb-neu .content .btn-primary {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    height: 52px;
    border-radius: 18px;
    background: var(--hn-brass-fill);
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: var(--hn-raise-sm), 0 14px 30px -14px rgba(168, 133, 63, .9), inset 0 1px 0 rgba(255, 255, 255, .5);
}
body.hb-auth.hb-neu .content .form-actions .btn:hover,
body.hb-auth.hb-neu .content .btn-success:hover,
body.hb-auth.hb-neu .content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--hn-raise), 0 18px 34px -14px rgba(168, 133, 63, 1), inset 0 1px 0 rgba(255, 255, 255, .55);
}
body.hb-auth.hb-neu .content .form-actions .btn:active,
body.hb-auth.hb-neu .content .btn-success:active,
body.hb-auth.hb-neu .content .btn-primary:active {
    transform: translateY(1px) scale(.99);
    box-shadow: inset 4px 4px 9px rgba(120, 90, 30, .45), inset -3px -3px 8px rgba(255, 240, 200, .45);
}
body.hb-auth.hb-neu .content .btn-default {
    border: 0 !important;
    border-radius: 16px;
    background: var(--hn-bg) !important;
    box-shadow: var(--hn-raise-sm);
}
body.hb-auth.hb-neu .content .btn-default:active { box-shadow: var(--hn-press-sm); }
body.hb-neu .hb-ripple {
    position: absolute; z-index: -1;
    width: 14px; height: 14px; margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    pointer-events: none;
    animation: hnRipple .7s ease-out forwards;
}
@keyframes hnRipple { to { transform: scale(26); opacity: 0; } }

body.hb-auth.hb-neu .content .alert { border: 0; border-radius: 15px; box-shadow: var(--hn-press-sm); }

/* card footer: a pressed strip instead of a ruled one */
body.hb-auth.hb-neu .content .create-account {
    margin: 26px 0 0;
    padding: 12px 18px;
    border: 0;
    border-radius: 16px;
    background: var(--hn-bg);
    box-shadow: var(--hn-press-sm);
}
body.hb-neu .hb-auth-help a { padding: 6px 12px; border-radius: 12px; background: var(--hn-bg); box-shadow: var(--hn-raise-sm); display: inline-block; transition: box-shadow .2s ease; }
body.hb-neu .hb-auth-help a:hover { text-decoration: none; box-shadow: var(--hn-raise); }
body.hb-neu .hb-auth-help a:active { box-shadow: var(--hn-press-sm); }

/* ===================== popups (abp.message / SweetAlert 0.x) =====================
   Raised paper card, pressed icon well, brass pill. The library sets the
   confirm colour inline, hence the !important. */
body.hb-neu .sweet-overlay {
    background: rgba(18, 36, 33, .5) !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
body.hb-neu .sweet-alert {
    width: 420px; margin-left: -210px !important;
    padding: 30px 30px 26px;
    border-radius: 28px;
    background: var(--hn-bg);
    box-shadow: var(--hn-raise-lg), 0 40px 80px -30px rgba(18, 36, 33, .55);
    font-family: var(--hb-body);
}
body.hb-neu .sweet-alert h2 {
    margin: 22px 0 8px;
    font-family: var(--hb-display);
    font-size: 23px; font-weight: 600; line-height: 1.25;
    color: var(--hb-ink);
}
body.hb-neu .sweet-alert p { font-family: var(--hb-body); font-size: 14.5px; line-height: 1.55; color: var(--hb-muted); }
body.hb-neu .sweet-alert .icon {
    width: 76px; height: 76px; margin: 4px auto 0;
    border: 0 !important;
    background: var(--hn-bg);
    box-shadow: var(--hn-press);
}
body.hb-neu .sweet-alert .icon::before,
body.hb-neu .sweet-alert .icon::after,
body.hb-neu .sweet-alert .icon.success .fix { background: transparent !important; }
body.hb-neu .sweet-alert .icon.error .line { top: 36px; width: 40px; height: 5px; background: var(--hb-brick); }
body.hb-neu .sweet-alert .icon.error .line.left { left: 18px; }
body.hb-neu .sweet-alert .icon.error .line.right { right: 18px; }
body.hb-neu .sweet-alert .icon.success .line { background: var(--hb-jade); }
body.hb-neu .sweet-alert .icon.success .placeholder { border: 0; }
body.hb-neu .sweet-alert .icon.warning,
body.hb-neu .sweet-alert .icon.info { color: var(--hb-brass-deep); }
body.hb-neu .sweet-alert .icon.warning .body,
body.hb-neu .sweet-alert .icon.warning .dot { background: var(--hb-brass-deep); }
body.hb-neu .sweet-alert .icon.warning .body { top: 14px; }
body.hb-neu .sweet-alert .icon.warning .dot { bottom: 12px; }
body.hb-neu .sweet-alert button {
    min-width: 140px; margin: 22px 6px 0;
    padding: 13px 34px;
    border-radius: 18px;
    font-family: var(--hb-body);
    font-size: 14px; font-weight: 700; letter-spacing: .04em;
    transition: transform .2s ease, box-shadow .2s ease;
}
body.hb-neu .sweet-alert button.confirm {
    color: var(--hb-ink) !important;
    background: var(--hn-brass-fill) !important;
    box-shadow: var(--hn-raise-sm), 0 12px 26px -12px rgba(168, 133, 63, .9), inset 0 1px 0 rgba(255, 255, 255, .5) !important;
}
body.hb-neu .sweet-alert button.cancel {
    color: var(--hb-text) !important;
    background: var(--hn-bg) !important;
    box-shadow: var(--hn-raise-sm) !important;
}
body.hb-neu .sweet-alert button:hover { transform: translateY(-2px); }
body.hb-neu .sweet-alert button:active { transform: translateY(1px); box-shadow: inset 4px 4px 9px rgba(120, 90, 30, .4), inset -3px -3px 8px rgba(255, 240, 200, .4) !important; }
body.hb-neu .sweet-alert button:focus { outline: 2px solid rgba(190, 157, 90, .6); outline-offset: 3px; }

/* ===================== small screens / motion ===================== */
@media (max-width: 991px) {
    body.hb-neu .hn-shape--b, body.hb-neu .hn-shape--c, body.hb-neu .hn-shape--d { display: none; }
    body.hb-neu .hn-shape--a { width: 110px; height: 110px; top: -40px; right: -40px; }
}
@media (max-width: 480px) {
    body.hb-auth.hb-neu .content { padding: 28px 20px 24px; border-radius: 22px; }
    body.hb-neu .sweet-alert { width: auto; left: 16px; right: 16px; margin-left: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
    body.hb-neu .hn-shape, body.hb-neu .hb-auth-mark, body.hb-neu .hb-auth-points li::before, body.hb-neu .hb-auth-ai i { animation: none !important; }
    body.hb-auth.hb-neu .content.is-shaking { animation: none; }
    body.hb-neu .hb-auth-proof { transform: none !important; }
}
