:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #fcfcfd;
  --text: #1f2937;
  --text-soft: #374151;
  --muted: #6b7280;
  --menu-unimplemented: #aeb4bf;
  --line: #d1d5db;
  --line-strong: #9ca3af;
  --primary: #1f4f8b;
  --primary-ink: #ffffff;
  --primary-strong: #173c69;
  --primary-soft: rgba(31, 79, 139, 0.16);
  --link: #1f4f8b;
  --link-hover: #173c69;
  --theme-primary: #1f4f8b;
  --theme-primary-ink: #ffffff;
  --theme-primary-strong: #173c69;
  --theme-primary-soft: rgba(31, 79, 139, 0.16);
  --danger: #b91c1c;
  --danger-hover: #991b1b;
  --warn: #92400e;
  --ok: #166534;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] {
  --bg: #111827;
  --surface: #1f2937;
  --surface-soft: #243244;
  --surface-muted: #1b2432;
  --text: #f3f4f6;
  --text-soft: #d1d5db;
  --muted: #9ca3af;
  --menu-unimplemented: #6b7280;
  --line: #374151;
  --line-strong: #4b5563;
  --link: #93c5fd;
  --link-hover: #bfdbfe;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", "Meiryo", "Hiragino Kaku Gothic ProN", sans-serif;
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}

.site-footer {
  margin-top: 32px;
  background: var(--theme-primary);
  color: var(--theme-primary-ink);
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.site-footer-system-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.3;
}

.site-footer-system-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.site-footer-system-full-name {
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.86;
}

.site-footer small {
  font-size: 0.82rem;
}


.app-global-title {
  background: var(--theme-primary);
  color: var(--theme-primary-ink);
  border-bottom: 1px solid var(--theme-primary-strong);
}

.app-global-title-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-global-title-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-global-title-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

a.app-global-title-brand:hover,
a.app-global-title-brand:focus,
a.app-global-title-brand:focus-visible {
  color: inherit;
  text-decoration: none;
}

.app-global-title-logo {
  width: 210px;
  height: auto;
  max-height: 78px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  padding: 4px;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.app-global-title-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.app-global-title-copy-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.app-global-title-copy-full-name {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.9;
  white-space: nowrap;
}

.app-user-menu {
  position: relative;
  flex: 0 0 auto;
}

.app-user-menu-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  cursor: pointer;
  list-style: none;
}

.app-user-menu-toggle::-webkit-details-marker {
  display: none;
}

