/* Shared two-column workspaces follow the product-management navigation. */
#operations-view.active, #admin-view.active {
  display:grid; grid-template-columns:190px minmax(0,1fr); gap:20px;
  align-items:start; max-width:none; margin-inline:0;
}
#operations-view > .operations-panel { grid-column:2; grid-row:2; min-width:0; }
#operations-view > .operations-product-bar { grid-column:2; grid-row:1; }
#operations-view #operationsTabs { grid-column:1; grid-row:1 / 3; }
.operations-product-bar { display:flex; flex-wrap:wrap; align-items:end; gap:12px 20px; margin:0; }
.operations-product-bar label { flex:0 1 380px; min-width:0; }
.operations-product-bar select { display:block; width:100%; margin-top:8px; }
.operations-product-bar p { color:var(--muted); margin:0; font-size:12px; }
#reviews-panel .section-heading { flex-wrap:wrap; }
#reviews-panel .review-toolbar { flex:1 1 650px; }
#reviews-panel .review-search { flex:1 1 230px; }
#reviewSearch { width:100%; min-height:36px; }
#reviewRows .review-check { width:16px; height:16px; min-height:0; padding:0; }
.settings-content { min-width:0; }
#operations-view #operationsTabs, #admin-view .settings-tabs {
  display:flex; flex-direction:column; gap:5px; align-self:start;
  background:var(--surface); border:1px solid var(--line); border-radius:10px;
  padding:14px; margin:0; overflow:visible; order:0;
}
#operations-view #operationsTabs button, #admin-view .settings-tabs button {
  display:flex; justify-content:flex-start; align-items:center; gap:8px;
  flex:none; width:100%; min-width:0; min-height:42px; padding:9px 10px;
  border:0; border-radius:6px; box-shadow:none; background:transparent;
  color:var(--muted); font:inherit; font-size:13px; text-align:left; cursor:pointer;
}
#operations-view #operationsTabs button.active,
#admin-view .settings-tabs button[aria-selected="true"],
#operations-view #operationsTabs button:hover, #admin-view .settings-tabs button:hover {
  color:var(--brand); background:var(--brand-soft); font-weight:650;
}
#operations-view #operationsTabs button:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
#admin-view .settings-tabs button[hidden] { display:none; }
@media(max-width:760px) {
  #operations-view.active, #admin-view.active { grid-template-columns:1fr; }
  #operations-view > .operations-product-bar { grid-column:1; grid-row:1; }
  #operations-view #operationsTabs { grid-column:1; grid-row:2; }
  #operations-view > .operations-panel { grid-column:1; grid-row:3; }
  #operations-view #operationsTabs, #admin-view .settings-tabs { flex-direction:row; flex-wrap:wrap; }
  #operations-view #operationsTabs button, #admin-view .settings-tabs button { width:auto; }
}
/* Product management inherits each console theme's surfaces and typography. */
#products-view { min-width:0; }
#admin-view #settingsMembersPanel { width:100%; min-width:0; grid-template-columns:minmax(0,1fr); }
#settingsMembersPanel .admin-grid { grid-template-columns:minmax(0,1fr); margin-bottom:0; }
#settingsMembersPanel .band { min-width:0; }
#settingsMembersPanel .admin-create-form { grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
#settingsMembersPanel .admin-create-form .member-password-field { grid-column:1; grid-row:2; }
#settingsMembersPanel .admin-create-form .member-email-field { grid-column:2; grid-row:2; }
#settingsMembersPanel .admin-create-form .form-message,
#settingsMembersPanel .admin-create-form > .primary-button { grid-column:1 / -1; }
@media(max-width:1100px) { #settingsMembersPanel .admin-create-form { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) { #settingsMembersPanel .admin-create-form { grid-template-columns:minmax(0,1fr); } #settingsMembersPanel .admin-create-form .member-password-field, #settingsMembersPanel .admin-create-form .member-email-field { grid-column:auto; grid-row:auto; } }
.product-management-layout { display:grid; grid-template-columns:190px minmax(0,1fr); gap:20px; }
.product-module-nav { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:14px; align-self:start; }
.product-module-nav section + section { border-top:1px solid var(--line); margin-top:14px; padding-top:14px; }
.product-module-nav h3 { margin:0 0 8px; color:var(--muted); font-size:12px; font-weight:700; }
.product-module-nav button { width:100%; border:0; border-radius:6px; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:13px; padding:9px 10px; text-align:left; }
.product-module-nav button:hover,.product-module-nav button.active { background:var(--brand-soft); color:var(--brand); font-weight:650; }
.product-management-main { min-width:0; }
@media(max-width:760px) { .product-management-layout { grid-template-columns:1fr; } .product-module-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } .product-module-nav section + section { border-top:0; margin-top:0; padding-top:0; } }
html[data-design="olive"][data-theme="dark"] #products-view .primary-button { color:#172536; }
#products-view .product-hint { color:var(--muted); font-size:12px; line-height:1.7; font-weight:400; }
#products-view h2 { margin:0; font-size:20px; }
#products-view .view-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
#products-view h3 { margin:0 0 20px; font-size:15px; color:var(--ink); }
#products-view label { display:flex; flex-direction:column; gap:8px; color:var(--muted); font-size:12px; min-width:0; }
#products-view input:not([type=checkbox]):not([type=radio]):not([type=file]), #products-view select, #products-view textarea { width:100%; min-width:0; height:38px; padding:8px 10px; background:var(--surface); color:var(--ink); border:1px solid var(--line-strong); border-radius:5px; font:inherit; font-size:13px; }
#products-view input:focus-visible, #products-view select:focus-visible, #products-view textarea:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
#products-view input[type=checkbox], #products-view input[type=radio] { width:16px; height:16px; accent-color:var(--brand); }
#products-view textarea { height:auto; resize:vertical; line-height:1.8; }
.product-filters { display:grid; grid-template-columns:minmax(220px,2fr) repeat(3,minmax(120px,1fr)); gap:16px; margin:24px 0 16px; }
.product-list-table { background:var(--surface); border:1px solid var(--line); border-radius:8px; }
.product-list-name { display:flex; align-items:center; gap:12px; min-width:180px; }
.product-title-button { border:0; background:transparent; color:var(--ink); font:inherit; font-weight:700; padding:8px 0; text-align:left; cursor:pointer; overflow-wrap:anywhere; text-underline-offset:3px; }
.product-title-button:hover { color:var(--brand); text-decoration:underline; }
.product-title-button:focus-visible { outline:2px solid var(--brand); outline-offset:3px; border-radius:3px; text-decoration:underline; }
.product-list-name img,.product-list-placeholder { width:46px; height:46px; object-fit:contain; background:var(--soft); border-radius:6px; display:grid; place-items:center; flex-shrink:0; }
.product-list-table td { padding:16px 12px; }
#productList td:not(:first-child) { white-space:nowrap; }
.product-list-table td small { display:block; color:var(--muted); margin-top:6px; }
.product-list-actions { display:flex; gap:8px; align-items:center; }
.product-empty { text-align:center; height:150px; color:var(--muted); }
.product-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:16px; }
.product-pagination span { margin-right:auto; color:var(--muted); font-size:12px; }
#productEditor { background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.product-module-page { background:var(--surface); border:1px solid var(--line); border-radius:10px; min-height:560px; padding:28px; }
.product-module-empty { display:grid; place-items:center; align-content:center; gap:12px; min-height:360px; text-align:center; color:var(--muted); }
.product-module-empty svg { width:40px; height:40px; color:var(--brand); }
.product-module-empty h3,.product-module-empty p { margin:0; }
.upc-workspace { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:24px; min-height:560px; }
.upc-header-actions { display:flex; gap:10px; align-items:center; }
.upc-tabs { display:flex; gap:26px; border-bottom:1px solid var(--line); margin:22px -24px 18px; padding:0 24px; }
.upc-tabs button { border:0; border-bottom:2px solid transparent; background:transparent; color:var(--muted); padding:10px 2px; cursor:pointer; font:inherit; }
.upc-tabs button.active { color:var(--brand); border-color:var(--brand); font-weight:700; }
.upc-toolbar { display:grid; grid-template-columns:repeat(2,minmax(130px,180px)) minmax(220px,1fr) auto; gap:10px; margin-bottom:14px; }
.upc-actions { display:flex; gap:10px; margin-bottom:12px; }
.upc-table { border:1px solid var(--line); border-radius:8px; background:var(--surface); }
.upc-table th,.upc-table td { white-space:nowrap; padding:12px 10px; }
.upc-status { color:var(--brand); font-weight:600; }
.upc-status.used { color:var(--muted); }
#upcDialog { width:min(760px,calc(100vw - 32px)); padding:0; }
#upcDialog form { margin:0; }
.upc-dialog-body { padding:24px; }
.upc-dialog-body fieldset { border:0; padding:0; margin:0 0 24px; display:flex; gap:22px; align-items:center; }
.upc-dialog-body fieldset label { flex-direction:row; align-items:center; gap:6px; }
.upc-dialog-body legend { margin-right:8px; color:var(--ink); }
.upc-dialog-body textarea { min-height:260px; }
@media(max-width:700px) { .upc-workspace { padding:16px; } .upc-tabs { margin-inline:-16px; padding-inline:16px; } .upc-toolbar { grid-template-columns:1fr 1fr; } .upc-toolbar input { grid-column:1/-1; } .upc-table { overflow:auto; } }
.product-editor-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 24px; border-bottom:1px solid var(--line); }
.product-editor-layout { display:grid; grid-template-columns:178px minmax(0,1fr); }
.product-editor-nav { padding:22px 14px; border-right:1px solid var(--line); display:flex; flex-direction:column; gap:10px; align-self:start; position:sticky; top:16px; }
#productCover { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; aspect-ratio:1; padding:10px; border:1px dashed var(--line-strong); border-radius:6px; background:var(--soft); color:var(--muted); gap:12px; cursor:pointer; }
#productCover img { width:100%; height:100%; object-fit:contain; }
#productDraftName { overflow-wrap:anywhere; color:var(--ink); font-size:13px; }
#productDraftSku { overflow-wrap:anywhere; color:var(--muted); font-size:11px; }
.product-editor-nav nav { display:flex; flex-direction:column; gap:5px; margin-top:14px; }
.product-editor-nav [data-product-tab] { border:0; padding:12px; text-align:left; border-radius:5px; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:13px; }
.product-editor-nav [data-product-tab]:hover { background:var(--soft); color:var(--ink); }
.product-editor-nav [data-product-tab].active { background:var(--brand-soft); color:var(--brand); font-weight:700; }
#productSections { min-width:0; padding:28px; min-height:560px; }
.product-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px 24px; margin-bottom:28px; }
.product-spec-group { margin-top:40px; }
.product-spec-group > .product-fields:last-child { margin-bottom:0; }
.product-carton-spec { border-top:1px solid var(--line-strong); padding-top:28px; }
.product-name-field { grid-column:1/-1; }
.product-link-field { grid-column:1/-1; min-width:0; display:grid; gap:8px; }
.product-link-control { display:flex; align-items:center; gap:8px; }
.product-link-control input { flex:1; }
.product-link-control button { flex-shrink:0; width:38px; height:38px; }
.product-row-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; margin:24px 0 18px; }
#products-view .product-row-heading h3 { margin:0; }
.product-row-heading strong { font-size:13px; }
.product-repeat-row { border-top:1px solid var(--line); padding:4px 0 12px; }
.product-repeat-row .product-row-heading { margin:12px 0 16px; }
.product-repeat-row .product-fields { margin-bottom:10px; }
.product-repeating { margin-bottom:18px; }
.product-empty-inline { color:var(--muted); font-size:13px; padding:24px 0; border-block:1px solid var(--line); }
#products-view .product-preferred { align-items:flex-start; justify-content:center; }
.product-quote-total { background:var(--brand-soft); padding:12px; border-radius:5px; display:flex; flex-direction:column; gap:8px; }
.product-quote-total span { color:var(--muted); font-size:12px; }
.product-quote-total strong { color:var(--ink); font-size:16px; }
.product-traits { border:0; padding:0; margin:0 0 32px; display:flex; flex-wrap:wrap; gap:16px; }
.product-traits legend { color:var(--muted); font-size:12px; margin-bottom:14px; }
#products-view .product-traits label { flex-direction:row; align-items:center; }
.product-upload-actions { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
#products-view .product-file-button { display:inline-flex; flex-direction:row; align-items:center; position:relative; color:var(--ink); cursor:pointer; }
.product-file-button input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.product-file-button:focus-within { outline:2px solid var(--brand); outline-offset:2px; }
.product-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:16px; min-height:90px; padding:16px 0; margin-bottom:20px; }
.product-gallery:empty { border:1px dashed var(--line); border-radius:6px; margin-top:12px; }
.product-file-tile { min-width:0; display:flex; flex-direction:column; gap:10px; }
.product-file-tile img,.product-gallery>button img { width:100%; height:125px; object-fit:contain; background:var(--soft); border:1px solid var(--line); border-radius:5px; }
.product-file-tile>a { min-height:70px; display:grid; place-items:center; color:var(--brand); font-size:12px; }
.product-file-tile>a[download] { min-height:32px; display:block; overflow-wrap:anywhere; text-decoration:underline; text-underline-offset:3px; }
.product-file-tile>span { font-size:11px; color:var(--muted); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.product-file-tile>div { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.product-file-tile>div .icon-button { flex-shrink:0; }
.product-video-gallery { grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr)); }
.product-file-tile video { width:100%; aspect-ratio:16 / 9; background:var(--soft); border:1px solid var(--line); border-radius:5px; }
.product-copywriting { display:grid; gap:24px; }
.product-bullet-points { display:grid; gap:16px; min-width:0; margin:0; padding:0; border:0; }
.product-bullet-points legend { padding:0; margin-bottom:12px; color:var(--ink); font-size:14px; font-weight:600; }
#products-view .product-bullet-points textarea { height:calc(2.7em + 9px); min-height:0; }
.product-url-row,.product-template-controls { display:flex; gap:12px; align-items:end; margin:20px 0; }
.product-url-row label { flex:1; }
.category-form { display:flex; gap:16px; align-items:end; margin:24px 0 12px; }
.category-form label { flex:1; max-width:420px; }
.product-attachment-line { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:24px 0; color:var(--muted); font-size:13px; }
#products-view .product-attachment-line .product-file-button { display:inline-flex; flex-direction:row; align-items:center; gap:6px; color:var(--brand); cursor:pointer; }
.product-attachments .product-gallery:empty { display:none; }
.product-imperial { display:block; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
#productList .product-delete { background:#dc2626; border-color:#dc2626; color:#fff; }
#productList .product-delete:hover { background:#b91c1c; border-color:#b91c1c; color:#fff; }
#productList .product-delete:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
@media(max-width:650px) { .category-form { flex-wrap:wrap; } .category-form label { flex-basis:100%; } }
.product-savebar { display:flex; gap:12px; align-items:center; justify-content:flex-end; padding:16px 24px; border-top:1px solid var(--line); background:var(--surface); position:sticky; bottom:0; z-index:3; border-radius:0 0 10px 10px; }
.product-savebar .form-message { margin:0 auto 0 0; overflow-wrap:anywhere; }
#products-view dialog { background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:10px; max-width:min(680px,calc(100vw - 32px)); padding:28px; }
.product-dialog-actions { display:flex; gap:12px; justify-content:flex-end; margin-top:24px; }
@media(min-width:1700px) { .product-fields { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(min-width:1151px) { #product-packages .product-fields { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(min-width:1151px) { [data-product-panel="basic"] > .product-fields { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1150px) { .product-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } .product-editor-layout { grid-template-columns:150px minmax(0,1fr); } #productSections { padding:22px; } }
@media(max-width:900px) {
  html[data-design] .main-nav,html[data-design] .main-nav.admin-enabled { grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(48px,1fr); overflow-x:auto; scrollbar-width:none; }
  .product-savebar { bottom:66px; }
}
@media(max-width:650px) {
  .product-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .product-search { grid-column:1/-1; }
  .product-editor-layout { display:block; }
  .product-editor-nav { position:static; display:block; border-right:0; border-bottom:1px solid var(--line); padding:12px; }
  #productCover,#productDraftName,#productDraftSku { display:none; }
  .product-editor-nav nav { flex-direction:row; overflow-x:auto; margin:0; }
  .product-editor-nav [data-product-tab] { white-space:nowrap; flex-shrink:0; padding:10px; }
  #productSections { padding:20px 16px; }
  .product-fields { grid-template-columns:1fr; gap:18px; }
  .product-row-heading { flex-wrap:wrap; }
  .product-editor-heading { padding:16px; }
  .product-savebar { padding:12px 16px; flex-wrap:wrap; bottom:66px; }
  .product-savebar .form-message:not(:empty) { flex-basis:100%; }
  .product-template-controls { flex-wrap:wrap; }
  #products-view input:not([type=checkbox]):not([type=radio]):not([type=file]),#products-view select,#products-view textarea { font-size:16px; }
}

/* Four filters need about 630px; below that they wrap to two columns. */
@media (max-width:1000px) { .product-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } }
