.top-right-nav {
    position: fixed;
    top: 28px;
    right: 30px;
    z-index: 2100;
    display: flex;
    align-items: center;
    gap: 16px;
}

:root {
    --auth-sheet-overlay: rgba(7, 9, 12, 0.28);
    --auth-sheet-overlay-filter: blur(14px) saturate(108%);
    --auth-sheet-backdrop-glow: rgba(0, 0, 0, 0);
    --auth-sheet-panel: rgba(12, 14, 18, 0.98);
    --auth-sheet-panel-strong: rgba(15, 18, 22, 0.995);
    --auth-sheet-surface: rgba(255, 255, 255, 0.04);
    --auth-sheet-surface-strong: rgba(255, 255, 255, 0.07);
    --auth-sheet-border: rgba(255, 255, 255, 0.08);
    --auth-sheet-text: #f2f5f8;
    --auth-sheet-muted: rgba(231, 236, 242, 0.62);
    --auth-sheet-soft: rgba(231, 236, 242, 0.4);
    --auth-sheet-accent: #6b9ece;
    --auth-sheet-accent-strong: #8bb8e8;
    --auth-sheet-link-accent: #9fcaff;
    --auth-sheet-blue-soft: rgba(107, 158, 206, 0.12);
    --auth-sheet-blue-soft-strong: rgba(107, 158, 206, 0.18);
    --auth-sheet-blue-border: rgba(107, 158, 206, 0.34);
    --auth-sheet-blue-bright: #8bb8e8;
    --auth-sheet-blue-bright-soft: rgba(139, 184, 232, 0.2);
    --auth-sheet-danger: #d48a83;
    --auth-sheet-success: #94bba8;
    --auth-sheet-mobile-bottom-inset: max(0px, env(safe-area-inset-bottom));
}

body.auth-sheet-open {
    overflow: hidden;
}

.login-trigger-btn {
    position: relative;
}

.auth-display-none {
    display: none;
}

.auth-dropdown-layer {
    z-index: 2100;
}

.avatar-unread-badge,
.dropdown-notif-badge {
    display: none;
}

.avatar-unread-badge {
    position: absolute;
    top: 8px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    border: 1px solid rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.avatar-unread-badge.is-visible {
    display: block;
}

.dropdown-notif-badge.is-visible {
    display: inline-block;
}

.auth-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 12060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: max(40px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background: var(--auth-sheet-overlay);
    backdrop-filter: var(--auth-sheet-overlay-filter);
    -webkit-backdrop-filter: var(--auth-sheet-overlay-filter);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: opacity, backdrop-filter;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.auth-sheet-overlay[hidden] {
    display: none;
}

.auth-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/*
  Legacy login-overlay compatibility:
  the new auth sheet still carries .login-overlay for shared close handlers,
  but older global stylesheets force a darker overlay with !important.
  Lock #loginModal back to the auth-sheet material values here so the backdrop
  stays consistent with the chat widget on every page.
*/
#loginModal.auth-sheet-overlay,
#loginModal.auth-sheet-overlay.active,
#loginModal.auth-sheet-overlay.login-overlay,
#loginModal.auth-sheet-overlay.login-overlay.active {
    background: var(--auth-sheet-overlay) !important;
    backdrop-filter: var(--auth-sheet-overlay-filter) !important;
    -webkit-backdrop-filter: var(--auth-sheet-overlay-filter) !important;
}

#loginModal.auth-sheet-overlay:not(.active):not(.closing),
#loginModal.auth-sheet-overlay.login-overlay:not(.active):not(.closing),
#loginModal.auth-sheet-overlay.closing,
#loginModal.auth-sheet-overlay.login-overlay.closing {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.auth-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.auth-sheet-overlay.active .auth-sheet-backdrop {
    opacity: 0;
}

#loginModal.auth-sheet-overlay .auth-sheet-backdrop,
#loginModal.auth-sheet-overlay.login-overlay .auth-sheet-backdrop {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 0 !important;
}

.auth-sheet-stage {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: min(100%, 480px);
    min-height: 0;
}

.auth-sheet {
    position: relative;
    width: 100%;
    max-height: min(88svh, 860px);
    min-height: 0;
    border-radius: 26px;
    overflow: hidden;
    color: var(--auth-sheet-text);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    isolation: isolate;
}

