/* oRic Radius — dealer panel.
 *
 * The shape is deliberately the one our customers already know from the
 * panel they rent today (Gentelella + Bootstrap 3): dark slate rail on the
 * left, white panels on a #f1f1f1 field, dense tables. We rebuild it with
 * flexbox and CSS variables instead of float percentages, so the same screen
 * works on a phone in the field.
 *
 * Colours and measurements come from reference/zailpro/02-design-stack.md.
 */

:root {
  /* oRic Radius wears the oRic tecH billing colours: white surfaces on a light
     green page, one green accent (#27764A). Same company, same look. The old
     slate variable names are kept but recoloured into the green family, so
     every element that used to be dark slate is now cohesive green/grey. */
  --slate-900: #1e6b42;   /* deep green: pager "on", strong borders */
  --slate-800: #27764a;   /* brand green: dark slabs, primary / dark buttons */
  --slate-700: #4e8a66;   /* mid green */
  --slate-600: #5e7169;   /* muted green-grey: secondary button, icons */
  --slate-500: #7c8f85;   /* fourth button */
  --muted:     #5e7169;   /* rail / muted text */
  --ink:       #16231d;   /* near-black green ink */
  --ink-soft:  #5e7169;
  --field:     #f1f8f4;   /* page background — light green tint */
  --panel:     #fff;
  --line:      #dce8e1;
  --line-thead: rgba(39, 118, 74, .08);

  --primary:   #27764a;
  --primary-b: #20603c;
  --success:   #27764a;
  --danger:    #c2362b;
  --danger-d:  #c2362b;
  --info:      #1f6fb2;
  --warning:   #a86512;
  --yellow:    #e4b200;   /* the "processing" flag over a table */

  --rail: 230px;
  --rail-sm: 70px;
  --top: 57px;
  --radius: 10px;

  /* chart series colours — the shared charts.js draws with these (billing set) */
  --s1: #2e8b57; --s2: #1f6fb2; --s3: #c06a00; --s4: #b8356b;
  --s5: #7a5ac4; --s6: #00938a;
  --accent: #27764a; --muted-2: #5e7169;
  --card: #fff; --ink-1: #44564c; --line-1: #dce8e1;
  --accent-soft: #e7f3eb; --accent-ink: #1e6b42;
  --viz-track: #e7f0ea;   /* the unfilled part of a donut / gauge */
}

/* ── charts (/shared/js/charts.js) ─────────────────────────────────────────
 * The kit draws the marks and leaves the look to whichever panel uses it, so
 * these classes ARE the look. They are not decoration: an SVG <path> with no
 * fill rule of its own is painted solid black, so without `.viz-line` below a
 * line chart comes out as a black blob — which is what this panel's graphs
 * were until these rules were written down.
 * Flat, like everything else here: one solid colour per series, a hairline
 * grid, no glow. */
/* The kit draws the SVG at the box's real width with its own height on it, so
 * the box takes the height from the picture rather than the other way round —
 * a fixed height here just clips the month names off the bottom. */
.viz { width: 100%; }
.viz svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz .lg { font-size: 11px; fill: var(--ink-soft); }
.viz text { fill: var(--ink-soft); }

