@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

.vp-bc {
  --blue:#444DF9; --teal:#00C3C4; --violet:#8C2FFC;
  --green:#15803D; --green-bg:#DCFCE7;
  --red:#B91C1C; --red-bg:#FEE2E2;
  --amber:#B45309; --amber-bg:#FEF3C7;
  --ink:#0F172A; --text:#1E293B; --muted:#5A6B82; --soft:#94A3B8;
  --line:#E4E9F2; --line-soft:#EEF2F8;
  --bg:#F7F9FC; --surface:#FFFFFF; --hover:#F8FAFF;
  --r:10px; --mono:"JetBrains Mono","Roboto Mono",ui-monospace,monospace;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6px 8px 56px;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.vp-bc h1, .vp-bc h2, .vp-bc h3 { margin: 0; color: var(--ink); letter-spacing: -.02em; }
.vp-bc button { font-family: inherit; cursor: pointer; }
.vp-bc a { color: var(--blue); text-decoration: none; }
.vp-bc a:hover { text-decoration: underline; }
.vp-bc :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.vp-bc svg { display: block; flex-shrink: 0; }
.vp-bc .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.vp-bc-src { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.vp-bc .crumb { font-size: 12.5px; color: var(--soft); margin-bottom: 9px; }
.vp-bc .crumb a { color: var(--muted); }

.vp-bc .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.vp-bc .head h1 { font-size: 24px; font-weight: 700; }
.vp-bc .head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.vp-bc .head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.vp-bc .btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--text);
  transition: border-color .14s, background .14s; text-decoration: none !important; }
