:root {
  color-scheme: light;
  --reseller-bg: #f3f6f9;
  --reseller-surface: #ffffff;
  --reseller-surface-muted: #f7f9fb;
  --reseller-line: #d8e0e8;
  --reseller-line-strong: #b8c5d3;
  --reseller-text: #18202a;
  --reseller-muted: #667282;
  --reseller-navy: #002368;
  --reseller-navy-dark: #00194d;
  --reseller-navy-soft: #edf3ff;
  --reseller-green: #0b6b43;
  --reseller-green-soft: #eaf7f1;
  --reseller-gold: #9b7425;
  --reseller-gold-soft: #fbf5e8;
  --reseller-rose: #b4233f;
  --reseller-rose-soft: #fff0f3;
  --reseller-amber: #a15c08;
  --reseller-amber-soft: #fff7e8;
  --reseller-shadow: 0 14px 36px rgba(25, 42, 70, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--reseller-bg);
}

body.reseller-page {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(140deg, rgba(0, 35, 104, 0.06), transparent 38%),
    linear-gradient(320deg, rgba(0, 44, 24, 0.05), transparent 36%),
    var(--reseller-bg);
  color: var(--reseller-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.reseller-page button,
.reseller-page input,
.reseller-page select,
.reseller-page textarea {
  font: inherit;
}

.reseller-page button {
  cursor: pointer;
}

.reseller-page button:disabled,
.reseller-page input:disabled,
.reseller-page select:disabled,
.reseller-page textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.reseller-page [hidden] {
  display: none !important;
}

.reseller-page :focus-visible {
  outline: 3px solid rgba(0, 75, 180, 0.3);
  outline-offset: 3px;
}

.reseller-skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--reseller-navy);
  color: #fff;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}

.reseller-skip-link:focus {
  transform: translateY(0);
}

.reseller-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.reseller-boot,
.reseller-noscript {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  gap: 14px;
  margin: 0;
  padding: 24px;
  color: var(--reseller-muted);
  text-align: center;
}

.reseller-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dbe4ee;
  border-top-color: var(--reseller-navy);
  border-radius: 50%;
  animation: reseller-spin 800ms linear infinite;
}

@keyframes reseller-spin {
  to { transform: rotate(360deg); }
}

.reseller-eyebrow {
  margin: 0;
  color: var(--reseller-navy);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.reseller-auth-page {
  display: grid;
  width: min(100% - 28px, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 18px;
  align-items: stretch;
}

.reseller-auth-hero,
.reseller-auth-card,
.reseller-panel,
.reseller-kpi,
.reseller-action-card,
.reseller-list-card {
  min-width: 0;
  border: 1px solid var(--reseller-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--reseller-shadow);
}

.reseller-auth-hero {
  position: relative;
  display: grid;
  min-height: 620px;
  align-content: space-between;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  background:
    linear-gradient(145deg, rgba(0, 35, 104, 0.98), rgba(0, 44, 24, 0.94)),
    var(--reseller-navy);
  color: #fff;
}

.reseller-auth-hero::after {
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255, 255, 255, 0.04), 0 0 0 104px rgba(255, 255, 255, 0.025);
  content: "";
}

.reseller-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.reseller-brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.reseller-brand p,
.reseller-brand strong {
  display: block;
  margin: 0;
}

.reseller-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.reseller-auth-copy {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.reseller-auth-copy h1 {
  max-width: 520px;
  margin: 8px 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.reseller-auth-copy > p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.7;
}

.reseller-auth-points {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.reseller-auth-points li {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  font-size: 12px;
  font-weight: 800;
}

.reseller-auth-card {
  align-self: center;
  padding: clamp(24px, 4vw, 38px);
}

.reseller-auth-card h2 {
  margin: 7px 0 6px;
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.reseller-auth-intro {
  margin: 0 0 22px;
  color: var(--reseller-muted);
  font-size: 14px;
}

.reseller-auth-tabs,
.reseller-nav,
.reseller-segmented {
  display: grid;
  min-width: 0;
  border: 1px solid var(--reseller-line);
  border-radius: 8px;
  background: var(--reseller-surface-muted);
  padding: 5px;
}

.reseller-auth-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.reseller-auth-tabs button,
.reseller-nav button,
.reseller-segmented button {
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--reseller-muted);
  padding: 8px 10px;
  font-weight: 850;
}

.reseller-auth-tabs button[aria-selected="true"],
.reseller-nav button[aria-current="page"],
.reseller-segmented button[aria-selected="true"] {
  background: var(--reseller-navy);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 35, 104, 0.16);
}

.reseller-form,
.reseller-form-grid,
.reseller-stack {
  display: grid;
  gap: 13px;
  min-width: 0;
}

.reseller-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reseller-type-fieldset,
.reseller-address-fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--reseller-line);
  border-radius: 9px;
  background: var(--reseller-surface-muted);
  padding: 13px;
}