.auth-sheet-surface {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    background: rgba(11, 14, 20, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#loginModal.auth-sheet-overlay .auth-sheet-surface,
#loginModal.auth-sheet-overlay.login-overlay .auth-sheet-surface {
    background: rgba(11, 14, 20, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.auth-sheet-motion-shell {
    position: relative;
    z-index: 1;
    min-height: 0;
    width: min(100%, 414px);
    margin: 0 auto;
    padding-bottom: 10px;
    transform: translateY(24px) scale(0.988);
    opacity: 0;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}

.auth-sheet-form-core {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    width: min(100%, 414px);
    margin: 0 auto;
    padding: 10px 18px 16px;
    transform: translateY(18px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}

.auth-sheet-overlay.active .auth-sheet-motion-shell,
.auth-sheet-overlay.active .auth-sheet-form-core {
    transform: none;
    opacity: 1;
}

@keyframes authSheetStaggeredRise {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-sheet-overlay.active .auth-sheet-header {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.08s backwards;
}

.auth-sheet-overlay.active .auth-sheet-tabs:not([hidden]) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.13s backwards;
}

.auth-sheet-overlay.active .auth-sheet-message:not([hidden]) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.18s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active > :not(.auth-sheet-form):nth-child(1) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.18s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active > :not(.auth-sheet-form):nth-child(2) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.23s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active > :not(.auth-sheet-form):nth-child(3) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.28s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active > :not(.auth-sheet-form):nth-child(4) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.33s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active > :not(.auth-sheet-form):nth-child(5) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.38s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active .auth-sheet-form > :nth-child(1) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.24s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active .auth-sheet-form > :nth-child(2) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.29s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active .auth-sheet-form > :nth-child(3) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.34s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active .auth-sheet-form > :nth-child(4) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.39s backwards;
}

.auth-sheet-overlay.active .auth-sheet-view.is-active .auth-sheet-form > :nth-child(5) {
    animation: authSheetStaggeredRise 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.44s backwards;
}

.auth-sheet-drag-zone {
    display: flex;
    justify-content: center;
    min-height: 28px;
    padding: 16px 24px 4px;
    touch-action: none;
}

.auth-sheet-handle {
    width: 42px;
    height: 3px;
    border-radius: 999px;
    background: rgba(231, 236, 242, 0.16);
    transition: background-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.auth-sheet-drag-zone.is-close-armed .auth-sheet-handle {
    background: #ff5f56;
    box-shadow: 0 0 0 1px rgba(224, 68, 62, 0.2), 0 0 18px rgba(255, 95, 86, 0.34);
}

.auth-sheet-header {
    padding: 0 20px 6px;
}

.auth-sheet-overline {
    margin: 0 0 5px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--auth-sheet-accent);
}

.auth-sheet-title {
    margin: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: clamp(1.56rem, 4.7vw, 1.84rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
    font-weight: 600;
}

.auth-sheet-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 0 20px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.032);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    isolation: isolate;
}

.auth-sheet-tabs[hidden] {
    display: none;
}

.auth-sheet-tab-indicator {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 0;
    width: 0;
    border-radius: 999px;
    background: rgba(220, 227, 235, 0.11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), width 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.auth-sheet-tab {
    appearance: none;
    border: none;
    position: relative;
    z-index: 1;
    border-radius: 999px;
    padding: 8px 12px;
    background: transparent;
    color: var(--auth-sheet-soft);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.auth-sheet-tab:hover {
    color: var(--auth-sheet-text);
}

.auth-sheet-tab.is-active {
    background: transparent;
    color: var(--auth-sheet-text);
}

.auth-sheet-message {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.55;
    white-space: pre-line;
    border: 1px solid transparent;
}

.auth-sheet-message[hidden] {
    display: none;
}

.auth-sheet-message.is-error {
    color: #ffd7d1;
    background: rgba(216, 132, 118, 0.12);
    border-color: rgba(216, 132, 118, 0.28);
}

.auth-sheet-message.is-success {
    color: #dff6e7;
    background: rgba(143, 194, 161, 0.12);
    border-color: rgba(143, 194, 161, 0.3);
}

.auth-sheet-body {
    position: relative;
    min-height: 0;
    overflow: auto;
    padding: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.auth-sheet-view {
    display: none;
}

.auth-sheet-view.is-active {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-sheet-view--primary {
    min-height: var(--auth-primary-view-min-height, 0px);
}

.auth-sheet-view-measure {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    visibility: hidden;
    pointer-events: none;
    display: flex !important;
    min-height: 0;
}

#loginView.auth-sheet-view--primary {
    gap: 14px;
    padding-top: 8px;
}

#loginView .auth-sheet-google-btn {
    margin-top: 4px;
}

#loginView .auth-sheet-form {
    gap: 10px;
    margin-top: 6px;
}

#loginView .auth-sheet-inline-row--spread {
    margin-top: 4px;
}

#loginView .auth-sheet-submit {
    width: min(100%, 82%);
    margin: auto auto 0;
}

#registerView .auth-sheet-submit,
#resetView .auth-sheet-submit {
    width: min(100%, 84%);
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
}

