.temp-chat-toggle-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 12px;border-radius:999px;border:1px solid var(--bs-border-color,#d0d7de);background:var(--bs-body-bg,#fff);color:var(--bs-body-color,#334155);font-size:.8rem;font-weight:600;cursor:pointer;transition:all .18s ease;white-space:nowrap}.temp-chat-toggle-btn:hover{border-color:#6366f1;color:#4f46e5;background:rgba(99,102,241,.08)}.temp-chat-toggle-btn.active{background:linear-gradient(135deg,#4f46e5,#7c3aed);border-color:#6366f1;color:#fff!important;box-shadow:0 4px 14px rgba(99,102,241,.35)}body.dark-mode .temp-chat-toggle-btn,[data-theme="dark"] .temp-chat-toggle-btn{background:#23262f;border-color:#3a3f4d;color:#e2e8f0}body.dark-mode .temp-chat-toggle-btn:hover,[data-theme="dark"] .temp-chat-toggle-btn:hover{background:rgba(99,102,241,.22);border-color:#818cf8;color:#fff}.btoan-badge-agent{display:inline-flex!important;align-items:center!important;justify-content:center!important;background:#e0e7ff!important;color:#3730a3!important;border:1px solid #c7d2fe!important;font-weight:700!important;font-size:.68rem!important;letter-spacing:.03em;line-height:1.2!important;padding:3px 8px!important;border-radius:999px!important;white-space:nowrap!important;flex-shrink:0!important}body.dark-mode .btoan-badge-agent,[data-theme="dark"] .btoan-badge-agent{background:#4f46e5!important;color:#fff!important;border-color:#6366f1!important}.temp-chat-banner,.active-gem-banner{width:calc(100% - 24px)!important;max-width:820px!important;margin:10px auto 4px auto!important;padding:10px 14px!important;border-radius:14px!important;display:flex;align-items:center!important;justify-content:space-between!important;gap:12px!important;flex-wrap:nowrap!important;overflow:hidden!important;font-size:.84rem!important;box-sizing:border-box!important}.temp-chat-banner-text,.active-gem-banner-info{flex:1 1 auto!important;min-width:0!important;display:flex!important;align-items:center!important;gap:10px!important;white-space:normal!important;word-break:break-word!important;line-height:1.4!important}.temp-chat-banner-text span{flex:1 1 auto!important;min-width:0!important;white-space:normal!important;word-break:break-word!important}.temp-chat-exit-btn,.active-gem-exit-btn,.temp-chat-banner button,.active-gem-banner button{width:auto!important;min-width:max-content!important;max-width:none!important;flex:0 0 auto!important;white-space:nowrap!important;padding:6px 14px!important;font-size:13px!important;line-height:1.25!important}.temp-chat-banner{border:1.5px dashed #6366f1;background:rgba(99,102,241,.07);color:#312e81}body.dark-mode .temp-chat-banner,[data-theme="dark"] .temp-chat-banner{border-color:#818cf8;background:rgba(99,102,241,.16);color:#e0e7ff}.active-gem-banner{border:1px solid rgba(99,102,241,.32);background:#f8faff;color:#0f172a}body.dark-mode .active-gem-banner,[data-theme="dark"] .active-gem-banner{border-color:rgba(129,140,248,.35);background:#1e2130;color:#f8fafc}.active-gem-banner-icon{width:34px;height:34px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}.btoan-gems-hub{max-width:1040px;width:100%;margin:0 auto;padding:24px 20px 32px 20px;box-sizing:border-box}.gems-hub-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:22px}.gems-hub-title{font-size:1.35rem;font-weight:800;color:#0f172a;margin:0}.gems-hub-subtitle{font-size:.85rem;color:#64748b;margin:4px 0 0 0}body.dark-mode .gems-hub-title,[data-theme="dark"] .gems-hub-title{color:#f8fafc}body.dark-mode .gems-hub-subtitle,[data-theme="dark"] .gems-hub-subtitle{color:#94a3b8}.gems-section-heading{font-size:.82rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin:18px 0 12px 0;display:flex;align-items:center;justify-content:space-between}body.dark-mode .gems-section-heading,[data-theme="dark"] .gems-section-heading{color:#94a3b8}.gems-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}.gem-card{border-radius:16px;padding:16px;background:#fff;border:1px solid #e2e8f0;display:flex;flex-direction:column;gap:10px;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;box-shadow:0 2px 8px rgba(15,23,42,.04)}.gem-card:hover{transform:translateY(-2px);border-color:#6366f1;box-shadow:0 10px 24px rgba(99,102,241,.12)}body.dark-mode .gem-card,[data-theme="dark"] .gem-card{background:#1e2028;border-color:#2f3342;color:#f1f5f9}body.dark-mode .gem-card:hover,[data-theme="dark"] .gem-card:hover{border-color:#818cf8;box-shadow:0 10px 24px rgba(0,0,0,.35)}.gem-card-top{display:flex;align-items:flex-start;gap:12px}.gem-icon-badge{width:42px;height:42px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}.gem-card-name{font-size:.96rem;font-weight:700;color:#0f172a;line-height:1.3;word-break:break-word}body.dark-mode .gem-card-name,[data-theme="dark"] .gem-card-name{color:#f8fafc}.gem-card-desc{font-size:.82rem;color:#475569;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;flex-grow:1}body.dark-mode .gem-card-desc,[data-theme="dark"] .gem-card-desc{color:#cbd5e1}.gem-card-meta{font-size:.74rem;color:#64748b;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.gem-card-actions{display:flex;align-items:center;gap:8px;margin-top:auto;padding-top:8px;border-top:1px solid rgba(148,163,184,.18)}.gems-empty-box{border-radius:14px;border:1.5px dashed #cbd5e1;padding:22px 16px;text-align:center;color:#64748b;font-size:.86rem;background:rgba(148,163,184,.04)}body.dark-mode .gems-empty-box,[data-theme="dark"] .gems-empty-box{border-color:#334155;color:#94a3b8;background:rgba(30,32,40,.5)}.gem-modal-backdrop{position:fixed;inset:0;z-index:2050;background:rgba(15,23,42,.62);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:14px}.gem-modal-backdrop.show{display:flex}.gem-modal-card{width:100%;max-width:640px;max-height:90vh;background:#fff;color:#0f172a;border-radius:18px;border:1px solid #e2e8f0;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 24px 60px rgba(15,23,42,.28)}body.dark-mode .gem-modal-card,[data-theme="dark"] .gem-modal-card{background:#1b1d24;color:#f8fafc;border-color:#334155}.gem-modal-header{padding:16px 20px;border-bottom:1px solid rgba(148,163,184,.2);display:flex;align-items:center;justify-content:space-between}.gem-modal-body{padding:18px 20px;overflow-y:auto;flex:1 1 auto}.gem-modal-footer{padding:12px 20px;border-top:1px solid rgba(148,163,184,.2);display:flex;align-items:center;justify-content:flex-end;gap:8px}.gem-icon-picker,.gem-color-picker{display:flex;flex-wrap:wrap;gap:8px}.gem-pick-icon-btn{width:38px;height:38px;border-radius:10px;border:1.5px solid #cbd5e1;background:transparent;color:inherit;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.gem-pick-icon-btn.selected{border-color:#6366f1;background:rgba(99,102,241,.14);color:#4f46e5}body.dark-mode .gem-pick-icon-btn,[data-theme="dark"] .gem-pick-icon-btn{border-color:#3f4556;color:#e2e8f0}body.dark-mode .gem-pick-icon-btn.selected,[data-theme="dark"] .gem-pick-icon-btn.selected{color:#a5b4fc}.gem-pick-color-btn{width:28px;height:28px;border-radius:999px;border:2px solid transparent;cursor:pointer}.gem-pick-color-btn.selected{box-shadow:0 0 0 2px #fff,0 0 0 4px #6366f1}.gem-file-pill{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-radius:10px;border:1px solid rgba(148,163,184,.25);background:rgba(148,163,184,.08);font-size:.82rem;margin-bottom:6px}.memory-setting-card{background:#282a2c;border:1px solid #3c4043;border-radius:14px;padding:14px;margin-bottom:12px;color:#f8fafc}.memory-add-row{display:flex!important;align-items:center!important;gap:8px!important;width:100%!important}.memory-add-row input,#newMemoryInput{flex:1 1 auto!important;min-width:0!important;width:auto!important;max-width:none!important}.memory-add-btn,.memory-add-row button{width:auto!important;min-width:max-content!important;max-width:none!important;flex:0 0 auto!important;white-space:nowrap!important;padding:8px 16px!important;font-size:13px!important}.memory-list-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;flex-wrap:wrap!important;margin-bottom:10px!important}.memory-clear-all-btn{width:auto!important;min-width:max-content!important;max-width:none!important;flex:0 0 auto!important;white-space:nowrap!important;padding:5px 12px!important;font-size:12px!important;font-weight:600!important;border-radius:8px!important;background:rgba(239,68,68,.1)!important;border:1px solid rgba(239,68,68,.55)!important;color:#f87171!important}.memory-clear-all-btn:hover{background:#ef4444!important;border-color:#ef4444!important;color:#fff!important}.memory-item-row{background:#1e1f20;border:1px solid #3c4043;border-radius:12px;padding:10px 12px;margin-bottom:8px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.memory-item-actions{display:flex!important;align-items:center!important;gap:6px!important;flex:0 0 auto!important}.memory-item-actions button,.memory-item-row button{width:auto!important;min-width:max-content!important;flex:0 0 auto!important;white-space:nowrap!important}.memory-item-text{font-size:.86rem;color:#f1f5f9;line-height:1.45;word-break:break-word}.memory-item-date{font-size:.72rem;color:#94a3b8;margin-top:3px}@media(max-width:768px){.temp-chat-toggle-btn .temp-chat-label{display:none}.temp-chat-toggle-btn{width:36px;padding:0}.btoan-gems-hub{padding:16px 12px 28px 12px}.gems-grid{grid-template-columns:1fr}.temp-chat-banner,.active-gem-banner{width:calc(100% - 16px)!important;margin:8px auto 4px auto!important;flex-wrap:wrap!important;font-size:.78rem!important}.temp-chat-exit-btn,.active-gem-exit-btn{margin-left:auto!important}.memory-item-row{flex-direction:column}}aside#sidebar.btoan-sidebar-3tier{height:100dvh!important;max-height:100dvh!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;box-sizing:border-box!important}.sidebar-top-fixed{flex:0 0 auto!important;padding:12px 12px 8px 12px!important}.btoan-new-chat-compact{height:38px!important;min-height:38px!important;padding:0 14px!important;font-size:.875rem!important}.sidebar-scroll-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:4px 10px 8px 10px!important;display:flex!important;flex-direction:column!important}.sidebar-tools-section{flex:0 0 auto!important;margin-bottom:6px!important}.sidebar-section-toggle{width:100%!important;display:flex!important;align-items:center!important;justify-content:space-between!important;background:transparent!important;border:0!important;padding:4px 8px!important;margin-bottom:2px!important;color:#64748b!important;font-size:.7rem!important;font-weight:700!important;letter-spacing:.06em!important;text-transform:uppercase!important;cursor:pointer!important;border-radius:6px!important}.sidebar-section-toggle:hover{background:rgba(148,163,184,.12)!important}body.dark-mode .sidebar-section-toggle,[data-theme="dark"] .sidebar-section-toggle{color:#94a3b8!important}.sidebar-tools-chevron{transition:transform .18s ease!important;flex-shrink:0!important}.sidebar-section-toggle[aria-expanded="false"] .sidebar-tools-chevron{transform:rotate(-90deg)!important}.btoan-tools-compact{display:flex!important;flex-direction:column!important;gap:2px!important}.btoan-tools-compact.collapsed{display:none!important}.btoan-tool-item{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:7px 10px!important;min-height:36px!important;margin-bottom:2px!important;border-radius:8px!important;font-size:.84rem!important;line-height:1.25!important;box-sizing:border-box!important}.btoan-tool-left{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;flex:1 1 auto!important}.btoan-tool-icon{width:18px!important;height:18px!important;font-size:16px!important;line-height:18px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex-shrink:0!important}.btoan-history-section{flex:1 0 auto!important;display:flex!important;flex-direction:column!important;padding-top:4px!important;overflow:visible!important}.btoan-history-section #historyList{overflow:visible!important;flex:0 0 auto!important}.btoan-sidebar-footer-compact{flex:0 0 auto!important;padding:8px 10px!important}.btoan-sidebar-footer-compact .sidebar-settings-btn{height:40px!important;min-height:40px!important;padding:0 12px!important;display:flex!important;align-items:center!important;gap:10px!important}@media(max-width:768px){header.topbar,.topbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:6px!important;padding:8px 10px!important;flex-wrap:nowrap!important;width:100%!important;max-width:100vw!important;box-sizing:border-box!important;height:54px!important;min-height:54px!important}.topbar-left{display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important;flex:1 1 auto!important;position:static!important}.topbar-left #openSidebarBtn{width:36px!important;height:36px!important;flex:0 0 36px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important}.topbar-left #headerBrandLogo,.topbar-left .header-brand-logo{display:none!important}.topbar-left .dropdown{min-width:0!important;max-width:135px!important;flex:0 1 auto!important}.topbar-left .model-selector-btn{min-width:0!important;max-width:135px!important;width:auto!important;height:34px!important;padding:4px 10px!important;font-size:13px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;display:inline-flex!important;align-items:center!important;gap:4px!important}.topbar-left .model-selector-btn .mode-status-span,.topbar-left .model-selector-btn .mode-text{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;display:inline-block!important;max-width:96px!important;font-size:12.5px!important}.topbar-right{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:4px!important;flex:0 0 auto!important;position:static!important}.topbar-right #tempChatToggleBtn,.topbar-right #notifBellBtn,.topbar-right #themeToggleBtn{width:34px!important;height:34px!important;min-width:34px!important;padding:0!important;flex:0 0 34px!important;position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}.topbar-right #userBox .user-info{padding:2px!important;gap:2px!important}.topbar-right #userBox .avatar-sm{width:34px!important;height:34px!important;min-width:34px!important}.topbar-right #userBox .dropdown-chevron-icon{display:none!important}.topbar-right #guestLoginBox .btn{padding:6px 12px!important;font-size:13px!important;height:34px!important;white-space:nowrap!important}body.btoan-is-guest .topbar-right #notifBellWrapper,body.btoan-is-guest .topbar-right #tempChatToggleBtn{display:none!important}}#profileModal .settings-nav-pill{width:auto!important;flex:0 0 auto!important;white-space:nowrap!important;background:#f1f5f9!important;color:#334155!important;border:1px solid #cbd5e1!important}#profileModal .settings-nav-pill.active{background:linear-gradient(135deg,#4f46e5 0%,#7c3aed 100%)!important;color:#fff!important;border-color:transparent!important;font-weight:600!important}body.dark-mode #profileModal .settings-modal-card,body.dark-mode #profileModal .settings-modal-body,body.dark-mode #profileModal .settings-tab-nav,[data-theme="dark"] #profileModal .settings-modal-card,[data-theme="dark"] #profileModal .settings-modal-body,[data-theme="dark"] #profileModal .settings-tab-nav{background-color:#161824!important;color:#f1f5f9!important}body.dark-mode #profileModal .modal-header-tabs,body.dark-mode #profileModal .modal-footer,[data-theme="dark"] #profileModal .modal-header-tabs,[data-theme="dark"] #profileModal .modal-footer{background-color:#12141e!important;border-color:rgba(255,255,255,.1)!important;color:#f1f5f9!important}body.dark-mode #profileModal .profile-title,body.dark-mode #profileModal .text-dark,body.dark-mode #profileModal .fw-bold,[data-theme="dark"] #profileModal .profile-title,[data-theme="dark"] #profileModal .text-dark,[data-theme="dark"] #profileModal .fw-bold{color:#f1f5f9!important}body.dark-mode #profileModal .form-label,body.dark-mode #profileModal .text-secondary,[data-theme="dark"] #profileModal .form-label,[data-theme="dark"] #profileModal .text-secondary{color:#cbd5e1!important}body.dark-mode #profileModal .text-muted,body.dark-mode #profileModal .extra-small,[data-theme="dark"] #profileModal .text-muted,[data-theme="dark"] #profileModal .extra-small{color:#94a3b8!important}body.dark-mode #profileModal .card,body.dark-mode #profileModal .bg-light,body.dark-mode #profileModal .bg-light-subtle,body.dark-mode #profileModal .model-choice-card,body.dark-mode #profileModal #cardThemeDark,body.dark-mode #profileModal #cardThemeLight,body.dark-mode #profileModal .input-group-text,body.dark-mode #profileModal .form-control,body.dark-mode #profileModal .form-select,[data-theme="dark"] #profileModal .card,[data-theme="dark"] #profileModal .bg-light,[data-theme="dark"] #profileModal .bg-light-subtle,[data-theme="dark"] #profileModal .model-choice-card,[data-theme="dark"] #profileModal #cardThemeDark,[data-theme="dark"] #profileModal #cardThemeLight,[data-theme="dark"] #profileModal .input-group-text,[data-theme="dark"] #profileModal .form-control,[data-theme="dark"] #profileModal .form-select{background-color:#0e121b!important;border-color:rgba(255,255,255,.14)!important;color:#f1f5f9!important}body.dark-mode #profileModal .badge.bg-light,[data-theme="dark"] #profileModal .badge.bg-light{background-color:rgba(255,255,255,.08)!important;color:#cbd5e1!important;border-color:rgba(255,255,255,.14)!important}body.dark-mode #profileModal .settings-nav-pill:not(.active),[data-theme="dark"] #profileModal .settings-nav-pill:not(.active){background:rgba(255,255,255,.06)!important;color:#cbd5e1!important;border:1px solid rgba(255,255,255,.12)!important}body.dark-mode #profileModal .settings-nav-pill.active,[data-theme="dark"] #profileModal .settings-nav-pill.active{background:linear-gradient(135deg,#4f46e5 0%,#7c3aed 100%)!important;color:#fff!important;border-color:transparent!important;font-weight:600!important}body.dark-mode #profileModal .btn-close,[data-theme="dark"] #profileModal .btn-close{filter:invert(1) grayscale(100%) brightness(200%)}.btn-admin-refresh{width:auto!important;height:auto!important;min-width:max-content!important;flex:0 0 auto!important;padding:6px 14px!important;font-size:13px!important;line-height:1.25!important;white-space:nowrap!important;display:inline-flex!important;align-items:center!important;gap:5px!important;border-radius:999px!important}.btoan-admin-table-wrap{width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;border-radius:10px}.btoan-admin-users-table{width:100%!important;table-layout:auto!important}.btoan-admin-acct-cell{max-width:175px!important}.btoan-admin-act-btn{width:auto!important;height:auto!important;flex:0 0 auto!important;white-space:nowrap!important;padding:3px 9px!important;font-size:11.5px!important}.sidebar-top-fixed{padding:10px 10px 6px 10px!important}.sidebar-top-fixed .sidebar-brand-wrapper{margin-bottom:8px!important}.btoan-new-chat-compact{height:36px!important;min-height:36px!important}.sidebar-section-toggle{padding:3px 8px!important;margin-bottom:1px!important}.btoan-tool-item{padding:5px 10px!important;min-height:32px!important;margin-bottom:1px!important;font-size:13.5px!important}.btoan-sidebar-footer-compact{padding:6px 10px!important}.btoan-sidebar-footer-compact .sidebar-settings-btn{height:36px!important;min-height:36px!important}