body { background:#f5f6fb; }
.top-actions { gap:10px; }
.content { min-width:0; }
.safe-note { padding:14px 16px; border-radius:12px; background:#f4f5fa; color:#41465b; font-weight:600; }

.status.UNPAID,.status.DRAFT { background:#f1f2f6; color:#53596b; }
.status.PLACED,.status.CONFIRMED,.status.PROCESSING,.status.APPROVED { background:#eef1ff; color:#3730a3; }
.status.DISPATCHED,.status.DELIVERED,.status.RECEIVED { background:#e8f8ef; color:#166534; }
.status.CANCELLED,.status.REJECTED,.status.DAMAGED { background:#fff0f0; color:#b42318; }
.notice.error { border-color:#f3b5b5; background:#fff4f4; color:#9d2525; }
@media (max-width:900px) {
  .topbar { align-items:flex-start; gap:12px; flex-wrap:wrap; }
  .top-actions { flex-wrap:wrap; }
  .layout { display:block; }
  .side-kicker,.side-note { display:none; }
  .content { padding:18px 12px 28px; }
}
/* Marketplace operations layout */
.topbar { background:linear-gradient(110deg,#172b80,#432789 70%,#087b9d); color:#fff; }
.topbar .brand,.topbar .back-link,.topbar .secure { color:#fff; }
.sidebar { background:#142257; }
.sidebar .nav.active { background:#3159c7; }
.metric { border-top:3px solid #D4AF37; box-shadow:0 8px 24px rgba(5,10,20,.18); }
.diagnostics { margin:0 0 16px; padding:12px 16px; border:1px solid #d6dff5; border-radius:10px; background:#fff; color:#344265; overflow-wrap:anywhere; }
.diagnostics summary { cursor:pointer; font-weight:700; }
.diagnostics li { margin-top:6px; }
@media(max-width:600px) { .topbar { padding:12px; } .top-actions { gap:6px; } .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .content { min-width:0; } .panel { min-width:0; } }

.catalog-frame{display:block;width:100%;height:calc(100vh - 190px);min-height:25rem;border:0;background:transparent}
@media(max-width:768px){.catalog-frame{height:calc(100vh - 150px);min-height:25rem}}
/* Royal Gold overrides after the enterprise layout rules. */
.topbar{background:#171b32}.sidebar{background:#252940}.sidebar .nav.active,.sidebar .nav:hover{background:linear-gradient(110deg,#d4af37,#f5c86e);color:#171b32}.metric{border-top-color:#d4af37}.diagnostics{border-color:#d4af37;background:#fff8e9;color:#493908}
/* Enterprise-specific rules follow the shared marketplace theme. */
body {background:#101827;color:#F5F1E8}
.topbar,.sidebar {background:#0E1627}
.diagnostics,.safe-note {background:#17243B;color:#F5F1E8;border-color:#B99645}
.sidebar .nav.active,.sidebar .nav:hover {background:#D4AF37;color:#101827}
/* Command center: compact navigation and clear operational hierarchy. */
.topbar{background:#101827;border-bottom:1px solid #66582e;gap:16px}
.brand-mark{border-radius:10px;box-shadow:none}
.sidebar{background:#101827;border-right:1px solid #37415a;padding:20px 12px}
.sidebar .nav{padding:10px 12px;border-radius:8px}
.sidebar .nav.active{font-weight:800}

.page-heading{gap:16px;align-items:flex-start}
.page-heading h1{color:#F5D778}

.module-grid button,.module-grid a{min-height:52px;display:flex;align-items:center}
.metric,.panel{border-radius:12px}
.metric{min-width:0}
.metric strong{overflow-wrap:anywhere}

.catalog-frame{min-width:0}
@media(max-width:900px){.sidebar{border-right:0;border-bottom:1px solid #37415a}.content{padding:18px 12px}.topbar{position:static}.page-heading{flex-wrap:wrap}}
@media(max-width:600px){.topbar{padding:12px}.brand{min-width:0}.brand b{font-size:13px}.top-actions{width:100%}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{padding:12px}.metric strong{font-size:23px}.panel-head{flex-wrap:wrap}}

/* Royal Gold Navy command center */
.sidebar .nav { min-height: 44px; }
.layout:has(> .sidebar.hidden) { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) {
  .marketplace-command-center {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100dvh;
  }
  .marketplace-command-center > .layout {
    min-height: 0;
  }
  .marketplace-command-center > .layout > :is(.sidebar, .content) {
    min-height: 0;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }
}
.sidebar .nav:focus-visible, .topbar a:focus-visible { outline: 2px solid #f5d778; outline-offset: -3px; }
#overviewView { display: flex; flex-direction: column; }
#overviewView > .metric-grid { order: -1; }
#overviewView.hidden { display: none; }


#approvalResults {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0.85rem;
}
#approvalResults > .panel {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
#approvalResults input { width: 100%; }
#approvalResults p { margin: 0.45rem 0; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block: 0.65rem; }
main:has(#approvalControlView:not(.hidden)) .page-heading h1 { color: #f2f5fb; }
main:has(#approvalControlView:not(.hidden)) .page-heading .subheading { color: #bdcbe0; }
main:has(#approvalControlView:not(.hidden)) .page-heading .eyebrow { color: #f2ce73; }
#marketplaceInbox {
  background: #17263f;
  border: 1px solid #c79f49;
  border-radius: 0.55rem;
  color: #f9e4ad;
}
