/*
 * App UI layer
 * Final shared layer, loaded after feature styles. Keep page layouts in their
 * own files; shared tokens and components belong here.
 */

:root {
    color-scheme: light;
    --app-accent: #171717;
    --app-accent-strong: #303030;
    --app-accent-soft: #f1f1f1;
    --primary-color: #171717;
    --primary-hover: #303030;
    --primary-soft: #f1f1f1;
    --biz-primary: #171717;
    --app-surface: #ffffff;
    --app-canvas: #f7f9fc;
    --app-border: #e3e8f0;
    --app-ink: #172033;
    --app-muted: #667085;
    --app-radius: 16px;
}

body {
    background: var(--app-canvas);
    color: var(--app-ink);
}

.chat-main,
.business-page{
    min-width: 0;
}



.topbar {
    border-bottom: 1px solid var(--app-border);
    background: color-mix(in srgb, var(--app-surface) 92%, transparent);
    backdrop-filter: blur(12px);
}





.welcome-panel,
.business-card,
.bot-settings-card,
.channel-card {
    border-color: var(--app-border);
    border-radius: var(--app-radius);
}

.welcome-panel {
    box-shadow: 0 14px 40px rgb(31 41 55 / 5%);
}

.chat-composer {
    border-color: var(--app-border);
    border-radius: 24px;
    box-shadow: 0 10px 28px rgb(15 23 42 / 8%);
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
}







.chat-composer textarea {
    flex: 1 1 0%;
    width: auto;
    min-width: 0;
    min-height: 24px;
    max-height: 200px;
    margin: 0;
    padding: 4px 8px;
    overflow-y: hidden;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    color: var(--app-ink);
    font: inherit;
    font-size: 14px;
    line-height: 1.65;
    text-align: right;
}
#chatInput { overflow-x: hidden; resize: none; scrollbar-width: thin; scrollbar-color: #aeb8c7 transparent; overscroll-behavior: contain; }
#chatInput { flex: 0 0 auto; align-self: stretch; }
#chatInput::-webkit-scrollbar { width: 7px; }
#chatInput::-webkit-scrollbar-track { border-radius: 8px; background: transparent; }
#chatInput::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 8px; background: #aeb8c7; background-clip: content-box; }
#chatInput::-webkit-scrollbar-thumb:hover { background-color: #8492a6; }

.chat-composer .composer-tool-menu-wrap,
.chat-composer > .composer-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0;
}

.chat-composer .composer-tool-menu-wrap {
    justify-content: center;
}

.chat-composer .composer-tool-menu-wrap > .composer-icon,
.chat-composer > .composer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
}

.chat-composer .send-button {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin: 0;
}

.chat-composer textarea::placeholder {
    color: var(--app-muted);
    opacity: 1;
}

.tool-menu-option.is-locked {
    cursor: not-allowed;
    opacity: .7;
}

.tool-menu-option.is-locked:hover {
    background: transparent;
}

.tool-menu-option.is-locked::after {
    content: "پرو";
    flex: 0 0 auto;
    padding: 2px 6px;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-muted);
    font-size: 9px;
}

.chat-composer:focus-within {
    border-color: #d0d5dd;
    box-shadow: 0 4px 18px rgb(15 23 42 / 8%);
}

