:root {
  --blue: #0878d8;
  --blue-dark: #045aa6;
  --navy: #101820;
  --yellow: #ffc845;
  --bg: #f2f8fd;
  --surface: #ffffff;
  --line: #dce8f1;
  --muted: #667789;
  --text: #172026;
  --shadow: 0 18px 50px rgba(8, 42, 80, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 200, 69, 0.22), transparent 28%),
    linear-gradient(180deg, #f9fcff 0%, var(--bg) 55%, #f8fbff 100%);
  font-family: Calibri, "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}

.global-watermark {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 64px 42px;
  align-content: start;
  padding: 72px 32px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.42;
}

.global-watermark span {
  min-height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(8, 120, 216, 0.12);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  transform: rotate(-24deg);
  user-select: none;
}

a {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

button,
.button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 10px 15px;
  background: linear-gradient(180deg, #1086ea 0%, var(--blue-dark) 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(8, 120, 216, 0.24);
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d6e3ec;
  border-radius: 7px;
  padding: 10px 11px;
  color: var(--text);
  font: inherit;
  background: #fff;
}

.erp-search-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

select.erp-select-source {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.erp-select-trigger {
  display: flex;
  width: 100%;
  min-height: var(--erp-select-height, 40px);
  height: var(--erp-select-height, 40px);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #d6e3ec;
  border-radius: 7px;
  padding: 0 11px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  font: inherit;
  font-size: var(--erp-select-font-size, 15px);
  font-weight: 850;
  text-align: left;
}

.erp-select-trigger:hover,
.erp-select-trigger:focus {
  background: #fff;
  border-color: rgba(8, 120, 216, 0.58);
  box-shadow: 0 0 0 3px rgba(8, 120, 216, 0.13);
  transform: none;
}

.erp-select-trigger span:first-child {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-select-caret {
  flex: 0 0 auto;
  color: var(--blue-dark);
  font-size: 17px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.erp-search-select.is-open .erp-select-caret {
  transform: rotate(180deg);
}

.erp-search-select.is-disabled .erp-select-trigger {
  opacity: 0.62;
  cursor: not-allowed;
}

.erp-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 90;
  display: none;
  width: min(520px, 88vw);
  min-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6e3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(8, 42, 80, 0.13);
}

.erp-search-select.is-open .erp-select-menu {
  display: grid;
}

.erp-select-search {
  width: 100%;
  min-height: 38px;
  height: 38px;
  border: 0;
  border-bottom: 1px solid #e3edf4;
  border-radius: 0;
  padding: 8px 11px;
  font-size: 13px;
  box-shadow: none;
}

.erp-select-options {
  display: block;
  max-height: 270px;
  overflow-y: auto;
  padding: 0;
}

.erp-select-options button {
  display: block;
  width: 100%;
  min-height: 34px;
  border-radius: 0;
  padding: 7px 11px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: none;
}

.erp-select-options button:hover {
  background: #edf7ff;
  color: var(--text);
  box-shadow: none;
  transform: none;
}

.erp-select-options button.is-active {
  background: #3f6fc7;
  color: #fff;
  box-shadow: none;
  transform: none;
}

.erp-select-options button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.erp-select-empty {
  padding: 9px 10px;
  color: var(--muted);
  font-weight: 800;
}

.button.ghost {
  border: 1px solid #d6e7f5;
  background: #f4f9ff;
  color: var(--blue-dark);
  box-shadow: none;
}

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

label {
  display: grid;
  gap: 6px;
  color: #34423f;
  font-size: 13px;
  font-weight: 800;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 460px);
  align-items: center;
  gap: 36px;
  padding: clamp(24px, 5vw, 70px);
}

.login-visual {
  max-width: 720px;
}

.login-visual img {
  width: min(360px, 68vw);
  display: block;
  margin-bottom: 34px;
}

.login-visual h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.96;
}

.login-visual p {
  max-width: 560px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.login-card,
.order-board,
.orders-panel,
.empty {
  border: 1px solid rgba(8, 120, 216, 0.13);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.login-card h2,
.hero h1,
.board-head h2,
.panel-title h2 {
  margin: 0;
  color: var(--navy);
}

.hint,
.hero p,
.board-head p {
  color: var(--muted);
}

.flash {
  padding: 12px 14px;
  border: 1px solid #cfe4d8;
  border-radius: 8px;
  background: #effaf4;
  color: #145c39;
  font-weight: 800;
}

.flash.error {
  border-color: #ffc7d0;
  background: #fff1f3;
  color: #be123c;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(14px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 128px;
  max-height: 46px;
  object-fit: contain;
}

.brand span {
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
}

.account-menu {
  position: relative;
}

.account-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 220px;
  height: 14px;
}

.account-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid rgba(8, 120, 216, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-family: Calibri, "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-weight: 650;
  line-height: 1.15;
  box-shadow: 0 10px 24px rgba(8, 42, 80, 0.08);
}

.account-trigger span:not(.account-avatar) {
  display: grid;
  gap: 1px;
  text-align: left;
}

.account-trigger em {
  color: var(--blue-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.account-trigger strong {
  color: var(--navy);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.15;
  white-space: nowrap;
}

.account-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  font-weight: 900;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  z-index: 40;
  display: grid;
  min-width: 170px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(8, 42, 80, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.account-dropdown a,
.account-dropdown button {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--navy);
  font-weight: 750;
  line-height: 1.2;
  box-shadow: none;
  text-align: left;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  background: #edf7ff;
  color: var(--blue-dark);
}

.account-dropdown form {
  margin: 0;
}

.portal {
  display: grid;
  gap: 20px;
  width: min(1680px, 100%);
  margin: 0 auto;
  padding: 24px clamp(10px, 2vw, 30px) 46px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}

.hero h1 {
  font-size: clamp(28px, 3vw, 46px);
}

.release-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.release-tabs a {
  min-width: 220px;
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.release-tabs a.active {
  border-color: rgba(8, 120, 216, 0.35);
  background: #edf7ff;
}

.release-tabs span {
  color: var(--muted);
  font-size: 13px;
}

.order-board,
.orders-panel,
.empty {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.board-head,
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
}

.summary-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.summary-actions {
  display: grid;
  min-width: min(360px, 100%);
  gap: 8px;
  justify-items: end;
}

.dealer-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(8, 120, 216, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6fbff 100%);
}

.dealer-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.dealer-filter-grid label {
  gap: 5px;
}

.dealer-shipping-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(150px, 0.8fr) minmax(260px, 1.6fr);
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.dealer-shipping-grid label {
  gap: 6px;
}

.dealer-select-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #34423f;
  font-size: 13px;
  font-weight: 800;
}

.dealer-search-select {
  position: relative;
  min-width: 0;
}

.dealer-search-trigger {
  display: flex;
  width: 100%;
  min-height: 40px;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(8, 120, 216, 0.16);
  border-radius: 7px;
  padding: 0 11px;
  background: #fff;
  color: var(--text);
  font-weight: 850;
  box-shadow: none;
  text-align: left;
}

.dealer-search-trigger:hover,
.dealer-search-trigger:focus {
  background: #fff;
  border-color: rgba(8, 120, 216, 0.58);
  box-shadow: 0 0 0 3px rgba(8, 120, 216, 0.13);
  transform: none;
}

.dealer-search-trigger span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-caret {
  color: var(--blue-dark);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.dealer-search-select.is-open .select-caret {
  transform: rotate(180deg);
}

.dealer-search-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 45;
  display: none;
  width: min(520px, 88vw);
  min-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(8, 120, 216, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(8, 42, 80, 0.13);
}

.dealer-search-select.is-open .dealer-search-menu {
  display: grid;
}

.dealer-search-input {
  min-height: 40px;
  height: 40px;
  border: 0;
  border-bottom: 1px solid #e3edf4;
  border-radius: 0;
  box-shadow: none;
}

.dealer-search-options {
  display: block;
  max-height: 260px;
  overflow-y: auto;
  padding: 0;
}

.dealer-search-options button {
  display: block;
  width: 100%;
  min-height: 34px;
  border-radius: 0;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: none;
}

.dealer-search-options button:hover {
  background: #edf7ff;
  color: var(--text);
  box-shadow: none;
  transform: none;
}

.dealer-search-options button.is-active {
  background: #3f6fc7;
  color: #fff;
  box-shadow: none;
  transform: none;
}

.dealer-filter-grid input,
.dealer-search-input {
  min-height: 40px;
  height: 40px;
  border-color: rgba(8, 120, 216, 0.16);
  background: #fff;
}

.dealer-display-settings {
  position: relative;
  align-self: end;
  justify-self: end;
}

.dealer-display-settings summary {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #d6e7f5;
  border-radius: 7px;
  background: #f4f9ff;
  color: var(--blue-dark);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.dealer-display-settings summary::-webkit-details-marker {
  display: none;
}

.dealer-display-form {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  display: grid;
  width: min(460px, 88vw);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.field-selection-actions {
  display: flex;
  justify-content: flex-end;
}

.field-selection-actions button {
  min-height: 32px;
  padding: 6px 13px;
  border: 1px solid rgba(8, 120, 216, 0.16);
  border-radius: 7px;
  background: #edf7ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 850;
  box-shadow: none;
}

.field-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.field-check-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(8, 120, 216, 0.1);
  border-radius: 7px;
  background: #f8fbff;
}

.field-check-grid input {
  width: auto;
  padding: 0;
}

.dealer-product-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dealer-product-table {
  min-width: 1480px;
}

.dealer-product-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.dealer-product-table td {
  vertical-align: middle;
}

.dealer-product-table th,
.dealer-product-table td {
  padding: 10px 12px;
}

.dealer-product-table th.is-frozen,
.dealer-product-table td.is-frozen {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #fff;
  box-shadow: 12px 0 18px rgba(8, 42, 80, 0.08);
}

.dealer-product-table th.is-frozen {
  z-index: 7;
  background: #f4f9ff;
}

.dealer-product-table tr.is-sold-out {
  opacity: 0.62;
}

.thumb-button {
  display: grid;
  width: 44px;
  height: 48px;
  min-height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid #d8e7f2;
  background: #f7fbff;
  box-shadow: none;
}

.thumb-button img {
  width: 38px;
  height: 42px;
  object-fit: contain;
}

.dealer-product-table td strong,
.dealer-product-table td small {
  display: block;
}

.dealer-product-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.product-name-cell {
  min-width: 220px;
  white-space: normal;
}

.qty-input,
.box-input {
  width: 112px;
  text-align: right;
}

.qty-input[readonly] {
  background: #f6f9fc;
  color: #526a80;
}

.note-input {
  width: 150px;
}

.product-info {
  min-width: 0;
}

.funko-no {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff6d9;
  color: #7a5512;
  font-size: 12px;
  font-weight: 900;
}

.product-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.24;
}

.product-card p,
.product-card small {
  color: var(--muted);
}

.product-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 8px 0 10px;
}

.product-meta span {
  overflow: hidden;
  min-height: 26px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(8, 120, 216, 0.06);
  color: #40566a;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-row,
.order-row,
.deposit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.price-row span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 7px;
  background: #f4f9ff;
  color: var(--muted);
  font-size: 12px;
}

.price-row strong {
  color: var(--navy);
  font-size: 18px;
}

.portal-order-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.portal-order-summary span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(8, 120, 216, 0.12);
  border-radius: 8px;
  background: #f7fbff;
  color: var(--text);
  font-weight: 800;
  word-break: break-word;
}

.sticky-submit {
  position: sticky;
  bottom: 0;
  z-index: 22;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin: 0 -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.sticky-submit button {
  min-width: 180px;
}

.order-total-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.order-total-bar span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(8, 120, 216, 0.12);
  border-radius: 999px;
  background: #f4f9ff;
  color: #526a80;
  font-weight: 850;
}

.order-total-bar strong {
  margin-left: 4px;
  color: var(--navy);
}

.dealer-horizontal-scroll {
  position: sticky;
  bottom: 70px;
  z-index: 19;
  height: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(8, 120, 216, 0.1);
  border-radius: 999px;
  background: rgba(244, 249, 255, 0.96);
}

.dealer-horizontal-scroll > div {
  height: 1px;
}

.dealer-horizontal-scroll[hidden] {
  display: none;
}

.dealer-horizontal-scroll::-webkit-scrollbar,
.dealer-product-table-wrap::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
  height: 12px;
}

.dealer-horizontal-scroll::-webkit-scrollbar-thumb,
.dealer-product-table-wrap::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
  border: 3px solid #f4f9ff;
  border-radius: 999px;
  background: rgba(82, 106, 128, 0.55);
}

.dealer-product-table-wrap.has-floating-horizontal-scroll {
  scrollbar-width: none;
}

.dealer-product-table-wrap.has-floating-horizontal-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

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

.portal-account-panel {
  max-width: 980px;
}

.account-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.account-form.compact {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  align-items: end;
}

.account-form .wide {
  grid-column: 1 / -1;
}

.license-preview,
.form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.license-preview span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  font-weight: 800;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  background: #f4f9ff;
  color: #526a80;
  font-size: 12px;
}