.app-user-menu-toggle:hover,
.app-user-menu-toggle:focus {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.app-user-menu[open] .app-user-menu-toggle {
  background: rgba(255, 255, 255, 0.24);
}

.app-user-menu-line {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.app-user-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  min-width: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.app-user-menu-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.app-user-menu-item:hover,
.app-user-menu-item:focus,
.app-user-menu-item.is-active {
  background: var(--surface-soft);
  color: var(--theme-primary);
  text-decoration: none;
}

.app-user-menu-form {
  margin: 0;
  border-top: 1px solid var(--line);
}

.app-user-menu-switch-form {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.app-user-menu-switch-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.app-user-menu-switch-form select {
  width: 100%;
  min-width: 0;
  font-size: 0.86rem;
}

@media (max-width: 767px) {
  .app-global-title-bar {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .app-global-title-identity {
    min-width: 0;
    gap: 8px;
  }

  .app-global-title-logo {
    width: 128px;
    max-height: 48px;
  }

  .app-global-title-copy-title {
    font-size: 0.75rem;
  }

  .app-global-title-copy-full-name {
    font-size: 0.58rem;
    white-space: normal;
  }

  .app-user-menu {
    margin-left: auto;
  }
}

@media (max-width: 360px) {
  .app-global-title-logo {
    width: 112px;
  }

  .app-global-title-copy-title {
    font-size: 0.68rem;
  }

  .app-global-title-copy-full-name {
    font-size: 0.52rem;
  }
}

.breadcrumbs {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.breadcrumbs-nav {
  min-width: 0;
}

.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.88rem;
}

.breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs-item:not(:last-child)::after {
  content: ">";
  color: var(--line-strong);
}

.breadcrumbs-link {
  color: var(--link);
  text-decoration: underline;
}

.breadcrumbs-link:hover,
.breadcrumbs-link:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

.breadcrumbs-current {
  color: var(--text);
}

.breadcrumbs-action-link {
  color: var(--link);
  text-decoration: underline;
  white-space: nowrap;
  flex: 0 0 auto;
  margin-left: auto;
}

.breadcrumbs-action-link:hover,
.breadcrumbs-action-link:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
  padding: 16px;
}

.panel > section + section {
  margin-top: 16px;
}

.stack {
  display: grid;
  gap: 16px;
}

.compact-info-list {
  display: grid;
  gap: 6px;
}

.stack-fit-content {
  justify-content: start;
  justify-items: start;
}

.compact-info-list p {
  margin: 0;
  line-height: 1.4;
}

.order-detail-summary-stack {
  display: grid;
  gap: 12px;
}

.order-detail-status-panel,
.order-detail-info-section {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  padding: 12px;
}

.order-detail-summary-label,
.order-detail-status-value {
  margin: 0;
}

.order-detail-summary-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.order-detail-status-value {
  margin-top: 4px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.order-detail-info-grid {
  display: grid;
  gap: 12px;
}

.order-detail-current-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px 14px;
}

.order-detail-current-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.order-detail-current-summary-title {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.order-detail-current-summary-grid {
  display: grid;
  gap: 10px;
}

.order-detail-current-summary-grid p {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
}

.order-detail-current-summary-label {
  display: inline-block;
  min-width: 7.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.order-detail-current-summary-value {
  display: inline-block;
  min-width: 7.5rem;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  text-align: right;
}

.order-detail-current-summary-value-emphasis {
  font-size: 1.7rem;
  font-weight: 900;
}

.bank-account-detail {
  min-width: 14rem;
  font-size: 1.12rem;
  line-height: 1.35;
  text-align: left;
}

.bank-account-detail-line {
  display: block;
}

.arrival-date-form {
  justify-items: start;
}

.arrival-date-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.arrival-date-form .arrival-date-input,
.arrival-date-toolbar .arrival-date-input {
  width: 11rem;
  max-width: 100%;
}

.arrival-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.arrival-section-heading h3 {
  width: auto;
}

.order-detail-payment-share-actions {
  flex-shrink: 0;
}

.order-detail-current-summary-unit {
  margin-left: 2px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

.order-detail-original-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 10px 14px;
}

.order-detail-original-summary-title {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.order-detail-original-summary-grid {
  display: grid;
  gap: 6px;
}

.order-detail-original-summary-grid p {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
}

.order-detail-original-summary-label {
  display: inline-block;
  min-width: 7.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.order-detail-original-summary-value {
  display: inline-block;
  min-width: 7.5rem;
  text-align: right;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-soft);
}

.order-detail-original-summary-unit {
  margin-left: 2px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.order-detail-info-title {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

@media (min-width: 768px) {
  .order-detail-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.master-data-stack {
  gap: 8px;
}

.master-data-intro-text {
  margin: 0;
}

.master-data-card {
  padding: 12px;
}

.master-data-import-collapsible {
  display: block;
}

.master-data-import-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.master-data-import-summary::-webkit-details-marker {
  display: none;
}

.master-data-import-summary::after {
  content: "開く";
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.master-data-import-collapsible[open] .master-data-import-summary {
  margin-bottom: 12px;
}

.master-data-import-collapsible[open] .master-data-import-summary::after {
  content: "閉じる";
}

.master-data-card-stack {
  gap: 10px;
}

.master-data-counts {
  margin: 0;
}

.master-data-job-detail,
.master-data-job-errors {
  gap: 4px;
}

.master-data-local-message {
  margin: 0;
}

.master-data-filename {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.master-direct-import-modal {
  width: min(320px, calc(100vw - 32px));
  justify-items: center;
  text-align: center;
  padding: 24px;
}

.generic-master-list-panel {
  display: grid;
  gap: 14px;
}

.generic-master-list-header {
  align-items: flex-start;
  gap: 12px;
}

.generic-master-list-summary {
  margin: 4px 0 0;
}

.generic-master-list-actions {
  align-items: center;
  flex-wrap: wrap;
}

.generic-master-include-deleted {
  margin: 0;
  white-space: nowrap;
}

.generic-master-table-wrap {
  overflow-x: auto;
}

.generic-master-card-list {
  display: none;
}

.generic-master-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.generic-master-table th,
.generic-master-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.generic-master-table th {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.generic-master-table td {
  overflow-wrap: anywhere;
}

.generic-master-table .generic-master-action-col {
  width: 96px;
  min-width: 96px;
  text-align: center;
  white-space: nowrap;
}

.generic-master-table tr.is-deleted td {
  background: #e5e7eb;
}

[data-theme="dark"] .generic-master-table tr.is-deleted td {
  background: #374151;
}

.generic-master-card.is-deleted {
  background: #e5e7eb;
}

[data-theme="dark"] .generic-master-card.is-deleted {
  background: #374151;
}

.generic-master-pager {
  justify-content: flex-end;
  align-items: center;
}

.generic-master-page-size-field {
  margin-right: auto;
}

.generic-master-page-size-field .products-filter-input {
  width: 140px;
}

@media (max-width: 767px) {
  .generic-master-table-wrap {
    display: none;
  }

  .generic-master-card-list {
    display: grid;
    gap: 10px;
  }

  .generic-master-list-header {
    display: grid;
  }

  .generic-master-list-actions {
    justify-content: flex-start;
  }

  .generic-master-pager {
    justify-content: flex-start;
  }

  .generic-master-page-size-field {
    width: 100%;
    margin-right: 0;
  }
}

.modal.generic-master-edit-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.generic-master-export-modal {
  width: min(420px, calc(100vw - 32px));
}

.generic-master-export-actions {
  margin-top: 12px;
  align-items: center;
}

.generic-master-export-actions #generic-master-export-cancel {
  margin-left: auto;
}

.generic-master-edit-modal .generic-master-edit-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.generic-master-edit-form,
.generic-master-edit-grid {
  gap: 12px;
}

.generic-master-edit-grid {
  display: grid;
}

.generic-master-edit-actions {
  flex: 0 0 auto;
  justify-content: space-between;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.generic-master-edit-actions-left,
.generic-master-edit-actions-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.history-detail-text {
  margin-top: 4px;
  line-height: 1.4;
}

.history-detail-modal-list-wrap {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  background: var(--surface-soft);
}

.history-detail-modal-list {
  margin: 0;
  padding-left: 18px;
}

.history-summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.history-summary-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.history-summary-row .history-detail-button {
  flex: 0 0 auto;
  margin-left: auto;
}

.section-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.section-tab {
  appearance: none;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.section-tab:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.section-tab.is-active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  position: relative;
  top: 1px;
}

.header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.header h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.page h2,
.page h3 {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

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

.actions-end {
  justify-content: flex-end;
}

.order-detail-accepted-actions {
  justify-content: space-between;
}

.order-detail-action-left,
.order-detail-action-right {
  display: inline-flex;
  align-items: center;
}

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

.button-auto-width {
  width: auto !important;
}

.admin-console-indicator {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #d6b971;
  background: #fff8e5;
  color: #8a6500;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  z-index: 800;
  overflow: visible;
  scrollbar-width: thin;
}

.admin-console-page > .admin-nav {
  margin: 0;
  padding: 8px 0 0;
}

.admin-console-page > .breadcrumbs {
  max-width: 1200px;
  margin: 8px auto 0;
  padding: 0 16px;
}

.admin-console-page > .admin-nav + .page {
  padding-top: 12px;
}

.admin-console-page > .breadcrumbs + .page {
  padding-top: 12px;
}

.admin-nav-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  max-width: 1200px;
  min-width: max-content;
  margin: 0 auto;
  padding: 0 16px;
}

.admin-nav-group-title {
  align-self: flex-start;
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-nav-links {
  display: flex;
  gap: 14px;
  flex-wrap: nowrap;
  width: 100%;
}

.admin-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-soft);
  padding: 8px 0 10px;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.admin-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
}

.admin-nav-link:hover {
  text-decoration: none;
  color: var(--theme-primary);
}

.admin-nav-link:hover::after {
  background: var(--theme-primary-soft);
}

.admin-nav-link.is-active {
  color: var(--theme-primary);
}

.admin-nav-link.is-active::after {
  background: var(--theme-primary);
}

.admin-menu-dropdown-list {
  align-items: stretch;
  overflow: visible;
}

.admin-menu-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.admin-menu-dropdown-toggle {
  cursor: pointer;
  list-style: none;
}

.admin-menu-dropdown-toggle::-webkit-details-marker {
  display: none;
}

.admin-menu-dropdown-toggle::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transform: translateY(1px);
}

.admin-menu-dropdown[open] .admin-menu-dropdown-toggle::before {
  transform: rotate(180deg) translateY(-1px);
}

.admin-menu-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 900;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  padding: 6px;
}

.admin-menu-dropdown-item {
  display: block;
  border-radius: 4px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
  padding: 8px 10px;
  text-decoration: none;
  white-space: normal;
}

.admin-menu-dropdown-item:hover,
.admin-menu-dropdown-item:focus,
.admin-menu-dropdown-item.is-active {
  background: var(--surface-soft);
  color: var(--theme-primary);
  text-decoration: none;
}

.admin-menu-dropdown-item.is-emphasized {
  color: var(--text);
  font-weight: 700;
}

.admin-menu-dropdown-item.is-emphasized:hover,
.admin-menu-dropdown-item.is-emphasized:focus,
.admin-menu-dropdown-item.is-emphasized.is-active {
  background: transparent;
  color: var(--text);
}

.admin-menu-dropdown-item.is-unimplemented,
.admin-menu-dropdown-item.is-unimplemented:hover,
.admin-menu-dropdown-item.is-unimplemented:focus,
.admin-menu-dropdown-item.is-unimplemented.is-active {
  color: var(--menu-unimplemented);
}

@media (max-width: 1100px) {
  .admin-nav-group {
    min-width: 0;
  }

  .admin-nav-links {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
}

@media (max-width: 767px) {
  .admin-nav {
    overflow-x: visible;
  }

  .admin-nav-group {
    min-width: 0;
  }

  .admin-nav-links {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .admin-nav-link {
    min-height: 34px;
    padding: 6px 0 8px;
    font-size: 0.88rem;
  }

  .admin-menu-dropdown-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 16px;
    right: auto;
    max-width: none;
  }
}

.shop-console-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.shop-console-title-wrap {
  display: grid;
  gap: 4px;
}

.shop-console-shop-id {
  margin: 0;
}

.shop-console-page-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--line);
  letter-spacing: 0;
}

.shop-console-menu-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.shop-console-shop-name-block {
  flex: 0 1 260px;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 0;
}

.shop-console-shop-name {
  margin: 0;
  margin-bottom: 6px;
}

.shop-console-shop-name {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.shop-primary-nav {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  margin: 0 0 0 auto;
  min-width: 0;
  flex: 0 1 auto;
}

.shop-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.shop-primary-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: #c62828;
  color: var(--theme-primary-ink);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  flex: 0 0 auto;
}

.shop-primary-link:hover {
  text-decoration: none;
  background: var(--surface-soft);
}

.shop-primary-link.is-active {
  background: var(--theme-primary);
  border-color: var(--theme-primary);
  color: var(--theme-primary-ink);
}

.shop-primary-link.is-active .shop-primary-badge {
  background: rgba(255, 255, 255, 0.24);
  color: var(--theme-primary-ink);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.sort-link {
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
}

.sort-link.is-disabled {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
  cursor: default;
}

.page-link {
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
}

.page-link.is-disabled {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
  cursor: default;
}

.list-summary-bar {
  margin: 0;
}

.list-pagination-bar {
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.monthly-list-navigation {
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.monthly-list-navigation > .button-subtle {
  box-sizing: border-box;
  height: 32px;
  margin: 0;
}

.monthly-list-navigation-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8.5em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.monthly-list-navigation-picker-form {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin: 0;
}

.monthly-list-navigation-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: 32px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.monthly-list-navigation-picker::after {
  color: var(--muted);
  content: "▾";
  font-size: 0.75rem;
}

.monthly-list-navigation-picker:hover {
  background: var(--surface-soft);
}

.monthly-list-navigation-picker:focus-within {
  outline: 2px solid var(--focus-ring, #2563eb);
  outline-offset: 2px;
}

.monthly-list-navigation .monthly-list-navigation-picker-input {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

.monthly-list-navigation .is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.monthly-list-navigation-supplemental {
  margin-left: 4px;
}

.order-history-toolbar {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.order-history-filter-form {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-history-panel-shell {
  position: relative;
}

.order-history-panel-shell.is-loading [data-order-history-panel-content] {
  pointer-events: none;
  opacity: 0.55;
}

.order-history-filter-form select {
  width: auto;
  min-width: 0;
}

.product-list-section {
  gap: 12px;
}

.order-detail-section-title {
  margin: 0;
}

.order-detail-export-actions {
  margin-top: -4px;
}

.order-detail-summary-actions {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.order-detail-summary-actions .product-list-summary-bar {
  flex: 1 1 auto;
  min-width: 0;
}

.product-list-summary-bar {
  min-height: 24px;
}

.product-list-pagination-bar {
  margin-top: 2px;
}

.product-list-action-bar {
  align-items: center;
  gap: 12px;
}

.product-list-notes {
  margin-top: -2px;
}

.product-list-notes .muted {
  margin: 0;
}

.product-search-syntax-note {
  margin: 4px 0 0;
  font-size: 0.85rem;
}

/* 商品一覧系テーブルは product-list-table / product-col-* を正とする。
   画面個別の幅・寄せ上書きは追加せず、必要なら先に共通仕様へ編入する。 */
.product-list-table th,
.product-list-table td[data-label="注文個数"],
.product-list-table td[data-label="提案個数"],
.product-list-table td[data-label="小計"] {
  white-space: nowrap;
}

.product-list-table {
  table-layout: fixed;
  width: 100%;
}

.product-list-table th {
  text-align: left;
}

.product-list-table th.product-col-select,
.product-list-table td.product-col-select {
  width: 48px;
}

.product-list-table td.product-col-select {
  text-align: center;
}

.product-list-table th.product-col-supplier,
.product-list-table td.product-col-supplier,
.product-list-table th.product-col-manufacturer,
.product-list-table td.product-col-manufacturer,
.product-list-table th.product-col-major-category,
.product-list-table td.product-col-major-category {
  width: 10%;
}

.product-list-table td.product-col-supplier,
.product-list-table td.product-col-manufacturer,
.product-list-table td.product-col-major-category {
  text-align: left;
}

.product-list-table td.product-col-supplier,
.product-list-table td.product-col-manufacturer,
.product-list-table td.product-col-major-category {
  font-size: 0.86rem;
}

.product-list-table th.product-col-list-price,
.product-list-table td.product-col-list-price,
.product-list-table th.product-col-order-unit,
.product-list-table td.product-col-order-unit {
  width: 60px;
}

.product-list-table td.product-col-list-price,
.product-list-table td.product-col-order-unit {
  text-align: right;
}

.product-list-table th.product-col-rate,
.product-list-table td.product-col-rate {
  width: 80px;
}

.product-list-table td.product-col-rate {
  text-align: right;
}

.product-list-table th.product-col-purchase,
.product-list-table td.product-col-purchase {
  width: 60px;
}

.product-list-table td.product-col-purchase {
  text-align: right;
}

.product-list-table th.product-col-stock,
.product-list-table td.product-col-stock {
  width: 60px;
}

.product-list-table td.product-col-stock {
  text-align: center;
}

.product-list-table th.product-col-action,
.product-list-table td.product-col-action {
  width: 80px;
}

.product-list-table td.product-col-action {
  text-align: center;
}

.product-list-table th.product-col-favorite,
.product-list-table td.product-col-favorite {
  width: 60px;
}

.product-list-table td.product-col-favorite {
  text-align: center;
}

.product-list-table th.product-col-cart,
.product-list-table td.product-col-cart {
  width: 80px;
}

.product-list-table td.product-col-cart {
  text-align: center;
}

.product-list-table th.product-col-override,
.product-list-table td.product-col-override {
  width: 100px;
}

.product-list-table td.product-col-override {
  text-align: right;
}

.product-list-table td.product-col-override .rate-input-wrap {
  justify-content: flex-end;
}

.product-list-table th.product-col-quantity,
.product-list-table td.product-col-quantity {
  width: 160px;
}

.product-list-table td.product-col-quantity {
  text-align: right;
}

.product-list-table td.product-col-quantity .cart-quantity-actions {
  gap: 6px;
}

.product-list-table td.product-col-quantity .cart-qty-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.product-list-table td.product-col-name,
.product-list-table td.product-col-supplier,
.product-list-table td.product-col-manufacturer,
.product-list-table td.product-col-major-category {
  white-space: normal;
  word-break: break-word;
  text-align: left;
}

.product-list-table td.product-col-name a {
  word-break: break-word;
}

.product-action-button {
  min-width: 56px;
}

.product-name-barcd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
  margin-bottom: 2px;
}

.product-barcd-text {
  min-width: 0;
}

.product-publish-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.product-name-main {
  min-width: 0;
}

.product-list-table tr.product-disabled-row td {
  background: #f3f4f6;
}

.product-list-table tr.product-disabled-row:hover td {
  background: #e5e7eb;
}

.product-list-table tr.product-future-row td {
  background: #eff6ff;
}

.product-list-table tr.product-future-row:hover td {
  background: #dbeafe;
}

.product-list-table tr.product-stock-zero-row td {
  background: var(--surface-soft);
}

.product-list-table tr.product-stock-zero-row:hover td {
  background: var(--surface-muted);
}

.product-list-table tr.product-stock-over-row td {
  background: #fff1f2;
}

.product-list-table tr.product-stock-over-row:hover td {
  background: #ffe4e6;
}

.product-list-table tr.cart-unorderable-row td {
  background: #fff1f2;
}

.action-link {
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
}

.action-link.is-disabled {
  color: var(--muted);
  pointer-events: none;
  text-decoration: none;
  cursor: default;
}

.modal.inventory-edit-modal,
.modal.product-master-edit-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.inventory-bulk-update-modal {
  width: min(420px, calc(100vw - 32px));
}

.modal.inventory-edit-modal .inventory-edit-modal-body,
.modal.product-master-edit-modal .product-master-edit-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.modal.inventory-edit-modal .inventory-edit-form,
.modal.product-master-edit-modal .product-master-edit-form {
  min-height: min-content;
  gap: 12px;
}

.modal.inventory-edit-modal .inventory-edit-grid,
.modal.product-master-edit-modal .product-master-edit-grid {
  display: grid;
  gap: 12px;
}

.inventory-edit-barcd-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inventory-edit-barcd-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.inventory-edit-barcd-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 88px;
  text-align: center;
  white-space: nowrap;
}

.inventory-edit-master-code-input {
  width: 100%;
}

.filter-combobox .inventory-edit-master-code-input {
  padding-right: 40px;
}

.inventory-edit-barcd-actions {
  margin-top: 8px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.inventory-edit-barcd-actions .products-scan-trigger-button {
  min-width: 0;
}

.inventory-edit-barcd-actions .products-voice-trigger-button {
  min-width: 0;
}

.price-pair-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 8px;
}

.price-pair-percent-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-pair-percent-wrap input {
  min-width: 0;
}

.price-pair-unit {
  color: var(--muted);
  white-space: nowrap;
}

.required-mark {
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 700;
}

.modal.inventory-edit-modal .inventory-edit-actions,
.modal.product-master-edit-modal .product-master-edit-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.modal.inventory-edit-modal .inventory-edit-actions {
  justify-content: space-between;
}

.modal.product-master-edit-modal .product-master-edit-actions {
  justify-content: space-between;
}

.inventory-edit-actions-left,
.inventory-edit-actions-right,
.product-master-edit-actions-left,
.product-master-edit-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-master-edit-actions-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cart-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 64px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--danger);
  border-radius: 4px;
  background: var(--danger);
  color: #fff;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}

.cart-add-button:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}

.cart-add-button-check {
  background: #2f7d32;
  border-color: #2f7d32;
  color: #fff;
}

.cart-add-button-check:hover {
  background: #27692a;
  border-color: #27692a;
}

.cart-add-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#products-bulk-cart-submit {
  width: auto;
}

#favorites-bulk-cart-submit {
  width: auto;
}

#order-detail-bulk-cart-submit {
  width: auto;
}

#source-order-bulk-cart-submit {
  width: auto;
}

.favorite-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  min-height: 34px;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--muted);
}

.favorite-toggle-button:hover {
  color: #b45309;
}

.favorite-toggle-button.is-active {
  color: #b45309;
  border-color: #f3d18a;
  background: #fff7e6;
}

.favorite-empty-state {
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.favorite-empty-state .muted {
  margin: 0;
}

.product-list-mobile {
  display: none;
}

.product-list-mobile-select-all {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 600;
}

.mobile-product-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 8px 10px;
  margin-bottom: 8px;
}

.mobile-product-card.product-disabled-row {
  background: #f3f4f6;
}

.cart-unresolved-row {
  background: #f3f4f6;
}

.mobile-product-card.product-future-row {
  background: #eff6ff;
}

.mobile-product-card.product-stock-zero-row {
  background: var(--surface-soft);
}

.mobile-product-card.product-stock-over-row {
  background: #fff1f2;
}

.mobile-product-card.cart-unorderable-row {
  background: #fff1f2;
}

.mobile-product-card-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}

.mobile-product-card-row:last-child {
  border-bottom: 0;
}

.mobile-product-card-label {
  flex: 0 0 84px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.mobile-product-card-value {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
  text-align: left;
  word-break: break-word;
}

.mobile-product-card-value.is-control {
  display: flex;
  align-items: center;
}

.mobile-product-card-value.is-meta {
  font-size: 0.86rem;
}

.mobile-product-card-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.mobile-product-card-value input[type="checkbox"] {
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.mobile-product-card-value .cart-add-button,
.mobile-product-card-value .button-subtle {
  width: auto;
  max-width: 100%;
}

.mobile-product-card-value .favorite-toggle-button {
  width: 40px;
  min-width: 40px;
}

.mobile-product-card-value .cart-quantity-actions,
.mobile-product-card-value .rate-input-wrap {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.mobile-product-card-value .cart-qty-input,
.mobile-product-card-value .row-rate-input {
  width: auto;
  max-width: 100%;
}

.mobile-product-card-value.is-number {
  text-align: right;
}

.mobile-product-card-empty {
  padding: 10px 8px;
}

.products-filter-row {
  align-items: center;
  gap: 8px;
}

.products-filter-form {
  gap: 10px;
  max-width: 560px;
}

.products-filter-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.products-filter-full-row {
  grid-column: 1 / -1;
}

.products-filter-label {
  margin: 0;
  white-space: nowrap;
}

.products-filter-input {
  width: 360px;
  max-width: 100%;
}

.filter-combobox {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.filter-combobox-input-row {
  position: relative;
}

.filter-combobox-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-content: flex-start;
  visibility: hidden;
}

.filter-combobox-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--theme-primary);
  color: var(--theme-primary-ink);
  font-size: 13px;
  line-height: 1.4;
}

.filter-combobox-chip-remove {
  color: inherit;
}

.filter-combobox .products-filter-input {
  padding-right: 40px;
}

.filter-combobox-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: auto;
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px;
  line-height: 1;
}

.filter-combobox-toggle:hover,
.filter-combobox-toggle:focus-visible {
  color: var(--theme-primary-ink);
}

.filter-combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

.filter-combobox-list-portal {
  position: fixed;
  right: auto;
  z-index: 1300;
}

.filter-combobox-option {
  display: block;
  width: 100%;
  min-height: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 10px 12px;
  text-align: left;
}

.filter-combobox-option:last-child {
  border-bottom: 0;
}

.filter-combobox-option:hover,
.filter-combobox-option.is-active {
  background: rgba(29, 78, 216, 0.08);
}

.filter-combobox-option.is-selected {
  background: rgba(29, 78, 216, 0.12);
  color: var(--theme-primary);
  font-weight: 600;
}

.filter-combobox-option.is-selected.is-active {
  background: rgba(29, 78, 216, 0.2);
}

.filter-combobox-option.is-selected::after {
  content: '✓';
  float: right;
  margin-left: 12px;
}

.products-scan-actions {
  align-items: flex-start;
}

.products-scan-trigger-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.products-voice-trigger-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.products-voice-trigger-button::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid currentColor;
  box-shadow:
    inset 0 -4px 0 currentColor,
    0 10px 0 -7px currentColor;
}

.products-scan-trigger-button::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 2px;
  box-shadow:
    inset 2px 0 0 currentColor,
    inset 5px 0 0 currentColor,
    inset 8px 0 0 currentColor;
}

.products-scan-actions .products-scan-trigger-button {
  width: 100%;
}

.products-scan-actions .products-voice-trigger-button {
  width: 100%;
}

.products-filter-action-button {
  width: 120px;
  justify-content: center;
}

.products-filter-actions {
  justify-content: flex-end;
}

.products-saved-search-panel {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.products-saved-search-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.products-saved-search-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.products-saved-search-heading .muted {
  margin: 4px 0 0;
}

.products-saved-search-form {
  gap: 10px;
}

.products-saved-search-form > .products-filter-field {
  min-width: 0;
}

.products-saved-search-form .products-filter-input {
  width: 100%;
}

.products-saved-search-actions {
  justify-content: flex-end;
}

.products-saved-search-save-actions .products-filter-action-button {
  width: auto;
  min-width: 160px;
}

.products-collapsible-panel {
  padding: 0;
}

.products-collapsible-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.products-collapsible-summary::-webkit-details-marker {
  display: none;
}

.products-collapsible-title {
  font-size: 1rem;
  font-weight: 700;
}

.products-collapsible-summary::after {
  content: "▾";
  color: var(--muted);
  transition: transform 0.15s ease;
}

.products-collapsible-panel[open] .products-collapsible-summary::after {
  transform: rotate(180deg);
}

.products-collapsible-content {
  padding: 0 14px 12px;
}

.products-barcode-search-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.products-barcode-search-field {
  min-width: 0;
}

.products-barcode-search-field .products-filter-input {
  width: 100%;
}

.products-barcode-search-scan-actions {
  align-items: stretch;
  flex-direction: column;
}

.products-barcode-search-scan-actions .products-scan-trigger-button,
.products-barcode-search-scan-actions .products-voice-trigger-button {
  width: 100%;
}

.products-filter-form-shop {
  max-width: none;
}

@media (min-width: 768px) {
  .products-filter-form-shop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .products-filter-form-shop > .products-filter-field-wide {
    grid-column: 1 / span 2;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 12px;
  }

  .products-filter-form-shop > .products-filter-field-wide .products-filter-label {
    grid-column: 1 / span 2;
  }

  .products-filter-form-shop > .products-filter-field-wide .products-filter-input {
    grid-column: 1;
    grid-row: 2;
  }

  .products-filter-form-shop > .products-filter-field-no-actions .products-filter-input {
    grid-column: 1 / span 2;
  }

  .products-filter-form-shop > .products-filter-field-wide .products-scan-actions {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .products-filter-form-shop > .products-filter-field-wide .products-scan-actions .products-scan-trigger-button {
    width: auto;
  }

  .products-filter-form-shop > .products-filter-field-wide .products-scan-actions .products-voice-trigger-button {
    width: auto;
  }

  .products-filter-form-shop > .products-filter-actions-row,
  .products-filter-form-shop > .products-filter-full-row {
    grid-column: 1 / span 2;
  }

  .products-filter-form-shop .products-filter-input {
    width: 100%;
  }

  .products-saved-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .products-saved-search-form > .products-filter-field:last-of-type {
    grid-column: 1;
    grid-row: 1;
  }

  .products-saved-search-actions {
    grid-column: 2;
    grid-row: 1;
    flex-wrap: nowrap;
    justify-self: end;
  }

  .products-barcode-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 12px;
  }

  .products-barcode-search-scan-actions {
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .products-barcode-search-scan-actions .products-scan-trigger-button,
  .products-barcode-search-scan-actions .products-voice-trigger-button {
    width: auto;
  }
}

.products-scan-note {
  margin: 0;
}

.admin-console-page .products-filter-form {
  max-width: none;
}

@media (min-width: 768px) {
  .admin-console-page .products-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .admin-console-page .products-filter-form > .products-filter-field-wide {
    grid-column: 1 / span 3;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 12px;
  }

  .admin-console-page .products-filter-form > .products-filter-field-wide .products-filter-label {
    grid-column: 1 / span 2;
  }

  .admin-console-page .products-filter-form > .products-filter-field-wide .products-filter-input {
    grid-column: 1;
    grid-row: 2;
  }

  .admin-console-page .products-filter-form > .products-filter-field-no-actions .products-filter-input {
    grid-column: 1 / span 2;
  }

  .admin-console-page .products-filter-form > .products-filter-field-wide .products-scan-actions {
    grid-column: 2;
    grid-row: 2;
    align-self: end;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .admin-console-page .products-filter-form > .products-filter-field-wide .products-scan-actions .products-scan-trigger-button {
    width: auto;
  }

  .admin-console-page .products-filter-form > .products-filter-field-wide .products-scan-actions .products-voice-trigger-button {
    width: auto;
  }

  .admin-console-page .products-filter-form > .products-filter-actions-row,
  .admin-console-page .products-filter-form > .products-filter-full-row {
    grid-column: 1 / span 3;
  }

  .admin-console-page .products-filter-input {
    width: 100%;
  }
}

.rate-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.row-rate-input {
  width: 72px;
  padding: 3px;
  text-align: right;
}

@media (hover: none), (pointer: coarse) {
  input[type="number"] {
    -moz-appearance: textfield;
  }

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

.rate-cell-right {
  text-align: right;
}

.rate-bulk-row {
  flex-wrap: nowrap;
  gap: 6px;
}

.rate-bulk-label {
  display: inline-block;
  margin: 0;
  white-space: nowrap;
  color: var(--text);
}

.rate-bulk-input {
  width: 56px;
  flex: 0 0 56px;
  padding: 3px;
  text-align: right;
}

.rate-bulk-notes {
  display: grid;
  gap: 2px;
}

.rate-bulk-notes .muted {
  margin: 0;
  line-height: 1.35;
}

.products-bulk-panel {
  gap: 8px;
}

.products-bulk-actions {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.products-bulk-select-all-label {
  margin-right: 4px;
}

.products-bulk-selected-summary {
  margin: 0;
  white-space: nowrap;
}

.admin-console-page .admin-console-panel {
  padding: 14px;
}

.admin-console-page .admin-console-panel .header {
  margin-bottom: 10px;
}

.admin-console-page .admin-console-panel .stack {
  gap: 12px;
}

.admin-console-page .admin-console-panel h1 {
  font-size: 1.28rem;
  line-height: 1.3;
}

.admin-console-page .admin-console-panel h2 {
  font-size: 1.18rem;
  line-height: 1.35;
  padding: 3px 6px 4px;
  border-left: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  margin: 0;
}

.admin-console-page .admin-console-panel p,
.admin-console-page .admin-console-panel li {
  line-height: 1.4;
}

.inline-action-form {
  justify-self: start;
}

.inline-action-form button,
.inline-action-button {
  width: auto;
  justify-self: start;
}

.input-with-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-suffix > input {
  flex: 1 1 auto;
}

.input-suffix {
  color: var(--muted);
  white-space: nowrap;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
}

form {
  margin: 0;
}

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

label {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
}

input[type="number"] {
  text-align: right;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-soft);
  outline-offset: 0;
  border-color: var(--primary);
}

textarea {
  resize: vertical;
}

#order-remand-reason {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

input[type="checkbox"],
input[type="radio"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: auto;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  accent-color: var(--primary);
  box-shadow: none;
  flex: 0 0 auto;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: none;
  border-color: transparent;
}

.choice-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
}

.choice-row + .choice-row {
  border-top: 1px solid var(--border-color);
}

.product-list-table input[type="checkbox"],
.responsive-table input[type="checkbox"] {
  inline-size: 18px;
  block-size: 18px;
}

button {
  border: 1px solid var(--theme-primary);
  border-radius: 4px;
  background: var(--theme-primary);
  color: var(--theme-primary-ink);
  padding: 7px 12px;
  cursor: pointer;
}

button:hover {
  background: var(--theme-primary-strong);
  border-color: var(--theme-primary-strong);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

a.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--theme-primary);
  border-radius: 4px;
  background: var(--theme-primary);
  color: var(--theme-primary-ink);
  padding: 7px 12px;
  text-decoration: none;
  white-space: nowrap;
}

a.button-primary:hover {
  background: var(--theme-primary-strong);
  border-color: var(--theme-primary-strong);
  text-decoration: none;
}

.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.theme-color-option {
  min-width: 0;
}

.theme-color-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-color-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  min-height: 100%;
}

.theme-color-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.theme-color-option input[type="radio"]:checked + .theme-color-card {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 2px var(--theme-primary-soft);
}

.theme-color-option input[type="radio"]:focus + .theme-color-card {
  outline: 2px solid var(--theme-primary-soft);
  outline-offset: 2px;
}

.theme-color-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 6px;
  background: var(--theme-swatch, var(--theme-primary));
  color: var(--theme-swatch-ink, #fff);
  font-weight: 700;
}

.theme-color-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.theme-color-custom-panel {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.theme-color-custom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-color-custom-controls input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 2px;
}

.theme-color-custom-note {
  margin: 0;
}

.theme-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.theme-mode-option {
  display: block;
  min-width: 0;
}

.theme-mode-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-mode-card {
  display: grid;
  gap: 6px;
  min-height: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.theme-mode-card:hover {
  transform: translateY(-1px);
}

.theme-mode-option input[type="radio"]:checked + .theme-mode-card {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 2px var(--theme-primary-soft);
}

.theme-mode-option input[type="radio"]:focus + .theme-mode-card {
  outline: 2px solid var(--theme-primary-soft);
  outline-offset: 2px;
}

.theme-mode-card.is-light {
  background: linear-gradient(135deg, #ffffff 0%, #eef2f7 100%);
  color: #111827;
}

.theme-mode-card.is-dark {
  background: linear-gradient(135deg, #111827 0%, #334155 100%);
  color: #f9fafb;
}

.theme-mode-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.theme-mode-preview {
  font-size: 0.85rem;
  opacity: 0.85;
}

.button-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

a.button-danger,
span.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--danger);
  border-radius: 4px;
  background: var(--danger);
  color: #fff;
  padding: 7px 12px;
  text-decoration: none;
}

.button-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}

a.button-danger:hover {
  text-decoration: none;
}

.button-subtle {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

a.button-subtle,
span.button-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 12px;
  text-decoration: none;
}

.button-subtle:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

a.button-subtle:hover {
  text-decoration: none;
}

.button-compact {
  padding: 4px 8px;
  font-size: 0.86rem;
  line-height: 1.2;
}

.admin-dashboard-detail-link,
.admin-dashboard-reminder-link,
.admin-dashboard-payment-link,
.admin-dashboard-create-sales-order-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.admin-dashboard-detail-link.button-compact,
.admin-dashboard-reminder-link.button-compact,
.admin-dashboard-payment-link.button-compact,
.admin-dashboard-create-sales-order-link.button-compact {
  box-sizing: border-box;
  min-height: 26px;
  padding: 4px 8px;
  line-height: 1.2;
}

.admin-dashboard-reminder-link.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.admin-dashboard-reminder-link:disabled,
.admin-dashboard-payment-link:disabled {
  opacity: 0.45;
}

.admin-dashboard-reminder-link.is-loading,
.admin-dashboard-payment-link.is-loading {
  opacity: 0.75;
  cursor: wait;
}

.admin-dashboard-reminder-link.is-loading::before,
.admin-dashboard-payment-link.is-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

.order-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.purchase-entry-list-layout {
  display: grid;
  gap: 10px;
}

.purchase-entry-title-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.purchase-entry-title-block {
  min-width: 0;
}

.purchase-entry-title-block h1 {
  margin: 0;
}

.purchase-entry-title-block p {
  margin: 8px 0 0;
}

.purchase-entry-head-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.purchase-entry-panel {
  gap: 8px;
}

.purchase-slip-monthly-list {
  margin-top: 0;
  gap: 8px;
}

.purchase-slip-month-group {
  display: grid;
  gap: 8px;
}

.purchase-slip-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.purchase-slip-supplier-filter-form {
  min-width: min(320px, 100%);
}

.purchase-slip-supplier-filter-form label {
  margin: 0;
}

.purchase-slip-month-heading {
  margin: 0;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

.purchase-entry-scan-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.purchase-entry-sticky-input {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.purchase-entry-scan-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(96px, 0.6fr) minmax(96px, 0.6fr) minmax(96px, 0.6fr);
  gap: 10px;
}

.purchase-entry-scan-grid input {
  font-size: 1.05rem;
}

.purchase-entry-current-product {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.purchase-entry-inline-message {
  margin: 0;
}

.purchase-entry-line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.purchase-entry-product-label {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.purchase-entry-product-name {
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.35;
  min-width: 0;
}

.purchase-entry-items-wrap {
  max-height: min(52vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.purchase-entry-items-wrap table {
  width: 100%;
  margin: 0;
  table-layout: fixed;
  font-size: 0.82rem;
}

.purchase-entry-items-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-soft);
}

.purchase-entry-items-table th,
.purchase-entry-items-table td {
  padding: 4px 5px;
  line-height: 1.25;
  vertical-align: middle;
}

.purchase-entry-items-table th,
.purchase-entry-items-table td,
.purchase-slip-list-table th,
.purchase-slip-list-table td {
  white-space: nowrap;
}

.purchase-entry-items-table th:nth-child(1),
.purchase-entry-items-table td:nth-child(1) {
  width: 36px;
}

.purchase-entry-items-table th:nth-child(2),
.purchase-entry-items-table td:nth-child(2) {
  width: 150px;
}

.purchase-entry-items-table th:nth-child(3),
.purchase-entry-items-table td:nth-child(3) {
  width: auto;
}

.purchase-entry-items-table th:nth-child(4),
.purchase-entry-items-table td:nth-child(4) {
  width: 112px;
}

.purchase-entry-items-table th:nth-child(5),
.purchase-entry-items-table td:nth-child(5),
.purchase-entry-items-table th:nth-child(6),
.purchase-entry-items-table td:nth-child(6),
.purchase-entry-items-table th:nth-child(8),
.purchase-entry-items-table td:nth-child(8) {
  width: 84px;
}

.purchase-entry-items-table th:nth-child(7),
.purchase-entry-items-table td:nth-child(7) {
  width: 58px;
}

.purchase-entry-items-table th:nth-child(9),
.purchase-entry-items-table td:nth-child(9) {
  width: 86px;
}

.purchase-entry-items-table td[data-label="商品名"] {
  min-width: 0;
}

.purchase-entry-row-number {
  min-width: 0;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.purchase-entry-subtotal-cell {
  min-width: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.purchase-entry-cell-input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font: inherit;
}

.purchase-entry-jan-cell {
  min-width: 0;
}

.purchase-entry-number-cell {
  text-align: right;
}

.purchase-entry-cell-input:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(37, 99, 235, 0.16);
}

.purchase-entry-items-table .filter-combobox {
  width: 100%;
  min-width: 0;
}

.purchase-entry-items-table .filter-combobox-input-row {
  min-width: 0;
}

.purchase-entry-items-table .filter-combobox .purchase-entry-cell-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.purchase-entry-items-table .filter-combobox-toggle {
  width: 24px;
  min-width: 24px;
  height: 28px;
  padding: 0;
  font-size: 0.68rem;
}

.purchase-entry-items-table .filter-combobox-list {
  font-size: 0.82rem;
}

.purchase-entry-cell-text {
  display: inline-block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  vertical-align: middle;
}

.purchase-entry-missing-product {
  color: var(--danger);
  font-weight: 700;
}

.purchase-entry-items-table .button-compact {
  min-width: 0;
  padding: 3px 5px;
  font-size: 0.76rem;
}

.purchase-entry-row-actions {
  white-space: nowrap;
}

.purchase-entry-row-actions .button-compact + .button-compact {
  margin-left: 4px;
}

.payment-entry-grid-table th:nth-child(1),
.payment-entry-grid-table td:nth-child(1) {
  width: 36px;
}

.payment-entry-grid-table th:nth-child(2),
.payment-entry-grid-table td:nth-child(2) {
  width: auto;
}

.payment-entry-grid-table th:nth-child(3),
.payment-entry-grid-table td:nth-child(3),
.payment-entry-grid-table th:nth-child(4),
.payment-entry-grid-table td:nth-child(4) {
  width: 116px;
}

.payment-entry-grid-table th:nth-child(5),
.payment-entry-grid-table td:nth-child(5),
.payment-entry-grid-table th:nth-child(6),
.payment-entry-grid-table td:nth-child(6) {
  width: 112px;
}

.payment-entry-grid-table th:nth-child(7),
.payment-entry-grid-table td:nth-child(7) {
  width: 96px;
}

.payment-entry-grid-table th:nth-child(8),
.payment-entry-grid-table td:nth-child(8) {
  width: 84px;
}

.payment-entry-grid-table th:nth-child(9),
.payment-entry-grid-table td:nth-child(9) {
  width: 56px;
}

.purchase-entry-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
  padding: 8px 0;
}

.purchase-entry-actions {
  justify-content: flex-end;
}

.payment-entry-head-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.payment-entry-inline-message {
  margin: 0;
}

.payment-entry-actions {
  justify-content: flex-end;
}

.payment-entry-last-preview {
  margin: 0;
}

.payment-entry-last-preview h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.payment-entry-last-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.payment-entry-last-preview-list div {
  min-width: 0;
}

.payment-entry-last-preview-list dt {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 2px;
}

.payment-entry-last-preview-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.payment-entry-list-table th,
.payment-entry-list-table td {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .purchase-entry-scan-grid {
    grid-template-columns: 1fr 1fr;
  }

  .purchase-entry-current-product {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.order-summary-reminder-form,
.order-summary-payment-form,
.order-summary-create-sales-order-form {
  display: inline-flex;
}

.shops-open-cell {
  min-width: 112px;
}

.shops-open-cell > form {
  width: 100%;
}

.shops-open-cell > form > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
}

.message {
  padding: 8px 10px;
  border: 1px solid;
  border-radius: 4px;
  margin: 12px 0;
}

.message-error {
  color: #7d261d;
  border-color: #e7c7c3;
  background: #fff3f2;
}

.message-warning {
  color: var(--warn);
  border-color: #f0d7a8;
  background: #fff7e8;
}

#products-inline-message,
#master-data-inline-message,
.app-flash-message {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 24px;
  z-index: 3000;
  width: min(720px, calc(100vw - 32px));
  max-height: min(42vh, 320px);
  overflow: auto;
  margin: 0;
  transform: translateX(-50%);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
}

.flash {
  margin: 12px 0;
  padding: 8px 10px;
  border: 1px solid;
  border-radius: 4px;
}

.flash-success {
  color: var(--ok);
  background: #f0fbf3;
  border-color: #b8e3c2;
}

.flash-warning {
  color: var(--warn);
  background: #fff7e8;
  border-color: #f0d7a8;
}

.flash-error {
  color: #7d261d;
  background: #fff3f2;
  border-color: #e7c7c3;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}

.status-chip-pending {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.status-chip-submitted {
  color: #475569;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.status-chip-remanded {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.status-chip-resubmitted {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.status-chip-accepted {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.status-chip-payment-confirmed {
  color: #155e75;
  background: #ecfeff;
  border-color: #a5f3fc;
}

.status-chip-payment-paid {
  color: #854d0e;
  background: #fefce8;
  border-color: #fde68a;
}

.status-chip-canceled {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

button.reservation-product-master-add-trigger {
  appearance: none;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

button.reservation-product-master-add-trigger:hover,
button.reservation-product-master-add-trigger:focus-visible {
  color: #1e40af;
  background: #eff6ff;
  border-color: #93c5fd;
}

.table-wrap {
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.table-wrap > table {
  margin: 0;
}

.admin-account-table th:last-child,
.admin-account-table td.admin-account-actions-cell {
  width: 184px;
  min-width: 184px;
  white-space: nowrap;
}

.admin-account-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.admin-account-actions > form {
  display: inline-flex;
}

.search-presets-table {
  width: 100%;
  min-width: 960px;
}

.search-presets-table th:last-child,
.search-presets-table td.search-presets-actions-cell {
  width: 152px;
  min-width: 152px;
  white-space: nowrap;
}

.search-presets-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.order-detail-table th,
.order-detail-table td[data-label="BARCD"],
.order-detail-table td[data-label="注文個数"],
.order-detail-table td[data-label="提案個数"],
.order-detail-table td[data-label="仕入単価"],
.order-detail-table td[data-label="税抜小計"],
.order-detail-table td[data-label="数量合計"],
.order-detail-table td[data-label="日時"] {
  white-space: nowrap;
}

.order-history-table {
  table-layout: fixed;
  width: 100%;
}

.order-history-table th:nth-child(1),
.order-history-table td[data-label="日時"] {
  width: 18%;
}

.order-history-table th:nth-child(2),
.order-history-table td[data-label="担当者"] {
  width: 22%;
}

.order-history-table th:nth-child(3),
.order-history-table td[data-label="操作"] {
  width: 12%;
}

.order-history-table th:nth-child(4),
.order-history-table td[data-label="概要"] {
  width: 48%;
}

.order-summary-table {
  table-layout: auto;
  width: 100%;
}

.order-summary-col-date {
  width: 9%;
  white-space: nowrap;
}

.order-summary-col-time {
  width: 10%;
  white-space: nowrap;
}

.order-summary-col-status {
  width: 1%;
  white-space: nowrap;
}

.order-summary-col-primary {
  width: 19%;
}

.order-summary-col-ordered-by {
  width: 14%;
}

.order-summary-col-accepted-by {
  width: 14%;
}

.order-summary-col-amount {
  width: 12%;
}

.order-summary-col-detail {
  width: 12%;
  white-space: nowrap;
}

.order-summary-col-action {
  width: 14%;
  white-space: nowrap;
}

.order-summary-action-cell {
  white-space: nowrap;
}

.sales-summary-table {
  table-layout: fixed;
  min-width: 0;
}

.sales-summary-table th,
.sales-summary-table td {
  overflow-wrap: anywhere;
  word-break: normal;
}

.sales-summary-table .order-summary-col-date {
  width: 11rem;
}

.sales-summary-table th:nth-child(2),
.sales-summary-table th:nth-child(3) {
  width: 13%;
}

.sales-summary-table th:nth-child(4),
.sales-summary-table th:nth-child(5),
.sales-summary-table th:nth-child(6),
.sales-summary-table th:nth-child(7) {
  width: 5.5rem;
}

.sales-summary-table th:nth-child(8),
.sales-summary-table th:nth-child(9) {
  width: 7rem;
}

.sales-summary-table .order-summary-col-action {
  width: 10.5rem;
}

.sales-summary-table .order-summary-action-cell {
  white-space: normal;
}

.sales-summary-table .order-summary-action-cell .button-compact,
.sales-summary-table .order-summary-action-cell .status-chip {
  margin: 2px 4px 2px 0;
}

.sales-summary-action-form {
  display: inline-flex;
  margin: 0;
}

.sales-summary-detail-button {
  margin-right: 6px;
}

.order-detail-table td[data-label="商品名"] a {
  word-break: break-word;
}


.cart-summary-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin: 6px 0 10px;
}

.cart-summary-kpi {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.cart-summary-kpi-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.cart-summary-kpi-value {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.cart-quantity-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.cart-qty-input {
  flex: 0 0 96px;
  width: 96px;
  text-align: right;
  padding-right: 6px;
}

.cart-item-delete-button {
  min-width: 64px;
}

.cart-header-actions {
  justify-content: flex-end;
}

#cart-checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 192px;
  block-size: 96px;
  min-width: 192px;
  min-height: 96px;
  padding: 10px;
  border-radius: 8px;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.assignee-dual-list {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  gap: 14px;
  align-items: center;
}

.assignee-dual-list-column {
  min-width: 0;
}

.assignee-list-select {
  min-height: 260px;
}

.assignee-dual-list-actions {
  display: grid;
  gap: 8px;
}

.assignee-dual-list-actions .button-subtle {
  min-width: 92px;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.95rem;
}

th,
td {
  border: 1px solid var(--line);
  padding: 7px 9px;
  text-align: left;
  vertical-align: top;
}

td.numeric-cell {
  text-align: right;
  white-space: nowrap;
}

th {
  background: var(--surface-soft);
  font-weight: 600;
  text-align: left;
}

th.numeric-col,
th.rate-cell-right {
  text-align: left;
}

code {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
}

.muted {
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1200;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop.barcode-scan-backdrop {
  padding: 16px;
}

body.modal-scroll-locked {
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
  overscroll-behavior: none;
}

.modal {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 10px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.modal-wide {
  width: min(960px, 100%);
}

.modal h2 {
  margin: 0;
}

.visually-hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mail-attachment-dropzone {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--surface-muted);
}

.mail-attachment-dropzone.is-dragover {
  border-color: var(--primary);
  background: var(--surface-soft);
}

.mail-attachment-dropzone .muted {
  margin: 0;
}

.mail-attachment-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.mail-attachment-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.mail-attachment-list-label {
  min-width: 0;
  flex: 1 1 auto;
  font-size: 0.85rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.mail-attachment-list-item .button-compact {
  flex: 0 0 auto;
  white-space: nowrap;
}

.action-confirm-comment-hint {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.modal.barcode-scan-modal {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.barcode-scan-modal-header,
.barcode-scan-modal-body,
.barcode-scan-modal-footer {
  flex: 0 0 auto;
  min-height: 0;
}

.barcode-scan-modal-header {
  display: grid;
  gap: 6px;
}

.barcode-scan-modal-status,
.barcode-scan-modal-result {
  margin: 0;
  line-height: 1.4;
}

.barcode-scan-modal-body {
  flex: 1 1 auto;
  display: grid;
  gap: 8px;
}

.barcode-scan-modal-footer {
  display: grid;
  gap: 8px;
}

.barcode-scan-modal-settings .checkbox-row {
  margin: 0;
}

.barcode-scan-camera-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 0;
}

.barcode-scan-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.barcode-scan-camera-select-wrap span {
  flex: 0 0 auto;
}

.barcode-scan-camera-select {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  font-size: 16px;
}

.barcode-scan-modal-buttons {
  align-items: stretch;
}

.barcode-scan-modal-button {
  width: 120px;
  flex: 0 0 120px;
}

.barcode-scan-mirror-toggle {
  margin: 0;
  flex: 0 0 auto;
}

.barcode-scan-modal-result {
  min-height: 2.2em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.barcode-scan-modal-result-label,
.barcode-scan-modal-result-value {
  display: inline-block;
}

.barcode-scan-modal-result-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

.barcode-scan-modal-result-success {
  padding: 10px 12px;
  min-height: 0;
  border-radius: 12px;
  background: #e6f4ef;
  color: #125c4c;
  box-shadow: 0 8px 20px rgba(18, 92, 76, 0.18);
  transform: scale(1.02);
  animation: barcode-scan-success-pop 180ms ease-out;
}

.barcode-scan-modal-result-success .barcode-scan-modal-result-label {
  font-size: 1rem;
  font-weight: 800;
}

.barcode-scan-modal-result-success .barcode-scan-modal-result-value {
  font-size: 1.02rem;
  font-weight: 700;
}

@keyframes barcode-scan-success-pop {
  0% {
    opacity: 0.4;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.app-error-modal {
  width: min(560px, 100%);
  background: var(--surface);
}

.app-error-modal-title {
  margin: -16px -16px 4px;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--line);
}

.app-error-modal[data-modal-type="success"] {
  border-color: #b8e3c2;
}

.app-error-modal[data-modal-type="success"] .app-error-modal-title {
  color: #166534;
  background: #f0fbf3;
  border-bottom-color: #b8e3c2;
}

.app-error-modal[data-modal-type="warning"] {
  border-color: #f0d7a8;
}

.app-error-modal[data-modal-type="warning"] .app-error-modal-title {
  color: #b45309;
  background: #fff7e8;
  border-bottom-color: #f0d7a8;
}

.app-error-modal[data-modal-type="error"] {
  border-color: #e7c7c3;
}

.app-error-modal[data-modal-type="error"] .app-error-modal-title {
  color: #7d261d;
  background: #fff3f2;
  border-bottom-color: #e7c7c3;
}

.barcode-scan-preview-wrap {
  position: relative;
  width: 100%;
  height: clamp(156px, 28svh, 224px);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
}

.barcode-scan-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #111827;
  object-fit: contain;
}

.barcode-scan-reader {
  width: 100%;
  height: 100%;
}

.barcode-scan-reader video {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
}

.barcode-scan-preview-wrap.is-mirrored .barcode-scan-video,
.barcode-scan-preview-wrap.is-mirrored .barcode-scan-reader video {
  transform: scaleX(-1);
  transform-origin: center;
}

.barcode-scan-guide {
  position: absolute;
  inset: 0;
  display: none;
  align-content: center;
  justify-items: center;
  gap: 12px;
  pointer-events: none;
  padding: 18px;
  background:
    linear-gradient(rgba(17, 24, 39, 0.28), rgba(17, 24, 39, 0.28));
}

.barcode-scan-preview-wrap.show-native-guide .barcode-scan-guide {
  display: grid;
}

.barcode-scan-guide-frame {
  width: var(--barcode-scan-guide-width, min(88%, 320px));
  height: var(--barcode-scan-guide-height, 110px);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  box-shadow:
    0 0 0 999px rgba(17, 24, 39, 0.1),
    0 0 0 1px rgba(17, 24, 39, 0.35) inset;
  position: relative;
}

.barcode-scan-guide-frame::before,
.barcode-scan-guide-frame::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
}

.barcode-scan-guide-frame::before {
  top: 22px;
}

.barcode-scan-guide-frame::after {
  bottom: 22px;
}

.barcode-scan-guide-label {
  margin: 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  color: #f9fafb;
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 767px) {
  .modal-backdrop.barcode-scan-backdrop {
    align-items: flex-start;
    padding: 12px;
  }

  .modal.barcode-scan-modal {
    width: min(560px, calc(100vw - 16px));
  }

  .barcode-scan-preview-wrap {
    height: clamp(208px, 38svh, 300px);
  }

  .barcode-scan-camera-select-wrap,
  .barcode-scan-camera-select,
  .barcode-scan-modal-button {
    width: 100%;
    max-width: 100%;
  }

  .barcode-scan-toggle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .barcode-scan-modal-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    overflow-x: hidden;
  }

  .barcode-scan-video,
  .barcode-scan-reader video {
    object-fit: cover;
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .barcode-scan-preview-wrap {
    height: 180px;
  }
}

@media (min-width: 768px) {
  .barcode-scan-preview-wrap {
    height: 280px;
  }

  .barcode-scan-camera-select-wrap {
    flex: 0 1 320px;
  }

  .barcode-scan-modal-button {
    width: 120px;
    max-width: none;
  }
}

.voice-barcode-result {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  word-break: break-word;
}

.barcode-voice-modal {
  width: min(520px, calc(100vw - 24px));
}

.barcode-voice-modal-body,
.barcode-voice-modal-settings {
  gap: 8px;
}

.barcode-voice-modal-settings .checkbox-row {
  margin: 0;
}

.barcode-voice-transcript,
.barcode-voice-summary {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.barcode-voice-modal-buttons {
  align-items: stretch;
}

.barcode-voice-modal-button {
  width: 120px;
  flex: 0 0 120px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.25);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.loading-overlay-card {
  min-width: 220px;
  max-width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.loading-overlay-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #d1d5db;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

.modal-processing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.modal-processing-indicator p {
  margin: 0;
}

.modal-processing-indicator-spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

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

button.is-submit-loading::before {
  content: "";
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.password-code {
  display: inline-block;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .page {
    padding: 16px 14px 28px;
  }

  .panel {
    padding: 14px;
  }

  .header h1 {
    font-size: 1.3rem;
  }

  .products-filter-input {
    width: 280px;
  }
}

@media (max-width: 767px) {
  .page {
    padding: 12px 10px 24px;
  }

  .panel {
    padding: 12px;
  }

  .header {
    align-items: flex-start;
  }

  .shop-console-menu-wrap {
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
  }

  .shop-console-shop-name-block {
    flex-basis: 100%;
  }

  .shop-primary-nav {
    gap: 6px;
    flex-wrap: wrap;
  }

  .header h1 {
    font-size: 1.2rem;
  }

  .shop-console-page-title {
    font-size: 1.55rem;
    padding-bottom: 3px;
  }

  .shop-console-shop-name {
    font-size: 1.45rem;
  }

  .actions {
    gap: 6px;
  }

  .cart-header-actions {
    align-items: stretch;
  }

  #cart-checkout-button {
    inline-size: 100%;
    min-width: 0;
  }

  .products-filter-row {
    align-items: stretch;
  }

  .products-filter-label {
    width: 100%;
    margin-top: 4px;
  }

  .products-filter-input {
    width: 100%;
  }

  .assignee-dual-list {
    grid-template-columns: 1fr;
  }

  .assignee-dual-list-actions {
    grid-template-columns: 1fr 1fr;
  }

  .responsive-table:not(.product-list-table) {
    border: 0;
    background: transparent;
    font-size: 0.9rem;
  }

  .table-wrap.product-list-desktop {
    display: none;
  }

  .product-list-mobile {
    display: block;
  }

  .product-list-mobile-select-all {
    display: flex;
  }

  .cart-summary-kpis {
    grid-template-columns: 1fr;
  }

  .responsive-table:not(.product-list-table) thead {
    display: none;
  }

  .responsive-table:not(.product-list-table) tbody,
  .responsive-table:not(.product-list-table) tr,
  .responsive-table:not(.product-list-table) td {
    display: block;
    width: 100%;
  }

  .responsive-table:not(.product-list-table) tr {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    padding: 6px 8px;
    margin-bottom: 6px;
  }

  .responsive-table:not(.product-list-table) td {
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 4px 0 4px 92px;
    position: relative;
    line-height: 1.35;
    min-height: 28px;
    text-align: left;
  }

  .responsive-table:not(.product-list-table) td:last-child {
    border-bottom: 0;
  }

  .responsive-table:not(.product-list-table) td::before {
    content: attr(data-label);
    display: block;
    position: absolute;
    left: 0;
    top: 4px;
    width: 84px;
    color: var(--muted);
    font-size: 0.82rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  .responsive-table:not(.product-list-table) td > a,
  .responsive-table:not(.product-list-table) td > button {
    justify-self: start;
  }

  .responsive-table:not(.product-list-table) td[data-label="選択"] {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0;
    text-align: left;
  }

  .responsive-table:not(.product-list-table) td[data-label="選択"]::before {
    display: none;
    content: '';
  }

  .responsive-table:not(.product-list-table) td[data-label="選択"] input[type="checkbox"] {
    display: block;
    margin: 0;
  }

  .responsive-table:not(.product-list-table) td.numeric-cell {
    text-align: right;
  }

  .responsive-table:not(.product-list-table) td.numeric-cell > * {
    justify-self: end;
    text-align: right;
  }

  .responsive-table:not(.product-list-table) td[data-label="上代"],
  .responsive-table:not(.product-list-table) td[data-label="掛率目安"],
  .responsive-table:not(.product-list-table) td[data-label="仕入れ"],
  .responsive-table:not(.product-list-table) td[data-label="在庫数"],
  .responsive-table:not(.product-list-table) td[data-label="有効在庫数"],
  .responsive-table:not(.product-list-table) td.numeric-cell {
    display: block;
    text-align: left;
  }

  .cart-quantity-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .responsive-table:not(.product-list-table) .table-empty-row {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
  }

  .responsive-table:not(.product-list-table) .table-empty-row td {
    border: 0;
    display: block;
    width: 100%;
    padding: 8px 0;
    grid-template-columns: none;
    text-align: left;
  }

  .responsive-table:not(.product-list-table) .table-empty-row td::before {
    content: '';
    display: none;
  }
}
