/* Operator panel, laid out and coloured like the Orion family's panel. */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, p, form { margin: 0; padding: 0; }
html, body { height: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
:root {
  --op-navy: #15304e;
  --op-pill: #2f5a86;
  --op-cream: #fff7e1;
  --op-link: #0683b8;
  --op-blue: #0683b8;
  --op-purple: #7a2bea;
  --op-red: #d40e1c;
  --op-head: #3195cd;
  --op-row: #cbe8f8;
  --op-line: #c9c9c9;
  --op-text: #333333;
}
.op-panel {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fafafa;
  color: var(--op-text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
}
.op-header { flex: none; height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 0 26px; background: var(--op-navy); color: #fff; }
.op-header__title { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-header__title small { font-size: 14px; margin-left: 2px; }
.op-header__pills { flex: none; display: flex; gap: 4px; }
.op-header__pill { flex: none; padding: 8px 13px; border-radius: 18px; background: var(--op-pill); font-size: 14px; white-space: nowrap; }
.op-header__pill--code { color: var(--op-red); text-decoration: none; }
.op-balance { flex: none; height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px; background: var(--op-cream); color: var(--op-link); font-size: 14px; }
.op-lang { display: flex; align-items: center; gap: 8px; color: #222; }
.op-lang svg { width: 20px; height: 20px; }
.op-lang select { width: 100px; height: 19px; font-size: 12px; }
.op-body { flex: 1; min-height: 0; display: flex; gap: 20px; padding: 6px 12px 6px 8px; }
.op-side { flex: none; width: 203px; display: flex; flex-direction: column; border: 2px solid #d2d2d2; border-radius: 6px; background: #f4f4f4; overflow-y: auto; }
.op-side form { display: block; flex: none; }
.op-side a, .op-side button { flex: none; display: flex; align-items: flex-end; gap: 3px; width: 100%; height: 41px; padding: 0 10px 8px; border: 0; border-bottom: 1px solid #d0d0d0; background: transparent; color: #333; font-weight: 700; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; }
.op-side a:hover, .op-side button:hover, .op-side a.is-active { background: #e6eef4; }
.op-side svg { flex: none; width: 20px; height: 20px; margin-bottom: 2px; color: #111; }
.op-main { flex: 1; min-width: 0; overflow: auto; padding-right: 4px; }
.op-card { margin-bottom: 10px; padding: 8px 20px 18px; border: 2px solid #d2d2d2; border-radius: 6px; background: #fff; }
.op-card__title { padding-bottom: 5px; margin-bottom: 16px; border-bottom: 1px solid #dcdcdc; color: var(--op-link); font-size: 16px; font-weight: 700; }
.op-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.op-search { display: flex; gap: 4px; }
.op-search input { width: 206px; height: 42px; padding: 0 3px; border: 1px solid #8a97a3; border-radius: 6px; font-size: 14px; color: #000; }
.op-side-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; margin-right: 58px; }
.op-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 13px; border: 0; border-radius: 4px; color: #fff; font-size: 14px; cursor: pointer; white-space: nowrap; }
.op-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.op-btn--blue { background: var(--op-blue); }
.op-btn--purple { background: var(--op-purple); }
.op-btn--red { background: var(--op-red); }
.op-btn--search { min-height: 38px; padding: 6px 22px; font-size: 16px; margin-top: 2px; }
.op-btn--update { min-height: 28px; padding: 3px 8px; border-radius: 8px; }
.op-prohibited { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px 1px; font-size: 15px; font-weight: 700; color: #444; }
.op-prohibited label { display: inline-flex; align-items: center; gap: 3px; }
.op-profile { border: 1px solid var(--op-line); }
.op-profile__row { display: grid; align-items: center; min-height: 41px; padding: 3px 12px 3px 48px; border-bottom: 2px solid #dcdcdc; font-weight: 700; color: #444; }
.op-profile__row:last-child { border-bottom: 0; }
.op-profile__row--head, .op-profile__row--data { grid-template-columns: 0.9fr 1fr 1fr 0.8fr 0.8fr 1.3fr 1fr 0.7fr; gap: 8px; }
.op-profile__row--head.op-profile__row--five, .op-profile__row--data.op-profile__row--five { grid-template-columns: repeat(5, 1fr); }
.op-profile__row--actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); justify-items: start; gap: 8px; }
.op-profile__row--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.op-table-wrap { overflow-x: auto; }
.op-table-wrap--gap { margin-bottom: 12px; }
.op-profile--gap { margin-top: 14px; }
.op-toolbar form { display: block; }
.op-table { width: 100%; border-collapse: collapse; }
.op-table th { padding: 7px 8px; background: var(--op-head); border: 1px solid #5b9fc9; color: #fff; font-size: 16px; white-space: nowrap; }
.op-table td { padding: 5px 8px; border: 1px solid #7d8a93; background: var(--op-row); color: #000; font-size: 12px; text-align: center; white-space: nowrap; }
.op-table tr.is-selected td { background: #9fd6f3; }
.op-table td.is-credit { color: #e00000; }
.op-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding-top: 12px; color: #444; }
.op-pager a { padding: 4px 10px; border: 1px solid #c9c9c9; border-radius: 4px; color: var(--op-link); background: #fff; text-decoration: none; }
.op-empty { padding: 18px 8px; color: #666; text-align: center; }
.op-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 76px 16px 16px; background: rgba(0, 0, 0, 0.5); }
.op-dialog { width: 600px; max-width: 100%; max-height: calc(100% - 92px); overflow-y: auto; padding: 8px 10px 22px; border-radius: 16px; background: #fff; }
.op-dialog--wide { width: 1000px; }
.op-overlay--top { z-index: 60; }
.op-dialog h2 { padding: 2px 5px 12px; border-bottom: 1px solid #cfcfcf; font-family: Georgia, "Times New Roman", serif; font-size: 15px; font-weight: 700; color: #333; }
.op-dialog__body { padding: 12px 20px 8px; color: #444; }
.op-dialog__actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 56px 0 20px; }
.op-dialog__actions .op-btn { min-width: 65px; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 13px; }
.op-field { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; margin-bottom: 10px; }
.op-field label { font-weight: 700; color: #444; text-align: right; }
.op-field input, .op-field textarea { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid #8a97a3; border-radius: 4px; font-size: 14px; color: #000; background: #fff; }
.op-field input[readonly] { background: #eeeeee; }
.op-filter { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.op-filter__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; color: #444; }
.op-filter__row label { width: 62px; }
.op-filter__row input { height: 34px; width: 208px; padding: 0 6px; border: 1px solid #8a97a3; border-radius: 4px; font-size: 14px; color: #000; }
.op-filter__quick { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 68px; }
.op-filter .op-prohibited { margin: 0; }
.op-period { margin-bottom: 4px; color: #222; font-size: 12px; }
.op-card__title select { border: 1px solid #8a97a3; border-radius: 4px; color: var(--op-link); font-weight: 700; font-size: 15px; }
.op-form { padding-top: 14px; }
.op-form__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; color: #222; }
.op-form__row > label:first-child, .op-form__spacer { width: 190px; font-weight: 700; color: #444; text-align: right; }
.op-form__row input:not([type="radio"]), .op-form__row select { width: 170px; padding: 6px 8px; border: 1px solid #8a97a3; border-radius: 4px; color: #000; }
.op-form__row input[readonly] { background: #e4e4e4; }
.op-hint { color: var(--op-red); font-size: 12px; }
.op-link { color: var(--op-link); font-weight: 700; }
.op-closed { color: var(--op-red); font-weight: 700; }
.op-radio { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; }
.op-btn--wide { min-width: 120px; }
.op-field__hint { margin: -6px 0 10px 140px; color: var(--op-red); font-size: 12px; }
.op-field__label { font-weight: 700; color: #444; text-align: right; }
.op-field select { width: 100%; padding: 7px 8px; border: 1px solid #8a97a3; border-radius: 4px; font-size: 14px; }
.op-notices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.op-notice { padding: 12px 10px 2px; border: 1px solid #d2d2d2; border-radius: 6px; }
.op-login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; background: #535250; font-family: Arial, Helvetica, sans-serif; }
.op-login__card { width: 442px; max-width: 100%; padding: 10px 10px 16px; border: 1px solid #000; border-radius: 6px; background: rgba(255, 255, 255, .95); }
.op-login__top { display: flex; justify-content: flex-end; height: 47px; border-bottom: 1px solid #dcdcdc; }
.op-login__top .op-lang { align-items: flex-start; gap: 10px; margin-right: -9px; }
.op-login form { display: flex; flex-direction: column; gap: 12px; padding: 34px 16px 0 18px; }
.op-input { display: flex; align-items: center; height: 36px; border: 1px solid #dcdcdc; border-radius: 4px; background: #fff; }
.op-input svg { flex: none; box-sizing: content-box; width: 15px; height: 15px; padding: 0 7px 0 8px; border-right: 1px solid #dcdcdc; color: #111; }
.op-input input { flex: 1; min-width: 0; height: 100%; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: #000; font: 13.33px Arial, Helvetica, sans-serif; }
.op-login__code { display: flex; align-items: flex-start; gap: 15px; }
.op-login__code .op-input { flex: 0 1 196px; min-width: 0; }
.op-login__picture { flex: none; padding: 0; border: 1px solid #037cb1; background: #e8e8e8; line-height: 0; cursor: pointer; }
.op-login__picture img { display: block; width: 120px; height: 40px; }
.op-login__submit { height: 34px; margin-top: 7px; border: 2px solid #099ee0; border-radius: 6px; color: #fff; background: #037cb1; font: 16px Arial, Helvetica, sans-serif; cursor: pointer; }
.op-login__version { display: block; margin-top: 26px; color: #111; font-size: 14px; text-align: right; }
.op-panel :focus-visible, .op-login :focus-visible { outline: 2px solid #f0a020; outline-offset: 1px; }
@media (max-width: 760px) {
  .op-form__row > label:first-child, .op-form__spacer { width: 100%; text-align: left; }
  .op-profile__row--actions, .op-profile__row--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-notices { grid-template-columns: 1fr; }
  .op-field__hint { margin-left: 0; }
  .op-side-actions { margin-right: 0; flex-direction: row; gap: 8px; }
  .op-profile__row { padding-left: 8px; }
  .op-field { grid-template-columns: 1fr; gap: 4px; }
  .op-field label { text-align: left; }
}
.op-warning { width: 480px; padding: 22px 24px; text-align: center; color: #555; font-size: 16px; }
.op-warning h2 { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 0 14px; border-bottom: 0; font-family: inherit; font-size: 24px; font-weight: 400; }
.op-warning__icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: #e6a23c; font-size: 18px; font-weight: 700; }
.op-warning > p { margin: 0 0 10px; }
.op-warning__box { margin: 14px -24px 22px; padding: 18px 24px; background: #f2dede; }
.op-warning__box p { margin: 6px 0; }
.op-warning__actions { display: flex; justify-content: center; gap: 20px; }
.op-warning__actions .op-btn { min-width: 96px; }

/* Small screens. The menu slides in over the page, so pages get the whole width. */
.op-menu-btn { display: none; flex: none; width: 38px; height: 38px; padding: 8px; border: 0; border-radius: 6px; background: var(--op-pill); color: #fff; cursor: pointer; }
.op-menu-btn svg { display: block; width: 100%; height: 100%; }
.op-side-back { display: none; }
@media (max-width: 900px) {
  .op-menu-btn { display: block; }
  .op-header { gap: 8px; padding: 0 8px; }
  .op-header__title { flex: 1; min-width: 0; }
  .op-header__title small { margin-left: 0; font-size: 13px; }
  .op-header__pills { flex: 0 1 auto; min-width: 0; max-width: 46%; }
  .op-header__pill { flex: 0 1 auto; min-width: 0; padding: 6px 10px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
  .op-header__pill--code { display: none; }
  .op-body { position: relative; gap: 0; padding: 6px; }
  .op-side { position: absolute; top: 0; bottom: 0; left: 0; z-index: 30; width: min(260px, 80vw); border-width: 0 2px 0 0; border-radius: 0; visibility: hidden; transform: translateX(-105%); transition: transform .18s ease, visibility .18s; }
  .is-menu-open .op-side { visibility: visible; transform: none; }
  .is-menu-open .op-side-back { display: block; position: absolute; inset: 0; z-index: 20; background: rgba(0, 0, 0, .45); }
  .op-main { padding-right: 0; }
}
@media (max-width: 760px) {
  .op-card { padding: 8px 10px 14px; }
  .op-toolbar { flex-direction: column; align-items: stretch; }
  .op-search input { flex: 1; width: auto; min-width: 0; }
  .op-prohibited { flex-wrap: wrap; }
  .op-profile__row--head { display: none; }
  .op-profile__row--data, .op-profile__row--data.op-profile__row--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-profile__row--data > span { min-width: 0; overflow-wrap: anywhere; }
  .op-profile__row--data > span[data-label]::before { content: attr(data-label); display: block; color: #777; font-size: 11px; font-weight: 400; }
  .op-profile__row--actions { justify-items: stretch; }
  .op-profile__row--actions .op-btn { padding-left: 6px; padding-right: 6px; font-size: 13px; white-space: normal; }
  .op-filter__row label { width: 100%; }
  .op-filter__row input { flex: 1 1 100%; width: 100%; }
  .op-filter__quick { margin-left: 0; }
  .op-form__row input:not([type="radio"]), .op-form__row select { width: 100%; }
  .op-table th { font-size: 13px; }
  .op-overlay { padding: 12px; }
  .op-dialog { max-height: 100%; }
  .op-dialog__body { padding: 10px 6px 6px; }
  .op-dialog__actions { padding: 10px 6px 0; }
  .op-warning { padding: 14px 16px; font-size: 15px; }
  .op-warning__box { margin: 10px -16px 16px; padding: 10px 16px; }
}
@media (max-width: 480px) {
  .op-login form { padding: 24px 6px 0; }
  .op-login__top .op-lang { margin-right: 0; }
  .op-login__code .op-input { flex: 1 1 0; }
}

/* Owner dashboard */
.op-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.op-stat { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid #d9dde3; border-radius: 6px; background: #fff; }
.op-stat span { color: #5f6b7a; font-size: 12px; }
.op-stat strong { color: #1f2a37; font-size: 20px; font-variant-numeric: tabular-nums; }
.op-stat--main { border-color: #1aa260; background: #eafaf2; }
.op-stat--main strong { color: #0c7a44; }
.op-stat--warn { border-color: #e0a100; background: #fff8e3; }
.op-stat--warn strong { color: #9a6b00; }
.op-side-actions--row { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-right: 0; }
.op-row-actions { display: flex; gap: 4px; white-space: nowrap; }
.op-table td.is-owed { color: #c0392b; font-weight: 700; }
.op-table td.op-wrap { min-width: 180px; max-width: 340px; white-space: pre-wrap; overflow-wrap: anywhere; }

.op-check { display: flex; align-items: center; gap: 8px; margin: 0 0 10px 140px; color: #444; font-weight: 700; }
.op-note { margin-bottom: 10px; color: #333; font-size: 13px; }
.op-newkey { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #1aa260; border-radius: 6px; background: #eafaf2; }
.op-newkey code { overflow-wrap: anywhere; color: #0c5c34; font-size: 14px; font-weight: 700; }
.op-code { overflow-x: auto; margin-bottom: 12px; padding: 10px 12px; border-radius: 6px; color: #e6f2ff; background: #16304e; font-size: 12px; }
.op-table--left td:last-child { text-align: left; white-space: normal; }
.op-tree td[data-level] { text-align: left; font-weight: 700; }
.op-tree td[data-level="1"] { padding-left: 26px; }
.op-tree td[data-level="2"] { padding-left: 48px; font-weight: 400; }
.op-tree td[data-level="3"] { padding-left: 70px; font-weight: 400; }
.op-tree td[data-level="4"] { padding-left: 92px; font-weight: 400; }
.op-tree td[data-level="5"] { padding-left: 114px; font-weight: 400; }
.op-tree td[data-level="6"] { padding-left: 136px; font-weight: 400; }
@media (max-width: 480px) { .op-check { margin-left: 0; } }