.num {
  text-align: right;
}

.proof-link {
  color: var(--muted);
  font-weight: 800;
}

.proof-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
  color: var(--muted);
  font-weight: 800;
}

.payment-proof-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(8, 120, 216, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5faff 100%);
}

.payment-proof-panel .proof-actions {
  padding-top: 0;
}

.payment-proof-panel .proof-actions > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(8, 120, 216, 0.08);
  color: var(--muted);
}

.proof-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(8, 120, 216, 0.16);
  border-radius: 7px;
  background: #f4f9ff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.proof-button:hover {
  background: #e7f4ff;
}

.proof-upload-details {
  position: relative;
}

.proof-upload-details[open] {
  flex-basis: 100%;
  width: 100%;
}

.proof-upload-details summary {
  width: fit-content;
  list-style: none;
  cursor: pointer;
}

.proof-upload-details summary::-webkit-details-marker {
  display: none;
}

.proof-upload-trigger {
  border-color: rgba(8, 120, 216, 0.28);
  background: linear-gradient(180deg, #ffffff 0%, #edf7ff 100%);
}

.proof-upload-form {
  max-width: 920px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 120, 216, 0.12);
  border-radius: 8px;
  background: #f8fbff;
}

.payment-proof-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-proof-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(8, 120, 216, 0.12);
  border-radius: 999px;
  background: #f7fbff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
}

