/* Design tokens shared by the login screen and operational console. */
:root {
  --bg0: #f7f1e8;
  --bg1: #efe3cf;
  --ink: #1f1f1f;
  --ink-soft: #4a4a4a;
  --brand: #0e8a72;
  --brand-dark: #0a5b4c;
  --card: rgba(255, 255, 255, 0.86);
  --line: rgba(17, 17, 17, 0.1);
  --danger: #af2e2e;
}

/* Base document layout and reusable visibility utility. */
* {
  box-sizing: border-box;
  scrollbar-color: rgba(14, 138, 114, 0.52) rgba(14, 138, 114, 0.1);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: rgba(14, 138, 114, 0.1);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(14, 138, 114, 0.52);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--brand);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
  background: radial-gradient(circle at 12% 10%, #f8df9b 0, transparent 25%),
    radial-gradient(circle at 90% 15%, #b6e5cf 0, transparent 30%),
    linear-gradient(145deg, var(--bg0), var(--bg1));
  padding: clamp(12px, 2vw, 32px) clamp(10px, 2.4vw, 18px) 60px;
  overflow-x: hidden;
}

html,
body {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

#appView {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Login screen: viewport layout, credential fields, and footer record. */
.login-view {
  min-height: 100dvh;
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  gap: 14px;
  padding: 24px 24px calc(8px + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.login-view::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 86px;
  background: linear-gradient(180deg, rgba(14, 52, 63, 0) 0%, rgba(14, 52, 63, 0.55) 100%);
  pointer-events: none;
}

.login-panel {
  width: min(520px, calc(100% - 24px));
  padding: 32px 30px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 255, 251, 0.74));
  box-shadow: 0 24px 60px rgba(9, 77, 65, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  align-self: center;
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(14, 138, 114, 0.18), transparent 34%, rgba(209, 159, 63, 0.16) 68%, transparent);
  opacity: 0.8;
  pointer-events: none;
}

.login-panel > * {
  position: relative;
  z-index: 1;
}

.login-head {
  text-align: center;
  margin-bottom: 16px;
}

.assistant-brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.assistant-avatar {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  filter: drop-shadow(0 5px 8px rgba(10, 91, 76, 0.16));
  animation: assistantAvatarFloat 4.5s ease-in-out infinite alternate;
}

.login-brand-lockup {
  margin: 6px 0 2px;
}

.login-assistant-avatar {
  width: 72px;
  height: 72px;
}

.login-head h1 {
  font-size: clamp(30px, 4.8vw, 42px);
  font-family: inherit;
  font-weight: 700;
}

.login-head .sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto 0;
  padding: 6px 16px;
  border: 1px solid rgba(14, 138, 114, 0.16);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(232, 250, 245, 0.6));
  color: #0b6f60;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(14, 138, 114, 0.1);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.login-field-label {
  color: #0a5b4c;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: left;
  white-space: nowrap;
  padding-left: 2px;
}

.login-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(14, 138, 114, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(235, 249, 244, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 10px 28px rgba(10, 91, 76, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-input-shell:focus-within {
  border-color: rgba(14, 138, 114, 0.86);
  box-shadow: 0 0 0 4px rgba(14, 138, 114, 0.13), 0 14px 34px rgba(10, 91, 76, 0.16);
  transform: translateY(-1px);
}

.login-input-icon {
  width: 21px;
  height: 21px;
  margin-left: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: #0e8a72;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  filter: drop-shadow(0 2px 4px rgba(14, 138, 114, 0.16));
}

.login-form input[type="text"],
.login-form input[type="tel"],
.login-form input[type="password"],
.login-form input[name="mobile"],
.login-form input[name="password"] {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  padding: 10px 14px 10px 10px;
  color: #143d35;
  font-size: 15px;
  font-weight: 600;
}

.login-form input::placeholder {
  color: rgba(74, 74, 74, 0.48);
  font-weight: 400;
}

.password-field {
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 46px;
}

.password-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 8px;
  padding: 0;
}

.password-eye:hover {
  background: rgba(14, 138, 114, 0.1);
}

.password-eye[aria-pressed="true"] {
  background: rgba(14, 138, 114, 0.16);
}

.eye-icon {
  width: 19px;
  height: 19px;
  stroke: #285448;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eye-icon circle {
  stroke-dasharray: 1.2 0.8;
}

.login-form input:focus {
  outline: none;
}

.login-btn {
  width: 100%;
  height: 50px;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #0e8a72, #0a5b4c 58%, #123d5a);
  box-shadow: 0 16px 34px rgba(10, 91, 76, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  letter-spacing: 0.12em;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.login-btn:hover {
  box-shadow: 0 14px 30px rgba(10, 91, 76, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.login-btn-icon {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 4px 10px rgba(0, 0, 0, 0.08);
}

.login-btn-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.login-btn-shield {
  fill: rgba(255, 255, 255, 0.08);
}

.login-footer {
  position: static;
  transform: none;
  margin-top: 0;
  font-size: 12px;
  color: #eaf7ff;
  background: rgba(8, 33, 43, 0.58);
  border: 1px solid rgba(210, 238, 255, 0.32);
  padding: 7px 13px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.24);
  z-index: 1;
  align-self: end;
}

.beian-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.beian-link:hover {
  text-decoration: underline;
}

.beian-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 3px;
}

.bg-shape {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  opacity: 0.2;
  z-index: -1;
  filter: blur(8px);
}

.bg-shape-a {
  left: -80px;
  top: 20%;
  background: #1aa38a;
  animation: driftA 7s ease-in-out infinite alternate;
}

.bg-shape-b {
  right: -60px;
  top: 40px;
  background: #e5a84d;
  animation: driftB 8s ease-in-out infinite alternate;
}

.hero {
  width: min(1140px, 100%);
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  position: relative;
}

.hero-brand {
  grid-column: 1;
  justify-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.hero-eyebrow {
  line-height: 1.2;
}

.hero-meta {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.hero-user {
  grid-column: 3;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 460px;
}

.welcome-text {
  margin: 0;
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(14, 138, 114, 0.2);
  border-radius: 999px;
  padding: 7px 12px;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
}

.logout-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 0.18s ease;
  filter: drop-shadow(0 2px 2px rgba(10, 91, 76, 0.18));
}

.logout-door {
  fill: rgba(14, 138, 114, 0.16);
}

.logout-stitch {
  stroke: #d19f3f;
  stroke-width: 1.5;
}

.logout-button:hover .logout-icon {
  transform: translateX(1px);
}

#globalTooltip {
  position: fixed;
  z-index: 2000;
  max-width: calc(100vw - 24px);
  padding: 7px 10px;
  border: 1px solid rgba(209, 159, 63, 0.62);
  border-radius: 7px;
  background: #0a5b4c;
  box-shadow: 0 8px 18px rgba(10, 91, 76, 0.24);
  color: #fffdf6;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  opacity: 0;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-align: center;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

#globalTooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#globalTooltip.is-below {
  transform: translateY(-4px);
}

#globalTooltip.is-below.is-visible {
  transform: translateY(0);
}

.logout-label {
  display: none;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  font-family: inherit;
  font-weight: 700;
}

.sub {
  margin: 0;
  color: var(--ink-soft);
}

.health {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.health::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.22);
}

.health.ok::before {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
}

.health.error::before {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

main {
  width: min(1140px, 100%);
  margin: 0 auto;
  display: block;
}

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(245, 252, 249, 0.86));
  border: 1px solid rgba(14, 138, 114, 0.24);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 38px rgba(10, 91, 76, 0.12), 0 3px 10px rgba(17, 17, 17, 0.04);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 5px;
  background: linear-gradient(90deg, #d19f3f, var(--brand) 28%, #1ca687 72%, #d19f3f);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 5px 0 0;
  z-index: -1;
  opacity: 0.34;
  pointer-events: none;
  background-image: repeating-linear-gradient(135deg, rgba(14, 138, 114, 0.035) 0 1px, transparent 1px 9px);
}

#page-new-order {
  padding: 20px;
}

.output-wrap {
  grid-column: auto;
  margin-top: 14px;
}

.feature-page-loading {
  display: none;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--brand-dark);
}

