:root {
  --blue: #0085f6;
  --deep-blue: #003e93;
  --navy: #202830;
  --navy-2: #151b21;
  --orange: #ff7a22;
  --green: #1fd57a;
  --bg: #eef6fb;
  --line: #e3e9ef;
  --text: #232a31;
  --muted: #6d7780;
  --shadow: 0 12px 28px rgba(31, 56, 79, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-contact {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #dce3ea;
  color: #40617d;
  font-size: 13px;
}

.top-contact span,
.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-switch {
  color: #18232c;
  text-decoration: none;
}

.language-switch a {
  color: #18232c;
  text-decoration: none;
  font-weight: 700;
}

.language-switch a.active {
  color: #0066cd;
}

.top-contact strong {
  color: #2b76bb;
}

.top-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #151b21;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #151b21;
  font-weight: 700;
}

.user-menu {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: 30px;
  right: 0;
  z-index: 10;
  width: 190px;
  overflow: hidden;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(31, 56, 79, 0.18);
}

.user-dropdown button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid #edf2f6;
  background: #fff;
  color: #27323b;
  padding: 0 14px;
  text-align: left;
  font-weight: 700;
}

.user-dropdown button:hover {
  background: #f3f8fc;
}

.top-tools b {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  margin-left: -6px;
  border-radius: 50%;
  background: #ff6d29;
  color: #fff;
  font-size: 11px;
}

.main-header {
  position: sticky;
  top: 38px;
  z-index: 29;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 52px;
  padding: 0 20px;
  background: #fff;
}

.brand {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1681d8;
  font-size: 30px;
  font-weight: 700;
  font-style: italic;
}

.brand-mark {
  display: inline-grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f7941d 0 34%, #0a83df 34% 70%, #004698 70%);
  border-radius: 8px;
  font-style: normal;
  font-weight: 800;
}

.main-header nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 64px;
  font-size: 17px;
  font-weight: 700;
}

.main-header a {
  color: #0b0f12;
  text-decoration: none;
}

.main-header nav a {
  display: none;
}

.apply-btn {
  width: 96px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-weight: 700;
}

.bluebar {
  position: sticky;
  top: 110px;
  z-index: 28;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #003a8c;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.bluebar span,
.bluebar button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bluebar button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #2f8bd3;
}

.bluebar svg {
  width: 18px;
  height: 18px;
}

.app-shell {
  display: grid;
  grid-template-columns: 132px minmax(660px, 1fr) 314px;
  gap: 22px;
  max-width: 1512px;
  margin: 0 auto;
  align-items: start;
}

.app-shell.order-shell {
  grid-template-columns: 132px minmax(0, 1fr);
}

.side-nav {
  position: fixed;
  top: 142px;
  left: max(0px, calc((100vw - 1512px) / 2));
  z-index: 27;
  width: 132px;
  min-height: calc(100vh - 142px);
  max-height: calc(100vh - 142px);
  background: var(--navy);
  padding-top: 20px;
  overflow: hidden;
}

body.footer-docked .side-nav {
  position: fixed;
  top: 142px;
  bottom: 0;
  width: 132px;
  min-height: calc(100vh - 142px);
}

body.footer-docked .app-shell {
  grid-template-columns: 132px minmax(660px, 1fr) 314px;
}

body.footer-docked .app-shell.order-shell {
  grid-template-columns: 132px minmax(0, 1fr);
}

.side-nav button {
  position: relative;
  width: 100%;
  min-height: 92px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: #c8d0d6;
  display: grid;
  place-items: center;
  gap: 4px;
  font-size: 13px;
}

.side-nav button.active {
  color: #ffb22f;
}

.side-nav button svg {
  width: 34px;
  height: 34px;
}

.side-nav i {
  position: absolute;
  right: 10px;
  top: 36px;
  font-style: normal;
  color: #7e8992;
  font-size: 26px;
}

