/* The Open Order Report inside the Portals shell (sidebar, header card, light and dark theme).
 * Loads last on oor.html, after portal-shell.css: maps OOR's own colour tokens onto Portals'
 * so both themes follow the rest of Portals. The Playground does not load this file. */
:root {
  --ow-accent-hover: color-mix(in srgb, var(--brand) 85%, #000);
  --ow-field-line: var(--line);
  --ow-btn-line: var(--line);
  --ow-btn-line-hover: var(--ink-3);
  --ow-placeholder: var(--ink-3);
  --ow-header-divider: var(--line);
  --ow-tab-hover: var(--mute-soft);
  --ow-hover: var(--mute-soft);
  --ow-disclosure-hover: var(--mute-soft);
  --ow-line-wrap: var(--line);
  --ow-sub-head: var(--surface-2);
  --ow-accent-line: color-mix(in srgb, var(--brand) 45%, transparent);
  --ow-msg-bad-line: color-mix(in srgb, var(--bad) 45%, transparent);
  --ow-msg-ok-line: color-mix(in srgb, var(--ok) 45%, transparent);
  --ow-msg-warn-line: color-mix(in srgb, var(--warn) 45%, transparent);
  --ow-shadow: rgba(0, 0, 0, .18);
  --ow-backdrop: rgba(5, 9, 15, .62);
}
:root[data-theme="dark"] { --ow-accent-hover: color-mix(in srgb, var(--brand) 80%, #fff); }

/* The report wants more room than the 1200px Portals reading width. */
.main > .wrap.wrap-wide { max-width: 1640px; }

/* Header card: title on the left, Playground and the account on the right. */
.oor-header .controls { gap: 8px; }
.oor-header .btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; min-height: 34px; font-family: inherit; }
.oor-header .ow-account summary { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font-size: 13px; }
.oor-header .ow-account summary:hover { border-color: var(--ink-3); }
.oor-header .ow-account-menu { top: 40px; background: var(--card); border-color: var(--line); }
.oor-header .ow-account-menu .btn { justify-content: center; }

/* The workbook sits in a card like every other Portals page. */
.oor-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.oor-card .ow-divisions { padding: 0 20px; }
.oor-card .ow-workbook { padding: 0 20px; min-height: 0; }
.oor-card .ow-pager { margin-top: 12px; }
.oor-card .ow-auth { margin: 72px auto; }
.oor-card #ow-po-host { padding: 20px 24px 32px; }
.oor-card .oor-requisitions { min-height: 0; border-radius: var(--radius); background: var(--card); }
.oor-card .opr-footer { border-radius: 0 0 var(--radius) var(--radius); }
.oor-card .ow-table-wrap, .oor-card .ow-empty { background: var(--card); }
.oor-card select { color: var(--ink); }

/* The current portal in the sidebar is a link to itself. */
.portal-link[aria-current="page"] { cursor: default; }

@media (max-width: 860px) {
  .main > .wrap.wrap-wide { padding: 14px; }
  .oor-card .ow-divisions, .oor-card .ow-workbook { padding: 0 14px; }
}
@media (max-width: 560px) {
  .oor-header { padding: 14px; }
  .oor-header .controls { width: 100%; justify-content: flex-end; }
  .oor-card #ow-po-host { padding: 16px 14px 24px; }
}
@media print {
  .oor-header .controls { display: none !important; }
  .oor-card { border: 0; box-shadow: none; }
}
