/* ---- Auth pages ---- */
.auth-page {
  min-height: 100vh;
  background: var(--canvas);
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 36px 32px;
  border-radius: var(--radius);
}

.auth-segment {
  display: flex;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 28px;
}

.auth-segment__btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink-tertiary);
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
}

.auth-segment__btn.active {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  box-shadow: none;
  border-bottom-color: var(--ink);
}

.auth-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.auth-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.auth-header__logo img {
  height: 40px;
  width: auto;
  max-width: min(180px, 50vw);
  object-fit: contain;
}

.auth-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-main {
  display: flex;
  justify-content: center;
  padding: 48px 20px 80px;
}

.auth-card__logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: 180px;
  margin: 0 auto 28px;
  object-fit: contain;
}

.auth-intro {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.auth-intro__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #103A2C, #156348);
  color: #e8c96a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 550;
  flex-shrink: 0;
}

.auth-intro__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 550;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.auth-intro__desc {
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.phone-input {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.phone-input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.phone-input__dial {
  position: relative;
  flex: 0 0 auto;
  min-width: 96px;
  max-width: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px 0 10px;
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 8%);
  border-right: 1px solid var(--border);
  box-sizing: border-box;
}

.phone-input__dial::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink-secondary);
  transform: translateY(-40%);
  pointer-events: none;
}

.phone-input__dial-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  pointer-events: none;
  user-select: none;
}

.phone-input__country {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0.01;
  border: none !important;
  background: transparent !important;
  color: transparent;
  font-size: 16px; /* tránh iOS zoom khi mở picker */
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  z-index: 2;
}

.phone-input__number {
  flex: 1 1 auto;
  min-width: 0;
  width: 100% !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: 48px;
  padding: 14px 12px !important;
  font-size: 16px !important; /* tránh iOS zoom khi focus */
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
}

.phone-input__country:focus,
.phone-input__number:focus {
  outline: none;
}

@media (max-width: 480px) {
  .phone-input {
    min-height: 52px;
  }

  .phone-input__dial {
    min-width: 88px;
    max-width: 104px;
    padding: 0 26px 0 8px;
  }

  .phone-input__dial-label {
    font-size: 0.9rem;
  }

  .phone-input__number {
    min-height: 52px;
    padding: 14px 10px !important;
  }
}

.auth-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.auth-field input::placeholder {
  color: var(--ink-tertiary);
}

.auth-field--password {
  position: relative;
}

.auth-field--password input {
  padding-right: 48px;
}

.auth-toggle-pw {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: none;
  background: none;
  color: var(--ink-tertiary);
  cursor: pointer;
  padding: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.auth-hint {
  font-size: 0.75rem;
  color: var(--ink-tertiary);
  margin-top: -8px;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #064e2e, var(--brand), var(--brand-light));
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 24px var(--green-glow);
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px var(--green-glow);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--ink-secondary);
}

.auth-switch a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-error {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--sale);
  font-size: 0.875rem;
  display: none;
}

.auth-error.visible {
  display: block;
}

.auth-success {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--brand-muted);
  border: 1px solid rgba(18, 183, 106, 0.25);
  color: var(--brand);
  font-size: 0.875rem;
  display: none;
}

.auth-success.visible {
  display: block;
}

.auth-link-btn {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  text-align: center;
}

.auth-link-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#recaptcha-container {
  min-height: 1px;
}

.auth-recaptcha {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  min-height: 78px;
}

.auth-recaptcha iframe {
  max-width: 100%;
}

/* Account page */
.account-hero {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, #041510 0%, #103A2C 55%, #156348 100%);
  color: #fff;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.account-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 201, 106, 0.18), transparent 70%);
  pointer-events: none;
}

.account-hero__avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(232, 201, 106, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 550;
  margin-bottom: 16px;
  color: #e8c96a;
}

.account-hero__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 550;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.account-hero__phone {
  opacity: 0.85;
  font-weight: 500;
  font-size: 0.9375rem;
}

.account-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-menu__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.account-menu__item:hover {
  border-color: color-mix(in srgb, var(--gold) 40%, var(--border));
  box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--brand-muted) 45%, var(--surface));
}

.account-menu__text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 550;
  letter-spacing: -0.01em;
}

.account-menu__text span {
  font-size: 0.8125rem;
  color: var(--ink-secondary);
}