main {
  min-width: 0;
  padding-top: 18px;
}

.app-shell > main {
  grid-column: 2;
}

.app-shell > .right-rail {
  grid-column: 3;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mode-tabs button {
  min-height: 34px;
  border: 1px solid #cfdbe6;
  border-radius: 6px;
  background: #fff;
  color: #44515b;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
}

.mode-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.title-row h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: #1f252b;
}

.title-row span {
  color: #343b42;
  font-size: 14px;
  font-weight: 700;
}

.credit-line {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e5edf4;
}

.credit-line strong {
  min-width: 122px;
  padding: 8px 22px;
  border-radius: 4px;
  background: #0066cd;
  color: #fff;
  text-align: center;
}

.table-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.table-tools {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid #eef1f4;
}

.table-tools label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #59636d;
}

.table-tools select,
.table-tools input {
  height: 38px;
  border: 1px solid #e0e8ef;
  border-radius: 4px;
  background: #fff;
  padding: 0 12px;
}

.table-tools input {
  width: 158px;
}

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

.invoice-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.invoice-table th {
  height: 68px;
  background: var(--blue);
  color: #fff;
  text-align: left;
  padding: 0 18px;
  border-right: 2px solid rgba(255, 255, 255, 0.45);
  font-weight: 700;
}

.invoice-table th:first-child {
  border-top-left-radius: 18px;
}

.invoice-table th:last-child {
  border-top-right-radius: 18px;
}

.invoice-table td {
  min-height: 74px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  vertical-align: top;
  line-height: 1.55;
}

.invoice-table th:nth-child(1),
.invoice-table td:nth-child(1) {
  width: 84px;
}

.invoice-table th:nth-child(2),
.invoice-table td:nth-child(2) {
  width: 220px;
}

.invoice-table th:nth-child(3),
.invoice-table td:nth-child(3),
.invoice-table th:nth-child(4),
.invoice-table td:nth-child(4) {
  width: 108px;
}

.invoice-table th:nth-child(5),
.invoice-table td:nth-child(5) {
  width: 100px;
}

.invoice-table th:nth-child(6),
.invoice-table td:nth-child(6) {
  width: 92px;
}

.invoice-table td:nth-child(1),
.invoice-table td:nth-child(3),
.invoice-table td:nth-child(4),
.invoice-table td:nth-child(5),
.invoice-table td:nth-child(6) {
  white-space: nowrap;
}

.invoice-link {
  border: 0;
  background: transparent;
  color: #26313a;
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.invoice-row {
  cursor: pointer;
}

.invoice-row:hover td {
  background: #f7fbff;
}

.bill-desc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: start;
  max-width: 220px;
}

.expand-btn,
.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: var(--orange);
  color: #fff;
  font-size: 23px;
  font-weight: 700;
  box-shadow: 0 5px 9px rgba(255, 122, 34, 0.25);
}

.inline-details {
  margin: 12px 0 0;
  color: #4a545d;
  font-size: 13px;
}

.inline-details div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
}

.inline-details dt,
.inline-details dd {
  margin: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: currentColor;
}

.status.paid {
  color: #1f9d5a;
}

.status.unpaid {
  color: #e98616;
}

.status.cancelled {
  color: #7f8992;
}

.status.refunded {
  color: #3e7ecf;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  font-size: 13px;
  color: #33414d;
}

.pager button {
  min-width: 34px;
  height: 34px;
  border: 1px solid #e3ebf2;
  background: #fff;
  color: #87929c;
}

.pager button.active {
  background: var(--blue);
  color: #fff;
}

.mobile-note {
  display: none;
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 8px 0 18px;
}

.dashboard-cards button {
  min-height: 118px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  color: #26313a;
  box-shadow: var(--shadow);
  text-align: left;
}

.dashboard-cards svg {
  color: var(--blue);
}

.dashboard-cards strong {
  font-size: 28px;
}

