/* ══════════════════════════════════════════════════════════════════════════
   v3.9.455 — Mail-in queue: the header tray button, and the queue / review
   page that opens beneath the staff header. Namespaced .cp-mid; it sits
   outside .ariscpa-portal, so controls are reset here rather than trusting
   the theme.
   ══════════════════════════════════════════════════════════════════════════ */
html body .cp-mid-btn {
  position: relative; display: inline-flex !important; align-items: center; justify-content: center; flex: none;
  width: 46px; height: 40px; padding: 0 !important; margin: 0 !important; border-radius: 8px !important;
  background: #1E3047 !important; color: #fff !important; border: 1.5px solid #C9A227 !important;
  cursor: pointer; box-shadow: none !important; min-height: 0 !important;
}
html body .cp-mid-btn:hover, html body .cp-mid-btn.is-on { background: #2A3F5C !important; }
html body .cp-mid-btn:focus-visible { outline: 3px solid #9090E0 !important; outline-offset: 2px; }
html body .cp-mid-btn .cp-mid-n {
  position: absolute; top: -8px; right: -8px; min-width: 21px; height: 21px; padding: 0 6px; box-sizing: border-box;
  border-radius: 11px; background: #C9A227; color: #0D1B2A; font: 800 0.72rem/21px -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center; border: 2px solid #0D1B2A;
}
html body .cp-mid-btn .cp-mid-n[hidden] { display: none; }

/* v3.9.456 — no page scroll lock: overflow:hidden on html/body turns off the
   pinned (sticky) staff header, which then slid up and was clipped. The queue
   opens beneath the services bar; that row's page tools (New election, Clear
   filters…) belong to the tab underneath, so they step aside while it is open. */
html.cp-mid-on .ariscpa-dash-head > :not(.ariscpa-staff-nav) { visibility: hidden !important; }

html body .cp-mid {
  position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 99980; overflow-y: scroll; overscroll-behavior: contain;
  background: #EEF0F5; color: #1A2230; text-align: left;
  font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
html body .cp-mid[hidden] { display: none !important; }
html body .cp-mid *, html body .cp-mid *::before, html body .cp-mid *::after { box-sizing: border-box; }
html body .cp-mid__wrap { max-width: none; margin: 0; padding: 18px 18px 48px; }   /* v3.9.456 — the page's own gutters, like every staff tab */
html body .cp-mid h2, html body .cp-mid h3 { font-family: inherit; color: #0D1B2A; letter-spacing: 0; text-transform: none; margin: 0; }
html body .cp-mid h2 { font-size: 1.55rem; font-weight: 800; }
html body .cp-mid h3 { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #4A5464; margin-bottom: 10px; }
html body .cp-mid p { margin: 0; }
html body .cp-mid a { color: #2B2FD4; text-decoration: underline; }
html body .cp-mid a:hover { color: #1B1E9A; }
html body .cp-mid-dim { color: #4A5464; }
html body .cp-mid-sm { font-size: 0.86rem; }
html body .cp-mid-strong { font-weight: 700; color: #1A2230; }
html body .cp-mid-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* head */
html body .cp-mid__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
html body .cp-mid__title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
html body .cp-mid__badge { background: #0D1B2A; color: #fff; font-size: 0.82rem; font-weight: 700; padding: 2px 10px; border-radius: 11px; }
html body .cp-mid__tools { display: flex; align-items: center; gap: 10px; }
html body .cp-mid-search { display: flex !important; align-items: center; gap: 8px; height: 42px; padding: 0 12px; width: 320px; max-width: 70vw;
  background: #fff; border: 1px solid #C9CFDA; border-radius: 8px; color: #4A5464; margin: 0; }
html body .cp-mid-search input { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important;
  font: inherit !important; font-size: 0.92rem !important; color: #1A2230 !important; flex: 1; min-width: 0; height: 38px; padding: 0 !important; margin: 0 !important; }
html body .cp-mid-search:focus-within { border-color: #2B2FD4; box-shadow: 0 0 0 3px rgba(43,47,212,.15); }
html body .cp-mid-x { display: inline-flex !important; align-items: center; justify-content: center; width: 44px; height: 42px; padding: 0 !important; margin: 0 !important;
  border-radius: 8px !important; border: 1px solid #C9CFDA !important; background: #fff !important; color: #1A2230 !important; cursor: pointer; box-shadow: none !important; }
html body .cp-mid-x:hover { background: #F5F6FA !important; }

/* chips */
html body .cp-mid__chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
html body .cp-mid-chip { height: 38px; padding: 0 16px !important; margin: 0 !important; border-radius: 19px !important; border: 1px solid #C9CFDA !important;
  background: #fff !important; color: #1A2230 !important; font: 600 0.88rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; box-shadow: none !important; min-height: 0 !important; }
html body .cp-mid-chip.is-on { background: #0D1B2A !important; border-color: #0D1B2A !important; color: #fff !important; }

/* table: ledger rows, header pinned to the top of the page */
html body .cp-mid__box { background: #fff; border: 1px solid #D5DAE3; border-radius: 10px; }
html body .cp-mid__t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; margin: 0; }
html body .cp-mid__t th { position: sticky; top: 0; z-index: 2; background: #0D1B2A; color: #fff; text-align: left; padding: 11px 16px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; border: 0; }
html body .cp-mid__t th:first-child { border-top-left-radius: 9px; }
html body .cp-mid__t th:last-child { border-top-right-radius: 9px; }
html body .cp-mid__t td { padding: 14px 16px; vertical-align: top; border-top: 1px solid #E4E7EE; border-left: 0; border-right: 0; border-bottom: 0; background: transparent; }
html body .cp-mid-r { background: #fff; cursor: pointer; }
html body .cp-mid-r.is-alt { background: #F5F6FA; }
html body .cp-mid-r:hover { background: #ECEEFB; }
html body .cp-mid-when { white-space: nowrap; color: #4A5464; width: 96px; }
html body .cp-mid__t td:nth-child(4) { max-width: 320px; }
html body .cp-mid-acts { text-align: right !important; white-space: nowrap; width: 1%; }
html body .cp-mid-acts .cp-mid-b + .cp-mid-b { margin-left: 6px !important; }
html body .cp-mid-reading::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%;
  border: 2px solid #9090E0; border-top-color: transparent; animation: cp-mid-spin 0.9s linear infinite; vertical-align: -1px; }
@keyframes cp-mid-spin { to { transform: rotate(360deg); } }
@media ( prefers-reduced-motion: reduce ) { html body .cp-mid-reading::before { animation: none; } }

/* pills */
html body .cp-mid-pill { display: inline-block; margin-top: 6px; font-size: 0.74rem; font-weight: 700; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
html body .cp-mid-pill--hi { background: #DDF3E4; color: #1C5B33; }
html body .cp-mid-pill--md { background: #FFF1CC; color: #6E4A00; }
html body .cp-mid-pill--lo { background: #FBE3E3; color: #8A1C1C; }
html body .cp-mid-pill--nt { background: #0D1B2A; color: #F2D777; }
html body .cp-mid-pill--rp { background: #E6E6FA; color: #2B2FD4; margin: 0 0 4px; }

/* buttons */
html body .cp-mid-b {
  display: inline-flex !important; align-items: center; justify-content: center; height: 36px; padding: 0 14px !important; margin: 0 !important;
  border-radius: 8px !important; border: 1px solid #C9CFDA !important; background: #fff !important; color: #1A2230 !important;
  font: 600 0.84rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; text-transform: none !important; letter-spacing: 0 !important;
  cursor: pointer; white-space: nowrap; box-shadow: none !important; min-height: 0 !important; text-decoration: none !important;
}
html body .cp-mid-b:hover { background: #F5F6FA !important; }
html body .cp-mid-b:disabled { opacity: 0.45; cursor: default; }
html body .cp-mid-b:focus-visible, html body .cp-mid-chip:focus-visible, html body .cp-mid-x:focus-visible, html body .cp-mid-link:focus-visible { outline: 3px solid #9090E0 !important; outline-offset: 2px; }
html body .cp-mid-b--go { background: #2B2FD4 !important; border-color: #2B2FD4 !important; color: #fff !important; }
html body .cp-mid-b--go:hover { background: #1F23B5 !important; }
html body .cp-mid-b--dark { background: #0D1B2A !important; border-color: #0D1B2A !important; color: #fff !important; }
html body .cp-mid-b--dark:hover { background: #1E3047 !important; }
html body .cp-mid-b--bad { color: #8A1C1C !important; }
html body .cp-mid-b--ghost { height: 30px; padding: 0 10px !important; font-size: 0.78rem !important; }
html body .cp-mid-b--lg { height: 44px; padding: 0 18px !important; font-size: 0.9rem !important; }
html body .cp-mid-link { background: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; color: #2B2FD4 !important;
  font: 700 0.95rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; }
html body .cp-mid-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

html body .cp-mid-msg { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; font-size: 0.9rem; }
html body .cp-mid-msg--ok { background: #DDF3E4; color: #1C5B33; }
html body .cp-mid-msg--err { background: #FBE3E3; color: #8A1C1C; }
html body .cp-mid-empty { background: #fff; border: 1px solid #D5DAE3; border-radius: 10px; padding: 40px 20px; text-align: center; }
html body .cp-mid-foot { margin-top: 12px !important; }
html body .cp-mid-alias { margin-top: 18px; background: #fff; border: 1px solid #D5DAE3; border-radius: 10px; padding: 12px 16px; }
html body .cp-mid-alias summary { cursor: pointer; font-weight: 700; }
html body .cp-mid-alias ul { list-style: none; margin: 10px 0; padding: 0; }
html body .cp-mid-alias li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid #E4E7EE; }

/* review */
html body .cp-mid__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
html body .cp-mid-rv { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
html body .cp-mid-doc { flex: 999 1 560px; min-width: 0; background: #fff; border: 1px solid #D5DAE3; border-radius: 10px; overflow: hidden;
  position: sticky; top: 0; }
html body .cp-mid-doc__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #E4E7EE; font-size: 0.9rem; }
html body .cp-mid-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 10px 0; border-bottom: 1px solid #E4E7EE; background: #F5F6FA; }
html body .cp-mid-tab { height: 34px; padding: 0 12px !important; margin: 0 !important; border: 1px solid transparent !important; border-bottom: 0 !important;
  border-radius: 8px 8px 0 0 !important; background: transparent !important; color: #4A5464 !important; cursor: pointer; max-width: 240px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 0.82rem/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; box-shadow: none !important; }
html body .cp-mid-tab.is-on { background: #fff !important; border-color: #E4E7EE !important; color: #1A2230 !important; }
html body .cp-mid-pv { display: block; width: 100%; height: calc(100vh - 230px); min-height: 520px; border: 0; background: #F5F6FA; }
html body .cp-mid-imgbox { background: #F5F6FA; padding: 16px; text-align: center; max-height: calc(100vh - 230px); min-height: 400px; overflow: auto; }
html body .cp-mid-img { max-width: 100%; height: auto; box-shadow: 0 1px 4px rgba(13,27,42,.18); }
html body .cp-mid-nopv { padding: 60px 20px; text-align: center; background: #F5F6FA; }
html body .cp-mid-side { flex: 1 1 400px; min-width: 0; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
html body .cp-mid-card { background: #fff; border: 1px solid #D5DAE3; border-radius: 10px; padding: 16px 18px; }
html body .cp-mid-card__h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
html body .cp-mid-kv { font-size: 0.9rem; line-height: 1.6; }
html body .cp-mid-kv span { color: #4A5464; display: inline-block; min-width: 68px; }
html body .cp-mid-body { margin-top: 10px; padding: 10px 12px; background: #F5F6FA; border-radius: 8px; font-size: 0.9rem; white-space: pre-wrap; max-height: 220px; overflow: auto; }
html body .cp-mid-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 8px; font-size: 0.9rem; }
html body .cp-mid-dl dt { color: #4A5464; margin: 0; }
html body .cp-mid-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
html body .cp-mid-lbl, html body .cp-mid-reqrow label { display: block; font-size: 0.82rem; font-weight: 700; margin: 12px 0 4px; color: #1A2230; }
html body .cp-mid-card select, html body .cp-mid-card input[type="search"], html body .cp-mid-card textarea {
  display: block; width: 100% !important; max-width: none !important; height: 42px; margin: 0 !important; padding: 0 10px !important;
  border: 1px solid #C9CFDA !important; border-radius: 8px !important; background: #fff !important; color: #1A2230 !important;
  font: 400 0.9rem/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; box-shadow: none !important;
}
html body .cp-mid-card textarea { height: auto; min-height: 130px; padding: 10px !important; resize: vertical; margin-bottom: 10px !important; }
html body .cp-mid-card select:disabled { background: #F5F6FA !important; color: #6B7482 !important; }
html body .cp-mid-card select:focus, html body .cp-mid-card input:focus, html body .cp-mid-card textarea:focus { border-color: #2B2FD4 !important; outline: 0 !important; box-shadow: 0 0 0 3px rgba(43,47,212,.15) !important; }
html body .cp-mid-results { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid #C9CFDA; border-radius: 8px; max-height: 220px; overflow: auto; background: #fff; }
html body .cp-mid-results button { display: block; width: 100%; text-align: left; padding: 9px 10px !important; margin: 0 !important; border: 0 !important; border-radius: 6px !important;
  background: transparent !important; color: #1A2230 !important; font: 500 0.88rem/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; cursor: pointer; box-shadow: none !important; text-transform: none !important; }
html body .cp-mid-results button:hover, html body .cp-mid-results button:focus-visible { background: #ECEEFB !important; outline: 0; }
html body .cp-mid-reqrow { margin-top: 4px; }
html body .cp-mid-noticeline { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
html body .cp-mid-noticeline .cp-mid-pill { margin: 0; }
html body .cp-mid-warn { margin-top: 14px; padding: 12px; border-radius: 8px; background: #FFF6D9; border: 1px solid #E8D28A; font-size: 0.86rem; color: #4A3A00; }
html body .cp-mid-note { margin-top: 10px !important; font-size: 0.86rem; color: #4A5464; }
html body .cp-mid-check { display: flex !important; gap: 10px; align-items: flex-start; margin: 12px 0 0; font-size: 0.9rem; cursor: pointer; }
html body .cp-mid-check input { width: 18px; height: 18px; margin: 2px 0 0 !important; flex: none; }
html body .cp-mid-card .cp-mid-row { margin-top: 16px; }

/* phones: rows become cards; the preview stacks above the side panel */
@media ( max-width: 820px ) {
  html body .cp-mid__wrap { padding: 16px 16px 40px; }
  html body .cp-mid-search { width: auto; flex: 1; }
  html body .cp-mid__head > div:first-child { flex: 1 1 100%; }
  html body .cp-mid__tools { flex: 1 1 100%; }
  html body .cp-mid__box { background: transparent; border: 0; }
  html body .cp-mid__t, html body .cp-mid__t tbody, html body .cp-mid__t tr, html body .cp-mid__t td { display: block; width: 100%; }
  html body .cp-mid__t thead { display: none; }
  html body .cp-mid-r { border: 1px solid #D5DAE3; border-radius: 10px; margin-bottom: 10px; padding: 6px 0; }
  html body .cp-mid__t td { border-top: 0; padding: 6px 14px; max-width: none !important; }
  html body .cp-mid-when { width: auto; }
  html body .cp-mid-when br { display: none; }
  html body .cp-mid-acts { text-align: left !important; white-space: normal; padding-top: 10px !important; }
  html body .cp-mid-acts .cp-mid-b { height: 44px; margin: 0 6px 6px 0 !important; }
  html body .cp-mid-acts .cp-mid-b + .cp-mid-b { margin-left: 0 !important; }
  html body .cp-mid-doc { position: static; }
  html body .cp-mid-pv { height: 70vh; min-height: 360px; }
  html body .cp-mid-side { max-width: none; }
}