.reseller-type-fieldset legend,
.reseller-address-fieldset legend {
  padding: 0 5px;
  color: var(--reseller-text);
  font-size: 13px;
  font-weight: 850;
}

.reseller-address-fieldset legend span {
  color: var(--reseller-muted);
  font-size: 11px;
  font-weight: 700;
}

.reseller-type-options,
.reseller-conditional-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.reseller-conditional-grid[hidden] {
  display: none;
}

.reseller-form-grid .reseller-type-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--reseller-line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
  cursor: pointer;
}

.reseller-form-grid .reseller-type-option.is-selected,
.reseller-form-grid .reseller-type-option:focus-within {
  border-color: #9eb3d2;
  background: var(--reseller-navy-soft);
  box-shadow: 0 0 0 2px rgba(0, 35, 104, 0.07);
}

.reseller-form-grid .reseller-type-option input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--reseller-navy);
}

.reseller-type-option span,
.reseller-type-option strong,
.reseller-type-option small {
  min-width: 0;
}

.reseller-type-option span {
  display: grid;
  gap: 2px;
}

.reseller-type-option small,
.reseller-field-help,
.reseller-address-status {
  margin: 0;
  color: var(--reseller-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.reseller-field-help {
  margin-top: 9px;
}

.reseller-address-fieldset {
  display: grid;
  gap: 10px;
}

.reseller-address-postcode-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.reseller-address-postcode-row .reseller-button-ghost {
  min-width: 132px;
  min-height: 44px;
}

.reseller-address-actions {
  display: flex;
  justify-content: flex-end;
}

.reseller-address-clear {
  min-height: 44px;
  padding: 7px 10px;
  font-size: 12px;
}

.reseller-address-status[data-type="success"] {
  color: var(--reseller-green);
}

.reseller-address-status[data-type="warning"],
.reseller-address-status[data-type="error"] {
  color: var(--reseller-rose);
}

.reseller-address-dialog {
  width: min(640px, calc(100% - 24px));
  max-width: none;
  height: min(720px, calc(100dvh - 24px));
  max-height: none;
  margin: auto;
  border: 0;
  border-radius: 12px;
  background: #fff;
  padding: 0;
  color: var(--reseller-text);
  box-shadow: 0 20px 60px rgba(12, 27, 49, 0.28);
  overflow: hidden;
}

.reseller-address-dialog::backdrop {
  background: rgba(12, 27, 49, 0.62);
}

.reseller-address-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-width: 0;
}

.reseller-address-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--reseller-line);
  padding: 14px 16px;
}

.reseller-address-dialog-header h2,
.reseller-address-dialog-header p {
  margin: 0;
}

.reseller-address-dialog-header h2 {
  font-size: 18px;
}

.reseller-address-dialog-header p {
  margin-top: 4px;
  color: var(--reseller-muted);
  font-size: 12px;
  line-height: 1.45;
}

.reseller-address-dialog-close {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--reseller-line);
  border-radius: 7px;
  background: #fff;
  padding: 7px 12px;
  color: var(--reseller-text);
  font: inherit;
  font-weight: 800;
}

