:root{
  --sama-control-bg:rgba(18,27,38,.94);
  --sama-control-border:#3d4e60;
  --sama-control-text:#f4f7fb;
  --sama-control-focus:#f0c85a;
}
#sama-ui-controls{
  position:static;z-index:auto;display:inline-flex;flex:0 0 auto;align-items:center;gap:7px;
  margin-inline-start:4px;direction:rtl;
}
.sama-ui-control{
  min-height:38px;border:1px solid var(--sama-control-border);border-radius:11px;padding:7px 11px;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;background:var(--sama-control-bg);
  color:var(--sama-control-text);font:700 12px/1.2 Tahoma,"Segoe UI",Arial,sans-serif;cursor:pointer;
  box-shadow:none;transition:transform .16s,border-color .16s,background .16s;
}
.sama-ui-control:hover{transform:translateY(-1px);border-color:#d0af48;background:#243141}
.sama-ui-control:focus-visible{outline:3px solid var(--sama-control-focus)!important;outline-offset:2px!important}
.sama-control-icon{font-size:16px;line-height:1}
.sama-page-toolbar{
  position:relative;z-index:2;display:flex;justify-content:flex-start;align-items:center;
  min-height:58px;padding:10px max(16px,env(safe-area-inset-left));
  border-bottom:1px solid var(--sama-control-border);background:var(--sama-control-bg);
}
@media(max-width:640px){
  #sama-ui-controls{gap:6px;margin-inline-start:0}
  .sama-ui-control{min-width:40px;min-height:40px;padding:8px}
  .sama-control-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .sama-page-toolbar{min-height:54px;padding:7px 10px}
}
html[data-theme="dark"] body>main:not([class]){
  background:#111b28!important;color:#edf3f8!important;border-color:#2c3c4d!important;box-shadow:0 12px 38px rgba(0,0,0,.28)!important;
}
html[data-theme="dark"] body.sama-simple-page,html[data-theme="dark"] body:has(>main:not([class])){background:#07111f!important;color:#edf3f8!important}
html[data-theme="dark"] body>main:not([class]) h1,html[data-theme="dark"] body>main:not([class]) h2{color:#8fc8f0!important}
html[data-theme="dark"] body>main:not([class]) a{color:#72c4ef!important}
html[data-theme="dark"] body>main:not([class]) small{color:#a4b4c5!important}

html[data-theme="light"]{
  color-scheme:light;
  --bg:#f3f6fa!important;--panel:#ffffff!important;--panel-2:#eef3f8!important;--panel2:#eef3f8!important;
  --line:#cbd6e2!important;--edge:#cbd6e2!important;--edge2:#aebdce!important;
  --text:#172033!important;--soft:#344357!important;--muted:#526274!important;--dim:#66768a!important;
  --gold:#8a6500!important;--gold-lt:#705400!important;--cyan:#087e91!important;--blue:#1769a6!important;
  --green:#16724f!important;--mint:#13745e!important;--red:#a33838!important;--late:#a43e31!important;
  --heat:#a97900!important;--heat-dim:#fff0bf!important;--cool:#286f9f!important;
  --shadow:0 18px 52px rgba(30,55,82,.13)!important;
  --sama-control-bg:rgba(255,255,255,.96);--sama-control-border:#b8c5d3;--sama-control-text:#172033;--sama-control-focus:#1769a6;
}
html[data-theme="light"],html[data-theme="light"] body{
  background:#f3f6fa!important;color:#172033!important;
}
html[data-theme="light"] body{
  background-image:radial-gradient(circle at 86% -10%,rgba(51,113,169,.13),transparent 34%),linear-gradient(145deg,#f8fbfe,#edf3f8)!important;
}
html[data-theme="light"] body.sc-list,html[data-theme="light"] body.sc-detail,html[data-theme="light"] body.sc-orders,
html[data-theme="light"] body.sc-pool,html[data-theme="light"] body.sc-report,html[data-theme="light"] body.sc-posts,
html[data-theme="light"] body.sc-manage,html[data-theme="light"] body.sc-pods,html[data-theme="light"] body.sc-progress{
  --bg:#f3f6fa!important;--panel:#fff!important;--panel-2:#edf3f8!important;--line:#cbd6e2!important;
}
html[data-theme="light"] .topbar,html[data-theme="light"] .top,
html[data-theme="light"] body[class*="sc-"] .topbar{
  background:rgba(255,255,255,.93)!important;color:#172033!important;border-color:#cbd6e2!important;box-shadow:0 5px 20px rgba(30,55,82,.08)!important;
}
html[data-theme="light"] .tools,html[data-theme="light"] body[class*="sc-"] .tools{
  background:rgba(244,248,252,.96)!important;border-color:#cbd6e2!important;
}
html[data-theme="light"] .panel,html[data-theme="light"] .card,html[data-theme="light"] .side,
html[data-theme="light"] .content,html[data-theme="light"] .metric,html[data-theme="light"] .stat,
html[data-theme="light"] .stage,html[data-theme="light"] .ticket,html[data-theme="light"] .fcard,
html[data-theme="light"] .prow,html[data-theme="light"] .stf,html[data-theme="light"] .client,
html[data-theme="light"] .conversation,html[data-theme="light"] .channel,html[data-theme="light"] .filter,
html[data-theme="light"] .media,html[data-theme="light"] .comment,html[data-theme="light"] .audit-row,
html[data-theme="light"] .step,html[data-theme="light"] .ai-box,html[data-theme="light"] .notice,
html[data-theme="light"] .boot-card,html[data-theme="light"] .gate-card{
  background:#fff!important;color:#172033!important;border-color:#cbd6e2!important;box-shadow:0 12px 34px rgba(30,55,82,.09)!important;
}
html[data-theme="light"] .rail,html[data-theme="light"] .service,html[data-theme="light"] .internal-card,
html[data-theme="light"] .policy-card,html[data-theme="light"] .hero-card,html[data-theme="light"] .feature,
html[data-theme="light"] .download-card,html[data-theme="light"] .model-card,html[data-theme="light"] .control-card,
html[data-theme="light"] .job-item,html[data-theme="light"] .result-wrap,html[data-theme="light"] .conversation-row,
html[data-theme="light"] .knowledge-item,html[data-theme="light"] .council-item,html[data-theme="light"] .memory-claim,
html[data-theme="light"] .workspace-dialog,html[data-theme="light"] .chat-sidebar,html[data-theme="light"] .chat-workarea{
  background:#fff!important;color:#172033!important;border-color:#cbd6e2!important;box-shadow:0 10px 30px rgba(30,55,82,.08)!important;
}
html[data-theme="light"] .rail-btn,html[data-theme="light"] .service-footer,html[data-theme="light"] .internal-head,
html[data-theme="light"] .jobs-head,html[data-theme="light"] .conversation-row:hover,html[data-theme="light"] .side-head,
html[data-theme="light"] .workspace-dialog-head,html[data-theme="light"] .workspace-dialog-actions{
  background:#eef3f8!important;color:#172033!important;border-color:#cbd6e2!important;
}
html[data-theme="light"] .msg.ai,html[data-theme="light"] .admin-msg.ai{background:#fff!important;color:#172033!important;border-color:#cbd6e2!important}
html[data-theme="light"] .msg.me,html[data-theme="light"] .admin-msg.me{background:#dceafb!important;color:#172033!important;border-color:#91b3d0!important}
html[data-theme="light"] .pod-chat-shell,html[data-theme="light"] .pod-stream,html[data-theme="light"] .pod-summary-card,
html[data-theme="light"] .pod-msg,html[data-theme="light"] .pod-compose,html[data-theme="light"] .pod-client-option,
html[data-theme="light"] .pod-card,html[data-theme="light"] .pod-auto-name{
  background:#fff!important;color:#172033!important;border-color:#cbd6e2!important;box-shadow:0 10px 30px rgba(30,55,82,.08)!important;
}
html[data-theme="light"] .pod-chat-head,html[data-theme="light"] .pod-summary-head{background:#eaf3f8!important;color:#172033!important;border-color:#cbd6e2!important}
html[data-theme="light"] .pod-chat-head h3,html[data-theme="light"] .pod-msg-text,html[data-theme="light"] .pod-summary-text{color:#172033!important}
html[data-theme="light"] .pod-chat-head p,html[data-theme="light"] .pod-from,html[data-theme="light"] .pod-compose-hint,
html[data-theme="light"] .pod-summary-meta,html[data-theme="light"] .pod-summary-note{color:#526274!important}
html[data-theme="light"] .stage-head,html[data-theme="light"] .panel-head,html[data-theme="light"] .thread-head,
html[data-theme="light"] .hero,html[data-theme="light"] .tabs,html[data-theme="light"] .composer,
html[data-theme="light"] .dialog-head,html[data-theme="light"] .dialog-foot,html[data-theme="light"] .dh,
html[data-theme="light"] .df{
  background:#f2f6fa!important;color:#172033!important;border-color:#cbd6e2!important;
}
html[data-theme="light"] dialog{
  background:#fff!important;color:#172033!important;border-color:#b9c7d5!important;box-shadow:0 24px 80px rgba(21,43,68,.22)!important;
}
html[data-theme="light"] dialog::backdrop{background:rgba(45,61,78,.34)!important}
html[data-theme="light"] input,html[data-theme="light"] select,html[data-theme="light"] textarea,
html[data-theme="light"] .field input,html[data-theme="light"] .field select,html[data-theme="light"] .field textarea,
html[data-theme="light"] .composer textarea,html[data-theme="light"] .maprow input{
  background:#fff!important;color:#172033!important;border-color:#aebdce!important;
}
html[data-theme="light"] input::placeholder,html[data-theme="light"] textarea::placeholder{color:#718096!important;opacity:1}
html[data-theme="light"] .btn:not(.primary):not(.gold):not(.danger),html[data-theme="light"] .mini,
html[data-theme="light"] .tab,html[data-theme="light"] .account,html[data-theme="light"] .chip{
  background:#eef3f8!important;color:#243247!important;border-color:#b8c6d5!important;
}
html[data-theme="light"] .btn:not(.primary):not(.gold):not(.danger):hover,html[data-theme="light"] .mini:hover,
html[data-theme="light"] .tab:hover{background:#e1e9f1!important;border-color:#7f96ac!important}
html[data-theme="light"] .btn.primary,html[data-theme="light"] .btn.gold,html[data-theme="light"] .gbtn{
  color:#211a07!important;background:linear-gradient(135deg,#f2cf66,#d9aa32)!important;
}
html[data-theme="light"] .filter.active,html[data-theme="light"] .channel.active,
html[data-theme="light"] .conversation.active,html[data-theme="light"] .tab.active,
html[data-theme="light"] .account.active{background:#dcebf7!important;color:#163550!important;border-color:#6d9fc2!important}
html[data-theme="light"] .message.in{background:#fff!important;color:#172033!important;border-color:#b9cbd9!important}
html[data-theme="light"] .message.out,html[data-theme="light"] .bubble.mine{background:#dceafb!important;color:#172033!important;border-color:#91b3d0!important}
html[data-theme="light"] .bubble{background:#eaf0f6!important;color:#172033!important}
html[data-theme="light"] .message small{color:#53687a!important}
html[data-theme="light"] .thread-body{background:linear-gradient(180deg,#edf4f9,#f8fbfd)!important}
html[data-theme="light"] .ai-card,html[data-theme="light"] .meta-connect,html[data-theme="light"] .advanced{
  background:#fffaf0!important;color:#172033!important;border-color:#d6c184!important;
}
html[data-theme="light"] .notice.warn,html[data-theme="light"] .coexistence{background:#fff6d8!important;color:#614b08!important;border-color:#c6a74d!important}
html[data-theme="light"] .notice.error,html[data-theme="light"] .error{background:#fff0ee!important;color:#8f302a!important;border-color:#d5a09b!important}
html[data-theme="light"] .tag,html[data-theme="light"] .badge,html[data-theme="light"] .count{
  background:#edf3f8!important;color:#42566b!important;border-color:#c2cfdb!important;
}
html[data-theme="light"] .badge.good,html[data-theme="light"] .badge.ok,html[data-theme="light"] .mini.go{
  background:#e5f5ee!important;color:#126647!important;border-color:#8fc4ae!important;
}
html[data-theme="light"] .badge.late,html[data-theme="light"] .ticket.late,html[data-theme="light"] .prow.late{
  background:#fff0ed!important;color:#8f3127!important;border-color:#d8a29a!important;
}
html[data-theme="light"] .muted,html[data-theme="light"] .hint,html[data-theme="light"] small,
html[data-theme="light"] .brand p,html[data-theme="light"] .brand small,html[data-theme="light"] .channel small,
html[data-theme="light"] .conversation small,html[data-theme="light"] .thread-title p,html[data-theme="light"] .helper{
  color:#526274!important;
}
html[data-theme="light"] h1,html[data-theme="light"] h2,html[data-theme="light"] h3,
html[data-theme="light"] strong,html[data-theme="light"] .tk-task,html[data-theme="light"] .fc-name{color:#172033}
html[data-theme="light"] a{color:#145f93}
html[data-theme="light"] .gbox{background:#fff!important;border-color:#bdcada!important;box-shadow:0 24px 70px rgba(24,48,75,.18)!important}
html[data-theme="light"] #gate{background:radial-gradient(120% 95% at 50% -5%,#d9e9f8,#eef4fa 58%,#e6edf5)!important}
html[data-theme="light"] .gwelcome,html[data-theme="light"] .gsub,html[data-theme="light"] .ghint{color:#34465b!important}
html[data-theme="light"] .gbox input,html[data-theme="light"] .code{background:#f6f9fc!important;color:#172033!important}
html[data-theme="light"] [style*="color:#C6D0DA"],html[data-theme="light"] [style*="color:#D5DDE5"],
html[data-theme="light"] [style*="color:#B6C1CC"],html[data-theme="light"] [style*="color:#F1E7CE"],
html[data-theme="light"] [style*="color:#c7d6df"],html[data-theme="light"] [style*="color:#d6e0e4"]{color:#26384c!important}
html[data-theme="light"] [style*="background:#111D26"],html[data-theme="light"] [style*="background:#171D23"],
html[data-theme="light"] [style*="background:#172820"],html[data-theme="light"] [style*="background:#171D23"]{
  background:#f6f9fc!important;border-color:#cbd6e2!important;
}
html[data-theme="light"] .toast{background:#fff!important;color:#172033!important;border-color:#9cafc1!important;box-shadow:0 12px 34px rgba(30,55,82,.16)!important}
@media(forced-colors:active){.sama-ui-control{forced-color-adjust:auto}}