.auth-sheet-note {
    margin: 0;
    color: var(--auth-sheet-muted);
    font-size: 12px;
    line-height: 1.5;
}

.auth-sheet-form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.auth-sheet-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-sheet-label {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--auth-sheet-soft);
}

#loginModal .auth-sheet-input-proxy,
.auth-sheet-input-proxy {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 11px 13px;
    border-radius: 13px;
    border: 1px solid var(--auth-sheet-border);
    background: rgba(255, 255, 255, 0.042);
    color: var(--auth-sheet-text);
    font-size: 16px;
    line-height: 1.35;
    text-align: left;
    appearance: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: text !important;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    box-sizing: border-box;
}

#loginModal .auth-sheet-input-proxy.is-active,
.auth-sheet-input-proxy.is-active {
    border-color: var(--auth-sheet-link-accent) !important;
}

.auth-sheet-input-proxy.is-portaled .auth-sheet-input-proxy-value,
.auth-sheet-input-proxy.is-portaled .auth-sheet-input-proxy-placeholder {
    opacity: 0;
}

.auth-sheet-input-proxy-value {
    display: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-sheet-input-proxy.is-filled .auth-sheet-input-proxy-value {
    display: block;
}

.auth-sheet-input-proxy-placeholder {
    color: rgba(231, 236, 242, 0.28);
    font-size: 14px;
    line-height: 1.25;
}

.auth-sheet-input-proxy.is-filled .auth-sheet-input-proxy-placeholder {
    display: none;
}

#loginModal .auth-sheet-input,
.auth-sheet-input {
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 11px 13px;
    border-radius: 13px;
    border: 1px solid var(--auth-sheet-border) !important;
    background: rgba(255, 255, 255, 0.042) !important;
    color: var(--auth-sheet-text);
    font-size: 16px;
    line-height: 1.35;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    touch-action: pan-y;
    box-sizing: border-box;
    caret-color: var(--auth-sheet-link-accent) !important;
    cursor: text;
}

.auth-sheet-input--parked {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#loginModal .auth-sheet-input.auth-sheet-input--portaled,
.auth-sheet-input.auth-sheet-input--portaled,
#authInputPlane .auth-sheet-input.auth-sheet-input--portaled,
#loginModal .auth-sheet-input.auth-sheet-input--portaled:focus,
.auth-sheet-input.auth-sheet-input--portaled:focus,
#authInputPlane .auth-sheet-input.auth-sheet-input--portaled:focus {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    caret-color: var(--auth-sheet-link-accent) !important;
}

#loginModal .auth-sheet-input.auth-sheet-input--portaled::placeholder,
.auth-sheet-input.auth-sheet-input--portaled::placeholder {
    color: transparent;
}

#loginModal .auth-sheet-input.auth-sheet-input--proxy-hidden,
.auth-sheet-input.auth-sheet-input--proxy-hidden,
#loginModal .auth-sheet-input.auth-sheet-input--proxy-hidden:focus,
.auth-sheet-input.auth-sheet-input--proxy-hidden:focus {
    color: transparent !important;
    caret-color: transparent !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.auth-sheet-input::placeholder {
    color: rgba(231, 236, 242, 0.28);
    font-size: 14px;
}

#loginModal .auth-sheet-input:focus,
.auth-sheet-input:focus {
    border-color: var(--auth-sheet-link-accent) !important;
    background: rgba(255, 255, 255, 0.042) !important;
    box-shadow: none !important;
}

#loginModal .auth-sheet-input:-webkit-autofill,
#loginModal .auth-sheet-input:-webkit-autofill:hover,
#loginModal .auth-sheet-input:-webkit-autofill:focus,
.auth-sheet-input:-webkit-autofill,
.auth-sheet-input:-webkit-autofill:hover,
.auth-sheet-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--auth-sheet-text) !important;
    caret-color: var(--auth-sheet-link-accent) !important;
    border-color: var(--auth-sheet-border) !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.042) inset !important;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.042) inset !important;
    transition:
        background-color 9999s ease-in-out 0s,
        color 9999s ease-in-out 0s;
}