.viz-axis { fill: var(--ink-soft); font-size: 11px; }
.viz-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.viz-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.viz-cross { stroke: var(--slate-600); stroke-dasharray: 3 3; opacity: 0; }
.viz-dot { opacity: 0; stroke: #fff; stroke-width: 2; }
.viz-col:hover .viz-cross, .viz-col:hover .viz-dot { opacity: 1; }
.viz-bar { transition: opacity .12s; }
.viz-col:hover .viz-bar { opacity: .75; }

.viz-legend {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  margin: 0 0 8px; font-size: 12px; color: var(--ink-soft);
}
.viz-legend i {
  display: inline-block; width: 12px; height: 4px; border-radius: 2px;
  margin-right: 6px; vertical-align: 3px;
}

/* One floating tooltip serves every chart on the page; the kit moves it with
 * `transform`, so it has to start at the top-left corner of the window. */
.viz-tip {
  position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(22, 35, 29, .12);
  padding: 7px 10px; font-size: 12px; line-height: 1.55; white-space: nowrap;
}
.viz-tip strong { display: block; margin-bottom: 2px; }

/* A chart with its own heading, the way the profile stacks them. */
.g-box > h4 {
  margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--ink-soft);
  display: flex; align-items: center; gap: 7px;
}
.g-box > h4 small { margin-left: auto; font-weight: 400; color: var(--muted); }
.chart-tip {
  position: fixed; z-index: 90; pointer-events: none;
  background: var(--slate-800); color: #fff; padding: 5px 9px;
  border-radius: 4px; font-size: 11px; white-space: nowrap;
  transform: translate(-50%, -130%); opacity: 0; transition: opacity .1s;
}

* { box-sizing: border-box; }

/* A class with `display` outranks the browser's own [hidden] rule, and both
 * the login screen and the shell are hidden that way. Say it once, loudly. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--field);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: 13px;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ───────────────────────── layout ───────────────────────── */

.zp-shell { min-height: 100%; }

.zp-side {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  background: var(--slate-800);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform .2s ease;
}

.zp-main {
  margin-left: var(--rail);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.zp-content { padding: 10px 20px 24px; flex: 1; }

/* ───────────────────────── the rail ───────────────────────── */

.zp-brand {
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  flex: 0 0 auto;
}

.zp-brand img { max-height: 38px; max-width: 150px; object-fit: contain; }

.zp-brand .mark {
  width: 34px; height: 34px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
  flex: 0 0 auto;
}

.zp-brand b { color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .2px; }

.zp-nav { overflow-y: auto; flex: 1; padding: 8px 0 20px; }

.zp-nav::-webkit-scrollbar { width: 6px; }
.zp-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 3px; }

.zp-nav > ul, .zp-nav ul { list-style: none; margin: 0; padding: 0; }

.zp-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  border-right: 3px solid transparent;
}

.zp-nav a:hover { color: #fff; background: rgba(255, 255, 255, .04); text-decoration: none; }

.zp-nav a > i:first-child { width: 16px; text-align: center; font-size: 15px; }

.zp-nav a .caret { margin-left: auto; font-size: 11px; transition: transform .15s; }

.zp-nav li.open > a .caret { transform: rotate(90deg); }

.zp-nav li.active > a,
.zp-nav li.open > a {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.zp-nav li.active > a { border-right-color: var(--primary); }

/* a submenu stays closed until its parent is opened */
.zp-nav .sub { display: none; background: rgba(0, 0, 0, .16); }
.zp-nav li.open > .sub { display: block; }
.zp-nav .sub a { padding-left: 42px; font-size: 12.5px; }

/* ───────────────────────── the topbar ───────────────────────── */

.zp-top {
  height: var(--top);
  background: var(--slate-800);
  color: #f1f1f1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 30;
  flex: 0 0 auto;
}

.zp-top .burger {
  background: none; border: 0; color: #f1f1f1;
  font-size: 19px; cursor: pointer; padding: 6px 8px;
}

.zp-top .tagline { font-size: 13px; opacity: .9; white-space: nowrap; }

.zp-top .spacer { flex: 1; }

.zp-top .bit {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; white-space: nowrap;
}

.zp-top .bit i { opacity: .85; }

.zp-top .balance { font-weight: 600; }

.zp-top .bell {
  position: relative; color: #f1f1f1; padding: 6px 8px;
  background: none; border: 0; cursor: pointer; font-size: 15px;
}

.zp-top .bell .badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--danger);
  color: #fff; font-size: 10px; line-height: 16px; text-align: center;
}

.zp-top .who {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 0; color: #f1f1f1; cursor: pointer;
  font-family: inherit; font-size: 13px;
}

