/* TGBizBot 3.3.142 — unified visual system for EVERY authenticated workspace.
   Inspired by the light, card-based Commerce Admin UI. No commerce PHP/JS copied.
   This layer comes after the historic stylesheet so functional component layouts remain intact. */
:root {
  --tb-bg:#f3f6fb;--tb-sidebar:#fff;--tb-surface:#fff;--tb-surface-soft:#f8faff;
  --tb-text:#1d293f;--tb-muted:#697b96;--tb-border:#e0e7f1;
  --tb-accent:#3979ea;--tb-accent-hover:#2664ce;--tb-accent-soft:#e9f1ff;
  --tb-mint:#29b6ab;--tb-positive:#168b52;--tb-danger:#bb3650;
  --tb-shadow:0 9px 29px rgba(25,49,92,.055);
  --tb-radius:20px;--surface:var(--tb-surface);--surface-2:var(--tb-surface-soft);
  --border:var(--tb-border);--line:var(--tb-border);--ink:var(--tb-text);
  color-scheme:light;
}
html{scrollbar-gutter:stable}
body.tgbiz-shell,body.tgbiz-guest{background:var(--tb-bg);color:var(--tb-text);font:14px/1.55 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
.tgbiz-shell .app{min-height:100vh;display:flex;align-items:stretch;overflow:clip}
.tgbiz-shell #site-nav{box-sizing:border-box;width:252px;min-width:252px;height:100vh;position:sticky;top:0;align-self:flex-start;display:flex;flex-direction:column;gap:0;background:var(--tb-sidebar);padding:20px 14px 10px;border-right:1px solid var(--tb-border);z-index:50;box-shadow:none;overflow:hidden}
.tgbiz-shell #site-nav .logo{display:flex;align-items:center;gap:10px;padding:6px 8px 22px;margin:0;text-decoration:none;color:var(--tb-text);font-size:17px;letter-spacing:-.035em;white-space:normal;line-height:1.15}
.tgbiz-shell #site-nav .logo-mark{width:39px;min-width:39px;height:39px;border-radius:12px;transform:none;padding:0;display:grid;place-items:center;font-size:21px;background:linear-gradient(135deg,#4177ee,#25b8b0);box-shadow:0 9px 17px rgba(45,135,191,.16);color:#fff}
.tgbiz-shell #site-nav .logo-title{display:block;font-weight:850}
.tgbiz-shell #site-nav .logo-title b{color:var(--tb-text)}
.tgbiz-shell #site-nav .logo-title small{font-size:8px;font-weight:750;letter-spacing:.11em;color:var(--tb-muted);margin-top:5px}
.tgbiz-shell #site-nav .sidebar-search{display:flex;flex:0 0 auto;height:41px;min-height:41px;margin:0 3px 18px;padding:0 10px;border:1px solid var(--tb-border);border-radius:11px;background:var(--tb-surface-soft);gap:8px;color:var(--tb-muted)}
.tgbiz-shell #site-nav .sidebar-search input{width:100%;height:100%;padding:0;background:transparent;color:var(--tb-text);font-size:12px;box-shadow:none;border:none}
.tgbiz-shell #site-nav .sidebar-search kbd{background:var(--tb-surface);border-color:var(--tb-border);color:var(--tb-muted)}
.tgbiz-nav-scroll{min-height:0;overflow-y:auto;overflow-x:hidden;flex:1;padding:0 3px 10px;scrollbar-width:thin;scrollbar-color:#c9d6e8 transparent}
.tgbiz-menu-heading{font-size:10px;letter-spacing:.09em;color:#8493aa;font-weight:850;padding:16px 10px 7px}
.tgbiz-nav-group{display:grid;gap:3px}
.tgbiz-shell #site-nav .tgbiz-nav-link{display:flex;align-items:center;gap:10px;min-height:41px;margin:0;padding:9px 11px;font-size:12.6px;line-height:1.3;font-weight:710;color:#62738d;border-radius:11px;text-decoration:none;white-space:normal;box-shadow:none;transition:background .16s,color .16s}
.tgbiz-shell #site-nav .tgbiz-nav-link:hover{background:#f0f4fb;color:#234a7c}
.tgbiz-shell #site-nav .tgbiz-nav-link.active,.tgbiz-shell #site-nav .tgbiz-nav-link[aria-current=page]{background:#e8f0ff;color:#2262ce;font-weight:800}
.tgbiz-shell #site-nav .tgbiz-nav-link .nav-icon{display:grid;place-items:center;flex:0 0 25px;width:25px;min-width:25px;height:25px;padding:0;border-radius:8px;background:#eef3fb;color:#5678b5;font-size:14px;line-height:1}
.tgbiz-shell #site-nav .tgbiz-nav-link.active .nav-icon{background:#d6e5ff;color:#2262ce}
.tgbiz-shell #site-nav .tgbiz-nav-link .nav-title{flex:1;min-width:0;overflow-wrap:anywhere;text-overflow:unset}
.tgbiz-shell .tgbiz-nav-dot{font-size:22px;line-height:.65;color:#d09a4e}
.tgbiz-shell .tgbiz-nav-fold{margin:3px 0 3px;border:0;border-radius:10px;min-width:0}
.tgbiz-shell .tgbiz-nav-fold>summary{display:flex;justify-content:space-between;align-items:center;gap:7px;cursor:pointer;padding:10px 12px 10px 46px;min-height:39px;list-style:none;color:var(--tb-muted);font-size:12px;font-weight:700;border-radius:10px;user-select:none}
.tgbiz-shell .tgbiz-nav-fold>summary::-webkit-details-marker{display:none}
.tgbiz-shell .tgbiz-nav-fold>summary:hover,.tgbiz-shell .tgbiz-nav-fold[open]>summary{background:var(--tb-surface-soft);color:var(--tb-text)}
.tgbiz-shell .tgbiz-nav-fold[open]>summary span{transform:rotate(180deg)}
.tgbiz-shell .tgbiz-nav-fold>summary span{transition:transform .15s}
.tgbiz-shell .tgbiz-fold-links{display:grid;gap:2px;padding:4px 0 5px 9px;border-left:1px solid var(--tb-border);margin:0 0 0 20px}
.tgbiz-shell #site-nav .tgbiz-fold-links .tgbiz-nav-link{padding:8px 9px;min-height:38px;font-size:11.8px}
.tgbiz-current-bot{display:grid;gap:2px;margin:13px 0 3px;background:linear-gradient(110deg,#f2f6ff,#ebf9f8);border:1px solid #d9e7f4;padding:10px 12px;border-radius:12px}
.tgbiz-current-bot span{font-size:9px;font-weight:850;letter-spacing:.08em;color:#6f83a4}
.tgbiz-current-bot strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tgbiz-shell #site-nav .sidebar-bottom{flex:0 0 auto;padding:12px 2px 0;margin:0;background:var(--tb-sidebar);border-top:1px solid var(--tb-border)}
.tgbiz-side-help{display:flex;align-items:center;gap:10px;border:1px solid var(--tb-border);border-radius:12px;padding:10px;background:var(--tb-surface-soft);color:var(--tb-text);text-decoration:none}
.tgbiz-side-help>span:first-child{font-size:19px;color:var(--tb-accent);width:26px;text-align:center}
.tgbiz-side-help strong{font-size:11px;display:block}.tgbiz-side-help small{font-size:10px;color:var(--tb-muted)}
.tgbiz-shell .sidebar-version{display:flex;justify-content:space-between;color:var(--tb-muted);font-size:10px;padding:10px 6px 2px}
.tgbiz-shell main#main-content{flex:1 1 auto;min-width:0;max-width:none;width:calc(100% - 252px);margin:0;padding:27px clamp(18px,2.2vw,38px) 70px;color:var(--tb-text)}
.tgbiz-shell main>header.tgbiz-topbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;margin:0 0 24px;padding:4px 0 0;border:0;background:transparent;box-shadow:none;position:relative}
.tgbiz-shell header .header-heading{flex:1 1 250px;min-width:180px;margin-right:auto}
.tgbiz-shell header .eyebrow{font-size:10px;font-weight:850;letter-spacing:.08em;color:#8493a6}
.tgbiz-shell header h1{font-size:clamp(23px,2vw,30px);letter-spacing:-.035em;line-height:1.15;margin:5px 0 0;color:var(--tb-text);font-weight:850}
.tgbiz-shell header .header-create,.tgbiz-shell .hero-cta{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:40px;border:none;border-radius:11px;padding:10px 14px;background:linear-gradient(100deg,var(--tb-accent),var(--tb-mint));color:#fff;text-decoration:none;font-size:12px;font-weight:800;box-shadow:0 6px 14px rgba(46,122,205,.13)}
.tgbiz-shell header .header-create:hover,.tgbiz-shell .hero-cta:hover{filter:brightness(.96);transform:translateY(-1px)}
.tgbiz-shell header .language-toggle{display:flex;gap:2px;border:1px solid var(--tb-border);border-radius:11px;background:var(--tb-surface);padding:3px;box-shadow:none}
.tgbiz-shell header .language-toggle a{border:none;border-radius:8px;box-shadow:none;background:transparent;color:var(--tb-muted);padding:7px 9px;font-size:11px;font-weight:750;white-space:nowrap}
.tgbiz-shell header .language-toggle a.chosen{background:#e6effe;color:#2b62bf}
.tgbiz-shell .theme-toggle{display:flex;align-items:center;gap:7px;border:1px solid var(--tb-border);background:var(--tb-surface);color:var(--tb-text);box-shadow:none;min-height:40px;padding:8px 12px;border-radius:11px;font-size:12px;font-weight:750;white-space:nowrap}
.tgbiz-shell .theme-toggle:hover{background:var(--tb-accent-soft)}
.tgbiz-shell .theme-toggle-icon{color:#c58d28;font-size:15px}
.tgbiz-shell header .account{display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:var(--tb-muted);font-size:11px}
.tgbiz-shell header .account>span{max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tgbiz-shell header .account form{width:auto;max-width:none;margin:0}
.tgbiz-shell header .account button{border:1px solid #f2cbd3;background:#fff3f5;color:#b3334b;padding:10px 12px;font-size:11px;min-height:39px}
.tgbiz-shell .panel,.tgbiz-shell .stat,.tgbiz-shell .workspace-card,.tgbiz-shell .ts-intro,.tgbiz-shell .ts-stage,.tgbiz-shell .guide-block,.tgbiz-shell .bot-summary-card,.tgbiz-shell .catalog-category{background:var(--tb-surface);border:1px solid var(--tb-border);border-radius:var(--tb-radius);box-shadow:var(--tb-shadow);color:var(--tb-text)}
.tgbiz-shell .panel{padding:clamp(17px,2vw,26px);margin-bottom:16px;max-width:none;min-width:0}
.tgbiz-shell .panel p,.tgbiz-shell .muted,.tgbiz-shell .page-lead p,.tgbiz-shell .section-heading p{color:var(--tb-muted);line-height:1.65}
.tgbiz-shell .panel h2,.tgbiz-shell .panel h3,.tgbiz-shell .page-lead h2,.tgbiz-shell .section-heading h2{color:var(--tb-text);font-weight:820;letter-spacing:-.025em;line-height:1.25}
.tgbiz-shell .panel h2{font-size:20px;margin-bottom:12px}.tgbiz-shell .panel h3{font-size:17px}
.tgbiz-shell .page-lead{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;margin:0 0 18px}
.tgbiz-shell .page-lead h2{font-size:24px;margin:5px 0}.tgbiz-shell .page-lead p{max-width:780px;margin:7px 0 0}
.tgbiz-shell .page-actions,.tgbiz-shell .section-actions,.tgbiz-shell .actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.tgbiz-shell .stats,.tgbiz-shell .premium-stats,.tgbiz-shell .ts-cards{gap:12px}
.tgbiz-shell .stats .stat,.tgbiz-shell .premium-stats .stat{min-height:122px;padding:18px!important}
.tgbiz-shell .stat small{font-size:12px;font-weight:650;color:var(--tb-muted);margin-bottom:9px}
.tgbiz-shell .stat strong{font-size:29px!important;letter-spacing:-.045em;color:var(--tb-text)}
.tgbiz-shell .stat a{font-size:11.5px;color:var(--tb-accent);font-weight:750;text-decoration:none}
.tgbiz-shell .dash-intro{padding:24px 27px;margin-bottom:16px;min-height:unset;border:1px solid #d9e6f6;border-radius:20px;background:linear-gradient(111deg,#eef5ff,#f6fbfc 70%,#edfaf7);box-shadow:none;gap:14px;align-items:center}
.tgbiz-shell .dash-intro h2{font-size:clamp(23px,2.3vw,33px);font-weight:850;margin:5px 0 6px;color:var(--tb-text);letter-spacing:-.035em}
.tgbiz-shell .dash-intro p{font-size:13px;max-width:580px;color:#637793;margin:0}
.tgbiz-shell .dash-intro .hero-chips{margin-top:13px;font-size:11px;color:#527092}
.tgbiz-shell .dashboard-columns,.tgbiz-shell .console-grid{gap:15px}
.tgbiz-shell .dashboard-post{border-color:var(--tb-border)}
.tgbiz-shell .quick-links{gap:8px}.tgbiz-shell .quick-links a{border:1px solid var(--tb-border);background:var(--tb-surface-soft);border-radius:13px;padding:11px 13px;color:var(--tb-text)}
.tgbiz-shell .quick-links a:hover{border-color:#acc9f2;background:#eef5ff;transform:translateX(1px)}
.tgbiz-shell .tgbiz-product-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(226px,1fr));gap:13px}
.tgbiz-shell .tgbiz-product-card{display:flex;align-items:flex-start;flex-direction:column;gap:8px;text-decoration:none;min-width:0;min-height:167px;background:var(--tb-surface);border:1px solid var(--tb-border);border-radius:17px;padding:18px;box-shadow:var(--tb-shadow);transition:box-shadow .14s,transform .14s,border-color .14s}
.tgbiz-shell .tgbiz-product-card span{display:grid;place-items:center;font-size:27px;height:45px;width:45px;border-radius:13px;background:#edf3ff;line-height:1}
.tgbiz-shell .tgbiz-product-card b{font-size:15px;color:var(--tb-text);line-height:1.25}
.tgbiz-shell .tgbiz-product-card small{font-size:11.5px;color:var(--tb-muted);line-height:1.45}
.tgbiz-shell .tgbiz-product-card:hover{border-color:#9ec8ec;box-shadow:0 14px 34px #284b8b13;transform:translateY(-2px)}
.tgbiz-shell .tgbiz-product-card.is-planned{opacity:.76;background:#fbfcfe}.tgbiz-shell .tgbiz-product-card.is-planned small{color:#936e29}
.tgbiz-shell .bot-workspace-grid{gap:12px}.tgbiz-shell .workspace-card{padding:18px;min-height:130px}
.tgbiz-shell .workspace-card h3{margin:0 0 8px;overflow-wrap:anywhere}
.tgbiz-shell .workspace-card p{margin:4px 0 12px}
.tgbiz-shell .studio-kind-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px;margin:15px 0 19px}
.tgbiz-shell .studio-kind-step{display:flex;padding:11px;background:var(--tb-surface-soft);border:1px solid var(--tb-border);border-radius:12px;font-size:12px;min-height:51px}
.tgbiz-shell .studio-kind-step b{background:#e3edff;color:#286bce;border-radius:8px}
.tgbiz-shell .studio-kind-create{background:var(--tb-surface-soft);padding:18px;border:1px solid var(--tb-border);border-radius:15px;max-width:790px}
.tgbiz-shell .ts-intro{padding:20px 23px;margin:0 0 14px}
.tgbiz-shell .ts-intro h2{font-size:24px;margin:4px 0 8px}
.tgbiz-shell .ts-stepper{gap:9px;margin:12px 0 17px;overflow-x:auto;padding:3px 2px 9px}
.tgbiz-shell .ts-step{min-height:42px;border:1px solid var(--tb-border);background:var(--tb-surface);border-radius:11px;color:var(--tb-muted);padding:10px 12px;font-size:12px;font-weight:750}
.tgbiz-shell .ts-step.current{background:var(--tb-accent-soft);border-color:#abc7f6;color:#275fbe}
.tgbiz-shell .ts-cards article{background:var(--tb-surface-soft);border:1px solid var(--tb-border);border-radius:15px;box-shadow:none;padding:19px}
.tgbiz-shell .ts-cards strong{color:var(--tb-text);font-size:26px}
.tgbiz-shell form{max-width:100%;min-width:0;gap:12px}
.tgbiz-shell label{color:var(--tb-text);font-size:12px;font-weight:720;line-height:1.5}
.tgbiz-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),.tgbiz-shell select,.tgbiz-shell textarea{background:var(--tb-surface);border:1px solid #d6e0ed;color:var(--tb-text);border-radius:10px;padding:11px 12px;min-height:42px;max-width:100%;box-shadow:none}
.tgbiz-shell textarea{line-height:1.55}.tgbiz-shell input[type=checkbox],.tgbiz-shell input[type=radio]{accent-color:var(--tb-accent)}
.tgbiz-shell input:focus-visible,.tgbiz-shell textarea:focus-visible,.tgbiz-shell select:focus-visible,.tgbiz-shell button:focus-visible,.tgbiz-shell a:focus-visible,.tgbiz-shell summary:focus-visible{outline:3px solid #8fb9ff;outline-offset:2px}
.tgbiz-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]):focus,.tgbiz-shell textarea:focus,.tgbiz-shell select:focus{border-color:#78a8ec;box-shadow:0 0 0 3px #dbeaff}
.tgbiz-shell button,.tgbiz-shell .linkbtn,.tgbiz-shell a.primary,.tgbiz-shell a.secondary,.tgbiz-shell a.ghost{font-family:inherit;max-width:100%;border-radius:10px;font-weight:750;line-height:1.35;overflow-wrap:anywhere;transition:background .15s,transform .15s}
.tgbiz-shell button.primary,.tgbiz-shell .primary:not(.nav),.tgbiz-shell .linkbtn.primary{background:linear-gradient(100deg,#3978e8,#2cb6aa);color:white;border:0}
.tgbiz-shell button.primary:hover,.tgbiz-shell .primary:hover{filter:brightness(.94)}
.tgbiz-shell button.secondary,.tgbiz-shell .secondary:not(.nav),.tgbiz-shell .linkbtn.secondary{background:#edf4ff;color:#2361bb;border:1px solid #d6e4fb}
.tgbiz-shell button.ghost,.tgbiz-shell .ghost:not(.nav),.tgbiz-shell .linkbtn.ghost{background:#f2f5fa;color:#445671;border:1px solid var(--tb-border)}
.tgbiz-shell button.danger,.tgbiz-shell .danger{background:#fff1f3;color:#b5344c;border:1px solid #f6cdd3}
.tgbiz-shell button:disabled,.tgbiz-shell .disabled{opacity:.55;cursor:not-allowed}
.tgbiz-shell .tablewrap,.tgbiz-shell .table-wrap{max-width:100%;overflow-x:auto;border:1px solid var(--tb-border);border-radius:13px;background:var(--tb-surface)}
.tgbiz-shell table{border-collapse:collapse;width:100%;font-size:12.5px;max-width:100%;color:var(--tb-text)}
.tgbiz-shell th{background:#f8faff;color:#667890;text-transform:none;letter-spacing:0;font-weight:800;font-size:11px;white-space:nowrap}
.tgbiz-shell td,.tgbiz-shell th{padding:12px 13px;border-bottom:1px solid var(--tb-border)}
.tgbiz-shell tr:last-child td{border-bottom:none}
.tgbiz-shell td{overflow-wrap:anywhere}
.tgbiz-shell .pill,.tgbiz-shell .status-pill{display:inline-flex;align-items:center;border:1px solid #d9e5fa;border-radius:999px;background:#eff5ff;color:#3467bb;font-size:11px;font-weight:750;padding:4px 10px;white-space:normal}
.tgbiz-shell .alert,.tgbiz-shell .publishing-alert{background:#eefaf4;color:#167243;border:1px solid #bde6cc;border-radius:13px;padding:12px 16px}
.tgbiz-shell .alert.error{background:#fff1f2;color:#ad2d48;border-color:#f5c7d0}
.tgbiz-shell .empty-state,.tgbiz-shell .ts-empty{border:1px dashed #c7d5e8;border-radius:16px;padding:22px;background:var(--tb-surface-soft);text-align:center}
.tgbiz-shell .item,.tgbiz-shell .ts-request{border-color:var(--tb-border)}
.tgbiz-shell .dashboard-tile:not(.tgbiz-product-card),.tgbiz-shell .quick-links a,.tgbiz-shell .channel-card,.tgbiz-shell .post-card{border-radius:14px;box-shadow:none}
.tgbiz-shell .dashboard-tile:not(.tgbiz-product-card){background:var(--tb-surface-soft);border:1px solid var(--tb-border);color:var(--tb-text);min-width:0}
.tgbiz-shell .dashboard-tile:not(.tgbiz-product-card):hover{background:#f0f6ff;border-color:#adc9ee}
.tgbiz-shell .panel details:not(.tgbiz-nav-fold){border-radius:11px;max-width:100%}
.tgbiz-shell code{overflow-wrap:anywhere}
.tgbiz-shell .mobile-menu-toggle{display:none}
/* Guest login/register shares the same visual language. */
.tgbiz-guest main#main-content{color:var(--tb-text);background:var(--tb-bg)}
.tgbiz-guest .guest-brand-link,.tgbiz-guest .guest-brand-link strong{color:var(--tb-text)}
.tgbiz-guest main#main-content>section.panel.auth{border-radius:21px;box-shadow:0 18px 50px #31528b13;background:var(--tb-surface);border:1px solid var(--tb-border)}
.tgbiz-guest .guest-brand-link>span{background:linear-gradient(120deg,#3978e8,#2cb6aa)}
/* Dark alternative with explicit, readable contrast for shared legacy widgets. */
html[data-ui-theme="dark"]{color-scheme:dark;--tb-bg:#0c1525;--tb-sidebar:#101c2d;--tb-surface:#152239;--tb-surface-soft:#1b2b43;--tb-text:#edf3ff;--tb-muted:#a7b6cd;--tb-border:#2b405d;--tb-accent:#76a6ff;--tb-accent-hover:#82b4ff;--tb-accent-soft:#203959;--tb-positive:#69d2a5;--tb-danger:#ff8fa1;--tb-shadow:0 11px 26px #0000001f}
html[data-ui-theme="dark"] .tgbiz-shell #site-nav .tgbiz-nav-link{color:#bac9de}
html[data-ui-theme="dark"] .tgbiz-shell #site-nav .tgbiz-nav-link:hover,html[data-ui-theme="dark"] .tgbiz-shell #site-nav .tgbiz-nav-link.active{background:#223b5d;color:#e9f3ff}
html[data-ui-theme="dark"] .tgbiz-shell #site-nav .tgbiz-nav-link .nav-icon{background:#253d5b;color:#b7d2f4}
html[data-ui-theme="dark"] .tgbiz-shell header .account button{background:#392638;border-color:#663b51;color:#ffc1cc}
html[data-ui-theme="dark"] .tgbiz-shell .tgbiz-current-bot{background:#18354d;border-color:#365171}
html[data-ui-theme="dark"] .tgbiz-shell .tgbiz-nav-fold>summary:hover{background:#223550}
html[data-ui-theme="dark"] .tgbiz-shell .dash-intro{background:linear-gradient(115deg,#203957,#183447);border-color:#345473}
html[data-ui-theme="dark"] .tgbiz-shell .dash-intro p{color:#b7c8dc}
html[data-ui-theme="dark"] .tgbiz-shell .studio-kind-step b,html[data-ui-theme="dark"] .tgbiz-shell header .language-toggle a.chosen{background:#2d4b72;color:#cce0ff}
html[data-ui-theme="dark"] .tgbiz-shell .tgbiz-product-card span{background:#253c60}
html[data-ui-theme="dark"] .tgbiz-shell .tgbiz-product-card.is-planned{background:#1a283e}
html[data-ui-theme="dark"] .tgbiz-shell .quick-links a:hover,html[data-ui-theme="dark"] .tgbiz-shell .dashboard-tile:hover{background:#253c5b}
html[data-ui-theme="dark"] .tgbiz-shell button.secondary,html[data-ui-theme="dark"] .tgbiz-shell .secondary:not(.nav),html[data-ui-theme="dark"] .tgbiz-shell .linkbtn.secondary{background:#233e61;color:#d4e6ff;border-color:#3e628b}
html[data-ui-theme="dark"] .tgbiz-shell button.ghost,html[data-ui-theme="dark"] .tgbiz-shell .ghost:not(.nav){background:#23334a;color:#d5e2f5}
html[data-ui-theme="dark"] .tgbiz-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),html[data-ui-theme="dark"] .tgbiz-shell select,html[data-ui-theme="dark"] .tgbiz-shell textarea{border-color:#39516f;background:#111f33;color:#eef5ff}
html[data-ui-theme="dark"] .tgbiz-shell th{background:#1e3049;color:#bfcee1}
html[data-ui-theme="dark"] .tgbiz-shell .pill,html[data-ui-theme="dark"] .tgbiz-shell .status-pill{background:#253d5e;border-color:#3e5e82;color:#c8ddfc}
html[data-ui-theme="dark"] .tgbiz-shell .scenario-preview,html[data-ui-theme="dark"] .tgbiz-shell .info-list,html[data-ui-theme="dark"] .tgbiz-shell .ts-empty,html[data-ui-theme="dark"] .tgbiz-shell .flow-transfer-preview,html[data-ui-theme="dark"] .tgbiz-shell .flow-transfer-diff,html[data-ui-theme="dark"] .tgbiz-shell .flow-snapshot-preview,html[data-ui-theme="dark"] .tgbiz-shell .flow-restore-preview,html[data-ui-theme="dark"] .tgbiz-shell .platform-chat-log{background:var(--tb-surface-soft);border-color:var(--tb-border);color:var(--tb-text)}
html[data-ui-theme="dark"] .tgbiz-shell .panel p,html[data-ui-theme="dark"] .tgbiz-shell .muted{color:#b5c4d9}
html[data-ui-theme="dark"] .tgbiz-shell a:not(.primary):not(.nav){color:var(--tb-accent)}
html[data-ui-theme="dark"] .tgbiz-shell .tgbiz-product-card b,html[data-ui-theme="dark"] .tgbiz-shell .workspace-card h3{color:var(--tb-text)}
html[data-ui-theme="dark"] .tgbiz-guest main#main-content>section.panel.auth{background:var(--tb-surface);color:var(--tb-text)}
/* Tablet and narrow screens */
@media(max-width:1100px){
 .tgbiz-shell #site-nav{width:226px;min-width:226px}
 .tgbiz-shell main#main-content{width:calc(100% - 226px);padding:20px 18px 58px}
 .tgbiz-shell header .account>span{display:none}
 .tgbiz-shell .stats,.tgbiz-shell .premium-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:850px){
 .tgbiz-shell .app{display:flex}
 .tgbiz-shell #site-nav{position:fixed;left:0;top:0;bottom:0;width:min(310px,87vw);min-width:0;height:100dvh;transform:translateX(-105%);transition:transform .23s ease;z-index:75;box-shadow:8px 0 32px #1727441a}
 .tgbiz-shell.menu-open #site-nav{transform:translateX(0)}
 .tgbiz-shell main#main-content{width:100%;margin:0;padding:14px 14px 56px;max-width:none}
 .tgbiz-shell main>header.tgbiz-topbar{padding:12px 0 15px;gap:8px;margin:0 0 10px}
 .tgbiz-shell .mobile-menu-toggle{display:grid;place-items:center;width:41px;min-width:41px;height:41px;padding:0;background:var(--tb-surface);border:1px solid var(--tb-border);border-radius:10px;color:var(--tb-text);font-size:21px;order:-1}
 .tgbiz-shell header .header-heading{flex:1;min-width:125px;order:0}
 .tgbiz-shell header h1{font-size:21px}
 .tgbiz-shell header .header-create{order:1}
 .tgbiz-shell header .theme-toggle,.tgbiz-shell header .language-toggle,.tgbiz-shell header .account{order:2}
 .tgbiz-shell .mobile-nav-backdrop:not([hidden]){display:block;position:fixed;inset:0;background:#0511249c;z-index:70}
 .tgbiz-shell .panel{padding:17px}
 .tgbiz-shell .tgbiz-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .tgbiz-shell main#main-content{padding:12px 10px 50px}
 .tgbiz-shell main>header.tgbiz-topbar{gap:6px}
 .tgbiz-shell header .header-heading{flex:1 1 calc(100% - 70px);max-width:calc(100% - 55px)}
 .tgbiz-shell header h1{font-size:20px}
 .tgbiz-shell header .eyebrow{font-size:9px}
 .tgbiz-shell header .header-create{flex:1 1 100px;max-width:none;order:4}
 .tgbiz-shell header .header-create span{display:inline}
 .tgbiz-shell header .theme-toggle{flex:1;justify-content:center;order:4}
 .tgbiz-shell header .language-toggle{order:4}
 .tgbiz-shell header .account{order:4;margin-left:auto}
 .tgbiz-shell header .theme-toggle-label{font-size:11px}
 .tgbiz-shell .dash-intro{padding:20px 18px;display:block}
 .tgbiz-shell .dash-intro .hero-cta{display:flex;margin-top:15px;width:100%}
 .tgbiz-shell .stats,.tgbiz-shell .premium-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .tgbiz-shell .stat{min-height:113px!important;padding:13px!important}
 .tgbiz-shell .stat strong{font-size:25px!important}
 .tgbiz-shell .tgbiz-product-grid{grid-template-columns:1fr}
 .tgbiz-shell .tgbiz-product-card{min-height:128px}
 .tgbiz-shell .studio-kind-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
 .tgbiz-shell .page-lead h2{font-size:22px}
 .tgbiz-shell .ts-stepper{display:flex;flex-wrap:nowrap}
 .tgbiz-shell .ts-step{flex:0 0 auto;white-space:nowrap}
 .tgbiz-shell .tablewrap{max-width:calc(100vw - 24px)}
}
@media(prefers-reduced-motion:reduce){.tgbiz-shell *{scroll-behavior:auto;transition:none!important;animation:none!important}}
/* Final integration fixes for legacy .logo span and dashboard CTA selectors. */
.tgbiz-shell #site-nav .logo span:not(.logo-mark){background:transparent!important;box-shadow:none;color:var(--tb-text);border:0;padding:0;margin:0}
.tgbiz-shell #site-nav .logo .logo-mark{background:linear-gradient(135deg,#3978e8,#2bb5aa)!important;color:#fff;box-shadow:0 9px 17px #2d87bf29;padding:0;margin:0}
.tgbiz-shell .dash-intro a.hero-cta.primary.linkbtn{background:linear-gradient(100deg,#3978e8,#2bb6a9);color:#fff!important;border:0;box-shadow:0 8px 18px #2f7bc829}
.tgbiz-shell .tgbiz-product-card small{text-align:left!important}
.tgbiz-shell .tgbiz-product-card span{margin:0;align-self:flex-start}
@media(max-width:850px){.tgbiz-shell #site-nav{transition:none}}
/* Legacy dashboard author rule marks .hero-cta !important; override intentionally. */
.tgbiz-shell .dash-intro a.hero-cta.primary.linkbtn{background:linear-gradient(100deg,#3978e8,#2bb6a9)!important;color:#fff!important}
.tgbiz-guest main>header.tgbiz-topbar{background:transparent;border:0;box-shadow:none;gap:9px;display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.tgbiz-guest .theme-toggle{background:var(--tb-surface);border:1px solid var(--tb-border);color:var(--tb-text);border-radius:10px;min-height:40px;padding:9px 11px;font-weight:750;display:inline-flex;gap:7px;align-items:center}
.tgbiz-guest .theme-toggle-icon{color:#ce952f}
.tgbiz-guest .primary{background:linear-gradient(100deg,#3978e8,#2bb6a9);color:white}
html[data-ui-theme="dark"] .tgbiz-guest main#main-content{color:var(--tb-text)}
/* High-contrast polish for alternate dark theme. */
.tgbiz-shell header a.header-create{color:#fff!important}
html[data-ui-theme="dark"] .tgbiz-shell header .account{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;color:var(--tb-muted)}
html[data-ui-theme="dark"] .tgbiz-shell .stat a{color:#95beff}
html[data-ui-theme="dark"] .tgbiz-shell .tgbiz-product-card.is-planned small{color:#e5bc74}
html[data-ui-theme="dark"] .tgbiz-shell .tgbiz-side-help strong{color:var(--tb-text)}
