/* TS WhatsApp 13.0.8 | SaaS Design System
   Deliberately scoped. Last loaded to preserve legacy CRM behavior and avoid
   removing styles that real modules still depend on. */
html[data-theme="light"]{
  color-scheme:light;
  --studio-bg:#f4f7fb;--studio-paper:#fff;--studio-tint:#f8fafd;
  --studio-wash:#ecf2ff;--studio-ink:#172640;--studio-sub:#667994;
  --studio-line:#e4eaf3;--studio-line-strong:#d5dfed;
  --studio-accent:#3563e9;--studio-accent-hi:#254fd3;
  --studio-good:#078e6d;--studio-menu:#fff;
  --studio-shadow:0 12px 30px rgba(27,50,91,.045);
  --studio-side:#fff;--studio-hover:#f0f5ff;
  --studio-selected:#eaf1ff;--studio-icon:#72819a;
  --studio-ring:rgba(53,99,233,.16);--studio-positive-bg:#e7f8f2;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --studio-bg:#0b1423;--studio-paper:#142239;--studio-tint:#182b44;
  --studio-wash:#213b63;--studio-ink:#edf4ff;--studio-sub:#9cafcb;
  --studio-line:#293d59;--studio-line-strong:#3b5273;
  --studio-accent:#8cafff;--studio-accent-hi:#b2c8ff;
  --studio-good:#40d6ab;--studio-menu:#162640;
  --studio-shadow:0 15px 38px rgba(0,0,0,.14);
  --studio-side:#111d30;--studio-hover:#1a2f4d;
  --studio-selected:#22395e;--studio-icon:#8ea7ca;
  --studio-ring:rgba(140,175,255,.14);--studio-positive-bg:#143c36;
}
html[data-theme] body.ts-studio{
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:13px!important;line-height:1.48!important;
  background:var(--studio-bg)!important;color:var(--studio-ink)!important;
  -webkit-font-smoothing:antialiased;
}
html[data-theme] body.ts-studio .workspace,
html[data-theme] body.ts-studio .app-shell,
html[data-theme] body.ts-studio .content{background:var(--studio-bg)!important;color:var(--studio-ink)!important}
html[data-theme] body.ts-studio .content{padding:22px 24px 38px!important;max-width:100%!important}
html[data-theme] body.ts-studio .studio-page-heading{display:none!important}

