/* Login is an intentionally self-contained surface in both appearance themes. */
#login-view {
    position: relative;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
    align-items: safe center;
    justify-content: center;
    padding: 28px;
    isolation: isolate;
}
#login-view::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 82% 15%, #e9e5ff 0, transparent 30%),
                radial-gradient(circle at 10% 82%, #dce8fb 0, transparent 37%),
                #f5f5f9;
}
.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
    direction: rtl;
    width: min(1180px, 100%);
    min-height: min(724px, calc(100dvh - 56px));
    border: 1px solid rgba(255,255,255,.88);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 28px 100px rgba(34, 28, 86, .13), 0 3px 18px rgba(34, 28, 86, .04);
    overflow: hidden;
}
.login-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 34px clamp(30px, 4.1vw, 68px) 26px;
    background: #fff;
    color: #20203b;
}
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 700; letter-spacing: -.02em; }
.login-brand-mark { display: grid; place-items: center; width: 41px; height: 41px; flex: none; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.login-brand-mark img { width: 38px; height: 38px; object-fit: contain; }
.login-brand-name strong { display: block; margin-top: 4px; color: #403085; font-size: 11px; font-weight: 800; }
.login-content { width: 100%; max-width: 390px; margin: auto; padding: 28px 0 16px; }
.login-eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #6555ad; font-weight: 800; font-size: 11px; letter-spacing: .02em; }
.login-eyebrow span { width: 18px; height: 2px; border-radius: 9px; background: #7b68c9; }
#login-title { margin: 0 0 30px; color: #211d3b; font-size: clamp(25px, 2.4vw, 31px); line-height: 1.62; font-weight: 900; letter-spacing: -.035em; text-align: center; }
#login-title em { color: #6049b7; font-style: normal; }
.login-form { display: grid; gap: 19px; }
.login-field { display: grid; gap: 9px; }
.login-field label { color: #38364e; font-size: 12px; font-weight: 800; }
.login-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.login-forgot { padding: 0; color: #7565b1; font-size: 10px; font-weight: 700; text-align: left; transition: color .2s; }
.login-forgot:hover { color: #3d2998; text-decoration: underline; }
.login-input-wrap { display: flex; align-items: center; gap: 11px; height: 54px; padding: 0 15px; border: 1px solid #e8e7f0; border-radius: 13px; background: #fafafe; transition: border-color .22s, background .22s, box-shadow .22s; }
.login-input-wrap:focus-within { border-color: #8875d8; background: #fff; box-shadow: 0 0 0 4px rgba(107,84,194,.11); }
.login-input-wrap > .material-symbols-rounded { color: #a5a2b8; font-size: 20px; }
.login-input-wrap:focus-within > .material-symbols-rounded { color: #6750bd; }
.login-input-wrap input { width: 100%; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: #24213c; font-size: 12px; text-align: right; }
.login-input-wrap input::placeholder { color: #a6a4b6; opacity: 1; }
.login-password-toggle { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; color: #a5a2b8; transition: background .2s, color .2s; }
.login-password-toggle:hover { background: #eeeaf9; color: #6049b7; }
.login-password-toggle .material-symbols-rounded { font-size: 19px; }
#login-error:not(.hidden) { margin: -4px 0 0; padding: 9px 12px; border-radius: 9px; background: #fff1f2; color: #b4233c; font-size: 11px; font-weight: 700; }
.login-submit { display: flex; align-items: center; justify-content: space-between; height: 54px; width: 100%; margin-top: 5px; padding: 0 20px; border-radius: 13px; background: linear-gradient(105deg, #4d3aa3, #735bc5); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 12px 22px rgba(88,64,170,.2); transition: transform .2s, box-shadow .2s, filter .2s; }
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 28px rgba(88,64,170,.28); filter: brightness(1.04); }
.login-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.login-submit .material-symbols-rounded { font-size: 20px; }
.login-request-link { display: flex; align-items: center; gap: 12px; margin-top: 27px; padding: 14px; border: 1px solid #ebe8f3; border-radius: 14px; background: #fdfcff; color: #32304b; transition: border-color .2s, transform .2s, background .2s; }
.login-request-link:hover { border-color: #b8a9e7; background: #faf8ff; transform: translateY(-2px); }
.login-request-icon { display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 10px; background: #eeeafa; color: #614bb4; font-size: 21px; }
.login-request-link strong, .login-request-link small { display: block; }
.login-request-link strong { font-size: 11px; font-weight: 800; }
.login-request-link small { margin-top: 3px; color: #9290a3; font-size: 10px; }
.login-request-arrow { margin-inline-start: auto; color: #7b69ba; font-size: 18px; }
.login-showcase { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 34px 42px 42px; overflow: hidden; background: radial-gradient(circle at 65% 34%, rgba(110,100,210,.44), transparent 43%), radial-gradient(circle at 10% 95%, rgba(53,186,204,.22), transparent 34%), linear-gradient(145deg, #1b1949 0%, #2c276e 48%, #453595 100%); color: white; }
.login-showcase::before { content: ""; position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, transparent 3%, black 40%, black 90%); pointer-events: none; }
.login-showcase::after { content: ""; position: absolute; width: 480px; height: 480px; top: 9%; right: -40%; border: 1px solid rgba(198,190,255,.16); border-radius: 50%; box-shadow: 0 0 0 70px rgba(198,190,255,.035), 0 0 0 140px rgba(198,190,255,.025); pointer-events: none; }
.login-showcase-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; color: #eeeaff; font-size: 11px; font-weight: 700; }
.login-showcase-orbit { display: inline-block; width: 8px; height: 8px; border: 2px solid #88e2e3; border-radius: 50%; box-shadow: 0 0 10px #88e2e3; }
.login-showcase-index { margin-inline-start: auto; color: #aaa4d7; direction: ltr; font-size: 10px; letter-spacing: .15em; }
.login-art { position: relative; z-index: 1; flex: 1 1 auto; min-height: 395px; }
.login-art-glow { position: absolute; width: 55%; aspect-ratio: 1; top: 19%; left: 15%; border-radius: 50%; background: #7265df; filter: blur(90px); opacity: .36; animation: login-glow 9s ease-in-out infinite alternate; }
.login-art-map { position: absolute; inset: 7% -10% 0; transform: rotate(-7deg); opacity: .85; }
.login-art-map svg { width: 100%; height: 100%; filter: drop-shadow(0 0 10px rgba(128,220,232,.17)); }
.login-art-map path { stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.2; }
.login-art-map .map-stroke-soft { stroke: rgba(170,175,231,.27); }
.login-art-map .map-stroke { stroke: rgba(179,219,242,.68); }
.login-art-map .map-stroke-bright { stroke: rgba(115,239,235,.9); stroke-width: 1.8; }
.login-art-map circle { fill: #8beded; filter: drop-shadow(0 0 6px #8beded); }
.login-art-card { position: absolute; width: 265px; padding: 17px 18px; border: 1px solid rgba(255,255,255,.38); border-radius: 17px; background: rgba(255,255,255,.93); box-shadow: 0 30px 50px rgba(10,8,42,.22); color: #272344; backdrop-filter: blur(14px); }
.login-art-card-main { top: 21%; right: 11%; transform: rotate(4deg); animation: login-float 6s ease-in-out infinite; }
.login-art-card-head { display: flex; align-items: center; gap: 7px; color: #726d90; font-size: 10px; font-weight: 800; }
.login-art-card-head .material-symbols-rounded { margin-inline-start: auto; font-size: 18px; }
.login-art-menu { margin-inline-start: auto; color: #a29eb7; direction: ltr; letter-spacing: 1px; }
.login-art-dot { width: 7px; height: 7px; border-radius: 50%; background: #31b9b4; }
.login-art-card-title { width: 73%; height: 10px; margin: 20px 0 9px; border-radius: 10px; background: #34304d; opacity: .8; }
.login-art-card-line { width: 51%; height: 6px; border-radius: 10px; background: #d7d5e6; }
.login-art-progress { height: 7px; margin-top: 26px; overflow: hidden; border-radius: 9px; background: #eae8f2; }
.login-art-progress span { display: block; height: 100%; width: 78%; border-radius: inherit; background: linear-gradient(90deg, #6350be, #69d1d6); }
.login-art-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: #88849d; font-size: 9px; }
.login-art-card-foot strong { color: #49369e; font-size: 16px; }
.login-art-badge { position: absolute; display: flex; align-items: center; gap: 10px; top: 60%; left: 7%; padding: 12px 15px; border: 1px solid rgba(255,255,255,.68); border-radius: 13px; background: rgba(255,255,255,.88); box-shadow: 0 18px 35px rgba(9,7,43,.2); color: #292848; transform: rotate(-5deg); animation: login-float-secondary 7s ease-in-out infinite; }
.login-art-badge > .material-symbols-rounded { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #d9f7f4; color: #229c9d; font-size: 18px; }
.login-art-badge strong, .login-art-badge small { display: block; white-space: nowrap; }
.login-art-badge strong { font-size: 10px; }
.login-art-badge small { margin-top: 3px; color: #9a98a9; font-size: 8px; }
.login-art-point { position: absolute; width: 9px; height: 9px; border: 2px solid #b4fbf3; border-radius: 50%; box-shadow: 0 0 0 8px rgba(110,236,227,.1), 0 0 23px #65dbdb; animation: login-pulse 3.5s ease-in-out infinite; }
.login-art-point-one { top: 30%; left: 10%; }
.login-art-point-two { right: 5%; bottom: 18%; animation-delay: 1.5s; }
.login-showcase-bottom { position: relative; z-index: 2; }
.login-showcase-rule { display: block; width: 32px; height: 3px; margin-bottom: 13px; border-radius: 9px; background: #76d9db; }
.login-showcase-bottom h2 { margin: 0 0 10px; font-size: clamp(25px, 2.5vw, 35px); font-weight: 700; line-height: 1.45; letter-spacing: -.04em; }
.login-showcase-bottom h2 strong { color: #90ecec; font-weight: 900; }
.login-showcase-bottom p { max-width: 350px; margin: 0; color: #c2bde5; font-size: 11px; line-height: 1.8; }

@keyframes login-float { 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes login-float-secondary { 50% { transform: translateY(8px) rotate(-3deg); } }
@keyframes login-pulse { 50% { box-shadow: 0 0 0 14px rgba(110,236,227,0), 0 0 28px #65dbdb; } }
@keyframes login-glow { 50% { transform: translate(20px, -10px) scale(1.1); opacity: .5; } }

@media (min-width: 801px) and (max-height: 800px) {
    .login-panel { padding-top: 24px; padding-bottom: 18px; }
    .login-content { padding-top: 12px; padding-bottom: 8px; }
    .login-form { gap: 14px; }
    .login-request-link { margin-top: 18px; }
    .login-showcase { padding-top: 24px; padding-bottom: 25px; }
    .login-art { min-height: 340px; }
}

@media (max-width: 800px) {
    #login-view { display: block; padding: 14px; }
    .login-shell { display: flex; flex-direction: column; min-height: 0; max-width: 570px; margin: 0 auto; border-radius: 24px; }
    .login-panel { min-height: 0; padding: 26px 26px 22px; }
    .login-content { max-width: none; padding: 42px 0 26px; }
    .login-showcase { min-height: 260px; padding: 25px 28px; border-radius: 0; }
    .login-art { position: absolute; inset: 12px 0 0 39%; min-height: 0; opacity: .58; }
    .login-art-card-main { display: none; }
    .login-art-badge, .login-art-point { display: none; }
    .login-showcase-top, .login-showcase-bottom { width: 70%; }
    .login-showcase-bottom { margin-top: 57px; }
    .login-showcase-bottom h2 { font-size: 23px; }
    .login-showcase-bottom p { font-size: 10px; }
}
@media (max-width: 430px) {
    #login-view { padding: 0; }
    .login-shell { min-height: 100dvh; border: 0; border-radius: 0; }
    .login-panel { padding: 24px 22px 26px; }
    .login-content { padding: 46px 0 25px; }
    #login-title { font-size: 26px; line-height: 1.7; }
    .login-showcase { min-height: 220px; }
    .login-showcase-bottom { margin-top: 38px; }
    .login-showcase-bottom p { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .login-art-glow, .login-art-card-main, .login-art-badge, .login-art-point { animation: none !important; }
    .login-submit, .login-request-link { transition: none; }
}

/* Account recovery dialog follows the login surface's violet and cyan palette. */
#modal-forgot-account {
    background: rgba(24, 22, 58, .52);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#modal-forgot-account > .forgot-card {
    width: min(100%, 510px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(18, 15, 59, .25);
    color: #25213f;
    animation: forgot-enter .3s cubic-bezier(.2,.85,.2,1) both;
}
html[data-ui-theme="liquid"] #modal-forgot-account > .forgot-card {
    background: #fff !important;
    background-image: none !important;
    border-color: rgba(255,255,255,.9) !important;
}
.forgot-header {
    position: relative;
    overflow: hidden;
    padding: 29px 34px 26px;
    background: radial-gradient(circle at 85% 0, rgba(148,128,226,.19), transparent 35%),
                linear-gradient(140deg, #faf9ff, #f2f0fd);
}
.forgot-header::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    left: -62px;
    top: -86px;
    border: 1px solid rgba(114,88,197,.13);
    border-radius: 50%;
    box-shadow: 0 0 0 30px rgba(114,88,197,.035), 0 0 0 60px rgba(114,88,197,.025);
    pointer-events: none;
}
.forgot-close { position: absolute; top: 18px; left: 18px; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #e7e3f3; border-radius: 9px; background: rgba(255,255,255,.8); color: #7f79a0; transition: color .2s, background .2s; }
.forgot-close:hover { color: #4c3aa1; background: #fff; }
.forgot-close .material-symbols-rounded { font-size: 18px; }
.forgot-title-row { display: flex; align-items: center; gap: 14px; min-height: 54px; padding-inline-end: 2px; }
.forgot-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 1px solid rgba(105,81,189,.13); border-radius: 14px; background: #fff; color: #604ab4; box-shadow: 0 8px 20px rgba(87,68,160,.11); }
.forgot-icon .material-symbols-rounded { font-size: 24px; }
.forgot-eyebrow { margin: 0; color: #604ab4; font-size: 16px; font-weight: 900; line-height: 1.6; letter-spacing: -.02em; }
.forgot-body { padding: 26px 34px 32px; }
.forgot-section-heading { display: flex; align-items: center; gap: 9px; color: #302b4a; font-size: 12px; font-weight: 800; }
.forgot-step { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 7px; background: #f0ecfc; color: #624bb6; font-size: 11px; }
.forgot-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 13px; }
#modal-forgot-account .forgot-options .gal-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 78px; padding: 10px 4px; border: 1px solid #e8e5f2; border-radius: 12px; background: #fbfaff; color: #767189; font-size: 10px; font-weight: 800; transition: border-color .2s, color .2s, background .2s, transform .2s, box-shadow .2s; }
#modal-forgot-account .forgot-options .gal-pill .material-symbols-rounded { font-size: 21px; color: #aaa3c0; }
#modal-forgot-account .forgot-options .gal-pill:hover { border-color: #b9a9eb; transform: translateY(-2px); }
#modal-forgot-account .forgot-options .gal-pill.active { border-color: #816bcf; background: #f1edff; color: #4f3aa5; box-shadow: 0 0 0 2px rgba(129,107,207,.11); }
#modal-forgot-account .forgot-options .gal-pill.active .material-symbols-rounded { color: #604ab4; }
.forgot-section-heading-contact { margin-top: 26px; }
.forgot-field-help { margin: 7px 31px 11px 0; color: #9894a8; font-size: 10px; line-height: 1.6; }
.forgot-textarea-wrap { padding: 0 13px; border: 1px solid #e7e4ef; border-radius: 12px; background: #fafafe; transition: border-color .2s, box-shadow .2s, background .2s; }
.forgot-textarea-wrap:focus-within { border-color: #8875d8; background: #fff; box-shadow: 0 0 0 4px rgba(107,84,194,.1); }
.forgot-textarea-wrap textarea { display: block; width: 100%; min-height: 86px; padding: 13px 0; resize: vertical; border: 0; outline: 0; background: transparent; color: #2e294a; font-size: 11px; line-height: 1.7; }
.forgot-textarea-wrap textarea::placeholder { color: #aaa6bb; opacity: 1; }
#forgot-account-error:not(.hidden) { margin: 10px 0 0; padding: 9px 11px; border-radius: 9px; background: #fff1f2; color: #af2940; font-size: 11px; font-weight: 700; }
#forgot-account-contact:not(.hidden) { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #f4f2fc; color: #57516d; font-size: 10px; line-height: 1.8; }
#forgot-account-contact a { color: #604ab4; text-decoration: underline; }
.forgot-actions { display: flex; gap: 10px; margin-top: 21px; }
.forgot-actions button { height: 48px; border-radius: 11px; font-size: 11px; font-weight: 800; transition: transform .2s, background .2s, box-shadow .2s; }
.forgot-cancel { flex: 1 1 36%; border: 1px solid #e8e5f1; background: #fff; color: #76718a; }
.forgot-cancel:hover { background: #f8f7fc; }
.forgot-submit { display: flex; align-items: center; justify-content: space-between; flex: 1 1 64%; padding: 0 17px; background: linear-gradient(105deg, #4d3aa3, #735bc5); color: #fff; box-shadow: 0 10px 20px rgba(83,62,166,.17); }
.forgot-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 22px rgba(83,62,166,.23); }
.forgot-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.forgot-submit .material-symbols-rounded { font-size: 18px; }
.forgot-success { display: flex; flex-direction: column; align-items: center; padding: 43px 39px 37px; text-align: center; }
.forgot-success-icon { display: grid; place-items: center; width: 61px; height: 61px; border-radius: 17px; background: #e7f7f5; color: #229e9b; font-size: 36px; }
.forgot-success h3 { margin: 22px 0 7px; color: #25213f; font-size: 19px; font-weight: 900; }
.forgot-success p { margin: 0 0 25px; color: #88839e; font-size: 11px; line-height: 1.9; }
.forgot-success .forgot-submit { justify-content: center; width: 100%; min-height: 48px; flex: none; }
@keyframes forgot-enter { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 520px) {
    #modal-forgot-account { padding: 12px; }
    #modal-forgot-account > .forgot-card { max-height: calc(100dvh - 24px); border-radius: 21px; }
    .forgot-header { padding: 27px 23px 23px; }
    .forgot-body { padding: 23px 23px 27px; }
    .forgot-header h3 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    #modal-forgot-account > .forgot-card { animation: none !important; }
    #modal-forgot-account .gal-pill, #modal-forgot-account .forgot-actions button { transition: none; }
}

/* Responsive login layout must never reopen an inactive view. */
#login-view:not(.active) { display: none !important; }