.dashboard-cards span {
  color: var(--muted);
  font-weight: 700;
}

.official-panel {
  margin-top: 18px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.official-panel h2 {
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.account-grid div {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

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

.account-grid strong {
  font-size: 18px;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
}

.mini-table th {
  background: var(--blue);
  color: #fff;
  text-align: left;
  padding: 14px 18px;
}

.mini-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.mini-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.service-card {
  border-radius: 12px;
}

.service-table th {
  background: #1f8cf0;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px;
}

.action-grid button,
.product-grid button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  padding: 0 14px;
  font-weight: 700;
}

.action-grid button.active {
  background: #0d4f9d;
}

.service-action-panel {
  padding: 0 18px 18px;
}

.service-action-panel h3 {
  margin: 0 0 12px;
  color: #26313a;
  font-size: 16px;
}

.service-action-panel p {
  margin: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 16px 0 0;
}

.service-action-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-action-menu button {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #d8e5ef;
  border-radius: 7px;
  background: #fff;
  color: #26313a;
  padding: 12px 14px;
  text-align: left;
}

.service-action-menu button:hover {
  border-color: var(--blue);
  background: #f4faff;
}

.service-action-menu span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.product-grid article {
  min-height: 210px;
  display: grid;
  align-content: start;
  gap: 12px;
  border-radius: 12px;
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.product-grid svg {
  color: var(--orange);
}

.product-grid h2,
.product-grid p {
  margin: 0;
}

.product-grid h2 {
  font-size: 20px;
}

.product-grid p {
  min-height: 44px;
  color: var(--muted);
  line-height: 1.5;
}

.product-list-grid article {
  min-height: 176px;
}

.order-catalog-page {
  min-height: calc(100vh - 154px);
  margin: 0 -28px -60px;
  padding: 0 28px 60px;
  background:
    linear-gradient(90deg, rgba(33, 139, 211, 0.12) 1px, transparent 1px) left 28px bottom / 42px 150px no-repeat,
    linear-gradient(0deg, rgba(33, 139, 211, 0.12) 1px, transparent 1px) left 28px bottom / 260px 30px no-repeat,
    linear-gradient(90deg, rgba(33, 139, 211, 0.12) 1px, transparent 1px) right 16px top 48px / 42px 110px no-repeat,
    linear-gradient(0deg, rgba(33, 139, 211, 0.12) 1px, transparent 1px) right 16px top 48px / 190px 28px no-repeat,
    #eef7fd;
}

.order-market-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
}

.order-category-panel {
  overflow: hidden;
  align-self: start;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(25, 68, 104, 0.14);
}

.order-category-panel h2 {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  background: var(--blue);
  color: #fff;
  padding: 0 18px;
  font-size: 16px;
}

.order-category-panel h2 svg {
  width: 20px;
  height: 20px;
}

.order-category-panel button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px dashed #d8e2eb;
  background: #fff;
  color: #12385e;
  padding: 0 14px 0 18px;
  font-weight: 700;
  text-align: left;
}

.order-category-panel button.active,
.order-category-panel button:hover {
  color: #dd8a2f;
}

.order-category-panel i {
  color: #c48a3d;
  font-size: 24px;
  font-style: normal;
  line-height: 1;
}

.order-product-area h1 {
  margin: 8px 0 18px;
  color: #2d9ad7;
  font-size: 32px;
  line-height: 1.1;
}

.order-product-list {
  display: grid;
  gap: 22px;
}

.order-product-card {
  overflow: hidden;
  border: 1px solid #cbdbe8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(25, 68, 104, 0.08);
}

.product-card-head,
.product-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: center;
}

.product-card-head {
  min-height: 54px;
  border-bottom: 1px solid #dbe6ef;
  padding: 0 16px;
}

.product-card-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #174a8b;
  font-size: 20px;
}

.product-card-head h2 span {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #f6bc4e;
  color: #fff;
  font-size: 20px;
}

