/* Responsive refinements loaded after the workspace theme. */
.nav-close{display:none}.main,.content,.dashboard-grid,.dashboard-grid>div,.panel,.table-scroll,.queue-card,.settings-card,.catalogue-manager,.catalogue-detail,.permission-layout,.permission-editor{min-width:0}.table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.table-scroll:focus-visible{outline:3px solid #aa92dd;outline-offset:-3px}.select-trigger>span,.select-options>button>span{overflow-wrap:anywhere;white-space:normal;text-align:left}.modal,.drawer{overscroll-behavior:contain}.modal-head{position:sticky;top:0;z-index:12;background:#fff}.modal-body{min-width:0}.catalogue-line-fields>*{min-width:0}.queue-dealer,.detail-item-top h3,.drawer-head h2,.attention-row p,.form-item-summary,.order-summary strong{overflow-wrap:anywhere}
@media(max-width:1024px){.sidebar{width:min(300px,calc(100vw - 40px));transform:translateX(-100%);visibility:hidden;z-index:40;padding:28px 18px max(18px,env(safe-area-inset-bottom));transition:transform .2s ease,visibility .2s;overscroll-behavior:contain}.sidebar.open{transform:translateX(0);visibility:visible}.sidebar .brand{padding-right:28px}.sidebar .brand strong{font-size:1.125rem}.nav-close{display:inline-flex;position:absolute;right:12px;top:22px;color:#e5e9fa;background:#ffffff0c;min-width:40px;min-height:40px}.sidebar-scrim{position:fixed;inset:0;z-index:35;background:#10182e70;border:0;backdrop-filter:blur(3px)}.main{margin-left:0}.mobile-menu{display:inline-flex;min-width:44px;min-height:44px}.topbar{position:sticky;top:0;z-index:25;padding:0 22px;gap:12px;height:68px}.breadcrumbs{min-width:0;gap:10px}.breadcrumbs strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{padding:24px 22px 0}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.queue-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar-bottom{padding-top:26px}.nav-item{min-height:46px}.always-signout{min-height:44px}.modal-overlay{padding:15px}.modal{max-height:calc(100dvh - 30px)}.drawer{max-width:100vw}.header-logout{min-height:44px}}
@media(max-width:760px){.topbar{padding:0 12px;gap:8px}.topbar .icon-btn{min-width:40px;min-height:44px}.topbar-actions{gap:4px}.breadcrumbs{gap:5px;flex:1}.breadcrumbs>span{display:none}.breadcrumbs>svg{display:none}.breadcrumbs strong{max-width:none;font-size:.8125rem}.header-logout{padding:9px 10px;min-height:44px}.content{padding:20px 16px 0}.page-heading{display:block}.heading-actions{margin-top:16px;flex-wrap:wrap}.heading-actions .btn{min-height:44px}.page-heading h1{font-size:1.7rem}.page-heading p{max-width:38ch}.queue-grid,.settings-grid{grid-template-columns:minmax(0,1fr)}.queue-actions{flex-wrap:wrap}.queue-actions .btn{flex:1;min-height:44px}.stat-card{padding:17px 13px}.stat-top>span{font-size:.8125rem}.stat-icon{width:26px;height:26px}.table-toolbar{flex-wrap:wrap;overflow:visible;padding:0 16px;gap:0}.tabs{overflow-x:auto;max-width:100%;gap:19px;scrollbar-width:thin}.tabs button{min-height:44px;flex-shrink:0}.filter-btn{display:inline-flex;min-height:40px;margin:5px 0 11px;font-size:.75rem;padding:8px 11px}.table-search{padding:12px 16px}.table-search input{min-height:44px;font-size:16px}.table-search>span{display:none}
/* Orders become compact cards while their original column labels remain available. */
.orders-table,.team-table,.corrections-table{display:block;min-width:0;width:100%;border-collapse:separate}.orders-table thead,.team-table thead,.corrections-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.orders-table tbody,.team-table tbody,.corrections-table tbody{display:grid;gap:12px;padding:14px;background:#f7f8fc}.orders-table tr,.team-table tr,.corrections-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 12px;position:relative;padding:17px;background:#fff;border:1px solid #e0e3ee;border-radius:12px}.orders-table tr:hover{background:#fcfbff;box-shadow:0 4px 16px #282b5010}.orders-table td,.team-table td,.corrections-table td{display:block;min-width:0;width:auto;height:auto;min-height:0;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;font-size:.8125rem}.orders-table td:before,.team-table td:before,.corrections-table td:before{content:attr(data-label);display:block;color:#7d8297;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.7px;margin-bottom:7px}.orders-table td:first-child{grid-column:1/-1;border-bottom:1px solid #edeef5;padding:0 25px 13px 0}.orders-table td:first-child:before,.orders-table td:last-child:before{display:none}.orders-table td:first-child strong{font-size:.9375rem;color:#35405d}.orders-table .order-code{font-size:.6875rem;margin-bottom:6px}.orders-table td:nth-child(3){grid-column:1/-1;grid-row:4}.orders-table td:nth-child(4){grid-column:2;grid-row:2}.orders-table td:nth-child(5){grid-column:1/-1;grid-row:3}.orders-table td:last-child{position:absolute;right:15px;top:28px;color:#8c7cad}.orders-table .mini-workflow{margin:1px 0 8px}.orders-table .tiny{font-size:.6875rem;line-height:1.6}.orders-table .badge{max-width:100%;white-space:normal}.team-table td:first-child,.team-table td:nth-child(3),.corrections-table td:first-child,.corrections-table td:nth-child(2){grid-column:1/-1}.team-table td:last-child,.corrections-table td:last-child{justify-self:end;align-self:end}.team-table .icon-btn{min-width:44px;min-height:44px}.team-table td:first-child:before{display:none}.corrections-table .wrap-cell{max-width:none}.table-footer{padding:16px}.panel-heading>.btn{white-space:normal}.drawer{width:100%;height:100dvh}.drawer-head{padding:21px 19px}.drawer-body{padding:21px 17px max(24px,env(safe-area-inset-bottom))}.drawer-head .icon-btn,.modal-head .icon-btn{min-width:44px;min-height:44px}.detail-item-top h3{display:block}.detail-item-top .thickness-chip{display:inline-flex;margin-top:6px}.row-actions{flex-wrap:wrap}.row-actions .btn,.text-btn,.size-chip button,.add-size{min-height:44px}.size-chip button{min-width:34px}.order-summary{gap:18px 12px}.modal-overlay{padding:8px;align-items:center}.modal{width:100%;border-radius:16px;max-height:calc(100dvh - 16px)}.modal-head{padding:16px}.modal-body{padding:20px 16px max(20px,env(safe-area-inset-bottom))}.form-actions{flex-wrap:wrap}.form-actions .btn{flex:1;white-space:normal;min-width:100px;min-height:46px}.field input,.field select,.field textarea,.select-search input{font-size:16px}.select-trigger{min-height:48px;font-size:16px}.select-options{max-height:min(220px,35dvh)}.select-options>button{min-height:44px}.catalogue-line-fields{grid-template-columns:minmax(0,1fr)}.catalogue-detail .panel-heading{flex-wrap:wrap}.permission-role-list>button{min-height:44px}.permission-row select{min-height:48px}.permission-save{position:static}.permission-save .row-actions{flex-wrap:wrap}.attention-row>div{min-width:0;flex-basis:calc(100% - 45px)}.info-note p,.error-banner span{min-width:0;overflow-wrap:anywhere}.setup-note{flex-wrap:wrap}.app-footer>span{flex-wrap:wrap}.toast{max-width:calc(100vw - 24px);bottom:max(12px,env(safe-area-inset-bottom));overflow-wrap:anywhere}.toast .icon-btn{min-height:40px;min-width:40px}}
@media(max-width:360px){.content{padding:18px 12px 0}.topbar{padding:0 8px}.header-logout span{display:none}.header-logout{min-width:40px;justify-content:center}.stat-card{padding:15px 11px}.stat-icon{display:none}.orders-table tbody,.team-table tbody,.corrections-table tbody{padding:10px}.orders-table tr,.team-table tr,.corrections-table tr{padding:14px}.install-card-top{gap:9px}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}
@media print{.nav-close,.sidebar-scrim{display:none!important}.orders-table,.team-table,.corrections-table{display:table;min-width:0}.orders-table thead,.team-table thead,.corrections-table thead{position:static;display:table-header-group;width:auto;height:auto;clip:auto;overflow:visible}.orders-table tbody,.team-table tbody,.corrections-table tbody{display:table-row-group;padding:0}.orders-table tr,.team-table tr,.corrections-table tr{display:table-row}.orders-table td,.team-table td,.corrections-table td{display:table-cell;position:static;padding:10px;border-bottom:1px solid #ddd}.orders-table td:before,.team-table td:before,.corrections-table td:before{display:none}}

@media(max-width:760px){.order-panel>.panel-heading{position:relative;padding-right:67px}.order-panel>.panel-heading>.icon-btn{position:absolute;right:14px;top:16px;min-width:44px;min-height:44px}}

/* Product catalogue: keep the searchable category dropdown inside the card.
   Opening it adds natural height; long lists scroll inside the options area. */
.catalogue-manager > .catalogue-categories {
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: visible;
  align-self: start;
}
.catalogue-categories .category-picker .select-popover {
  position: static;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  box-sizing: border-box;
  box-shadow: none;
}
.catalogue-categories .category-picker .select-options {
  max-height: 240px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 760px) {
  .catalogue-categories .category-picker .select-options {
    max-height: min(240px, 40dvh);
  }
}

/* Inline order entry and order detail workspace */
.inline-create,.order-detail-page{padding:24px;margin-bottom:22px;overflow:visible;min-width:0}
.inline-panel-head h2{font-size:1.125rem;margin:0 0 6px;color:var(--ink,#24344a)}
.inline-panel-head p{margin:0 0 22px;color:#718398;font-size:.875rem;line-height:1.55}
.order-create-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start}
.order-create-fields .field{margin:0;min-width:0}
.inline-actions{display:flex;justify-content:flex-end;margin-top:16px;gap:10px}
.order-detail-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:20px;border-bottom:1px solid #e2e7ef;flex-wrap:wrap}
.order-detail-header h2{font-size:1.6rem;margin:6px 0;overflow-wrap:anywhere}
.order-detail-header .muted{overflow-wrap:anywhere}
.order-detail-body{padding-top:20px;min-width:0}
.order-detail-page .order-summary{margin-bottom:24px}
.order-detail-page .detail-heading{margin:20px 0 12px}
.inline-line-wrap{margin:12px 0 20px;min-width:0}
.inline-line{margin:0;padding:20px;overflow:visible}
.inline-line .catalogue-line-fields{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:14px;margin-bottom:18px}
.inline-line .catalogue-line-fields>.field{grid-column:auto;min-width:0;margin:0}
.inline-line .select-popover{position:relative;inset:auto;top:auto;margin-top:6px;width:100%;z-index:2}
.inline-line>.field{margin:0}.inline-line textarea{min-height:110px;resize:vertical;width:100%}
.line-label{font-size:.75rem;font-weight:700;color:#6352cc;margin-bottom:7px;text-transform:uppercase;letter-spacing:.06em}
.line-remark{background:#f6f5ff;border:1px solid #e6e2f5;border-radius:8px;margin:12px 0;padding:12px;color:#414561;overflow-wrap:anywhere}
.line-remark strong{font-size:.75rem}.line-remark p{font-size:.875rem;white-space:pre-wrap;margin:5px 0 0;line-height:1.55}
@media(max-width:1250px){.order-create-fields,.inline-line .catalogue-line-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.inline-create,.order-detail-page{padding:16px;margin-bottom:16px}.order-create-fields,.inline-line .catalogue-line-fields{grid-template-columns:minmax(0,1fr);gap:15px}.inline-line{padding:14px}.inline-actions>.btn{width:100%;min-height:46px}.order-detail-header h2{font-size:1.35rem}.order-detail-header>.btn{width:100%}}

/* Order-level workflow and compact thickness schedule */
.order-workflow { margin: 18px 0 26px; }
.order-workflow h3 { font-size: 15px; margin: 0 0 12px; }
.order-workflow .item-stages { margin: 0; }
.order-remark p { white-space: pre-wrap; overflow-wrap: anywhere; }
.compact-order-lines { border: 1px solid #dce5ee; border-radius: 12px; padding: 8px 20px 0; margin: 16px 0 20px; background: #fff; }
.compact-thickness { padding: 14px 0; border-bottom: 1px solid #e5eaf1; }
.compact-thickness:last-of-type { border-bottom: 0; }
.compact-thickness-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.compact-thickness-title strong { font-size: 19px; color: #202a48; }
.compact-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; min-height: 38px; padding: 3px 0 3px 18px; }
.compact-line-values { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 16px; }
.compact-line-values strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.compact-line-values small { color: #687b91; font-size: 12px; }
.compact-line.cancelled .compact-line-values { opacity: .65; }
.compact-line .row-actions { margin: 0; gap: 5px; }
.compact-line .data-warning { flex-basis:100%; }
.compact-order-lines .order-total { padding: 12px 0; margin: 0; }
.order-queue-grid .compact-order-lines { padding: 0 12px; }
.order-queue-grid .compact-line { padding-left: 5px; }
.order-queue-grid .compact-thickness-title strong { font-size: 16px; }
.order-queue-grid .compact-line-values { font-size: 14px; }
.order-create-fields input[readonly] { background: #f2f4f9; color: #34415e; }
@media(max-width: 600px) {
 .compact-order-lines { padding: 3px 12px 0; }
 .compact-line { padding-left: 6px; }
 .compact-line .row-actions { margin-left: auto; }
 .compact-line-values { font-size: 14px; gap: 5px; }
 .compact-thickness-title strong { font-size: 17px; }
 .order-workflow .item-stages { grid-template-columns: 1fr; }
}

/* Collapsible product schedule in workflow queues (not order details). */
.order-queue-grid { align-items: start; }
.queue-lines-disclosure { margin: 16px 0 20px; border: 1px solid #dce5ee; border-radius: 11px; background: #fff; min-width: 0; }
.queue-lines-disclosure > summary { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 54px; cursor: pointer; list-style: none; border-radius: 10px; color: #33415e; }
.queue-lines-disclosure > summary::-webkit-details-marker { display: none; }
.queue-lines-disclosure > summary:hover { background: #f5f4fc; }
.queue-lines-disclosure > summary:focus-visible { outline: 2px solid #6552ce; outline-offset: 2px; }
.queue-lines-heading { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.queue-lines-heading strong { font-size: 14px; }
.queue-lines-heading small { font-size: 12px; color: #687b91; }
.queue-lines-total { font-size: 13px; font-weight: 650; text-align: right; overflow-wrap: anywhere; color: #33415e; }
.queue-lines-disclosure > summary > svg { flex-shrink: 0; color: #6552ce; }
.queue-lines-disclosure[open] > summary { border-bottom: 1px solid #e5eaf1; border-radius: 10px 10px 0 0; }
.queue-lines-disclosure[open] > summary > svg { transform: rotate(180deg); }
.order-queue-grid .queue-lines-disclosure > .compact-order-lines { margin: 0; border: 0; border-radius: 0 0 10px 10px; }
.queue-lines-disclosure .order-total { display: none; }
@media(max-width: 600px) { .queue-lines-disclosure > summary { min-height: 56px; gap: 8px; } }