.zp-top .who img, .zp-top .who .avatar {
  width: 29px; height: 29px; border-radius: 50%;
  background: var(--slate-600); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  object-fit: cover;
}

/* ───────────────────────── panels ───────────────────────── */

.x_panel {
  background: var(--panel);
  border-radius: var(--radius);
  margin-bottom: 14px;
  padding: 0;
  overflow: hidden;
}

.x_title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 15px;
  border-bottom: 2px solid var(--field);
}

.x_title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}

.x_title h2 i { color: var(--slate-600); }

.x_title .tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.x_content { padding: 15px; }

/* The subscriber profile puts its sections under dark bars, not light ones. */
.x_panel.dark > .x_title {
  background: var(--slate-800);
  border-bottom: 0;
  color: #fff;
}

.x_panel.dark > .x_title h2,
.x_panel.dark > .x_title h2 i { color: #fff; }

/* A section that opens and shuts: the bar is the button. */
.x_panel.fold > .x_title { cursor: pointer; }
.x_panel.fold > .x_title .caret { margin-left: auto; transition: transform .15s; }
.x_panel.fold.open > .x_title .caret { transform: rotate(90deg); }
.x_panel.fold:not(.open) > .x_content { display: none; }
.x_panel.fold.open > .x_title .tools + .caret { margin-left: 8px; }

/* label / value rows down the Service Details panel */
.detail-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--field);
}

.detail-row:last-child { border-bottom: 0; }

.detail-row .k {
  flex: 0 0 210px;
  display: flex; align-items: center; gap: 9px;
  font-weight: 600; color: #5a738e;
}

.detail-row .k i { width: 15px; text-align: center; }
.detail-row .v { flex: 1; word-break: break-word; }
.detail-row .v.red   { color: var(--danger-d); font-weight: 600; }
.detail-row .v.green { color: var(--success); font-weight: 600; }
.detail-row .v.blue  { color: var(--primary-b); font-weight: 600; }

/* the identity column on the left of a profile */
.who-lines { list-style: none; margin: 14px 0 0; padding: 0; }
.who-lines li {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 5px 0; color: var(--ink);
}
.who-lines li i { width: 16px; text-align: center; color: var(--slate-600); margin-top: 3px; }

.photo-big {
  width: 150px; height: 150px; border-radius: 100%;
  background: var(--field); color: #c3ccd6;
  display: grid; place-items: center; font-size: 62px;
  margin: 0 auto; object-fit: cover;
}