.auth-logout {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: var(--radius);
  background: transparent;
  color: var(--sale);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.auth-logout:hover {
  background: rgba(220, 38, 38, 0.08);
}

@media (max-width: 480px) {
  .auth-main {
    padding: 16px 12px max(40px, env(safe-area-inset-bottom));
  }

  .auth-card {
    width: 100%;
    padding: 22px 14px;
    border-radius: 14px;
  }

  .auth-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .auth-header__logo img {
    height: 40px;
  }

  .auth-card__logo {
    height: 40px;
    margin-bottom: 20px;
  }

  .auth-intro {
    padding: 14px;
    gap: 10px;
  }

  .auth-intro__title {
    font-size: 1.05rem;
  }

  .auth-intro__desc {
    font-size: 0.78rem;
  }

  .auth-field input,
  .auth-field select,
  .auth-field textarea,
  .auth-submit {
    font-size: 16px; /* tránh zoom iOS */
  }

  .auth-submit {
    min-height: 48px;
  }

  .auth-segment__btn {
    font-size: 0.65rem;
    padding: 10px 6px;
  }
}

/* Checkout */
.checkout-main { align-items: flex-start; }
.checkout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  width: min(1040px, 100%);
}
.checkout-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 550;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.checkout-subtitle {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 550;
  margin: 24px 0 14px;
  letter-spacing: -0.01em;
  color: var(--brand);
}
.checkout-summary { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.checkout-shop-group { margin-bottom: 8px; }
.checkout-shop-group__title {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.order-detail-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.order-detail-pay-status,
.order-status-pair {
  font-size: 0.8rem;
  color: var(--ink-secondary);
}
.order-status-pair { margin: 0 0 6px; }
.checkout-line { display: flex; justify-content: space-between; gap: 12px; font-size: 0.875rem; }
.checkout-line--total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
}
.checkout-hint { font-size: 0.75rem; color: var(--ink-tertiary); margin-top: 12px; }
.checkout-policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 12px 0 8px;
  font-size: 0.8125rem;
}
.checkout-policy-links a { color: var(--brand); font-weight: 650; }
.checkout-policy-links--aside { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.checkout-consent { margin-top: 8px; align-items: flex-start; }
.checkout-consent span { font-size: 0.8125rem; line-height: 1.45; }
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.payment-option:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent);
}
.payment-option input { margin-top: 3px; accent-color: var(--brand); }
.payment-option span { display: flex; flex-direction: column; gap: 2px; font-size: 0.875rem; }
.payment-option strong { font-weight: 700; }
.payment-option small { color: var(--ink-tertiary); font-size: 0.75rem; }
.payment-option--soon span { color: var(--ink-tertiary); font-size: 0.75rem; }
.bank-transfer-preview { margin: 16px 0 8px; }
.bank-transfer-box {
  padding: 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-muted) 55%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border-light));
  text-align: left;
}
.bank-transfer-box__title { font-weight: 800; font-size: 0.875rem; margin-bottom: 12px; color: var(--brand); }
.bank-transfer-box__list { margin: 0; }
.bank-transfer-box__list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.8125rem;
}
.bank-transfer-box__list > div:last-child { border-bottom: none; }
.bank-transfer-box__list dt { color: var(--ink-secondary); margin: 0; }
.bank-transfer-box__list dd { margin: 0; text-align: right; font-weight: 600; }
.bank-transfer-box__amount { color: var(--brand); font-size: 1rem; }
.bank-transfer-box__code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.75rem;
}
.bank-transfer-box__hint { margin: 12px 0 0; font-size: 0.75rem; color: var(--ink-tertiary); line-height: 1.5; }
.bank-transfer-box__qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 0 12px; }
.bank-transfer-box__qr img { width: 200px; height: 200px; object-fit: contain; background: #fff; border-radius: 8px; }
.bank-transfer-box__qr-hint { margin: 0; font-size: 0.75rem; color: var(--ink-secondary); text-align: center; max-width: 240px; }
.bank-transfer-box__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bank-copy-btn--secondary { opacity: 0.9; }
.bank-copy-btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--brand);
  background: var(--surface);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
}
.bank-copy-btn:hover { background: var(--brand-muted); }
.auth-success { padding: 12px; background: var(--brand-muted); border-radius: var(--radius); color: var(--brand); font-size: 0.875rem; margin-bottom: 16px; }