.portal-filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(8, 120, 216, 0.11);
  border-radius: 8px;
  background: #f8fbff;
}

.filter-actions {
  display: inline-flex;
  gap: 8px;
  align-items: end;
}

.image-preview {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(16, 24, 32, 0.62);
}

.image-preview.is-open {
  display: grid;
}

.image-preview figure {
  max-width: min(520px, 92vw);
  margin: 0;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.image-preview img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.image-preview figcaption {
  margin-top: 10px;
  color: var(--navy);
  font-weight: 900;
  text-align: center;
}

@media (max-width: 860px) {
  .global-watermark {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 46px 18px;
    padding: 76px 10px;
  }

  .global-watermark span {
    font-size: 18px;
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .topbar,
  .hero,
  .board-head,
  .panel-title,
  .account-trigger {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-filter {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .filter-actions {
    grid-column: 1 / -1;
  }

  .dealer-toolbar {
    grid-template-columns: 1fr;
  }

  .dealer-display-settings {
    justify-self: stretch;
  }

  .dealer-display-settings summary {
    text-align: center;
  }

  .dealer-display-form {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .dealer-filter-grid,
  .dealer-shipping-grid,
  .account-form,
  .account-form.compact {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .sticky-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .order-total-bar {
    justify-content: stretch;
  }

  .order-total-bar span,
  .sticky-submit button {
    flex: 1 1 180px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .dealer-shipping-grid {
    grid-template-columns: 1fr;
  }

  .portal-order-summary {
    grid-template-columns: 1fr;
  }

  .login-shell {
    padding: 18px;
  }

  .login-visual img {
    width: 220px;
    margin-bottom: 22px;
  }

  .portal {
    padding: 16px 10px 32px;
  }

  .price-row,
  .order-row,
  .deposit-form {
    grid-template-columns: 1fr;
  }

  .portal-filter {
    grid-template-columns: 1fr;
  }

  .dealer-filter-grid,
  .field-check-grid,
  .account-form,
  .account-form.compact {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 112px;
  }
}