.order-price {
  display: grid;
  justify-items: end;
  color: #db7d36;
}

.order-price small {
  color: #7e8790;
  font-size: 12px;
  font-weight: 700;
}

.order-price strong {
  font-size: 24px;
  line-height: 1;
}

.order-price em {
  font-style: normal;
  font-weight: 800;
}

.product-card-body {
  gap: 18px;
  padding: 12px 16px 16px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px 24px;
}

.spec-grid div {
  min-height: 40px;
  border-left: 2px solid #e49352;
  padding-left: 10px;
}

.spec-grid strong,
.spec-grid span {
  display: block;
}

.spec-grid strong {
  color: #2a3239;
  font-size: 14px;
}

.spec-grid span {
  margin-top: 3px;
  color: #596775;
  font-size: 12px;
}

.order-pill-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 22px;
  background: #eb8a3f;
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
  white-space: nowrap;
}

.order-pill-btn svg {
  width: 18px;
  height: 18px;
}

.order-detail .official-panel {
  margin-top: 0;
}

.detail-copy {
  margin: 0;
  padding: 18px 22px 0;
  color: var(--muted);
  line-height: 1.6;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 18px 22px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 340px);
  gap: 22px;
  align-items: start;
  min-width: 0;
}

.checkout-main h2 + .account-grid,
.checkout-main h2 + .payment-options,
.checkout-main h2 + .order-notes {
  margin-top: 0;
}

.checkout-error {
  margin: 0 22px 22px;
}

.checkout-account {
  border-bottom: 1px solid var(--line);
}

.account-form {
  border-top: 1px solid var(--line);
}

.account-form h3 {
  margin: 0;
  padding: 18px 22px 0;
  font-size: 18px;
}

.password-feedback {
  margin: 0 22px 12px;
}

.success-message {
  border-radius: 6px;
  background: #e8f7ee;
  color: #167a3a;
  padding: 10px 12px;
  font-weight: 700;
}

