/* Platform final unified administration contract.
   Loaded after core + store styles so record semantics and action sizing have one source of truth. */
:root{
  --tc-record-success-bg:#edf9f1;
  --tc-record-success-fg:#1f6b3a;
  --tc-record-success-border:#ccebd7;
  --tc-record-danger-bg:#fff1f1;
  --tc-record-danger-fg:#a12b2b;
  --tc-record-danger-border:#f1d0d0;
  --tc-record-warning-bg:#fff8e8;
  --tc-record-warning-fg:#8a6414;
  --tc-record-warning-border:#efdfad;
  --tc-record-info-bg:#eef5ff;
  --tc-record-info-fg:#315f9a;
  --tc-record-info-border:#d2e1f5;
  --tc-record-neutral-bg:#f3f4f7;
  --tc-record-neutral-fg:#5f6270;
  --tc-record-neutral-border:#e0e2e8;
}

/* All editable controls share the same box contract. */
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
  select
){
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:46px;
  box-sizing:border-box;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main textarea{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-form-grid,.tc-settings-grid,.dp-form) > :is(label,.tc-field,fieldset,.tc-fieldset){
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

/* Action rows use the available card width instead of leaving small centred buttons. */
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-fluid-actions{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
  align-items:stretch!important;
  gap:10px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-fluid-actions > :is(form,a,button,input[type="submit"]){
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-fluid-actions > form{
  display:block!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-fluid-actions :is(.button,button,input[type="submit"]){
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:46px!important;
  box-sizing:border-box!important;
  text-align:center!important;
}

/* Record semantics: the same three fields always look and align the same. */
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main table :is(th.tc-col-status,th.tc-col-result,th.tc-col-details,th.tc-col-actions),
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main table :is(td.tc-cell-status,td.tc-cell-result,td.tc-cell-details,td.tc-cell-actions){
  text-align:center!important;
  vertical-align:middle!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-record-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-height:30px!important;
  max-width:100%!important;
  padding:5px 10px!important;
  border:1px solid var(--tc-record-neutral-border)!important;
  border-radius:999px!important;
  background:var(--tc-record-neutral-bg)!important;
  color:var(--tc-record-neutral-fg)!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1.35!important;
  box-sizing:border-box!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-record-badge.is-success{
  background:var(--tc-record-success-bg)!important;color:var(--tc-record-success-fg)!important;border-color:var(--tc-record-success-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-record-badge.is-danger{
  background:var(--tc-record-danger-bg)!important;color:var(--tc-record-danger-fg)!important;border-color:var(--tc-record-danger-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-record-badge.is-warning{
  background:var(--tc-record-warning-bg)!important;color:var(--tc-record-warning-fg)!important;border-color:var(--tc-record-warning-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-record-badge.is-info{
  background:var(--tc-record-info-bg)!important;color:var(--tc-record-info-fg)!important;border-color:var(--tc-record-info-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-record-badge.is-neutral{
  background:var(--tc-record-neutral-bg)!important;color:var(--tc-record-neutral-fg)!important;border-color:var(--tc-record-neutral-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main td.tc-cell-details :is(.tc-table-action,.dp-table-action,a.button,button.button),
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main td.tc-cell-actions :is(.tc-table-action,.dp-table-action,a.button,button.button){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:116px!important;
  min-height:40px!important;
  margin:0!important;
  box-sizing:border-box!important;
  text-align:center!important;
}

@media (max-width:900px){
  /* A phone record is a full record; semantic rows always finish in the same order. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td{
    order:40!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-record-primary{
    order:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-cell-status{
    order:70!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-cell-result{
    order:80!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-cell-details,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-cell-actions{
    order:100!important;
    display:grid!important;
    grid-template-columns:minmax(96px,34%) minmax(0,1fr)!important;
    align-items:center!important;
    text-align:start!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-status,td.tc-cell-result){
    display:grid!important;
    grid-template-columns:minmax(96px,34%) minmax(0,1fr)!important;
    align-items:center!important;
    text-align:start!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-status,td.tc-cell-result,td.tc-cell-details,td.tc-cell-actions)::before{
    align-self:center!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-status,td.tc-cell-result) .tc-record-badge{
    width:100%!important;
    justify-self:stretch!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) > :is(.tc-actions,.tc-row-actions,.tc-action-row,.dp-actions,form){
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) :is(.tc-table-action,.dp-table-action,a.button,button.button){
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:44px!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-fluid-actions{
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
  }
}

/* Details has one visual treatment everywhere; other action types keep their semantic colors. */
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main td.tc-cell-details :is(.tc-table-action,.dp-table-action,a.button,button.button){
  border:1px solid #ded7f4!important;
  border-radius:9px!important;
  background:#f4f1ff!important;
  color:#5935b8!important;
  font-weight:700!important;
  text-decoration:none!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main td.tc-cell-details :is(.tc-table-action,.dp-table-action,a.button,button.button):hover{
  background:#ebe5ff!important;
  color:#4e2da7!important;
}

@media (max-width:900px){
  /* The visual record header is the first real identity field, not whichever column happened to be first on desktop. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td:first-child:not(.tc-record-primary){
    background:#fff!important;
    border-radius:0!important;
    padding:10px 13px!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-record-primary{
    display:block!important;
    order:0!important;
    padding:12px 13px!important;
    background:#f8f8fb!important;
    border-bottom:1px solid #e3e6ec!important;
    border-radius:12px 12px 0 0!important;
    text-align:start!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-record-primary::before{
    display:block!important;
    margin:0 0 4px!important;
  }
}

@media (min-width:901px){
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main table th.tc-col-status,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main table th.tc-col-result,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main table th.tc-col-details{
    width:128px!important;
  }
}

/* Responsive review applied on top of the desktop contract.
   Important: phone geometry lives only inside max-width media queries. */

/* Text-centre footer actions always show the icon shipped with the admin icon set. */
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-text-footer-actions .tc-icon{
  display:inline-block!important;
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  flex:0 0 18px!important;
  vertical-align:middle!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-text-footer-actions :is(.button,button){
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-pagination-summary{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-pagination-summary small{
  color:var(--tc-color-muted-strong,#777285)!important;
}
/* One semantic colour language for status/result pills in every record. */
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-status-pill.is-success{
  background:var(--tc-record-success-bg)!important;color:var(--tc-record-success-fg)!important;border-color:var(--tc-record-success-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-status-pill.is-danger{
  background:var(--tc-record-danger-bg)!important;color:var(--tc-record-danger-fg)!important;border-color:var(--tc-record-danger-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-status-pill.is-warning{
  background:var(--tc-record-warning-bg)!important;color:var(--tc-record-warning-fg)!important;border-color:var(--tc-record-warning-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-status-pill.is-info{
  background:var(--tc-record-info-bg)!important;color:var(--tc-record-info-fg)!important;border-color:var(--tc-record-info-border)!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-status-pill:is(.is-muted,.is-neutral){
  background:var(--tc-record-neutral-bg)!important;color:var(--tc-record-neutral-fg)!important;border-color:var(--tc-record-neutral-border)!important;
}

/* Desktop: keep the page geometry. Only action clusters that are genuinely
   form actions use the available card width. Header/list actions stay compact. */
@media (min-width:901px){
  /* Desktop/tablet landscape must remain a desktop table even though older
     accumulated styles contained mobile-card rules up to 1100px. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-table-wrap,.dp-table-wrap){
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow-x:auto!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table){
    display:table!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    border-collapse:collapse!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>thead{display:table-header-group!important}
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody{display:table-row-group!important}
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr{
    display:table-row!important;
    width:auto!important;
    padding:0!important;
    border-radius:0!important;
    background:transparent!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td{
    display:table-cell!important;
    width:auto!important;
    min-width:0!important;
    padding:12px 14px!important;
    border-radius:0!important;
    text-align:start!important;
    vertical-align:middle!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td::before{
    content:none!important;
    display:none!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-status,td.tc-cell-result,td.tc-cell-details,td.tc-cell-actions){
    text-align:center!important;
  }

  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions
  ){
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;
    align-items:stretch!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:10px 0 0!important;
    padding:0!important;
    border-top:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions
  )>:is(form,a,button,input[type="submit"]){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions
  ) :is(a.button,button.button,input.button,input[type="submit"],form>button){
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:44px!important;
    margin:0!important;
    text-align:center!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-form-grid>.tc-form-actions{
    grid-column:1/-1!important;
  }

  /* Store editors behave like product editing. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.dp-form>.dp-actions,.dp-detail-actions){
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.dp-form>.dp-actions,.dp-detail-actions)>*{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }

  /* Add / back / list actions are not phone-sized on desktop. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head){
    align-items:center!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions{
    display:flex!important;
    flex:0 0 auto!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions)>:is(form,a,button),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions>:is(form,a,button){
    flex:0 0 auto!important;
    width:auto!important;
    min-width:124px!important;
    max-width:260px!important;
    margin:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.button,button),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions :is(.button,button){
    width:auto!important;
    min-width:124px!important;
    max-width:260px!important;
  }
}

@media (max-width:900px){
  /* Phone canvas and cards. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:12px 10px 28px!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-card,.tc-settings-card,.tc-list-card,.tc-template-card,.tc-reset-card,.tc-account-card,
    .dp-card,.tc-payment-method-card,.tc-gateway-panel,.tc-record-detail,.dp-record-detail
  ){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0 0 12px!important;
    padding:14px!important;
    border-radius:14px!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-two-columns,.tc-three-columns,.tc-form-grid,.tc-settings-grid,.tc-account-form,
    .dp-form,.dp-details-grid,.dp-order-detail-grid,.dp-product-detail-grid
  ){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-two-columns,.tc-three-columns,.tc-form-grid,.tc-settings-grid,.tc-account-form,
    .dp-form,.dp-details-grid,.dp-order-detail-grid,.dp-product-detail-grid
  )>*{
    min-width:0!important;
    max-width:100%!important;
  }

  /* Phone controls are consistent and use the card width. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),select,textarea
  ){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    margin:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),select
  ){
    min-height:48px!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main textarea{
    min-height:88px!important;
    height:auto!important;
    resize:vertical!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page="platform-connection"] main.tc-main textarea[name="admin_telegram_ids"]{
    min-height:82px!important;
    max-height:118px!important;
  }

  /* Headers become one deliberate phone column; list actions use the width. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:start!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head)>*{
    min-width:0!important;
    max-width:100%!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions)>:only-child,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions>:only-child,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions)>:last-child:nth-child(odd),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions>:last-child:nth-child(odd){
    grid-column:1/-1!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions)>:is(form,a,button),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions>:is(form,a,button),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.button,button),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions :is(.button,button){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }

  /* Form/page actions: two balanced buttons while space permits; a lone button fills the row. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions,
    .dp-form>.dp-actions,.dp-detail-actions
  ){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:10px 0 0!important;
    padding:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions,
    .dp-form>.dp-actions,.dp-detail-actions
  )>:is(form,a,button,input[type="submit"],.dp-primary,.dp-secondary,.dp-danger){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions,
    .dp-form>.dp-actions,.dp-detail-actions
  )>:only-child,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions,
    .dp-form>.dp-actions,.dp-detail-actions
  )>:last-child:nth-child(odd){
    grid-column:1/-1!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions,
    .dp-form>.dp-actions,.dp-detail-actions
  ) :is(a.button,button.button,input.button,input[type="submit"],form>button,.dp-primary,.dp-secondary,.dp-danger){
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:46px!important;
    margin:0!important;
    padding-inline:12px!important;
    text-align:center!important;
    white-space:normal!important;
    box-sizing:border-box!important;
  }

  /* Search/filter bars do not leave small floating controls on the phone. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-filter-row,.tc-toolbar,.dp-toolbar){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    align-items:stretch!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-filter-row,.tc-toolbar,.dp-toolbar)>*{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }

  /* Every desktop table row becomes one complete mobile record. No desktop column is hidden. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-table-wrap,.dp-table-wrap){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:0!important;
    overflow:visible!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table){
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    border:0!important;
    background:transparent!important;
    table-layout:auto!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>thead{
    display:none!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:11px!important;
    width:100%!important;
    min-width:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #e2deeb!important;
    border-radius:13px!important;
    background:#fff!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td:first-child,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-record-primary{
    display:grid!important;
    grid-template-columns:minmax(94px,34%) minmax(0,1fr)!important;
    align-items:center!important;
    gap:9px!important;
    order:40!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:44px!important;
    margin:0!important;
    padding:10px 12px!important;
    border:0!important;
    border-bottom:1px solid #efecf4!important;
    border-radius:0!important;
    background:#fff!important;
    text-align:start!important;
    white-space:normal!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-record-primary{
    order:0!important;
    background:#faf9fc!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td:last-child{
    border-bottom:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td::before{
    content:attr(data-label)!important;
    display:block!important;
    margin:0!important;
    color:#777285!important;
    font-size:11px!important;
    font-weight:800!important;
    line-height:1.45!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td[colspan]{
    display:block!important;
    order:0!important;
    padding:14px!important;
    text-align:center!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td[colspan]::before{
    display:none!important;
    content:none!important;
  }

  /* Semantic fields finish every record in one fixed order. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main td.tc-cell-status{order:70!important}
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main td.tc-cell-result{order:80!important}
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions){order:100!important}
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-status,td.tc-cell-result) .tc-record-badge{
    width:auto!important;
    min-width:96px!important;
    max-width:100%!important;
    justify-self:start!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) :is(.tc-row-actions,.tc-action-row,.tc-actions,.dp-actions){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) :is(.tc-row-actions,.tc-action-row,.tc-actions,.dp-actions)>:only-child,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) :is(.tc-row-actions,.tc-action-row,.tc-actions,.dp-actions)>:last-child:nth-child(odd){
    grid-column:1/-1!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) :is(form,a,button,.button,.tc-table-action,.dp-table-action){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }

  /* Phone pagination is compact text, not a second toolbar. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-pagination.tc-pagination-numeric{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    width:100%!important;
    margin-top:12px!important;
    justify-items:center!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-pagination-summary{
    justify-content:center!important;
    width:100%!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-page-numbers{
    display:flex!important;
    flex-wrap:wrap!important;
    justify-content:center!important;
    gap:6px!important;
    width:100%!important;
  }
}

@media (max-width:360px){
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,.tc-text-footer-actions,
    .tc-customer-quick-actions,.tc-save-bar,.tc-form-actions,.tc-icon-actions,
    .dp-form>.dp-actions,.dp-detail-actions
  ),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) :is(.tc-row-actions,.tc-action-row,.tc-actions,.dp-actions){
    grid-template-columns:minmax(0,1fr)!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td:first-child,
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(table.widefat,table.tc-smart-table,table.tc-dense-table,table.dp-table)>tbody>tr>td.tc-record-primary{
    grid-template-columns:minmax(78px,34%) minmax(0,1fr)!important;
    gap:7px!important;
    padding-inline:10px!important;
  }
}


/* Strict action-layout contract.
   Desktop keeps buttons compact and inline. Phone stacks every action vertically
   and gives each action the full card width. These rules intentionally come last. */
@media (min-width:901px){
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,
    .tc-connection-actions,.tc-text-footer-actions,.tc-customer-quick-actions,
    .tc-save-bar,.tc-form-actions,.tc-icon-actions,.tc-unified-action-cluster,
    .dp-form>.dp-actions,.dp-detail-actions
  ){
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-top:10px!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,
    .tc-connection-actions,.tc-text-footer-actions,.tc-customer-quick-actions,
    .tc-save-bar,.tc-form-actions,.tc-icon-actions,.tc-unified-action-cluster,
    .dp-form>.dp-actions,.dp-detail-actions
  )>:is(form,a,button,input[type="submit"],.dp-primary,.dp-secondary,.dp-danger){
    display:inline-flex!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,
    .tc-connection-actions,.tc-text-footer-actions,.tc-customer-quick-actions,
    .tc-save-bar,.tc-form-actions,.tc-icon-actions,.tc-unified-action-cluster,
    .dp-form>.dp-actions,.dp-detail-actions
  ) :is(a.button,button.button,input.button,input[type="submit"],form>button,.dp-primary,.dp-secondary,.dp-danger){
    display:inline-flex!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    min-height:42px!important;
    margin:0!important;
    padding-inline:18px!important;
    white-space:nowrap!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:auto!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.tc-action-row,.dp-actions)>:is(form,a,button),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions>:is(form,a,button),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-section-head,.dp-head) :is(.button,button),
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-head-actions :is(.button,button){
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
  }
}

@media (max-width:900px){
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,
    .tc-connection-actions,.tc-text-footer-actions,.tc-customer-quick-actions,
    .tc-save-bar,.tc-form-actions,.tc-icon-actions,.tc-unified-action-cluster,
    .tc-action-row,.tc-actions,.tc-row-actions,.dp-actions,
    .dp-form>.dp-actions,.dp-detail-actions,.tc-head-actions
  ){
    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin-inline:0!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,
    .tc-connection-actions,.tc-text-footer-actions,.tc-customer-quick-actions,
    .tc-save-bar,.tc-form-actions,.tc-icon-actions,.tc-unified-action-cluster,
    .tc-action-row,.tc-actions,.tc-row-actions,.dp-actions,
    .dp-form>.dp-actions,.dp-detail-actions,.tc-head-actions
  )>:is(form,a,button,input[type="submit"],.button,.dp-primary,.dp-secondary,.dp-danger){
    display:flex!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-fluid-actions,.tc-page-actions,.tc-gateway-actions,.tc-provider-actions,
    .tc-connection-actions,.tc-text-footer-actions,.tc-customer-quick-actions,
    .tc-save-bar,.tc-form-actions,.tc-icon-actions,.tc-unified-action-cluster,
    .tc-action-row,.tc-actions,.tc-row-actions,.dp-actions,
    .dp-form>.dp-actions,.dp-detail-actions,.tc-head-actions
  ) :is(a.button,button.button,input.button,input[type="submit"],form>button,.dp-primary,.dp-secondary,.dp-danger){
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:46px!important;
    margin:0!important;
    box-sizing:border-box!important;
    text-align:center!important;
    white-space:normal!important;
  }
  /* Record actions follow the same phone rule: one full-width action per row. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) :is(.tc-row-actions,.tc-action-row,.tc-actions,.dp-actions){
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
    width:100%!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(td.tc-cell-details,td.tc-cell-actions) :is(form,a,button,.button,.tc-table-action,.dp-table-action){
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }
}

/* The three Bot Texts footer actions are intentionally text-only. */
html.tc-unified-sidebar body.tc-standalone[data-admin-page="platform-texts"] main.tc-main .tc-text-footer-actions :is(.tc-icon,svg){
  display:none!important;
}


/* definitive phone layout contract.
   Phone: action controls stack vertically and fill the card width.
   Desktop is intentionally untouched by this block. */
@media (max-width:900px){
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main{
    min-width:0!important;
    overflow-x:hidden!important;
  }

  /* Forms/rows on phones use the available card width instead of shrinking to content. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-action-row,.tc-actions,.tc-row-actions,.tc-form-actions,.tc-page-actions,
    .tc-head-actions,.tc-icon-actions,.tc-text-footer-actions,.tc-customer-quick-actions,
    .tc-connection-actions,.tc-save-bar,.tc-gateway-actions,.tc-provider-actions,
    .tc-unified-action-cluster,.tc-modal-actions,.dp-actions,.dp-detail-actions
  ){
    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin-inline:0!important;
    box-sizing:border-box!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    .tc-action-row,.tc-actions,.tc-row-actions,.tc-form-actions,.tc-page-actions,
    .tc-head-actions,.tc-icon-actions,.tc-text-footer-actions,.tc-customer-quick-actions,
    .tc-connection-actions,.tc-save-bar,.tc-gateway-actions,.tc-provider-actions,
    .tc-unified-action-cluster,.tc-modal-actions,.dp-actions,.dp-detail-actions
  ) > :is(form,.tc-inline-form,.tc-channel-order-form){
    display:block!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }

  /* The action itself is authoritative: every normal panel button fills its row,
     even when a page uses a wrapper that is not in the historical action-class list. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(
    a.button,button.button,input.button,input[type="submit"].button,
    .dp-primary,.dp-secondary,.dp-danger
  ){
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:46px!important;
    margin-inline:0!important;
    padding-inline:14px!important;
    box-sizing:border-box!important;
    text-align:center!important;
    white-space:normal!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main form.tc-inline-form{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin-inline:0!important;
  }

  /* Search/filter/layout controls also stack cleanly on a phone. */
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-filter-row,.tc-toolbar){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    align-items:stretch!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main :is(.tc-filter-row,.tc-toolbar) > *{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin-inline:0!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-section-head{
    align-items:stretch!important;
  }
  html.tc-unified-sidebar body.tc-standalone[data-admin-page] main.tc-main .tc-section-head :is(.tc-action-row,.tc-head-actions){
    width:100%!important;
    max-width:100%!important;
  }
}

/* Final responsive contract. Loaded after every panel stylesheet so phone-only
   rules cannot leak into desktop and old page-specific rules cannot re-shrink controls. */
:root{--tc-compact-gap:10px;--tc-compact-control:46px;--tc-compact-radius:12px;--tc-compact-border:#e4e1ec;--tc-compact-soft:#fbfafd;--tc-compact-muted:#777285;}
body.tc-standalone[data-admin-page] main.tc-main *,body.tc-standalone[data-admin-page] main.tc-main *::before,body.tc-standalone[data-admin-page] main.tc-main *::after{box-sizing:border-box;}

/* Shared detail rhythm: no glued labels, values or raw technical blocks. */
body.tc-standalone[data-admin-page] main.tc-main :is(.tc-detail-grid,.tc-customer-meta-grid,.tc-ticket-meta-grid,.tc-referral-detail-grid,.tc-provider-detail-grid,.dp-product-detail-grid,.dp-order-detail-grid,.dp-details-grid){
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important;width:100%!important;min-width:0!important;max-width:100%!important;border:0!important;background:transparent!important;overflow:visible!important;
}
body.tc-standalone[data-admin-page] main.tc-main :is(.tc-detail-grid,.tc-customer-meta-grid,.tc-ticket-meta-grid,.tc-referral-detail-grid,.tc-provider-detail-grid,.dp-product-detail-grid,.dp-order-detail-grid,.dp-details-grid)>div{
  min-width:0!important;margin:0!important;padding:13px 14px!important;border:1px solid var(--tc-compact-border)!important;border-radius:var(--tc-compact-radius)!important;background:var(--tc-compact-soft)!important;line-height:1.65!important;overflow-wrap:anywhere!important;
}
body.tc-standalone[data-admin-page] main.tc-main :is(.tc-detail-grid,.tc-customer-meta-grid,.tc-ticket-meta-grid,.tc-referral-detail-grid,.tc-provider-detail-grid,.dp-product-detail-grid,.dp-order-detail-grid,.dp-details-grid)>div>:is(span,small):first-child{display:block!important;margin:0 0 5px!important;color:var(--tc-compact-muted)!important;font-size:12px!important;line-height:1.5!important;}
body.tc-standalone[data-admin-page] main.tc-main :is(.tc-detail-grid,.tc-customer-meta-grid,.tc-ticket-meta-grid,.tc-referral-detail-grid,.tc-provider-detail-grid,.dp-product-detail-grid,.dp-order-detail-grid,.dp-details-grid)>div>:is(strong,b,code){display:block!important;min-width:0!important;margin:0!important;line-height:1.65!important;overflow-wrap:anywhere!important;word-break:normal!important;}
body.tc-standalone[data-admin-page] main.tc-main :is(.tc-detail-summary,.tc-secondary-details,details.tc-secondary-details,.tc-log-context){margin-top:12px!important;min-width:0!important;max-width:100%!important;}
body.tc-standalone[data-admin-page] main.tc-main details>summary{padding:11px 13px!important;border:1px solid var(--tc-compact-border)!important;border-radius:10px!important;background:#fff!important;line-height:1.55!important;cursor:pointer;}
body.tc-standalone[data-admin-page] main.tc-main details[open]>summary{margin-bottom:10px!important;}
body.tc-standalone[data-admin-page] main.tc-main :is(.tc-secondary-details,.tc-log-context)>:is(pre,code,.tc-code-block,.tc-json-view,.tc-raw-view),body.tc-standalone[data-admin-page] main.tc-main details>:is(pre,code){width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;padding:12px 13px!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:normal!important;}

/* Forms and fields share one spacing/height system. */
body.tc-standalone[data-admin-page] main.tc-main :is(.tc-form-grid,.dp-form,.tc-check-grid){gap:12px!important;}
body.tc-standalone[data-admin-page] main.tc-main :is(.tc-field,label):has(> input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),>select,>textarea){min-width:0!important;max-width:100%!important;}
body.tc-standalone[data-admin-page] main.tc-main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),select){min-height:var(--tc-compact-control)!important;border-radius:var(--tc-compact-radius)!important;}
body.tc-standalone[data-admin-page] main.tc-main textarea{min-width:0!important;max-width:100%!important;border-radius:var(--tc-compact-radius)!important;line-height:1.7!important;}

/* Search is one component everywhere: search + filters + explicit Search button. */
body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search,.tc-text-toolbar){gap:10px!important;align-items:end!important;width:100%!important;max-width:100%!important;min-width:0!important;}
body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search,.tc-text-toolbar) :is(input[type="search"],select,button.button,.button){min-height:var(--tc-compact-control)!important;margin:0!important;}

/* Desktop contract: natural-size actions in rows; nothing stretches just because mobile does. */
@media (min-width:901px){
  body.tc-standalone[data-admin-page] main.tc-main :is(.tc-action-row,.tc-actions,.tc-row-actions,.tc-form-actions,.tc-page-actions,.tc-head-actions,.tc-icon-actions,.tc-text-footer-actions,.tc-customer-quick-actions,.tc-connection-actions,.tc-save-bar,.tc-gateway-actions,.tc-provider-actions,.tc-unified-action-cluster,.tc-modal-actions,.dp-actions,.dp-detail-actions,.tc-fluid-actions){display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;width:100%!important;max-width:100%!important;min-width:0!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(.tc-action-row,.tc-actions,.tc-row-actions,.tc-form-actions,.tc-page-actions,.tc-head-actions,.tc-icon-actions,.tc-text-footer-actions,.tc-customer-quick-actions,.tc-connection-actions,.tc-save-bar,.tc-gateway-actions,.tc-provider-actions,.tc-unified-action-cluster,.tc-modal-actions,.dp-actions,.dp-detail-actions,.tc-fluid-actions)>*{flex:0 0 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(.tc-inline-form,.tc-action-form,.dp-inline-form){display:inline-flex!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(button.button,a.button,input.button,.dp-primary,.dp-secondary,.dp-danger,.tc-table-action):not(.tc-icon-button):not(.tc-modal-close):not(.tc-password-toggle){display:inline-flex!important;flex:0 0 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;min-height:var(--tc-compact-control)!important;margin:0!important;padding-inline:18px!important;align-items:center!important;justify-content:center!important;white-space:normal!important;}
  body.tc-standalone[data-admin-page] main.tc-main table td:is([data-label="التفاصيل"],[data-label="الإجراءات"],[data-label="الإجراء"],[data-label="الإدارة"]) :is(.tc-action-row,.tc-actions,.tc-row-actions,.dp-actions){justify-content:center!important;width:100%!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search){display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;justify-content:flex-start!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search)>.tc-search-pair{display:grid!important;grid-template-columns:minmax(260px,420px) auto!important;gap:10px!important;flex:0 1 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;align-items:end!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search)>:is(input[type="search"],.tc-search-field):not(.tc-search-pair *){flex:1 1 320px!important;width:auto!important;min-width:260px!important;max-width:520px!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search)>select{flex:0 1 210px!important;width:210px!important;min-width:160px!important;max-width:240px!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search)>.tc-page-size-field{flex:0 0 130px!important;width:130px!important;max-width:130px!important;}
  body.tc-standalone[data-admin-page] main.tc-main .tc-text-toolbar{display:grid!important;grid-template-columns:minmax(280px,1fr) minmax(160px,220px) auto!important;max-width:820px!important;justify-content:start!important;}
  body.tc-standalone[data-admin-page] main.tc-main .tc-text-toolbar>*{width:100%!important;min-width:0!important;max-width:100%!important;}
  body.tc-standalone[data-admin-page] main.tc-main .tc-text-toolbar>button{width:auto!important;justify-self:start!important;padding-inline:18px!important;}
}

/* Mobile contract: one vertical field/action rhythm inside the card. Desktop is untouched above. */
@media (max-width:900px){
  body.tc-standalone[data-admin-page] main.tc-main :is(.tc-detail-grid,.tc-customer-meta-grid,.tc-ticket-meta-grid,.tc-referral-detail-grid,.tc-provider-detail-grid,.dp-product-detail-grid,.dp-order-detail-grid,.dp-details-grid){grid-template-columns:1fr!important;gap:9px!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(.tc-detail-grid,.tc-customer-meta-grid,.tc-ticket-meta-grid,.tc-referral-detail-grid,.tc-provider-detail-grid,.dp-product-detail-grid,.dp-order-detail-grid,.dp-details-grid)>div{padding:12px!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(.tc-action-row,.tc-actions,.tc-row-actions,.tc-form-actions,.tc-page-actions,.tc-head-actions,.tc-icon-actions,.tc-text-footer-actions,.tc-customer-quick-actions,.tc-connection-actions,.tc-save-bar,.tc-gateway-actions,.tc-provider-actions,.tc-unified-action-cluster,.tc-modal-actions,.dp-actions,.dp-detail-actions,.tc-fluid-actions){display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;max-width:100%!important;min-width:0!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(.tc-action-row,.tc-actions,.tc-row-actions,.tc-form-actions,.tc-page-actions,.tc-head-actions,.tc-icon-actions,.tc-text-footer-actions,.tc-customer-quick-actions,.tc-connection-actions,.tc-save-bar,.tc-gateway-actions,.tc-provider-actions,.tc-unified-action-cluster,.tc-modal-actions,.dp-actions,.dp-detail-actions,.tc-fluid-actions)>*,body.tc-standalone[data-admin-page] main.tc-main :is(.tc-inline-form,.tc-action-form,.dp-inline-form){display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;}
  body.tc-standalone[data-admin-page] main.tc-main form:has(> button.button):not(.tc-filter-row):not(.tc-toolbar):not(.dp-toolbar):not(.tc-unified-search){width:100%!important;max-width:100%!important;min-width:0!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(button.button,a.button,input.button,.dp-primary,.dp-secondary,.dp-danger,.tc-table-action):not(.tc-icon-button):not(.tc-modal-close):not(.tc-password-toggle):not(.tc-iso-picker-button):not(.tc-support-viewer-close):not(.tc-mobile-menu):not(.tc-attachment-chip):not(.tc-chat-send-button):not(.tc-page-numbers .button):not(.tc-pagination .button){display:flex!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:var(--tc-compact-control)!important;margin:0!important;padding-inline:14px!important;align-items:center!important;justify-content:center!important;text-align:center!important;white-space:normal!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search,.tc-text-toolbar){display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;max-width:100%!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search,.tc-text-toolbar)>*{grid-column:1!important;width:100%!important;max-width:100%!important;min-width:0!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search)>.tc-search-pair{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;max-width:100%!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search)>.tc-search-pair>*{width:100%!important;max-width:100%!important;min-width:0!important;}
  body.tc-standalone[data-admin-page] main.tc-main :is(.tc-card,.dp-card){min-width:0!important;max-width:100%!important;overflow:visible!important;}
}

/* Login/human-check language direction remains semantic and independent from panel RTL. */
body.tc-human-check-page[data-admin-lang="ar"] :is(.tc-login-card,.tc-login-intro,.tc-login-form label,.tc-login-error,.tc-human-result){direction:rtl!important;text-align:right!important;}
body.tc-human-check-page[data-admin-lang="en"] :is(.tc-login-card,.tc-login-intro,.tc-login-form label,.tc-login-error,.tc-human-result){direction:ltr!important;text-align:left!important;}
body.tc-human-check-page :is(.tc-human-code-text,.tc-human-code-input){direction:ltr!important;text-align:center!important;}

/* search refinement: the search control remains a compact component on phones.
   Search field + Search button share the first row; filters continue below. */
@media (max-width:900px){
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search,.tc-text-toolbar):has(input[type="search"],.tc-search-field){
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:8px!important;
    align-items:end!important;
  }
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search,.tc-text-toolbar):has(input[type="search"],.tc-search-field) > :is(input[type="search"],.tc-search-field){
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
  }
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search,.tc-text-toolbar):has(input[type="search"],.tc-search-field) > button:is(.button,.dp-primary,.dp-secondary){
    grid-column:2!important;
    grid-row:1!important;
    width:auto!important;
    min-width:84px!important;
    max-width:none!important;
    padding-inline:16px!important;
  }
  body.tc-standalone[data-admin-page] main.tc-main :is(form.tc-filter-row,form.tc-toolbar,form.dp-toolbar,form.tc-unified-search,.tc-text-toolbar):has(input[type="search"],.tc-search-field) > :is(select,.tc-page-size-field){
    grid-column:1 / -1!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
}


/* desktop search stays one compact row; mobile rules remain unchanged. */
@media (min-width:901px){
  body.tc-standalone[data-admin-page] main.tc-main .tc-text-toolbar.tc-unified-search{
    display:grid!important;
    grid-template-columns:minmax(320px,1fr) minmax(170px,220px) auto!important;
    align-items:end!important;
    gap:10px!important;
    width:100%!important;
    max-width:900px!important;
  }
  body.tc-standalone[data-admin-page] main.tc-main .tc-text-toolbar.tc-unified-search>#tc-text-search{
    grid-column:1!important;width:100%!important;min-width:0!important;max-width:none!important;
  }
  body.tc-standalone[data-admin-page] main.tc-main .tc-text-toolbar.tc-unified-search>#tc-text-group{
    grid-column:2!important;width:100%!important;min-width:0!important;max-width:none!important;
  }
  body.tc-standalone[data-admin-page] main.tc-main .tc-text-toolbar.tc-unified-search>#tc-text-search-button{
    grid-column:3!important;width:auto!important;min-width:92px!important;max-width:none!important;justify-self:start!important;padding-inline:18px!important;
  }
}

/* every Details action uses the same secondary-button treatment. */
body.tc-standalone[data-admin-page] main.tc-main :is(a.tc-table-action,a.dp-table-action,td[data-label="التفاصيل"] a,td[data-label="Details"] a){
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:112px!important;
  max-width:none!important;
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  padding:0 16px!important;
  margin:0!important;
  border:1px solid #ded7f4!important;
  border-radius:12px!important;
  background:#f7f4ff!important;
  background-image:none!important;
  color:#5b36c8!important;
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:700!important;
  line-height:1!important;
  text-align:center!important;
  text-decoration:none!important;
  white-space:nowrap!important;
  box-shadow:none!important;
  box-sizing:border-box!important;
}
body.tc-standalone[data-admin-page] main.tc-main :is(a.tc-table-action,a.dp-table-action,td[data-label="التفاصيل"] a,td[data-label="Details"] a)::before,
body.tc-standalone[data-admin-page] main.tc-main :is(a.tc-table-action,a.dp-table-action,td[data-label="التفاصيل"] a,td[data-label="Details"] a)::after{content:none!important;display:none!important;}
body.tc-standalone[data-admin-page] main.tc-main :is(a.tc-table-action,a.dp-table-action,td[data-label="التفاصيل"] a,td[data-label="Details"] a):hover{
  background:#eee9ff!important;border-color:#cfc3f7!important;color:#4d2cad!important;
}
@media (max-width:900px){
  body.tc-standalone[data-admin-page] main.tc-main :is(td[data-label="التفاصيل"],td[data-label="Details"]) :is(a.tc-table-action,a.dp-table-action,a.button,button.button){
    width:100%!important;max-width:100%!important;min-width:0!important;height:44px!important;min-height:44px!important;max-height:none!important;
  }
}

/* Reviewed responsive integrity — keep every panel inside desktop and phone viewports. */
.tc-app,.tc-main,.tc-main-scroll,.tc-card,.dp-wrap,.dp-card,.tc-form-grid,.dp-form,.tc-details-grid,.dp-details-grid{min-width:0;max-width:100%;box-sizing:border-box}
.tc-card img,.dp-card img,.tc-card svg,.dp-card svg{max-width:100%;height:auto}
.tc-form-grid input,.tc-form-grid select,.tc-form-grid textarea,.dp-form input,.dp-form select,.dp-form textarea{max-width:100%;min-width:0;box-sizing:border-box}
.tc-table-wrap,.dp-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tc-card code,.dp-card code,.tc-cell-summary{overflow-wrap:anywhere;word-break:break-word}
@media (max-width:900px){.tc-main,.tc-main-scroll{min-width:0}.tc-card,.dp-card{max-width:100%}.tc-row-actions,.dp-actions{flex-wrap:wrap}}
@media (max-width:520px){.tc-card,.dp-card{border-radius:10px}.tc-form-grid,.dp-form,.tc-details-grid,.dp-details-grid{grid-template-columns:minmax(0,1fr)!important}.tc-row-actions>*,.dp-actions>*{max-width:100%}}

/* Account security password reveal — final loaded-layer alignment.
 * Overlay input and toggle in the same grid cell so the eye is always
 * vertically centered inside the input, independent of inherited positioning. */
html.tc-unified-sidebar body.tc-standalone[data-admin-page="account"] main.tc-main .tc-account-form .tc-password-field{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto!important;
  align-items:center!important;
  position:relative!important;
  width:100%!important;
  min-width:0!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page="account"] main.tc-main .tc-account-form .tc-password-field>input[data-password-input]{
  grid-area:1/1!important;
  width:100%!important;
  min-width:0!important;
  padding-inline-end:50px!important;
  box-sizing:border-box!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page="account"] main.tc-main .tc-account-form .tc-password-field>button.tc-password-toggle[data-password-toggle],
html.tc-unified-sidebar body.tc-standalone[data-admin-page="account"] main.tc-main .tc-account-form .tc-password-field>button.tc-password-toggle[data-password-toggle]:is(:hover,:focus,:focus-visible,:active){
  grid-area:1/1!important;
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  justify-self:end!important;
  align-self:center!important;
  transform:none!important;
  translate:none!important;
  scale:none!important;
  width:32px!important;
  min-width:32px!important;
  max-width:32px!important;
  height:32px!important;
  min-height:32px!important;
  max-height:32px!important;
  margin:0 7px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  line-height:1!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  z-index:3!important;
  box-sizing:border-box!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page="account"] main.tc-main .tc-account-form .tc-password-field>button.tc-password-toggle[data-password-toggle] :is(span,svg){
  position:static!important;
  display:block!important;
  width:18px!important;
  height:18px!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  translate:none!important;
  scale:none!important;
}
html.tc-unified-sidebar body.tc-standalone[data-admin-page="account"] main.tc-main .tc-account-form .tc-password-field>button.tc-password-toggle[data-password-toggle] span[hidden]{display:none!important;}
