/* Shared workspace controls. Screen-only so printed receipts retain sizing. */
@media screen{
  html body :is(input,textarea)::placeholder,
  html body .main.main.main.main :is(input,textarea)::placeholder{font-size:min(.9em,11px)!important;font-weight:400!important;letter-spacing:normal!important;}
  html body .main .settings-search{min-width:0;max-width:100%;}
  html body .main.main.main.main .settings-search #settingsSearch{box-sizing:border-box!important;width:100%!important;min-width:0!important;padding-left:34px!important;padding-right:24px!important;text-indent:0!important;}
  html body .main .settings-search i{left:11px!important;pointer-events:none;}
  html body .main .settings-logo-picker{min-width:0!important;max-width:100%;}
  html body .main.main.main.main input[type="file"]{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:32px!important;max-height:none!important;padding:4px!important;font-size:10px!important;line-height:1.4!important;overflow:hidden;text-overflow:ellipsis;}
  html body .main.main.main.main input[type="file"]::file-selector-button{box-sizing:border-box;max-width:100%;margin:0 7px 0 0;padding:5px 8px;border:1px solid var(--border,#dbe3f1);border-radius:6px;background:var(--blue-soft,#eef4ff);color:var(--text,#17243c);font:inherit;cursor:pointer;}
  body.ctr-team-page .main :is(.team-grid,.team-left,#members,#members>.m-card,#invites,.team-table-wrap,.invite-table-wrap){min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
  body.ctr-team-page .main .team-grid{grid-template-columns:minmax(0,1fr)!important;}
  body.ctr-team-page .main :is(.team-table-wrap,.invite-table-wrap){width:100%!important;overflow-x:auto!important;overscroll-behavior-inline:contain;}
}
@media screen and (max-width:640px){
  html body :is(input,textarea)::placeholder,
  html body .main.main.main.main :is(input,textarea)::placeholder{font-size:min(.9em,8px)!important;}
  html body .main .settings-search i{left:8px!important;font-size:9px!important;}
  html body .main.main.main.main .settings-search #settingsSearch{padding-left:24px!important;padding-right:20px!important;}
  html body .main.main.main.main input[type="file"]{font-size:8px!important;}
  html body .main.main.main.main input[type="file"]::file-selector-button{padding:4px 6px;margin-right:5px;}
  /* Keep existing table/card modes and scrolling; reduce cell density only. */
  html body .main.main.main.main table:not(.att-table) :is(th,td){font-size:7.5px!important;line-height:1.35!important;padding:5px 6px!important;}
  html body .main.main.main.main table:not(.att-table) :is(th,td) :is(.small,.m-muted,small){font-size:7px!important;line-height:1.35!important;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .team-table-wrap{overflow:visible!important;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .team-table tr.member-row{padding:7px!important;gap:5px!important;min-width:0!important;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .team-table td{padding:0!important;overflow-wrap:anywhere!important;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .member{min-width:0!important;gap:6px!important;}
  body.ctr-team-page .main .member>div:last-child{min-width:0;overflow-wrap:anywhere;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .member-name{font-size:8.5px!important;line-height:1.35!important;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .team-table strong{font-size:7.5px!important;line-height:1.35!important;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .team-table .mini-btn{height:28px!important;min-height:28px!important;font-size:7.5px!important;padding:4px 7px!important;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .invite-table{display:block!important;min-width:0!important;max-width:100%!important;width:100%!important;}
  body.ctr-team-page .main .invite-table thead{display:none;}
  body.ctr-team-page .main .invite-table tbody{display:grid;gap:5px;padding:6px;}
  body.ctr-team-page .main .invite-table .invite-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:7px;border:1px solid var(--border,#e5e7eb);border-radius:9px;min-width:0;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .invite-table .invite-row td{display:block;min-width:0;padding:0!important;border:0;overflow-wrap:anywhere;}
  body.ctr-team-page .main .invite-table .invite-row td:first-child,
  body.ctr-team-page .main .invite-table .invite-row td:last-child{grid-column:1/-1;}
  body.ctr-team-page .main .invite-table .invite-row td::before{content:attr(data-label);display:block;font-size:6.5px;line-height:1.3;color:var(--mute,#748097);margin-bottom:2px;}
  body.ctr-team-page .main .invite-table .invite-row td:last-child{text-align:right;}
  body.ctr-team-page .main .invite-table .invite-row td:last-child::before{display:none;}
  body.ctr-team-page.ctr-team-page.ctr-team-page .main .invite-table .mini-btn{height:28px!important;min-height:28px!important;font-size:7.5px!important;padding:4px 7px!important;}
}
/* The Tables board uses generated cards, not HTML table cells. */
@media screen and (max-width:640px){
  #tblStats{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;}
  #tblStats .tbl-stat-card{min-height:48px!important;padding:6px!important;gap:4px!important;}
  #tblStats .tbl-stat-card:last-child:nth-child(odd){grid-column:auto!important;min-height:48px!important;}
  #tblStats .tbl-stat-icon{width:20px!important;height:20px!important;min-width:20px!important;font-size:9px!important;}
  #tblStats .tbl-stat-num{font-size:12px!important;line-height:1.15!important;}
  #tblStats .tbl-stat-label{font-size:7px!important;line-height:1.3!important;}
  #tblContainer .tbl-area{margin-bottom:8px!important;}
  #tblContainer .tbl-area h2{font-size:8px!important;margin-bottom:5px!important;}
  #tblContainer .tbl-area h2 span{font-size:7px!important;}
  #tblContainer .tbl-grid{gap:5px!important;}
  #tblContainer .tbl-card-inner{min-height:82px!important;padding:7px!important;}
  #tblContainer .tbl-card .tbl-name{font-size:9px!important;line-height:1.25!important;}
  #tblContainer .tbl-card .tbl-cap{font-size:6.5px!important;}
  #tblContainer .tbl-card .tbl-badge{font-size:6.5px!important;padding:3px 4px!important;}
  #tblContainer .tbl-card .tbl-manage-btn{width:28px!important;height:28px!important;min-width:28px!important;font-size:9px!important;}
  #tblContainer .tbl-card .tbl-top{margin-bottom:4px!important;}
  #tblContainer .tbl-card .tbl-body{padding-top:4px!important;}
  #tblContainer .tbl-card .tbl-order-name{font-size:8px!important;}
  #tblContainer .tbl-card :is(.tbl-order-meta,.tbl-empty-hint,.tbl-timer){font-size:7px!important;line-height:1.3!important;}
}
@media screen and (max-width:640px){
  html body .main.main.main.main .tbl-board-head p{font-size:8.5px!important;line-height:1.35!important;}
  html body .main.main.main.main .tbl-board-head .tbl-board-actions :is(.btn-primary,.btn-outline){height:auto!important;min-height:30px!important;padding:6px 8px!important;font-size:8px!important;line-height:1.3!important;gap:4px!important;border-radius:8px!important;}
  html body .main.main.main.main .tbl-board-head .tbl-board-actions :is(button,a) :is(span,i){font-size:8px!important;}
}
/* Settings controls: explicit IDs win over broad module input overrides. */
@media screen{
  #businessAddress,#receiptHeader,#receiptFooter{font-size:10px!important;line-height:1.45!important;}
  #businessLogoInput{display:block;box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:32px!important;max-height:none!important;padding:4px!important;font-size:10px!important;line-height:1.4!important;overflow:hidden!important;}
  #businessLogoInput::file-selector-button{box-sizing:border-box;display:inline-block;max-width:50%;margin:0 5px 0 0;padding:4px 6px;font:inherit;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;}
  .settings-logo-upload,.settings-logo-picker{box-sizing:border-box;min-width:0;max-width:100%;}
}
@media screen and (max-width:640px){
  #businessAddress,#receiptHeader,#receiptFooter{font-size:8px!important;line-height:1.45!important;}
  #businessLogoInput{font-size:8px!important;}
  html body .main .settings-logo-upload{display:grid!important;grid-template-columns:minmax(0,1fr);align-items:start!important;width:100%;gap:7px!important;}
  html body .main .settings-logo-upload:has(img){grid-template-columns:36px minmax(0,1fr);}
  html body .main .settings-logo-upload>img{width:36px!important;height:36px!important;border-radius:9px!important;}
  html body .main .settings-logo-picker{width:100%;}
  html body .main.main .settings-section .payment-options{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;}
  html body .main.main .settings-section .payment-option{min-width:0!important;min-height:34px!important;padding:6px!important;gap:4px!important;border-radius:8px!important;}
  html body .main.main .settings-section .payment-option span{font-size:7.5px!important;line-height:1.3!important;overflow-wrap:anywhere;}
  html body .main.main .settings-section .payment-option input[type="checkbox"]{flex:0 0 12px!important;width:12px!important;height:12px!important;min-width:12px!important;max-width:12px!important;}
}
/* Drawer close action occupies its own column after the brand, on mobile/tablet. */
@media screen and (max-width:992px){
  #sidebar .sidebar-mobile-head{display:flex;align-items:center;gap:8px!important;padding:8px!important;min-height:68px;}
  #sidebar .sidebar-mobile-head .sidebar-brand{order:1;flex:1 1 0%;min-width:0;width:auto;gap:8px;}
  #sidebar .sidebar-mobile-head .sidebar-mobile-back{order:2;flex:0 0 32px;width:32px;height:32px;min-width:32px;margin:0 0 0 auto!important;padding:0;background:transparent;border:1px solid rgba(255,255,255,.12);border-radius:8px;font-size:10px;align-self:center;}
  #sidebar .sidebar-mobile-head .sidebar-mobile-back:hover{background:rgba(255,255,255,.08);}
  #sidebar .sidebar-mobile-head .sidebar-mobile-back i{font-size:10px;}
}
@media screen{
 html body .main.main.main.main .system-center-nav{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;}
 html body .main.main.main.main .system-center-link{min-width:0!important;padding:8px!important;gap:6px!important;}
 html body .main.main.main.main .system-center-icon{width:24px!important;height:24px!important;flex-basis:24px!important;font-size:10px!important;}
 html body .main.main.main.main .system-center-copy{min-width:0;overflow-wrap:anywhere;}
 html body .main.main.main.main .system-center-copy strong{font-size:9px!important;line-height:1.3!important;}
 html body .main.main.main.main .system-center-copy>span{font-size:7.5px!important;line-height:1.35!important;}
 html body .main.main.main.main .system-summary{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;padding:7px!important;}
 html body .main.main.main.main .system-summary>div{min-width:0!important;padding:6px!important;}
 html body .main.main.main.main .system-summary span{font-size:7px!important;overflow-wrap:anywhere;}
 html body .main.main.main.main .system-summary strong{font-size:11px!important;line-height:1.25!important;overflow-wrap:anywhere;}
}
@media screen and (max-width:640px){
 html body .main.main.main.main .system-center-link{flex-direction:column!important;align-items:flex-start!important;padding:6px!important;gap:4px!important;}
 html body .main.main.main.main .system-center-copy strong{font-size:7.5px!important;}
 html body .main.main.main.main .system-center-copy>span{font-size:6.5px!important;}
}