/* Orders */
.orders-section { margin-top: 28px; }
.orders-list { display: flex; flex-direction: column; gap: 12px; }
.orders-empty { text-align: center; color: var(--ink-secondary); padding: 24px 0; }
.order-card {
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.order-card__head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.order-card__status {
  font-size: 0.6875rem; font-weight: 700; color: var(--brand);
  background: var(--brand-muted); padding: 4px 8px; border-radius: 100px;
}
.order-card__date { font-size: 0.75rem; color: var(--ink-tertiary); margin-bottom: 8px; }
.order-card__items { font-size: 0.8125rem; color: var(--ink-secondary); line-height: 1.45; }
.order-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  font-size: 0.75rem;
  color: var(--ink-secondary);
}
.order-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 100px;
  background: var(--gray-100);
  color: var(--ink-secondary);
}
.order-badge--awaiting { background: #fef3c7; color: #92400e; }
.order-badge--paid { background: #dcfce7; color: #166534; }
.order-card .bank-transfer-box { margin-top: 8px; }
.orders-extra { font-size: 0.75rem; color: var(--ink-tertiary); }

/* Success */
.success-card { text-align: center; padding: 40px 28px; }
.success-icon {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%;
  background: linear-gradient(145deg, #103A2C, #156348);
  color: #e8c96a;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 600;
  box-shadow: 0 12px 28px rgba(12, 69, 52, 0.22);
}
.success-card h1 {
  font-family: var(--font-display);
  font-weight: 550;
  letter-spacing: -0.02em;
  font-size: 1.75rem;
}
.success-desc { color: var(--ink-secondary); margin: 16px 0 24px; }
.success-order-meta {
  display: grid;
  gap: 10px;
  text-align: left;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--canvas);
}
.success-order-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
}
.success-order-meta span { color: var(--ink-secondary); }
.success-order-total { color: var(--brand) !important; font-size: 1.0625rem !important; }
.success-order-items { text-align: left; margin-bottom: 16px; }
.success-cod-note {
  font-size: 0.8125rem;
  color: var(--ink-secondary);
  background: var(--brand-muted);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 20px;
  line-height: 1.55;
}
.success-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.success-save-addr {
  text-align: left;
  margin: 0 0 20px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--canvas);
}
.success-save-addr p {
  margin: 0 0 10px;
  font-size: 0.875rem;
  color: var(--ink-secondary);
}
.order-review {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}
.order-review select,
.order-review textarea {
  width: 100%;
  margin: 6px 0;
}
.product-reviews {
  margin: 28px 0 8px;
}
.product-reviews h2 { font-size: 1.15rem; margin-bottom: 12px; }
.product-review-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.order-card__foot { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.order-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.order-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.order-support-btn {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand);
}
.order-card__seller--unknown {
  color: var(--ink-secondary, #5c6b66);
}
.order-card--link:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--brand) 12%, transparent);
}
.order-card__cta {
  display: block;
  margin-top: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--brand);
}

.auth-main--wide { max-width: 720px; }
.order-detail-card { text-align: left; padding: 28px 24px; }
.order-detail-back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.order-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.order-detail-eyebrow { margin: 0; font-size: 0.75rem; color: var(--ink-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.order-detail-id { margin: 4px 0; font-size: 1.375rem; letter-spacing: -0.02em; }
.order-detail-date { margin: 0; font-size: 0.8125rem; color: var(--ink-secondary); }
.order-detail-status {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-muted);
  padding: 6px 10px;
  border-radius: 100px;
}
.order-detail-live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 0.75rem;
  color: var(--ink-secondary);
}
.order-detail-live__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse-live 1.5s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.order-detail-section { margin-bottom: 24px; }
.order-detail-section h2 { margin: 0 0 12px; font-size: 1rem; }
.order-detail-dl { margin: 0; display: grid; gap: 10px; font-size: 0.875rem; }
.order-detail-dl > div { display: flex; gap: 12px; }
.order-detail-dl dt { width: 100px; flex-shrink: 0; color: var(--ink-secondary); margin: 0; }
.order-detail-dl dd { margin: 0; font-weight: 600; }
.order-detail-back-btn { margin-top: 16px; }
.track-login-hint { margin-top: 20px; font-size: 0.8125rem; color: var(--ink-secondary); text-align: center; }
.track-login-hint a { color: var(--brand); font-weight: 700; }

.tracking-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tracking-step {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.tracking-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}
.tracking-step--done:not(:last-child)::before { background: var(--brand); }
.tracking-step__dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}
.tracking-step--done .tracking-step__dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.tracking-step--active .tracking-step__dot {
  border-color: var(--brand);
  background: var(--brand-muted);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent);
}
.tracking-step--cancelled .tracking-step__dot { border-color: var(--sale); background: var(--sale); }
.tracking-step--error .tracking-step__body strong { color: var(--sale); }
.tracking-step__body { display: flex; flex-direction: column; gap: 2px; font-size: 0.875rem; }
.tracking-step__body span { font-size: 0.75rem; color: var(--ink-secondary); }
.tracking-step--pending .tracking-step__body strong { color: var(--ink-tertiary); }