.feature-page-loading strong,
.feature-page-loading p {
  display: block;
}

.feature-page-loading p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.feature-page-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(14, 138, 114, 0.18);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: feature-page-spin 0.8s linear infinite;
}

.feature-content.is-loading .feature-page,
.feature-content.is-loading .output-wrap {
  display: none;
}

.feature-content.is-loading .feature-page-loading {
  display: flex;
}

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

.page-nav {
  width: min(1140px, 100%);
  margin: 0 auto 14px;
  display: flex;
  justify-content: center;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 8px 10px;
  border: 0;
  border-bottom: 1px solid rgba(14, 138, 114, 0.18);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  visibility: hidden;
  scrollbar-width: none;
}

.page-nav::-webkit-scrollbar {
  height: 0;
}

.page-nav.is-scrolling {
  scrollbar-color: rgba(14, 138, 114, 0.52) rgba(14, 138, 114, 0.1);
  scrollbar-width: thin;
}

.page-nav.is-scrolling::-webkit-scrollbar {
  height: 5px;
}

.page-nav::-webkit-scrollbar-track {
  background: rgba(14, 138, 114, 0.1);
  border-radius: 999px;
}

.page-nav::-webkit-scrollbar-thumb {
  background: rgba(14, 138, 114, 0.52);
  border-radius: 999px;
}

.page-nav::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

.page-nav.is-ready {
  visibility: visible;
}

.page-tab {
  position: relative;
  min-height: 40px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 0;
  padding: 7px 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0;
}

.page-tab:hover {
  border-color: transparent;
  background: transparent;
  color: var(--brand-dark);
}

.page-tab:active {
  color: var(--brand);
}

.page-tab:focus-visible {
  outline: 2px solid rgba(14, 138, 114, 0.62);
  outline-offset: 2px;
}

.page-tab.active {
  border-color: transparent;
  background: transparent;
  color: var(--brand-dark);
  box-shadow: none;
}

.page-tab.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -11px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 2px 5px rgba(14, 138, 114, 0.24);
  transform-origin: center;
  animation: page-tab-indicator 0.24s ease-out;
}

.page-tab.disabled {
  cursor: not-allowed;
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
  opacity: 0.58;
}

.page-tab.disabled:hover {
  background: transparent;
  border-color: transparent;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.status-ok {
  background: #2fbf71;
  box-shadow: 0 0 0 2px rgba(47, 191, 113, 0.25);
}

.page-tab.active .status-dot.status-ok {
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 138, 114, 0.13);
}

.status-dot.status-disabled {
  background: #9a9a9a;
  box-shadow: 0 0 0 2px rgba(154, 154, 154, 0.2);
}

@keyframes page-tab-indicator {
  from { transform: scaleX(0.25); opacity: 0.25; }
  to { transform: scaleX(1); opacity: 1; }
}


.feature-page {
  display: none;
}

.feature-page.active {
  display: block;
}

.report-maintenance-page.active {
  display: grid;
  min-height: min(430px, 56vh);
  place-items: center;
}

.report-maintenance-content {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 360px;
  padding: 32px 24px;
  text-align: center;
}

.report-maintenance-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid rgba(14, 138, 114, 0.26);
  border-radius: 50%;
  background: rgba(14, 138, 114, 0.1);
  color: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(10, 91, 76, 0.12);
}

.report-maintenance-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.report-maintenance-eyebrow {
  margin: 6px 0 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.report-maintenance-content h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

.report-maintenance-message {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.assistant-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.assistant-page-header h2 {
  margin-bottom: 5px;
}

.assistant-page-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.assistant-status {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(154, 154, 154, 0.13);
  color: #696969;
  font-size: 13px;
}

.assistant-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 230px;
  max-height: 420px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.assistant-message {
  max-width: min(78%, 680px);
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.assistant-message-bot {
  align-self: flex-start;
  background: rgba(14, 138, 114, 0.1);
  color: var(--brand-dark);
}

.assistant-message-user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--brand), #1ca687);
  color: #fff;
}

.assistant-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.assistant-chat-form textarea {
  min-height: 46px;
}

h2 {
  margin: 0 0 12px;
  font-size: 19px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 10px;
}

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

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

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.operation-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.operation-button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.operation-button-label {
  white-space: nowrap;
}

.operation-button.is-click-settled:not(:disabled) {
  transform: none !important;
  filter: none !important;
}

.form-actions {
  margin-top: 26px;
}

.new-order-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 18px;
  margin-bottom: 18px;
}

