/* Compact chat proportions, based on the supplied ChatGPT screenshot. */
body.chat-route{background:#fff!important}
body.chat-route #main{padding:0!important}
body.chat-route .chat-reference-layout{grid-template-columns:clamp(260px,27.2vw,372px) minmax(0,1fr)!important;border:0!important;border-radius:0!important;box-shadow:none!important}
body.chat-route .chat-reference-layout.chat-sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)!important}
body.chat-route .chat-reference-layout .chat-history{background:#f9fafb!important;padding:12px 12px 8px!important;overflow:hidden;border-right:1px solid #e4e7ec}
.chat-reference-layout .compact-sidebar-brand{height:28px;display:flex;align-items:center;direction:ltr;padding:0 4px;margin-bottom:8px;flex:none}.compact-sidebar-brand img{width:100px;height:25px;object-fit:contain}
.chat-reference-layout .chat-new-button{width:100%!important;min-height:36px!important;height:36px!important;margin:0 0 6px!important;border-radius:8px!important;box-shadow:none!important;padding:0 10px!important;gap:10px!important;font-size:14px!important;font-weight:500;background:#edf3ff!important;color:#2058ba!important;justify-content:flex-start!important}
.chat-reference-layout .chat-new-button .ui-icon{width:18px;height:18px}
.chat-reference-layout .chat-primary-nav{gap:0;padding:0 0 8px;margin-bottom:7px;border-bottom:1px solid #e6e9ee}
.chat-reference-layout .chat-primary-nav>button,.chat-reference-layout .chat-primary-nav>.rtc-contacts-link,.chat-reference-layout #chat-project-toggle{height:32px;min-height:32px;padding:4px 10px;font-size:13px;font-weight:400;gap:10px;border-radius:7px}
.chat-reference-layout .chat-primary-nav .ui-icon{width:17px;height:17px;color:#4a5970}
.chat-reference-layout .chat-primary-nav>button.selected{background:#eef1f7!important;color:#24466b!important}
.chat-reference-layout .chat-history-heading{height:28px;padding:2px 6px 5px;gap:7px;font-size:12px;color:#858c98!important;flex:none}
.chat-reference-layout .chat-history-heading button{width:18px;height:20px}.chat-reference-layout .chat-history-heading button .ui-icon{width:13px;height:13px}.chat-reference-layout .chat-history-heading>span{font-size:10px}
.chat-reference-layout .history-list{flex:1;min-height:0!important;padding:0 0 8px!important;overflow-x:hidden;overflow-y:auto;scrollbar-color:#d8dce3 transparent}
.chat-reference-layout .history-list[hidden]{display:none!important}
.chat-reference-layout .history-row{min-height:34px!important;height:34px;margin:0 0 3px!important;border-radius:7px;align-items:center}
.chat-reference-layout .history-item{height:34px;min-height:34px!important;padding:5px 7px!important;gap:7px!important;width:calc(100% - 28px);align-items:center;line-height:1.5}
.chat-reference-layout .history-item b{font-size:13px!important;font-weight:400!important;line-height:24px;color:#344054!important;text-align:left;direction:rtl}
.chat-reference-layout .history-item>.ui-icon{display:none}.chat-reference-layout .history-item small{display:none!important}
.chat-reference-layout .history-more-button{height:28px!important;min-height:28px!important;width:28px!important;min-width:28px!important;opacity:0}.chat-reference-layout .history-row:hover .history-more-button,.chat-reference-layout .history-row:focus-within .history-more-button,.chat-reference-layout .history-row.selected .history-more-button{opacity:1}.chat-reference-layout .history-more-button .ui-icon{width:16px;height:16px}
.chat-reference-layout .history-actions{top:30px!important;left:auto!important;right:3px!important;width:170px!important}.chat-reference-layout .history-actions button{height:32px!important;min-height:32px!important;font-size:12px;padding:5px 8px!important}
.chat-reference-layout .chat-sidebar-bottom{padding:6px 0 0!important;border-top:1px solid #e4e7ec!important;flex:none}
.chat-reference-layout .chat-account-card{min-height:48px!important;height:48px;padding:6px!important;gap:10px;border:0!important;border-radius:7px;background:transparent!important;margin:0!important}
.chat-reference-layout .chat-account-avatar{width:28px!important;height:28px!important;font-size:13px}.chat-reference-layout .chat-account-card b{font-size:12px!important;font-weight:500}.chat-reference-layout .chat-account-card small{font-size:10px!important;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-reference-layout .chat-account-card>.ui-icon{width:12px;height:12px}
body.chat-route .chat-reference-layout .chat-workspace-header{min-height:54px!important;height:54px!important;padding:8px 20px!important;border:0;background:#fff!important}
.chat-reference-layout .chat-header-title{gap:8px}.chat-reference-layout .chat-header-title h2{font-size:14px!important;font-weight:550;max-width:none;line-height:1.5}.chat-reference-layout .chat-title-edit{width:24px!important;min-width:24px!important;min-height:28px!important;height:28px!important}.chat-reference-layout .chat-title-edit .ui-icon{width:14px;height:14px}
.chat-reference-layout #chat-history-toggle{width:28px!important;min-width:28px!important;min-height:28px!important;height:28px!important}.chat-reference-layout .chat-header-actions{gap:8px!important}.chat-reference-layout .chat-header-actions .chat-icon-button{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;padding:6px}.chat-reference-layout .chat-upgrade{padding:5px 9px;font-size:12px!important;line-height:1.6;border-radius:7px}.chat-reference-layout .chat-upgrade .ui-icon{width:16px;height:16px}.chat-reference-layout .chat-header-divider{height:22px}.chat-reference-layout .chat-profile-avatar{width:29px!important;height:29px!important;font-size:13px}.chat-reference-layout .chat-more-wrap{display:block}.chat-reference-layout #chat-more-menu{top:35px}
body.chat-route .chat-reference-layout #messages{padding:28px max(24px,calc((100% - 768px)/2)) 20px!important;scrollbar-color:#d8dce3 transparent}
.chat-reference-layout .message{gap:0!important;margin:0 0 24px!important;max-width:768px!important;margin-inline:auto!important}
.chat-reference-layout .message-avatar{display:none!important}.chat-reference-layout .message.user{margin-bottom:26px!important;gap:0!important}.chat-reference-layout .user .message-content{flex:0 1 75%;width:auto!important}
.chat-reference-layout .message-body{font-size:15px!important;line-height:1.9!important;color:#263248}
.chat-reference-layout .message-body>p{margin:0 0 12px!important}.chat-reference-layout .message-body p{line-height:1.9}
.chat-reference-layout .user .message-body{min-height:0!important;padding:10px 16px!important;border-radius:18px!important;border:0!important;background:#edf2fa!important;display:block;line-height:1.85!important}
.chat-reference-layout .chat-message-time{font-size:10px;line-height:16px;padding-top:3px;color:#97a2b3}
.chat-reference-layout .chat-answer-section{border:0!important;border-radius:0!important;box-shadow:none!important;background:none!important;padding:0!important;margin:20px 0!important}
.chat-reference-layout .chat-answer-section h1,.chat-reference-layout .chat-answer-section h2,.chat-reference-layout .chat-answer-section h3,.chat-reference-layout .chat-answer-section h4{font-size:16px!important;line-height:1.8!important;text-align:right!important;margin:0 0 9px!important;font-weight:650}
.chat-reference-layout .chat-answer-section ul,.chat-reference-layout .chat-answer-section ol{background:transparent!important;border:0!important;border-radius:0!important;padding:0 24px 0 0!important;margin:10px 0!important}
.chat-reference-layout .chat-answer-section ul li::marker{color:#344054}.chat-reference-layout .chat-answer-section li{padding:0!important;margin:4px 0!important;line-height:1.9}.chat-reference-layout .chat-answer-section ol{list-style:decimal!important;counter-reset:none}.chat-reference-layout .chat-answer-section ol>li{padding:0!important;min-height:0!important}.chat-reference-layout .chat-answer-section ol>li:before{display:none!important}
.chat-reference-layout .message-actions{gap:3px;margin-top:8px!important}.chat-reference-layout .message-actions>button{min-height:28px!important;height:28px!important;padding:3px 6px!important;font-size:11px!important;line-height:1.5}.chat-reference-layout .message-actions button .ui-icon{width:15px;height:15px}
.chat-reference-layout .chat-code{margin:12px 0}.chat-reference-layout .chat-code-toolbar{padding:4px 10px}.chat-reference-layout .chat-code-toolbar button{min-height:28px;height:28px;font-size:11px;padding:3px 8px}.chat-reference-layout .chat-code pre{font-size:13px;line-height:1.6;padding:12px}
.chat-reference-layout .chat-table-wrap th,.chat-reference-layout .chat-table-wrap td{padding:6px 10px;font-size:13px}
.chat-reference-layout .chat-sources{margin:12px 0}.chat-reference-layout .chat-sources a{min-height:30px!important;padding:4px 8px!important}.chat-reference-layout .chat-sources a>b{font-size:12px!important}
.chat-reference-layout .admin-execution-trace{padding:8px 10px!important;margin:10px 0!important;border-radius:8px!important}.chat-reference-layout .admin-execution-trace summary{font-size:12px!important;min-height:24px!important;padding:0!important;gap:6px}.chat-reference-layout .admin-execution-trace summary b,.chat-reference-layout .admin-execution-trace summary span{font-size:11px!important}.chat-reference-layout .admin-trace-grid{font-size:11px}.chat-reference-layout .message-feedback{margin:8px 0!important;padding:5px 8px!important;min-height:32px!important;font-size:11px!important;border:0!important;background:transparent!important}.chat-reference-layout .message-feedback .feedback-btn{min-height:28px!important;padding:3px 7px!important;font-size:11px!important}.chat-reference-layout .message-feedback b{font-size:11px!important}
body.chat-route .chat-reference-layout .chat-composer-area{padding:8px max(24px,calc((100% - 768px)/2)) 24px!important;max-height:45%;background:linear-gradient(180deg,#ffffff00,#fff 20%)}
body.chat-route .chat-reference-layout form.chat-composer{border:1px solid #e3e6eb!important;border-radius:24px!important;box-shadow:0 4px 20px #192d4610!important;padding:9px 12px!important;min-height:100px}
.chat-reference-layout .chat-compose-row{display:grid!important;grid-template-columns:32px minmax(0,1fr) 32px;grid-template-rows:auto 32px;gap:4px 8px;align-items:center;min-height:0!important}
body.chat-route .chat-reference-layout .chat-composer textarea{grid-column:1/-1;grid-row:1;width:100%!important;min-height:40px!important;height:40px;max-height:150px;padding:7px 4px!important;font-size:15px!important;line-height:1.7;align-self:stretch;flex:none!important}
.chat-reference-layout .chat-plus-wrap{grid-column:1;grid-row:2}.chat-reference-layout .chat-plus-button{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;padding:5px!important;border:0!important;background:transparent!important;color:#475569!important;border-radius:50%!important}.chat-reference-layout .chat-plus-button .ui-icon{width:19px;height:19px}
.chat-reference-layout .chat-tools-trigger{grid-column:2;grid-row:2;justify-self:end;height:30px;min-height:30px;padding:2px 8px;border:0;background:none;font-size:12px;color:#627187;gap:6px}.chat-reference-layout .chat-tools-trigger .ui-icon{width:15px;height:15px}
.chat-reference-layout .chat-send-button{grid-column:3;grid-row:2;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;border-radius:50%!important;padding:7px!important;box-shadow:none!important}.chat-reference-layout .chat-send-button .ui-icon{width:18px;height:18px}
.chat-reference-layout .chat-shortcut-row{display:none!important}
.chat-reference-layout .chat-active-tools{max-height:32px;margin-top:4px;gap:4px}.chat-reference-layout .chat-active-tool{min-height:26px;height:26px;padding:3px 7px;font-size:11px}.chat-reference-layout .chat-active-tool span{font-size:11px}.chat-reference-layout .chat-active-tool .ui-icon{width:13px;height:13px}
.chat-reference-layout .chat-plus-menu{bottom:calc(100% + 8px);max-height:min(420px,calc(var(--chat-viewport-height,100dvh) - 150px));direction:rtl}.chat-reference-layout .chat-plus-item>span{min-height:42px}.chat-reference-layout .chat-plus-item b{font-size:12px!important}.chat-reference-layout .chat-plus-item small{font-size:11px!important}
.chat-reference-layout .chat-menu-code{display:flex;width:100%;gap:8px;align-items:center;padding:10px 12px;border:0;border-radius:7px;background:none;color:#45546a;font-size:12px;font-family:inherit}.chat-menu-code:hover{background:#f0f5fc}.chat-menu-code .ui-icon{width:17px;height:17px}
.chat-reference-layout .chat-latest{min-height:30px!important;padding:5px 10px;font-size:11px;bottom:140px}
.chat-reference-layout .chat-welcome{max-width:640px;padding:10px}.chat-reference-layout .chat-welcome-mark{width:44px;height:44px;border:0;box-shadow:none;margin-bottom:10px}.chat-reference-layout .chat-welcome-mark img{width:35px;height:35px}.chat-reference-layout .chat-welcome h1{font-size:24px;margin-bottom:5px}.chat-reference-layout .chat-welcome>p{font-size:13px}.chat-reference-layout .chat-prompt-grid{margin-top:20px;gap:8px}.chat-reference-layout .chat-prompt{padding:11px 13px;border-radius:10px;box-shadow:none}.chat-reference-layout .chat-prompt b{font-size:12px}.chat-reference-layout .chat-prompt small{font-size:11px}.chat-reference-layout .chat-prompt>.ui-icon:first-child{width:16px;height:16px;margin-bottom:5px}
.chat-reference-layout button:hover:not(:disabled){transform:none}
@media(max-width:1100px) and (min-width:901px){body.chat-route .chat-reference-layout{grid-template-columns:260px minmax(0,1fr)!important}.chat-reference-layout .chat-upgrade{font-size:11px!important;padding:5px 7px}.chat-reference-layout .chat-header-actions{gap:4px!important}}
@media(max-width:900px){body.chat-route .chat-reference-layout .chat-history{width:min(300px,86vw)!important;padding:46px 10px 8px!important}.chat-reference-layout .compact-sidebar-brand{display:none}.chat-reference-layout .chat-account-card{min-height:48px!important}.chat-reference-layout .history-row{height:38px;min-height:38px!important}.chat-reference-layout .history-item{height:38px}.chat-reference-layout .history-more-button{height:36px!important;width:36px!important;min-height:36px!important;min-width:36px!important;opacity:1}.chat-reference-layout .history-item{width:calc(100% - 36px)}.chat-reference-layout .chat-primary-nav>button,.chat-reference-layout .chat-primary-nav>.rtc-contacts-link,.chat-reference-layout #chat-project-toggle{height:36px;min-height:36px}.chat-reference-layout .chat-primary-nav{margin-bottom:6px;padding-bottom:6px}
body.chat-route .chat-reference-layout .chat-workspace-header{height:50px!important;min-height:50px!important;padding:7px 10px!important}.chat-reference-layout .chat-header-title h2{font-size:13px!important}.chat-reference-layout .chat-profile-avatar{display:none}.chat-reference-layout .chat-header-actions{gap:2px!important}.chat-reference-layout .chat-header-actions>.chat-icon-button,.chat-reference-layout .chat-upgrade,.chat-reference-layout .chat-header-divider{display:none}
body.chat-route .chat-reference-layout #messages{padding:18px 16px 14px!important}.chat-reference-layout .message{margin-bottom:22px!important}.chat-reference-layout .message-body{font-size:15px!important;line-height:1.85!important}.chat-reference-layout .user .message-content{flex-basis:88%}.chat-reference-layout .user .message-body{padding:9px 13px!important}.chat-reference-layout .chat-answer-section h1,.chat-reference-layout .chat-answer-section h2,.chat-reference-layout .chat-answer-section h3{font-size:16px!important}.chat-reference-layout .user .message-actions{display:none}.chat-reference-layout .user:focus-within .message-actions{display:flex}
body.chat-route .chat-reference-layout .chat-composer-area{padding:6px 10px max(10px,env(safe-area-inset-bottom))!important;max-height:48%}body.chat-route .chat-reference-layout form.chat-composer{padding:8px 10px!important;min-height:92px;border-radius:21px!important}.chat-reference-layout .chat-composer textarea{font-size:16px!important;max-height:105px!important}.chat-reference-layout .chat-tools-trigger{width:auto;padding:3px 6px}.chat-reference-layout .chat-tools-trigger span,.chat-reference-layout .chat-tools-trigger .ui-icon:last-child{display:block}.chat-reference-layout .chat-latest{bottom:125px}.chat-reference-layout .chat-plus-button,.chat-reference-layout .chat-send-button{min-height:36px!important;min-width:36px!important;width:36px!important;height:36px!important}.chat-reference-layout .chat-compose-row{grid-template-columns:36px minmax(0,1fr) 36px;grid-template-rows:auto 36px}.chat-reference-layout .chat-welcome h1{font-size:22px}}
@media(max-width:900px) and (max-height:520px){body.chat-route .chat-reference-layout .chat-workspace-header{height:42px!important;min-height:42px!important}.chat-reference-layout .chat-composer textarea{max-height:65px!important}.chat-reference-layout .chat-active-tools{max-height:28px}.chat-reference-layout .chat-primary-nav>button,.chat-reference-layout .chat-primary-nav>.rtc-contacts-link,.chat-reference-layout #chat-project-toggle{height:30px;min-height:30px}.chat-reference-layout .chat-new-button{height:32px!important;min-height:32px!important}.chat-reference-layout .chat-welcome h1{font-size:19px}}
@media(max-width:900px) and (max-height:520px){body.chat-route .chat-reference-layout .chat-composer-area{max-height:calc(var(--chat-viewport-height,100dvh) - 110px)!important;overflow-y:auto!important;overflow-x:hidden!important}}
.chat-reference-layout .chat-prompt-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.chat-reference-layout .chat-prompt{display:flex;align-items:center;gap:7px;padding:9px 12px;flex:0 1 auto;background:white}
.chat-reference-layout .chat-prompt>b{font-size:12px!important;font-weight:500}.chat-reference-layout .chat-prompt>small,.chat-reference-layout .chat-prompt>.ui-icon:last-child{display:none}.chat-reference-layout .chat-prompt>.ui-icon:first-child{display:inline-block;margin:0!important;width:16px;height:16px}
.chat-reference-layout .chat-account-menu button,.chat-reference-layout .chat-account-menu a{min-height:34px!important;padding:6px 9px!important;font-size:12px}
@media(max-width:900px){body.chat-route .chat-reference-layout .chat-composer textarea{font-size:16px!important}}
/* Detail corrections: hidden history actions, compact menus and neutral feedback. */
.chat-reference-layout .chat-history{position:relative}
.chat-reference-layout .chat-window-dots{position:absolute;top:20px;left:16px;display:flex;gap:5px;direction:ltr;height:8px;pointer-events:none}
.chat-reference-layout .chat-window-dots i{display:block;width:8px;height:8px;border-radius:50%;background:#ff6058}.chat-reference-layout .chat-window-dots i:nth-child(2){background:#ffbd2e}.chat-reference-layout .chat-window-dots i:nth-child(3){background:#28c840}
.chat-reference-layout .compact-sidebar-brand{padding-left:48px}
.chat-reference-layout .history-row .history-actions[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important}
.chat-reference-layout .history-row .history-actions:not([hidden]){display:flex!important;flex-direction:column!important;position:fixed!important;top:var(--history-menu-top,0px)!important;left:var(--history-menu-left,0px)!important;right:auto!important;bottom:auto!important;width:178px!important;max-height:calc(100dvh - 16px);overflow-y:auto;padding:4px!important;gap:1px!important;z-index:100;box-shadow:0 5px 20px #1822301a;background:#fff!important;border:1px solid #e4e7ec!important;border-radius:9px;justify-content:flex-start;align-content:normal;transform:none!important}
.chat-reference-layout .history-row .history-actions button{border:0!important;background:transparent!important;border-radius:5px;min-height:30px!important;height:30px!important;display:flex!important;justify-content:flex-start!important;gap:8px!important;padding:5px 8px!important;font-size:12px!important;font-weight:400;line-height:1.5;direction:rtl;color:#475467!important;white-space:nowrap}.chat-reference-layout .history-row .history-actions button:hover{background:#f2f4f7!important}.chat-reference-layout .history-row .history-actions button.danger{color:#a94747!important}.chat-reference-layout .history-row .history-actions .ui-icon{width:15px;height:15px;flex:none}.chat-reference-layout .history-row:hover .history-item,.chat-reference-layout .history-row:focus-within .history-item{padding:5px 7px!important}
.chat-reference-layout #chat-more-menu{top:calc(100% + 5px)!important;right:0!important;left:auto!important;min-width:0!important;width:184px!important;max-width:calc(100vw - 20px);padding:4px!important;border:1px solid #e5e7eb!important;border-radius:9px!important;box-shadow:0 5px 22px #10182816;direction:rtl;background:#fff;z-index:100}
.chat-reference-layout #chat-more-menu button,.chat-reference-layout #chat-more-menu a{display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;height:32px;min-height:32px!important;padding:6px 8px!important;font:400 12px/1.5 Vazir,Tahoma,sans-serif;border:0!important;border-radius:5px!important;background:transparent;color:#475467;text-align:right;white-space:nowrap;direction:rtl}
.chat-reference-layout #chat-more-menu .ui-icon{width:15px;height:15px;flex:none;color:#667085}.chat-reference-layout #chat-more-menu button:hover,.chat-reference-layout #chat-more-menu a:hover{background:#f2f4f7!important}.chat-reference-layout #chat-more-menu span{flex:1;min-width:0}
.chat-reference-layout .message-feedback{display:flex;align-items:center;justify-content:flex-start;gap:2px;direction:rtl;padding:0!important;margin:7px 0!important;border:0!important;background:transparent!important;min-height:28px!important;border-radius:0;box-shadow:none!important}
.chat-reference-layout .message-feedback .feedback-btn{display:grid;place-items:center;width:28px;height:28px;min-height:28px!important;padding:5px!important;border:0!important;background:transparent!important;border-radius:5px;color:#858d99!important;box-shadow:none!important;line-height:1}
.chat-reference-layout .message-feedback .feedback-btn .ui-icon{width:17px;height:17px;stroke-width:1.6}.chat-reference-layout .message-feedback .feedback-btn:hover{color:#344054!important;background:#f5f5f5!important}.chat-reference-layout .message-feedback .feedback-btn.is-active{color:#344054!important;background:transparent!important}.chat-reference-layout .message-feedback .feedback-btn.is-active .ui-icon{stroke-width:2.2}
@media(max-width:900px){.chat-reference-layout .chat-window-dots{top:20px;left:16px}.chat-reference-layout #chat-more-menu button,.chat-reference-layout #chat-more-menu a{height:36px;min-height:36px!important}}

/* v8: explicit labels, transparent branding and compact tool rows. */
.chat-reference-layout .compact-sidebar-brand,.chat-reference-layout .compact-sidebar-brand img,.chat-reference-layout .chat-mobile-brand,.chat-reference-layout .chat-mobile-brand img,.chat-reference-layout .chat-welcome-mark{background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}
.chat-reference-layout .compact-sidebar-brand::before,.chat-reference-layout .compact-sidebar-brand::after,.chat-reference-layout .chat-welcome-mark::before,.chat-reference-layout .chat-welcome-mark::after{content:none!important}
.chat-reference-layout .history-actions button::after{content:none!important}
.chat-reference-layout .history-actions button{display:flex!important;justify-content:flex-start!important;gap:9px!important;text-align:right!important;direction:rtl;font-size:12px!important}
.chat-reference-layout .history-actions button span{display:block;white-space:nowrap;line-height:1.6}
.chat-reference-layout .chat-plus-menu{width:264px!important;max-width:calc(100vw - 28px)!important;padding:5px!important;border-radius:12px!important;box-shadow:0 8px 28px #15213b1a!important}
.chat-reference-layout .chat-plus-item>span{min-height:46px!important;padding:6px 9px!important;grid-template-columns:20px minmax(0,1fr) 14px!important;column-gap:8px!important;border-radius:7px!important}
.chat-reference-layout .chat-plus-item b{grid-column:2;font-size:12px!important;line-height:1.6!important}
.chat-reference-layout .chat-plus-item small{grid-column:2;font-size:10px!important;line-height:1.6!important;color:#7a8391!important}
.chat-reference-layout .chat-plus-item input[type=checkbox]+span::after{content:'';grid-column:3;grid-row:1/3;width:12px;height:12px;border:1px solid #bdc5d0;border-radius:3px;box-sizing:border-box}
.chat-reference-layout .chat-plus-item input:checked+span::after{content:'✓';border-color:#3874cf;background:#3874cf;color:white;font-size:10px;text-align:center;line-height:11px}
.chat-reference-layout .chat-menu-code{min-height:34px!important;padding:7px 9px!important;font-size:12px!important;border-radius:7px!important}
.chat-reference-layout .chat-mobile-brand{display:none}
@media(max-width:900px){.chat-reference-layout .chat-mobile-brand{display:flex!important;align-items:center;flex:none;width:86px;height:28px;order:5}.chat-reference-layout .chat-mobile-brand img{width:86px;height:24px;object-fit:contain}.chat-reference-layout .chat-more-wrap{order:6}.chat-reference-layout .chat-header-title{min-width:0!important;flex:1}.chat-reference-layout .chat-header-title h2{max-width:calc(100vw - 184px)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-reference-layout .chat-header-actions{flex:none!important;gap:6px!important}}
.chat-reference-layout .chat-plus-item>span{position:relative;padding-left:28px!important;grid-template-columns:20px minmax(0,1fr)!important}
.chat-reference-layout .chat-plus-item input[type=checkbox]+span::after{position:absolute!important;left:9px!important;right:auto!important;top:50%!important;transform:translateY(-50%)!important;display:block!important;margin:0!important}
.chat-reference-layout .chat-plus-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-reference-layout .chat-plus-item{display:block!important;width:100%!important;padding:0!important}
.chat-reference-layout .chat-plus-item>span{width:100%!important;box-sizing:border-box!important}

/* v9 — plain live wordmark, mobile sidebar identity, aligned conversation menu. */
#site-header .brand{display:flex!important;align-items:center!important;flex-direction:row!important;direction:ltr;gap:8px!important;min-width:0}
#site-header .brand .timesai-brand-mark{width:32px!important;height:35px!important;object-fit:contain;background:transparent;box-shadow:none;border:0}
.timesai-brand-name{font-family:Arial,Helvetica,sans-serif!important;font-size:20px!important;font-weight:500!important;font-style:normal!important;letter-spacing:-.45px!important;line-height:1.2!important;color:#303742!important;background:none!important;text-shadow:none!important;white-space:nowrap}
.chat-reference-layout .chat-desktop-brand{display:flex;align-items:center;direction:ltr;gap:6px;margin-left:4px;order:5;flex:none;text-decoration:none;background:transparent}
.chat-reference-layout .chat-desktop-brand .timesai-brand-mark{width:24px;height:26px;object-fit:contain}
.chat-reference-layout .chat-desktop-brand .timesai-brand-name{font-size:18px!important}
.chat-reference-layout .chat-more-wrap{order:6}
.chat-reference-layout .compact-sidebar-brand{gap:6px!important;direction:ltr!important}
.chat-reference-layout .compact-sidebar-brand .timesai-brand-mark{width:24px!important;height:26px!important}
.chat-reference-layout .compact-sidebar-brand .timesai-brand-name{font-size:17px!important}
.chat-reference-layout .history-row .history-actions button{width:100%!important;box-sizing:border-box;direction:rtl!important;text-align:right!important;justify-content:flex-start!important;align-items:center!important;gap:9px!important;font-family:Vazirmatn,Tahoma,sans-serif!important;font-size:13px!important;font-weight:500!important;color:#344054!important;padding:6px 9px!important}
.chat-reference-layout .history-row .history-actions button .ui-icon{order:0!important;flex:0 0 16px!important;width:16px!important;height:16px!important;margin:0!important}
.chat-reference-layout .history-row .history-actions button span{order:1!important;flex:1!important;text-align:right!important;font:inherit!important;line-height:1.6!important}
.chat-reference-layout .history-row .history-actions button.danger{color:#b34b4b!important}
@media(max-width:1100px) and (min-width:901px){.chat-reference-layout .chat-upgrade{display:none!important}}
@media(max-width:900px){.chat-reference-layout .chat-desktop-brand,.chat-reference-layout .chat-mobile-brand{display:none!important}.chat-reference-layout .compact-sidebar-brand{display:flex!important;position:absolute!important;left:64px!important;top:10px!important;padding:0!important;margin:0!important;height:28px!important;width:auto!important;max-width:calc(100% - 115px)!important}.chat-reference-layout .chat-window-dots{top:20px!important;left:16px!important}.chat-reference-layout .chat-header-title h2{max-width:calc(100vw - 118px)!important}.chat-reference-layout .chat-header-actions{gap:2px!important}#site-header .brand .timesai-brand-mark{width:26px!important;height:29px!important}#site-header .timesai-brand-name{font-size:19px!important}}

/* v10 — left identity / right decorative dots and editable speech-to-text. */
.chat-reference-layout .chat-desktop-brand{display:none!important}
.chat-reference-layout .compact-sidebar-brand{position:absolute!important;left:16px!important;top:10px!important;padding:0!important;margin:0!important;width:auto!important;height:28px!important}
.chat-reference-layout .compact-sidebar-brand .timesai-brand-name{font-weight:700!important}
.chat-reference-layout .chat-window-dots{left:auto!important;right:16px!important;top:20px!important}
.chat-reference-layout .chat-compose-row{grid-template-columns:32px minmax(0,1fr) 32px 32px!important}
.chat-reference-layout .chat-dictation-button{grid-column:3;grid-row:2;display:flex;align-items:center;justify-content:center;min-width:32px!important;width:32px!important;min-height:32px!important;height:32px!important;padding:6px!important;border:0;border-radius:50%;background:transparent;color:#65738a;cursor:pointer}
.chat-reference-layout .chat-dictation-button .ui-icon{width:19px;height:19px}
.chat-reference-layout .chat-dictation-button:hover{background:#edf3fc;color:#2862bd}
.chat-reference-layout .chat-dictation-button:focus-visible{outline:2px solid #3c7bf6;outline-offset:2px}
.chat-reference-layout .chat-dictation-button.is-listening{background:#fce9e9;color:#bb4545}
.chat-reference-layout .chat-dictation-button:disabled{opacity:.45;cursor:default}
.chat-reference-layout .chat-send-button{grid-column:4!important}
.chat-reference-layout .chat-dictation-status{font-size:11px;line-height:1.7;color:#56677e;padding:4px 3px 0;text-align:right}
.chat-reference-layout .chat-dictation-status[hidden]{display:none!important}
@media(max-width:900px){.chat-reference-layout .compact-sidebar-brand{left:16px!important;max-width:calc(100% - 125px)!important}.chat-reference-layout .chat-window-dots{left:auto!important;right:44px!important}.chat-reference-layout #close-chat-history{right:8px!important;left:auto!important;width:28px!important;min-width:28px!important}.chat-reference-layout .chat-tools-trigger{padding:2px 3px!important;gap:3px!important}.chat-reference-layout .chat-compose-row{gap:4px 6px!important}}
@media(min-width:901px){body.chat-route .chat-reference-layout .chat-history{padding-top:48px!important}}

/* v11 — quiet navigation emphasis and native mobile camera capture. */
#main-nav a.nav-chat-start{font-weight:700!important}

.chat-reference-layout .chat-camera-item{display:none!important}
@media(max-width:900px){.chat-reference-layout .chat-camera-item{display:block!important}}

/* v12 — bounded image previews; source image remains unchanged. */
.chat-reference-layout #file-preview .file-preview-thumb{display:block!important;width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;min-height:40px!important;max-height:40px!important;padding:0!important;margin:0!important;overflow:hidden!important;box-sizing:border-box}
.chat-reference-layout #file-preview .file-preview-thumb img{display:block!important;width:100%!important;min-width:0!important;max-width:40px!important;height:100%!important;min-height:0!important;max-height:40px!important;object-fit:cover!important;margin:0!important}
.chat-reference-layout .chat-local-assets .chat-attached-image{display:block;max-width:min(100%,320px)!important;max-height:240px!important;width:auto!important;height:auto!important;object-fit:contain;border-radius:10px}
@media(max-width:900px){
 .chat-reference-layout #file-preview{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;gap:7px!important;max-height:72px!important;min-height:0!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 2px 8px!important;box-sizing:border-box}
 .chat-reference-layout #file-preview[hidden]{display:none!important}
 .chat-reference-layout #file-preview .file-preview-chip{display:grid!important;grid-template-columns:40px minmax(0,1fr) 44px!important;flex:0 0 218px!important;width:218px!important;min-width:0!important;max-width:min(218px,100%)!important;min-height:56px!important;height:56px!important;max-height:56px!important;padding:5px 6px!important;margin:0!important;gap:7px!important;box-sizing:border-box;overflow:hidden}
 .chat-reference-layout #file-preview .file-preview-name{display:block!important;min-width:0!important;margin:0!important;padding:0!important;background:transparent!important}
 .chat-reference-layout #file-preview .file-preview-name b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px!important;line-height:1.5!important}
 .chat-reference-layout #file-preview .file-preview-name small{font-size:10px!important;line-height:1.5!important}
 .chat-reference-layout .chat-local-assets .chat-attached-image{max-width:min(100%,180px)!important;max-height:160px!important}
}
/* v13 — physical centering clears conflicting RTL logical offsets. */
.chat-reference-layout #chat-latest{inset-inline:auto!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;max-width:calc(100% - 24px)!important;box-sizing:border-box;white-space:nowrap}

/* v14 local image viewer and message search. */
.chat-reference-layout #chat-message-search-toggle{display:flex!important}
.chat-message-search{display:flex;align-items:center;gap:5px;padding:5px 12px;border-bottom:1px solid #e8edf4;background:#fafcff;flex:none;min-width:0;direction:rtl}
.chat-message-search[hidden]{display:none!important}.chat-message-search input{min-width:0;flex:1;width:0;border:1px solid #dde5ef;border-radius:7px;padding:5px 8px;font:inherit;font-size:13px;height:32px;background:white}.chat-message-search button{flex:none;width:30px;height:30px;min-height:30px;padding:5px;border:0;border-radius:6px;background:transparent;color:#53657c}.chat-message-search button:disabled{opacity:.4}.chat-message-search button .ui-icon{width:17px;height:17px}.chat-message-search-count,#chat-message-search-count{font-size:11px;white-space:nowrap;flex:none}
.chat-reference-layout #messages .message-search-hit .message-body{background:#fff9e7;border-radius:8px}.chat-reference-layout #messages .message-search-current .message-content{outline:2px solid #adcafa;outline-offset:3px;border-radius:8px}
.chat-reference-layout .chat-attached-image,.chat-reference-layout .chat-generated-image,.chat-reference-layout .file-preview-thumb img{cursor:zoom-in}.chat-reference-layout [role=button]:focus-visible{outline:2px solid #3776df;outline-offset:3px}
.chat-image-dialog{width:min(960px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;padding:20px!important}.chat-image-toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 0;font-size:12px}.chat-image-toolbar button,.chat-image-toolbar a{padding:6px 10px;min-height:32px;border:1px solid #dce5ee;border-radius:7px;background:#f7faff;color:#395573;font:inherit}.chat-image-stage{height:65dvh;overflow:auto;background:#f4f6f9;border-radius:10px;direction:ltr;overscroll-behavior:contain}.chat-image-canvas{width:100%;min-width:100%;display:flex;justify-content:center;align-items:flex-start}.chat-image-canvas img{width:100%;height:auto;max-height:65dvh;object-fit:contain;display:block}.chat-edit-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
@media(max-width:900px){.chat-message-search{padding:5px 8px;gap:3px}.chat-message-search input{font-size:16px}.chat-image-dialog{padding:15px!important}.chat-reference-layout .chat-header-title h2{max-width:calc(100vw - 155px)!important}.chat-edit-actions .button{font-size:12px}.message-actions{flex-wrap:wrap}}
.chat-reference-layout .user .message-actions{position:static!important;display:flex!important;flex-wrap:wrap!important;max-width:100%;opacity:.8!important;pointer-events:auto!important;background:transparent!important;gap:3px!important;margin-top:5px!important}
#chat-message-search-count{min-width:42px;text-align:center}

/* v41: compact time-only disclosure */
.chat-time-wrap{position:relative;flex-shrink:0}
#chat-time-toggle{display:grid;place-items:center;width:28px;height:28px;min-width:28px;min-height:28px;padding:0;border:1px solid #cbd5e1;border-radius:50%;background:transparent;color:inherit;font-size:17px;cursor:pointer}
#chat-time-toggle:focus-visible{outline:2px solid #2563eb;outline-offset:3px}
#chat-time-popover{position:absolute;top:calc(100% + 8px);inset-inline-end:0;z-index:50;width:max-content;max-width:240px;padding:9px 12px;border:1px solid #dbe3ef;border-radius:10px;background:#fff;color:#17243b;box-shadow:0 6px 24px #10204020;font-size:12px;white-space:normal}
#chat-time-popover[hidden]{display:none}
.chat-request-note{font-size:11px;line-height:1.8}

.chat-reference-layout .chat-primary-nav>.rtc-contacts-link{display:flex;align-items:center;gap:10px;direction:ltr;width:100%;padding:4px 10px;border:0;border-radius:7px;background:transparent;color:#354259;font-family:inherit;font-size:13px;font-weight:400;cursor:pointer;text-align:left;text-decoration:none}.chat-reference-layout .rtc-contacts-link span{direction:rtl}.chat-reference-layout .rtc-contacts-link:hover{background:#e9f0ff!important;color:#2456b6!important}

/* v43 output workbench */
/* v44 project context */
.chat-reference-layout .chat-project-menu button:disabled{opacity:.42;cursor:not-allowed}
.chat-reference-layout #chat-project-context{white-space:normal;line-height:1.6}
.project-list-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
body.chat-route .chat-reference-layout{grid-template-columns:clamp(260px,27.2vw,372px) minmax(0,1fr) minmax(280px,32vw)!important}
body.chat-route .chat-reference-layout.chat-sidebar-collapsed{grid-template-columns:0 minmax(0,1fr) minmax(280px,32vw)!important}
.output-workbench{min-width:0;display:flex;flex-direction:column;gap:12px;padding:22px 18px;background:#fbfcff;border-inline-start:1px solid #e5eaf2;overflow:auto;direction:rtl}
.workbench-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.workbench-head h2{font-size:16px;margin:4px 0}.workbench-head p{font-size:11px;color:#7888a0;margin:0;line-height:1.8}.workbench-close{display:none;border:0;background:transparent;font-size:22px;color:#73839b;padding:0}
.workbench-toolbar{display:flex;gap:7px;flex-wrap:wrap}.workbench-editor{width:100%;min-height:300px;flex:1;resize:vertical;border:1px solid #dbe4f1;border-radius:12px;background:#fff;color:#263c5d;font:13px/2 Vazirmatn,sans-serif;padding:14px;direction:rtl;white-space:pre-wrap;box-shadow:0 3px 12px #2b4d7b08}.workbench-editor:focus{outline:2px solid #a8c6f4;outline-offset:1px}.workbench-editor:disabled{background:#f4f6fa;color:#97a5b8}.workbench-selection{font-size:11px;color:#7689a5;min-height:22px}.workbench-versions{border-top:1px solid #e7edf5;padding-top:10px}.workbench-versions-head{display:flex;justify-content:space-between;color:#5b6d86;font-size:12px;margin-bottom:6px}.workbench-versions-head span{font-size:10px;color:#94a1b3}.workbench-version-list,#workbench-version-list{display:flex;flex-direction:column;gap:5px}.workbench-version-list button,#workbench-version-list button{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;padding:7px 9px;border:1px solid #e4eaf3;border-radius:8px;background:#fff;color:#536b8b;text-align:right;font-size:11px}.workbench-version-list button:hover,#workbench-version-list button:hover{border-color:#a9c7f5;background:#f5f9ff}.workbench-version-list small,#workbench-version-list small{font-size:9px;color:#99a7ba}.workbench-refine-box{border:1px solid #cfe0fa;border-radius:10px;padding:10px;background:#f4f8ff}.workbench-refine-box[hidden]{display:none}.workbench-refine-box label{display:block;font-size:11px;color:#526984;margin-bottom:5px}.workbench-refine-box input{width:100%;font-size:12px}.workbench-refine-actions{display:flex;gap:6px;margin-top:8px}.workbench-mobile-switch,.workbench-mobile-tabs{display:none}
@media(max-width:1200px) and (min-width:901px){body.chat-route .chat-reference-layout{grid-template-columns:250px minmax(0,1fr) 300px!important}body.chat-route .chat-reference-layout.chat-sidebar-collapsed{grid-template-columns:0 minmax(0,1fr) 300px!important}.output-workbench{padding:16px 12px}.workbench-editor{min-height:230px}}
@media(max-width:900px){body.chat-route .chat-reference-layout,body.chat-route .chat-reference-layout.chat-sidebar-collapsed{display:flex!important;flex-direction:column!important;position:relative!important}.workbench-mobile-switch{display:flex;position:sticky;top:0;z-index:20;align-self:stretch;background:#fff;border-bottom:1px solid #e6edf5;padding:6px;gap:5px}.workbench-mobile-switch button{flex:1;border:0;border-radius:8px;background:#f3f6fb;color:#71829a;font-size:12px;padding:8px}.workbench-mobile-switch button.selected{background:#e7effd;color:#1e5dc5;font-weight:700}.output-workbench{display:none;position:absolute;inset:45px 0 0;z-index:15;padding:16px 14px;border:0}.workbench-mobile-output .output-workbench{display:flex}.workbench-mobile-output .chat-workspace{display:none}.workbench-mobile-output .chat-history{display:none}.workbench-close{display:block}.workbench-mobile-tabs{display:none}.workbench-editor{min-height:45dvh}.workbench-head h2{font-size:15px}}

/* v47: conversation-only workspace; outputs live in the conversation menu. */
body.chat-route .chat-reference-layout{grid-template-columns:clamp(260px,27.2vw,372px) minmax(0,1fr)!important}
body.chat-route .chat-reference-layout.chat-sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)!important}
.chat-reference-layout .workbench-mobile-switch,.chat-reference-layout .output-workbench{display:none!important}
.chat-outputs-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.chat-outputs-list{display:grid;gap:8px;max-height:55dvh;overflow:auto}
.chat-outputs-list button{display:flex;align-items:center;gap:10px;justify-content:space-between;text-align:right;width:100%;padding:12px;border:1px solid #dfe6f1;border-radius:10px;background:#f7faff;color:#34415b;overflow-wrap:anywhere}
@media(max-width:900px){.chat-reference-layout #chat-history-toggle{width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;padding:9px!important}.chat-reference-layout #chat-history-toggle .ui-icon{width:24px!important;height:24px!important}.chat-reference-layout .history-more-button{opacity:1}}

/* v48: center controls independently of text/font metrics in every state. */
.chat-reference-layout #chat-submit{display:grid!important;place-items:center!important;align-items:center!important;justify-items:center!important;padding:0!important;line-height:0!important;color:#fff!important}
.chat-reference-layout #chat-submit>.ui-icon,.chat-reference-layout #chat-submit>.chat-control-icon{display:block!important;width:18px!important;height:18px!important;margin:0!important;align-self:center!important;justify-self:center!important;transform:none!important;animation:none!important}
.chat-reference-layout #chat-submit>.chat-control-icon{fill:currentColor;stroke:none}

/* v49: independent placement of the filled controls, including RTL layouts. */
.chat-reference-layout #chat-submit{position:relative!important;overflow:hidden;direction:ltr!important;box-sizing:border-box!important}
.chat-reference-layout #chat-submit>.ui-icon,.chat-reference-layout #chat-submit>.chat-control-icon{position:absolute!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;flex:none!important}

/* Only the existing administrator diagnostics panel is extended. */
.admin-execution-trace .admin-debug{margin-top:12px;min-width:0;max-width:100%}
.admin-execution-trace .admin-debug-note,.admin-execution-trace .admin-debug-limit{font-size:12px;line-height:1.9;padding:10px;border-radius:8px;background:#f3f6fb;color:#475569}
.admin-execution-trace .admin-debug-limit{background:#fff4dd;color:#855400}
.admin-execution-trace .admin-debug-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.admin-execution-trace .admin-debug-actions input{min-width:120px;flex:1;border:1px solid #dbe3ef;border-radius:8px;padding:8px;font:inherit;font-size:12px;background:transparent;color:inherit}
.admin-execution-trace .admin-debug-actions button{font:inherit;font-size:12px;cursor:pointer;padding:8px;border:1px solid #dbe3ef;border-radius:8px;background:transparent;color:inherit}
.admin-execution-trace .admin-debug-run h4{font-size:13px;margin:16px 0 8px;overflow-wrap:anywhere}
.admin-execution-trace .admin-debug-run h4 small{display:block;font-weight:400;font-size:11px}
.admin-execution-trace .admin-debug-event{border:1px solid #dbe3ef;border-radius:8px;padding:9px;margin:6px 0;min-width:0;max-width:100%}
.admin-execution-trace .admin-debug-event[hidden]{display:none}
.admin-execution-trace .admin-debug-event>summary{display:list-item;cursor:pointer;font-size:12px;overflow-wrap:anywhere}
.admin-execution-trace .admin-debug-event>summary span{display:block;font-size:11px;color:#64748b;margin-top:4px}
.admin-execution-trace .admin-debug-data{margin-top:10px;min-width:0;max-width:100%}
.admin-execution-trace .admin-debug-data>summary{display:list-item;font-size:12px;cursor:pointer}
.admin-execution-trace .admin-debug-data pre{font-family:ui-monospace,monospace;font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-height:420px;overflow:auto;max-width:100%;padding:12px;border-radius:6px;background:#f3f6fb;color:#24334b;text-align:start;unicode-bidi:plaintext}
/* The site's generic open-details arrow rotation must not rotate debug text. */
.admin-execution-trace .admin-debug summary span{transform:none!important;writing-mode:horizontal-tb}