.vp-bc .btn:hover { border-color: #C9D3E6; background: #FCFDFF; }
.vp-bc .btn-primary { background: var(--blue); border-color: var(--blue); color: #fff !important; }
.vp-bc .btn-primary:hover { background: #3A42D8; text-decoration: none !important; }
.vp-bc .btn-sm { padding: 7px 12px; font-size: 13px; }
.vp-bc .btn svg { width: 14px; height: 14px; }

.vp-bc .summary { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 2px 0; margin-bottom: 16px; }
.vp-bc .sum { padding: 14px 22px; border-left: 1px solid var(--line-soft); flex: 1; min-width: 150px; }
.vp-bc .sum:first-child { border-left: none; }
.vp-bc .sum .v { font-size: 19px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.vp-bc .sum .k { font-size: 12px; color: var(--muted); margin-top: 1px; }
.vp-bc .sum .v.neg { color: var(--red); }
.vp-bc .sum .v.warn { color: var(--amber); }
.vp-bc .sum .v.pos { color: var(--green); }

.vp-bc .alert { display: none; gap: 11px; align-items: flex-start; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px;
  background: var(--amber-bg); border: 1px solid #F3DCA8; color: #7A4A0B; font-size: 13px; }
.vp-bc .alert.on { display: flex; }
.vp-bc .alert svg { flex-shrink: 0; margin-top: 2px; color: var(--amber); width: 16px; height: 16px; }
.vp-bc .alert b { font-weight: 700; }
.vp-bc .alert ul { margin: 8px 0 0; padding-left: 17px; }
.vp-bc .alert li { margin-bottom: 4px; }
.vp-bc .alert .fixlink { color: #7A4A0B; font-weight: 600; text-decoration: underline; }

.vp-bc .toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.vp-bc .search { position: relative; flex: 1; min-width: 210px; max-width: 330px; }
.vp-bc .search input { width: 100%; padding: 9px 12px 9px 34px; font-family: inherit; font-size: 13.5px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); }
.vp-bc .search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(68,77,249,.10); }
.vp-bc .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--soft); width: 15px; height: 15px; }
.vp-bc .segs { display: inline-flex; background: #EDF1F8; border-radius: var(--r); padding: 3px; max-width: 100%;
  overflow-x: auto; scrollbar-width: none; }
.vp-bc .segs::-webkit-scrollbar { display: none; }
.vp-bc .segs button { border: none; background: none; padding: 7px 13px; border-radius: 7px; font-size: 13px;
  font-weight: 500; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.vp-bc .segs button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(15,23,42,.07); }
.vp-bc .segs button.alertseg[aria-pressed="true"] { color: var(--amber); }
.vp-bc .segs .cnt { font-variant-numeric: tabular-nums; opacity: .6; margin-left: 5px; }
.vp-bc .spacer { flex: 1; }

.vp-bc .fpanel { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.vp-bc .fpanel.open { display: block; }
.vp-bc .fpanel .filter_form { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }

.vp-bc .grp { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 12px; overflow: hidden; }
.vp-bc .grp.orphan { border-color: #F3DCA8; }
.vp-bc .grp.hidden, .vp-bc .row.hidden { display: none !important; }
.vp-bc .grp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 13px 17px;
  background: #FBFCFE; border-bottom: 1px solid var(--line-soft); }
.vp-bc .grp.orphan .grp-head { background: #FFFBF2; }
.vp-bc .grp-head .cname { font-size: 14px; font-weight: 700; color: var(--ink); }
.vp-bc .grp-head .cname a { color: var(--ink); }
.vp-bc .grp-head .cname a:hover { color: var(--blue); }
.vp-bc .grp-head .cmeta { font-size: 12px; color: var(--muted); }

.vp-bc .cover { display: flex; gap: 5px; flex-wrap: wrap; }
.vp-bc .cv { font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.vp-bc .cv.ok { background: var(--green-bg); color: var(--green); }
.vp-bc .cv.gap { background: var(--red-bg); color: var(--red); }

.vp-bc .row { display: grid; grid-template-columns: 1fr 230px 1fr 132px 84px; align-items: center; gap: 16px;
  padding: 14px 17px; border-top: 1px solid var(--line-soft); }
.vp-bc .row:first-of-type { border-top: none; }
.vp-bc .row:hover { background: var(--hover); }
.vp-bc .row.stale { background: #FBFAF7; }

.vp-bc .who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.vp-bc .av { width: 32px; height: 32px; border-radius: 50%; background: #EEF0FF; color: var(--blue); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.vp-bc .av.stale { background: #EFEDE7; color: #8B8471; }
.vp-bc .who .nm { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.vp-bc .who .nm a { color: var(--ink); }
.vp-bc .who .nm a:hover { color: var(--blue); }
.vp-bc .who .ti { display: block; font-size: 11.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vp-bc .mail { font-family: var(--mono); font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-bc .mailstate { font-size: 11px; margin-top: 2px; display: inline-flex; align-items: center; gap: 5px; }
.vp-bc .mailstate.ok { color: var(--green); }
.vp-bc .mailstate.no { color: var(--amber); }
.vp-bc .mailstate .d { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.vp-bc .rolechips { display: flex; gap: 4px; flex-wrap: wrap; }
.vp-bc .rc { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 5px; background: #EEF2F8; color: #475669; white-space: nowrap; }
.vp-bc .rc.none { background: var(--red-bg); color: var(--red); }
.vp-bc .rc.more { background: transparent; color: var(--soft); }

.vp-bc .esc { font-size: 12px; color: var(--muted); }
.vp-bc .esc .lvl { font-weight: 600; color: var(--text); }

.vp-bc .acts { display: flex; justify-content: flex-end; gap: 2px; opacity: 0; transition: opacity .12s; }
.vp-bc .row:hover .acts, .vp-bc .row:focus-within .acts { opacity: 1; }
.vp-bc .iconbtn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; border-radius: 6px; color: var(--muted); text-decoration: none !important; }
.vp-bc .iconbtn:hover { background: #E7ECF6; color: var(--ink); }
.vp-bc .iconbtn svg { width: 15px; height: 15px; }

.vp-bc .staleflag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700;
  background: var(--amber-bg); color: var(--amber); padding: 2px 8px; border-radius: 5px; margin-left: 8px; }

.vp-bc .foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.vp-bc .foot select { font-family: inherit; font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface); color: var(--text); }
.vp-bc .foot .pages { display: flex; gap: 10px; align-items: center; }

.vp-bc-drawer { position: fixed; inset: 0; z-index: 6000; display: none; }
.vp-bc-drawer.on { display: block; }
.vp-bc-drawer .scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, .42); }
.vp-bc-drawer .panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: #fff; box-shadow: -12px 0 40px rgba(15,23,42,.18);
  display: flex; flex-direction: column; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); }
.vp-bc-drawer .dhead { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.vp-bc-drawer .dtop { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.vp-bc-drawer .dtitle { font-size: 16px; font-weight: 700; color: var(--ink); }
.vp-bc-drawer .dsub { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-family: var(--mono); }
.vp-bc-drawer .dclose { width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.vp-bc-drawer .dacts { padding: 10px; display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.vp-bc-drawer .dact { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: var(--text) !important; text-decoration: none !important; font-size: 13.5px; font-weight: 600; }
.vp-bc-drawer .dact:hover { background: var(--hover); }
.vp-bc-drawer .dact svg { width: 16px; height: 16px; color: var(--muted); }
.vp-bc-drawer .dact.danger { color: var(--red) !important; }
.vp-bc-drawer .dact.danger:hover { background: var(--red-bg); }
.vp-bc-drawer .dact.danger svg { color: var(--red); }

@media (max-width: 1040px) {
  .vp-bc .row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .vp-bc .who { grid-column: 1 / -1; }
  .vp-bc .acts { opacity: 1; }
}
@media (max-width: 640px) {
  .vp-bc .sum { min-width: 50%; flex: none; }
  .vp-bc .row { grid-template-columns: 1fr; }
}

body.vp-bc-on #footer,
body.vp-bc-on #title_bar,
body.vp-bc-on #sidebar { display: none !important; }
body.vp-bc-on #vp-ws { background: #F7F9FC; }
body.billing_contacts.index #vp-dash .vpm { padding-left: 20px; padding-right: 24px; }
body.billing_contacts.index #main_content_wrapper,
body.billing_contacts.index #main_content,
body.billing_contacts.index #active_admin_content {
  margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; float: none !important;
}