#loginModal .auth-sheet-input:-webkit-autofill:focus,
#loginModal .auth-sheet-input:-webkit-autofill:focus-visible,
.auth-sheet-input:-webkit-autofill:focus,
.auth-sheet-input:-webkit-autofill:focus-visible {
    border-color: var(--auth-sheet-link-accent) !important;
    -webkit-box-shadow:
        0 0 0 1000px rgba(255, 255, 255, 0.042) inset,
        0 0 0 3px rgba(159, 202, 255, 0.14) !important;
    box-shadow:
        0 0 0 1000px rgba(255, 255, 255, 0.042) inset,
        0 0 0 3px rgba(159, 202, 255, 0.14) !important;
}

#loginModal .auth-sheet-input:-moz-autofill,
#loginModal .auth-sheet-input:-moz-autofill:focus,
.auth-sheet-input:-moz-autofill,
.auth-sheet-input:-moz-autofill:focus {
    color: var(--auth-sheet-text) !important;
    caret-color: var(--auth-sheet-link-accent) !important;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.042) inset !important;
}

.auth-sheet-inline-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: end;
}

.auth-sheet-inline-group--code {
    grid-template-columns: minmax(0, 1fr) 104px;
    align-items: stretch;
}

.auth-sheet-field--code {
    min-width: 0;
}

.auth-sheet-input-proxy--code,
.auth-sheet-input--code {
    min-width: 0;
}

.auth-sheet-inline-group--code .auth-sheet-secondary {
    width: 104px;
    min-height: 44px;
    padding-left: 10px;
    padding-right: 10px;
    align-self: stretch;
    background: var(--auth-sheet-blue-soft);
    border-color: var(--auth-sheet-blue-border);
}

.auth-input-plane {
    position: fixed;
    inset: 0;
    z-index: 12090;
    isolation: isolate;
    pointer-events: none;
}

.auth-input-plane.is-active {
    pointer-events: none;
}

.auth-sheet-inline-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.auth-sheet-inline-row--spread {
    justify-content: space-between;
}

.auth-sheet-inline-row--center {
    justify-content: center;
}

.auth-sheet-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-sheet-muted);
    font-size: 12px;
    line-height: 1.45;
}

.auth-sheet-check--start {
    align-items: flex-start;
}

.auth-sheet-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--auth-sheet-accent);
    flex-shrink: 0;
}

.auth-sheet-check a {
    color: var(--auth-sheet-link-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(231, 236, 242, 0.2);
}

.auth-sheet-link {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    color: var(--auth-sheet-link-accent);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.auth-sheet-link:hover {
    color: #f2f5f8;
}

.auth-sheet-submit,
.auth-sheet-secondary,
.auth-sheet-google-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.auth-sheet-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--auth-sheet-text);
    font-size: 13px;
    font-weight: 600;
}