.reseller-address-dialog-close:focus-visible {
  outline: 3px solid rgba(0, 35, 104, 0.2);
  outline-offset: 2px;
}

.reseller-address-dialog-frame {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.reseller-form label,
.reseller-form-grid label,
.reseller-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--reseller-text);
  font-size: 13px;
  font-weight: 800;
}

.reseller-form label > span,
.reseller-form-grid label > span,
.reseller-field > span {
  min-width: 0;
}

.reseller-form input,
.reseller-form select,
.reseller-form textarea,
.reseller-form-grid input,
.reseller-form-grid select,
.reseller-form-grid textarea,
.reseller-field input,
.reseller-field select,
.reseller-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--reseller-line);
  border-radius: 7px;
  background: #fff;
  color: var(--reseller-text);
  padding: 9px 11px;
  outline: none;
}

.reseller-form textarea,
.reseller-form-grid textarea,
.reseller-field textarea {
  min-height: 92px;
  resize: vertical;
}

.reseller-form-grid input[readonly] {
  background: #f1f4f8;
  color: var(--reseller-muted);
}

.reseller-product-fieldset {
  box-shadow: none;
}

.reseller-payment-section,
.reseller-cancel-form {
  margin-top: 16px;
}

.reseller-payment-section {
  box-shadow: none;
}

.reseller-payment-list {
  margin-top: 10px;
}

.reseller-payment-empty {
  margin-top: 8px;
}

.reseller-payment-form {
  margin-top: 14px;
}

.reseller-performance-head {
  align-items: start;
}

.reseller-performance-scores {
  flex: 1;
}

.reseller-form input:focus,
.reseller-form select:focus,
.reseller-form textarea:focus,
.reseller-form-grid input:focus,
.reseller-form-grid select:focus,
.reseller-form-grid textarea:focus,
.reseller-field input:focus,
.reseller-field select:focus,
.reseller-field textarea:focus {
  border-color: var(--reseller-navy);
  box-shadow: 0 0 0 3px rgba(0, 35, 104, 0.11);
}

.reseller-form small,
.reseller-field small,
.reseller-help,
.reseller-muted {
  color: var(--reseller-muted);
  font-size: 11px;
  font-weight: 600;
}

.reseller-full {
  grid-column: 1 / -1;
}

.reseller-check {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px !important;
  border: 1px solid var(--reseller-line);
  border-radius: 7px;
  background: var(--reseller-surface-muted);
  padding: 10px;
  font-weight: 700 !important;
}

.reseller-check input {
  width: 18px !important;
  min-height: 18px !important;
  margin-top: 1px;
}

.reseller-button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reseller-button,
.reseller-button-secondary,
.reseller-button-ghost,
.reseller-button-danger,
.reseller-button-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 14px;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
}

.reseller-button {
  background: var(--reseller-navy);
  color: #fff;
}

.reseller-button:hover:not(:disabled) {
  background: var(--reseller-navy-dark);
}

.reseller-button-secondary {
  background: var(--reseller-green);
  color: #fff;
}

.reseller-button-ghost,
.reseller-button-small {
  border-color: var(--reseller-line);
  background: #fff;
  color: var(--reseller-text);
}

.reseller-button-danger {
  border-color: rgba(180, 35, 63, 0.22);
  background: var(--reseller-rose-soft);
  color: var(--reseller-rose);
}