.payment-options {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.payment-options label,
.terms-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-options input,
.terms-row input {
  width: auto;
  min-height: auto;
}

.payment-qr-panel {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #f7fbff;
}

.payment-qr-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.payment-qr-grid,
.payment-preview-grid,
.qr-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payment-qr-grid figure,
.payment-preview-grid figure {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  border: 1px solid #d8e5ef;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.payment-qr-grid img,
.payment-preview-grid img {
  width: min(160px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
}

.payment-qr-grid figcaption,
.payment-preview-grid figcaption {
  color: #26313a;
  font-weight: 800;
}

.qr-upload-grid {
  align-items: end;
}

.qr-upload-grid input[type="file"] {
  min-height: 46px;
  padding: 10px;
}

.admin-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.order-notes {
  width: calc(100% - 44px);
  min-height: 96px;
  margin: 18px 22px;
  border: 1px solid #d8e2eb;
  border-radius: 6px;
  padding: 12px;
  resize: vertical;
  font: inherit;
}

.terms-row {
  padding: 0 22px 22px;
}

.order-summary {
  position: sticky;
  top: 160px;
  align-self: start;
  width: 100%;
  min-width: 0;
}

.summary-item,
.summary-line,
.summary-total {
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.summary-item span,
.summary-item small,
.summary-line span {
  color: var(--muted);
}

.summary-spec-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.summary-spec-list em {
  color: #26313a;
  font-style: normal;
  font-weight: 800;
}

.summary-spec-list small {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
}

.summary-spec-list b {
  color: var(--muted);
}

.summary-line,
.summary-total {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.summary-total {
  background: #f3f8fc;
  font-size: 18px;
}

.order-summary .form-actions {
  padding: 18px 20px;
}

.order-record-card {
  margin-bottom: 18px;
}

.order-record-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.order-record-table tbody tr[data-view-order] {
  cursor: pointer;
}

.order-record-table tbody tr.active-order-row {
  background: #edf7ff;
}

.link-btn {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: #eaf4ff;
  color: var(--blue);
  padding: 0 12px;
  font-weight: 800;
}

.order-record-detail {
  margin-top: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #eef6fb;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border-radius: 12px;
  background: #fff;
  padding: 30px;
  box-shadow: var(--shadow);
}

.login-panel h1,
.login-panel p {
  margin: 0;
}

.login-panel p,
.login-panel small {
  color: var(--muted);
}

.login-language {
  justify-content: flex-start;
}

.login-error {
  border-radius: 6px;
  background: #fff1f1;
  color: #c52b31;
  padding: 10px 12px;
  font-weight: 700;
}

.login-back {
  justify-content: center;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.right-rail {
  padding-top: 96px;
}

.rail-card {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rail-card h2 {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 22px;
  background: #1d242a;
  color: #fff;
  font-size: 18px;
}

.rail-card h2 span {
  margin-left: auto;
}

.rail-card h2 svg {
  width: 20px;
  height: 20px;
}

.rail-card p {
  margin: 0;
  padding: 22px;
  color: #4d5861;
}

.filter-row,
.finance button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 18px 1fr 24px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid #edf2f6;
  background: #fff;
  color: #274367;
  text-align: left;
  padding: 0 22px;
  font-weight: 700;
}

.filter-row b {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 3px;
  background: #f1f2f3;
  color: #333;
  font-size: 12px;
}

.filter-row .radio {
  width: 18px;
  height: 18px;
  border: 2px solid #617085;
  border-radius: 50%;
}

.filter-row.active .radio {
  border: 5px solid var(--blue);
}

.finance button {
  grid-template-columns: 22px 1fr;
  color: #f09a28;
}

.admin-page {
  padding-bottom: 64px;
}

.admin-shell {
  min-height: 100vh;
  background: #edf4fb;
}

.admin-topbar {
  height: 76px;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 28px;
  align-items: center;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid #dce6ef;
  box-shadow: 0 3px 14px rgba(31, 56, 79, 0.06);
}

.admin-topbar > div {
  display: grid;
  gap: 3px;
}

.admin-topbar strong {
  font-size: 20px;
}

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

.admin-back-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 700;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

.admin-side-nav {
  position: sticky;
  top: 96px;
  align-self: start;
  overflow: hidden;
  border-radius: 12px;
  background: #1f2a33;
  box-shadow: var(--shadow);
}

.admin-side-nav button {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #d5dde4;
  padding: 0 18px;
  text-align: left;
  font-weight: 800;
}

.admin-side-nav button.active {
  background: #2f8be6;
  color: #fff;
}

.admin-side-nav svg {
  width: 22px;
  height: 22px;
}

.admin-main {
  min-width: 0;
  padding: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.user-panel {
  grid-column: 1 / -1;
}

.product-panel {
  grid-column: 1 / -1;
}

.user-admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1fr);
}

.user-admin-list {
  max-height: 280px;
  border-left: 1px solid var(--line);
}

.admin-panel {
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 20px;
}

form {
  display: grid;
  gap: 13px;
  padding: 20px;
}

label {
  display: grid;
  gap: 7px;
  color: #4a5661;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8e2eb;
  border-radius: 6px;
  background: #fff;
  color: #1d252c;
  padding: 0 10px;
}

textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
  font: inherit;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.primary-btn,
.ghost-btn,
.danger-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-btn {
  border: 0;
  background: var(--blue);
  color: #fff;
}

.ghost-btn {
  border: 1px solid #cbd7e2;
  background: #fff;
  color: #314553;
}

.danger-btn {
  border: 0;
  background: #e5484d;
  color: #fff;
}

.primary-btn svg,
.ghost-btn svg,
.danger-btn svg,
.icon-btn svg {
  width: 18px;
  height: 18px;
}

.admin-list {
  max-height: 720px;
  overflow: auto;
}

.admin-filter {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.admin-filter select {
  height: 38px;
  border: 1px solid #d8e3ec;
  border-radius: 6px;
  background: #fff;
  padding: 0 10px;
  color: var(--text);
}

.admin-list button {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px 92px;
  gap: 10px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 12px 18px;
  text-align: left;
}

.admin-list button.active {
  background: #edf7ff;
}

.admin-list button.danger-row {
  min-height: 54px;
  background: #fff7f7;
  color: #be3036;
}

.admin-list strong,
.admin-list small {
  display: block;
}

.admin-list small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-list em {
  color: #1f9d5a;
  font-style: normal;
  font-weight: 700;
}

.admin-list b {
  text-align: right;
}

.product-admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1fr);
  gap: 0;
}

.product-admin-list {
  max-height: 760px;
  border-right: 1px solid var(--line);
}

.product-admin-list section {
  border-bottom: 1px solid var(--line);
}

.product-admin-list h3 {
  margin: 0;
  padding: 14px 18px 4px;
  color: #5d6a75;
  font-size: 13px;
}

.product-admin-list button {
  grid-template-columns: minmax(0, 1fr) 118px;
  min-height: 62px;
}

.product-panel form h3 {
  margin: 0;
  font-size: 18px;
}

.paper {
  max-width: 900px;
  margin: 6px auto 0;
  padding: 42px;
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow);
}

.paper header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 28px;
  border-bottom: 4px solid var(--deep-blue);
}

.paper-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1681d8;
  font-size: 28px;
  font-style: italic;
}

.paper h2 {
  margin: 0;
  font-size: 30px;
}

.paper header p {
  margin: 8px 0 0;
  text-align: right;
  color: #1f9d5a;
  font-weight: 700;
}

.invoice-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.invoice-meta div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.invoice-meta span,
.invoice-meta strong {
  display: block;
}

.invoice-meta span {
  color: var(--muted);
  font-size: 12px;
}

.paper-table {
  width: 100%;
  border-collapse: collapse;
}

.paper-table th {
  padding: 12px;
  background: var(--deep-blue);
  color: #fff;
  text-align: left;
}

.paper-table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.paper-table td:last-child,
.paper-table tfoot td:last-child {
  width: 150px;
  text-align: right;
  white-space: nowrap;
}

.paper-table ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #4d5861;
}