.jnt-shipment-box {
  margin: 12px 0;
  padding: 14px;
  border-radius: 12px;
  background: color-mix(in srgb, #ff6b00 8%, var(--surface));
  border: 1px solid color-mix(in srgb, #ff6b00 25%, var(--border-light));
  text-align: left;
}
.jnt-shipment-box__head { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 0.8125rem; margin-bottom: 8px; }
.jnt-shipment-box__status { color: #ea580c; font-size: 0.75rem; }
.jnt-shipment-box__code { font-size: 0.8125rem; margin: 0; }
.jnt-shipment-box__pending, .jnt-shipment-box__error { font-size: 0.8125rem; margin: 0; color: var(--ink-secondary); }
.jnt-shipment-box__error { color: var(--sale); }
.jnt-track-link { display: inline-block; margin-top: 8px; font-size: 0.8125rem; font-weight: 700; color: var(--brand); }
.jnt-mock-badge { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: #fef3c7; color: #92400e; font-size: 0.625rem; font-weight: 800; }
.success-jnt-info { margin-bottom: 16px; text-align: left; }

/* Admin */
.admin-main { padding: 32px 0 80px; }
.admin-badge { font-size: 0.75rem; font-weight: 700; color: var(--brand); background: var(--brand-muted); padding: 6px 12px; border-radius: 100px; }
.admin-badge--warn { color: #9a3412; background: #ffedd5; }
.admin-badge--muted { color: var(--ink-tertiary); background: var(--canvas); }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.admin-tab {
  padding: 10px 18px; border: 1px solid var(--border); border-radius: 100px;
  background: var(--surface); font-weight: 600; cursor: pointer;
}
.admin-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.admin-panel { margin-bottom: 24px; }
.admin-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.admin-panel-head--products { align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--border-light); margin-bottom: 20px; }
.admin-panel-head h2 { margin: 0; font-size: 1.25rem; }
.admin-panel-desc { margin: 4px 0 0; font-size: 0.8125rem; color: var(--ink-secondary); }
.admin-field-hint { display: block; margin-top: 4px; font-size: 0.75rem; color: var(--ink-secondary); line-height: 1.35; }
.admin-subtitle { font-size: 1rem; font-weight: 700; margin: 0 0 12px; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table-wrap--orders {
  margin: 0 -4px;
  padding: 0 4px 4px;
  -webkit-overflow-scrolling: touch;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.admin-table th, .admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: top; }
.admin-btn, .admin-select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 0.75rem; cursor: pointer; background: var(--surface); }
.admin-btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.admin-btn--import { display: inline-flex; align-items: center; font-weight: 600; }
.admin-btn--lg { padding: 10px 16px; font-size: 0.875rem; border-radius: 10px; }
.admin-excel-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-excel-status {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.admin-excel-status--success { background: #dcfce7; color: #166534; }
.admin-excel-status--error { background: #fee2e2; color: #991b1b; }
.admin-excel-status--info { background: var(--brand-muted); color: var(--brand); }

.admin-order-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.admin-stat {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-stat__value { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.admin-stat__label { font-size: 0.6875rem; color: var(--ink-secondary); font-weight: 600; }
.admin-stat--warn { border-color: #fde68a; background: #fffbeb; }
.admin-stat--warn .admin-stat__value { color: #b45309; }
.admin-stat--await { border-color: #fde68a; background: #fffbeb; }
.admin-stat--ship { border-color: #bfdbfe; background: #eff6ff; }
.admin-stat--ship .admin-stat__value { color: #1d4ed8; }
.admin-stat--ok { border-color: #bbf7d0; background: #f0fdf4; }
.admin-stat--ok .admin-stat__value { color: #15803d; }

.admin-order-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.admin-filter-input {
  flex: 1 1 200px;
  min-width: 180px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8125rem;
}
.admin-filter-select { min-width: 140px; }
.admin-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--ink-secondary);
  white-space: nowrap;
}
.admin-table--orders {
  min-width: 1320px;
  table-layout: auto;
}
.admin-table--orders th:nth-child(1),
.admin-table--orders td:nth-child(1) { min-width: 118px; }
.admin-table--orders th:nth-child(2),
.admin-table--orders td:nth-child(2) { min-width: 148px; }
.admin-table--orders th:nth-child(3),
.admin-table--orders td:nth-child(3) { min-width: 108px; }
.admin-table--orders th:nth-child(4),
.admin-table--orders td:nth-child(4) { min-width: 168px; }
.admin-table--orders th:nth-child(5),
.admin-table--orders td:nth-child(5) { min-width: 96px; white-space: nowrap; }
.admin-table--orders th:nth-child(6),
.admin-table--orders td:nth-child(6) { min-width: 156px; }
.admin-table--orders th:nth-child(7),
.admin-table--orders td:nth-child(7) { min-width: 148px; }
.admin-table--orders th:nth-child(8),
.admin-table--orders td:nth-child(8) { min-width: 76px; }
.admin-table--orders th:nth-child(9),
.admin-table--orders td:nth-child(9) { min-width: 300px; }
.admin-actions-cell { display: flex; flex-wrap: wrap; gap: 4px; min-width: 300px; }
.admin-actions-cell .admin-btn { text-decoration: none; display: inline-flex; align-items: center; }
.admin-empty { text-align: center; color: var(--ink-secondary); padding: 24px !important; }
.admin-muted { color: var(--ink-tertiary); }
.admin-error-text { color: var(--sale); }
.admin-email-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--gray-100);
  color: var(--ink-secondary);
}
.admin-email-badge--ok { background: #dcfce7; color: #166534; }
.admin-email-badge--error { background: #fee2e2; color: #991b1b; }

.admin-order-email-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: var(--canvas);
}
.admin-email-config { font-size: 0.8125rem; font-weight: 600; color: var(--ink-secondary); }
.admin-email-config--ok { color: #166534; }
.admin-email-config--warn { color: #b45309; }

.admin-modal {
  border: none;
  padding: 0;
  max-width: min(720px, calc(100vw - 24px));
  width: 100%;
  background: transparent;
}
.admin-modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.admin-modal__panel {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.admin-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.admin-modal__head h2 { margin: 0; font-size: 1.0625rem; }
.admin-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--canvas);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-secondary);
}
.admin-modal__body {
  padding: 16px 20px 24px;
  overflow-y: auto;
}
.admin-modal__body .order-detail-card {
  border: none;
  padding: 0;
  box-shadow: none;
}

@media (max-width: 768px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-order-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 8px; }
  .admin-sidebar__nav { flex-direction: row; flex-wrap: nowrap; }
  .admin-sidebar__item { white-space: nowrap; font-size: 0.75rem; padding: 8px 12px; }
  .admin-main-wrap { min-height: auto; }
}

/* Admin shell v2 */
.admin-shell-page { background: var(--canvas); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 200px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border-light); padding: 12px 10px;
  display: flex; flex-direction: column; gap: 12px;
}
.admin-sidebar__brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; font-weight: 800; }
.admin-sidebar__brand img { height: 32px; }
.admin-sidebar__nav { display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar__item {
  text-align: left; border: none; background: transparent; padding: 8px 10px;
  border-radius: 8px; font-size: 0.78rem; font-weight: 650; cursor: pointer; color: var(--ink-secondary);
}
.admin-sidebar__item:hover { background: var(--canvas); color: var(--ink); }
.admin-sidebar__item.active { background: var(--brand-muted); color: var(--brand); }
.admin-main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-main--wide {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 20px 80px;
  box-sizing: border-box;
}
.admin-main--wide .admin-panel.auth-card {
  width: 100%;
  max-width: none;
}
.admin-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border-light); background: var(--surface);
}
.admin-topbar__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-topbar__user { font-size: 0.8125rem; font-weight: 700; }
.admin-toasts {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.admin-toast {
  padding: 12px 16px; border-radius: 10px; font-size: 0.8125rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  animation: adminToastIn 0.25s ease;
}
.admin-toast--success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.admin-toast--error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.admin-toast--out { opacity: 0; transform: translateY(8px); transition: 0.3s; }
@keyframes adminToastIn { from { opacity: 0; transform: translateY(8px); } }
.admin-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.admin-alert { padding: 12px 14px; border-radius: 10px; font-size: 0.8125rem; border: 1px solid var(--border-light); }
.admin-alert--warn { background: #fffbeb; border-color: #fde68a; }
.admin-alert--error { background: #fef2f2; border-color: #fecaca; }
.admin-alert--ok { background: #f0fdf4; border-color: #bbf7d0; }
.admin-stat--revenue { border-color: #bbf7d0; background: #f0fdf4; }
.admin-stat--revenue .admin-stat__value { color: #15803d; }
.admin-order-stats--dash { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.admin-product-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.admin-product-preview { max-width: 120px; max-height: 120px; border-radius: 10px; margin-top: 8px; }
.admin-row--warn { background: #fffbeb; }
.admin-row--muted { opacity: 0.55; }
.admin-tag { font-size: 0.625rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--gray-100); }
.admin-tag--ok { background: #dcfce7; color: #166534; }
.admin-status-badge { font-size: 0.6875rem; font-weight: 700; padding: 4px 8px; border-radius: 100px; white-space: nowrap; }
.admin-status-badge--warn { background: #fef3c7; color: #92400e; }
.admin-status-badge--info { background: #e0e7ff; color: #3730a3; }
.admin-status-badge--ship { background: #dbeafe; color: #1d4ed8; }
.admin-status-badge--ok { background: #dcfce7; color: #166534; }
.admin-status-badge--error { background: #fee2e2; color: #991b1b; }
.admin-status-badge--muted { background: var(--gray-100, #f3f4f6); color: var(--gray-700, #374151); }
.admin-status-cell { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.admin-select--status { font-size: 0.75rem; padding: 6px 8px; }
.admin-select--block { width: 100%; padding: 8px; margin-bottom: 8px; }
.admin-field--full { grid-column: 1 / -1; }
.admin-filter-input--date { flex: 0 1 140px; min-width: 120px; }
.admin-audit-list { margin: 0; padding-left: 18px; font-size: 0.75rem; color: var(--ink-secondary); }
.order-card__foot--discount { color: var(--brand); font-size: 0.875rem; }

/* ---- Account upgrades ---- */
.account-main .account-shell { width: min(720px, 100%); }
.account-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.account-hero__edit {
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 100px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.account-membership {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(212, 175, 55, 0.2);
  color: var(--copper-light, #e8c547);
  font-size: 0.75rem;
  font-weight: 700;
}
.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}
.account-stat {
  padding: 14px 10px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-light);
  text-align: center;
}
.account-stat__value { display: block; font-size: 1.25rem; font-weight: 700; color: var(--brand); }
.account-stat__label { font-size: 0.75rem; color: var(--ink-secondary); }
.account-menu__item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border-light);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
}
.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.account-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  border-radius: 100px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.account-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.account-active-order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.account-active-order__cta { color: var(--brand); font-weight: 700; font-size: 0.875rem; }
.account-panel { margin-top: 8px; }
.account-back {
  border: none;
  background: none;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 0;
}
.account-add-btn { margin-bottom: 16px; width: 100%; }
.address-card, .voucher-card {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  background: var(--surface);
  margin-bottom: 10px;
}
.address-card--default { border-color: color-mix(in srgb, var(--brand) 35%, var(--border-light)); }
.address-card__head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.address-card__actions { display: flex; gap: 8px; }
.voucher-card { display: grid; gap: 4px; }
.voucher-card--used { opacity: 0.65; }
.account-empty { color: var(--ink-secondary); font-size: 0.875rem; }
.account-modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}
.account-modal.visible { display: flex; }
.account-modal__card {
  width: min(440px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.account-modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.account-check { display: flex; gap: 8px; align-items: center; font-size: 0.875rem; margin: 12px 0; }
.account-select, .voucher-row input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
}
.voucher-row { display: flex; gap: 8px; margin-bottom: 8px; }
.voucher-row input { flex: 1; }
.order-reorder-btn {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--brand);
  background: var(--brand-muted);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
}
.order-card--link { position: relative; }
.order-card--link .order-reorder-btn { position: relative; z-index: 2; }

/* ==== Checkout / track / admin UI pack ==== */
.checkout-main { padding-bottom: 96px; }
.payment-option {
  padding: 18px 20px;
  min-height: 72px;
  align-items: center;
}
.payment-option:has(input:checked) {
  background: color-mix(in srgb, var(--brand-muted) 55%, var(--surface));
  border-color: var(--brand);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent), var(--shadow);
}
.payment-option strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 550;
}
.checkout-summary-card {
  position: sticky;
  top: calc(var(--header-offset, 72px) + 12px);
}
.checkout-mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-light);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 28px rgba(0,0,0,0.08);
}
.checkout-mobile-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}
.checkout-mobile-bar__total {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
  color: var(--ink-secondary);
}
.checkout-mobile-bar__total strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 550;
  color: var(--brand);
}
.checkout-mobile-bar .btn {
  flex-shrink: 0;
  padding: 12px 20px;
}

@media (max-width: 860px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .checkout-summary-card {
    position: static;
    order: -1;
  }
  .checkout-mobile-bar { display: block; }
  .checkout-form-card .auth-submit { display: none; }
}

.tracking-timeline {
  margin: 20px 0 8px;
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.tracking-step--active .tracking-step__dot {
  border-color: #e8c96a;
  background: #e8c96a;
  box-shadow: 0 0 0 4px rgba(232, 201, 106, 0.25);
}
.tracking-step--done .tracking-step__dot {
  border-color: var(--brand);
  background: var(--brand);
}
.tracking-step__body strong {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 1.05rem;
}
.order-detail-card h1,
.auth-title {
  font-family: var(--font-display);
  font-weight: 550;
  letter-spacing: -0.02em;
}

.admin-sidebar {
  background: linear-gradient(180deg, #041510 0%, #103A2C 100%);
  border-right: none;
  color: #f7faf7;
  padding: 20px 14px;
}
.admin-sidebar__brand {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 1.15rem;
  padding: 4px 8px 12px;
}
.admin-sidebar__brand img {
  height: 36px;
}
.admin-sidebar__item {
  color: rgba(247, 250, 247, 0.72);
  border-radius: 12px;
  font-weight: 500;
}
.admin-sidebar__item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.admin-sidebar__item.active {
  background: #E7EEEA;
  color: #103A2C;
}
.admin-topbar {
  background: var(--surface);
}
.admin-badge {
  font-family: var(--font-display);
  font-weight: 550;
  letter-spacing: 0.02em;
  background: var(--brand-muted);
  color: var(--brand);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
}
.admin-btn--primary {
  background: var(--brand);
}
.admin-panel h2 {
  font-family: var(--font-display);
  font-weight: 550;
  letter-spacing: -0.02em;
}

.auth-link-btn[hidden],
.auth-hint[hidden],
#adminLoginHint[hidden],
#recaptcha-container[hidden] {
  display: none !important;
}

/* Admin upgrades */
.admin-nav-badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-sidebar__item { display: flex; align-items: center; gap: 8px; width: 100%; }
.admin-queue-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.admin-queue-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.75rem;
  cursor: pointer;
}
.admin-queue-chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.admin-queue-chip strong { margin-left: 4px; }
.admin-bulk-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 12px; padding: 10px 12px; border-radius: 10px;
  background: var(--brand-muted, #fff7ed); border: 1px solid var(--border);
  font-size: 0.8125rem; font-weight: 600;
}
.admin-stock-input { width: 72px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border); }
.admin-gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-gallery__item {
  width: 110px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface);
}
.admin-gallery__item.is-main { outline: 2px solid var(--brand); }
.admin-gallery__item img { width: 100%; height: 80px; object-fit: cover; display: block; }
.admin-gallery__actions { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; }
.admin-gallery__actions .admin-btn { padding: 2px 4px; font-size: 0.625rem; }
.admin-stat--click, .admin-alert--click, .admin-row-click { cursor: pointer; }
.admin-bar-chart {
  display: flex; align-items: flex-end; gap: 6px; height: 140px;
  padding: 8px 4px 0; margin-bottom: 20px; border-bottom: 1px solid var(--border-light);
}
.admin-bar-chart__item { flex: 1; min-width: 18px; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.admin-bar-chart__bar { width: 100%; max-width: 28px; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.admin-bar-chart__item span { font-size: 0.625rem; color: var(--ink-secondary); margin-top: 4px; }
.admin-ops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.admin-ops-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface); }
.admin-golive { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; background: var(--surface); }
.admin-golive--ready { border-color: #12b76a; background: color-mix(in srgb, #12b76a 8%, var(--surface)); }
.admin-golive--pending { border-color: #f79009; background: color-mix(in srgb, #f79009 8%, var(--surface)); }
.admin-golive-list { margin: 10px 0 14px; padding-left: 0; list-style: none; }
.admin-golive-list li { margin: 6px 0; font-size: 0.9rem; }
.admin-golive-ok { color: #027a48; }
.admin-golive-bad { color: #b54708; }
.admin-golive-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.admin-kbd-hint { font-size: 0.75rem; color: var(--ink-secondary); }
.admin-kbd-hint kbd { border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; background: var(--bg); font-size: 0.6875rem; }
.admin-mobile-nav-toggle {
  display: none; position: fixed; right: 14px; bottom: 18px; z-index: 1200;
  width: 48px; height: 48px; border-radius: 999px; border: none;
  background: var(--brand); color: #fff; font-size: 1.25rem; box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
@media (max-width: 900px) {
  .admin-mobile-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .admin-shell .admin-sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(280px, 86vw); z-index: 1300;
    transform: translateX(-105%); transition: transform .2s ease; box-shadow: 8px 0 24px rgba(0,0,0,.12);
  }
  .admin-shell--nav-open .admin-sidebar { transform: translateX(0); }
  .admin-ops-grid { grid-template-columns: 1fr; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-table--orders { min-width: 920px; }
  .admin-main { padding: 16px 12px 96px; }
}

/* ---- Dark / evening clarity ---- */
[data-theme="dark"] .auth-card,
[data-theme="dark"] .admin-panel,
[data-theme="dark"] .account-panel,
[data-theme="dark"] .order-card,
[data-theme="dark"] .bank-transfer-box {
  background: var(--surface);
  border-color: var(--border-light);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .auth-segment__btn.is-active,
[data-theme="dark"] .auth-segment__btn.active {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

[data-theme="dark"] .order-badge--awaiting,
[data-theme="dark"] .jnt-mock-badge,
[data-theme="dark"] .admin-status-badge--warn {
  background: color-mix(in srgb, #f59e0b 18%, var(--surface));
  color: #fcd34d;
}

[data-theme="dark"] .order-badge--paid,
[data-theme="dark"] .admin-status-badge--ok,
[data-theme="dark"] .admin-tag--ok,
[data-theme="dark"] .admin-email-badge--ok {
  background: var(--brand-muted);
  color: var(--brand-light);
}

[data-theme="dark"] .admin-stat--warn,
[data-theme="dark"] .admin-stat--await,
[data-theme="dark"] .admin-alert--warn,
[data-theme="dark"] .admin-row--warn,
[data-theme="dark"] .admin-toast--success {
  background: color-mix(in srgb, #f59e0b 10%, var(--surface));
  border-color: color-mix(in srgb, #f59e0b 35%, var(--border));
  color: var(--ink);
}

[data-theme="dark"] .admin-stat--ok,
[data-theme="dark"] .admin-stat--revenue,
[data-theme="dark"] .admin-alert--ok {
  background: var(--brand-muted);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  color: var(--ink);
}

[data-theme="dark"] .admin-stat--ship,
[data-theme="dark"] .admin-status-badge--ship,
[data-theme="dark"] .admin-status-badge--info {
  background: color-mix(in srgb, #60a5fa 14%, var(--surface));
  border-color: color-mix(in srgb, #60a5fa 35%, var(--border));
  color: #93c5fd;
}

[data-theme="dark"] .admin-alert--error,
[data-theme="dark"] .admin-toast--error,
[data-theme="dark"] .admin-status-badge--error,
[data-theme="dark"] .admin-excel-status--error,
[data-theme="dark"] .admin-email-badge--error {
  background: color-mix(in srgb, #ef4444 12%, var(--surface));
  border-color: color-mix(in srgb, #ef4444 35%, var(--border));
  color: #fca5a5;
}

[data-theme="dark"] .admin-shell .admin-sidebar,
[data-theme="dark"] .admin-topbar {
  background: var(--surface);
  border-color: var(--border-light);
}

[data-theme="dark"] .admin-sidebar__item:hover,
[data-theme="dark"] .admin-sidebar__item.is-active {
  background: var(--brand-muted);
  color: var(--brand-light);
}

[data-theme="dark"] .admin-btn {
  background: var(--canvas);
  color: var(--ink-secondary);
  border-color: var(--border);
}

[data-theme="dark"] .admin-btn--primary {
  background: #103A2C;
  color: #fff;
  border-color: #103A2C;
}

[data-theme="dark"] .admin-table th {
  color: var(--ink-tertiary);
  background: color-mix(in srgb, var(--canvas) 70%, var(--surface));
}

[data-theme="dark"] .admin-table td {
  border-bottom-color: var(--border-light);
  color: var(--ink);
}

[data-theme="dark"] .account-tab.active,
[data-theme="dark"] .admin-tab.active,
[data-theme="dark"] .admin-queue-chip.is-active {
  color: #042016;
}

[data-theme="dark"] .payment-option {
  background: var(--canvas);
  border-color: var(--border);
}

[data-theme="dark"] .payment-option:has(input:checked),
[data-theme="dark"] .payment-option.is-selected {
  border-color: var(--brand);
  background: var(--brand-muted);
}

[data-theme="dark"] .tracking-step--done .tracking-step__dot,
[data-theme="dark"] .tracking-step.is-done .tracking-step__dot {
  background: var(--brand);
  border-color: var(--brand);
}

[data-theme="dark"] .success-card,
[data-theme="dark"] .order-detail-card {
  background: var(--surface);
  border-color: var(--border-light);
}

.auth-header {
  background: var(--surface);
}
.auth-card {
  box-shadow: 0 8px 30px rgba(12, 69, 52, 0.06);
}
