@media (max-width: 480px) {
  .z-console .top-nav-left { min-width: 0; }
  .z-breadcrumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.rc-mobile-label { display: none; }
@media (max-width: 640px) {
  .reseller-console .rc-mobile-list { min-width: 0; }
  .rc-mobile-list thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .rc-mobile-list :is(tbody,tr) { display: block; }
  .reseller-console .rc-mobile-list tr {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 9px 10px;
    padding-block: 14px;
    border-bottom: 1px solid var(--rc-border);
  }
  .reseller-console .rc-mobile-list tr:last-child { border-bottom: 0; }
  .reseller-console .rc-mobile-list td,
  .z-console #view-resellers .rc-mobile-list td { padding: 0; border: 0; text-align: left; min-width: 0; overflow-wrap: anywhere; white-space: normal; }
  .rc-mobile-list td:is(:first-child,:last-child,[colspan]),
  #account-list td:is(:nth-child(2),:nth-child(5)) { grid-column: 1 / -1; }
  .rc-mobile-list td:last-child { margin-top: 4px; }
  .rc-mobile-list td .rc-actions { justify-content: flex-start; flex-wrap: wrap; }
  .rc-mobile-label { display: inline; color: var(--rc-muted); font-size: 11px; }
}
.license-mask-editor .license-format-preview {
  display:grid; gap:5px; min-width:0; padding:10px 12px; margin-top:12px;
  border:1px solid var(--border-subtle); border-radius:8px; background:var(--bg-surface);
}
.license-format-preview > span { color:var(--text-muted); font-size:11px; }
.license-format-preview code { color:var(--text-main); overflow-wrap:anywhere; }

.reseller-portal {
  --portal-canvas:#100d16;
  --portal-wash:#58387a32;
  --portal-surface:#1b1524;
  --portal-accent:#d0a4ff;
  --portal-quiet:#bdafca;
}
.reseller-portal .rc-main {
  background:radial-gradient(ellipse 75% 310px at 50% 0,var(--portal-wash),transparent),var(--portal-canvas);
}
.reseller-portal .rc-content { max-width:1440px; margin-inline:auto; }
.reseller-portal .rc-workspace-tabs { gap:0; margin-bottom:24px; }
.reseller-portal .rc-workspace-tabs button { min-height:43px; border-bottom-width:2px; color:var(--portal-quiet); }
.reseller-portal .rc-workspace-tabs button[aria-pressed=true] { color:var(--portal-accent); border-bottom-color:var(--portal-accent); font-weight:650; }
.reseller-portal .rc-overview-card { grid-template-columns:minmax(0,1fr) minmax(0,0.65fr); align-items:center; }
.reseller-portal .rc-overview-card progress { accent-color:var(--portal-accent); }
.reseller-portal .rc-overview-facts dd { font-size:20px; font-variant-numeric:tabular-nums; }
.reseller-portal .rc-inventory-toolbar { display:flex; flex-wrap:wrap; gap:12px 20px; align-items:center; justify-content:space-between; margin-bottom:14px; }
.reseller-portal .rc-inventory-toolbar .rc-toolbar,.reseller-portal .rc-inventory-toolbar .rc-filters { margin:0; }
.reseller-portal .rc-inventory-toolbar .rc-count { min-width:max-content; }
.reseller-portal .rc-inventory-toolbar [aria-pressed=true] { background:var(--portal-surface); color:var(--portal-accent); border-color:var(--portal-accent); }
.reseller-portal .rc-inventory .rc-inventory-empty { text-align:center; color:var(--portal-quiet); padding-block:28px; }
.reseller-portal #portal-issue-dialog { width:min(580px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); }
.reseller-portal #portal-issue-dialog .rc-dialog-header,.reseller-portal #portal-issue-dialog .rc-dialog-footer { border-color:var(--rc-border); }
.reseller-portal .rc-issue-fields .license-mask-editor,.reseller-portal .rc-issue-fields .rc-cost-box { background:var(--rc-input); border-color:var(--rc-border); }
.reseller-portal .rc-issue-fields .rc-rate-options { padding:12px; margin-block:12px; }
.reseller-portal .rc-issue-fields .rc-rate-option { border-radius:8px; }
.reseller-portal .rc-issue-fields .rc-rate-option:last-child:nth-child(3n + 2) { grid-column:auto; }
.reseller-portal .rc-issue-fields .rc-rate-option:has(:checked) { background:var(--portal-surface); border-color:var(--portal-accent); box-shadow:none; }
.reseller-portal .rc-issue-fields .rc-rate-option:has(:focus-visible) { outline-color:var(--portal-accent); }
.reseller-portal .rc-issue-fields .rc-rate-option strong { color:var(--portal-accent); }
.reseller-portal .rc-issue-fields .rc-tabs button[aria-pressed=true] { color:var(--portal-accent); background:var(--portal-surface); border-color:var(--portal-accent); }
.reseller-portal .rc-issue-fields .license-mask-editor { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.8fr); gap:10px; align-items:start; }
.reseller-portal .rc-issue-fields .license-mask-editor > [data-custom] { grid-column:1 / -1; grid-row:2; }
.reseller-portal .rc-issue-fields .license-format-preview { margin:0; }
@media (max-width:640px) {
  .reseller-portal .rc-overview-card { grid-template-columns:minmax(0,1fr); }
  .reseller-portal .rc-inventory-toolbar .rc-toolbar { width:100%; }
  .reseller-portal .rc-inventory-toolbar .rc-count { width:auto; }
  .reseller-portal .rc-issue-fields .rc-rate-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reseller-portal .rc-issue-fields .license-mask-editor { grid-template-columns:minmax(0,1fr); }
  .reseller-portal .rc-issue-fields .license-mask-editor > [data-custom] { grid-column:auto; grid-row:auto; }
}

.reseller-portal .rc-inventory-toolbar .rc-toolbar {
  display:grid; grid-template-columns:minmax(108px,1fr) auto auto; flex:1 1 330px;
}
.reseller-portal .rc-inventory-toolbar .rc-toolbar input { width:100%; max-width:none; min-width:0; }
.reseller-portal .rc-inventory-toolbar .rc-count { margin-left:0; }
.reseller-portal #portal-app-mode { color:var(--portal-accent); background:var(--portal-surface); border-color:var(--rc-border); }
@media (max-width:400px) {
  .reseller-portal .rc-inventory-toolbar .rc-toolbar { grid-template-columns:minmax(108px,1fr) auto; }
  .reseller-portal .rc-inventory-toolbar .rc-count { grid-column:1/-1; }
}
