/* Auth-dialog composition. Loaded after popup.css so it can safely consolidate legacy modal rules. */
@media (min-width: 641px) {
    .bicbot-login-overlay {
        box-sizing: border-box;
        min-height: 100dvh;
        padding: 28px;
        overflow: hidden;
        background: rgba(0, 0, 0, .10);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    .bicbot-login-overlay::before,
    .bicbot-login-overlay::after {
        display: none;
    }

    .bicbot-login-dialog {
        --auth-brand: #595cf1;
        --auth-ink: #263861;
        --auth-muted: #7b8caf;
        position: relative;
        display: flex;
        flex-direction: column;
        width: min(760px, calc(100vw - 56px));
        height: auto;
        min-height: 690px;
        max-height: calc(100dvh - 56px);
        overflow: hidden;
        scrollbar-width: none;
        border: 0;
        border-radius: 26px;
        background: rgba(255, 255, 255, .985);
        box-shadow: 0 22px 58px rgba(20, 28, 52, .22), 0 4px 14px rgba(20, 28, 52, .08);
    }

    .bicbot-login-dialog::-webkit-scrollbar { display: none; }

    .bicbot-login-dialog::before {
        position: absolute;
        bottom: -64px;
        left: -58px;
        z-index: 0;
        width: 232px;
        height: 232px;
        background: url("../icons/auth-dialog-watermark.svg") center / contain no-repeat;
        content: "";
        opacity: .82;
        pointer-events: none;
    }

    .bicbot-login-dialog::after {
        display: none;
    }

    .bicbot-login-dialog > * {
        position: relative;
        z-index: 1;
    }

    .bicbot-login-dialog > .bicbot-login-form {
        position: relative;
        z-index: 2;
    }

    .bicbot-login-dialog > .dialog-header {
        flex: 0 0 auto;
        min-height: 112px;
        padding: 30px 46px 16px 104px;
    }

    .bicbot-login-dialog > .dialog-header h3 {
        min-height: 48px;
        color: var(--auth-ink);
        font-size: 29px;
        font-weight: 760;
        letter-spacing: -.035em;
        line-height: 1.14;
    }

    .bicbot-login-dialog > .dialog-header h3::before {
        top: 0;
        left: -65px;
        width: 48px;
        height: 48px;
        border-radius: 0;
        background: url("../icons/auth-hex-cube-mark.svg") center / contain no-repeat;
        box-shadow: none;
    }

    .bicbot-login-dialog > .dialog-header h3::after {
        bottom: -13px;
        color: var(--auth-muted);
        content: var(--auth-tagline, "Intelligent operations · Reliable delivery");
        font-size: 14px;
        font-weight: 540;
        letter-spacing: .01em;
    }

    .bicbot-login-dialog > .dialog-header .close-btn {
        top: 30px;
        right: 34px;
        width: 34px;
        min-width: 34px;
        height: 34px;
        color: #66789d;
        font-size: 28px;
    }

    .bicbot-login-form {
        box-sizing: border-box;
        width: min(490px, calc(100% - 144px));
        margin: 0 auto;
        gap: 16px;
        padding: 12px 0 26px;
    }

    .bicbot-auth-method-tabs {
        gap: 4px;
        padding: 4px;
        border: 0;
        border-radius: 12px;
        background: #f5f6fa;
    }

    .bicbot-auth-method-tab {
        min-height: 52px;
        border-radius: 9px;
        color: #7b8caf;
        font-size: 16px;
        font-weight: 700;
    }

    .bicbot-auth-method-tab.is-active {
        background: linear-gradient(115deg, #555af0 0%, #6a56ed 100%);
        box-shadow: 0 5px 11px rgba(79, 75, 231, .18);
    }

    .bicbot-login-field {
        gap: 7px;
        color: #344871;
        font-size: 15px;
        font-weight: 700;
    }

    .bicbot-login-field input {
        box-sizing: border-box;
        height: 54px;
        border: 0;
        border-radius: 11px;
        background-color: #f7f8fb;
        box-shadow: none;
        color: #31436a;
        font-size: 16px;
    }

    .bicbot-login-field input:focus {
        outline: 0;
        border-color: transparent;
        box-shadow: 0 0 0 1px rgba(89, 92, 241, .68), 0 2px 7px rgba(89, 92, 241, .09);
    }

    .bicbot-auth-phone-field > input,
    .bicbot-auth-phone-field > .bicbot-auth-input-icon > input,
    .bicbot-auth-code-field .bicbot-code-row input {
        padding-left: 48px;
        background-color: #f7f8fb;
        background-repeat: no-repeat;
        background-position: 17px center;
        background-size: 21px 21px;
    }

    .bicbot-auth-phone-field > input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7096' stroke-width='1.8'%3E%3Crect x='6.5' y='2.8' width='11' height='18.4' rx='1.8'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E");
    }

    .bicbot-auth-code-field .bicbot-code-row input {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7096' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 19 6v5c0 4.7-2.9 8.1-7 10-4.1-1.9-7-5.3-7-10V6l7-3Z'/%3E%3Cpath d='m9.2 11.8 1.8 1.8 3.9-4'/%3E%3C/svg%3E");
    }

    /* Keep credential fields on the same icon and text baseline as phone sign-in. */
    .bicbot-password-input-wrap > input {
        padding-left: 48px;
        background-color: #f7f8fb;
        background-repeat: no-repeat;
        background-position: 17px center;
        background-size: 21px 21px;
    }

    .bicbot-login-dialog .bicbot-login-field input[type="password"] {
        padding-left: 48px;
        background-color: #f7f8fb;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7096' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.2' width='13' height='9.3' rx='2'/%3E%3Cpath d='M8.5 10.2V7.6a3.5 3.5 0 0 1 7 0v2.6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: 17px center;
        background-size: 21px 21px;
    }

    /* Keep credential icons visible when the browser paints an autofill layer. */
    .bicbot-auth-input-icon::before {
        content: "";
        position: absolute;
        z-index: 2;
        top: 50%;
        left: 17px;
        width: 21px;
        height: 21px;
        transform: translateY(-50%);
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        pointer-events: none;
    }

    .bicbot-auth-input-icon--account::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7096' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7.5' r='3.3'/%3E%3Cpath d='M5.3 20c.8-3.4 3.2-5.2 6.7-5.2s5.9 1.8 6.7 5.2'/%3E%3C/svg%3E");
    }

    .bicbot-auth-input-icon--password::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7096' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.2' width='13' height='9.3' rx='2'/%3E%3Cpath d='M8.5 10.2V7.6a3.5 3.5 0 0 1 7 0v2.6'/%3E%3C/svg%3E");
    }

    .bicbot-auth-input-icon--phone::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7096' stroke-width='1.8'%3E%3Crect x='6.5' y='2.8' width='11' height='18.4' rx='1.8'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E");
    }

    .bicbot-login-dialog .bicbot-login-field .bicbot-auth-input-icon > input {
        background-image: none;
    }

    .bicbot-reset-success-panel {
        position: absolute;
        z-index: 8;
        inset: 86px 44px 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 32px;
        color: #24365e;
        text-align: center;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid #dce8e3;
        border-radius: 22px;
        box-shadow: 0 22px 60px rgba(34, 57, 81, 0.16);
        opacity: 1 !important;
        transform: none !important;
    }

    .bicbot-reset-success-panel:focus { outline: none; }

    .bicbot-reset-success-icon {
        width: 72px;
        height: 72px;
        display: grid;
        place-items: center;
        color: #16845b;
        background: linear-gradient(145deg, #e2faef, #f4fff9);
        border: 1px solid #b9ebd4;
        border-radius: 50%;
        box-shadow: 0 12px 28px rgba(22, 132, 91, 0.16);
    }

    .bicbot-reset-success-icon svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
    .bicbot-reset-success-panel strong { max-width: 460px; margin-top: 20px; font-size: 24px; line-height: 1.35; }
    .bicbot-reset-success-panel p { margin: 10px 0 22px; color: #657594; font-size: 15px; }
    .bicbot-reset-success-progress { width: min(280px, 80%); height: 5px; overflow: hidden; background: #e8edf4; border-radius: 999px; }
    .bicbot-reset-success-progress i { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #2cac79, #5264ec); transform-origin: left; animation: bicbot-reset-success-progress 2s linear forwards; }

    @keyframes bicbot-reset-success-progress {
        from { transform: scaleX(0); }
        to { transform: scaleX(1); }
    }

    .bicbot-code-row {
        grid-template-columns: minmax(0, 1fr) 150px;
        gap: 10px;
    }

    .bicbot-code-btn {
        width: 150px;
        height: 54px;
        border: 0;
        border-radius: 11px;
        color: #4f57e5;
        background: #f1f2f7;
        font-size: 15px;
        box-shadow: none;
    }

    .bicbot-human-dialog { max-width: 390px; }
    .bicbot-human-captcha { display:flex; align-items:center; gap:10px; margin:18px 0 12px; }
    .bicbot-human-captcha img { width:190px; height:64px; object-fit:contain; border:1px solid #dce3f4; border-radius:10px; background:#f7f9ff; }
    .bicbot-human-captcha button { border:0; background:transparent; color:#5660dc; cursor:pointer; white-space:nowrap; }
    .bicbot-human-answer { box-sizing:border-box; width:100%; height:48px; border:1px solid #ccd5ea; border-radius:10px; padding:0 14px; font-size:16px; }
    .bicbot-human-dialog .bicbot-login-submit { width:100%; margin-top:14px; }

    .bicbot-legal-consent {
        min-height: 20px;
        margin-top: 0;
        gap: 7px;
        color: #7385a9;
        font-size: 14px;
        line-height: 20px;
    }

    .bicbot-legal-consent input {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
        margin-top: 0;
    }

    .bicbot-login-assist {
        min-height: 19px;
        margin-top: 0;
        color: #7a8bae;
        font-size: 14px;
    }

    .bicbot-login-actions {
        gap: 12px;
        margin-top: 0;
        padding-top: 0;
    }

    .bicbot-login-actions .bicbot-secondary-btn,
    .bicbot-login-actions .bicbot-primary-btn {
        min-width: 0;
        min-height: 50px;
        border: 0;
        border-radius: 11px;
        font-size: 16px;
        font-weight: 720;
    }

    .bicbot-login-actions .bicbot-primary-btn:hover {
        box-shadow: 0 10px 19px rgba(76, 73, 230, .24);
        transform: translateY(-1px);
    }

    .bicbot-login-actions .bicbot-secondary-btn {
        width: 174px;
        background: #f1f2f7;
        box-shadow: none;
    }

    .bicbot-login-actions .bicbot-primary-btn {
        width: 188px;
        box-shadow: 0 7px 14px rgba(76, 73, 230, .18);
    }

    .bicbot-login-overlay[data-mode="login"] .bicbot-login-form {
        height: 578px;
        justify-content: space-between;
        gap: 0;
    }
}

.bicbot-human-dialog { max-width: 390px; padding-bottom: 26px; }
.bicbot-human-captcha { display:flex; align-items:center; gap:12px; margin:18px 0 14px; }
.bicbot-human-captcha img { width:232px; height:76px; object-fit:contain; border:1px solid #dce3f4; border-radius:12px; background:#f7f9ff; }
.bicbot-human-refresh { border:0; background:transparent; color:#4f57e5; cursor:pointer; font-weight:700; white-space:nowrap; transition:color .2s,transform .2s; }
.bicbot-human-refresh:hover { color:#3038c9; transform:translateY(-1px); }
.bicbot-human-refresh:disabled { opacity:.55; cursor:wait; }
.bicbot-human-answer { box-sizing:border-box; width:100%; height:52px; border:1px solid #cfd8ef; border-radius:12px; padding:0 15px; font-size:16px; outline:0; transition:border-color .2s,box-shadow .2s; }
.bicbot-human-answer:focus { border-color:#5262e8; box-shadow:0 0 0 3px rgba(82,98,232,.15); }
.bicbot-human-submit { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; height:52px; margin-top:16px; border:0; border-radius:12px; color:#fff; background:linear-gradient(135deg,#5368eb,#4146d8); box-shadow:0 10px 20px rgba(65,70,216,.26); cursor:pointer; font-size:16px; font-weight:750; letter-spacing:.2px; transition:transform .18s,box-shadow .18s; }
.bicbot-human-submit:hover { transform:translateY(-1px); box-shadow:0 13px 25px rgba(65,70,216,.31); }
.bicbot-human-submit:active { transform:translateY(0); }

/* Keep every registration/recovery control visible on compact desktop screens without introducing a scroll area. */
@media (min-width: 641px) and (max-height: 880px) {
    .bicbot-login-overlay { padding: 12px; }

    .bicbot-login-dialog {
        width: min(720px, calc(100vw - 24px));
        min-height: 0;
        max-height: calc(100dvh - 24px);
        border-radius: 24px;
    }

    .bicbot-login-dialog > .dialog-header {
        min-height: 70px;
        padding: 14px 42px 5px 88px;
    }

    .bicbot-login-dialog > .dialog-header h3 { min-height: 37px; font-size: 23px; }
    .bicbot-login-dialog > .dialog-header h3::before { left: -53px; width: 40px; height: 40px; }
    .bicbot-login-dialog > .dialog-header h3::after { bottom: -11px; font-size: 12px; }
    .bicbot-login-dialog > .dialog-header .close-btn { top: 18px; right: 27px; font-size: 25px; }

    .bicbot-login-form { width: min(520px, calc(100% - 120px)); gap: 8px; padding: 6px 0 11px; }
    .bicbot-auth-method-tabs { padding: 4px; border-radius: 12px; }
    .bicbot-auth-method-tab { min-height: 44px; border-radius: 8px; font-size: 14px; }
    .bicbot-login-field { gap: 5px; font-size: 14px; }
    .bicbot-login-field input { height: 42px; border-radius: 9px; font-size: 14px; }
    .bicbot-auth-phone-field > input, .bicbot-auth-phone-field > .bicbot-auth-input-icon > input, .bicbot-auth-code-field .bicbot-code-row input, .bicbot-password-input-wrap > input { padding-left: 41px; background-position: 14px center; background-size: 20px 20px; }
    .bicbot-login-dialog .bicbot-login-field input[type="password"] { padding-left: 41px; background-position: 14px center; background-size: 20px 20px; }
    .bicbot-auth-input-icon::before { left: 14px; width: 20px; height: 20px; }
    .bicbot-code-row { grid-template-columns: minmax(0, 1fr) 122px; gap: 8px; }
    .bicbot-code-btn { width: 122px; height: 42px; border-radius: 9px; font-size: 13px; }
    .bicbot-legal-consent, .bicbot-login-assist { min-height: 17px; font-size: 12px; line-height: 17px; }
    .bicbot-legal-consent { gap: 6px; }
    .bicbot-legal-consent input { width: 17px; height: 17px; flex-basis: 17px; }
    .bicbot-login-actions { margin-top: 0; }
    .bicbot-login-actions .bicbot-secondary-btn, .bicbot-login-actions .bicbot-primary-btn { min-height: 42px; border-radius: 9px; font-size: 14px; }
    .bicbot-login-actions .bicbot-secondary-btn { width: 154px; }
    .bicbot-login-actions .bicbot-primary-btn { width: 168px; }
    .bicbot-login-overlay[data-mode="login"] .bicbot-login-form { height: auto; justify-content: flex-start; gap: 8px; }
    .bicbot-login-dialog::before { width: 152px; height: 152px; bottom: -44px; left: -38px; opacity: .66; }
}

@media (prefers-color-scheme: dark) {
    .bicbot-login-overlay {
        background: rgba(2, 6, 15, .62);
        backdrop-filter: blur(7px);
        -webkit-backdrop-filter: blur(7px);
    }

    .bicbot-login-dialog {
        --auth-brand: #8395ff;
        --auth-ink: #edf2ff;
        --auth-muted: #96a5bf;
        color: #e8eef9;
        background: rgba(15, 24, 40, .985);
        border: 1px solid #2a3953;
        box-shadow: 0 28px 76px rgba(0, 0, 0, .58), 0 5px 18px rgba(0, 0, 0, .3);
    }

    .bicbot-login-dialog::before {
        opacity: .28;
    }

    .bicbot-login-dialog > .dialog-header .close-btn,
    .bicbot-login-field,
    .bicbot-legal-consent,
    .bicbot-login-assist {
        color: #aab7cc;
    }

    .bicbot-auth-method-tabs {
        background: #182338;
        border: 1px solid #263650;
    }

    .bicbot-auth-method-tab {
        color: #9ba9bf;
    }

    .bicbot-login-field input,
    .bicbot-auth-phone-field > input,
    .bicbot-auth-phone-field > .bicbot-auth-input-icon > input,
    .bicbot-auth-code-field .bicbot-code-row input,
    .bicbot-password-input-wrap > input,
    .bicbot-login-dialog .bicbot-login-field input[type="password"] {
        color: #edf2fa;
        background-color: #182338;
        border-color: #2b3b56;
        -webkit-text-fill-color: #edf2fa;
        caret-color: #8da0ff;
    }

    .bicbot-login-field input::placeholder,
    .bicbot-human-answer::placeholder {
        color: #7f8da4;
        -webkit-text-fill-color: #7f8da4;
    }

    .bicbot-login-field input:-webkit-autofill,
    .bicbot-login-field input:-webkit-autofill:hover,
    .bicbot-login-field input:-webkit-autofill:focus {
        box-shadow: 0 0 0 1000px #182338 inset;
        -webkit-text-fill-color: #edf2fa;
    }

    .bicbot-code-btn,
    .bicbot-login-actions .bicbot-secondary-btn {
        color: #aebaff;
        background: #202c43;
        border-color: #334563;
    }

    .bicbot-human-dialog,
    .bicbot-reset-success-panel {
        color: #edf2fa;
        background: #111a2b;
        border-color: #2d3d57;
        box-shadow: 0 24px 64px rgba(0, 0, 0, .52);
    }

    .bicbot-human-captcha img,
    .bicbot-human-answer {
        color: #edf2fa;
        background: #182338;
        border-color: #334563;
    }

    .bicbot-reset-success-panel p {
        color: #a4b1c6;
    }

    .bicbot-reset-success-icon {
        color: #64dbad;
        background: linear-gradient(145deg, #12372d, #162f2a);
        border-color: #285b49;
    }

    .bicbot-reset-success-progress {
        background: #26334a;
    }
}

/* Account cancellation: compact, deliberate danger confirmation. */
.bicbot-cancel-account-overlay {
    padding: 24px;
    background: rgba(19, 27, 42, .48);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-dialog {
    width: min(520px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    color: var(--qa-text-primary);
    background: var(--qa-bg-surface);
    border: 1px solid var(--qa-border);
    border-radius: 22px;
    box-shadow: 0 28px 72px rgba(20, 29, 47, .3), 0 6px 18px rgba(20, 29, 47, .12);
}

.bicbot-cancel-account-overlay .dialog-header {
    min-height: 74px;
    padding: 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--qa-bg-surface);
    border-bottom: 1px solid var(--qa-border);
}

.bicbot-cancel-account-overlay .dialog-header h3 {
    margin: 0;
    color: var(--qa-text-primary);
    font-size: 20px;
    font-weight: 720;
    letter-spacing: -.02em;
}

.bicbot-cancel-account-overlay .dialog-header .close-btn {
    position: static;
    width: 36px;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--qa-text-tertiary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 25px;
    line-height: 1;
}

.bicbot-cancel-account-overlay .dialog-header .close-btn:hover,
.bicbot-cancel-account-overlay .dialog-header .close-btn:focus-visible {
    color: var(--qa-text-primary);
    background: var(--qa-bg-muted);
    border-color: var(--qa-border);
}

.bicbot-cancel-account-overlay .bicbot-login-form {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-content {
    margin: 24px 26px 0;
    padding: 18px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 15px;
    align-items: flex-start;
    background: color-mix(in srgb, var(--qa-danger) 6%, var(--qa-bg-surface));
    border: 1px solid color-mix(in srgb, var(--qa-danger) 24%, var(--qa-border));
    border-radius: 16px;
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: var(--qa-danger);
    background: color-mix(in srgb, var(--qa-danger) 12%, var(--qa-bg-surface));
    border: 1px solid color-mix(in srgb, var(--qa-danger) 26%, transparent);
    border-radius: 15px;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--qa-danger) 10%, transparent);
    font-size: 23px;
    font-weight: 800;
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-copy {
    gap: 7px;
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-message {
    color: var(--qa-text-primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.55;
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-warning {
    color: var(--qa-danger);
    font-size: 13px;
    font-weight: 550;
    line-height: 1.65;
}

.bicbot-cancel-account-overlay .bicbot-login-field {
    margin: 22px 26px 0;
    gap: 8px;
    color: var(--qa-text-primary);
    font-size: 14px;
    font-weight: 650;
}

.bicbot-cancel-account-overlay .bicbot-code-row {
    grid-template-columns: minmax(0, 1fr) 142px;
    gap: 10px;
}

.bicbot-cancel-account-overlay .bicbot-login-field input,
.bicbot-cancel-account-overlay .bicbot-code-btn {
    height: 50px;
    border-radius: 11px;
}

.bicbot-cancel-account-overlay .bicbot-login-field input {
    padding: 0 15px;
    color: var(--qa-text-primary);
    -webkit-text-fill-color: var(--qa-text-primary);
    caret-color: var(--qa-brand-500);
    background: var(--qa-bg-muted);
    border: 1px solid var(--qa-border-strong);
    box-shadow: none;
}

.bicbot-cancel-account-overlay .bicbot-login-field input::placeholder {
    color: var(--qa-text-tertiary);
    -webkit-text-fill-color: var(--qa-text-tertiary);
}

.bicbot-cancel-account-overlay .bicbot-login-field input:focus {
    border-color: var(--qa-brand-500);
    box-shadow: var(--qa-focus-ring);
}

.bicbot-cancel-account-overlay .bicbot-code-btn {
    width: 142px;
    color: var(--qa-brand-600);
    background: var(--qa-brand-50);
    border: 1px solid var(--qa-brand-200);
    font-size: 14px;
    font-weight: 700;
}

.bicbot-cancel-account-overlay .bicbot-password-status {
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.5;
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-actions {
    margin-top: 24px;
    padding: 18px 26px 24px;
    gap: 10px;
    background: color-mix(in srgb, var(--qa-bg-canvas) 55%, var(--qa-bg-surface));
    border-top: 1px solid var(--qa-border);
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-actions .bicbot-secondary-btn,
.bicbot-cancel-account-overlay .bicbot-delete-confirm-actions .bicbot-primary-btn {
    min-width: 124px;
    height: 46px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-actions .bicbot-secondary-btn {
    color: var(--qa-text-secondary);
    background: var(--qa-bg-surface);
    border: 1px solid var(--qa-border-strong);
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-actions .bicbot-secondary-btn:hover {
    color: var(--qa-text-primary);
    background: var(--qa-bg-muted);
    border-color: var(--qa-brand-200);
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-actions .bicbot-danger-btn {
    color: #ffffff;
    background: #dc3f4d;
    border: 1px solid #dc3f4d;
    box-shadow: 0 8px 18px rgba(220, 63, 77, .22);
}

.bicbot-cancel-account-overlay .bicbot-delete-confirm-actions .bicbot-danger-btn:hover:not(:disabled) {
    background: #c93341;
    border-color: #c93341;
    transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
    .bicbot-cancel-account-overlay {
        background: rgba(2, 6, 15, .7);
    }

    .bicbot-cancel-account-overlay .bicbot-delete-confirm-dialog {
        box-shadow: 0 30px 78px rgba(0, 0, 0, .62);
    }
}

@media (max-width: 560px) {
    .bicbot-cancel-account-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .bicbot-cancel-account-overlay .bicbot-delete-confirm-dialog {
        width: 100%;
        max-height: calc(100dvh - 24px);
        border-radius: 20px;
    }

    .bicbot-cancel-account-overlay .dialog-header {
        min-height: 66px;
        padding: 0 20px;
    }

    .bicbot-cancel-account-overlay .bicbot-delete-confirm-content {
        margin: 18px 18px 0;
        padding: 16px;
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .bicbot-cancel-account-overlay .bicbot-delete-confirm-icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .bicbot-cancel-account-overlay .bicbot-login-field {
        margin: 18px 18px 0;
    }

    .bicbot-cancel-account-overlay .bicbot-code-row {
        grid-template-columns: 1fr;
    }

    .bicbot-cancel-account-overlay .bicbot-code-btn {
        width: 100%;
    }

    .bicbot-cancel-account-overlay .bicbot-delete-confirm-actions {
        margin-top: 20px;
        padding: 16px 18px 18px;
        flex-direction: column-reverse;
    }

    .bicbot-cancel-account-overlay .bicbot-delete-confirm-actions .bicbot-secondary-btn,
    .bicbot-cancel-account-overlay .bicbot-delete-confirm-actions .bicbot-primary-btn {
        width: 100%;
    }
}

/* Compact phone auth sheet. Inputs stay at 16px to prevent iOS zoom. */
@media (max-width: 640px) {
    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) {
        align-items: flex-end !important;
        padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)) !important;
        overflow: hidden !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-dialog {
        width: 100% !important;
        max-width: 420px !important;
        max-height: calc(100dvh - max(20px, env(safe-area-inset-top) + env(safe-area-inset-bottom))) !important;
        margin: 0 auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        border-radius: 22px !important;
        overscroll-behavior: contain;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-dialog::before {
        width: 110px !important;
        height: 110px !important;
        opacity: .45 !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-dialog > .dialog-header {
        min-height: 76px !important;
        padding: 14px 60px 10px 72px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-dialog > .dialog-header h3 {
        min-height: 32px !important;
        font-size: 22px !important;
        line-height: 28px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-dialog > .dialog-header h3::before {
        left: -54px !important;
        width: 42px !important;
        height: 42px !important;
        border-radius: 13px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-dialog > .dialog-header h3::after {
        bottom: -14px !important;
        font-size: 11px !important;
        line-height: 16px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-dialog > .dialog-header .close-btn {
        top: 12px !important;
        right: 12px !important;
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
        font-size: 24px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-form {
        width: 100% !important;
        gap: 10px !important;
        margin: 0 !important;
        padding: 8px 16px 16px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-auth-method-tabs {
        padding: 3px !important;
        border-radius: 12px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-auth-method-tab {
        min-height: 44px !important;
        padding: 8px !important;
        border-radius: 10px !important;
        font-size: 14px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-field {
        gap: 5px !important;
        font-size: 13px !important;
        line-height: 18px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-field input,
    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-code-btn {
        height: 48px !important;
        min-height: 48px !important;
        border-radius: 11px !important;
        font-size: 16px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-auth-phone-field > input,
    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-auth-phone-field > .bicbot-auth-input-icon > input,
    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-auth-code-field .bicbot-code-row input,
    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-password-input-wrap > input {
        padding-left: 42px !important;
        background-position: 13px center !important;
        background-size: 19px 19px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-code-row {
        grid-template-columns: minmax(0, 1fr) 112px !important;
        gap: 8px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-code-btn {
        width: 112px !important;
        padding: 0 8px !important;
        font-size: 13px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-options,
    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-agreement,
    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-remember-row {
        font-size: 12px !important;
        line-height: 18px !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-actions {
        gap: 8px !important;
        margin-top: 2px !important;
        padding: 0 !important;
    }

    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-actions .bicbot-secondary-btn,
    .bicbot-login-overlay:not(.bicbot-cancel-account-overlay) .bicbot-login-actions .bicbot-primary-btn {
        width: auto !important;
        min-width: 0 !important;
        min-height: 48px !important;
        border-radius: 11px !important;
        font-size: 15px !important;
    }
}