.btn-stack { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.btn-stack .btn { flex: 1 1 140px; justify-content: center; }

/* ───────────────────────── tiles ───────────────────────── */

.tile_count {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

/* The four counters over a subscriber profile stay on one line: they are read
 * together, and a 2 + 2 wrap makes the balance look like a separate thing. */
.tile_count.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile_count.four .count { font-size: 2rem; }

@media (max-width: 700px) {
  .tile_count.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tile_stats_count {
  background: rgb(96 125 139 / 14%);
  border: 2px solid #607d8b;
  border-radius: var(--radius);
  padding: 15px;
  text-align: center;
}

.tile_stats_count .count { font-size: 3rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.tile_stats_count .count-label { font-size: 13px; color: var(--ink-soft); }

/* the small two-column rows inside the statistics boxes */
.tile_info { padding: 9px 12px; border-bottom: 1px solid var(--field); display: flex; align-items: center; }
.tile_info:last-child { border-bottom: 0; }
.counter-label { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); }
.counter-label i { font-size: 15px; }
.counter-number { margin-left: auto; font-weight: 700; font-size: 20px; color: var(--ink); }

/* ───────────────────────── quick action tiles ───────────────────────── */

.quick_access {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.quick_access button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  font-family: inherit; font-size: 13px; color: var(--ink);
  cursor: pointer;
}

.quick_access button:hover { border-color: var(--slate-600); color: var(--slate-800); }
.quick_access button i { font-size: 21px; color: var(--slate-600); }

/* ───────────────────────── tabs ───────────────────────── */

.zp_tabs {
  display: flex; flex-wrap: wrap; gap: 3px;
  list-style: none; margin: 0 0 -1px; padding: 0;
  border-bottom: 1px solid var(--slate-700);
}

.zp_tabs li { margin-top: 5px; }

.zp_tabs button {
  background: var(--slate-700);
  color: #fff;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 14px;
  font-family: inherit; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
}

.zp_tabs li.active button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--slate-700);
  border-bottom-color: #fff;
  cursor: default;
}

.tab-body { padding-top: 15px; }

/* ───────────────────────── tables ───────────────────────── */

.table-wrap { overflow-x: auto; }

table.zp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.zp-table thead th {
  background: #fff;
  color: var(--ink-soft);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  padding: 9px 8px;
  border: 1px solid var(--line-thead);
}

table.zp-table tbody td {
  padding: 8px;
  border: 1px solid rgba(63, 208, 173, .25);
  vertical-align: middle;
  /* A phone number or a date broken over two lines is unreadable, and these
   * lists are wide anyway — the table scrolls sideways instead. */
  white-space: nowrap;
}

/* The few cells that hold prose are allowed to wrap. */
table.zp-table td.wrap { white-space: normal; word-break: break-word; max-width: 320px; }

table.zp-table tbody tr:hover { background: #e9f3ed; }

table.zp-table img.photo { width: 50px; height: 50px; border-radius: 100%; object-fit: cover; }

.table-empty { padding: 26px; text-align: center; color: var(--ink-soft); }

/* the bar above every list: length menu, export buttons, search */
.dt-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 10px;
}

.dt-head .exports { display: flex; gap: 4px; flex-wrap: wrap; }
.dt-head .search { margin-left: auto; }

.dt-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-top: 12px;
  color: var(--ink-soft);
}

.pager { display: flex; gap: 4px; flex-wrap: wrap; }

.pager button {
  padding: 6px 9px;
  background: none;
  border: 1px solid var(--slate-900);
  border-radius: 3px;
  color: var(--slate-900);
  font-family: inherit; font-size: 12px; cursor: pointer;
}

.pager button[disabled] { opacity: .4; cursor: default; }
.pager button.on { background: var(--slate-900); color: #fff; }

/* ───────────────────────── buttons ───────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: inherit; font-size: 12.5px; line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  color: #fff;
  background: var(--slate-600);
}

.btn:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
.btn[disabled] { opacity: .55; cursor: default; filter: none; }

.btn-primary { background: var(--primary); border-color: var(--primary-b); }
.btn-success { background: var(--success); border-color: var(--success); }
.btn-danger  { background: var(--danger);  border-color: var(--danger); }
.btn-info    { background: var(--info);    border-color: var(--info); }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-second  { background: var(--slate-600); }
.btn-third   { background: var(--slate-600); }
.btn-fourth  { background: var(--slate-500); }
.btn-dark    { background: var(--slate-800); }

.btn-sm { padding: 4px 8px; font-size: 11.5px; }
.btn-xs { padding: 3px 6px; font-size: 11px; }

.btn-ghost {
  background: none; color: var(--slate-600); border-color: var(--line);
}
.btn-ghost:hover { color: var(--slate-800); background: var(--field); }

/* ───────────────────────── forms ───────────────────────── */

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 11px;
}

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group > label { font-size: 12px; color: var(--ink-soft); }

.form-control {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  font-family: inherit; font-size: 13px; color: var(--ink);
}

.form-control:focus { outline: none; border-color: var(--primary); }

select.form-control { appearance: none; background-image: none; padding-right: 10px; }

textarea.form-control { min-height: 86px; resize: vertical; }

.check { display: flex; align-items: center; gap: 7px; font-size: 13px; }

.inline-form {
  display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap;
}