/* Codex-style two-row chat composer shared by new and existing conversations. */
.chat-composer {
    display: block;
    min-height: 0;
    padding: 9px 12px 7px;
    border: 1px solid #dce3ed;
    border-radius: 20px;
    background: #f8faff;
    box-shadow: 0 10px 28px rgb(15 23 42 / 7%);
    text-align: right;
}
.composer-compose-area { display: flex; min-width: 0; flex-direction: column; }
.chat-composer textarea { width: 100%; min-height: 32px; max-height: 180px; padding: 3px 7px 7px; font-size: 14px; }
.composer-toolbar { display: flex; min-height: 34px; align-items: center; gap: 5px; direction: rtl; }
.composer-toolbar-spacer { flex: 1 1 auto; }
.composer-toolbar .composer-tool-menu-wrap { flex: 0 0 34px; width: 34px; height: 34px; margin: 0; }
.composer-toolbar .composer-icon { width: 32px; height: 32px; flex: 0 0 32px; margin: 0; padding: 0; }
.composer-toolbar .sprite-icon { width: 19px; height: 19px; }
.composer-toolbar .send-button { width: 38px; height: 38px; flex: 0 0 38px; margin: 0 0 0 2px; background: #b7bbc2; color: #fff; }
.composer-toolbar .send-button.is-active,
.composer-toolbar .send-button.is-loading { background: #b7bbc2; box-shadow: none; }
.composer-toolbar .send-button.is-active:hover { background: #9ba1ab; }
.composer-toolbar .send-button:disabled { cursor: not-allowed; }
.composer-tool-menu { position: absolute; right: 0; bottom: 44px; z-index: 40; width: min(300px, calc(100vw - 32px)); padding: 6px; border: 1px solid #e1e6ee; border-radius: 13px; background: #fff; box-shadow: 0 14px 35px rgb(15 23 42 / 14%); text-align: right; }
.composer-tool-menu[hidden] { display: none !important; }
.composer-toolbar .composer-tool-menu { right: 0; bottom: 44px; }
.chat-layout.chat-active .chat-composer { min-height: 0; margin-bottom: 0; border-radius: 20px; background: #f8faff; box-shadow: 0 8px 25px rgb(15 23 42 / 7%); }
.chat-layout.chat-active .chat-composer textarea { font-size: 14px; }
@media (max-width: 575.98px) {

    .chat-composer { padding: 7px 8px 6px; }
    .composer-toolbar { gap: 2px; }
    .composer-toolbar .composer-tool-menu-wrap { flex-basis: 31px; width: 31px; }
    .composer-toolbar .composer-icon { width: 30px; height: 30px; flex-basis: 30px; }
}


/* Final composer sizing follows the same spacing in new and active chats. */
.chat-layout.chat-active .chat-composer { border-radius: 20px; }
.composer-tool-capabilities { display: flex; flex-direction: column; gap: 3px; margin: 4px 5px 2px; padding: 9px 7px 5px; border-top: 1px solid #edf0f4; }
.composer-tool-capabilities strong { color: #475467; font-size: 10px; }
.composer-tool-capabilities small { color: #778196; font-size: 10px; line-height: 1.7; }

.chat-layout.chat-active .chat-composer:focus-within {
    border-color: #d0d5dd;
    box-shadow: 0 4px 18px rgb(15 23 42 / 8%);
}

.send-button,
.business-primary {
    background: var(--app-accent);
}

.send-button:hover,
.business-primary:hover {
    background: var(--app-accent-strong);
}

.chat-composer .send-button.is-active,
.chat-composer .send-button.is-loading { background: #171717; color: #fff; }
.chat-composer .send-button.is-active:hover,
.chat-composer .send-button.is-loading:hover { background: #303030; }
.chat-composer .send-button.is-loading { box-shadow: 0 0 0 4px rgb(23 23 23 / 12%); }
.composer-icon.active,
.composer-icon:has(+ .composer-tool-menu:not([hidden])) { background: var(--app-accent-soft); color: var(--app-accent); }
.composer-tool-menu-wrap > .composer-icon.active { color: var(--app-accent); }
.tool-menu-option input:checked + .tool-menu-check { border-color: #171717; background: #171717; }





.message-assistant .message-body,
.message-user .message-body {
    border-radius: 14px;
}

.message-content a {
    overflow-wrap: anywhere;
}

.bot-settings-card,
.channel-card {
    box-shadow: 0 10px 28px rgb(31 41 55 / 5%);
}



/* Bridge older feature tokens to the shared palette. */
:root {
    --border-color: var(--app-border);
    --text-color: var(--app-ink);
    --text-muted: var(--app-muted);
    --page-background: var(--app-canvas);
    --surface-background: var(--app-surface);
    --surface-soft: var(--app-canvas);
    --surface-muted: var(--app-border);
    --primary-color: var(--app-accent);
    --primary-hover: var(--app-accent-strong);
    --primary-soft: var(--app-accent-soft);
    --accent-color: var(--app-accent);
    --biz-bg: var(--app-canvas);
    --biz-card: var(--app-surface);
    --biz-text: var(--app-ink);
    --biz-muted: var(--app-muted);
    --biz-line: var(--app-border);
    --biz-primary: var(--app-accent);
    --bs-primary: var(--app-accent);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-surface);
    --bs-border-color: var(--app-border);
    --bs-secondary-color: var(--app-muted);
    --bs-tertiary-bg: var(--app-canvas);
}
body { font-size: 14px; line-height: 1.85; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
    outline: 3px solid var(--app-accent); outline-offset: 3px;
}
button, input, select, textarea { font-family: inherit; }
button:disabled { cursor: not-allowed; }
.skip-link { position: fixed; inset-inline-start: 20px; top: -100px; z-index: 2000; padding: 10px 18px; border-radius: 10px; background: var(--app-accent); color: #fff; }
.skip-link:focus { top: 12px; }
body.billing-result-page { height: auto; overflow: auto; min-height: 100dvh; background: var(--app-canvas); }
html:has(body.billing-result-page) { height: auto; overflow: auto; }
.billing-result-card { background: var(--app-surface); border-color: var(--app-border); border-radius: 20px; }
.chat-layout { height: 100dvh; }
.chat-main { overflow-y: auto; overflow-x: hidden; scrollbar-gutter: auto; scrollbar-width: thin; scrollbar-color: #8a8a8a transparent; background: var(--app-canvas); }
.chat-main::-webkit-scrollbar { width: 10px; }
.chat-main::-webkit-scrollbar-track { background: transparent; }
.chat-main::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: #c8c8c8; background-clip: content-box; }
.chat-main:hover::-webkit-scrollbar-thumb { background: #999; background-clip: content-box; }
body[data-page="index"] .chat-main { overflow: hidden; scrollbar-gutter: auto; }
.topbar { position: sticky; top: 0; z-index: 15; flex: 0 0 68px; gap: 12px; padding-inline: 24px; }
.topbar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; color: var(--app-ink); }
.topbar-actions { flex-shrink: 0; }
.topbar-account-trigger { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--app-border); border-radius: 50%; background: var(--app-surface); text-decoration: none; }
.topbar-account-trigger .default-avatar { width: 32px; height: 32px; flex: 0 0 32px; }
.topbar-account-trigger .default-avatar .sprite-icon { width: 19px; height: 19px; }
input[type="file"] { max-width: 100%; color: var(--app-muted); font-size: 13px; }
input[type="file"]::file-selector-button { margin-inline-end: 12px; padding: 7px 14px; border: 1px solid var(--app-border); border-radius: 8px; background: var(--app-accent-soft); color: var(--app-ink); font: inherit; cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--app-accent); }













.root-impersonation-indicator { flex:0 0 auto; padding:5px 9px; border-radius:8px; background:#fff5df; color:#795b20; font-size:10px; }















.account-nav-inline-icon { fill: none !important; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body[data-page="account-bots"] .management-tab .account-nav-inline-icon,
body[data-page="account-bot-members"] .management-tab .account-nav-inline-icon,
body[data-page="account-channels"] .management-tab .account-nav-inline-icon,
body[data-page="account-bots"] .management-tab.is-active .account-nav-inline-icon,
body[data-page="account-bot-members"] .management-tab.is-active .account-nav-inline-icon,
body[data-page="account-channels"] .management-tab.is-active .account-nav-inline-icon { color: var(--app-muted) !important; }








.icon-button, .composer-icon { color: var(--app-muted); border-radius: 10px; }
.icon-button:hover, .composer-icon:hover { background: var(--app-accent-soft); color: var(--app-accent); }

.guest-signup-button, .bot-create-trigger, .login-button:not(.subscription-plan-action) { border: 1px solid #171717; background: #171717; color: #fff; min-height: 40px; border-radius: 10px; }
.guest-signup-button, .bot-create-trigger { height: 34px; min-height: 34px; padding: 6px 12px; border-radius: 9px; font-size: 12px; }
.guest-signup-button:hover, .bot-create-trigger:hover, .login-button:hover { border-color: #303030; background: #303030; color: #fff; }







/* All workspace pages follow the same width, heading and spacing rhythm. */
.business-content, .account-page-content, .subscription-page {
    width: 100%; max-width: 1240px; margin: 0 auto; padding: 36px 32px 56px;
    flex: 0 0 auto; overflow: visible; background: transparent; min-width: 0;
}
.business-content-head, .account-page-heading, .subscription-page-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
    text-align: start; margin: 0 0 28px;
}
.page-kicker { display: block; color: var(--app-accent); font-size: 12px; font-weight: 650; }
.business-content-head h1, .account-page-heading h1, .subscription-page-header h1 {
    color: var(--app-ink); font-size: clamp(23px,2.3vw,29px); line-height: 1.6; font-weight: 750; margin: 6px 0 8px;
}
.business-content-head p, .account-page-heading p, .subscription-page-header p {
    color: var(--app-muted); font-size: 13px; line-height: 1.9; margin: 0;
}
.bots-grid, .channel-list-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.bot-card, .channel-card, .bot-settings-card,
.simple-business-card, .business-detail-card, .business-profile-card, .account-empty-state {
    border: 1px solid var(--app-border); border-radius: var(--app-radius); background: var(--app-surface);
    box-shadow: 0 4px 18px rgb(25 39 70 / 4%); min-width: 0;
}
.bot-card, .channel-card, .bot-settings-card { padding: 24px; }
.bot-card h2, .channel-card h2, .bot-settings-card h2, 
.simple-card-head h2, .detail-card-title h2 { font-size: 17px; color: var(--app-ink); font-weight: 700; line-height: 1.7; }
.bot-card p, .channel-card p, .bot-settings-card p, .detail-card-title small { font-size: 12px; color: var(--app-muted); line-height: 1.9; }
.account-empty-state { display: flex; min-height: 220px; padding: 40px 24px; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.account-empty-state strong { font-size: 17px; color: var(--app-ink); }
.account-empty-state span { max-width: 540px; color: var(--app-muted); font-size: 13px; }
.business-primary, .business-light, .business-export, .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 10px 16px; border-radius: 10px; font-size: 13px; line-height: 1.5;
    font-weight: 600; text-decoration: none; transition: background-color .18s, border-color .18s;
}
.business-primary, .btn-primary { background: var(--app-accent); color: #fff; border: 1px solid var(--app-accent); box-shadow: none; }
.business-primary:hover, .btn-primary:hover { background: var(--app-accent-strong); border-color: var(--app-accent-strong); color: #fff; }
.business-light, .business-export, .btn-light { background: var(--app-surface); color: var(--app-ink); border: 1px solid var(--app-border); box-shadow: none; }
.business-light:hover, .business-export:hover { background: var(--app-accent-soft); border-color: var(--app-accent); color: var(--app-accent); }
.bot-card-actions, .channel-card-actions, .bot-heading-actions, .member-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bot-card-actions > *, .channel-card-actions > * { flex: 1 0 auto; }
.bot-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bot-platform-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--app-accent-soft); color: var(--app-accent); font-weight: 750; }
.bot-card-meta, .channel-card-meta, .bot-meta-row { border-color: var(--app-border); font-size: 12px; color: var(--app-muted); flex-wrap: wrap; }
.bot-meta-row strong, .info-grid strong, .service-card strong{ color: var(--app-ink); overflow-wrap: anywhere; }

/* Shared fields are used by bot and channel workspaces. */
.tool-label, .form-label, .channel-settings-fields label { font-size: 13px; color: var(--app-ink); line-height: 1.8; }
.tool-input, .tool-textarea, .tool-select, .form-control, .form-select, .business-toolbar select {
    min-height: 44px; background-color: var(--app-surface); border: 1px solid var(--app-border);
    border-radius: 10px; color: var(--app-ink); padding: 10px 12px; font-size: 13px; line-height: 1.8;
}
.tool-input:focus, .tool-textarea:focus, .tool-select:focus, .form-control:focus, .form-select:focus {
    background-color: var(--app-surface); color: var(--app-ink); border-color: var(--app-accent); box-shadow: 0 0 0 3px rgb(37 99 235 / 12%);
}
.tool-textarea { min-height: 128px; }
.tool-status { color: var(--app-muted); font-size: 13px; overflow-wrap: anywhere; }
.tool-status:empty { margin: 0; }
.business-toolbar { flex-wrap: wrap; padding: 14px; border: 1px solid var(--app-border); border-radius: 14px; background: var(--app-surface); gap: 12px; margin-bottom: 20px; }
.business-search { flex: 1 1 230px; width: auto; }
.business-search input { min-height: 44px; font-size: 13px; border-color: var(--app-border); background: var(--app-canvas); color: var(--app-ink); }
.business-search .sprite-icon { top: 14px; }
.business-export { margin-inline-start: auto; margin-right: 0; }
.business-table-wrap, .table-responsive { overflow: auto; max-width: 100%; }
.business-table { min-width: 760px; }
.business-table th, .table th { color: var(--app-muted); background: var(--app-canvas); font-size: 12px; font-weight: 600; white-space: nowrap; }
.business-table td, .table td { font-size: 13px; color: var(--app-ink); border-color: var(--app-border); vertical-align: middle; }
.business-table tr, .business-table th, .business-table td { border-color: var(--app-border); }
.business-name, .business-name strong { color: var(--app-ink); }
.business-name small, .info-grid small, .profile-main p, .profile-meta, .hours-list, .service-card small { color: var(--app-muted); font-size: 12px; }
.category-pill { background: var(--app-canvas); color: var(--app-muted); }
.business-profile-card { padding: 28px; }
.profile-title { flex-wrap: wrap; }
.profile-title h1 { font-size: 25px; color: var(--app-ink); overflow-wrap: anywhere; }
.profile-meta { flex-wrap: wrap; }
.profile-avatar { flex-shrink: 0; background: var(--app-accent-soft); color: var(--app-accent); }
.service-card, .hours-list > div, .source-row{ border-color: var(--app-border); }
.hours-list strong { color: var(--app-ink); font-size: 13px; }
.hours-list strong.closed { color: var(--app-muted); }
.business-catalog-editor { margin-top: 24px; border-top: 1px solid var(--app-border); padding-top: 18px; }
.business-profile-editor { margin: 16px 0 24px; padding: 16px 20px; border: 1px solid var(--app-border); border-radius: 14px; background: var(--app-surface); }
.business-profile-editor > summary { color: var(--app-accent); cursor: pointer; font-size: 13px; font-weight: 700; }
.business-profile-editor[open] > summary { margin-bottom: 16px; }
.business-profile-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.business-profile-form label { display: grid; gap: 5px; color: var(--app-muted); font-size: 11px; }
.business-profile-form .wide { grid-column: 1 / -1; }
.business-profile-form .catalog-save-row { margin: 4px 0 0; }
.business-catalog-editor > summary { color: var(--app-accent); cursor: pointer; font-size: 13px; font-weight: 700; }
.business-catalog-editor[open] > summary { margin-bottom: 20px; }
.catalog-section-heading, .catalog-save-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 12px; }
.catalog-section-heading > div { display: grid; gap: 3px; }
.catalog-section-heading strong { color: var(--app-ink); font-size: 14px; }
.catalog-section-heading small { color: var(--app-muted); font-size: 11px; }
.catalog-service-list { display: grid; gap: 12px; }
.catalog-service-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 14px; border: 1px solid var(--app-border); border-radius: 12px; }
.catalog-service-row label, .catalog-hour-row label { display: grid; gap: 5px; color: var(--app-muted); font-size: 11px; }
.catalog-service-row .form-control, .catalog-service-row .form-select, .catalog-hour-row .form-control { min-width: 0; font-size: 12px; }
.catalog-active { display: flex !important; align-items: center; gap: 7px !important; align-self: center; }
.catalog-active input { accent-color: var(--app-accent); }
.business-remove, .business-secondary { border: 1px solid var(--app-border); border-radius: 9px; background: transparent; color: var(--app-ink); padding: 8px 12px; font-size: 12px; cursor: pointer; }
.business-remove { justify-self: start; color: #b42332; }
.hours-heading { margin-top: 24px; }
.catalog-hours-list { display: grid; gap: 7px; }
.catalog-hour-row { display: grid; grid-template-columns: minmax(60px,1fr) minmax(90px,1fr) minmax(90px,1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--app-border); }
.catalog-hour-row > strong { color: var(--app-ink); font-size: 12px; }
.catalog-hour-row .catalog-active { white-space: nowrap; }
.catalog-save-row { margin-top: 20px; }
.catalog-save-row [role="status"] { color: var(--app-muted); font-size: 12px; }
.business-bot-form { display: grid; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--app-border); }
.business-bot-form > label { display: grid; gap: 3px; }
.business-bot-form > label strong { color: var(--app-ink); font-size: 13px; }
.business-bot-form > label small, .business-bot-form > small { color: var(--app-muted); font-size: 11px; }
.business-bot-form select { min-height: 96px; }
.business-sync-control { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.business-sync-control [role="status"] { color: var(--app-muted); font-size: 11px; }
.knowledge-pending, .knowledge-crawling, .knowledge-stale { color: #956018; background: #fff4d9; }
.knowledge-failed { color: #b42332; background: #fff0f1; }
.knowledge-ready { color: #087963; background: #e4f7ef; }
.knowledge-box { background: var(--app-surface); }
.detail-breadcrumb { font-size: 12px; color: var(--app-muted); flex-wrap: wrap; }
.detail-breadcrumb a, a.detail-breadcrumb { color: var(--app-accent); }
.filter-empty { padding: 28px; color: var(--app-muted); text-align: center; }
.bot-members-filter { grid-template-columns: minmax(180px,1fr) repeat(2,minmax(125px,.6fr)) auto auto; background: var(--app-surface); border-color: var(--app-border); }
.member-group-manager { display: grid; gap: 12px; margin: 16px 0; padding: 16px; border: 1px solid var(--app-border); border-radius: 16px; background: var(--app-surface); color: var(--app-ink); }
.member-group-manager > div:first-child { display: grid; gap: 3px; }
.member-group-manager > div:first-child strong { font-size: 13px; }
.member-group-manager > div:first-child small { color: var(--app-muted); font-size: 11px; }
.member-group-controls { display: grid; grid-template-columns: minmax(150px,1fr) minmax(160px,1fr) repeat(4,auto); gap: 8px; align-items: center; }
.member-group-controls > * { min-width: 0; margin: 0; }
.member-group-manager [role="status"] { min-height: 1em; color: var(--app-muted); font-size: 11px; }
.member-group-manager .text-danger { color: var(--app-danger, #b42336) !important; }
.member-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 24px; color: var(--app-muted); font-size: 12px; }
.bot-member-row, .bot-batch-row { background: var(--app-surface); color: var(--app-ink); font-size: 12px; overflow-wrap: anywhere; }
.bot-member-head, .bot-batch-history-heading { background: var(--app-canvas); color: var(--app-muted); }
.bot-members-table, .bot-batch-history { background: var(--app-border); border-color: var(--app-border); }
.channel-broadcast-toolbar { align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; width: 100%; max-width: 1240px; padding-inline: 32px; margin: -28px auto 40px; }
.channel-broadcast-toolbar > span, .channel-select { font-size: 12px; color: var(--app-muted); }
.business-name strong { font-size: 13px; }
.writer-config-fields small { font-size: 12px; color: var(--app-muted); }
.business-primary:disabled, .business-export:disabled { background: var(--app-border); color: var(--app-muted); border-color: var(--app-border); opacity: 1; box-shadow: none; }
.admin-page #adminStats { grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 24px; }
.admin-stat-card { display: flex; flex-direction: column; gap: 12px; }
.admin-stat-card > span { color: var(--app-muted); font-size: 13px; }
.admin-stat-card > strong { color: var(--app-ink); font-size: 28px; }
.admin-page > .bot-settings-card { margin-bottom: 24px; }
.admin-page #adminUsers { min-width: 650px; }
.message-editor-toolbar { flex-wrap: wrap; gap: 6px; }
.message-editor-toolbar button, .message-editor-toolbar select { min-height: 36px; border-color: var(--app-border); background: var(--app-canvas); color: var(--app-muted); border-radius: 8px; }

/* Shared visual message composer */
.w3m-message-editor { --editor-line: #dce4ef; position: relative; overflow: visible; width: 100%; border: 1px solid var(--editor-line); border-radius: 16px; background: var(--app-surface, #fff); box-shadow: 0 5px 18px rgba(18, 45, 78, .06); }
.w3m-editor-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px; border-bottom: 1px solid var(--editor-line); background: var(--app-canvas, #f7f9fc); border-radius: 16px 16px 0 0; }
.w3m-editor-tool, .w3m-editor-format, .w3m-editor-user-info { min-height: 34px; border: 1px solid var(--editor-line); border-radius: 8px; background: var(--app-surface, #fff); color: var(--app-ink, #1d2939); font-size: 12px; }
.w3m-editor-tool { min-width: 36px; padding: 0 9px; font-weight: 700; cursor: pointer; }
.w3m-editor-tool:hover { border-color: var(--app-accent, #1684d8); color: var(--app-accent, #1684d8); }
.w3m-editor-tool:focus-visible { border-color: var(--app-accent, #1684d8); color: var(--app-accent, #1684d8); outline: 3px solid var(--app-accent, #1684d8); outline-offset: 2px; }
.w3m-editor-spacer { flex: 1 1 10px; }
.w3m-editor-format, .w3m-editor-user-info { padding: 0 9px; }
.w3m-editor-canvas { min-height: 150px; max-height: 440px; overflow-y: auto; padding: 16px; color: var(--app-ink, #1d2939); outline: none; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; direction: rtl; text-align: start; }
.w3m-editor-canvas[dir="ltr"] { direction: ltr; text-align: left; }
.w3m-editor-canvas.is-empty::before { content: attr(data-placeholder); color: var(--app-muted, #8793a5); pointer-events: none; }
.w3m-editor-canvas a { color: var(--app-accent, #1684d8); text-decoration: underline; }
.w3m-editor-canvas blockquote { margin: 8px 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--app-accent, #1684d8); color: var(--app-muted); }
.w3m-editor-canvas pre, .w3m-editor-canvas code { direction: ltr; text-align: left; font-family: ui-monospace, Consolas, monospace; background: var(--app-canvas, #f7f9fc); border-radius: 5px; padding: 2px 5px; }
.w3m-editor-status { min-height: 30px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 4px 12px; color: var(--app-muted, #8793a5); font-size: 11px; }
.w3m-editor-count { margin-inline-start: auto; }
.w3m-editor-source { display: none !important; }
.w3m-editor-source textarea.w3m-editor-original { display: none !important; }
.w3m-message-editor.w3m-editor-raw .w3m-editor-toolbar, .w3m-message-editor.w3m-editor-raw .w3m-editor-canvas, .w3m-message-editor.w3m-editor-raw .w3m-editor-status, .w3m-message-editor.w3m-editor-raw .w3m-editor-ai { display: none !important; }
.w3m-message-editor.w3m-editor-raw .w3m-editor-source { display: block !important; }
.w3m-message-editor.w3m-editor-raw textarea.w3m-editor-original { display: block !important; width: 100%; min-height: 82px; padding: 12px; border: 0; outline: none; background: transparent; color: var(--app-ink); }
.w3m-editor-legacy-format, .w3m-editor-legacy-format-label { display: none !important; }
.w3m-editor-ai { position: relative; display: inline-flex; align-items: center; padding: 0; }
.w3m-editor-ai-toggle { min-width: 46px; min-height: 34px; border: 1px solid #1684d8; border-radius: 9px; padding: 0 12px; background: #1684d8; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; cursor: pointer; box-shadow: 0 2px 6px rgba(22, 132, 216, .18); }
.w3m-editor-ai-toggle:hover, .w3m-editor-ai-toggle:focus-visible { background: #0874c5; outline: 3px solid rgba(22, 132, 216, .18); }
.w3m-editor-ai-panel { position: static; display: grid; box-sizing: border-box; width: 100%; max-width: none; grid-template-columns: 1fr; gap: 14px; margin: 10px 0; padding: 18px; border: 1px solid var(--editor-line); border-radius: 14px; background: var(--app-canvas, #f7f9fc); box-shadow: 0 4px 14px rgba(15, 35, 60, .07); }
.w3m-editor-ai-panel[hidden], .w3m-editor-ai-result[hidden] { display: none; }
.w3m-editor-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--editor-line); }
.w3m-editor-ai-head > div { display: grid; gap: 3px; }
.w3m-editor-ai-head strong { color: var(--app-ink); font-size: 14px; }
.w3m-editor-ai-head small, .w3m-editor-ai-settings > small { color: var(--app-muted); font-size: 11px; line-height: 1.7; }
.w3m-editor-ai-close { width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid var(--editor-line); border-radius: 8px; background: var(--app-canvas); color: var(--app-muted); font-size: 19px; line-height: 1; cursor: pointer; }
.w3m-editor-ai-panel label { display: grid; gap: 6px; color: var(--app-ink); font-size: 12px; font-weight: 600; }
.w3m-editor-brief, .w3m-editor-tone { width: 100%; min-height: 40px; border: 1px solid var(--editor-line); border-radius: 9px; padding: 9px 10px; background: var(--app-surface, #fff); color: var(--app-ink, #1d2939); font: inherit; font-size: 12px; }
.w3m-editor-brief { min-height: 82px; resize: vertical; line-height: 1.8; }
.w3m-editor-ai-settings { display: grid; grid-template-columns: 140px 1fr; align-items: end; gap: 10px; }
.w3m-editor-ai-settings > small { padding-bottom: 8px; }
.w3m-editor-ai-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.w3m-editor-ai-actions-main { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.w3m-editor-ai-actions button { min-height: 36px; border: 1px solid var(--editor-line); border-radius: 9px; padding: 6px 12px; background: var(--app-surface, #fff); color: var(--app-ink, #1d2939); font-size: 12px; cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.w3m-editor-ai-actions-main button { min-width: 0; padding-inline: 5px; font-size: 11px; white-space: nowrap; }
.w3m-editor-ai-actions button:hover { border-color: var(--app-accent, #1684d8); transform: translateY(-1px); }
.w3m-editor-ai-actions button:first-child { background: var(--app-accent, #1684d8); border-color: var(--app-accent, #1684d8); color: #fff; }
.w3m-editor-ai-actions button:disabled { opacity: .6; cursor: wait; }
.w3m-editor-ai-result { display: grid; gap: 10px; border: 1px solid var(--editor-line); border-radius: 10px; padding: 12px; background: var(--app-canvas, #f7f9fc); }
.w3m-editor-ai-preview { max-height: 220px; overflow: auto; white-space: pre-wrap; line-height: 1.8; }
.w3m-editor-user-info { padding-inline-start: 14px; padding-inline-end: 18px; }
@media (max-width: 600px) {
 .w3m-editor-ai-panel { max-height: 70dvh; overflow-y: auto; padding: 12px; } .w3m-editor-ai-actions-main { grid-template-columns: repeat(2, minmax(0, 1fr)); } .w3m-editor-ai-settings { grid-template-columns: 120px 1fr; } .w3m-editor-canvas { min-height: 120px; padding: 12px; } .w3m-editor-toolbar { gap: 4px; padding: 8px; } }


/* Dialogs share the same surface and remain usable on short/mobile screens. */
.modal-content, .auth-box, .confirm-modal-box { background: var(--app-surface); color: var(--app-ink); border: 1px solid var(--app-border); border-radius: 20px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-header, .modal-footer { border-color: var(--app-border); padding: 20px 24px; gap: 10px; }
.modal-body { padding: 24px; }
.auth-box { max-height: calc(100dvh - 32px); overflow: auto; }
.auth-box h2, .confirm-modal-box h2 { color: var(--app-ink); }
.auth-box label, .auth-subtitle, .confirm-modal-box p { color: var(--app-muted); }
.auth-input-wrap input { background: var(--app-canvas); color: var(--app-ink); border-color: var(--app-border); }
.auth-input-wrap { background: var(--app-canvas); border-color: var(--app-border); }
.auth-input-wrap input { background: transparent; }
.auth-submit:hover { background: var(--app-accent-strong); }
.auth-modal, .confirm-modal { z-index: 1080; }
.auth-submit { background: var(--app-accent); border-radius: 10px; }
.auth-close, .auth-back { color: var(--app-muted); }
.account-modal .modal-dialog { height: min(900px,calc(100dvh - 48px)); }
.account-modal .account-content-panel, .account-panel, .account-profile, .billing-summary > div { background: var(--app-surface); border-color: var(--app-border); }
.account-modal .account-nav-item { color: var(--app-muted); }
.account-modal .account-nav-item:hover, .account-modal .account-nav-item.active { background: var(--app-accent-soft); color: var(--app-accent); }
.subscription-plan-card { border-color: var(--app-border); border-radius: 18px; box-shadow: 0 4px 18px rgb(25 39 70 / 4%); }
.subscription-plan-action, .billing-plan-action { border-radius: 10px; min-height: 42px; font-size: 13px; }
.subscription-plan-action:not(.current):not(.secondary) { background: var(--app-accent); color: #fff; }
.subscription-plan-card.is-featured { border-color: var(--app-accent); }
.subscription-plan-description, .subscription-plan-details, .subscription-plan-features li { font-size: 13px; line-height: 1.9; }
.subscription-plan-label, .subscription-plan-recommended, .subscription-plan-credit, .subscription-notice { font-size: 12px; }
.subscription-page-header { display: block; }

/* Preserve chat's own scroll region while matching the rest of the workspace. */
.chat-content { background: var(--app-canvas); }
.welcome-panel { box-shadow: none; }
.welcome-panel h1 { color: var(--app-ink); font-weight: 650; }
.chat-composer { background: var(--app-surface); border-color: var(--app-border); border-radius: 18px; }
.chat-composer input, .chat-composer textarea { color: var(--app-ink); }
.chat-footer { color: var(--app-muted); }
.message-user .message-content { background: var(--app-accent-soft); color: var(--app-ink); }
.send-button { display: grid; place-items: center; }
.send-button:disabled { background: var(--app-border); color: var(--app-muted); box-shadow: none; }
.chat-layout.chat-active .chat-composer { border-radius: 24px; margin-bottom: 12px; }
.chat-layout.chat-active .message-list { scrollbar-color: var(--app-border) transparent; }
.chat-history-more { display: block; margin: 0 auto 10px; padding: 7px 12px; border: 1px solid var(--app-border); border-radius: var(--radius-pill); background: var(--app-surface); color: var(--app-muted); font: inherit; font-size: 11px; cursor: pointer; }
.chat-history-more:hover { border-color: var(--app-accent); color: var(--app-accent); }
.chat-history-more:disabled { opacity: .65; cursor: wait; }
.chat-history-delete {
    display: block;
    margin: 0 auto 10px;
    padding: 6px 11px;
    border: 1px solid #ead5d5;
    border-radius: var(--radius-pill);
    background: #fff8f8;
    color: #a65353;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}
.chat-history-delete:hover { border-color: #d9aaaa; background: #fff1f1; }
.chat-history-delete:disabled { opacity: .65; cursor: wait; }
.chat-history-more[hidden] { display: none !important; }
/* Keep the main page header glassy without changing the sidebar surface. */
.chat-main > .topbar {
    background: rgb(255 255 255 / 78%);
    border-bottom-color: rgb(226 232 240 / 78%);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
}

@media (max-width: 1199.98px) {

    .admin-page #adminStats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .bots-grid, .channel-list-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .bot-members-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .bot-members-filter > :first-child { grid-column: 1/-1; }
    .member-group-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 991.98px) {

    
    .sidebar-open { overflow: hidden; }
}

@media (max-width: 767.98px) {

    .business-content, .account-page-content, .subscription-page { padding: 24px 16px 40px; }
    .topbar { padding-inline: 14px; flex-basis: 60px; }
    .topbar-title { font-size: 12px; }
    .topbar-account-trigger { display: inline-flex; }
    .guest-signup-button, .bot-create-trigger { font-size: 12px; padding: 6px 12px; }
    .business-content-head, .account-page-heading{ flex-direction: column; gap: 14px; margin-bottom: 22px; }
    .bots-grid, .channel-list-grid, .detail-grid, .bot-settings-grid { grid-template-columns: minmax(0,1fr); }
    .bot-card, .channel-card, .bot-settings-card, .business-detail-card { padding: 20px; }
    .bot-settings-wide { grid-column: auto; }
    .business-toolbar > select { flex: 1; min-width: 0; }
    .business-toolbar > .business-primary { width: 100%; }
    .catalog-service-row { grid-template-columns: minmax(0,1fr); }
    .catalog-hour-row { grid-template-columns: minmax(54px,.7fr) repeat(2,minmax(78px,1fr)); }
    .catalog-hour-row .catalog-active { grid-column: 2 / -1; }
    .catalog-section-heading { align-items: flex-start; flex-direction: column; }
    .catalog-save-row { align-items: stretch; flex-direction: column; }
    .business-profile-form { grid-template-columns: minmax(0,1fr); }
    .business-profile-form .wide { grid-column: auto; }
    .business-export { margin-inline-start: 0; }
    .business-profile-card, .profile-main { flex-direction: column; align-items: flex-start; }
    .profile-title h1 { font-size: 22px; }
    .tool-row { grid-template-columns: minmax(0,1fr); }
    .account-modal .modal-dialog { width: calc(100% - 20px); height: calc(100dvh - 20px); margin: 10px auto; }
    .account-modal .modal-body { padding: 54px 14px 18px; }
    .account-modal .account-settings-layout { display: flex; flex-direction: column; gap: 16px; }
    .account-modal .account-settings-nav { flex-direction: row; overflow-x: auto; border: 1px solid var(--app-border); background: var(--app-surface); padding: 6px; }
    .account-modal .account-nav-item { flex: 0 0 auto; }
    .account-modal .account-content-panel { padding: 16px; }
    .profile-image-box { flex-direction: column; align-items: stretch; }
    .profile-image-form { min-width: 0; justify-content: flex-start; }
    .profile-image-form .btn { white-space: normal; }
    .member-actions, .bot-settings-footer { align-items: stretch; flex-direction: column; }
    .member-pagination { align-items: stretch; flex-direction: column; }
    .channel-broadcast-toolbar { padding-inline: 16px; }
    .modal-header, .modal-body, .modal-footer { padding: 18px; }
    .chat-content { padding-inline: 14px; }
    .chat-composer { gap: 0; padding-inline: 6px; }
    .chat-composer .composer-tool-menu-wrap,
    .chat-composer > .composer-icon,
    .chat-composer .composer-tool-menu-wrap > .composer-icon { flex-basis: 32px; width: 32px; height: 32px; }
    .composer-icon { padding: 6px; }
    .chat-composer input, .chat-composer textarea { padding-inline: 6px; font-size: 13px; }
    .chat-composer .send-button { flex: 0 0 36px; width: 36px; height: 36px; }
}


/* Unified, right-aligned account overview. */
.account-settings-page {
    direction: rtl;
    text-align: right;
}
.account-settings-page-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0;
    padding: 30px clamp(18px, 3vw, 42px) 48px;
}
.account-settings-page-heading {
    width: 100%;
    max-width: none;
    margin: 0 0 20px;
}
.account-settings-page .account-page-layout {
    width: 100%;
    max-width: none;
    margin: 0;
    direction: rtl;
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 24px;
}
.account-settings-page .account-settings-nav { grid-column: 2; }
.account-settings-page .account-settings-content {
    display: block;
    min-width: 0;
    grid-column: 1;
}
.account-settings-page .account-unified-panel {
    overflow: hidden;
    padding: 0;
    border: 1px solid #e5eaf2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgb(29 45 75 / 7%);
}
.account-unified-profile {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid #edf0f5;
    background: linear-gradient(115deg, #fff 18%, #f6f8ff 100%);
}
.account-settings-page .account-avatar {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    border: 3px solid #fff;
    background: linear-gradient(145deg, #eaf0ff, #f4edff);
    box-shadow: 0 5px 16px rgb(36 58 108 / 14%);
}
.account-settings-page #profileAvatarFallback { width: 30px; height: 30px; color: #5b6dc5; }
.account-unified-identity { min-width: 0; }
.account-unified-identity h2 {
    margin: 2px 0 4px;
    color: #202b42;
    font-size: 20px;
    font-weight: 750;
    line-height: 1.5;
}
.account-unified-identity .account-phone { color: #768197; font-size: 12px; }
.account-avatar-upload {
    display: flex;
    margin-inline-start: auto;
    flex: 0 0 auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
}
.account-avatar-upload .btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 12px;
    border-color: #dce3f0;
    border-radius: 10px;
    background: #fff;
    color: #465b89;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}
.account-avatar-upload .btn:hover { border-color: #aebde0; background: #f7f9ff; color: #354b7e; }
.account-avatar-upload .btn svg,
.account-summary-icon svg,
.account-section-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}
.account-avatar-upload small { min-height: 0; color: #388469; font-size: 10px; }
.account-avatar-upload small:empty { display: none; }
.account-settings-page .account-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 20px 24px 22px;
}
.account-settings-page .account-summary-card {
    display: grid;
    min-width: 0;
    min-height: 142px;
    align-content: start;
    justify-items: start;
    gap: 6px;
    padding: 15px;
    border: 1px solid #e9edf4;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 12px rgb(33 49 78 / 4%);
    text-align: right;
}
.account-summary-icon,
.account-section-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 11px;
    background: #edf2ff;
    color: #5369c4;
}
.credit-summary-card .account-summary-icon { background: #eaf8f3; color: #24846f; }
.usage-summary-card .account-summary-icon { background: #fff4e8; color: #c27b2e; }
.account-summary-label { color: #768197; font-size: 11px; }
.account-settings-page .account-summary-card strong { color: #202b42; font-size: 17px; font-weight: 750; }
.account-summary-card small { color: #8892a3; font-size: 10px; }
.account-summary-card .account-plan-expiry:empty { display: none; }
.account-settings-page .account-billing-section {
    margin: 0 24px 24px;
    padding: 20px 0 0;
    border-top: 1px solid #edf0f5;
    scroll-margin-top: 20px;
}
.account-section-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 15px;
}
.account-section-icon { width: 38px; height: 38px; flex-basis: 38px; background: #eef3ff; }
.account-section-heading h3 { margin: 0; color: #26334b; font-size: 15px; font-weight: 750; }
.account-section-heading p { margin: 3px 0 0; color: #7b8596; font-size: 11px; }
.account-plan-callout,
.account-settings-page .account-subscription-active-note {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 9px 12px;
    border: 1px solid #e5ebf5;
    border-radius: 12px;
    background: #f8faff;
    color: #5f6f8b;
    font-size: 11px;
}
.account-plan-callout .btn { flex: 0 0 auto; border-radius: 9px; font-size: 11px; }
.account-settings-page .account-subscription-active-note { border-color: #d9eee7; background: #f3fbf7; color: #35735f; }
.account-topup-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    border: 1px solid #e9edf4;
    border-radius: 15px;
    background: #fbfcfe;
}
.account-topup-copy { min-width: 180px; }
.account-topup-copy h4,
.account-invoices-heading h4 { margin: 0; color: #29354b; font-size: 13px; font-weight: 750; }
.account-topup-copy p { margin: 5px 0 0; color: #7d8798; font-size: 10px; line-height: 1.8; }
.account-settings-page .credit-topup-form { min-width: min(100%, 320px); flex: 1; }
.account-settings-page .credit-topup-form .input-group { direction: rtl; }
.account-settings-page .credit-topup-form input { min-width: 0; text-align: right; }
.account-settings-page .credit-topup-form .btn-primary {
    border-color: #315fc5;
    border-radius: 0 9px 9px 0;
    background: #315fc5;
    color: #fff;
    font-size: 11px;
    white-space: nowrap;
}
.account-settings-page .credit-topup-form small { display: block; margin-top: 6px; color: #858fa0; font-size: 9px; line-height: 1.7; }
.account-invoices-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 20px 0 9px; }
.account-invoices-heading span { color: #929baa; font-size: 10px; }
.account-settings-page .billing-invoices { max-height: 220px; border-color: #e8ecf3; border-radius: 12px; }
.account-settings-page .billing-invoice-row { min-height: 54px; padding: 10px 12px; }
.account-settings-page .billing-invoice-row strong { font-size: 11px; }
.account-settings-page .billing-invoice-row small { font-size: 10px; }
.account-settings-page .billing-invoice-row > svg { width: 16px; height: 16px; flex: 0 0 16px; color: #8a95a7; }
@media (max-width: 767.98px) {

    .account-settings-page-inner { padding: 20px 14px 30px; }
    .account-settings-page .account-page-layout { display: flex; flex-direction: column; gap: 14px; }
    .account-settings-page .account-settings-content { order: 1; width: 100%; }
    .account-settings-page .account-page-nav { order: 2; }
    .account-unified-profile { flex-wrap: wrap; padding: 17px; }
    .account-settings-page .account-avatar { width: 60px; height: 60px; flex-basis: 60px; }
    .account-unified-identity h2 { font-size: 17px; }
    .account-avatar-upload { margin-inline-start: auto; }
    .account-settings-page .account-summary-grid { grid-template-columns: 1fr 1fr; padding: 14px 16px; }
    .account-settings-page .account-summary-card { min-height: 130px; }
    .account-settings-page .account-summary-card:first-child { grid-column: 1 / -1; }
    .account-settings-page .account-billing-section { margin: 0 16px 18px; padding-top: 16px; }
    .account-topup-section { align-items: stretch; flex-direction: column; gap: 12px; padding: 13px; }
    .account-topup-copy { min-width: 0; }
    .account-settings-page .credit-topup-form { min-width: 0; }
}

@media (max-width: 420px) {

    .account-unified-profile { gap: 11px; padding: 15px 13px; }
    .account-settings-page .account-avatar { width: 52px; height: 52px; flex-basis: 52px; }
    .account-avatar-upload .btn { min-height: 36px; padding-inline: 9px; font-size: 10px; }
    .account-avatar-upload .btn svg { width: 15px; height: 15px; }
    .account-settings-page .account-summary-grid { gap: 8px; padding-inline: 12px; }
    .account-settings-page .account-summary-card { min-height: 122px; padding: 12px; }
    .account-settings-page .account-billing-section { margin-inline: 12px; }
    .account-plan-callout { align-items: flex-start; flex-direction: column; }
}

.account-settings-page .billing-summary.account-summary-grid > .account-summary-card {
    border-color: #e9edf4;
    background: #fff;
    box-shadow: 0 4px 12px rgb(33 49 78 / 4%);
}
@media (max-width: 420px) {

    .bot-members-filter, .info-grid { grid-template-columns: minmax(0,1fr); }
    .bot-members-filter > :first-child { grid-column: auto; }
    .member-group-controls { grid-template-columns: minmax(0,1fr); }
    .account-page-heading > .business-primary { width: 100%; }
    .auth-modal { padding: 12px; }
    .auth-box { padding: 28px 20px; }
}

@media (prefers-reduced-motion: reduce) {

    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* Bot button editor fields */


/* Compact, neutral copy action on chat messages */
.message-avatar.user-avatar { font-size: 8px; font-weight: 600; }
.message-toolbar .message-copy,
.message-toolbar .message-copy.copied {
    min-width: 0;
    min-height: 30px;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
    color: var(--app-muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.message-toolbar .message-copy:not(.copied) { min-width: 58px; }
.message-toolbar .message-copy.copied { min-width: 68px; }
.message-toolbar .message-copy .sprite-icon { flex: 0 0 14px; margin: 0; }
.message-toolbar .message-copy span { min-width: 0; padding: 0; }
.message-toolbar .message-time {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 5px 10px;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: transparent;
    color: var(--app-muted);
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}
.message-toolbar .message-copy:hover,
.message-toolbar .message-copy.copied {
    border-color: #cfd5df;
    background: #f3f5f8;
    color: var(--app-ink);
}
.message-toolbar .message-copy:focus-visible {
    outline: 2px solid #98a2b3;
    outline-offset: 2px;
}
.chat-subscription-actions { margin-top: 12px; }
.chat-subscription-actions p { margin: 0 0 10px; color: var(--app-muted); font-size: 12px; line-height: 1.8; }
.chat-billing-card {
    display: flex;
    width: min(100%, 460px);
    align-items: flex-start;
    gap: 14px;
    margin-top: 4px;
    padding: 17px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff 0%, #f8f9fb 100%);
    color: #202123;
}
.chat-billing-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #f4f4f4;
    color: #353535;
}
.chat-billing-icon .sprite-icon { width: 19px; height: 19px; }
.chat-billing-copy { min-width: 0; }
.chat-billing-label { color: #777; font-size: 11px; font-weight: 600; }
.chat-billing-copy h3 { margin: 3px 0 5px; color: #202123; font-size: 14px; font-weight: 700; line-height: 1.7; }
.chat-billing-copy p { margin: 0 0 12px; color: #656565; font-size: 12px; line-height: 1.9; }
.chat-billing-card .chat-subscription-cta { min-height: 34px; padding: 7px 12px; }
.chat-subscription-cta {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #171717;
    border-radius: 9px;
    background: #171717;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.message-content .chat-subscription-cta { border-color: #d9dce1; background: #f1f2f4; color: #202123; }
.chat-subscription-cta:hover { border-color: #c8cbd0; background: #e7e9ec; color: #171717; }
.chat-subscription-cta:focus-visible { outline: 2px solid #98a2b3; outline-offset: 2px; }

/* Streamlined phone-based sign-in and registration */
.auth-modal-backdrop { background: rgb(17 24 39 / 48%); backdrop-filter: blur(5px); }
.auth-box {
    width: min(100%, 440px);
    padding: 72px 32px 32px;
    border-radius: 22px;
    box-shadow: 0 24px 72px rgb(16 24 40 / 18%);
    text-align: right;
}
.auth-close {
    top: 24px;
    left: 32px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-canvas);
    color: var(--app-muted);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.auth-close .sprite-icon { width: 14px; height: 14px; }
.auth-close:hover { border-color: #cfd5df; background: #eef1f5; color: var(--app-ink); }
.auth-progress { position: absolute; top: 40px; right: 32px; display: flex; width: min(188px,calc(100% - 112px)); gap: 6px; margin: 0; direction: rtl; }
.auth-progress span { height: 3px; flex: 1; border-radius: 999px; background: var(--app-border); }
.auth-progress span:first-child,
.auth-progress.is-step-2 span { background: var(--app-accent); }
.auth-step-label { display: block; margin-bottom: 8px; color: var(--app-muted); font-size: 11px; font-weight: 600; }
.auth-box .auth-step h2 { margin: 0 0 16px; color: var(--app-ink); font-size: 21px; line-height: 1.55; text-align: right; }
.auth-box .auth-subtitle { margin: 0 0 23px; color: var(--app-muted); font-size: 12px; line-height: 1.9; text-align: right; }
.auth-box .auth-step label { margin: 0 0 8px; color: var(--app-ink); font-size: 12px; font-weight: 600; }
.auth-input-wrap {
    height: 52px;
    margin: 0;
    padding: 0 14px;
    border-color: #d8dde5;
    border-radius: 12px;
    background: var(--app-surface);
    box-shadow: none;
}
.auth-input-wrap:focus-within { border-color: #7b8492; box-shadow: 0 0 0 3px rgb(71 84 103 / 10%); }
.auth-input-wrap input { height: 100%; color: var(--app-ink); font-size: 14px; }
#phoneNumber { text-align: left; }
.auth-field-hint { margin: 8px 0 0; color: var(--app-muted); font-size: 11px; line-height: 1.7; }
.auth-box .auth-submit {
    position: relative;
    height: 50px;
    margin-top: 18px;
    border-radius: 11px;
    background: var(--app-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    transition: background-color .15s ease, transform .15s ease, opacity .15s ease;
}
.auth-box .auth-submit:hover { background: var(--app-accent-strong); }
.auth-box .auth-submit:active { transform: translateY(1px); }
.auth-box .auth-submit:disabled { cursor: wait; opacity: .78; }
.auth-box .auth-submit.is-loading::after {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-left-color: transparent;
    border-radius: 50%;
    content: "";
    transform: translateY(-50%);
    animation: auth-submit-spin .7s linear infinite;
}
@keyframes auth-submit-spin { to { transform: translateY(-50%) rotate(360deg); } }
.auth-box .auth-submit:focus-visible,
.auth-close:focus-visible,
.auth-back:focus-visible,
.resend-code:focus-visible { outline: 2px solid #98a2b3; outline-offset: 3px; }
.auth-box .auth-hint { margin: 13px 0 0; color: var(--app-muted); font-size: 10px; line-height: 1.8; text-align: right; }
.auth-phone-summary {
    display: grid;
    min-height: 60px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 14px;
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-canvas);
    direction: rtl;
}
.auth-phone-summary > span { color: var(--app-muted); font-size: 11px; }
.auth-phone-summary > strong { color: var(--app-ink); font-size: 14px; font-weight: 650; text-align: center; }
.auth-box .auth-back {
    position: static;
    justify-self: start;
    margin: 0;
    padding: 5px 8px;
    border-radius: 7px;
    color: var(--app-ink);
    font-size: 11px;
    font-weight: 600;
}
.auth-box .auth-back:hover { background: var(--app-surface); }
.auth-sms-hint { margin: -10px 0 18px; color: var(--app-muted); font-size: 11px; line-height: 1.8; }
.auth-box .name-field { margin-bottom: 16px; }
.auth-box .name-field .auth-input-wrap { margin-top: 0; }
.auth-code-input input {
    font-size: 21px;
    font-weight: 650;
    letter-spacing: .28em;
    text-align: center;
}
.auth-code-input input::placeholder { color: #aab2bf; letter-spacing: .22em; }
.auth-box .resend-row { flex-direction: column; gap: 6px; margin-top: 17px; color: var(--app-muted); font-size: 11px; }
.auth-box .resend-code { padding: 4px 8px; border-radius: 7px; color: var(--app-ink); font-size: 11px; font-weight: 600; }
.auth-box .resend-code:not(:disabled):hover { background: var(--app-canvas); color: var(--app-ink); }
.auth-box .resend-code:disabled { color: var(--app-muted); opacity: .72; }
.auth-box .auth-message { margin: 0 0 17px; border: 1px solid #f0d2d2; border-radius: 10px; background: #fff6f6; color: #a12b2b; }
.auth-box .auth-message.is-success { border-color: #c9e8d5; background: #f3fbf6; color: #236b43; }

/* A bright conversation canvas with a very soft ambient glow. */
body[data-page="index"] .chat-main,
body[data-page="index"] .chat-content {
    background-color: #fff;
    background-image:
        radial-gradient(ellipse at 50% 36%, rgb(239 245 255 / 42%), transparent 52%),
        radial-gradient(ellipse at 88% 88%, rgb(246 242 255 / 24%), transparent 34%);
}
body[data-page="index"] .chat-layout.chat-active .chat-content { background: #fff; }

body[data-page="index"] .chat-content { position: relative; }
.chat-drop-overlay {
    position: absolute;
    z-index: 12;
    inset: 12px;
    display: grid;
    place-items: center;
    border: 2px dashed #a8b0bd;
    border-radius: 20px;
    background: rgb(255 255 255 / 72%);
    pointer-events: none;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.chat-drop-overlay[hidden] { display: none !important; }
.chat-drop-prompt {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 22px 30px;
    border: 1px solid var(--app-border);
    border-radius: 16px;
    background: var(--app-surface);
    color: var(--app-ink);
    box-shadow: 0 8px 28px rgb(15 23 42 / 8%);
}
.chat-drop-prompt > span:last-child { color: var(--app-muted); font-size: 12px; }
.chat-drop-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: #f0f1f2;
    color: #202123;
    font-size: 27px;
    line-height: 1;
}
@media (max-width: 575.98px) {

    .auth-box { padding: 80px 22px 26px; border-radius: 22px 22px 0 0; }
    .auth-progress { top: 40px; right: 22px; width: min(188px,calc(100% - 112px)); }
    .auth-close { top: 24px; left: 22px; }
    .auth-box .auth-step h2 { font-size: 19px; }
    .auth-box .auth-subtitle { margin-bottom: 20px; }
    .auth-phone-summary { grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; padding-inline: 10px; }
    .auth-box .auth-back { font-size: 10px; }
}



/* Dedicated account settings page, styled after the light settings reference. */


.subscription-page-footer .subscription-credit-link { text-decoration: none; }
.subscription-page-footer .subscription-credit-link:hover { color: #202123; text-decoration: underline; }
.account-settings-page {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: auto;
    background: #fff;
    color: #202123;
    scrollbar-gutter: stable;
}
.account-settings-page-inner {
    width: min(100%, 1260px);
    margin-inline-start: 0;
    margin-inline-end: auto;
    padding: 34px clamp(18px, 4vw, 54px) 56px;
}
.account-settings-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 26px;
    margin-inline-start: 0;
    margin-inline-end: auto;
    max-width: 1100px;
}
.account-page-eyebrow { color: #6f6f6f; font-size: 12px; font-weight: 600; }
.account-settings-page-heading p { margin: 5px 0 0; color: #687386; font-size: 12px; line-height: 1.8; }
.account-settings-page-heading h1 {
    margin: 5px 0 0;
    color: #202123;
    font-size: clamp(23px, 2.1vw, 29px);
    font-weight: 650;
    line-height: 1.5;
}
.account-settings-page .account-page-layout {
    width: min(100%, 1100px);
    margin: 0;
    margin-inline-start: 0;
    margin-inline-end: auto;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: start;
    gap: 28px;
}
.account-settings-page .account-settings-nav { grid-column: 2; }
.account-settings-page .account-settings-content { grid-column: 1; }
.account-settings-page .account-page-nav {
    position: sticky;
    top: 18px;
    gap: 3px;
    padding: 0 18px 0 0;
    border-right: 1px solid #e5e5e5;
}
.account-nav-section-title {
    padding: 13px 11px 6px;
    color: #8a8a8a;
    font-size: 11px;
    font-weight: 600;
}
.account-settings-page .account-nav-item {
    min-height: 40px;
    padding: 9px 11px;
    border-radius: 9px;
    color: #454545;
    font-size: 12px;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease;
}
.account-settings-page .account-nav-item:hover,
.account-settings-page .account-nav-item.active {
    background: #f0f0f0;
    color: #202123;
}
.account-settings-page .account-nav-item.active { font-weight: 650; }
.account-settings-page .account-nav-item .sprite-icon { width: 16px; height: 16px; color: #606060; }
.account-settings-page .account-nav-access { min-height: 46px; gap: 10px; border: 1px solid transparent; }
.account-settings-page .account-nav-access:hover,
.account-settings-page .account-nav-access.active { border-color: #e8ebf3; background: linear-gradient(110deg, #f8faff, #f2f5fb); }
.account-settings-page .account-nav-icon-badge { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border: 1px solid rgb(255 255 255 / 85%); border-radius: 10px; background: #edf1fa; color: #5c6c8e; box-shadow: 0 2px 6px rgb(23 32 51 / 7%); }
.account-settings-page .account-nav-icon-badge .sprite-icon { width: 16px; height: 16px; color: inherit; }
.account-settings-page .account-nav-icon-badge.is-account { background: linear-gradient(145deg, #e9f0ff, #f2edff); color: #5367c6; }
.account-settings-page .account-nav-icon-badge.is-credit,
.account-settings-page .account-nav-icon-badge.is-subscription { background: linear-gradient(145deg, #e8f7f4, #eef5ff); color: #318b80; }
.account-settings-page .account-nav-icon-badge.is-bots { background: linear-gradient(145deg, #e8f7f4, #edf9f1); color: #27856d; }
.account-settings-page .account-nav-icon-badge.is-members { background: linear-gradient(145deg, #fff5e7, #fff0e8); color: #bf7932; }
.account-settings-page .account-nav-icon-badge.is-channels { background: linear-gradient(145deg, #edf0ff, #e9f4ff); color: #5470b8; }
.account-settings-page .account-nav-icon-badge.is-logout { background: #f6f6f7; color: #737985; box-shadow: none; }
.account-settings-page .account-settings-nav .account-logout-form {
    flex: 0 0 auto;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}
.account-settings-page .account-logout.account-nav-item,
.account-settings-page .account-logout.account-nav-item:hover { color: #555; }
.account-settings-page .account-settings-content { gap: 18px; }
.account-settings-page .account-content-panel {
    padding: 20px;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}
.account-settings-page .account-panel-heading { padding-bottom: 15px; border-color: #e8e8e8; }
.account-settings-page .account-panel-heading h3 { color: #202123; font-size: 16px; }
.account-settings-page .account-panel-heading .sprite-icon { color: #606060; }
.account-settings-page .account-profile { border-color: #e8edf5; background: linear-gradient(115deg, #f8faff, #fff); box-shadow: 0 5px 18px rgb(31 41 55 / 4%); }
.account-settings-page .account-avatar { width: 54px; height: 54px; flex-basis: 54px; border: 3px solid #fff; box-shadow: 0 2px 9px rgb(23 32 51 / 13%); }
.account-settings-page .account-setting-row { min-height: 54px; border-color: #e8e8e8; color: #666; }
.account-settings-page .account-setting-row strong { color: #202123; }
.account-settings-page .profile-image-box,
.account-settings-page .credit-topup-box {
    border-color: #e6eaf2;
    border-radius: 14px;
    background: linear-gradient(125deg, #f8faff, #fff 75%);
}
.account-settings-page .profile-image-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.account-settings-page .profile-image-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #e1e8ff; border-radius: 12px; background: linear-gradient(145deg, #edf2ff, #f5f0ff); color: #5468c8; }
.account-settings-page .profile-image-mark .sprite-icon { width: 20px; height: 20px; }
.account-settings-page .profile-image-copy { min-width: 0; }
.account-settings-page .profile-image-copy p { margin: 5px 0 0; color: #687386; font-size: 11px; line-height: 1.9; }
.account-settings-page .profile-image-box #profileImageStatus { grid-column: 2 / -1; min-height: 0; color: #617087; font-size: 11px; }
.account-settings-page .profile-image-form { min-width: 0; }
.account-settings-page .profile-image-box .btn-primary,
.account-settings-page .credit-topup-box .btn-primary,
.account-settings-page .account-quick-actions .btn-primary {
    border-color: #202123;
    background: #202123;
    color: #fff;
    box-shadow: none;
}
.account-settings-page .profile-image-box .btn-primary:hover,
.account-settings-page .credit-topup-box .btn-primary:hover,
.account-settings-page .account-quick-actions .btn-primary:hover {
    border-color: #3b3b3b;
    background: #3b3b3b;
}
.account-settings-page .btn-outline-primary,
.account-settings-page .account-quick-actions .btn-outline-primary {
    border-color: #d8d8d8;
    background: #fff;
    color: #303030;
    box-shadow: none;
}
.account-settings-page .btn-outline-primary:hover,
.account-settings-page .account-quick-actions .btn-outline-primary:hover { border-color: #bdbdbd; background: #f3f3f3; color: #202123; }
.account-settings-page .billing-summary > div { border-color: #e8e8e8; background: #fafafa; box-shadow: none; }
.account-settings-page .billing-plan-card,
.account-settings-page .billing-invoices { border-color: #e8e8e8; box-shadow: none; }
.account-settings-page .billing-plan-card.is-recommended { border-color: #bdbdbd; background: #fafafa; }
.account-settings-page :is(input, select, textarea):focus { border-color: #a7a7a7; box-shadow: 0 0 0 3px rgb(0 0 0 / 5%); }
@media (max-width: 767.98px) {

    .account-settings-page-inner { padding: 22px 14px 36px; }
    .account-settings-page-heading { align-items: center; margin-bottom: 18px; }
    .account-settings-page .account-page-layout { display: flex; flex-direction: column; gap: 16px; }
    .account-settings-page .account-page-nav {
        position: sticky;
        top: 0;
        z-index: 5;
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        padding: 6px;
        border: 1px solid #e8e8e8;
        border-radius: 11px;
        background: #fff;
        scrollbar-width: none;
    }
    .account-settings-page .account-page-nav::-webkit-scrollbar { display: none; }
    .account-settings-page .account-page-nav .account-nav-section-title,
    .account-settings-page .account-page-nav .account-logout-form { display: none; }
    .account-settings-page .account-page-nav .account-nav-item { min-width: max-content; min-height: 38px; justify-content: center; }
    .account-settings-page .account-content-panel { padding: 15px; }
    .account-settings-page .profile-image-box { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
    .account-settings-page .profile-image-form { grid-column: 1 / -1; width: 100%; }
    .account-settings-page .profile-image-form { min-width: 0; width: 100%; justify-content: flex-start; }
    .account-settings-page .profile-image-box #profileImageStatus { grid-column: 1 / -1; }
}


/* Keep the standalone account page aligned to the right and the overview as one card. */
.account-settings-page-inner { width: 100%; max-width: 1440px; margin: 0; }
.account-settings-page-heading { width: 100%; max-width: none; margin-inline: 0; }
.account-settings-page .account-page-layout {
    width: 100%;
    max-width: none;
    margin: 0;
    direction: rtl;
    grid-template-columns: minmax(0, 1fr) 210px;
}
.account-settings-page .account-settings-nav { grid-column: 2; }
.account-settings-page .account-settings-content { grid-column: 1; }
.account-settings-page .account-unified-panel.account-content-panel {
    padding: 0;
    border: 1px solid #e5eaf2;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgb(29 45 75 / 7%);
}
@media (max-width: 767.98px) {

    .account-settings-page-inner { width: 100%; padding: 20px 14px 30px; }
    .account-settings-page .account-page-layout { display: flex; flex-direction: column; }
    .account-settings-page .account-settings-content { order: 1; width: 100%; }
    .account-settings-page .account-page-nav { order: 2; }
    .account-settings-page .account-unified-panel.account-content-panel { padding: 0; }
}

.account-settings-page .billing-summary.account-summary-grid > .account-summary-card {
    min-height: 142px;
    border-color: #e9edf4;
    background: #fff;
    box-shadow: 0 4px 12px rgb(33 49 78 / 4%);
}
.account-settings-page .account-unified-profile .account-avatar { width: 70px; height: 70px; flex-basis: 70px; }
@media (max-width: 767.98px) {

    .account-settings-page .billing-summary.account-summary-grid > .account-summary-card { min-height: 130px; }
    .account-settings-page .account-unified-profile .account-avatar { width: 60px; height: 60px; flex-basis: 60px; }
}

@media (max-width: 420px) {

    .account-settings-page .account-unified-profile .account-avatar { width: 52px; height: 52px; flex-basis: 52px; }
}


/* Chat upload cards, progress and per-file errors. */
.chat-layout.chat-active .attachment-tray {
    min-height: 0;
    flex-wrap: wrap;
    overflow: visible;
    gap: 9px;
}
.chat-layout.chat-active .file-attachment {
    min-width: min(220px, 100%);
    max-width: min(290px, 100%);
    border-color: #e1e7f0;
    background: #fff;
    box-shadow: 0 4px 14px rgb(25 45 80 / 5%);
}
.chat-layout.chat-active .file-attachment.is-upload-queued,
.chat-layout.chat-active .file-attachment.is-upload-active {
    border-color: #cbd8f3;
    background: #f9fbff;
}
.chat-layout.chat-active .file-attachment.is-upload-failed {
    align-items: flex-start;
    border-color: #f1c5c5;
    background: #fffafa;
}
.chat-layout.chat-active .attachment-file-icon {
    flex-direction: column;
    gap: 1px;
    background: #edf3ff;
    color: #4268bd;
}
.attachment-file-icon .sprite-icon { width: 17px; height: 17px; }
.attachment-file-icon small { color: inherit; font-size: 7px; font-weight: 750; line-height: 1; }
.attachment-upload-progress {
    width: 100%;
    height: 5px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf7;
}
.attachment-upload-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4d7df0, #2563eb);
    transition: width .18s ease;
}
.is-upload-queued .attachment-upload-progress > span { background: #aab8d4; }
.is-upload-failed .attachment-meta small { color: #7b8495; }
.attachment-meta .attachment-upload-error {
    display: block;
    overflow-wrap: anywhere;
    color: #b42318 !important;
    font-size: 10px;
    line-height: 1.7;
    white-space: normal;
}
.attachment-upload-dismiss {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    padding: 0;
    border: 1px solid #f1d1d1;
    border-radius: 50%;
    background: #fff;
    color: #a33;
    line-height: 19px;
    cursor: pointer;
}
.attachment-upload-dismiss:hover { background: #fff0f0; }
.upload-status {
    width: min(100%, 980px);
    margin-top: 5px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-align: right;
}
.upload-status.is-info { border-color: #dbe5f7; background: #f7f9fd; color: #52627b; }
.upload-status.is-success { border-color: #cde9d6; background: #f3fbf5; color: #237344; }
.upload-status.is-error { border-color: #f1d0d0; background: #fff7f7; color: #a52b2b; }
@media (max-width: 575.98px) {

    .chat-layout.chat-active .file-attachment { min-width: min(190px, 100%); max-width: 100%; }
}


/* Physical column order: account access list on the right, details on the left. */
.account-settings-page .account-page-layout {
    direction: ltr;
    grid-template-columns: minmax(0, 1fr) 220px;
    grid-auto-rows: min-content;
    align-content: start;
    align-items: start;
    row-gap: 0;
    column-gap: 24px;
}
.account-settings-page .account-settings-nav {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    direction: rtl;
    border-right: 0;
    border-left: 1px solid #e5e5e5;
    padding: 0 0 0 18px;
    text-align: right;
}
.account-settings-page .account-settings-content {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    direction: rtl;
    text-align: right;
    margin-block: 0 !important;
}
.account-settings-page .account-unified-panel { direction: rtl; text-align: right; margin-block: 0 !important; }
@media (max-width: 767.98px) {

    .account-settings-page .account-page-layout { direction: rtl; flex-direction: column; }
    .account-settings-page .account-settings-content { order: 1; }
    .account-settings-page .account-settings-nav {
        order: 2;
        padding: 6px;
        border: 1px solid #e8e8e8;
    }
}


/* Account dashboard: full content width, readable cards, and compact mobile controls. */
.account-settings-page-inner {
    width: 100%;
    max-width: none;
    padding: 22px clamp(16px, 2.25vw, 32px) 38px;
}
.account-settings-page-heading { margin-bottom: 16px; }
.account-settings-page-heading h1 {
    margin: 0;
    color: #18243b;
    font-size: clamp(25px, 2.3vw, 32px);
    font-weight: 750;
    letter-spacing: -.025em;
}
.account-settings-page-heading p {
    margin-top: 5px;
    color: #64718a;
    font-size: 15px;
    font-weight: 500;
}
.account-settings-page .account-page-layout {
    width: 100%;
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 228px);
    gap: clamp(18px, 2.2vw, 30px);
}
.account-settings-page .account-settings-content { width: 100%; min-width: 0; }
.account-settings-page .account-unified-panel.account-content-panel {
    width: 100%;
    min-height: calc(100vh - 174px);
    overflow: hidden;
    padding: 0;
    border: 1px solid #dfe6f1;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 48px rgb(25 43 78 / 9%);
}
.account-unified-profile {
    min-height: 142px;
    gap: 19px;
    padding: 24px 28px;
    border-bottom-color: #e8edf5;
    background: linear-gradient(112deg, #fbfcff 0%, #f2f6ff 100%);
}
.account-avatar-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    flex: 0 0 90px;
}
.account-settings-page .account-unified-profile .account-avatar {
    width: 90px;
    height: 90px;
    border: 3px solid #fff;
    background: #e9eef8;
    box-shadow: 0 7px 20px rgb(28 45 79 / 15%);
}
.account-settings-page .account-unified-profile .account-avatar img { object-fit: cover; }
.account-settings-page #profileAvatarFallback { width: 36px; height: 36px; color: #52627d; }
.account-avatar-upload {
    position: absolute;
    inset-inline-end: -4px;
    inset-block-end: -3px;
    z-index: 2;
    display: block;
    margin: 0;
}
.account-avatar-upload button {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #243550;
    color: #fff;
    box-shadow: 0 4px 12px rgb(25 43 78 / 24%);
    cursor: pointer;
    transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.account-avatar-upload button:hover { background: #35527c; transform: translateY(-1px); }
.account-avatar-upload button:focus-visible { outline: 3px solid #9cb8f4; outline-offset: 2px; }
.account-avatar-upload button:disabled { cursor: wait; opacity: .65; }
.account-avatar-upload button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}
.account-unified-identity { display: flex; flex-direction: column; gap: 4px; }
.account-unified-identity h2 {
    margin: 0;
    color: #1b2942;
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 780;
    line-height: 1.45;
}
.account-unified-identity .account-phone { color: #66758e; font-size: 15px; }
#profileImageStatus { min-height: 0; color: #65748b; font-size: 12px; line-height: 1.7; }
#profileImageStatus:empty { display: none; }
#profileImageStatus.is-success { color: #28745b; }
#profileImageStatus.is-error { color: #b54747; }
#profileImageStatus.is-loading { color: #526b91; }
.account-settings-page .account-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 22px 28px 26px;
}
.account-settings-page .account-summary-card {
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    min-height: 152px;
    align-content: center;
    align-items: center;
    justify-items: stretch;
    gap: 5px 13px;
    padding: 18px;
    border-color: #e0e7f1;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #f9fbff 100%);
    box-shadow: 0 7px 20px rgb(31 52 88 / 5%);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.account-settings-page .account-summary-card:hover {
    border-color: #cbd7e9;
    box-shadow: 0 12px 26px rgb(31 52 88 / 9%);
    transform: translateY(-2px);
}
.account-settings-page .account-summary-icon {
    grid-column: 1;
    grid-row: 1 / span 4;
    width: 44px;
    height: 44px;
    border: 1px solid #e0e7f1;
    border-radius: 14px;
    background: #f0f4fa;
    color: #405675;
}
.account-settings-page .account-summary-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.account-settings-page .account-summary-label {
    grid-column: 2;
    grid-row: 1;
    color: #65748b;
    font-size: 13px;
    font-weight: 650;
}
.account-settings-page .account-summary-card strong {
    grid-column: 2;
    grid-row: 2;
    color: #1d2c45;
    font-size: clamp(19px, 1.8vw, 23px);
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.account-settings-page .account-summary-card > small:first-of-type {
    grid-column: 2;
    grid-row: 3;
    color: #6c7b93;
    font-size: 12px;
    line-height: 1.7;
}
.account-settings-page .account-summary-card .account-plan-expiry {
    grid-column: 2;
    grid-row: 4;
    color: #536782;
    font-size: 12px;
    font-weight: 600;
}
.account-settings-page .account-billing-section {
    margin: 0 28px 28px;
    padding: 24px;
    border: 1px solid #e0e7f1;
    border-radius: 22px;
    background: linear-gradient(155deg, #fcfdff 0%, #f7f9fd 100%);
    box-shadow: 0 8px 24px rgb(31 52 88 / 5%);
    scroll-margin-top: 20px;
}
.account-section-heading { align-items: center; gap: 14px; margin-bottom: 20px; }
.account-section-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border: 1px solid #e0e7f1;
    border-radius: 15px;
    background: #f0f4fa;
    color: #405675;
}
.account-section-icon svg { width: 21px; height: 21px; }
.account-section-heading h3 { color: #1d2c45; font-size: 19px; font-weight: 800; }
.account-section-heading p { margin-top: 4px; color: #6c7b93; font-size: 13px; line-height: 1.8; }
.account-plan-callout,
.account-settings-page .account-subscription-active-note {
    min-height: 58px;
    gap: 14px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.8;
}
.account-upgrade-note { border-color: #d9e4f5 !important; background: #f3f7fd !important; color: #405675 !important; }
.account-plan-callout .btn,
.account-upgrade-note .btn { min-height: 40px; padding-inline: 14px; font-size: 13px; font-weight: 700; }
.account-topup-section {
    display: grid;
    grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: 22px;
    padding: 20px;
    border-color: #e1e8f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 14px rgb(31 52 88 / 4%);
}
.account-topup-copy h4,
.account-invoices-heading h4 { color: #24344f; font-size: 16px; font-weight: 800; }
.account-topup-copy p { margin-top: 7px; color: #6c7b93; font-size: 13px; line-height: 1.9; }
.account-settings-page .credit-topup-form { min-width: 0; }
.account-settings-page .credit-topup-form input,
.account-settings-page .credit-topup-form .btn-primary { min-height: 48px; font-size: 14px; }
.account-settings-page .credit-topup-form .btn-primary { font-weight: 750; }
.account-settings-page .credit-topup-form small { margin-top: 8px; color: #6c7b93; font-size: 11px; }
.account-invoices-heading { margin: 24px 0 12px; }
.account-invoices-heading h4 { font-size: 16px; }
.account-invoices-heading span { color: #74829a; font-size: 12px; }
.account-settings-page .billing-invoices { max-height: 340px; border-radius: 16px; background: #fff; }
.account-settings-page .billing-invoice-row { min-height: 68px; padding: 13px 16px; font-size: 14px; }
.account-settings-page .billing-invoice-row strong { color: #263650; font-size: 13px; }
.account-settings-page .billing-invoice-row small { color: #71809a; font-size: 12px; }
.account-settings-page .account-page-nav {
    gap: 6px;
    padding-inline-start: 14px;
    border-color: #e1e7f0;
}
.account-nav-section-title { padding: 10px 12px 8px; color: #6b7890; font-size: 13px; font-weight: 750; }
.account-settings-page .account-nav-item {
    min-height: 48px;
    padding: 8px 11px;
    border-radius: 12px;
    color: #34445e;
    font-size: 14px;
    font-weight: 600;
}
.account-settings-page .account-nav-item:hover,
.account-settings-page .account-nav-item.active { background: #f1f4f8; color: #172842; }
.account-settings-page .account-nav-access { min-height: 52px; gap: 11px; }
.account-settings-page .account-nav-icon-badge .sprite-icon { width: 21px; height: 21px; color: inherit; }
.account-settings-page .account-logout.account-nav-item,
.account-settings-page .account-logout.account-nav-item:hover { color: #4f5e74; }
.account-settings-page .account-settings-nav .account-logout-form { border-color: #e1e7f0; }
@media (max-width: 900px) {

    .account-settings-page-inner { padding-inline: 18px; }
    .account-settings-page .account-page-layout { grid-template-columns: minmax(0, 1fr) 196px; gap: 18px; }
    .account-settings-page .account-summary-grid { padding-inline: 20px; }
    .account-settings-page .account-billing-section { margin-inline: 20px; padding: 20px; }
}

@media (max-width: 767.98px) {

    .account-settings-page-inner { padding: 18px 14px 28px; }
    .account-settings-page-heading { margin-bottom: 13px; }
    .account-settings-page-heading h1 { font-size: 25px; }
    .account-settings-page-heading p { font-size: 14px; }
    .account-settings-page .account-page-layout { display: flex; flex-direction: column; gap: 14px; }
    .account-settings-page .account-page-nav {
        position: sticky;
        top: 0;
        z-index: 5;
        order: 0;
        display: flex;
        width: 100%;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        padding: 6px;
        border: 1px solid #e1e7f0;
        border-radius: 14px;
        background: rgb(255 255 255 / 96%);
        box-shadow: 0 4px 14px rgb(30 48 80 / 7%);
        scrollbar-width: thin;
    }
    .account-nav-section-title { display: none; }
    .account-settings-page .account-page-nav .account-nav-item,
    .account-settings-page .account-nav-access { min-width: max-content; min-height: 44px; padding: 5px 10px; white-space: nowrap; }
.account-settings-page .account-nav-icon-badge .sprite-icon { width: 19px; height: 19px; }
    .account-settings-page .account-settings-nav .account-logout-form { margin: 0; padding: 0; border: 0; }
    .account-settings-page .account-settings-content { order: 1; width: 100%; }
    .account-settings-page .account-unified-panel.account-content-panel { min-height: 0; border-radius: 20px; }
    .account-unified-profile { min-height: 120px; flex-wrap: nowrap; gap: 14px; padding: 18px; }
    .account-avatar-wrap,
    .account-settings-page .account-unified-profile .account-avatar { width: 76px; height: 76px; flex-basis: 76px; }
    .account-avatar-upload button { width: 34px; height: 34px; }
    .account-unified-identity h2 { font-size: 22px; }
    .account-unified-identity .account-phone { font-size: 14px; }
    #profileImageStatus { font-size: 11px; }
    .account-settings-page .account-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 15px; }
    .account-settings-page .account-summary-card { min-height: 128px; gap: 4px 10px; padding: 13px; border-radius: 15px; }
    .account-settings-page .plan-summary-card { grid-column: 1 / -1; }
    .account-settings-page .account-summary-icon { width: 38px; height: 38px; }
    .account-settings-page .account-summary-icon svg { width: 20px; height: 20px; }
    .account-settings-page .account-summary-label { font-size: 12px; }
    .account-settings-page .account-summary-card strong { font-size: clamp(17px, 4.5vw, 21px); }
    .account-settings-page .account-summary-card > small:first-of-type,
    .account-settings-page .account-summary-card .account-plan-expiry { font-size: 11px; }
    .account-settings-page .account-billing-section { margin: 0 14px 14px; padding: 16px; border-radius: 18px; }
    .account-section-heading { gap: 11px; margin-bottom: 15px; }
    .account-section-icon { width: 40px; height: 40px; flex-basis: 40px; }
    .account-section-heading h3 { font-size: 17px; }
    .account-section-heading p { font-size: 12px; }
    .account-plan-callout,
    .account-settings-page .account-subscription-active-note { align-items: flex-start; flex-direction: column; gap: 9px; padding: 12px; font-size: 12px; }
    .account-topup-section { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 15px; }
    .account-topup-copy h4,
    .account-invoices-heading h4 { font-size: 15px; }
    .account-topup-copy p { font-size: 12px; }
    .account-settings-page .credit-topup-form .input-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .account-settings-page .credit-topup-form .btn-primary { width: 100%; border-radius: 10px; }
    .account-invoices-heading { margin-top: 19px; }
    .account-settings-page .billing-invoices { max-height: 300px; }
    .account-settings-page .billing-invoice-row { min-height: 64px; gap: 10px; padding: 11px; }
}

@media (max-width: 420px) {

    .account-unified-profile { gap: 11px; padding: 15px 13px; }
    .account-avatar-wrap,
    .account-settings-page .account-unified-profile .account-avatar { width: 68px; height: 68px; flex-basis: 68px; }
    .account-unified-identity h2 { font-size: 20px; }
    .account-settings-page .account-summary-grid { gap: 8px; padding: 12px; }
    .account-settings-page .account-summary-card { grid-template-columns: 34px minmax(0, 1fr); gap: 4px 8px; min-height: 118px; padding: 11px; }
    .account-settings-page .account-summary-icon { width: 34px; height: 34px; border-radius: 11px; }
    .account-settings-page .account-summary-icon svg { width: 18px; height: 18px; }
    .account-settings-page .account-summary-card strong { font-size: 17px; }
    .account-settings-page .account-billing-section { margin-inline: 10px; padding: 13px; }
}


/* Account page refinements: clearer admin navigation and a polished credit form. */
.account-settings-page .account-nav-icon-badge .account-nav-inline-icon {
    fill: none !important;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.account-settings-page .account-topup-section {
    grid-template-columns: minmax(190px, .72fr) minmax(0, 1.28fr);
    gap: 24px;
    padding: 22px;
    border: 1px solid #dbe5f2;
    background: linear-gradient(135deg, #fff 0%, #f8faff 100%);
    box-shadow: 0 8px 22px rgb(35 58 94 / 6%);
}
.account-settings-page .account-topup-copy h4 { margin: 0; font-size: 17px; }
.account-settings-page .account-topup-copy p { margin: 7px 0 0; font-size: 13px; }
.account-settings-page .credit-topup-form { display: grid; min-width: 0; gap: 10px; }
.account-settings-page .credit-topup-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
}
.account-settings-page .credit-topup-input-wrap { position: relative; min-width: 0; }
.account-settings-page .credit-topup-input-wrap input {
    display: block;
    width: 100%;
    min-height: 52px;
    padding-inline: 14px 62px;
    border: 1px solid #d6e0ed;
    border-radius: 12px;
    outline: 0;
    background: #fff;
    color: #24344f;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.account-settings-page .credit-topup-input-wrap input::placeholder { color: #9aa6b8; font-weight: 500; }
.account-settings-page .credit-topup-input-wrap input:focus {
    border-color: #6c8fe0;
    box-shadow: 0 0 0 3px rgb(57 103 201 / 12%);
}
.account-settings-page .credit-topup-currency {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    padding-inline-end: 10px;
    transform: translateY(-50%);
    border-inline-start: 1px solid #e2e8f0;
    color: #65758d;
    font-size: 12px;
    font-weight: 700;
    line-height: 25px;
}
.account-settings-page .credit-topup-form .btn-primary {
    display: inline-flex;
    min-width: 158px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 18px;
    border: 0;
    border-radius: 12px;
    background: #315fc7;
    box-shadow: 0 5px 12px rgb(49 95 199 / 20%);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.account-settings-page .credit-topup-form .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #264fae;
    box-shadow: 0 7px 15px rgb(49 95 199 / 25%);
}
.account-settings-page .credit-topup-form .btn-primary:disabled { opacity: .72; }
.account-settings-page .credit-topup-button-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: scaleX(-1);
}
.account-settings-page .credit-topup-form small {
    display: block;
    min-height: 34px;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid #e7edf5;
    border-radius: 10px;
    background: #f5f8fc;
    color: #687994;
    font-size: 11px;
    line-height: 1.6;
}
@media (max-width: 767.98px) {

    .account-settings-page .account-topup-section { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
    .account-settings-page .account-topup-copy h4 { font-size: 16px; }
    .account-settings-page .account-topup-copy p { font-size: 12px; }
    .account-settings-page .credit-topup-controls { grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .account-settings-page .credit-topup-form .btn-primary { width: 100%; min-width: 0; }
}


/* Give the business link more breathing room above and tighten the gap below. */
.account-settings-page-inner {
    max-width: 1240px;
    margin-inline: auto;
}
.account-settings-page-heading {
    display: block;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    text-align: center;
}
.account-settings-page-heading > div {
    width: 100%;
    text-align: center;
}
.account-settings-page .account-page-layout {
    width: min(100%, 1040px);
    margin-inline: auto;
}
.account-settings-page .account-unified-profile {
    min-height: 238px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: 30px 28px 26px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, #eef4ff 0%, #f8faff 48%, #fff 100%);
}
.account-settings-page .account-avatar-wrap {
    width: 112px;
    height: 112px;
    flex-basis: 112px;
}
.account-settings-page .account-unified-profile .account-avatar {
    width: 112px;
    height: 112px;
    border-width: 4px;
    box-shadow: 0 10px 28px rgb(28 45 79 / 18%);
}
.account-settings-page .account-unified-identity {
    align-items: center;
}
.account-settings-page .account-unified-identity h2 {
    font-size: clamp(24px, 2.2vw, 32px);
}
.account-settings-page .account-unified-identity .account-phone {
    color: #71809a;
    font-size: 14px;
}
.account-settings-page .account-avatar-upload {
    inset-inline-end: -6px;
    inset-block-end: -4px;
}
.account-settings-page .account-avatar-upload button {
    width: 40px;
    height: 40px;
}
@media (max-width: 767.98px) {

    .account-settings-page .account-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .account-settings-page .account-summary-card,
    .account-settings-page .plan-summary-card {
        grid-column: auto;
        min-height: 116px;
    }
    .account-settings-page .account-unified-profile {
        min-height: 205px;
        padding: 24px 18px 22px;
    }
    .account-settings-page .account-avatar-wrap,
    .account-settings-page .account-unified-profile .account-avatar {
        width: 88px;
        height: 88px;
        flex-basis: 88px;
    }
}








/* Final chat composer layout: centered before the first message, docked after. */
.chat-composer { display: flex; min-height: 0; align-items: stretch; flex-direction: column; gap: 0; padding: 8px 12px 12px; border: 1px solid #e1e4e9; border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgb(16 24 40 / 6%); }
.chat-layout.chat-active .chat-composer { border-radius: 20px; background: #fff; }
.chat-composer .attachment-tray { order: 0; }
.chat-composer .upload-status { order: 1; }
.chat-composer .attachment-tray:empty,
.chat-composer .upload-status:empty { display: none; }
.chat-composer .attachment-tray:not(:empty) { margin-bottom: 6px; }
.chat-composer .composer-compose-area { order: 2; }
.chat-composer textarea { width: 100%; min-height: 36px; margin-bottom: 8px; padding: 2px 7px 3px; }
.chat-composer .composer-toolbar { min-height: 38px; gap: 8px; direction: ltr; }
.chat-composer .composer-toolbar .composer-tool-menu { right: auto; left: 0; direction: rtl; }
.composer-toolbar .composer-icon { border-radius: 50%; }
.composer-toolbar .send-button { width: 32px; height: 32px; flex-basis: 32px; margin: 0; }
.chat-composer .send-button .send-icon { width: 17px; height: 17px; }
.composer-toolbar .send-button { display: grid; place-items: center; border: 0; border-radius: 50%; background: #b7bbc2; color: #fff; }
.composer-toolbar .send-button.is-active { background: #3b82f6; color: #fff; }
.composer-toolbar .send-button.is-active:hover { background: #2563eb; }
.composer-toolbar .send-button.is-loading { position: relative; background: #3b82f6 !important; }
.composer-toolbar .send-button.is-loading .send-spinner { display: none !important; }
.composer-toolbar .send-button.is-loading::after { width: 10px; height: 10px; border-radius: 2px; background: #fff; content: ""; }
@media (max-width: 767.98px) {

    .chat-composer { padding: 7px 9px 11px; }
    .chat-composer textarea { min-height: 32px; }
    .chat-composer .attachment-tray:not(:empty) { margin-bottom: 5px; }
    .chat-composer .composer-toolbar { gap: 5px; }
    .composer-toolbar .send-button { width: 30px; height: 30px; flex-basis: 30px; }
    .chat-composer .send-button .send-icon { width: 15px; height: 15px; }
}

body[data-page="index"] .chat-layout .chat-main,
body[data-page="index"] .chat-layout .chat-content { background: #fff; background-image: none; }
body[data-page="index"] .chat-layout .chat-content { display: flex; min-height: 0; align-items: center; justify-content: center; padding: 24px 20px 100px; }
body[data-page="index"] .chat-layout .welcome-panel { display: flex; width: min(100%, 770px); height: auto; min-height: 0; margin: 0 auto; flex-direction: column; }
body[data-page="index"] .welcome-panel:not(.has-messages) h1 { margin: 0 0 28px; color: #202938; }
body[data-page="index"] .welcome-panel:not(.has-messages) .chat-composer { margin: 0; }
body[data-page="index"] .welcome-panel:not(.has-messages) .message-list { flex: 0 0 0; margin: 0; }
body[data-page="index"] .chat-layout.chat-active .chat-content { align-items: stretch; justify-content: flex-start; padding: 22px 20px 12px; }
body[data-page="index"] .chat-layout.chat-active .welcome-panel { width: min(100%, 850px); height: 100%; max-width: 850px; padding: 0; }
body[data-page="index"] .chat-layout .message-list { width: 100%; max-height: none; min-height: 0; flex: 1 1 auto; margin: 0 auto 16px; }
body[data-page="index"] .chat-layout.chat-active .message-list { padding: 0 14px 18px; }
body[data-page="index"] .chat-layout .chat-composer { width: 100%; flex: 0 0 auto; }
body[data-page="index"] .chat-layout.chat-active .chat-composer { width: min(100%, 850px); max-width: 850px; margin: 0 auto; }
body[data-page="index"] .chat-layout .chat-composer .attachment-tray { width: 100%; margin: 0 0 2px; }
body[data-page="index"] .chat-layout .chat-composer .upload-status { width: fit-content; max-width: min(100%, 680px); align-self: flex-start; margin: 0 0 8px; overflow-wrap: anywhere; }
body[data-page="index"] .chat-layout .chat-composer .attachment-tray { display: flex; align-items: stretch; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 1px 5px; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
body[data-page="index"] .chat-layout .chat-composer .file-attachment { min-width: 0; max-width: none; flex: 0 0 min(280px, 82vw); }
body[data-page="index"] .chat-layout .chat-composer .upload-status { min-height: 0; padding: 6px 9px; line-height: 1.65; }
body[data-page="index"] .chat-layout .chat-composer .composer-compose-area { width: 100%; }
body[data-page="index"] .chat-layout .chat-composer .composer-toolbar { width: 100%; }
body[data-page="index"] .chat-layout .chat-composer :is(.composer-icon, .send-button):focus-visible { outline: 2px solid #94a3b8; outline-offset: 2px; }



@media (max-width: 767.98px) {

    body[data-page="index"] .chat-layout .chat-content,
    body[data-page="index"] .chat-layout.chat-active .chat-content { padding: 14px 12px max(10px, env(safe-area-inset-bottom)); }
    body[data-page="index"] .chat-layout:not(.chat-active) .chat-content { padding: 22px 14px 70px; }
    body[data-page="index"] .welcome-panel:not(.has-messages) h1 { margin-bottom: 22px; font-size: clamp(22px, 6vw, 28px); }
    body[data-page="index"] .chat-layout.chat-active .chat-composer { width: 100%; }
    body[data-page="index"] .chat-layout.chat-active .message-list { padding: 0 6px 12px; }
    body[data-page="index"] .chat-layout .chat-composer .file-attachment { min-width: min(190px, 100%); max-width: 100%; }
}

/* The account dashboard has no secondary navigation; keep its panels full width. */
.account-settings-page .account-page-layout { display: block; width: min(100%, 1040px); margin-inline: auto; }
.account-settings-page .account-settings-content { width: 100%; min-width: 0; }
.account-profile-logout-form { display: flex; width: 100%; align-items: stretch; justify-content: stretch; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--app-border, #e4e7ec); }
.account-profile-logout {
    display: flex;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    color: #b42318;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.account-profile-logout .sprite-icon { width: 16px; height: 16px; color: inherit; }
.account-profile-logout:hover { border-color: #f3c7c4; background: #fff7f6; }
.account-profile-logout:focus-visible { outline: 2px solid #b42318; outline-offset: 2px; }
.account-topup-open { min-height: 46px; justify-self: start; padding-inline: 24px; border-radius: 12px; font-weight: 750; }
.account-topup-modal-content { border: 1px solid var(--app-border, #e4e7ec); border-radius: 18px; box-shadow: 0 20px 60px rgb(17 35 67 / 18%); }
.account-topup-modal-content .modal-header { align-items: center; border-bottom-color: var(--app-border, #e4e7ec); }
.account-topup-modal-content .modal-title { color: var(--app-ink, #1d2939); font-size: 17px; font-weight: 750; }
.account-topup-modal-content .modal-body { padding: 20px; }
.account-topup-modal-copy { margin: 0 0 16px; color: var(--app-muted, #667085); font-size: 13px; line-height: 1.9; }
.account-topup-modal-content .credit-topup-form { display: grid; gap: 8px; }
.account-topup-modal-content .credit-topup-form .form-label { color: var(--app-ink, #1d2939); font-size: 12px; font-weight: 650; }
.account-topup-modal-content .credit-topup-form input { min-height: 48px; }
@media (max-width: 575.98px) { .account-topup-open { width: 100%; } .account-topup-modal-content .modal-body { padding: 16px; } }

/* Keep voice/upload feedback beside the microphone in the composer toolbar. */
.chat-composer .composer-toolbar { position: relative; }
.chat-composer .composer-toolbar .upload-status { position: absolute; right: 72px; display: none; width: auto; min-width: 0; max-width: min(58vw, 240px); min-height: 0; margin: 0; padding: 5px 9px; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; text-align: right; line-height: 1.5; }
.chat-composer .composer-toolbar .upload-status.is-visible { display: inline-flex; }
.chat-composer .composer-toolbar .voice-button { display: inline-flex; width: 32px; min-width: 32px; flex: 0 0 32px; align-items: center; justify-content: center; gap: 4px; overflow: hidden; direction: rtl; transition: width 240ms cubic-bezier(.2,.75,.25,1), flex-basis 240ms cubic-bezier(.2,.75,.25,1), background-color 180ms ease, color 180ms ease, border-radius 180ms ease; }
.chat-composer .composer-toolbar .voice-button .sprite-icon { flex: 0 0 19px; }
.voice-button-waveform { display: none; width: 25px; height: 16px; flex: 0 0 25px; align-items: center; justify-content: space-between; gap: 2px; }
.voice-button-waveform i { display: block; width: 2px; height: 8px; border-radius: 2px; background: currentColor; transform: scaleY(.45); transform-origin: center; animation: voice-wave 560ms ease-in-out infinite; }
.voice-button-waveform i:nth-child(2) { animation-delay: -110ms; }
.voice-button-waveform i:nth-child(3) { animation-delay: -290ms; }
.voice-button-waveform i:nth-child(4) { animation-delay: -190ms; }
.voice-button-waveform i:nth-child(5) { animation-delay: -390ms; }
.voice-button-status { display: none; white-space: nowrap; font-family: inherit; font-size: 10px; font-weight: 600; line-height: 1; }
#voiceButton:is(.is-recording, .is-done, .is-error) { width: 68px; min-width: 68px; flex-basis: 68px; gap: 8px; padding-inline: 6px; border-radius: 999px; }
#voiceButton.is-processing { width: 96px; min-width: 96px; flex-basis: 96px; gap: 8px; padding-inline: 6px; border-radius: 999px; }
.voice-button.is-recording { color: #c62828; background: #fff1f0; }
.voice-button.is-recording .voice-button-waveform { display: inline-flex; }
.voice-button.is-processing .voice-button-status,
.voice-button.is-done .voice-button-status,
.voice-button.is-error .voice-button-status { display: inline; }
.voice-button.is-processing { color: #52627b; background: #f3f6fb; }
.voice-button.is-done { color: #237344; background: #f0f9f2; }
.voice-button.is-error { color: #a52b2b; background: #fff1f0; }
@keyframes voice-wave { 0%, 100% { transform: scaleY(.35); opacity: .62; } 50% { transform: scaleY(1.8); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .voice-button-waveform i { animation: none; height: 8px; } .chat-composer .composer-toolbar .voice-button { transition: none; } }

/* Recovery controls remain tappable and wrap cleanly on narrow chat screens. */
.chat-recovery-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chat-recovery-controls .btn,
.chat-recovery-inline { min-height: 44px; white-space: normal; }
.chat-recovery-status { overflow-wrap: anywhere; }

/* UX refinements: compact, responsive controls and clear fixed actions. */
.chat-starter-prompts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 auto 16px;max-width:760px}.chat-starter-prompts button{border:1px solid #e1e5eb;border-radius:999px;background:#fff;color:#435064;padding:8px 12px;font:inherit;font-size:12px;cursor:pointer}.chat-starter-prompts button:hover{border-color:#91aef3;background:#f7f9ff}.composer-guidance{align-self:center;color:#7b8492;font-size:10px;white-space:nowrap}.chat-stop-button{border:1px solid #d7dce4;border-radius:999px;background:#fff;color:#475569;padding:7px 10px;font:inherit;font-size:11px;cursor:pointer}.chat-stop-button[hidden]{display:none!important}.account-unified-profile{padding:16px 20px!important}.account-avatar{width:58px!important;height:58px!important}.account-invoices-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none}.account-invoices-heading::-webkit-details-marker{display:none}.account-invoices-heading span{color:#778197;font-size:11px}.account-invoice-history:not([open]) .account-invoices-heading{margin-bottom:0}.bot-search-header{display:flex;flex-wrap:wrap;gap:8px}.bot-directory-count{display:inline-flex;align-items:center;color:#64748b;font-size:11px;white-space:nowrap}.bot-directory-filter{width:auto;min-width:120px;max-width:170px}.members-overview,.member-pagination{position:sticky;top:8px;z-index:5}.member-message-composer{position:relative}.member-message-preview{display:grid;gap:5px;margin:12px 0;padding:12px;border:1px solid #e5e9f1;border-radius:12px;background:#f8fafc}.member-message-preview pre{max-height:150px;margin:0;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:12px}.channel-list-grid{padding-bottom:calc(96px + env(safe-area-inset-bottom))}.channel-card-actions{display:flex;flex-wrap:wrap;gap:8px}.business-contact-actions{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0 18px}.business-contact-actions>span{color:#778197;font-size:12px}.business-category-filters,.business-quick-filters{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin:14px 0;padding:12px;border:1px solid #e8ebf2;border-radius:12px;background:#fff}.business-category-filters>strong{margin-left:auto;color:#4b5870;font-size:12px}.business-category-filters label,.business-quick-filters label{display:grid;gap:4px;color:#69758b;font-size:10px}.business-category-filters select,.business-quick-filters select{min-width:145px;max-width:220px}.business-category-children{position:relative}.category-child-search{width:min(100%,280px);margin:0 0 10px}.business-similar-reason{display:block;margin-top:5px;color:#778197;font-size:10px}
@media(max-width:767.98px){.composer-guidance{display:none}.chat-starter-prompts{gap:6px;margin-bottom:10px}.chat-starter-prompts button{font-size:11px;padding:7px 10px}.chat-layout:not(.chat-active) .chat-content{padding-bottom:calc(18px + env(safe-area-inset-bottom))}.chat-layout:not(.chat-active) .welcome-panel{transform:translateY(-10px)}.bot-search-header{width:100%}.bot-directory-filter{flex:1 1 125px;max-width:none}.business-category-filters>strong{width:100%;margin:0}.business-category-filters label,.business-quick-filters label{flex:1 1 140px}.business-category-filters select,.business-quick-filters select{width:100%;min-width:0;max-width:none}}
#chatComposer.is-loading #stopChatResponse{pointer-events:auto}.member-selection-bar{position:fixed;right:50%;bottom:calc(12px + env(safe-area-inset-bottom));z-index:1000;display:flex;width:min(calc(100% - 24px),760px);align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid #d9e2f0;border-radius:14px;background:#fff;box-shadow:0 10px 35px #172b4d2b;transform:translateX(50%)}.member-selection-bar[hidden]{display:none!important}.member-selection-bar strong{font-size:12px;color:#34445e}.member-group-prerequisite{margin:12px 0;color:#728098;font-size:11px}.business-profile-completeness{margin:4px 0 14px;color:#66758d;font-size:11px}.business-directory-card-copy p,.business-search-result-copy p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.business-category-search{width:min(100%,360px);margin:10px 0}.channel-empty-steps{margin:8px 0 0;padding-right:22px;text-align:right;color:#68758b;font-size:12px;line-height:2}
.chat-media-help{width:min(100%,760px);margin:10px auto 0;color:#818a98;font-size:10px;line-height:1.7;text-align:center}.chat-layout.chat-active .chat-media-help{display:block}
@media(max-width:767.98px){.chat-media-help{width:calc(100% - 20px);margin:8px auto 0;font-size:9px}.chat-layout:not(.chat-active) .welcome-panel{transform:translateY(-6px)}}

/* Account dashboard hierarchy and stable payment history states. */
.account-settings-page .account-unified-profile { min-height: 190px; padding-block: 22px; }
.account-settings-page .account-summary-grid { align-items: stretch; }
.account-settings-page .account-summary-card { min-height: 132px; }
.account-settings-page .billing-invoices { min-height: 74px; }
.account-settings-page .billing-invoices[aria-busy="true"] { overflow: hidden; }
.account-settings-page .billing-invoice-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, auto) 16px; align-items: center; }
.account-settings-page .billing-invoice-row > div:last-of-type { align-items: flex-start; }
.account-settings-page .billing-invoice-row strong { line-height: 1.7; overflow-wrap: anywhere; }
.account-settings-page .billing-invoice-row small { line-height: 1.7; }
.account-settings-page .billing-invoices.is-error { border-color: #f1c9c6; background: #fffafa; }
.account-settings-page .billing-invoices.is-error .billing-empty { color: #a33b36; }
.account-settings-page .billing-invoices.is-empty { background: #f8fafc; }
@media (max-width: 767.98px) {
    .account-settings-page .account-unified-profile { min-height: 176px; padding: 18px 16px; }
    .account-settings-page .account-summary-grid { gap: 9px; }
    .account-settings-page .account-summary-card { min-height: 112px; }
    .account-settings-page .billing-invoices { min-height: 78px; }
    .account-settings-page .billing-invoice-row { grid-template-columns: minmax(0, 1fr) minmax(112px, auto) 14px; gap: 8px; min-height: 76px; padding: 10px; }
    .account-settings-page .billing-invoice-row strong { font-size: 12px; }
    .account-settings-page .billing-invoice-row small { font-size: 11px; }
}
@media (max-width: 380px) {
    .account-settings-page .billing-invoice-row { grid-template-columns: minmax(0, 1fr) minmax(100px, auto) 12px; gap: 6px; }
}

/* Make the first action obvious and keep composer feedback in its own row. */
body[data-page="index"] .chat-welcome-heading { margin: 0 0 22px; }
body[data-page="index"] .chat-welcome-heading h1 { margin: 0 0 7px !important; }
body[data-page="index"] .chat-welcome-heading p { margin: 0; color: #667085; font-size: 13px; line-height: 1.8; }
body[data-page="index"] .chat-welcome-heading p[hidden] { display: none !important; }
body[data-page="index"] .welcome-panel:not(.has-messages) .chat-composer { border-color: #d7dee8; box-shadow: 0 12px 32px rgb(16 24 40 / 9%); }
body[data-page="index"] .chat-composer .composer-toolbar { min-height: 44px; flex-wrap: wrap; align-items: center; row-gap: 6px; }
body[data-page="index"] .chat-composer .composer-toolbar .composer-icon,
body[data-page="index"] .chat-composer .composer-toolbar .voice-button { width: 40px; min-width: 40px; height: 40px; min-height: 40px; flex-basis: 40px; border-radius: 11px; }
body[data-page="index"] .chat-composer .composer-toolbar .composer-icon .sprite-icon,
body[data-page="index"] .chat-composer .composer-toolbar .voice-button .sprite-icon { width: 17px; height: 17px; }
body[data-page="index"] .chat-composer .composer-toolbar .composer-tool-menu-wrap { margin-left: 6px; }
body[data-page="index"] .chat-composer .composer-toolbar #voiceButton:is(.is-recording, .is-done, .is-error) { width: 72px; min-width: 72px; flex-basis: 72px; }
body[data-page="index"] .chat-composer .composer-toolbar #voiceButton.is-processing { width: 100px; min-width: 100px; flex-basis: 100px; }
body[data-page="index"] .chat-composer .composer-toolbar .send-button { width: 36px; height: 36px; min-height: 36px; flex-basis: 36px; }
body[data-page="index"] .chat-composer .composer-toolbar .send-button .send-icon { width: 14.4px; height: 14.4px; }
body[data-page="index"] .chat-composer .composer-toolbar .composer-toolbar-spacer { flex: 1 1 8px; }
body[data-page="index"] .chat-composer .composer-toolbar .chat-stop-button { min-height: 44px; }
body[data-page="index"] .chat-composer .composer-toolbar .upload-status { position: static; display: none; width: 100%; max-width: 100%; min-height: 36px; flex: 1 0 100%; justify-content: flex-start; margin: 0; padding: 7px 10px; line-height: 1.7; overflow-wrap: anywhere; }
body[data-page="index"] .chat-composer .composer-toolbar .upload-status.is-visible { display: inline-flex; }
body[data-page="index"] .chat-composer .composer-toolbar :is(.composer-icon, .voice-button, .send-button, .chat-stop-button):focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
@media (max-width: 767.98px) {
    body[data-page="index"] .chat-welcome-heading { margin-bottom: 16px; }
    body[data-page="index"] .chat-welcome-heading p { font-size: 12px; }
    body[data-page="index"] .chat-composer { padding: 9px 10px 10px; }
    body[data-page="index"] .chat-composer textarea { min-height: 40px; margin-bottom: 6px; }
    body[data-page="index"] .chat-composer .composer-toolbar { column-gap: 6px; }
    body[data-page="index"] .chat-composer .composer-toolbar .composer-icon,
    body[data-page="index"] .chat-composer .composer-toolbar .voice-button { width: 38px; min-width: 38px; height: 38px; min-height: 38px; flex-basis: 38px; border-radius: 10px; }
    body[data-page="index"] .chat-composer .composer-toolbar .composer-icon .sprite-icon,
    body[data-page="index"] .chat-composer .composer-toolbar .voice-button .sprite-icon { width: 16px; height: 16px; }
    body[data-page="index"] .chat-composer .composer-toolbar .composer-tool-menu-wrap { margin-left: 7px; }
    body[data-page="index"] .chat-composer .composer-toolbar .send-button { width: 34.2px; height: 34.2px; min-height: 34.2px; flex-basis: 34.2px; }
    body[data-page="index"] .chat-composer .composer-toolbar .send-button .send-icon { width: 13.5px; height: 13.5px; }
    body[data-page="index"] .chat-composer .composer-toolbar .composer-guidance { display: none; }
}

/* Chat controls: clearer type scale and the output-format prototype. */
.topbar-title { font-size: 16px; }
.chat-composer textarea { font-size: 16px; }
.composer-output-modal,
.composer-output-modal[hidden] { display: none !important; }
.composer-output-modal:not([hidden]) {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgb(15 23 42 / 38%);
    backdrop-filter: blur(3px);
}
.composer-output-dialog {
    width: min(100%, 460px);
    max-height: min(80dvh, 620px);
    overflow: auto;
    padding: 20px;
    border: 1px solid #e3e8ef;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 60px rgb(15 23 42 / 20%);
    text-align: start;
}
.composer-output-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.composer-output-header h2 { margin: 0; color: #202b3d; font-size: 19px; font-weight: 750; }
.composer-output-close { width: 36px; height: 36px; border: 1px solid #e5eaf1; border-radius: 10px; background: #f8fafc; color: #64748b; font: 24px/1 Vazirmatn,sans-serif; cursor: pointer; }
.composer-output-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.composer-output-options > label {
    position: relative;
    display: grid;
    grid-template-columns: 19px 42px minmax(0, 1fr);
    min-height: 76px;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid #e3e9f1;
    border-radius: 16px;
    background: linear-gradient(145deg,#fff,#fbfdff);
    color: #334155;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.composer-output-suboptions > label { display: flex; min-height: 48px; align-items: center; gap: 11px; margin: 0; padding: 10px 12px; border: 1px solid #e6ebf2; border-radius: 12px; background: #fff; color: #334155; font-size: 14px; cursor: pointer; }
.composer-output-options > label:has(input:checked) { border-color: #7aa9f4; background: linear-gradient(145deg,#f1f7ff,#eaf2ff); color: #245cb5; box-shadow: 0 6px 18px rgb(37 99 235 / 10%), inset 0 0 0 1px rgb(37 99 235 / 8%); }
.composer-output-options > label:hover { border-color: #b6c9e4; transform: translateY(-1px); }
.composer-output-options > label:has(input:focus-visible) { outline: 3px solid rgb(59 130 246 / 24%); outline-offset: 2px; }
.composer-output-suboptions > label:has(input:checked) { border-color: #8eb5f5; background: #f4f8ff; color: #245cb5; }
.composer-output-options input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: #2563eb; }
.composer-output-suboptions input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: #2563eb; }
.composer-output-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #f0f4f9; color: #6b7f96; }
.composer-output-icon svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.composer-output-options > label:has(input:checked) .composer-output-icon { background: #dceaff; color: #2563eb; }
.composer-output-check { display: none; }
.composer-output-options > label:has(input:checked) .composer-output-check { position: absolute; top: 8px; inset-inline-start: 8px; display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; background: #2563eb; color: #fff; font-size: 12px; line-height: 1; }
.composer-output-suboptions { display: grid; gap: 7px; margin: -2px 12px 4px 0; padding-inline-start: 12px; border-inline-start: 2px solid #dbe7f8; }
.composer-output-suboptions[hidden] { display: none !important; }
@media (max-width: 767.98px) {
    .topbar-title { font-size: 14px; }
    .chat-composer textarea { font-size: 15px; }
}
@media (max-width: 360px) {
    .composer-output-options { grid-template-columns: minmax(0, 1fr); }
    .composer-output-dialog { padding: 16px; }
}