.new-order-eyebrow {
  margin: 0 0 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.new-order-header h2 {
  margin: 0;
}

.new-order-header p:not(.new-order-eyebrow) {
  margin: 7px 0 0;
  color: var(--ink-soft);
}

.new-order-template-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.new-order-template-btn:hover:not(:disabled) {
  background: rgba(14, 138, 114, 0.12);
}

.new-order-template-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.new-order-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(14, 138, 114, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.archive-form {
  display: grid;
  gap: 12px;
}

.archive-month-field {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 10px;
  width: min(360px, 100%);
}

.archive-month-label {
  color: var(--brand-dark);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.archive-month-picker {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  flex: 1;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(14, 138, 114, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 250, 247, 0.9));
  box-shadow: 0 8px 22px rgba(10, 70, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  touch-action: pan-y;
}

.archive-month-picker:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.14), 0 10px 26px rgba(10, 70, 60, 0.1);
}

.archive-month-picker:hover {
  border-color: rgba(14, 138, 114, 0.45);
  box-shadow: 0 10px 26px rgba(10, 70, 60, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.archive-month-input {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font: inherit;
  text-align: center;
  pointer-events: none;
}

.archive-month-input:focus {
  outline: none;
}

.archive-month-display {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  justify-self: center;
  pointer-events: none;
  user-select: none;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
}

.archive-month-calendar-trigger {
  grid-column: 2;
  grid-row: 1;
  z-index: 2;
  justify-self: stretch;
  width: 100%;
  height: 40px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.archive-month-calendar-trigger:hover {
  background: transparent;
}

.archive-month-calendar-trigger svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.archive-month-step {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
}

.archive-month-step:first-child {
  border-right: 1px solid rgba(14, 138, 114, 0.16);
}

.archive-month-step:last-child {
  border-left: 1px solid rgba(14, 138, 114, 0.16);
}

.archive-month-step:hover {
  background: rgba(14, 138, 114, 0.1);
}

.archive-month-step svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.custom-date-popover {
  position: fixed;
  z-index: 80;
  width: min(320px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid rgba(14, 138, 114, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 250, 247, 0.97));
  box-shadow: 0 22px 55px rgba(10, 70, 60, 0.18), 0 8px 18px rgba(10, 70, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: var(--ink);
  animation: custom-date-popover-in 0.16s ease-out;
  backdrop-filter: blur(12px);
}

@keyframes custom-date-popover-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-date-popover-header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.custom-date-popover-header strong {
  text-align: center;
  color: var(--brand-dark);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.custom-date-quick-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px;
  border: 1px solid rgba(14, 138, 114, 0.12);
  border-radius: 14px;
  background: rgba(14, 138, 114, 0.055);
}

.custom-date-quick-btn {
  min-width: 68px;
  min-height: 30px;
  border: 1px solid rgba(14, 138, 114, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.custom-date-quick-btn:hover {
  border-color: rgba(14, 138, 114, 0.35);
  background: linear-gradient(135deg, rgba(14, 138, 114, 0.14), rgba(28, 166, 135, 0.18));
  box-shadow: 0 5px 12px rgba(10, 70, 60, 0.1);
  transform: translateY(-1px);
}

.custom-date-jump {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 8px;
  min-width: 0;
}

.custom-date-title-btn {
  height: 32px;
  border: 1px solid rgba(14, 138, 114, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.custom-date-title-btn:hover {
  border-color: rgba(14, 138, 114, 0.35);
  background: rgba(14, 138, 114, 0.1);
  transform: translateY(-1px);
}

.custom-date-title-btn:focus {
  outline: none;
  border-color: rgba(14, 138, 114, 0.45);
  box-shadow: 0 0 0 3px rgba(14, 138, 114, 0.1);
}

.custom-date-nav {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(14, 138, 114, 0.14);
  border-radius: 12px;
  background: rgba(14, 138, 114, 0.06);
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.custom-date-nav:hover {
  border-color: rgba(14, 138, 114, 0.26);
  background: rgba(14, 138, 114, 0.13);
}

.custom-date-nav.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.custom-date-picker-header {
  grid-template-columns: 36px 1fr 36px;
}

.custom-date-weekdays,
.custom-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.custom-date-weekdays {
  margin-bottom: 8px;
  color: rgba(31, 31, 31, 0.52);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.custom-date-weekdays span {
  line-height: 28px;
}

.custom-date-day,
.custom-year-option,
.custom-month-option {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.custom-date-day {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.custom-date-day:hover,
.custom-year-option:hover,
.custom-month-option:hover {
  border-color: rgba(14, 138, 114, 0.22);
  background: rgba(14, 138, 114, 0.1);
  transform: translateY(-1px);
}

.custom-date-day.is-today {
  border-color: rgba(14, 138, 114, 0.38);
  color: var(--brand-dark);
}

.custom-date-day.is-selected,
.custom-year-option.is-selected,
.custom-month-option.is-selected {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 138, 114, 0.22);
}

.custom-date-day.is-disabled {
  opacity: 0.34;
  cursor: not-allowed;
  transform: none;
}

.custom-month-option.is-disabled {
  opacity: 0.34;
  cursor: not-allowed;
  transform: none;
}

.custom-year-range-bar {
  display: grid;
  grid-template-columns: 78px 1fr 78px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid rgba(14, 138, 114, 0.12);
  border-radius: 14px;
  background: rgba(14, 138, 114, 0.055);
}

.custom-year-range-label {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.custom-year-range-nav {
  min-height: 30px;
  border: 1px solid rgba(14, 138, 114, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.custom-year-range-nav:hover:not(.is-disabled) {
  border-color: rgba(14, 138, 114, 0.35);
  background: rgba(14, 138, 114, 0.1);
}

.custom-year-range-nav.is-disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.custom-year-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.custom-year-option {
  height: 42px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.custom-month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.custom-month-option {
  height: 42px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.new-order-upload-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 142px;
  padding: 12px 16px;
  border: 1px dashed rgba(14, 138, 114, 0.55);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14, 138, 114, 0.07), rgba(255, 255, 255, 0.58));
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.new-order-upload-field.is-dragging {
  border-color: var(--brand);
  background: rgba(14, 138, 114, 0.15);
  transform: scale(1.01);
}

.new-order-upload-field.has-file {
  border-style: solid;
  border-color: var(--brand);
  background: rgba(14, 138, 114, 0.1);
}

.new-order-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.new-order-clear-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.1);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.new-order-clear-btn:hover {
  background: rgba(207, 76, 76, 0.15);
  color: #b73333;
}

.new-order-upload-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #1ca687);
  color: #fff;
}

.new-order-upload-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.new-order-upload-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: center;
}

.new-order-upload-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-order-upload-copy small,
.new-order-hint {
  color: var(--ink-soft);
  font-size: 13px;
}

.new-order-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid rgba(5, 96, 77, 0.5);
  background: linear-gradient(110deg, #07856e, #19aa8a);
  box-shadow: 0 8px 18px rgba(14, 138, 114, 0.22);
}

.new-order-submit-btn:hover:not(:disabled) {
  box-shadow: 0 11px 22px rgba(14, 138, 114, 0.3);
}

.new-order-submit-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.new-order-hint {
  margin: 12px 0 0;
}

.new-order-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(14, 138, 114, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

@media (min-width: 769px) {
  .new-order-editor-layout {
    align-items: stretch;
  }

  .new-order-editor-submit-wrap {
    align-items: stretch;
  }

  .new-order-editor-submit-wrap .new-order-submit-btn {
    height: 100%;
  }
}

.new-order-editor {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  min-height: 142px;
  padding: 16px;
  border: 1px solid rgba(14, 138, 114, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.new-order-editor-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.new-order-editor:not(:has(.new-order-editor-card)) .new-order-editor-header {
  flex: 1;
  margin-bottom: 0;
}

.new-order-editor-header h3,
.new-order-editor-header p {
  margin: 0;
}

.new-order-editor-header h3 {
  font-size: 16px;
  color: var(--brand-dark);
}

.new-order-editor-title {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 8px;
  white-space: nowrap;
}

.new-order-editor-title-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(14, 138, 114, 0.24);
  border-radius: 8px;
  background: rgba(14, 138, 114, 0.1);
  color: var(--brand-dark);
}

.new-order-editor-title-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.new-order-editor-header p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 13px;
}

.new-order-editor-actions {
  grid-column: 3;
  display: flex;
  flex-wrap: wrap;
  justify-self: end;
  justify-content: flex-end;
  gap: 8px;
}

.new-order-editor-actions .btn {
  min-height: 36px;
  padding: 7px 12px;
}

.new-order-editor-cards {
  display: grid;
  gap: 12px;
}

.new-order-editor-submit-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
}

.new-order-editor-card {
  padding: 14px;
  border: 1px solid rgba(14, 138, 114, 0.2);
  border-radius: 10px;
  background: #fff;
}

.new-order-editor-card-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--brand-dark);
}

.new-order-editor-card-header:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.new-order-editor-card-summary {
  display: none;
  flex: 1;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.new-order-editor-card-summary strong,
.new-order-editor-card-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-order-editor-card-summary strong {
  color: var(--ink);
}

.new-order-editor-card-title {
  flex: 1;
  color: var(--brand-dark);
}

.new-order-editor-card-summary span {
  color: var(--ink-soft);
  font-size: 13px;
}

.new-order-editor-toggle-hint {
  color: var(--brand-dark);
  font-size: 13px;
  white-space: nowrap;
}

.new-order-editor-card.is-collapsed .new-order-editor-card-header {
  margin-bottom: 0;
}

.new-order-editor-card.is-collapsed .new-order-editor-card-title {
  display: none;
}

.new-order-editor-card.is-collapsed .new-order-editor-card-summary {
  display: flex;
}

.new-order-editor-card.is-collapsed .new-order-editor-fields {
  display: none;
}

.new-order-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.new-order-editor-field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  min-height: 36px;
  padding: 0 0 0 10px;
  gap: 10px;
  border: 1px solid rgba(14, 138, 114, 0.13);
  border-radius: 6px;
  background: rgba(14, 138, 114, 0.035);
  color: var(--ink-soft);
  font-size: 14px;
}

.new-order-editor-field input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 8px;
  border: 0;
  border-left: 1px solid rgba(14, 138, 114, 0.14);
  border-radius: 0 5px 5px 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.new-order-editor-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.14);
}

.new-order-option-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  min-width: 0;
}

.new-order-option-search input {
  min-width: 0;
}

.new-order-option-search-btn {
  display: grid;
  place-items: center;
  height: 36px;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(14, 138, 114, 0.14);
  border-radius: 0 5px 5px 0;
  background: rgba(14, 138, 114, 0.09);
  color: var(--brand-dark);
  cursor: pointer;
}

.new-order-option-search-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.new-order-option-search-btn:hover:not(:disabled) {
  background: rgba(14, 138, 114, 0.18);
}

.new-order-option-search-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.new-order-option-results {
  position: absolute;
  z-index: 6;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid rgba(14, 138, 114, 0.28);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(21, 55, 49, 0.16);
}

.new-order-option-result {
  min-width: 0;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.new-order-option-result:hover {
  background: rgba(14, 138, 114, 0.1);
  color: var(--brand-dark);
}

.new-order-option-empty {
  padding: 7px 8px;
  color: var(--ink-soft);
  font-size: 13px;
}

.new-order-season-field {
  padding-block: 2px;
}

.new-order-season-options,
.new-order-size-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.new-order-season-options .new-order-season-option,
.new-order-size-options .new-order-size-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(14, 138, 114, 0.24);
  border-radius: 5px;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.new-order-season-option span,
.new-order-size-option span {
  width: 100%;
  text-align: center;
  line-height: 1;
}

.new-order-season-option:hover,
.new-order-size-option:hover {
  border-color: var(--brand);
}

.new-order-season-option input,
.new-order-size-option input {
  position: absolute;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.new-order-season-option:has(input:checked),
.new-order-size-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.new-order-number-control {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: 36px;
  border-left: 1px solid rgba(14, 138, 114, 0.14);
  border-radius: 0 5px 5px 0;
  background: #fff;
}

.new-order-number-control:focus-within {
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.14);
}

.new-order-number-control input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.new-order-number-control input:focus {
  box-shadow: none;
}

.new-order-number-control input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.new-order-number-control input[type="number"]::-webkit-inner-spin-button,
.new-order-number-control input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.new-order-number-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-left: 1px solid rgba(14, 138, 114, 0.12);
}

.new-order-number-step {
  width: 26px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(14, 138, 114, 0.24);
  border-radius: 4px;
  background: rgba(14, 138, 114, 0.05);
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.new-order-number-step:hover {
  border-color: var(--brand);
  background: rgba(14, 138, 114, 0.14);
}

.new-order-number-step:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.22);
}

.new-order-row-delete {
  border: 0;
  border-radius: 5px;
  padding: 5px 8px;
  background: rgba(207, 76, 76, 0.1);
  color: #a83232;
  cursor: pointer;
  font: inherit;
}

.new-order-row-delete:hover {
  background: rgba(207, 76, 76, 0.18);
}

.attr-form {
  margin-top: 16px;
}

.attr-rows {
  display: grid;
  gap: 10px;
}

.restock-current-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 16px;
}

.restock-current-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
  color: var(--brand-dark);
  cursor: default;
  font-weight: 700;
}

.restock-current-date-label {
  color: var(--brand-dark);
  font-family: "Microsoft YaHei", 微软雅黑, "PingFang SC", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  white-space: nowrap;
}

.restock-current-date-picker {
  position: relative;
  display: grid;
  grid-template-columns: 40px 190px 40px;
  width: 270px;
  min-width: 270px;
  flex: 0 0 270px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(14, 138, 114, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 250, 247, 0.9));
  box-shadow: 0 8px 22px rgba(10, 70, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  touch-action: pan-y;
}

.restock-current-date-picker:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.14), 0 10px 26px rgba(10, 70, 60, 0.1);
}

.restock-current-date-picker:hover {
  border-color: rgba(14, 138, 114, 0.45);
  box-shadow: 0 10px 26px rgba(10, 70, 60, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.restock-current-date-picker input {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font: inherit;
  font-weight: 400;
  text-align: center;
  pointer-events: none;
}

.restock-current-date-picker input:focus {
  outline: none;
}

.restock-current-date-picker input::-webkit-calendar-picker-indicator {
  opacity: 0;
}

.archive-month-input::-webkit-calendar-picker-indicator {
  opacity: 0;
}

.restock-current-date-display {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  justify-self: center;
  pointer-events: none;
  user-select: none;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.restock-current-date-calendar-trigger {
  grid-column: 2;
  grid-row: 1;
  z-index: 2;
  justify-self: stretch;
  width: 100%;
  height: 40px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.restock-current-date-calendar-trigger:hover {
  background: transparent;
}

.restock-current-date-calendar-trigger svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.restock-current-date-step {
  display: grid;
  grid-row: 1;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
}

.restock-current-date-step:first-child {
  grid-column: 1;
  border-right: 1px solid rgba(14, 138, 114, 0.16);
}

.restock-current-date-step:last-child {
  grid-column: 3;
  border-left: 1px solid rgba(14, 138, 114, 0.16);
}

.restock-current-date-step:hover:not(:disabled) {
  background: rgba(14, 138, 114, 0.1);
}

.restock-current-date-step:disabled {
  cursor: default;
  opacity: 0.38;
}

.restock-current-date-step.is-disabled {
  opacity: 0.38;
}

.restock-current-date-step svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.restock-current-qty-readonly {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 248, 247, 0.9);
  color: var(--ink);
  font-weight: 700;
}

.restock-current-fields input:disabled,
.restock-current-fields button:disabled {
  cursor: default;
  opacity: 0.62;
}

.btn.restock-current-supplier-refresh {
  position: relative;
  overflow: hidden;
  min-height: 34px;
  margin-left: 2px;
  padding: 6px 10px 6px 14px;
  gap: 8px;
  border-color: rgba(14, 138, 114, 0.34) !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #e9fbf6 0%, #d8f5ed 45%, #c7efe4 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(10, 70, 60, 0.12) !important;
  color: #08725f !important;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  user-select: none;
}

.btn.restock-current-supplier-refresh::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.48) 45%, transparent 70%);
  opacity: 0;
  transform: translateX(-100%);
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.btn.restock-current-supplier-refresh span {
  position: relative;
  z-index: 1;
}

.btn.restock-current-supplier-refresh .restock-refresh-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(14, 138, 114, 0.14);
  color: #08725f;
  font-size: 16px;
}

.restock-current-supplier-refresh:hover:not(:disabled) {
  border-color: var(--brand) !important;
  background: linear-gradient(135deg, var(--brand), #1ca687) !important;
  color: #fff !important;
  filter: none;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 24px rgba(10, 70, 60, 0.2) !important;
}

.restock-current-supplier-refresh:hover:not(:disabled)::before {
  opacity: 1;
  transform: translateX(100%);
}

.restock-current-supplier-refresh:hover:not(:disabled) .restock-refresh-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn.restock-current-supplier-refresh.is-click-settled:not(:disabled) {
  border-color: rgba(14, 138, 114, 0.34) !important;
  background: linear-gradient(135deg, #e9fbf6 0%, #d8f5ed 45%, #c7efe4 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(10, 70, 60, 0.12) !important;
  color: #08725f !important;
}

.btn.restock-current-supplier-refresh.is-click-settled:not(:disabled) .restock-refresh-icon {
  background: rgba(14, 138, 114, 0.14);
  color: #08725f;
}

.btn.restock-current-supplier-refresh:focus:not(:hover),
.btn.restock-current-supplier-refresh:focus-visible:not(:hover),
.btn.restock-current-supplier-refresh:active {
  outline: none;
  background: linear-gradient(135deg, #e9fbf6 0%, #d8f5ed 45%, #c7efe4 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(10, 70, 60, 0.12) !important;
  -webkit-tap-highlight-color: transparent;
}

.btn.restock-current-supplier-refresh:active:not(:disabled) {
  transform: translateY(0);
}

.restock-current-header h2,
.restock-current-header p {
  margin: 0;
}

.restock-current-header p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 14px;
}

.restock-current-supplier-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid rgba(14, 138, 114, 0.16);
  border-radius: 10px;
  background: rgba(14, 138, 114, 0.045);
}

.restock-current-style-search {
  order: -2;
}

.restock-current-supplier-filters::after {
  content: "";
  flex-basis: 100%;
  height: 0;
  order: -1;
}

.restock-current-supplier-filter {
  min-height: 32px;
  text-align: center;
  border: 1px solid rgba(14, 138, 114, 0.26);
  border-radius: 999px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.restock-current-supplier-filter:hover,
.restock-current-supplier-filter.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.restock-current-style-search {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.restock-current-style-search input {
  width: min(220px, 42vw);
  height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(14, 138, 114, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 6px 14px rgba(10, 70, 60, 0.06);
}

.restock-current-style-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.14), 0 8px 18px rgba(10, 70, 60, 0.08);
}

.restock-current-style-button {
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid rgba(14, 138, 114, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.restock-current-style-button:hover {
  border-color: var(--brand);
  background: rgba(14, 138, 114, 0.1);
}

.restock-current-style-button:first-of-type {
  border-color: rgba(14, 138, 114, 0.36);
  background: rgba(14, 138, 114, 0.1);
}

.restock-current-fields {
  max-height: 480px;
  overflow: auto;
  padding-right: 2px;
}

.restock-current-field > span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.restock-current-field.attr-product-field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 3px 8px 3px 10px;
}

.restock-current-qty-control {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  flex-wrap: nowrap;
}

.restock-current-sku-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.restock-current-sku-row .restock-current-field {
  flex: 1 1 auto;
}

.restock-current-qty-control .restock-qty-editor {
  min-width: 40px;
  flex: 1 1 40px;
  width: 40px;
  height: auto;
  border: 1px solid rgba(14, 138, 114, 0.25);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

.restock-current-qty-control .restock-adjust-btn {
  flex: 0 0 auto;
  min-width: 30px;
  padding: 8px 4px;
  white-space: nowrap;
}

.restock-current-qty-control .restock-adjust-btn.zero:last-child {
  min-width: 38px;
}

.restock-current-update-btn {
  position: static;
  transform: none;
  flex: 0 0 auto;
  min-width: 38px;
  padding: 8px 4px;
  font-size: 13px;
  line-height: normal;
}

.restock-current-update-btn[hidden] {
  display: inline-block !important;
  visibility: hidden;
  pointer-events: none;
}

.restock-current-field.restock-qty-attention {
  border-color: rgba(207, 76, 76, 0.54);
  background: rgba(207, 76, 76, 0.1);
  box-shadow: inset 4px 0 0 rgba(207, 76, 76, 0.7);
}

.restock-current-field.restock-qty-attention .restock-current-qty-control input {
  color: #a92c2c;
  border-color: #dd6868;
  background: #ffeded;
  box-shadow: 0 0 0 3px rgba(207, 76, 76, 0.13);
}

.restock-current-qty-control input.quantity-increased {
  color: #08735e;
  border-color: #18a97f;
  background: #e4f8ef;
  box-shadow: 0 0 0 3px rgba(24, 169, 127, 0.18);
  animation: restockQtyIncrease 0.42s ease-out;
}

.restock-current-qty-control input.quantity-decreased {
  color: #a92c2c;
  border-color: #dd6868;
  background: #ffeded;
  box-shadow: 0 0 0 3px rgba(207, 76, 76, 0.15);
  animation: restockQtyDecrease 0.42s ease-out;
}

.restock-current-qty-control input.quantity-reset {
  color: #4c5a6c;
  border-color: #8b98a8;
  background: #edf1f5;
  box-shadow: 0 0 0 3px rgba(122, 135, 152, 0.15);
  animation: restockQtyReset 0.42s ease-out;
}

.attr-rows.is-paginated-result {
  min-height: 1070px;
}

.attr-empty-hint {
  margin: 0;
  padding: 24px;
  border: 1px dashed rgba(14, 138, 114, 0.32);
  border-radius: 10px;
  color: var(--ink-soft);
  text-align: center;
}

.attr-product-row {
  --attr-product-media-height: 251px;
  display: grid;
  grid-template-columns: 180px minmax(310px, 390px) minmax(260px, 400px);
  justify-content: start;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(14, 138, 114, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.attr-product-row.selected-attr-product {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.14);
}

.attr-product-row:not(.selected-attr-product) {
  --attr-product-media-height: 180px;
  grid-template-columns: 180px minmax(310px, 390px);
}

.attr-product-row.is-all-attr-fields {
  --attr-product-media-height: 251px;
  grid-template-columns: 180px minmax(310px, 390px) minmax(260px, 400px);
  cursor: default;
}

.attr-product-row.selected-attr-product {
  --attr-product-media-height: 251px;
}

.attr-product-row.is-all-attr-fields .attr-product-fields {
  grid-column: 3;
  grid-row: 1;
}

.attr-product-row.selected-attr-product .attr-product-fields {
  grid-column: 3;
  grid-row: 1;
  cursor: default;
}

.attr-product-row.selected-attr-product .attr-actions {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  justify-content: center;
  margin-top: 0;
}

.attr-product-image-wrap {
  display: grid;
  height: var(--attr-product-media-height);
  min-height: var(--attr-product-media-height);
  place-items: center;
  border-radius: 8px;
  background: rgba(14, 138, 114, 0.06);
  overflow: hidden;
}

.attr-product-image {
  display: block;
  width: 100%;
  height: var(--attr-product-media-height);
  object-fit: cover;
  cursor: zoom-in;
}

.attr-product-image-empty {
  color: var(--ink-soft);
  font-size: 15px;
}

.attr-product-identifiers,
.attr-product-fields {
  display: grid;
}

.attr-product-identifiers {
  align-self: start;
  height: var(--attr-product-media-height);
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.restock-current-product-row .attr-product-identifiers {
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.attr-product-meta,
.attr-product-row label {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 100%;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.attr-product-fields {
  gap: 7px;
}

.attr-product-meta strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attr-product-fields label {
  min-height: 36px;
  padding: 0 0 0 10px;
  border: 1px solid rgba(14, 138, 114, 0.13);
  border-radius: 6px;
  background: rgba(14, 138, 114, 0.035);
}

.attr-product-fields .attr-product-field {
  position: relative;
}

.attr-field-update {
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%);
  width: 48px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--brand);
  border-radius: 5px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.attr-field-update:hover:not(:disabled) {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.attr-field-update:disabled {
  cursor: wait;
  opacity: 0.65;
}

.attr-season-field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 2px 0 2px 10px;
  border: 1px solid rgba(14, 138, 114, 0.13);
  border-radius: 6px;
  background: rgba(14, 138, 114, 0.035);
  color: var(--ink-soft);
  font-size: 13px;
}

.attr-season-field > span {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.attr-season-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.attr-season-options .attr-season-option {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid rgba(14, 138, 114, 0.24);
  border-radius: 5px;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  gap: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.attr-season-option span {
  width: 100%;
  text-align: center;
  line-height: 1;
}

.attr-season-option:hover {
  border-color: var(--brand);
}

.attr-season-option input {
  position: absolute;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.attr-season-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.attr-product-meta > span {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.attr-product-row input,
.attr-product-row select {
  width: 100%;
  height: 36px;
  padding: 6px 8px;
  border: 0;
  border-left: 1px solid rgba(14, 138, 114, 0.14);
  border-radius: 0 5px 5px 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

#restockEmptyHint {
  margin-top: 16px;
}

.attr-product-row input:focus,
.attr-product-row select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.14);
}

.attr-number-control {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: 36px;
  border-left: 1px solid rgba(14, 138, 114, 0.14);
  border-radius: 0 5px 5px 0;
  background: #fff;
}

.attr-number-control:focus-within {
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.14);
}

.attr-number-control input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.attr-number-control input:focus {
  box-shadow: none;
}

.attr-number-control input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.attr-number-control input[type="number"]::-webkit-inner-spin-button,
.attr-number-control input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

.attr-number-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-left: 1px solid rgba(14, 138, 114, 0.12);
}

.attr-number-step {
  width: 26px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(14, 138, 114, 0.24);
  border-radius: 4px;
  background: rgba(14, 138, 114, 0.05);
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.attr-number-step:hover {
  border-color: var(--brand);
  background: rgba(14, 138, 114, 0.14);
}

.attr-number-step:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(14, 138, 114, 0.22);
}

.attr-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.attr-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 142px;
}

.attr-submit-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

@media (max-width: 1120px) {
  .attr-product-row {
    grid-template-columns: 160px minmax(250px, 1fr) minmax(240px, 0.9fr);
  }

  .attr-product-row:not(.selected-attr-product) {
    grid-template-columns: 160px minmax(250px, 1fr);
  }

  .attr-product-row.is-all-attr-fields {
    grid-template-columns: 160px minmax(250px, 1fr) minmax(240px, 0.9fr);
  }

}

@media (max-width: 640px) {
  .restock-current-date-label {
    display: none;
  }

  .restock-current-field.attr-product-field {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .attr-product-row {
    --attr-product-media-height: 180px;
    --attr-product-mobile-image-width: clamp(120px, 34vw, 160px);
    grid-template-columns: clamp(100px, 34vw, 160px) minmax(0, 1fr);
    gap: 10px;
  }

  .attr-product-row:not(.selected-attr-product) {
    grid-template-columns: clamp(100px, 34vw, 160px) minmax(0, 1fr);
  }

  .attr-product-row.selected-attr-product,
  .attr-product-row.is-all-attr-fields {
    --attr-product-media-height: 180px;
  }

  .attr-product-image-wrap {
    width: var(--attr-product-mobile-image-width);
    height: var(--attr-product-media-height);
    min-height: var(--attr-product-media-height);
  }

  .attr-product-image {
    height: var(--attr-product-media-height);
  }

  .attr-product-identifiers {
    height: var(--attr-product-media-height);
  }

  .attr-product-meta {
    grid-template-columns: minmax(76px, 28%) minmax(0, 1fr);
    gap: 6px;
  }

  .attr-product-meta > span {
    font-size: clamp(11px, 3.4vw, 13px);
    white-space: nowrap;
  }

  .attr-product-meta strong {
    font-size: clamp(13px, 4.2vw, 16px);
    white-space: nowrap;
  }

  .attr-product-row.selected-attr-product .attr-product-fields,
  .attr-product-row.selected-attr-product .attr-actions {
    grid-column: 1 / -1;
  }

  .attr-product-row.selected-attr-product .attr-product-fields {
    grid-row: 2;
  }

  .attr-product-row.selected-attr-product .attr-actions {
    grid-row: 3;
  }

  .attr-product-row.selected-attr-product .attr-actions {
    justify-content: center;
    margin-top: 0;
  }

  .attr-product-fields label {
    grid-template-columns: 82px minmax(0, 1fr);
    min-height: 44px;
  }

  .attr-product-row input {
    min-width: 0;
    height: 42px;
    font-size: 16px;
  }

  .attr-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 12px;
  }

  .attr-actions .btn {
    width: auto;
    min-width: 0;
    height: 44px;
    padding-inline: 12px;
  }
}

.new-order-failure-panel {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(207, 76, 76, 0.32);
  border-radius: 12px;
  background: rgba(207, 76, 76, 0.06);
  text-align: center;
}

.new-order-failure-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.new-order-failure-header h3 {
  margin: 0;
  color: #a83232;
  font-size: 16px;
  flex: 1;
  text-align: center;
}

.new-order-failure-count {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(207, 76, 76, 0.14);
  color: #a83232;
  font-size: 13px;
  font-weight: 700;
}

.new-order-failure-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(207, 76, 76, 0.18);
  border-radius: 8px;
  background: #fff;
}

.new-order-failure-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.new-order-failure-table th,
.new-order-failure-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  text-align: center;
  white-space: nowrap;
}

.new-order-failure-table th {
  color: #8f3030;
  background: rgba(207, 76, 76, 0.08);
}

.new-order-failure-table tbody tr:last-child td {
  border-bottom: 0;
}

.restock-search-form {
  display: flex;
  justify-content: center;
}

.restock-search-label {
  padding-top: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.4;
  text-align: right;
}

.restock-search-inline {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto auto;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

#restockStyleKeyword,
#attrStyleKeyword {
  text-align: center;
}

.restock-search-inline .btn {
  min-width: 108px;
}

.btn.restock-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand), #1ca687);
  box-shadow: 0 6px 14px rgba(14, 138, 114, 0.24);
}

.btn.restock-search-btn::before {
  content: "⌕";
  font-size: 19px;
  font-weight: 400;
  line-height: 0.8;
}

.btn.restock-search-btn:hover {
  box-shadow: 0 9px 18px rgba(14, 138, 114, 0.32);
}

#restockClearBtn,
#attrClearBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #f4a340, #ea8f1e);
  color: #fff;
  border: 1px solid #cf7710;
}

.restock-clear-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.restock-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  margin-top: 10px;
  scrollbar-width: none;
}

.restock-table-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.restock-table-wrap.is-scrolling {
  scrollbar-color: rgba(14, 138, 114, 0.52) rgba(14, 138, 114, 0.1);
  scrollbar-width: thin;
}

.restock-table-wrap.is-scrolling::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.restock-table-wrap::-webkit-scrollbar-track {
  background: rgba(14, 138, 114, 0.1);
  border-radius: 999px;
}

.restock-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(14, 138, 114, 0.52);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.restock-table-wrap::-webkit-scrollbar-thumb:hover {
  background-color: var(--brand);
}

#restockStyleTableWrap.is-paginated-result {
  min-height: 368px;
}

.restock-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}