.paper-table tfoot td {
  padding: 12px;
  text-align: right;
  font-weight: 700;
}

.paper footer {
  display: flex;
  justify-content: space-between;
  margin-top: 34px;
  color: #66717a;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  background: rgba(13, 22, 31, 0.55);
  padding: 28px;
  overflow: auto;
}

.invoice-modal {
  width: min(980px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border-radius: 10px;
  background: #eef6fb;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #d9e4ee;
  background: #fff;
}

.modal-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.modal-toolbar strong {
  font-size: 18px;
}

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

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.invoice-modal .paper {
  margin: 22px auto;
}

.site-footer {
  max-width: calc(1512px - 132px);
  margin: 140px auto 0;
  margin-left: max(132px, calc((100vw - 1512px) / 2 + 132px));
  margin-right: auto;
  background: #fff;
}

.contact-band {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr 0.8fr;
  background: #003f98;
  color: #fff;
}

.contact-band > div {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-band svg {
  width: 42px;
  height: 42px;
  color: #ff9d34;
}

.contact-band strong {
  font-size: 22px;
}

.contact-band span {
  color: #ff9d34;
  font-weight: 700;
}

.contact-band button {
  width: fit-content;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 5px;
  background: transparent;
  color: #fff;
  padding: 0 18px;
  font-weight: 700;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 26px;
  padding: 42px 0 42px;
}

.footer-links h3 {
  margin: 0 0 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d9dfe5;
  font-size: 15px;
}

.footer-links a {
  display: block;
  margin: 8px 0;
  color: #303942;
  font-size: 13px;
}

.copyright {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  background: #1d252c;
  color: #fff;
  font-size: 12px;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .side-nav,
  body.footer-docked .side-nav {
    width: 92px;
  }

  .right-rail {
    display: none;
  }

  .side-nav button span,
  .side-nav i {
    display: none;
  }

  .main-header nav {
    gap: 28px;
  }

  .admin-grid,
  .admin-layout,
  .contact-band,
  .footer-links,
  .dashboard-cards,
  .account-grid,
  .action-grid,
  .product-grid,
  .config-grid,
  .product-admin-grid {
    grid-template-columns: 1fr 1fr;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .order-market-layout,
  .product-card-head,
  .product-card-body {
    grid-template-columns: 1fr;
  }

  .order-price {
    justify-items: start;
    padding: 0 0 12px 30px;
  }

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

  .mobile-note {
    display: block;
    margin-top: 16px;
    color: #53616d;
  }
}

@media (max-width: 760px) {
  .top-contact,
  .main-header nav,
  .apply-btn {
    display: none;
  }

  .main-header {
    top: 0;
    height: 62px;
  }

  .bluebar {
    top: 62px;
  }

  .admin-topbar {
    height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px;
  }

  .admin-layout {
    display: block;
    padding: 14px;
  }

  .admin-side-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    margin-bottom: 14px;
  }

  .admin-side-nav button {
    min-width: 140px;
    grid-template-columns: 22px 1fr;
  }

  .app-shell {
    display: block;
  }

  .app-shell > main,
  .app-shell > .right-rail {
    grid-column: auto;
  }

  .side-nav {
    position: static;
    width: auto;
    max-height: none;
    min-height: auto;
    display: flex;
    overflow-x: auto;
    padding: 0;
  }

  body.footer-docked .side-nav {
    position: static;
    width: auto;
    min-height: auto;
  }

  .side-nav button {
    min-width: 82px;
    min-height: 62px;
  }

  main {
    padding: 14px;
  }

  .mode-tabs {
    overflow-x: auto;
  }

  .title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .title-row h1 {
    font-size: 24px;
  }

  .table-tools,
  .pager,
  .paper footer {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    gap: 12px;
    padding: 16px;
  }

  .two-col,
  .admin-grid,
  .invoice-meta,
  .contact-band,
  .footer-links,
  .dashboard-cards,
  .account-grid,
  .action-grid,
  .service-action-menu,
  .payment-qr-grid,
  .payment-preview-grid,
  .qr-upload-grid,
  .product-grid,
  .config-grid,
  .checkout-grid,
  .product-admin-grid,
  .user-admin-grid,
  .order-market-layout,
  .product-card-head,
  .product-card-body,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .order-catalog-page {
    margin: 0 -14px -40px;
    padding: 0 14px 40px;
  }

  .order-product-area h1 {
    font-size: 26px;
  }

  .product-admin-list {
    border-right: 0;
  }

  .user-admin-list {
    border-left: 0;
  }

  .paper {
    padding: 22px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .paper header {
    gap: 16px;
    flex-direction: column;
  }

  .site-footer {
    margin-top: 54px;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }

}

@media print {
  @page {
    margin: 12mm;
    size: A4;
  }

  body {
    background: #fff;
  }

  #app > :not(.modal-backdrop) {
    display: none !important;
  }

  .modal-backdrop {
    position: static;
    display: block;
    padding: 0;
    background: #fff;
  }

  .invoice-modal {
    width: 100%;
    max-height: none;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }

  .modal-toolbar {
    display: none;
  }

  .invoice-modal .paper {
    margin: 0;
    max-width: none;
    min-height: auto;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    break-inside: avoid;
  }

  .paper header {
    flex-direction: row;
    gap: 0;
  }

  .invoice-meta {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 22px 0;
  }

  .paper footer {
    display: none;
  }
}
