.line-sort-column { min-width: 138px; }
.line-sort-cell { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 4px; min-width: 138px; background: #f7fbfa; }
.line-drag-handle { min-height: 30px; border: 1px solid #c8d8d5; border-radius: 7px; background: #fff; color: #4b716b; font-weight: 900; cursor: grab; }
.line-dragging { opacity: .52; outline: 2px dashed #238678; }
.line-kind-badge { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 850; }
.line-kind-badge.product { background: #dff1ec; color: #176153; }
.line-kind-badge.accessory { background: #fff0d8; color: #945913; }
.order-line-product > td { background: #fbfefd; }
.order-line-accessory > td { background: #fffaf1; }
.order-line-product:hover > td { background: #f2faf7; }
.order-line-accessory:hover > td { background: #fff4df; }
.order-line-product > td:first-child { box-shadow: inset 4px 0 #4aa391; }
.order-line-accessory > td:first-child { box-shadow: inset 4px 0 #e09b3d; }
.order-line-product .line-kind-badge,
.order-line-accessory .line-kind-badge { margin-right: 6px; vertical-align: middle; }
html, body { overscroll-behavior-y: auto; }
.modal-body, .table-wrap, .line-editor, .ai-chat-log { overscroll-behavior: contain; }

/* V2.8.1 Medline plan center */
.medline-nav b { display:inline-grid; place-items:center; width:25px; height:25px; border-radius:8px; background:#dceeea; color:#16675e; font-weight:900; }
.medline-home-entry { width:100%; margin:0 0 16px; padding:17px 20px; border:1px solid #b9d8d2; border-radius:16px; background:linear-gradient(110deg,#f2faf8,#fff 68%); color:#173c38; display:flex; align-items:center; gap:15px; text-align:left; box-shadow:0 5px 18px rgba(26,84,76,.07); cursor:pointer; }
.medline-home-entry:hover { border-color:#5ca79c; transform:translateY(-1px); box-shadow:0 8px 22px rgba(26,84,76,.12); }
.medline-home-entry > span:first-child { display:grid; place-items:center; width:46px; height:46px; flex:none; border-radius:14px; background:#176f66; color:#fff; font-size:23px; }
.medline-home-entry > span:nth-child(2) { display:grid; gap:3px; }
.medline-home-entry strong { font-size:17px; }
.medline-home-entry small { color:#66817d; }
.medline-home-entry em { margin-left:auto; color:#176f66; font-style:normal; font-weight:800; }
.medline-page { display:grid; gap:16px; min-width:0; }
.medline-tabs { display:flex; gap:5px; width:max-content; max-width:100%; padding:5px; border:1px solid #d5e2df; border-radius:13px; background:#edf4f2; }
.medline-tabs button { border:0; border-radius:9px; padding:10px 18px; background:transparent; color:#4b6763; font-weight:800; cursor:pointer; }
.medline-tabs button.active { background:#fff; color:#145e56; box-shadow:0 2px 10px rgba(34,81,75,.12); }
.medline-kpis { display:grid; grid-template-columns:repeat(5,minmax(130px,1fr)); gap:12px; }
.medline-kpis article { min-height:104px; padding:17px; border:1px solid #d8e4e1; border-radius:15px; background:#fff; display:grid; gap:7px; box-shadow:0 4px 14px rgba(30,65,61,.05); }
.medline-kpis article.warn { border-color:#f0c98b; background:#fffaf1; }
.medline-kpis span { color:#607b77; font-weight:700; }
.medline-kpis strong { color:#173f3a; font-size:30px; line-height:1; }
.medline-dashboard-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr); gap:16px; }
.medline-agenda { padding:8px 14px 16px; display:grid; gap:7px; }
.medline-agenda > button { width:100%; border:0; border-radius:12px; padding:10px 12px; background:#f7faf9; display:grid; grid-template-columns:54px minmax(0,1fr) auto; align-items:center; gap:11px; text-align:left; color:inherit; cursor:pointer; }
.medline-agenda > button:hover { background:#edf7f4; }
.medline-agenda > button > span:nth-child(2) { display:grid; gap:4px; min-width:0; }
.date-block { width:48px; height:48px; display:grid; place-items:center; align-content:center; border-radius:11px; background:#dfeeea; color:#17675d; font-size:11px; }
.date-block b { font-size:18px; line-height:1; }
.medline-doc-summary { min-height:215px; padding:22px; display:flex; align-items:center; justify-content:center; gap:24px; }
.medline-doc-summary p { max-width:310px; line-height:1.7; }
.donut { --value:0; width:126px; height:126px; flex:none; border-radius:50%; background:conic-gradient(#258579 calc(var(--value)*1%),#e5efed 0); display:grid; place-items:center; position:relative; }
.donut::before { content:""; position:absolute; inset:13px; border-radius:50%; background:#fff; }
.donut strong { position:relative; color:#176b61; font-size:23px; }
.medline-status-filter { margin:0; }
.medline-toolbar { flex-wrap:wrap; justify-content:flex-end; }
.medline-table-wrap { max-height:calc(100vh - 255px); min-height:390px; overflow:auto; }
.medline-table { min-width:1840px; }
.medline-table thead { position:sticky; top:0; z-index:4; }
.medline-table th:first-child,.medline-table td:first-child { position:sticky; left:0; z-index:3; background:#fff; }
.medline-table thead th:first-child { z-index:5; background:#e8f2f0; }
.medline-table td { vertical-align:top; }
.link-button { border:0; padding:0; background:transparent; color:#146f65; font-weight:850; text-align:left; cursor:pointer; }
.link-button:hover { text-decoration:underline; }
.medline-table td > small,.medline-items small,.medline-file-index small { display:block; margin-top:5px; color:#78908c; }
.medline-items { display:grid; grid-template-columns:minmax(110px,1fr) auto; gap:3px 9px; }
.medline-progress { width:82px; height:7px; margin:4px 0 3px; border-radius:999px; overflow:hidden; background:#e3ecea; }
.medline-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#42a494,#177568); }
.success-text { color:#2c7568!important; }
.medline-file-index { padding:10px 16px 18px; display:grid; gap:8px; }
.medline-file-index > button { border:1px solid #dce6e4; border-radius:12px; background:#fff; padding:12px 14px; display:grid; grid-template-columns:minmax(200px,.7fr) minmax(330px,1.5fr) auto; align-items:center; gap:14px; color:inherit; text-align:left; cursor:pointer; }
.medline-file-index > button:hover { border-color:#79b8ad; background:#f8fcfb; }
.medline-file-index > button > span:first-child { display:grid; gap:4px; }
.medline-file-index em { display:inline-flex; margin:2px 4px 2px 0; padding:4px 8px; border-radius:999px; background:#edf6f4; color:#2c6c64; font-style:normal; font-size:12px; font-weight:750; }
.medline-file-index b { color:#187167; }
.medline-detail-head { display:grid; gap:14px; }
.medline-detail-head > div:first-child { display:flex; align-items:center; gap:12px; }
.medline-totals { display:grid; grid-template-columns:repeat(5,minmax(120px,1fr)); gap:9px; }
.medline-totals span { padding:10px 12px; border:1px solid #d8e5e2; border-radius:11px; background:#f8fbfa; color:#718783; }
.medline-totals strong { display:block; margin-top:5px; color:#1b514b; font-size:16px; }
.medline-doc-actions { display:flex; justify-content:flex-end; gap:8px; margin-bottom:10px; }
.medline-doc-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.medline-doc-group { min-width:0; border:1px solid #dbe5e3; border-radius:13px; background:#fbfdfc; overflow:hidden; }
.medline-doc-group > header { min-height:46px; padding:9px 12px; border-bottom:1px solid #e2eae8; background:#f1f7f5; display:flex; align-items:center; gap:8px; }
.medline-doc-group h4 { margin:0; }
.medline-doc-group > header button { margin-left:auto; }
.medline-doc-group > div { padding:8px; display:grid; gap:6px; }
.medline-file-card { min-height:53px; padding:8px 9px; border:1px solid #e2e9e7; border-radius:10px; background:#fff; display:flex; align-items:center; justify-content:space-between; gap:9px; }
.medline-file-card.legacy { background:#f7f7f5; border-style:dashed; }
.medline-file-card label { min-width:0; display:flex; align-items:center; gap:9px; }
.medline-file-card i { flex:none; font-style:normal; font-size:21px; }
.medline-file-card span { min-width:0; display:grid; gap:3px; }
.medline-file-card strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.medline-file-card small { color:#7b8e8a; }
.medline-file-card > div { display:flex; flex:none; gap:4px; }
.medline-import-summary { margin-bottom:12px; padding:15px; border-radius:12px; background:#eef8f5; color:#245f57; text-align:center; }
.medline-import-summary strong { margin:0 4px 0 10px; font-size:24px; }
@media (max-width:1180px){.medline-kpis{grid-template-columns:repeat(3,1fr)}.medline-dashboard-grid{grid-template-columns:1fr}.medline-totals{grid-template-columns:repeat(3,1fr)}}
@media (max-width:760px){.medline-home-entry em{display:none}.medline-tabs{width:100%}.medline-tabs button{flex:1;padding:9px 7px}.medline-kpis{grid-template-columns:repeat(2,1fr)}.medline-doc-grid{grid-template-columns:1fr}.medline-file-index>button{grid-template-columns:1fr}.medline-totals{grid-template-columns:repeat(2,1fr)}}

/* V2.8.1: keep outbound/container photos compact in the first-level order table. */
.workflow-table .photo-files .table-file-stack { max-height: 76px; }
.workflow-table .photo-files .table-file-item { grid-template-columns: minmax(0,1fr) auto; min-height: 31px; }
.workflow-table .photo-files .table-file-item > span:first-child { max-width: 126px; }

/* V2.8.2 Medline catalogue, compact workspace and paged image viewer. */
.medline-compact-entry { min-height:42px; padding:5px 10px 5px 6px; border:1px solid #b8d7d1; border-radius:12px; background:linear-gradient(135deg,#f1faf8,#fff); color:#174c46; display:inline-flex; align-items:center; gap:8px; text-align:left; box-shadow:0 3px 10px rgba(24,95,86,.08); cursor:pointer; }
.medline-compact-entry:hover { border-color:#4b9c90; box-shadow:0 5px 14px rgba(24,95,86,.14); transform:translateY(-1px); }
.medline-compact-entry > b { display:grid; place-items:center; width:31px; height:31px; border-radius:9px; background:#176f66; color:#fff; font-size:16px; }
.medline-compact-entry > span { display:grid; gap:1px; line-height:1.1; }
.medline-compact-entry strong { font-size:13px; white-space:nowrap; }
.medline-compact-entry small { color:#68827e; font-size:10px; white-space:nowrap; }
.medline-compact-entry em { color:#167066; font-style:normal; font-weight:900; }

.medline-product-panel .panel-head > div:first-child { min-width:230px; }
.medline-product-panel .panel-head h3 { margin-bottom:4px; }
.medline-product-table-wrap { height:var(--oms-table-height,calc(100vh - 375px)); min-height:min(360px,var(--oms-table-height,calc(100vh - 375px))); max-height:var(--oms-table-height,calc(100vh - 375px)); overflow:auto; }
.medline-product-table { min-width:1840px; }
.medline-product-table thead { position:sticky; top:0; z-index:4; }
.medline-product-table th:first-child,.medline-product-table td:first-child { position:sticky; left:0; z-index:3; background:#fff; }
.medline-product-table thead th:first-child { z-index:5; background:#e8f2f0; }
.medline-product-table td > small { display:block; margin-top:4px; color:#728986; }
.medline-product-table .warn-text { color:#a25f15; font-weight:750; }
.medline-history-wrap { max-height:410px; overflow:auto; }
.medline-line-editor table { min-width:3100px; }
.medline-line-editor input { min-width:116px; }
.medline-line-editor [data-medline-line="declaration_elements"] { min-width:230px; }
.medline-autofill-note { margin:15px 0 8px; border-color:#b5d8d1; background:#eff9f6; color:#245e57; }

.attachment-gallery { display:grid; gap:12px; min-height:0; }
.attachment-gallery-stage { min-height:360px; height:min(68vh,720px); padding:12px; border:1px solid #d7e3e0; border-radius:14px; background:#edf3f1; display:grid; place-items:center; overflow:hidden; }
.attachment-gallery-stage img { display:block; max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; border-radius:8px; box-shadow:0 7px 24px rgba(20,45,41,.16); }
.attachment-gallery-meta { min-width:0; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.attachment-gallery-meta > span { min-width:0; display:grid; gap:3px; }
.attachment-gallery-meta strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attachment-gallery-meta small { color:#6d8380; }
.table-file-actions button { border:0; padding:0; background:transparent; color:#176e64; font:inherit; cursor:pointer; }
.table-file-actions button:hover { text-decoration:underline; }

@media (min-width:1051px) {
  #content.order-action-rail { padding-left:246px !important; }
  #content.order-action-rail.rail-collapsed { padding-left:54px !important; }
  .action-dock.action-rail { left:14px; width:220px; bottom:14px; max-height:none; border-radius:16px; }
  .action-dock.action-rail .selection-copy { padding:12px 12px 9px; }
  .action-dock.action-rail .selection-copy strong { font-size:15px; }
  .action-dock.action-rail .action-scroll { padding:8px; gap:6px; }
  .action-dock.action-rail .action-scroll .btn { width:100%; min-height:39px; justify-content:flex-start; padding:8px 11px; border-radius:10px; font-size:13px; }
}

.order-status-filter-bar { padding:8px 10px; gap:7px; border-top:1px solid #e3ebe9; background:linear-gradient(180deg,#fbfdfd,#f5f9f8); }
.order-status-filter { min-width:84px; min-height:48px; border-radius:11px !important; display:grid !important; grid-template-columns:1fr auto; align-items:center; gap:7px; padding:7px 9px !important; text-align:left; }
.order-status-filter span { font-size:12px; line-height:1.25; }
.order-status-filter strong { display:grid; place-items:center; min-width:25px; height:25px; padding:0 5px; border-radius:999px; background:rgba(27,105,96,.10); color:#176c63; font-size:12px; }
.order-status-filter.active strong { background:#fff; color:#126158; }
.workflow-table-scroll { height:var(--oms-table-height,calc(100vh - 230px)) !important; max-height:var(--oms-table-height,calc(100vh - 230px)) !important; min-height:min(360px,var(--oms-table-height,calc(100vh - 230px))) !important; }

.medline-table-wrap { height:var(--oms-table-height,calc(100vh - 340px)); max-height:var(--oms-table-height,calc(100vh - 340px)); }
@media (max-width:1050px){.medline-compact-entry small{display:none}.attachment-gallery-stage{height:62vh;min-height:280px}}
@media (max-width:760px){.medline-tabs{overflow:auto}.medline-tabs button{min-width:100px}.medline-compact-entry span{display:none}.attachment-gallery-stage{height:56vh;min-height:230px}}

/* V2.8.3 unified Medline entry, viewport-fitted lists and complete photos. */
.medline-nav { display:none !important; }
.medline-page { gap:12px; }
.medline-page > .medline-tabs { position:sticky; top:78px; z-index:12; width:fit-content; box-shadow:0 5px 16px rgba(23,72,66,.08); }
.medline-page > .status-filter { margin-bottom:0; }
.medline-status-filter {
  display:flex; gap:7px; width:100%; padding:7px; overflow-x:auto;
  border:1px solid #d8e4e1; border-radius:13px; background:#f3f8f6;
}
.medline-status-filter button {
  flex:0 0 auto; min-height:42px; padding:8px 13px; border:1px solid #d3e0dd;
  border-radius:10px; background:#fff; color:#46635f; font-weight:800;
  box-shadow:0 2px 7px rgba(28,73,67,.04);
}
.medline-status-filter button:hover { border-color:#7db4ab; background:#f7fcfa; }
.medline-status-filter button.active { border-color:#176f66; background:#176f66; color:#fff; }
.medline-table-wrap,
.medline-product-table-wrap,
.workflow-table-scroll { min-height:min(280px,var(--oms-table-height,280px)) !important; }

.medline-compact-entry { border-color:#afcec8; background:#f5faf9; box-shadow:none; }
.medline-compact-entry:hover { background:#edf7f4; box-shadow:0 4px 12px rgba(24,95,86,.10); }
.medline-compact-entry > b { width:29px; height:29px; border-radius:8px; font-size:14px; }

@media (min-width:1051px) {
  html:not(.oms-compact-layout) .action-dock.action-rail { top:var(--oms-action-rail-top,146px) !important; }
  html:not(.oms-compact-layout) .action-dock.action-rail.collapsed {
    width:42px !important; padding:39px 7px 8px; overflow:visible;
  }
}
.action-rail-toggle { display:grid; place-items:center; padding:0; }
.action-dock.action-rail.collapsed { overflow:visible; }

.modal-panel.attachment-gallery-modal {
  width:min(1500px,calc(100vw - 24px)) !important;
  height:min(900px,calc(var(--oms-layout-height,100vh) - 24px)) !important;
  max-height:calc(var(--oms-layout-height,100vh) - 24px) !important;
}
.attachment-gallery-modal .modal-body { display:flex; overflow:hidden; padding:12px; }
.attachment-gallery-modal #attachmentGalleryBody { flex:1 1 auto; min-width:0; min-height:0; }
.attachment-gallery-modal .attachment-gallery { height:100%; grid-template-rows:minmax(0,1fr) auto; }
.attachment-gallery-modal .attachment-gallery-stage { position:relative; width:100%; height:auto; min-height:0; overflow:hidden; }
.attachment-gallery-modal .attachment-gallery-stage img {
  position:absolute; inset:12px; width:calc(100% - 24px); height:calc(100% - 24px);
  max-width:none; max-height:none; object-fit:contain;
}
.attachment-gallery-actions { display:flex; flex:none; gap:8px; }

html.oms-compact-layout .action-dock.action-rail { top:auto !important; }
@media (max-width:1050px) {
  .action-dock.action-rail { top:auto !important; }
  .medline-page > .medline-tabs { top:116px; }
}
@media (max-width:760px) {
  .attachment-gallery-modal .modal-body { padding:8px; }
  .attachment-gallery-meta { align-items:flex-start; }
  .attachment-gallery-actions { flex-wrap:wrap; justify-content:flex-end; }
}

/* V2.8.4 workspace layout: compact hierarchy, grouped actions and lists that
   consume the real remaining browser height at every supported zoom. */
.main.single-entry { padding-bottom:12px; }
.topbar { padding:16px 4px 12px; }
.topbar .eyebrow { margin-bottom:3px; }
.topbar h2 { font-size:24px; }
.topbar p:last-child { margin-top:3px; }

@media (min-width:1051px) {
  #content.order-action-rail {
    display:grid !important;
    grid-template-columns:238px minmax(0,1fr);
    grid-template-rows:minmax(0,1fr);
    gap:12px;
    height:var(--oms-content-height,calc(100vh - 150px));
    min-height:360px;
    padding:0 !important;
  }
  #content.order-action-rail.rail-collapsed { grid-template-columns:42px minmax(0,1fr); padding:0 !important; }
  #content.order-action-rail > .panel {
    grid-column:2;
    grid-row:1;
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
  }
  #content.order-action-rail > .panel > .workflow-table-scroll {
    flex:1 1 auto;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
  }
  #content.order-action-rail > .action-dock.action-rail {
    position:relative !important;
    inset:auto !important;
    grid-column:1;
    grid-row:1;
    width:auto !important;
    height:100%;
    max-height:none;
    min-height:0;
    padding:0;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    overflow:hidden;
    border:1px solid #c7d9d5;
    border-radius:16px;
    background:#fff;
    box-shadow:0 9px 26px rgba(24,68,63,.09),inset 0 3px #168779;
    backdrop-filter:none;
  }
  #content.order-action-rail > .action-dock.action-rail.collapsed { padding:0 !important; overflow:hidden; }
  #content.order-action-rail > .action-dock.action-rail.collapsed > :not(.action-rail-toggle) { display:none !important; }
  #content.order-action-rail > .action-dock.action-rail.collapsed .action-rail-toggle {
    position:static;
    width:100%;
    height:100%;
    border:0;
    border-radius:0;
    background:linear-gradient(180deg,#eef7f4,#fff);
    color:#176d63;
    font-size:24px;
  }
}

.action-rail .action-rail-toggle {
  position:absolute;
  top:10px;
  right:9px;
  z-index:3;
  width:27px;
  height:27px;
  border:1px solid #c9dcd8;
  border-radius:8px;
  background:#f5faf8;
  color:#17675e;
  font-size:18px;
}
.action-rail .selection-copy {
  flex:none;
  width:auto;
  min-width:0 !important;
  padding:17px 42px 12px 15px !important;
  border:0 !important;
  border-bottom:1px solid #dbe7e4 !important;
  background:linear-gradient(135deg,#eef8f5,#fbfdfc);
}
.action-rail .selection-copy strong { color:#164f48; font-size:14px; }
.action-rail .selection-copy small { margin-top:3px; font-size:11px; line-height:1.35; }
.action-rail .selection-tools {
  flex:none;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:9px 10px;
  border-bottom:1px solid #e2ebe9;
}
.action-rail .selection-tools .btn { min-height:31px; padding:5px 6px; justify-content:center; font-size:11px; }
.action-rail .action-scroll {
  flex:1 1 auto;
  min-height:0;
  display:block;
  padding:8px 9px 11px;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-gutter:stable;
}
.action-rail .action-group { margin:0; padding:0; }
.action-rail .action-group + .action-group { margin-top:9px; padding-top:8px; border-top:1px solid #e3ece9; }
.action-rail .action-group h4 { margin:0 4px 6px; color:#6d837f; font-size:10px; line-height:1; letter-spacing:.10em; }
.action-rail .action-group-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.action-rail .action-scroll .action-group-buttons .btn {
  position:relative;
  width:100%;
  min-height:34px;
  justify-content:flex-start;
  padding:6px 10px 6px 31px;
  border-color:#d3e0dd;
  border-radius:9px;
  background:#fff;
  color:#315650;
  font-size:12px;
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:none;
}
.action-rail .action-scroll .action-group-buttons .btn::before {
  position:absolute;
  left:10px;
  top:50%;
  transform:translateY(-50%);
  width:14px;
  color:#29776d;
  text-align:center;
  font-weight:900;
}
.action-rail .action-scroll .action-group-buttons .btn:hover { border-color:#79ada5; background:#f3faf8; transform:none; }
.action-rail #actImport { border-color:#17766b; background:#17766b; color:#fff; }
.action-rail #actImport:hover { background:#105f57; }
.action-rail #actImport::before,.action-rail #actNew::before { content:'+'; }
.action-rail #actImportExcel::before,.action-rail #actExport::before { content:'\21E9'; }
.action-rail #actEdit::before { content:'\270E'; }
.action-rail #actCopy::before { content:'\29C9'; }
.action-rail #actPI::before { content:'PI'; font-size:9px; }
.action-rail #actNotice::before,.action-rail #actInbound::before { content:'\2713'; }
.action-rail #actInspect::before,.action-rail #actRework::before { content:'\25CE'; }
.action-rail #actBooking::before,.action-rail #actBookingView::before { content:'\2691'; }
.action-rail #actOutbound::before,.action-rail #actOutboundView::before { content:'\21E2'; }
.action-rail #actCustoms::before,.action-rail #actClearance::before { content:'\25A4'; }
.action-rail #actFinance::before { content:'$'; }
.action-rail #actDelete { margin-left:0; border-color:#efcdcf; color:#a43d43; }
.action-rail #actDelete::before { content:'\00D7'; color:#b13e45; }

.order-status-filter-bar { padding:7px 9px; background:#f5f9f8; }
.order-status-filter { min-height:42px; min-width:80px; padding:6px 8px !important; }
.order-status-filter strong { min-width:23px; height:23px; }

.medline-page {
  height:var(--oms-content-height,calc(100vh - 150px));
  min-height:300px;
  gap:10px;
}
.medline-page > .medline-tabs { position:static; top:auto; box-shadow:none; }
.medline-tab-overview,.medline-tab-files {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:4px;
  scrollbar-gutter:stable;
}
.medline-tab-plans,.medline-tab-products {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr);
  align-items:center;
  overflow:hidden;
}
.medline-tab-plans > .medline-tabs,.medline-tab-products > .medline-tabs { grid-column:1; grid-row:1; }
.medline-tab-plans > .medline-status-filter { grid-column:2; grid-row:1; min-width:0; }
.medline-tab-plans > .panel,.medline-tab-products > .panel {
  grid-column:1 / -1;
  grid-row:2;
  align-self:stretch;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.medline-tab-plans .medline-table-wrap,.medline-tab-products .medline-product-table-wrap {
  flex:1 1 auto;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
}
.medline-tabs { padding:4px; }
.medline-tabs button { min-height:36px; padding:7px 14px; }
.medline-status-filter { min-height:46px; padding:5px; }
.medline-status-filter button { min-height:34px; padding:6px 11px; }
.medline-kpis { gap:10px; }
.medline-kpis article { min-height:88px; padding:14px 16px; }
.medline-kpis strong { font-size:27px; }

@media (max-width:1050px) {
  .main.single-entry { padding-bottom:104px; }
  .medline-page { height:auto; min-height:0; overflow:visible; }
  .medline-tab-plans,.medline-tab-products { display:grid; grid-template-columns:1fr; grid-template-rows:auto auto minmax(300px,1fr); overflow:visible; }
  .medline-tab-plans > .medline-tabs,.medline-tab-products > .medline-tabs { grid-column:1; grid-row:1; }
  .medline-tab-plans > .medline-status-filter { grid-column:1; grid-row:2; }
  .medline-tab-plans > .panel,.medline-tab-products > .panel { grid-column:1; grid-row:3; }
}