.auth-sheet-google-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.auth-sheet-google-btn img {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.google-login-btn.is-loading,
.auth-sheet-google-btn.is-loading {
    pointer-events: none !important;
    opacity: 0.75;
}

.google-login-btn__spinner {
    margin-right: 8px;
}

.auth-sheet-google-btn.gsi-hidden {
    display: none;
}

.auth-admin-badge {
    color: #fbbf24;
}

.auth-sheet-divider {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    justify-content: center;
    justify-items: center;
    column-gap: 18px;
    width: min(100%, calc(100% - 28px));
    margin: 0 auto;
    color: var(--auth-sheet-soft);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-sheet-divider::before,
.auth-sheet-divider::after {
    content: "";
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

#loginModal .auth-sheet-submit,
#loginModal .auth-sheet-submit.login-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    width: 100%;
    padding: 11px 15px;
    background: #eef2f6 !important;
    color: #0f1317 !important;
    border: 1px solid rgba(237, 241, 245, 0.78) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
    font-size: 14px;
    font-weight: 700;
}

#loginModal .auth-sheet-submit:hover,
#loginModal .auth-sheet-submit.login-submit-btn:hover {
    transform: translateY(-1px);
    background: #f6f8fb !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

#loginModal .auth-sheet-submit:disabled,
.auth-sheet-submit:disabled,
.auth-sheet-secondary:disabled,
.auth-sheet-google-btn:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
    box-shadow: none;
}

.auth-sheet-secondary {
    min-height: 44px;
    padding: 0 13px;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--auth-sheet-text);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.auth-sheet-secondary:hover {
    transform: translateY(-1px);
    background: var(--auth-sheet-blue-soft-strong);
    border-color: rgba(139, 184, 232, 0.42);
}

#loginModal .auth-sheet-inline-group--code .verify-code-btn,
#loginModal .auth-sheet-inline-group--code .verify-code-btn:hover,
#loginModal .auth-sheet-inline-group--code .verify-code-btn:active,
#loginModal .auth-sheet-inline-group--code .verify-code-btn:focus-visible {
    color: var(--auth-sheet-text) !important;
}

#loginModal .auth-sheet-inline-group--code .verify-code-btn:hover {
    background: var(--auth-sheet-blue-soft-strong) !important;
    border-color: rgba(139, 184, 232, 0.42) !important;
}

#loginModal .auth-sheet-inline-group--code .verify-code-btn:active,
#loginModal .auth-sheet-inline-group--code .verify-code-btn:focus-visible,
.auth-sheet-inline-group--code .auth-sheet-secondary:active,
.auth-sheet-inline-group--code .auth-sheet-secondary:focus-visible {
    background: var(--auth-sheet-blue-bright-soft);
    border-color: var(--auth-sheet-blue-bright);
    box-shadow: 0 0 0 3px rgba(139, 184, 232, 0.16);
}

.auth-sheet-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(23, 24, 28, 0.28);
    border-top-color: #17181c;
    animation: authSheetSpin 0.8s linear infinite;
}

@keyframes authSheetSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (min-width: 769px) {
    .auth-sheet-overlay {
        align-items: center;
        padding: 24px;
    }

    .auth-sheet-stage {
        width: min(100%, 480px);
    }

    .auth-sheet-drag-zone {
        display: none;
    }

    .auth-sheet {
        border-radius: 28px;
    }

    .auth-sheet-motion-shell {
        padding-bottom: 0;
    }

    .auth-sheet-header {
        padding-top: 18px;
    }

    .auth-sheet-overlay.auth-sheet-input-active .auth-sheet-body {
        padding-bottom: 0;
    }

    #loginModal .auth-sheet-input-proxy,
    .auth-sheet-input-proxy.auth-sheet-input-proxy--desktop-hidden {
        display: none;
    }

    #loginModal .auth-sheet-input.auth-sheet-input--canonical,
    .auth-sheet-input.auth-sheet-input--canonical,
    #loginModal .auth-sheet-input.auth-sheet-input--canonical.auth-sheet-input--parked,
    .auth-sheet-input.auth-sheet-input--canonical.auth-sheet-input--parked {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 11px 13px !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: auto !important;
        border: 1px solid var(--auth-sheet-border) !important;
        background: rgba(255, 255, 255, 0.042) !important;
    }

    #loginModal .auth-sheet-input.auth-sheet-input--canonical:focus,
    #loginModal .auth-sheet-input.auth-sheet-input--canonical:focus-visible,
    .auth-sheet-input.auth-sheet-input--canonical:focus,
    .auth-sheet-input.auth-sheet-input--canonical:focus-visible,
    #loginModal .auth-sheet-input.auth-sheet-input--canonical.auth-sheet-input--parked:focus,
    #loginModal .auth-sheet-input.auth-sheet-input--canonical.auth-sheet-input--parked:focus-visible,
    .auth-sheet-input.auth-sheet-input--canonical.auth-sheet-input--parked:focus,
    .auth-sheet-input.auth-sheet-input--canonical.auth-sheet-input--parked:focus-visible {
        border-color: var(--auth-sheet-link-accent) !important;
        background: rgba(255, 255, 255, 0.042) !important;
        box-shadow: 0 0 0 3px rgba(159, 202, 255, 0.14) !important;
    }

    .auth-input-plane {
        display: none;
    }
}

