/* ═══════════════════════════════════════════════════════════════════
   flat.css - shared "flat list" look (no cards). Load AFTER the page's
   own <style>. Used by: Order Tagger, Manufacturing Setup, Inventory,
   Procurement, Account Management. (Order Management carries the same
   rules inline.)  Panels become full-width white areas split by faint
   grey dividers; headers are a tinted strip; controls are squarer.
   ═══════════════════════════════════════════════════════════════════ */
#content{padding:0}
:is(.ms-panel,.pr-panel){margin-top:0;min-height:0}

/* grids -> one white surface, panes split by a faint grey line */
:is(.ms-grid,.im-grid,.pr-grid,.sug-view,.cl-cards){margin-top:0;gap:0;background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
/* a lone card in a panel */
:is(.ms-panel,.pr-panel)>:is(.ms-card,.pr-card){background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}

/* cards -> flat panes */
:is(.ms-card,.im-card,.pr-card){background:transparent;border:0;border-radius:0;box-shadow:none;padding:0}
:is(.ms-card,.im-card,.pr-card) .card-top{box-sizing:border-box;height:56px;min-height:56px;margin:0;padding:0 24px;align-items:center;border-bottom:1px solid var(--line);background:var(--w-fbf7f3,#FBF7F3);gap:10px 14px}
:is(.ms-card,.im-card,.pr-card) .card-top h2,:is(.ms-card,.im-card,.pr-card)>h2{font-size:1rem}
:is(.ms-card,.im-card,.pr-card) .card-body{padding:18px 24px}
/* content that sits directly in a pane (not inside .card-body) */
:is(.ms-card,.im-card,.pr-card)>:not(.card-top):not(.card-body):not(.sk-layer):not([hidden]):not(.save-overlay):not(.stock-wrap){margin-left:24px;margin-right:24px}
:is(.ms-card,.im-card,.pr-card)>:not(.card-top):not(.stock-wrap):nth-child(2){margin-top:16px}
:is(.ms-card,.im-card,.pr-card)>:last-child:not(.card-top):not(.stock-wrap){margin-bottom:16px}
/* full-width table wrapper: runs edge to edge against the separator lines */
.im-card>.stock-wrap{margin:0}

:is(.ms-grid,.im-grid,.pr-grid,.sug-view,.cl-cards)>*+*:is(.ms-card,.im-card,.pr-card){border-left:1px solid #E3E3E6}

/* controls: squarer, no glow */
:is(.search,.cl-search) input{height:34px;padding-top:0;padding-bottom:0;border-radius:8px;border-width:1px;border-color:var(--w-e6d6c8,#E6D6C8);background:#fff;font-size:.84rem}
.modal-input{border-radius:8px}
:is(.btn-add,.ot-submit,.ot-complete,.ob-cancel,.tk-go,.sug-gen,.fl-btn,.ph-btn,.rg-btn,.js-edit,.fc-save){border-radius:8px;box-shadow:none}
:is(.btn-add,.ot-submit,.ot-complete,.ob-cancel,.tk-go,.sug-gen,.fl-btn,.ph-btn,.rg-btn,.js-edit){height:34px;padding-top:0;padding-bottom:0;font-size:.82rem}
:is(.sel-btn,.ot-ws){border-radius:8px;border-width:1px;border-color:var(--w-e6d6c8,#E6D6C8);background:#fff}
.sel-btn{padding-top:6px;padding-bottom:6px}

/* segmented switches inside a pane -> underline tabs */
:is(.card-top,.stock-tools,.sug-tools) :is(.stock-tabs,.cc-tabs,.ot-modes,.js-seg){height:34px;padding:0;gap:16px;background:none;border:0;border-radius:0}
:is(.card-top,.stock-tools,.sug-tools) :is(.stock-tab,.cc-tab,.ot-mode,.js-seg button){height:100%;padding:0 2px;border:0;border-bottom:2px solid transparent;margin-bottom:-1px;border-radius:0;background:none!important;box-shadow:none;font-size:.82rem}
:is(.card-top,.stock-tools,.sug-tools) :is(.stock-tab,.cc-tab,.ot-mode,.js-seg button):is([aria-selected="true"],.on,.active,.sel){color:var(--orange-dk);border-bottom-color:var(--orange)}

/* ── Account Management: .os-card sections ── */
.am-head{padding:18px 24px 14px}
.banner{margin-left:24px;margin-right:24px}
.feat-card{margin-top:0!important}
.am-grid{margin-top:0!important}
.os-card{background:#fff;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;padding:18px 24px}
.am-grid{gap:0;background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.am-grid>.os-card{border:0;padding:0}
.am-grid>.os-card+.os-card{border-left:1px solid #E3E3E6}
.am-grid .card-top{box-sizing:border-box;height:56px;min-height:56px;margin:0;padding:0 24px;align-items:center;border-bottom:1px solid var(--line);background:var(--w-fbf7f3,#FBF7F3)}
.am-grid .card-top h2{font-size:1rem}
.am-grid .os-card>:not(.card-top){margin-left:24px;margin-right:24px}
.am-grid .os-card>.card-top+*{margin-top:14px}
.card-top .search input,.card-top .cl-search input{height:34px;padding-top:0;padding-bottom:0}

/* Flowchart search pane (Inventory + Procurement): breathing room under the title strip, flat controls */
.im-card>.flow-panel,.pr-card>.fl-panel{margin-top:16px;margin-bottom:16px}
.fl-field .modal-input,.fl-date{height:34px;padding-top:0;padding-bottom:0;border-radius:8px;border-width:1px;border-color:var(--w-e6d6c8,#E6D6C8)}
.fl-locl{border-radius:8px;border-width:1px;border-color:var(--w-e6d6c8,#E6D6C8);background:#fff}
.fl-loc{border-radius:6px}
.fl-sug{border-radius:8px;border-width:1px}

/* Procurement > Past Orders: the filter row is hidden, so the search row is the first thing under the title strip */
#panel-live.hist .po-searchrow{margin-top:16px}

/* Procurement > Flowcharts: the page gave this scroll area a -8px right margin to cancel the old card padding - give it a proper 24px right gap, scrollbar sits at the divider */
#panel-flowcharts .fl-panel{margin-right:0;padding-right:24px}

/* Procurement > Suppliers (Supplier Statistics) and Price History (Unit Cost History): the empty-state box is hidden once something is selected, so the body needs its own gap under the title strip */
.pr-card>.st-body,.pr-card>.ph-body{margin-top:16px;margin-bottom:16px}

/* Suggested / Requested card: search row first, Generate Report row below it (hidden in Requested mode) */

/* Manufacturing Setup lists: tighter search + entries */
.ms-card>.card-search:nth-child(2):not(.x):not(.y){margin-top:10px;margin-bottom:6px}
.ms-card>.card-search+.card-body{padding-top:4px;padding-bottom:12px}
.ms-card .pm-list{gap:3px}
.ms-card .pm-row{padding:6px 8px 6px 12px;border-radius:10px}