.reseller-button-small {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.reseller-auth-card .reseller-button {
  width: 100%;
  margin-top: 4px;
}

.reseller-notice {
  margin: 0 0 14px;
  border: 1px solid var(--reseller-line);
  border-radius: 8px;
  background: #fff;
  color: var(--reseller-text);
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.reseller-notice.success {
  border-color: rgba(11, 107, 67, 0.3);
  background: var(--reseller-green-soft);
  color: var(--reseller-green);
}

.reseller-notice.error {
  border-color: rgba(180, 35, 63, 0.3);
  background: var(--reseller-rose-soft);
  color: var(--reseller-rose);
}

.reseller-notice.warning {
  border-color: rgba(161, 92, 8, 0.3);
  background: var(--reseller-amber-soft);
  color: var(--reseller-amber);
}

.reseller-refresh-warning {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: space-between;
}

.reseller-refresh-warning span {
  flex: 1 1 340px;
  min-width: 0;
}

.reseller-security-recovery {
  background: var(--reseller-rose-soft);
  border: 1px solid rgba(180, 35, 63, 0.3);
  border-radius: 8px;
  color: var(--reseller-rose);
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
}

.reseller-security-recovery p {
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
  overflow-wrap: anywhere;
}

.reseller-security-recovery .reseller-button-ghost {
  justify-self: start;
}

.reseller-registration-closed,
.reseller-disclosure {
  border: 1px solid #e9d7ad;
  border-radius: 8px;
  background: var(--reseller-gold-soft);
  color: #6f531d;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.reseller-shell {
  min-height: 100vh;
}

.reseller-topbar {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(480px, 1.3fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-width: 0;
  border-bottom: 1px solid var(--reseller-line);
  background: rgba(255, 255, 255, 0.96);
  padding: 12px clamp(12px, 2vw, 26px);
  backdrop-filter: blur(10px);
}

.reseller-topbar .reseller-brand-mark {
  border-color: var(--reseller-navy);
  background: var(--reseller-navy);
}

.reseller-topbar .reseller-brand p {
  color: var(--reseller-muted);
}

.reseller-topbar .reseller-brand strong {
  max-width: 240px;
  overflow: hidden;
  color: var(--reseller-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reseller-nav {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(80px, 1fr);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.reseller-nav::-webkit-scrollbar {
  display: none;
}

.reseller-nav button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.reseller-nav button[data-view="product-catalog"] {
  white-space: normal;
  word-break: keep-all;
  font-size: 14px;
  line-height: 1.35;
  padding-inline: 4px;
}

.reseller-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.reseller-user-copy {
  display: grid;
  max-width: 170px;
  min-width: 0;
  text-align: right;
}

.reseller-user-copy strong,
.reseller-user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reseller-user-copy small {
  color: var(--reseller-muted);
}

.reseller-content {
  display: grid;
  width: min(100% - 28px, 1480px);
  min-width: 0;
  margin: 0 auto;
  padding: 22px 0 48px;
  gap: 16px;
}

.reseller-loading-line {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--reseller-navy), var(--reseller-green), var(--reseller-gold));
  animation: reseller-pulse 900ms ease-in-out infinite alternate;
}

@keyframes reseller-pulse {
  from { opacity: 0.35; transform: scaleX(0.3); transform-origin: left; }
  to { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

.reseller-page-heading,
.reseller-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.reseller-page-heading {
  padding: 8px 2px 2px;
}

.reseller-page-heading h1 {
  margin: 5px 0 3px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.reseller-page-heading p,
.reseller-panel-heading p {
  margin: 0;
  color: var(--reseller-muted);
}

.reseller-period-form {
  display: grid;
  grid-template-columns: minmax(92px, 118px) minmax(92px, 118px) auto;
  align-items: end;
  gap: 7px;
  min-width: 0;
}

.reseller-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.reseller-kpi {
  display: grid;
  gap: 6px;
  border-left: 5px solid var(--reseller-navy);
  padding: 16px;
}

.reseller-kpi.green { border-left-color: var(--reseller-green); }
.reseller-kpi.gold { border-left-color: var(--reseller-gold); }
.reseller-kpi.rose { border-left-color: var(--reseller-rose); }

.reseller-kpi span,
.reseller-kpi small {
  color: var(--reseller-muted);
  font-size: 12px;
  font-weight: 750;
}

.reseller-kpi strong {
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.reseller-two-column,
.reseller-order-layout,
.reseller-inquiry-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.reseller-order-layout {
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
}

.reseller-inquiry-layout {
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
}

.reseller-panel {
  padding: 18px;
}

.reseller-panel-heading {
  align-items: center;
  margin-bottom: 14px;
}

.reseller-panel-heading h2,
.reseller-panel-heading h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.reseller-panel-heading > span {
  color: var(--reseller-muted);
  font-size: 12px;
  font-weight: 800;
}

.reseller-action-list,
.reseller-card-list,
.reseller-order-items,
.reseller-timeline,
.reseller-message-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reseller-action-card,
.reseller-list-card {
  display: grid;
  gap: 7px;
  box-shadow: none;
  padding: 12px;
}

button.reseller-list-card {
  width: 100%;
  color: inherit;
  text-align: left;
}

button.reseller-list-card:hover,
button.reseller-list-card[aria-current="true"] {
  border-color: #9eb3d2;
  background: var(--reseller-navy-soft);
}

.reseller-card-head,
.reseller-card-meta,
.reseller-order-total,
.reseller-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.reseller-card-head > *,
.reseller-card-meta > * {
  min-width: 0;
}

.reseller-card-head strong,
.reseller-card-meta span,
.reseller-list-card p {
  overflow-wrap: anywhere;
}

.reseller-list-card p {
  margin: 0;
  color: var(--reseller-muted);
  font-size: 12px;
}

.reseller-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: #eef2f5;
  color: var(--reseller-muted);
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.reseller-status.ok,
.reseller-status.approved,
.reseller-status.completed,
.reseller-status.confirmed,
.reseller-status.paid {
  background: var(--reseller-green-soft);
  color: var(--reseller-green);
}

.reseller-status.running,
.reseller-status.submitted,
.reseller-status.processing,
.reseller-status.requested,
.reseller-status.open {
  background: var(--reseller-navy-soft);
  color: var(--reseller-navy);
}

.reseller-status.warning,
.reseller-status.pending,
.reseller-status.reviewing,
.reseller-status.cancel_requested {
  background: var(--reseller-amber-soft);
  color: var(--reseller-amber);
}

.reseller-status.failed,
.reseller-status.rejected,
.reseller-status.cancelled,
.reseller-status.closed {
  background: var(--reseller-rose-soft);
  color: var(--reseller-rose);
}

.reseller-empty,
.reseller-error-state {
  display: grid;
  min-height: 132px;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px dashed var(--reseller-line-strong);
  border-radius: 8px;
  background: var(--reseller-surface-muted);
  color: var(--reseller-muted);
  padding: 20px;
  text-align: center;
}

.reseller-error-state strong {
  color: var(--reseller-rose);
}

.reseller-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

.reseller-product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: end;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--reseller-line);
  border-radius: 8px;
  background: var(--reseller-surface-muted);
  padding: 11px;
}

.reseller-product-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reseller-product-copy small,
.reseller-product-copy span {
  color: var(--reseller-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.reseller-order-summary {
  display: grid;
  gap: 9px;
  border: 1px solid var(--reseller-line);
  border-radius: 8px;
  background: var(--reseller-surface-muted);
  padding: 12px;
}

.reseller-order-total {
  border-top: 1px solid var(--reseller-line);
  padding-top: 10px;
}

.reseller-order-total strong {
  color: var(--reseller-navy);
  font-size: 19px;
}

.reseller-detail-list,
.reseller-performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.reseller-performance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reseller-detail-list > div,
.reseller-performance-grid > div {
  min-width: 0;
  border: 1px solid var(--reseller-line);
  border-radius: 7px;
  background: var(--reseller-surface-muted);
  padding: 9px 10px;
}

.reseller-detail-list dt,
.reseller-performance-grid dt {
  color: var(--reseller-muted);
  font-size: 11px;
  font-weight: 750;
}

.reseller-detail-list dd,
.reseller-performance-grid dd {
  margin: 3px 0 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.reseller-timeline {
  margin-left: 6px;
  border-left: 2px solid #dbe4ee;
  padding-left: 17px;
}

.reseller-timeline li {
  position: relative;
  display: grid;
  gap: 2px;
  padding-bottom: 5px;
}

.reseller-timeline li::before {
  position: absolute;
  top: 5px;
  left: -23px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--reseller-navy);
  box-shadow: 0 0 0 1px #b8c5d3;
  content: "";
}

.reseller-timeline time,
.reseller-timeline span {
  color: var(--reseller-muted);
  font-size: 11px;
}

.reseller-payment-callout {
  border-left: 5px solid var(--reseller-gold);
}

.reseller-payment-callout strong {
  display: block;
  margin-bottom: 4px;
}

.reseller-payment-callout p {
  margin: 0;
  color: var(--reseller-muted);
  font-size: 13px;
}

.reseller-message-panel {
  display: flex;
  min-width: 0;
  min-height: 520px;
  max-height: calc(100dvh - 250px);
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.reseller-message-header {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--reseller-line);
  padding: 15px 17px;
}

.reseller-message-region {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 15px;
}

.reseller-message-row {
  display: grid;
  justify-items: start;
  gap: 3px;
}

.reseller-message-row.mine {
  justify-items: end;
}

.reseller-message-bubble {
  max-width: min(78%, 620px);
  border: 1px solid var(--reseller-line);
  border-radius: 4px 12px 12px 12px;
  background: var(--reseller-surface-muted);
  padding: 9px 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reseller-message-row.mine .reseller-message-bubble {
  border-color: #c6d8fb;
  border-radius: 12px 4px 12px 12px;
  background: var(--reseller-navy-soft);
}

.reseller-message-row small {
  color: var(--reseller-muted);
  font-size: 10px;
}

.reseller-history-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}

.reseller-history-footer {
  align-items: center;
  border-top: 1px solid var(--reseller-line);
  color: var(--reseller-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 9px 14px;
  justify-content: space-between;
  margin-top: 12px;
  min-width: 0;
  padding-top: 12px;
}

.reseller-history-footer span {
  overflow-wrap: anywhere;
}

.reseller-payment-facts {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  min-width: 0;
}

.reseller-payment-facts > div {
  background: var(--reseller-surface-muted);
  border-radius: 7px;
  min-width: 0;
  padding: 8px 9px;
}

.reseller-payment-facts dt {
  color: var(--reseller-muted);
  font-size: 10px;
  font-weight: 800;
}

.reseller-payment-facts dd {
  font-size: 12px;
  font-weight: 800;
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.reseller-payment-facts .reseller-full {
  grid-column: 1 / -1;
}

.reseller-message-composer {
  flex: 0 0 auto;
  border-top: 1px solid var(--reseller-line);
  background: #fff;
  padding: 11px;
}

.reseller-message-composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.reseller-message-composer textarea {
  min-height: 46px;
  max-height: 132px;
}

.reseller-policy-card {
  border-left: 5px solid var(--reseller-gold);
}

.reseller-policy-card h2,
.reseller-policy-card h3 {
  margin-top: 0;
}

.reseller-policy-card p {
  color: var(--reseller-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reseller-legal-footer {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--reseller-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--reseller-muted);
  font-size: 11px;
}

.reseller-legal-footer > strong {
  color: var(--reseller-text);
  font-size: 12px;
}

.reseller-legal-footer-documents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
}

.reseller-legal-footer details {
  min-width: 0;
}

.reseller-legal-footer summary {
  cursor: pointer;
  color: var(--reseller-navy);
  font-weight: 800;
}

.reseller-legal-footer p {
  max-height: 260px;
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  color: var(--reseller-muted);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reseller-consent-document > summary {
  cursor: pointer;
  color: var(--reseller-navy);
  font-weight: 800;
}

.reseller-consent-document > summary::marker {
  color: var(--reseller-gold);
}

.reseller-consent-document > summary span {
  margin-left: 8px;
  color: var(--reseller-muted);
  font-size: 11px;
}

.reseller-consent-meta {
  margin-top: 8px !important;
}

.reseller-consent-document-content {
  max-height: 320px;
  margin-top: 10px;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--reseller-line);
  border-radius: 10px;
  background: var(--reseller-navy-soft);
  color: var(--reseller-muted);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.reseller-legal-footer p:focus-visible,
.reseller-policy-card p:focus-visible,
.reseller-consent-document-content:focus-visible {
  outline: 3px solid rgba(0, 35, 104, 0.28);
  outline-offset: 2px;
}

.reseller-grade {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 5px solid var(--reseller-gold-soft);
  border-radius: 50%;
  background: #fff;
  color: var(--reseller-gold);
  font-size: 32px;
  font-weight: 950;
}

.reseller-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 16px;
  min-width: 0;
}

@media (max-width: 1120px) {
  .reseller-auth-page {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.8fr);
  }

  .reseller-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .reseller-nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .reseller-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .reseller-auth-page {
    width: min(100% - 20px, 680px);
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 0 24px;
  }

  .reseller-auth-hero {
    min-height: 340px;
  }

  .reseller-order-layout,
  .reseller-inquiry-layout,
  .reseller-two-column,
  .reseller-profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .reseller-message-panel {
    min-height: 500px;
    max-height: none;
  }

  .reseller-performance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .reseller-auth-hero,
  .reseller-auth-card {
    border-radius: 10px;
  }

  .reseller-auth-hero {
    min-height: 300px;
    padding: 24px;
  }

  .reseller-auth-points {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-top: 22px;
  }

  .reseller-auth-points li {
    padding: 9px 10px;
  }

  .reseller-topbar {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 10px;
  }

  .reseller-nav {
    grid-column: 1;
    grid-row: auto;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, minmax(104px, 1fr));
    justify-content: start;
  }

  .reseller-user-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .reseller-user-copy {
    max-width: none;
    text-align: left;
  }

  .reseller-content {
    width: min(100% - 16px, 1480px);
    padding: 13px 0 30px;
    gap: 11px;
  }

  .reseller-page-heading,
  .reseller-panel-heading {
    display: grid;
    align-items: stretch;
    gap: 8px;
  }

  .reseller-period-form,
  .reseller-form-grid,
  .reseller-type-options,
  .reseller-conditional-grid,
  .reseller-product-grid,
  .reseller-detail-list,
  .reseller-performance-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .reseller-address-postcode-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .reseller-address-postcode-row .reseller-button-ghost,
  .reseller-address-actions .reseller-button-ghost {
    width: 100%;
  }

  .reseller-address-dialog {
    width: calc(100% - 12px);
    height: calc(100dvh - 12px);
    border-radius: 9px;
  }

  .reseller-address-dialog-header {
    padding: 11px 12px;
  }

  .reseller-address-dialog-header h2 {
    font-size: 16px;
  }

  .reseller-period-form .reseller-button-ghost,
  .reseller-page-heading > .reseller-button,
  .reseller-page-heading > .reseller-button-secondary {
    width: 100%;
  }

  .reseller-panel,
  .reseller-kpi {
    padding: 13px;
  }

  .reseller-product-card {
    grid-template-columns: minmax(0, 1fr) 86px;
  }

  .reseller-message-bubble {
    max-width: 88%;
  }

  .reseller-history-footer {
    align-items: stretch;
    display: grid;
  }

  .reseller-history-footer .reseller-button-small {
    width: 100%;
  }

  .reseller-payment-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .reseller-payment-facts .reseller-full {
    grid-column: auto;
  }

  .reseller-refresh-warning,
  .reseller-security-recovery .reseller-button-ghost {
    align-items: stretch;
    display: grid;
    width: 100%;
  }
}

@media (max-width: 390px) {
  .reseller-auth-page {
    width: min(100% - 12px, 680px);
  }

  .reseller-auth-hero,
  .reseller-auth-card {
    padding: 19px;
  }

  .reseller-auth-copy h1 {
    font-size: 31px;
  }

  .reseller-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .reseller-button-row > button,
  .reseller-button-row > a {
    width: 100%;
  }

  .reseller-product-card,
  .reseller-message-composer-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .reseller-message-composer-row button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