.restock-table th,
.restock-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

.restock-table thead th {
  background: rgba(14, 138, 114, 0.08);
  color: var(--brand-dark);
  font-weight: 700;
}

.restock-table tbody tr:last-child td {
  border-bottom: none;
}

.restock-table tbody tr.selectable-row {
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.restock-table tbody tr.selectable-row:hover td {
  background: rgba(14, 138, 114, 0.1);
}

.restock-table tbody tr.selected-row td {
  background: rgba(14, 138, 114, 0.2);
  box-shadow: inset 0 1px 0 rgba(14, 138, 114, 0.35), inset 0 -1px 0 rgba(14, 138, 114, 0.35);
  font-weight: 600;
}

.restock-table tbody tr.selected-row td:first-child {
  border-left: 4px solid #0e8a72;
}

.result-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px auto 0;
  padding: 8px 10px;
  border: 1px solid rgba(14, 138, 114, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(21, 55, 49, 0.08);
  width: fit-content;
}

.result-pagination.hidden {
  display: none;
}

.result-pagination-info {
  min-width: 142px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.result-pagination-btn {
  min-width: 76px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(14, 138, 114, 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.result-pagination-btn:hover:not(:disabled) {
  border-color: var(--brand);
  background: rgba(14, 138, 114, 0.1);
}

.result-pagination-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.restock-detail-table tbody tr.restock-qty-attention td {
  background: rgba(207, 76, 76, 0.12);
}

.restock-detail-table tbody tr.restock-qty-attention td:first-child {
  border-left: 4px solid rgba(207, 76, 76, 0.7);
}

.restock-table-title {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--brand-dark);
}

.restock-detail-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.restock-detail-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
}

.restock-detail-block {
  margin-top: 18px;
}

@media (min-width: 1024px) {
  #page-restock.active {
    display: grid;
    justify-items: center;
  }

  #page-restock > * {
    width: 100%;
  }

  #page-restock .restock-search-form,
  #page-restock .restock-detail-header,
  #page-restock .restock-generate-wrap,
  #page-restock .result-pagination {
    justify-self: center;
  }

  #page-restock .restock-table-wrap {
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  #page-restock .restock-table {
    width: auto;
  }

  #page-restock .restock-detail-table {
    min-width: 0;
  }
}