@media (max-width: 768px) {
    .auth-sheet-overlay.auth-sheet-input-active .auth-sheet-body {
        padding-bottom: calc(min(360px, 42svh) + env(safe-area-inset-bottom));
    }

    .top-right-nav {
        top: 20px;
        right: 16px;
    }

    .auth-sheet-overlay {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: var(--auth-sheet-mobile-bottom-inset);
    }

    .auth-sheet-stage {
        width: 100%;
    }

    .auth-sheet {
        width: 100%;
        max-height: 88svh;
        border-radius: 20px 20px 0 0;
    }

    .auth-sheet-motion-shell {
        padding-bottom: 7px;
    }

    .auth-sheet-form-core {
        padding: 10px 20px calc(14px + env(safe-area-inset-bottom));
    }

    .auth-sheet-header {
        padding: 0 20px 6px;
    }

    .auth-sheet-tabs {
        margin-left: 20px;
        margin-right: 20px;
    }

    .auth-sheet-inline-group {
        grid-template-columns: 1fr;
    }

    .auth-sheet-inline-group--code {
        grid-template-columns: minmax(0, 1fr) 104px;
    }

    .auth-sheet-inline-row--spread {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    /*
      iOS Safari caret stability:
      flatten auth-sheet motion only while an input is focused, and give the
      portaled real input a tiny paint layer so the caret is composited
      against the input itself instead of a fully transparent surface.
    */
    .auth-sheet-overlay.active:focus-within,
    .auth-sheet-overlay.ios-focus-lock {
        transform: none !important;
        will-change: auto !important;
    }

    .auth-sheet-overlay.active:focus-within .auth-sheet-motion-shell,
    .auth-sheet-overlay.active:focus-within .auth-sheet-form-core,
    .auth-sheet-overlay.ios-focus-lock .auth-sheet-motion-shell,
    .auth-sheet-overlay.ios-focus-lock .auth-sheet-form-core {
        transform: none !important;
        opacity: 1 !important;
        animation: none !important;
        transition: none !important;
        will-change: auto !important;
    }

    .auth-sheet-overlay.active:focus-within .auth-sheet-input.auth-sheet-input--portaled,
    .auth-sheet-overlay.active:focus-within .auth-sheet-input.auth-sheet-input--portaled:focus,
    .auth-sheet-overlay.ios-focus-lock .auth-sheet-input.auth-sheet-input--portaled,
    .auth-sheet-overlay.ios-focus-lock .auth-sheet-input.auth-sheet-input--portaled:focus {
        background: rgba(12, 14, 18, 0.015) !important;
        opacity: 1 !important;
        color: var(--auth-sheet-text) !important;
        caret-color: #ffffff !important;
        text-indent: 0 !important;
        text-align: left !important;
        text-shadow: none !important;
    }

    .auth-sheet-overlay.active:focus-within .auth-sheet-input.auth-sheet-input--portaled::placeholder,
    .auth-sheet-overlay.active:focus-within .auth-sheet-input.auth-sheet-input--portaled::-webkit-input-placeholder,
    .auth-sheet-overlay.ios-focus-lock .auth-sheet-input.auth-sheet-input--portaled::placeholder,
    .auth-sheet-overlay.ios-focus-lock .auth-sheet-input.auth-sheet-input--portaled::-webkit-input-placeholder {
        color: transparent !important;
        -webkit-text-fill-color: transparent !important;
    }
}

@media (max-width: 420px) {
    .auth-sheet-title {
        font-size: 1.46rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .auth-sheet-overlay,
    .auth-sheet-backdrop,
    .auth-sheet-stage,
    .auth-sheet,
    .auth-sheet-tab,
    .auth-sheet-input,
    .auth-sheet-submit,
    .auth-sheet-secondary,
    .auth-sheet-google-btn,
    .auth-sheet-link {
        transition: none;
    }

    .auth-sheet-spinner {
        animation: none;
    }
}