/* Sidebar — uncluttered identity, even alignment, visually distinct active item */
@media(min-width:981px){
  html body.ts-studio:not(.sidebar-collapsed) .app-shell{grid-template-columns:252px minmax(0,1fr)!important}
  html body.ts-studio:not(.sidebar-collapsed) .app-shell>.sidebar{width:252px!important;max-width:252px!important}
  html body.ts-studio.sidebar-collapsed .app-shell{grid-template-columns:84px minmax(0,1fr)!important}
  html body.ts-studio.sidebar-collapsed .app-shell>.sidebar{width:84px!important;max-width:84px!important}
}
html[data-theme] body.ts-studio .app-shell>.sidebar{
  background:var(--studio-side)!important;color:var(--studio-ink)!important;
  border-right:1px solid var(--studio-line)!important;
  padding:0!important;box-shadow:none!important;
}
html[data-theme] body.ts-studio .studio-brandbar{
  display:flex!important;min-height:83px!important;margin:0!important;
  align-items:center!important;padding:17px 18px!important;
  border-bottom:1px solid var(--studio-line)!important;
  background:transparent!important;
}
html[data-theme] body.ts-studio .studio-brandbar .brand{display:flex!important;align-items:center!important;gap:11px!important;min-width:0!important;text-decoration:none!important}
html[data-theme] body.ts-studio .studio-brandbar .brand-mark{
  width:42px!important;height:42px!important;min-width:42px!important;
  background:linear-gradient(135deg,#6483fa,#3152d9)!important;
  border:1px solid rgba(255,255,255,.13)!important;border-radius:13px!important;
  box-shadow:0 8px 18px rgba(50,82,218,.2)!important;
}
html[data-theme] body.ts-studio .studio-brandbar .brand-copy b{font-size:14px!important;letter-spacing:-.2px!important;color:var(--studio-ink)!important}
html[data-theme] body.ts-studio .studio-brandbar .brand-copy span{font-size:10.5px!important;color:var(--studio-sub)!important;letter-spacing:.04em!important}
html[data-theme] body.ts-studio .studio-space-label{
  margin:16px 15px 4px!important;padding:11px 12px!important;min-height:45px!important;
  border-radius:12px!important;background:var(--studio-tint)!important;
  border:1px solid var(--studio-line)!important;color:var(--studio-ink)!important;
  font-size:11.5px!important;
}
html[data-theme] body.ts-studio .sidebar-scroll{
  padding:9px 12px 16px!important;gap:7px!important;
  scrollbar-color:var(--studio-line-strong) transparent!important;
}
html[data-theme] body.ts-studio .studio-nav-section>.sidebar-label{
  margin:17px 12px 8px!important;padding:0!important;
  font-size:9px!important;font-weight:800!important;
  letter-spacing:.15em!important;color:var(--studio-sub)!important;opacity:.8;
}
html[data-theme] body.ts-studio .side-nav{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:4px!important}
html[data-theme] body.ts-studio .side-nav .nav-item{
  display:flex!important;align-items:center!important;min-height:43px!important;
  gap:11px!important;padding:10px 12px!important;margin:0!important;
  color:var(--studio-sub)!important;background:transparent!important;
  border:1px solid transparent!important;border-radius:11px!important;
  box-shadow:none!important;font-size:12.5px!important;font-weight:600!important;
  transition:background .15s,border-color .15s,color .15s!important;
}
html[data-theme] body.ts-studio .side-nav .nav-item:hover{
  background:var(--studio-hover)!important;color:var(--studio-ink)!important;
}
html[data-theme] body.ts-studio .side-nav .nav-item.active{
  background:var(--studio-selected)!important;color:var(--studio-accent)!important;
  border-color:color-mix(in srgb,var(--studio-accent) 16%,transparent)!important;
  font-weight:760!important;box-shadow:none!important;
}
html[data-theme] body.ts-studio .side-nav .nav-item.active::before{display:none!important}
html[data-theme] body.ts-studio .side-nav .nav-icon,
html[data-theme] body.ts-studio .sidebar-width-toggle .nav-icon{
  color:inherit!important;display:grid!important;place-items:center!important;
  width:19px!important;height:19px!important;min-width:19px!important;flex:0 0 19px!important;
}
html[data-theme] body.ts-studio .side-nav .nav-icon svg{
  width:19px!important;height:19px!important;stroke-width:1.8!important;
}
html[data-theme] body.ts-studio .side-nav .nav-badge{
  margin-left:auto!important;min-width:21px!important;height:21px!important;
  background:var(--studio-selected)!important;color:var(--studio-accent)!important;
  font-size:10px!important;font-weight:800!important;box-shadow:none!important;
}
html[data-theme] body.ts-studio .studio-sidebar-footer{
  background:var(--studio-side)!important;border-top:1px solid var(--studio-line)!important;
  display:flex!important;flex-direction:column!important;gap:8px!important;
  padding:12px!important;
}
html[data-theme] body.ts-studio .cloud-status{
  min-height:45px!important;padding:10px!important;margin:0!important;
  background:var(--studio-tint)!important;border:1px solid var(--studio-line)!important;
  border-radius:11px!important;
}
html[data-theme] body.ts-studio .cloud-status b{color:var(--studio-ink)!important}
html[data-theme] body.ts-studio .cloud-status small{color:var(--studio-sub)!important}
html[data-theme] body.ts-studio .sidebar-width-toggle{
  width:100%!important;min-height:40px!important;border-radius:11px!important;
  display:flex!important;align-items:center!important;gap:12px!important;
  padding:8px 11px!important;color:var(--studio-sub)!important;
  background:transparent!important;border:1px solid transparent!important;
}
html[data-theme] body.ts-studio .sidebar-width-toggle:hover{
  background:var(--studio-hover)!important;color:var(--studio-ink)!important;
}
html[data-theme] body.ts-studio .logout-text-link{
  min-height:41px!important;width:100%!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  border:1px solid rgba(235,87,104,.19)!important;
  background:rgba(226,66,86,.06)!important;
  color:#d64c5d!important;border-radius:11px!important;
  text-decoration:none!important;padding:9px 11px!important;
  font-size:12px!important;font-weight:760!important;
}
html[data-theme="dark"] body.ts-studio .logout-text-link{color:#ff9ca7!important;background:rgba(223,83,105,.075)!important;border-color:rgba(255,139,157,.18)!important}
html[data-theme] body.ts-studio .logout-text-link:hover{background:rgba(233,67,86,.14)!important}
@media(min-width:981px){
  html body.ts-studio.sidebar-collapsed .studio-brandbar{justify-content:center!important;padding:17px 8px!important}
  html body.ts-studio.sidebar-collapsed .studio-brandbar .brand{display:flex!important;justify-content:center!important;width:100%!important}
  html body.ts-studio.sidebar-collapsed .studio-brandbar .brand-mark{width:42px!important;min-width:42px!important;height:42px!important}
  html body.ts-studio.sidebar-collapsed .sidebar-scroll{padding:12px 11px!important}
  html body.ts-studio.sidebar-collapsed .side-nav .nav-item{
    justify-content:center!important;width:100%!important;min-height:44px!important;padding:0!important;
  }
  html body.ts-studio.sidebar-collapsed .sidebar .studio-sidebar-footer{padding:10px 8px!important}
  html body.ts-studio.sidebar-collapsed .sidebar .sidebar-width-toggle{min-height:41px!important;justify-content:center!important;padding:0!important}
  html body.ts-studio.sidebar-collapsed .sidebar .logout-text-link{
    justify-content:center!important;padding:8px 2px!important;min-height:41px!important;
  }
  html body.ts-studio.sidebar-collapsed .sidebar .logout-text-link .nav-label{
    display:block!important;opacity:1!important;visibility:visible!important;
    font-size:11px!important;color:inherit!important;
  }
}

/* Header: considered spacing, prominent search, long business names. */
html[data-theme] body.ts-studio .topbar{
  height:70px!important;min-height:70px!important;
  background:var(--studio-paper)!important;border-bottom:1px solid var(--studio-line)!important;
  padding:0 23px!important;gap:15px!important;box-shadow:none!important;
}
html[data-theme] body.ts-studio .breadcrumb strong{font-size:13px!important;font-weight:800!important;color:var(--studio-ink)!important}
html[data-theme] body.ts-studio .breadcrumb-eyebrow{font-size:10px!important;color:var(--studio-sub)!important}
html[data-theme] body.ts-studio .topbar>.v2-command-open{
  min-height:40px!important;height:40px!important;margin:0!important;
  border-radius:11px!important;padding:0 12px!important;
  background:var(--studio-tint)!important;color:var(--studio-sub)!important;
  border:1px solid var(--studio-line)!important;
  font-size:11px!important;font-weight:650!important;
}
html[data-theme] body.ts-studio .topbar>.v2-command-open:hover{background:var(--studio-wash)!important;color:var(--studio-ink)!important}
html[data-theme] body.ts-studio .studio-topbar-center{min-width:0!important}
html[data-theme] body.ts-studio .studio-topbar-center .topbar-search{max-width:560px!important;width:100%!important}
html[data-theme] body.ts-studio .topbar-search form{height:43px!important;min-height:43px!important}
html[data-theme] body.ts-studio .topbar-search form input[type=search]{
  height:43px!important;min-height:43px!important;width:100%!important;
  background:var(--studio-tint)!important;color:var(--studio-ink)!important;
  border:1px solid var(--studio-line-strong)!important;
  border-radius:11px!important;padding:0 46px!important;font-size:12.5px!important;
}
html[data-theme] body.ts-studio .topbar-search form input[type=search]:focus{outline:none!important;box-shadow:0 0 0 3px var(--studio-ring)!important;border-color:var(--studio-accent)!important}
html[data-theme] body.ts-studio .topbar-right{gap:11px!important}
html[data-theme] body.ts-studio .workspace-switcher,
html[data-theme] body.ts-studio .workspace-static{
  min-width:286px!important;max-width:355px!important;width:308px!important;
  height:43px!important;min-height:43px!important;
  background:var(--studio-tint)!important;border:1px solid var(--studio-line)!important;
  border-radius:11px!important;padding:4px 13px!important;
}
html[data-theme] body.ts-studio .workspace-switcher select{
  flex:1 1 auto!important;width:100%!important;min-width:0!important;
  height:33px!important;min-height:33px!important;
  font-size:11.5px!important;font-weight:760!important;
  color:var(--studio-ink)!important;background:transparent!important;
  text-align:center!important;text-align-last:center!important;
  cursor:pointer!important;
}
html[data-theme] body.ts-studio .workspace-switcher::after{color:var(--studio-sub)!important;font-size:13px!important}
html[data-theme] body.ts-studio .notif-chip{
  flex:0 0 43px!important;width:43px!important;height:43px!important;
  border:1px solid var(--studio-line)!important;border-radius:11px!important;
  background:var(--studio-paper)!important;color:var(--studio-sub)!important;
}
html[data-theme] body.ts-studio .account-trigger{
  height:43px!important;min-height:43px!important;
  border:1px solid var(--studio-line)!important;background:var(--studio-paper)!important;
  border-radius:11px!important;padding:5px 10px 5px 5px!important;
  color:var(--studio-ink)!important;
}
html[data-theme] body.ts-studio .account-trigger .user-copy b{font-size:11.5px!important;color:var(--studio-ink)!important}
html[data-theme] body.ts-studio .account-trigger .user-copy span{font-size:10px!important;color:var(--studio-sub)!important}
html[data-theme] body.ts-studio .account-dropdown,
html[data-theme] body.ts-studio .v2-palette-dialog{border:1px solid var(--studio-line)!important;border-radius:16px!important;box-shadow:0 18px 50px rgba(0,0,0,.15)!important}

/* Reusable SaaS panel system across all modules */
html[data-theme] body.ts-studio .content :is(
.card,.panel,.section,.content-card,.module-card,.provider-section,.table-card,
.stat-card,.stats-card,.studio-module-intro,.studio-ai-numbers,.ai-bot-card,
.ai-bot-accordion,.workspace-summary-hero,.studio-dashboard-overview .dashboard-attention-tiles a,
.studio-broadcast .bc-form-card,.studio-broadcast .bc-preview-card,.studio-contacts-toolbar,
.contact-search-shell,.studio-device-list,.account-scope-card,.studio-flow-steps
){
  border:1px solid var(--studio-line)!important;
  background:var(--studio-paper)!important;
  color:var(--studio-ink)!important;border-radius:16px!important;
  box-shadow:var(--studio-shadow)!important;
}
html[data-theme] body.ts-studio .content :is(.card,.panel,.content-card,.module-card,.table-card,.provider-section){padding:20px!important}
html[data-theme] body.ts-studio .content :is(h1,h2,h3,h4,h5,h6){color:var(--studio-ink)!important;letter-spacing:-.025em!important;line-height:1.25!important}
html[data-theme] body.ts-studio .content :is(h2,h3){font-weight:780!important}
html[data-theme] body.ts-studio .content :is(.muted,.subtext,.hint,.eyebrow,.stat-label,.description){color:var(--studio-sub)!important}
html[data-theme] body.ts-studio .content :is(.studio-module-intro,.workspace-summary-hero){padding:23px 26px!important;margin-bottom:18px!important}
html[data-theme] body.ts-studio .studio-module-intro strong{font-size:20px!important;font-weight:780!important;letter-spacing:-.035em!important}
html[data-theme] body.ts-studio .studio-module-intro p{font-size:12.5px!important;line-height:1.6!important;color:var(--studio-sub)!important}
html[data-theme] body.ts-studio .content :is(.stat-number,.dashboard-attention-tiles a b){font-size:26px!important;font-weight:830!important;letter-spacing:-.055em!important}
html[data-theme] body.ts-studio .stats-grid{gap:13px!important}
html[data-theme] body.ts-studio .dashboard-attention-tiles{gap:13px!important}
html[data-theme] body.ts-studio .dashboard-attention-tiles a{padding:20px!important;border-radius:15px!important}
html[data-theme] body.ts-studio .dashboard-attention-tiles a:hover{border-color:var(--studio-accent)!important;transform:translateY(-1px)!important}

/* Interactive elements: shared geometry */
html[data-theme] body.ts-studio .content :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),select,textarea){
  background:var(--studio-tint)!important;
  color:var(--studio-ink)!important;
  border:1px solid var(--studio-line-strong)!important;
  border-radius:11px!important;
  box-shadow:none!important;
  font-size:12.5px!important;
  min-height:42px!important;
}
html[data-theme] body.ts-studio .content :is(input,select,textarea):focus{border-color:var(--studio-accent)!important;box-shadow:0 0 0 3px var(--studio-ring)!important}
html[data-theme] body.ts-studio .content :is(input,textarea)::placeholder{color:var(--studio-sub)!important;opacity:1!important}
html[data-theme] body.ts-studio .content :is(button,.btn,input[type=submit]){
  min-height:40px!important;border-radius:10px!important;
  font-size:12px!important;font-weight:720!important;
}
html[data-theme] body.ts-studio .content :is(.btn.ghost,.btn.secondary,button.secondary,button.ghost){
  border:1px solid var(--studio-line-strong)!important;
  background:var(--studio-tint)!important;
  color:var(--studio-ink)!important;
}
html[data-theme] body.ts-studio .content .btn:not(.ghost):not(.secondary),
html[data-theme] body.ts-studio .studio-action-primary{
  background:#3563e9!important;color:#fff!important;
  border-color:#3563e9!important;
}
html[data-theme] body.ts-studio .content .btn:not(.ghost):not(.secondary):hover{background:#244fc8!important}
html[data-theme] body.ts-studio .content :is(label,.form-label){font-weight:660!important;color:var(--studio-ink)!important}
html[data-theme] body.ts-studio .content table{
  width:100%!important;font-size:12px!important;border-collapse:separate!important;border-spacing:0!important;
}
html[data-theme] body.ts-studio .content :is(.table-wrap,.table-responsive){border:1px solid var(--studio-line)!important;border-radius:13px!important;background:var(--studio-paper)!important;overflow:auto!important}
html[data-theme] body.ts-studio .content table th{
  background:var(--studio-tint)!important;
  color:var(--studio-sub)!important;
  font-size:10.5px!important;letter-spacing:.035em!important;
  font-weight:790!important;text-transform:uppercase!important;
  padding:14px 16px!important;border-bottom:1px solid var(--studio-line)!important;
}
html[data-theme] body.ts-studio .content table td{
  background:var(--studio-paper)!important;color:var(--studio-ink)!important;
  font-size:12px!important;padding:13px 16px!important;
  border-bottom:1px solid var(--studio-line)!important;
}
html[data-theme] body.ts-studio .content table tbody tr:hover td{background:var(--studio-tint)!important}

/* Inbox: practical density and clean panes. No change to messaging logic. */
html[data-theme] body.ts-studio.page-inbox .content{padding:16px 21px 26px!important}
html[data-theme] body.ts-studio.page-inbox .studio-inbox-account{
  padding:14px 17px!important;margin-bottom:15px!important;
  background:var(--studio-paper)!important;border:1px solid var(--studio-line)!important;
  border-radius:15px!important;box-shadow:var(--studio-shadow)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox{
  border-radius:16px!important;border:1px solid var(--studio-line)!important;
  box-shadow:var(--studio-shadow)!important;background:var(--studio-paper)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-v2-rail{
  background:var(--studio-tint)!important;border-right:1px solid var(--studio-line)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-v2-list-panel,
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-v2-main{
  background:var(--studio-paper)!important;color:var(--studio-ink)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-list-head{
  min-height:76px!important;height:76px!important;
  border-bottom:1px solid var(--studio-line)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-list-head h2{font-size:16px!important}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-view-link{
  border-radius:10px!important;min-height:37px!important;font-size:11.5px!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-view-link.active{
  background:var(--studio-selected)!important;color:var(--studio-accent)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-conversation{
  background:var(--studio-paper)!important;border-bottom:1px solid var(--studio-line)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-conversation:hover,
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-conversation.active{
  background:var(--studio-hover)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-row-link{
  min-height:73px!important;padding:11px 13px!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-avatar{
  width:41px!important;height:41px!important;min-width:41px!important;
  border-radius:13px!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-row-title b{font-size:12.5px!important}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-row-preview{font-size:11px!important;color:var(--studio-sub)!important}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-v2-empty{
  background:radial-gradient(circle at 50% 45%,var(--studio-wash),transparent 43%)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-v2-empty h2{font-size:21px!important}
html[data-theme] body.ts-studio.page-inbox .studio-inbox .inbox-v2-empty p{font-size:12px!important;color:var(--studio-sub)!important}
html[data-theme] body.ts-studio.page-inbox .studio-inbox form.inbox-search{
  background:var(--studio-tint)!important;
  border-bottom:1px solid var(--studio-line)!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox form.inbox-search button{
  background:#3563e9!important;color:#fff!important;border-color:#3563e9!important;
}
html[data-theme] body.ts-studio.page-inbox .studio-inbox-account .inbox-account-copy b{font-size:12.5px!important}

/* Other major modules: restrained chrome, not re-styled data semantics */
html[data-theme] body.ts-studio .studio-ai-tabs{gap:8px!important;flex-wrap:wrap!important}
html[data-theme] body.ts-studio .studio-ai-tabs a{border-radius:10px!important;padding:10px 13px!important}
html[data-theme] body.ts-studio .studio-ai-tabs a.active{background:var(--studio-selected)!important;color:var(--studio-accent)!important}
html[data-theme] body.ts-studio .studio-contacts-toolbar{padding:14px!important;border-radius:15px!important}
html[data-theme] body.ts-studio .studio-broadcast :is(.bc-form-card,.bc-preview-card){padding:18px!important}
html[data-theme] body.ts-studio .studio-broadcast .bc-fields label{font-size:12px!important}
html[data-theme] body.ts-studio .content :is(.badge,.pill){border-radius:8px!important;font-size:10px!important}

/* Mobile: preserve accessibility, let native stacked panels determine layout. */
@media(max-width:1350px) and (min-width:981px){
  html body.ts-studio .studio-topbar-left{min-width:120px!important}
  html body.ts-studio .topbar-right{gap:8px!important}
  html body.ts-studio .workspace-switcher{min-width:235px!important;max-width:270px!important;width:255px!important}
  html body.ts-studio .topbar>.v2-command-open{padding:0 10px!important}
}
@media(max-width:1130px) and (min-width:981px){
  html body.ts-studio .studio-topbar-center{display:none!important}
  html body.ts-studio .topbar>.v2-command-open{margin-right:auto!important}
}
@media(max-width:980px){
  html body.ts-studio .app-shell>.sidebar{width:252px!important;max-width:252px!important}
  html body.ts-studio .studio-brandbar{min-height:73px!important}
  html body.ts-studio .topbar{padding:0 12px!important;min-height:66px!important;height:66px!important;gap:9px!important}
  html body.ts-studio .content{padding:15px 12px 30px!important}
  html body.ts-studio.page-inbox .content{padding:10px 10px 24px!important}
  html body.ts-studio .content :is(.card,.panel,.content-card,.module-card,.table-card,.provider-section){padding:16px!important}
  html body.ts-studio .content :is(.studio-module-intro,.workspace-summary-hero){padding:19px!important}
  html body.ts-studio .studio-module-intro strong{font-size:17px!important}
  html body.ts-studio .workspace-switcher{min-width:0!important;max-width:220px!important;width:auto!important}
  html body.ts-studio .workspace-switcher select{min-width:0!important}
}
@media(max-width:560px){
  html body.ts-studio .topbar{padding:0 10px!important;height:62px!important;min-height:62px!important}
  html body.ts-studio .content{padding:13px 10px 26px!important}
  html body.ts-studio.page-inbox .content{padding:9px 8px 22px!important}
  html body.ts-studio .workspace-switcher{width:min(40vw,165px)!important;min-width:0!important;max-width:165px!important;padding:4px 8px!important}
  html body.ts-studio .workspace-switcher>span{display:none!important}
  html body.ts-studio .workspace-switcher select{font-size:11px!important;padding:0 20px 0 0!important}
  html body.ts-studio .content :is(.card,.panel,.content-card,.module-card,.table-card,.provider-section){padding:14px!important}
  html body.ts-studio.page-inbox .studio-inbox-account{padding:12px!important}
  html body.ts-studio.page-inbox .studio-inbox{border-radius:13px!important}
}
/* Progressive focus styles and motion */
html[data-theme] body.ts-studio :is(a,button,input,select,textarea):focus-visible{
  outline:2px solid var(--studio-accent)!important;outline-offset:3px!important;
}
@media(prefers-reduced-motion:reduce){html body.ts-studio *{animation-duration:.001ms!important;transition-duration:.001ms!important}}

/* QA corrections: collapsed identity has a fixed viewport-visible row;
   mobile switcher must never consume the space reserved for menu/search. */
@media(min-width:981px){
  html[data-theme] body.ts-studio.sidebar-collapsed .app-shell>.sidebar .studio-brandbar{
    box-sizing:border-box!important;
    min-height:76px!important;height:76px!important;max-height:76px!important;
    flex:0 0 76px!important;
    padding:14px 11px!important;align-items:center!important;justify-content:center!important;
    overflow:visible!important;
  }
  html[data-theme] body.ts-studio.sidebar-collapsed .studio-brandbar .brand{
    min-height:42px!important;height:42px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    flex:0 0 42px!important;padding:0!important;
  }
  html[data-theme] body.ts-studio.sidebar-collapsed .studio-brandbar .brand-mark{
    display:grid!important;place-items:center!important;
    width:42px!important;height:42px!important;flex:0 0 42px!important;
    margin:0!important;align-self:center!important;
  }
}
@media(max-width:980px){
  html[data-theme] body.ts-studio .topbar .studio-topbar-left{
    display:flex!important;align-items:center!important;
    min-width:0!important;flex:0 0 auto!important;gap:7px!important;
  }
  html[data-theme] body.ts-studio .topbar .topbar-right{
    min-width:0!important;max-width:calc(100% - 92px)!important;
    gap:8px!important;flex:0 1 auto!important;margin-left:auto!important;
  }
  html[data-theme] body.ts-studio .topbar .workspace-switcher{
    box-sizing:border-box!important;min-width:0!important;
    width:min(32vw,170px)!important;max-width:170px!important;
    padding:4px 9px!important;flex:0 1 auto!important;
  }
  html[data-theme] body.ts-studio .topbar .workspace-switcher select{
    min-width:0!important;width:100%!important;max-width:100%!important;
    text-overflow:ellipsis!important;overflow:hidden!important;
    font-size:11px!important;
  }
  html[data-theme] body.ts-studio .topbar .workspace-switcher>span{display:none!important}
  html[data-theme] body.ts-studio .topbar .notif-chip{flex:0 0 40px!important;width:40px!important;height:40px!important}
  html[data-theme] body.ts-studio .topbar .account-trigger{
    flex:0 0 40px!important;max-width:40px!important;min-width:40px!important;
    height:40px!important;min-height:40px!important;
    justify-content:center!important;padding:4px!important;
  }
}
@media(max-width:560px){
  html[data-theme] body.ts-studio .topbar .topbar-right{gap:5px!important;max-width:calc(100% - 89px)!important}
  html[data-theme] body.ts-studio .topbar .workspace-switcher{width:min(30vw,138px)!important;max-width:138px!important;padding:4px 8px!important}
  html[data-theme] body.ts-studio .topbar .notif-chip{flex:0 0 38px!important;width:38px!important;height:38px!important}
  html[data-theme] body.ts-studio .topbar .account-trigger{flex:0 0 39px!important;min-width:39px!important;max-width:39px!important}
}