.restock-generate-wrap {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn.restock-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand), #1ca687);
  color: #fff;
  box-shadow: 0 6px 14px rgba(14, 138, 114, 0.24);
}

.btn.restock-add-color-size-btn {
  justify-content: center;
}

.restock-add-color-size-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn.restock-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 6px 14px rgba(14, 138, 114, 0.24);
}

.restock-submit-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn.restock-refresh-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn.restock-refresh-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.restock-refresh-icon {
  display: inline-block;
  font-size: 19px;
  line-height: 1;
}

.restock-refresh-btn.is-loading .restock-refresh-icon {
  animation: restock-refresh-spin 0.75s linear infinite;
}

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

.restock-detail-table .detail-col-id {
  width: 96px;
}

.restock-detail-table .detail-col-name {
  min-width: 150px;
}

.restock-detail-table .detail-col-color,
.restock-detail-table .detail-col-size {
  width: 92px;
}

.restock-detail-table .detail-col-qty {
  width: 320px;
  text-align: center !important;
}

.restock-detail-table td.qty-cell {
  text-align: center;
}

.restock-qty-editor {
  width: 64px;
  padding: 7px 6px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
  font-weight: 700;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.restock-qty-editor::-webkit-outer-spin-button,
.restock-qty-editor::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.restock-qty-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.restock-qty-header {
  text-align: center !important;
}

.restock-adjust-btn {
  min-width: 34px;
  padding: 8px 6px;
  color: #fff;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
}

.restock-adjust-btn:hover {
  filter: brightness(1.06);
}

.restock-adjust-btn.increment {
  background: linear-gradient(135deg, #0e8a72, #1ca687);
}

.restock-adjust-btn.decrement {
  background: linear-gradient(135deg, #cf4c4c, #b73333);
}

.restock-adjust-btn.zero {
  background: linear-gradient(135deg, #7a8798, #5f6c7d);
}

.restock-qty-editor.shake {
  animation: restockQtyShake 0.28s ease-in-out;
}

.restock-qty-editor.quantity-increased {
  color: #08735e;
  border-color: #18a97f;
  background: #e4f8ef;
  box-shadow: 0 0 0 4px rgba(24, 169, 127, 0.18);
  animation: restockQtyIncrease 0.42s ease-out;
}

.restock-qty-editor.quantity-decreased {
  color: #a92c2c;
  border-color: #dd6868;
  background: #ffeded;
  box-shadow: 0 0 0 4px rgba(207, 76, 76, 0.15);
  animation: restockQtyDecrease 0.42s ease-out;
}

.restock-qty-editor.quantity-reset {
  color: #4c5a6c;
  border-color: #8b98a8;
  background: #edf1f5;
  box-shadow: 0 0 0 4px rgba(122, 135, 152, 0.15);
  animation: restockQtyReset 0.42s ease-out;
}

@keyframes restockQtyShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
  100% { transform: translateX(0); }
}

@keyframes restockQtyIncrease {
  0% { transform: scale(1); }
  45% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes restockQtyDecrease {
  0% { transform: scale(1); }
  45% { transform: scale(0.86); }
  100% { transform: scale(1); }
}

@keyframes restockQtyReset {
  0% { transform: rotate(0deg) scale(1); }
  45% { transform: rotate(-4deg) scale(1.12); }
  100% { transform: rotate(0deg) scale(1); }
}

.restock-style-image {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.restock-style-image-clickable {
  cursor: zoom-in;
}

.restock-no-image {
  color: var(--ink-soft);
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 20px;
}

.image-preview-frame {
  position: relative;
  display: inline-flex;
  max-width: min(92vw, 1200px);
  max-height: 86vh;
}

.image-preview-target {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  background: #fff;
}

.image-preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(209, 159, 63, 0.5);
  border-radius: 999px;
  cursor: pointer;
  color: var(--brand-dark);
  background: rgba(255, 253, 246, 0.94);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.image-preview-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.image-preview-close:hover {
  color: #fff;
  background: var(--brand-dark);
  transform: scale(1.06);
}

.image-preview-close:focus-visible {
  outline: 3px solid rgba(255, 232, 169, 0.84);
  outline-offset: 2px;
}

.restock-color-size-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
}

.restock-color-size-dialog {
  width: min(100%, 480px);
  border-radius: 14px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.restock-color-size-dialog-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.restock-color-size-heading {
  width: 100%;
  text-align: center;
}

.restock-color-size-dialog h3 {
  margin: 0;
  color: var(--brand-dark);
}

.restock-color-size-product {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.restock-color-size-product strong {
  color: var(--ink);
}

.restock-color-size-close {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.restock-color-size-form {
  display: grid;
  gap: 18px;
}

.restock-color-size-form fieldset {
  display: grid;
  gap: 8px;
}

.restock-new-color-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
}

.restock-new-color-field input {
  min-width: 0;
}

.restock-color-size-form fieldset {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.restock-size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.restock-size-options label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 62px;
  min-height: 52px;
  padding: 7px 12px;
  border: 1px solid rgba(14, 138, 114, 0.24);
  border-radius: 10px;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.restock-size-options label span {
  width: 100%;
  text-align: center;
}

.restock-size-options label:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.restock-size-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.restock-size-options label:has(input:checked) {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand), #1ca687);
  color: #fff;
  box-shadow: 0 6px 14px rgba(14, 138, 114, 0.24);
}

.restock-size-options small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
}

.restock-color-size-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  width: fit-content;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  z-index: 1300;
  pointer-events: none;
}

.toast-item {
  width: fit-content;
  max-width: calc(100vw - 32px);
  padding: 14px 24px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0e8a72, #1ca687);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 30px rgba(14, 138, 114, 0.35);
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-item.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-item.error {
  background: linear-gradient(135deg, #cf4c4c, #b73333);
  box-shadow: 0 12px 30px rgba(175, 46, 46, 0.35);
}

.btn {
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #1ca687);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn.ghost {
  background: #fff;
  color: var(--brand-dark);
  border: 1px solid rgba(14, 138, 114, 0.4);
}

.hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 10px 0 0;
}

.login-panel .hint {
  text-align: center;
  min-height: 22px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-wrap: balance;
  transition: color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.login-panel .hint:not(:empty) {
  transform: translateY(1px);
}

.login-panel .hint.is-error {
  color: #b4232f !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.login-panel .hint.is-success {
  color: #08745f !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

pre {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  min-height: 110px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.6);
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.6s ease forwards;
}

.reveal:nth-child(2) { animation-delay: 0.06s; }
.reveal:nth-child(3) { animation-delay: 0.12s; }
.reveal:nth-child(4) { animation-delay: 0.18s; }
.reveal:nth-child(5) { animation-delay: 0.24s; }
.reveal:nth-child(6) { animation-delay: 0.30s; }
.reveal:nth-child(7) { animation-delay: 0.36s; }
.reveal:nth-child(8) { animation-delay: 0.42s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes driftA {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-18px) scale(1.08); }
}

@keyframes driftB {
  from { transform: translateY(0) scale(1.02); }
  to { transform: translateY(16px) scale(0.95); }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .hero-eyebrow,
  .hero-brand,
  .hero-meta,
  .hero-user {
    grid-column: auto;
  }

  .hero-brand {
    justify-self: center;
    align-items: center;
  }

  .hero-user {
    justify-self: end;
    width: 100%;
    align-items: flex-end;
    padding-top: 0;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .panel {
    padding: 14px;
    border-radius: 14px;
  }

  .actions {
    width: 100%;
  }

  .actions .btn {
    width: 100%;
  }

  .restock-search-inline {
    grid-template-columns: minmax(0, 1fr) clamp(92px, 28vw, 108px) auto;
  }

  .restock-search-form {
    grid-template-columns: 1fr;
    gap: 8px;
    justify-content: stretch;
  }

  #restockStyleKeyword,
  #attrStyleKeyword {
    min-width: 0;
  }

  .restock-detail-title {
    font-size: 20px;
  }

  /* 手机端隐藏冗余列，颜色、尺码及数量控件按自然表格布局展示。 */
  .restock-detail-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .restock-detail-table .detail-col-id,
  .restock-detail-table .detail-col-name {
    display: none;
  }

  .restock-detail-table .detail-col-color,
  .restock-detail-table .detail-col-size {
    width: 72px;
    text-align: center;
  }

  /* 数量控件紧随颜色、尺码列。 */
  .restock-detail-table .detail-col-qty {
    width: auto;
  }

  .restock-detail-table thead .detail-col-qty {
    background: #e8f5f1;
  }

  .restock-detail-table .restock-qty-control {
    gap: 3px;
    justify-content: center;
  }

  .restock-detail-table .restock-qty-editor {
    width: 52px;
    padding-inline: 2px;
  }

  .restock-detail-table .restock-adjust-btn {
    min-width: 30px;
    padding-inline: 2px;
  }

  .restock-detail-table th,
  .restock-detail-table td {
    padding-inline: 6px;
  }

  .restock-detail-table thead .detail-col-color,
  .restock-detail-table thead .detail-col-size {
    background: #e8f5f1;
  }

  .restock-search-inline .btn {
    width: auto;
  }

  .restock-search-inline .restock-search-btn {
    min-width: 0;
    padding-inline: clamp(8px, 2.5vw, 14px);
  }

  #restockClearBtn,
  #attrClearBtn {
    min-width: 0;
    padding-inline: clamp(12px, 4vw, 20px);
  }

  .hero {
    margin-bottom: 14px;
  }

  .hero-brand .health,
  .welcome-text {
    display: none;
  }

  .hero-user {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    padding: 0;
  }

  .page-nav {
    justify-content: flex-start;
    margin-bottom: 12px;
    gap: 10px;
    padding: 3px 12px 10px;
    scroll-padding-inline: 12px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }

  .page-tab {
    flex: 0 0 auto;
    min-height: 42px;
    border-radius: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transition: color 0.16s ease;
  }

  .page-tab.active {
    box-shadow: none;
  }

  .user-actions {
    width: auto;
    justify-content: flex-end;
  }

  .logout-icon {
    display: block;
  }

  .new-order-header,
  .new-order-form,
  .new-order-editor-layout {
    grid-template-columns: 1fr;
  }

  .new-order-header {
    display: grid;
  }

  .new-order-template-btn,
  .new-order-submit-btn {
    width: 100%;
    justify-content: center;
  }

  .new-order-editor-header {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .new-order-editor-title {
    justify-self: center;
  }

  .new-order-editor-actions {
    width: 100%;
    justify-content: center;
  }

  .new-order-editor-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .login-view {
    padding: 16px 12px calc(6px + env(safe-area-inset-bottom));
    gap: 10px;
  }

  .login-panel {
    width: 100%;
    padding: 22px 16px;
  }

  .login-head h1 {
    font-size: clamp(26px, 8vw, 34px);
  }

  .assistant-page-header,
  .assistant-chat-form {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .assistant-status {
    width: fit-content;
  }

  .login-footer {
    width: calc(100% - 24px);
    display: flex;
    justify-content: center;
    padding: 6px 8px;
  }

  .beian-link {
    font-size: 11px;
    text-align: center;
    line-height: 1.3;
  }

  .welcome-text {
    font-size: 13px;
    padding: 6px 10px;
    max-width: 100%;
  }

  .user-actions {
    justify-content: flex-end;
    gap: 8px;
  }

  .page-tab {
    padding: 7px 10px;
    font-size: 13px;
  }

  .new-order-upload-field {
    flex-wrap: wrap;
  }

  .new-order-editor-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 8px;
  }

  .new-order-editor-actions .btn,
  .new-order-editor-submit-btn {
    width: 100%;
  }

  .new-order-editor-cards {
    justify-items: center;
  }

  .new-order-editor-card {
    width: min(100%, 480px);
    padding: 12px 10px;
  }

  .new-order-editor-field {
    grid-template-columns: minmax(86px, 42%) minmax(0, 1fr);
    gap: 8px;
    font-size: 13px;
  }

  .new-order-editor-submit-wrap {
    width: 100%;
  }

  .restock-search-form {
    justify-content: center;
  }

  .restock-search-inline {
    width: min(100%, 390px);
    margin-inline: auto;
  }

  .restock-generate-wrap {
    gap: 8px;
  }

  .restock-generate-wrap .btn {
    min-width: 44px;
    min-height: 42px;
    padding: 10px;
    gap: 0;
    justify-content: center;
  }

  .restock-generate-wrap .restock-refresh-icon,
  .restock-generate-wrap .restock-add-color-size-icon,
  .restock-generate-wrap .restock-submit-icon {
    width: 20px;
    height: 20px;
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  .responsive-action-row.actions,
  .responsive-action-row.new-order-editor-actions,
  .responsive-action-row.restock-generate-wrap,
  .responsive-action-row.attr-actions,
  .responsive-action-row.restock-color-size-actions {
    flex-wrap: nowrap;
    justify-content: center;
  }

  .responsive-action-row.is-icon-only .operation-button-label {
    display: none;
  }

  .responsive-action-row.is-icon-only .operation-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    gap: 0;
  }
}

@media (max-width: 440px) {
  /* 窄屏时保留操作图标，避免按钮文字挤压输入框。 */
  .restock-search-inline {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    gap: 6px;
  }

  .restock-search-inline .restock-search-btn,
  .restock-search-inline #restockClearBtn,
  .restock-search-inline #attrClearBtn {
    width: 42px;
    min-width: 42px;
    padding-inline: 0;
    gap: 0;
  }

  .restock-search-btn span,
  #restockClearBtn span,
  #attrClearBtn span {
    display: none;
  }
}