/* ───────────────────────── chips / status ───────────────────────── */

.chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  white-space: nowrap;
  background: var(--field);
  color: var(--ink-soft);
}

.chip-on      { background: var(--accent-soft); color: var(--accent-ink); }
.chip-off     { background: #eef3f0; color: var(--ink-soft); }
.chip-expired { background: #fbeae8; color: var(--danger); font-weight: 600; }
/* A line that is DOWN, and an expiry that has PASSED. Both are read at a
   glance off a long list, so both are red rather than the quiet grey a
   "nothing happening" chip gets. */
.chip-down    { background: #fbeae8; color: var(--danger); font-weight: 600; }
.chip-active  { background: var(--accent-soft); color: var(--accent-ink); }
.chip-disable { background: #fbeae8; color: var(--danger); }
.chip-register{ background: #faf0e2; color: var(--warning); }
.chip-blue    { background: #e8f0f8; color: var(--info); }

/* ───────────────────────── modal ───────────────────────── */

.modal-back {
  position: fixed; inset: 0;
  background: rgba(17, 24, 32, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 14px;
  overflow-y: auto;
  z-index: 60;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  width: min(760px, 100%);
  margin: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

.modal-box.wide { width: min(1040px, 100%); }
.modal-box.narrow { width: min(460px, 100%); }

.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 { margin: 0; font-size: 15px; font-weight: 500; }
.modal-head .x {
  margin-left: auto; background: none; border: 0;
  font-size: 20px; line-height: 1; color: var(--ink-soft); cursor: pointer;
}

.modal-body { padding: 16px; }

.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

/* ───────────────────────── notice ticker ───────────────────────── */

.ticker {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius);
  padding: 9px 13px;
  margin-bottom: 12px;
  font-size: 12.5px;
  overflow: hidden;
}

.ticker b { color: var(--slate-800); white-space: nowrap; }
.ticker .items { overflow: hidden; white-space: nowrap; }

/* ───────────────────────── toast ───────────────────────── */

.toast-wrap {
  position: fixed; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 80;
}

.toast {
  background: var(--slate-800); color: #fff;
  padding: 11px 15px; border-radius: 4px;
  font-size: 13px; max-width: 340px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.toast.bad { background: var(--danger-d); }
.toast.good { background: var(--success); }

/* the yellow flag DataTables shows while a big list loads */
.processing {
  position: fixed; top: 5%; left: 50%; transform: translateX(-50%);
  background: var(--yellow); color: #000;
  padding: 10px; width: 250px; text-align: center;
  border-radius: 3px; font-size: 15px; z-index: 90;
}

/* ───────────────────────── login ───────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px 14px;
  background: var(--slate-800);
}

.login-card {
  background: #fff;
  border-radius: var(--radius);
  width: min(400px, 100%);
  padding: 28px 26px;
}

.login-card .mark {
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px;
  margin: 0 auto 14px;
}

.login-card h1 { margin: 0 0 4px; font-size: 19px; font-weight: 600; text-align: center; }
.login-card .sub { margin: 0 0 20px; text-align: center; color: var(--ink-soft); font-size: 13px; }
.login-card .form-group { margin-bottom: 12px; }
.login-card .btn { width: 100%; justify-content: center; padding: 10px; }
.login-err {
  background: #fbeae8; color: var(--danger);
  padding: 9px 11px; border-radius: 6px; font-size: 12.5px; margin-bottom: 12px;
}

/* The same shape for something that is not an error but still has to be read
   before carrying on - "this will work, but here is what you must also do". */
.login-warn {
  background: #fdf4e3; color: #8a6100;
  padding: 9px 11px; border-radius: 6px; font-size: 12.5px; margin-bottom: 12px;
}

/* ───────────────────────── small screens ───────────────────────── */

.scrim { display: none; }

@media (max-width: 991px) {
  .zp-side { transform: translateX(-100%); }
  body.rail-open .zp-side { transform: none; }
  body.rail-open .scrim {
    display: block; position: fixed; inset: 0;
    background: rgba(0, 0, 0, .45); z-index: 35;
  }
  .zp-main { margin-left: 0; }
  .zp-top .tagline { display: none; }
  .zp-content { padding: 10px 12px 24px; }
}

@media (max-width: 575px) {
  .zp-top .bit.clock { display: none; }
  .tile_stats_count .count { font-size: 2.2rem; }
}

/* ───────────────────────── printing ───────────────────────── */

@media print {
  .zp-side, .zp-top, .dt-head, .dt-foot, .x_title .tools { display: none !important; }
  .zp-main { margin-left: 0; }
  .x_panel { break-inside: avoid; }
}

/* ── Activation modal: the "from when → until when, and what it costs" panel ──
 * Shows live under the package picker, the way the rented panel previews a
 * renewal before it is saved. */
.renew-preview { margin-top: 14px; }
.renew-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.renew-grid > div {
  background: #fff; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px;
}
.renew-grid span { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .3px; }
.renew-grid b { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.renew-grid b.hot { color: var(--primary); }
.renew-grid b.hot:last-child, .renew-grid > div:last-child b.hot { color: var(--success); }
.renew-note { margin-top: 8px; font-size: 12px; color: var(--ink-soft); }
.renew-note b { color: var(--danger-d); }
.renew-warn {
  padding: 12px; background: #fff3f3; border: 1px solid #ffd4d4;
  border-radius: var(--radius); color: var(--danger-d); font-size: 13px;
}
@media (max-width: 560px) { .renew-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Permissions screen: Dealer vs Subdealer ticks ─────────────────────────── */
.perm-intro { margin: 0 0 14px; font-size: 13px; color: var(--ink-1); line-height: 1.6; }
.perm-table { width: 100%; }
.perm-table th:nth-child(2), .perm-table th:nth-child(3),
.perm-table .perm-tick { text-align: center; width: 120px; }
.perm-table .perm-label { font-size: 13px; }
.perm-table .perm-w {
  font-size: 10px; color: var(--danger-d); border: 1px solid #f3c9c9;
  background: #fff4f4; border-radius: 3px; padding: 0 5px; margin-left: 6px; vertical-align: middle;
}
.perm-table tr.perm-group td {
  background: var(--slate-800); color: #fff; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .4px; padding: 7px 12px;
}
.perm-table .perm-tick input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--primary); }
.perm-table .perm-tick .check { justify-content: center; }
.perm-foot {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--line);
}

/* ── Subdealer form: pick which dealers sit under it ───────────────────────── */
.dealer-pick {
  max-height: 220px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 10px; background: #fafbfc;
  display: flex; flex-direction: column; gap: 6px;
}
.dealer-pick .check { margin: 0; font-size: 13px; }
.dealer-pick .check small { color: var(--ink-soft); }

/* ════════════════════════════════════════════════════════════════════════════
   oRic tecH billing skin — white rail + white topbar with green accents.
   Appended last so it overrides the original dark-slate rail/topbar above, so
   oRic Radius reads as the same company as the billing panel.
   ════════════════════════════════════════════════════════════════════════════ */
.zp-side {
  background: var(--card);
  color: #35463d;
  border-right: 1px solid var(--line);
}
.zp-brand { border-bottom: 1px solid var(--line); }
.zp-brand b { color: var(--ink); }
.zp-brand .mark { background: var(--primary); color: #fff; }
.zp-nav::-webkit-scrollbar-thumb { background: #c3d6cb; }
.zp-nav a { color: #35463d; border-right: 3px solid transparent; }
.zp-nav a:hover { color: var(--ink); background: var(--field); }
.zp-nav li.active > a,
.zp-nav li.open > a { color: var(--ink); background: transparent; }
.zp-nav li.open > a:hover { background: var(--field); }
.zp-nav li.active > a {
  background: var(--accent-soft); color: var(--accent-ink);
  border-right-color: var(--primary); font-weight: 600;
}
.zp-nav li.active > a > i:first-child { color: var(--primary); }
.zp-nav .sub { background: #f7fbf9; }
.zp-nav .sub a { color: #44564c; }
.zp-nav .sub a:hover { background: var(--field); }
.zp-nav .sub li.active > a { background: var(--accent-soft); color: var(--accent-ink); }

.zp-top {
  background: var(--card);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.zp-top .burger,
.zp-top .bell,
.zp-top .who { color: var(--ink); }
.zp-top .tagline { color: var(--muted); opacity: 1; }
.zp-top .who img, .zp-top .who .avatar { background: var(--accent-soft); color: var(--accent-ink); }

/* Flat, rounded cards like billing: a hairline border, no heavy under-rule. */
.x_panel { border: 1px solid var(--line); box-shadow: none; }
.x_title { border-bottom: 1px solid var(--line); }

/* Roomier rail — more breathing space per item, so even a short (dealer) menu
   fills the sidebar and reads calmly. */
.zp-nav { padding: 12px 0 24px; }
.zp-nav > ul > li { margin: 2px 8px; }
.zp-nav > ul > li > a { border-radius: 8px; }
.zp-nav a { padding: 12px 14px; font-size: 13.5px; gap: 12px; }
.zp-nav a > i:first-child { font-size: 16px; }
.zp-nav .sub { border-radius: 8px; margin: 2px 0 4px; overflow: hidden; }
.zp-nav .sub a { padding-top: 10px; padding-bottom: 10px; padding-left: 44px; font-size: 13px; }
.zp-nav li.active > a { border-right: 0; }
.zp-brand { gap: 12px; padding: 0 16px; }

/* ── "Move Users" picker ────────────────────────────────────────────────────
   A tickable list of one lineman's or one dealer's customers. It has to hold a
   few hundred rows inside a modal, so the list scrolls on its own and each row
   stays one line. */
.mv-bar      { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.mv-count    { margin-left: auto; color: var(--ink-soft); font-size: 12px; }
.mv-list     { max-height: 320px; overflow: auto; border: 1px solid var(--line);
               border-radius: 8px; background: var(--card); }
.mv-row      { display: grid; grid-template-columns: 22px 1fr auto auto;
               gap: 10px; align-items: center; padding: 7px 10px;
               border-bottom: 1px solid var(--line); cursor: pointer; }
.mv-row:last-child { border-bottom: 0; }
.mv-row:hover      { background: var(--accent-soft); }
.mv-main     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-dim      { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }

/* ── Backup & Restore ───────────────────────────────────────────────────────
   Three flat cards. The warning bar is the only loud thing on the screen, and
   it is loud because the company restore behind it cannot be undone. */
.bk-counts   { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-counts b { font-weight: 600; }
.bk-folder   { display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
               margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line);
               border-radius: 8px; background: var(--accent-soft); }
.bk-warn     { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px;
               background: #fbeae8; color: var(--danger); }
.bk-warn i   { margin-right: 6px; }

/* ── looking inside one dealer's panel, from the oRic tecH console ──────────
   A row of counts, who they are, then their customers. Flat, same two colours
   as everything else. */
.rp-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.rp-stat  { flex: 1 1 110px; padding: 8px 10px; border: 1px solid var(--line);
            border-radius: 8px; background: var(--accent-soft); }
.rp-k     { display: block; font-size: 11px; color: var(--ink-soft);
            text-transform: uppercase; letter-spacing: .04em; }
.rp-v     { font-size: 18px; font-weight: 600; }
.rp-v.green { color: var(--accent-ink); }
.rp-v.red   { color: var(--danger); }
.rp-who   { margin: 0 0 14px; color: var(--ink-soft); }
.rp-h     { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase;
            letter-spacing: .04em; color: var(--ink-soft); }
