/* Beautiful UI-inspired workspace. Application data and actions remain native.
   One surface system for the shell, React islands, records, and configuration.
   See web/ui/THIRD_PARTY_NOTICES.txt for the upstream component license. */
.agentic-shell {
  --workspace-rail: 248px;
  --workspace-content: 720px;
  --workspace-radius: 16px;
  --workspace-shadow: 0 1px 2px rgb(20 24 32 / .035), 0 4px 12px rgb(20 24 32 / .025);
  background: var(--canvas);
}
.agentic-shell .app { padding: 10px 10px 10px 0; gap: 0; background: var(--canvas); }
.agentic-shell .sidebar {
  width: var(--workspace-rail); min-width: var(--workspace-rail);
  padding: 17px 14px 12px; background: transparent; border: 0;
}
.agentic-shell .brand-shell { margin: 0 8px 25px; min-height: 32px; }
.agentic-shell .ag-wordmark { width: 156px; }
.agentic-shell .sidebar-collapse { opacity: .65; width: 24px; }
.agentic-shell .main {
  border: 1px solid var(--line-strong); border-radius: var(--workspace-radius);
  background: var(--surface); overflow: hidden; box-shadow: var(--workspace-shadow);
}
.agentic-shell .header {
  height: 54px; min-height: 54px; padding: 0 24px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.agentic-shell .header-title { font-size: 13px; font-weight: 500; letter-spacing: -.1px; }
.agentic-shell .company-badge { font-size: 12px; color: var(--ink-2); }
.agentic-shell .header-icon-btn { width: 30px; height: 30px; border-radius: 7px; box-shadow: none; }
.agentic-shell .ag-shortcuts { display: grid; gap: 3px; margin-bottom: 22px; }
.agentic-shell .ag-shortcut {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px;
  padding: 8px 11px; text-align: left; color: var(--ink); background: none;
  border: 0; border-radius: 8px; font: 400 13px/1.4 var(--font); cursor: pointer;
}
.agentic-shell .ag-shortcut svg { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.agentic-shell .ag-shortcut kbd { margin-left: auto; font: 11px var(--font); color: var(--ink-3); }
.agentic-shell .ag-shortcut:hover { background: var(--hover-2); }
/* Sohbet arama girdisi. Varsayılan olarak gizli; "Sohbetler" başlığındaki
   büyüteçle açılıyor. Kısayolların ölçüsünü izler ki açılınca listeye
   yabancı durmasın. type=search'ün WebKit'te getirdiği yerleşik temizleme
   düğmesi kaldırıldı — kendi boşluğumuzu bozuyor. */
.agentic-shell #ag-history-search {
  width: 100%; min-height: 32px; margin: 0 0 6px; padding: 6px 10px;
  color: var(--ink); background: var(--inset);
  border: 1px solid var(--line); border-radius: 8px;
  font: 400 13px/1.4 var(--font); -webkit-appearance: none; appearance: none;
  transition: border-color .18s var(--ease-out-strong), background .18s var(--ease-out-strong);
}
.agentic-shell #ag-history-search::placeholder { color: var(--ink-3); }
.agentic-shell #ag-history-search:focus {
  outline: none; background: var(--surface);
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
.agentic-shell #ag-history-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.agentic-shell .ag-recent-head button { border-radius: 6px; }
.agentic-shell .ag-recent-head button:hover { background: var(--hover-2); }
.agentic-shell #ag-app-nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.agentic-shell .ag-app-nav { gap: 3px; }
.agentic-shell .nav-btn,.agentic-shell .ag-app-nav .nav-btn {
  min-height: 36px; padding: 8px 11px; gap: 10px; font: 400 13px/1.45 var(--font); border-radius: 8px;
}
.agentic-shell .nav-btn svg { width: 18px; height: 18px; stroke-width: 1.65; color: var(--ink-2); }
.agentic-shell .nav-btn.active { color: var(--ink); background: var(--hover-2); font-weight: 500; }
.agentic-shell .nav-btn.active svg { color: var(--brand); }
.agentic-shell .nav-btn:hover { background: var(--hover); }
.agentic-shell .modules-sidebar { border: 0; margin-top: 3px; padding: 0; }
.agentic-shell .ag-sap-toggle>summary { padding: 9px 11px; min-height: 36px; font: 400 13px/1.45 var(--font); }
.agentic-shell .ag-module summary,.agentic-shell [data-nav-domain="sap"] summary {
  min-height: 34px; padding: 7px 11px; font-size: 12px; gap: 10px;
}
.agentic-shell .ag-module summary>svg { width: 17px; height: 17px; }
.agentic-shell .ag-module-actions { padding-left: 32px; }
.agentic-shell .ag-module-actions button { font-size: 12px; }
.agentic-shell .ag-recent { margin-top: 22px; padding: 17px 4px 0; border-top: 1px solid var(--line-strong); }
.agentic-shell .ag-recent-head { display: flex; align-items: center; justify-content: space-between; padding: 0 7px; margin-bottom: 8px; }
.agentic-shell .ag-recent h2 { margin: 0; font: 500 11px/1.5 var(--font); color: var(--ink-2); }
.agentic-shell .ag-recent-head button {
  display: grid; place-items: center; width: 27px; height: 27px; padding: 5px;
  background: transparent; color: var(--ink-2); border: 0; border-radius: 6px; cursor: pointer;
}
.agentic-shell .ag-recent-head button:hover { background: var(--hover-2); }
.agentic-shell .ag-recent-head svg { width: 15px; height: 15px; }
.agentic-shell #ag-history-search {
  width: 100%; margin-bottom: 9px; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 7px; background: var(--surface); color: var(--ink); font: 12px var(--font);
}
.agentic-shell .ag-recent-item { padding: 9px 7px; font: 400 12px/1.45 var(--font); border-radius: 7px; }
.agentic-shell .ag-recent-item:hover { background: var(--hover); color: var(--ink); }
.agentic-shell .ag-recent-item[aria-current] { background: var(--hover-2); color: var(--ink); }
.agentic-shell .ag-recent-empty { font: 400 12px/1.65 var(--font); color: var(--ink-2); padding: 18px 7px; }
.agentic-shell .status-area { padding: 10px 3px 0; border-top: 1px solid var(--line-strong); }
.agentic-shell .profile-main { gap: 8px; padding: 5px 0; }
.agentic-shell .profile-avatar { width: 30px; min-width: 30px; height: 30px; font-size: 12px; }
.agentic-shell .profile-copy strong { font-size: 12px; }
.agentic-shell .ag-profile-actions { gap: 0; }
.agentic-shell .ag-profile-actions .ag-profile-action { width: 27px; min-width: 27px; height: 29px; min-height: 29px; flex-basis: 27px; }
.agentic-shell .ag-profile-actions .ag-profile-action svg { width: 15px; height: 15px; min-width: 15px; min-height: 15px; flex-basis: 15px; }
.agentic-shell #view-chat,.agentic-shell .chat-session { background: var(--surface); }
.agentic-shell .chat-session { padding: 0 32px 18px; }
.agentic-shell .ag-welcome { width: 100%; max-width: var(--workspace-content); align-self: center; text-align: left; }
.agentic-shell .ag-welcome p { margin: 0 0 6px; font: 400 27px/1.3 var(--font); color: var(--ink-2); letter-spacing: -.7px; }
.agentic-shell .ag-welcome h1 { margin: 0; font: 500 clamp(24px,2.2vw,32px)/1.3 var(--font); letter-spacing: -.9px; }
.agentic-shell .ag-empty .chat-session { padding-bottom: 52px; }
.agentic-shell .ag-composer {
  max-width: var(--workspace-content); padding: 17px 18px 12px; background: var(--inset);
  border: 1px solid var(--line-strong); border-radius: 20px; box-shadow: 0 1px 3px rgb(0 0 0 / .03);
}
.agentic-shell .ag-empty .ag-composer { margin-top: 30px; border-color: var(--line-strong); }
.agentic-shell .ag-composer:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.agentic-shell #msg-input { min-height: 62px; padding: 3px 2px; font: 400 14px/1.6 var(--font); resize: none; }
.agentic-shell #msg-input::placeholder { color: var(--ink-2); }
.agentic-shell .ag-composer-tools { gap: 14px; min-height: 32px; margin-top: 12px; }
.agentic-shell .ag-attach { padding: 5px 2px; gap: 8px; font: 400 12px/1.4 var(--font); color: var(--ink-2); }
.agentic-shell .ag-attach svg { width: 17px; height: 17px; color: var(--ink-2); }
.agentic-shell .ag-composer-model { font: 400 11px/1.5 var(--font); color: var(--ink-2); }
.agentic-shell .ag-composer-command { margin-left: auto; padding: 5px 7px; border: 0; border-radius: 5px; background: none; color: var(--ink-2); font: 11px var(--font); cursor: pointer; }
.agentic-shell .ag-composer-command:hover { background: var(--hover-2); color: var(--ink); }
.agentic-shell #chat-send,.agentic-shell .ag-stop { width: 32px; height: 32px; margin-left: 0; padding: 7px; border-radius: 9px; background: var(--brand); }
.agentic-shell #chat-send svg,.agentic-shell .ag-stop svg { width: 18px; height: 18px; }
.agentic-shell .ag-suggestions {
  width: 100%; max-width: var(--workspace-content); align-self: center; flex-direction: column;
  align-items: stretch; gap: 2px; margin-top: 24px;
}
.agentic-shell .ag-suggestions button {
  width: 100%; min-height: 39px; padding: 9px 4px; gap: 12px; border: 0; background: none;
  font: 400 13px/1.5 var(--font); border-radius: 8px; text-align: left; box-shadow: none;
}
.agentic-shell .ag-suggestions button:hover { transform: none; background: var(--hover); }
.agentic-shell .ag-suggestions svg { width: 17px; height: 17px; color: var(--ink-2); }
.agentic-shell .ag-disclaimer,.agentic-shell .ag-empty .ag-disclaimer {
  width: 100%; max-width: var(--workspace-content); align-self: center; margin: 15px 0 0;
  font: 400 10px/1.6 var(--font); color: var(--ink-2); text-align: center;
}
.agentic-shell .ag-empty .ag-disclaimer { margin-top: 25px; text-align: left; }
.agentic-shell .ag-status { font-size: 11px; }
.agentic-shell .chat-area { max-width: var(--workspace-content); padding: 32px 0 20px; }
.agentic-shell .msg { margin-bottom: 28px; }
.agentic-shell .msg.user .msg-content { padding: 12px 16px; font: 400 14px/1.6 var(--font); border-radius: 15px; background: var(--hover); }
.agentic-shell .msg.bot .msg-avatar { font-size: 12px; font-weight: 500; margin-bottom: 14px; }
.agentic-shell .msg.bot .msg-avatar::before { width: 17px; height: 17px; border: 0; border-radius: 0; transform: none; background: url('/static/assets/logosoft-star.svg') center / contain no-repeat; }
.agentic-shell .msg.bot .msg-content { font: 400 14px/1.75 var(--font); }
.agentic-shell .msg .ai-answer :is(h1,h2,h3) { font-size: 17px; font-weight: 550; }
.agentic-shell .ag-result-card { margin: 18px 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--workspace-shadow); background: var(--surface); }
.agentic-shell .ag-result-card strong { font-size: 13px; font-weight: 550; }
.agentic-shell .ag-result-card span { font-size: 11px; }
.agentic-shell .ag-result-card button { font: 500 11px var(--font); color: var(--ink); background: var(--hover); border-radius: 7px; padding: 8px 10px; }
.agentic-shell .ag-result-panel { width: 46%; min-width: 360px; max-width: 650px; margin: 0; padding: 18px; border-left: 1px solid var(--line); background: var(--surface); }
.agentic-shell .ag-result-head h2 { font-size: 14px; font-weight: 550; }
.agentic-shell .ag-result-tabs { margin-top: 12px; border-bottom: 1px solid var(--line); }
.agentic-shell .ag-result-tabs button { font-size: 12px; border-radius: 6px 6px 0 0; }
.agentic-shell .ag-result-open .chat-session { padding-left: 24px; padding-right: 24px; }
.agentic-shell .ag-result-panel table { font-size: 12px; }
.agentic-shell .ag-result-panel :is(th,td) { padding: 10px 12px; }
.agentic-shell .ag-trace { background: var(--inset); border-color: var(--line); border-radius: 10px; }
.agentic-shell .ag-trace>summary,.agentic-shell .stream-chip { font-size: 12px; }
.agentic-shell .ai-notice { font-size: 10px; gap: 8px; }
.agentic-shell .ai-source { border-radius: 6px; font-size: 11px; }
/* Keep React islands and their fallback DOM in the same product palette. */
.agentic-shell .bui-root { --accent: var(--brand); --accent-ink: var(--brand); --accent-tint: var(--brand-soft); font-family: var(--font); }
.agentic-shell .bui-root :is(button,input,textarea,select) { font-family: inherit; }
.agentic-shell .bui-root:empty { display: none; }
/* Existing module/filter/detail controls retain their handlers and permissions. */
.agentic-shell :is(.expense-table,.module-table,.tabulator) { font-family: var(--font); font-size: 12px; }
.agentic-shell :is(.expense-table,.module-table) :is(th,td) { border-color: var(--line); }
.agentic-shell :is(.expense-primary,.expense-secondary,.module-toolbar button) { font-size: 12px; box-shadow: none; border-radius: 8px; }
.agentic-shell :is(.expense-settings-card,.saas-surface,.profile-modal-card) { border-color: var(--line); border-radius: 12px; box-shadow: var(--workspace-shadow); }
.agentic-shell :is(.expense-field,.field) :is(input,select,textarea) { font-size: 13px; border-radius: 8px; border-color: var(--line-strong); }
.agentic-shell .cmdk-overlay { background: rgb(12 18 28 / .22); backdrop-filter: blur(4px); padding-top: min(18vh,160px); }
.agentic-shell .cmdk-panel { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 18px 60px rgb(0 0 0 / .15); }
.agentic-shell .cmdk-input { font-size: 14px; font-weight: 400; }
.agentic-shell .cmdk-item { font-size: 13px; font-weight: 400; padding: 11px 12px; }
.agentic-shell .cmdk-group { font-size: 10px; font-weight: 500; letter-spacing: .035em; }
.agentic-shell .cmdk-item.sel { background: var(--hover); color: var(--ink); }
.agentic-shell .cmdk-item .ci-ico,.agentic-shell .cmdk-item.sel .ci-ico { background: none; color: var(--ink-2); }
.agentic-shell .ci-ico svg { width: 17px; height: 17px; }
.agentic-shell .cmdk-esc { cursor: pointer; background: var(--inset); color: var(--ink-2); }
.agentic-shell :is(.ag-shortcut,.ag-history-head button,.ag-composer-command):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.agentic-shell .sidebar-collapsed .sidebar { width: 64px; min-width: 64px; padding-inline: 10px; }
.agentic-shell .sidebar-collapsed :is(.ag-shortcut span,.ag-shortcut kbd,.ag-recent) { display: none; }
.agentic-shell .sidebar-collapsed .ag-shortcut { justify-content: center; padding-inline: 0; }
@media (max-width: 1100px) {
  .agentic-shell { --workspace-rail: 216px; }
  .agentic-shell .ag-result-panel { position: absolute; width: min(620px,90%); min-width: 0; max-width: 90%; top: 0; right: 0; bottom: 0; z-index: 30; box-shadow: -16px 0 44px rgb(0 0 0 / .12); }
}
@media (max-height: 760px) and (min-width: 761px) {
  .agentic-shell .ag-empty .chat-session { padding-bottom: 18px; }
  .agentic-shell .ag-welcome p { font-size: 23px; }
  .agentic-shell .ag-empty .ag-composer { margin-top: 22px; }
  .agentic-shell .ag-suggestions { margin-top: 14px; }
  .agentic-shell .ag-empty .ag-disclaimer { margin-top: 18px; }
}
@media (max-width: 760px) {
  .agentic-shell .app { padding: 0; }
  .agentic-shell .main { border: 0; border-radius: 0; }
  .agentic-shell .sidebar { width: 260px; min-width: 260px; padding: 22px 14px; background: var(--canvas); }
  .agentic-shell .header { height: 54px; min-height: 54px; padding-inline: 16px; }
  .agentic-shell .header-title { font-size: 12px; }
  .agentic-shell .chat-session,.agentic-shell .ag-result-open .chat-session { padding: 0 18px 14px; }
  .agentic-shell .ag-empty .chat-session { padding-bottom: 20px; }
  .agentic-shell .ag-welcome p { font-size: 22px; }
  .agentic-shell .ag-welcome h1 { font-size: 26px; line-height: 1.3; }
  .agentic-shell .ag-empty .ag-composer { margin-top: 25px; }
  .agentic-shell .ag-composer { padding: 14px 13px 11px; border-radius: 17px; }
  .agentic-shell .ag-composer-tools { gap: 8px; }
  .agentic-shell .ag-composer-model { display: none; }
  .agentic-shell .ag-suggestions { margin-top: 17px; }
  .agentic-shell .ag-suggestions button { justify-content: flex-start; min-height: 42px; }
  .agentic-shell .ag-result-panel { width: 100%; max-width: 100%; padding: 16px; }
  .agentic-shell .ag-result-card { flex-wrap: wrap; gap: 10px; }
  .agentic-shell .ag-result-card button { margin-left: auto; }
  .agentic-shell .cmdk-overlay { padding: 12vh 12px 16px; }
  .agentic-shell .cmdk-panel { max-height: 76dvh; }
  .agentic-shell .cmdk-item .ci-sub { max-width: 25%; overflow: hidden; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: reduce) {
  .agentic-shell *, .agentic-shell *::before, .agentic-shell *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
