:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: #19293d;
  background: #f4f6f9;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 14px 24px;
  color: #fff; background: #132841; border-bottom: 3px solid #df7039;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; }
.mark { width: 18px; height: 18px; background: #f08a55; border-radius: 5px 2px 5px 2px; }
.environment { font-size: .8rem; border: 1px solid #8291a3; border-radius: 5px; padding: 5px 9px; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 67px); }
main { width: 100%; max-width: 1328px; margin: 0 auto; padding: 36px 28px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -.045em; }
.intro p, .toolbar p, .note { color: #52637a; }
.intro p { margin-top: 7px; }
.summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.card, .panel { background: #fff; border: 1px solid #d9e0e8; border-radius: 10px; }
.card { padding: 17px; color: #43556c; text-decoration: none; font-size: .87rem; }
.card strong { color: #162841; display: block; margin-top: 7px; font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.card[aria-current="page"] { border-color: #456fa5; box-shadow: inset 0 3px #456fa5; background: #f5f9ff; }
.card:hover { border-color: #456fa5; }
.toolbar { padding: 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.toolbar h2 { font-size: 1.16rem; }
.toolbar p { margin-top: 4px; font-size: .85rem; }
form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .875rem; }
input, button { font: inherit; border-radius: 6px; padding: 7px 10px; }
input { width: 122px; background: white; border: 1px solid #8e9bad; }
button { color: white; background: #234b76; border: 1px solid #234b76; cursor: pointer; }
a { color: #244f82; }
:focus-visible { outline: 2px solid #2c65ac; outline-offset: 2px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
th, td { padding: 13px 14px; border-top: 1px solid #e3e8ee; }
thead { background: #eef2f7; color: #42546a; }
thead th, tbody th, tbody td:nth-child(-n+6) { white-space: nowrap; }
.status { padding: 4px 8px; border-radius: 5px; background: #edf1f6; color: #344861; font-weight: 650; }
.status.exists { background: #dff4e7; color: #215b3a; }
.status.uncertain { background: #fff1cf; color: #72500e; }
.status.review { background: #fce5e3; color: #8a322b; }
.empty { text-align: center; color: #52637a; padding: 28px; }
.pagination { display: flex; justify-content: flex-end; gap: 18px; padding: 15px; }
.pagination:empty { display: none; }
.note { font-size: .85rem; margin-top: 14px; }
@media (max-width: 720px) {
  main { padding: 28px 16px; }
  .summary { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
}
.back-link { display: inline-block; margin-bottom: 14px; font-size: .9rem; }
.detail-heading { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 25px; }
.detail-heading .status { font-size: .87rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 16px; align-items: start; }
.detail-panel { padding: 20px; }
.detail-panel h2 { font-size: 1.16rem; }
.detail-panel dl { margin: 12px 0 0; }
.detail-panel dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; padding: 11px 0; border-top: 1px solid #e3e8ee; }
.detail-panel dt { color: #52637a; }
.detail-panel dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } }
.contents-grid { margin-top: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.contents-grid .contents { grid-column: 1 / -1; }
.notice { margin-top: 12px; color: #52637a; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
tfoot th { font-weight: 500; color: #52637a; text-align: right; }
tfoot tr:last-child th, tfoot tr:last-child td { font-weight: 700; color: #19293d; }
@media (max-width: 720px) { .contents-grid { grid-template-columns: 1fr; } }
tbody td.status-cell { min-width: 190px; white-space: normal; }
tbody td.status-cell small { display: block; margin-top: 4px; color: #215b3a; }
.status-panel { margin-bottom: 16px; }

/* Integreat BPA shell */
.top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.switch { display: inline-flex; gap: 0; border: 1px solid #8291a3; border-radius: 7px; overflow: hidden; }
.switch button { border: 0; border-radius: 0; background: transparent; color: #c9d3df; padding: 6px 12px; font-size: .82rem; }
.switch button[aria-pressed="true"] { background: #df7039; color: #fff; font-weight: 650; }
.switch button:hover { color: #fff; }
.activity { color: #ffd9a8; font-size: .82rem; }
.sidebar { background: #fff; border-right: 1px solid #d9e0e8; padding: 22px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar a { display: block; padding: 10px 14px; border-radius: 7px; color: #34475f; text-decoration: none; font-weight: 550; }
.sidebar a:hover { background: #eef2f7; }
.sidebar a[aria-current="page"] { background: #e7eef8; color: #163a66; box-shadow: inset 3px 0 #456fa5; }
input.wide { width: 210px; }
select { font: inherit; border-radius: 6px; padding: 7px 10px; border: 1px solid #8e9bad; background: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: #fff; color: #234b76; }
.sync-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.sync-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sync-card .actions, .sync-card .schedule { margin-top: 16px; }
.sync-card .schedule { padding-top: 16px; border-top: 1px solid #e3e8ee; }
.check { display: flex; align-items: center; gap: 6px; width: 100%; }
.check input { width: auto; }
details summary { cursor: pointer; color: #244f82; }
details pre { white-space: pre-wrap; max-width: 520px; max-height: 260px; overflow: auto; background: #f4f6f9; padding: 10px; border-radius: 6px; font-size: .8rem; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #d9e0e8; padding: 8px 12px; }
  .sidebar a[aria-current="page"] { box-shadow: inset 0 -3px #456fa5; }
  .sync-grid { grid-template-columns: minmax(0, 1fr); }
  details pre { max-width: 70vw; }
  main { padding: 24px 16px; }
}
.intro + .panel, .intro + .sync-grid { margin-top: 24px; }
.order-actions { margin-bottom: 16px; }
.order-actions .actions { margin-top: 14px; }
.last-run { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e3e8ee; font-size: .87rem; color: #43556c; }
.last-run details { margin-top: 8px; }
details.reference { margin-top: 12px; }
details.reference table { margin-top: 8px; }
tbody td.wrap { white-space: normal; min-width: 160px; }
.note + .panel { margin-top: 16px; }
.agency-form { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(220px, 2fr) auto auto; gap: 8px; align-items: center; }
.agency-form input[type="text"] { width: 100%; }
.agency-form textarea { font: inherit; border-radius: 6px; padding: 7px 10px; border: 1px solid #8e9bad; resize: vertical; width: 100%; }
.check.inline { width: auto; white-space: nowrap; }
.notify h3 { margin: 0 0 10px; font-size: 1rem; width: 100%; }
.notify-grid { margin: 16px 0 0; }
.notify .notice { width: 100%; margin-top: 4px; }
@media (max-width: 900px) { .agency-form { grid-template-columns: minmax(0, 1fr); } }
main > .panel + .panel { margin-top: 16px; }
.tabs { display: flex; gap: 6px; margin: 20px 0 16px; border-bottom: 1px solid #d9e0e8; }
.tabs a { padding: 8px 14px; text-decoration: none; color: #43556c; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: #163a66; border-bottom-color: #456fa5; font-weight: 650; }
.intro + .tabs { margin-top: 20px; }
.tabs + .panel { margin-top: 0; }
.subtle { color: #52637a; margin: -14px 0 18px; font-size: .9rem; }
.requirements { margin: 12px 0 0; padding-left: 20px; color: #34475f; }
.requirements li { margin: 6px 0; }
.product-image { display: block; max-width: 220px; max-height: 220px; margin-top: 16px; border: 1px solid #e3e8ee; border-radius: 8px; background: #fff; }
tbody td.wrap { overflow-wrap: anywhere; word-break: break-word; }
.send-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e3e8ee; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.send-form h3 { width: 100%; margin: 0; font-size: 1rem; }
.send-form .notice { width: 100%; margin: 0; }
.send-note { margin-top: 14px; }
.notice.warn { color: #8a322b; font-weight: 600; }
button.danger { background: #a3352b; border-color: #a3352b; }
#bpa-status { color: #c9d3df; font-size: .82rem; text-decoration: none; font-variant-numeric: tabular-nums; }
#bpa-status.busy { color: #ffd9a8; }
#bpa-status.busy::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #f0a050; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { #bpa-status.busy::before { animation: none; } }
.processes { margin-bottom: 16px; }
.processes .live { font-size: .75rem; color: #215b3a; background: #dff4e7; padding: 3px 8px; border-radius: 5px; font-weight: 650; }
.countdowns dd { font-variant-numeric: tabular-nums; }
[data-started] { font-variant-numeric: tabular-nums; }
#bpa-reload { color: #132841; background: #ffd9a8; border-radius: 5px; padding: 4px 10px; font-size: .82rem; font-weight: 650; text-decoration: none; }
.exchanges { margin-top: 16px; }
.exchange { border-top: 1px solid #e3e8ee; padding: 10px 0; }
.exchange summary { font-variant-numeric: tabular-nums; }
.exchange h4 { margin: 12px 0 6px; font-size: .85rem; color: #43556c; }
.exchange pre { max-width: none; max-height: 420px; }
.order-tabs { margin: -8px 0 18px; }
.tabs .count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 9px; background: #e7eef8; color: #163a66; font-size: .75rem; text-align: center; }
.user { display: inline-flex; align-items: center; gap: 8px; color: #c9d3df; font-size: .82rem; }
button.link { background: none; border: 0; padding: 0; color: #ffd9a8; text-decoration: underline; cursor: pointer; font-size: .82rem; }
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login { background: #fff; border: 1px solid #d9e0e8; border-radius: 12px; padding: 32px; width: min(420px, calc(100vw - 32px)); margin: 0; }
.login h1 { font-size: 1.8rem; margin: 18px 0 6px; }
.login p { color: #52637a; margin-bottom: 18px; }
.login-brand { color: #132841; }
a.google { display: block; text-align: center; padding: 11px; border-radius: 7px; background: #132841; color: #fff; text-decoration: none; font-weight: 650; }
a.google:hover { background: #234b76; }
/* Email settings per store: one label and field per row */
form.notify { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 12px; align-items: center; }
form.notify h3, form.notify .check, form.notify .notice { grid-column: 1 / -1; }
form.notify input.wide { width: 100%; }
form.notify button { grid-column: 2; justify-self: start; }
.sync-grid.single { grid-template-columns: minmax(0, 1fr); }
