:root {
  --brand-text: #172033;
  --brand-page-bg: #eef2f6;
  --brand-hero-bg:
    linear-gradient(90deg, rgba(14, 24, 38, 0.94), rgba(14, 24, 38, 0.88)),
    #101827;
  --brand-hero-text: #f8fafc;
  --brand-hero-muted: #cbd5e1;
  --brand-primary: #f59e0b;
  --brand-primary-strong: #d97706;
  --brand-primary-soft: #fbbf24;
  --brand-primary-text: #0f172a;
  --brand-focus-outline: rgba(245, 158, 11, 0.22);

  color: var(--brand-text);
  background: var(--brand-page-bg);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

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

button {
  border: 0;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.05fr);
  background: var(--brand-hero-bg);
}

.brand-pane {
  color: var(--brand-hero-text);
  padding: 48px clamp(24px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 100vh;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-hero-text);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: var(--brand-primary);
  box-shadow: inset 0 -9px 0 rgba(15, 23, 42, 0.18);
}

.brand-mark-logo {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
}

html[data-brand="karisoku"] .brand-mark::before {
  display: none;
}

.brand-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand-primary-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  margin: 22px 0 0;
  color: var(--brand-hero-muted);
  max-width: 520px;
  font-size: 16px;
}

.signal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
}

.signal {
  min-height: 90px;
  border: 1px solid rgba(203, 213, 225, 0.22);
  border-radius: 6px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.signal strong,
.signal span {
  display: block;
}

.signal strong {
  color: var(--brand-hero-text);
  font-size: 20px;
}

.signal span {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.form-pane {
  background: #f8fafc;
  padding: 40px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-panel {
  width: min(100%, 520px);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.auth-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 22px 24px 18px;
}

.auth-header h2 {
  margin: 0;
  color: #172033;
  font-size: 24px;
  letter-spacing: 0;
}

.auth-header p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e2e8f0;
}

.tab {
  display: block;
  padding: 13px 12px;
  color: #475569;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 3px solid transparent;
}

.tab[aria-current="page"] {
  color: #0f172a;
  border-bottom-color: var(--brand-primary);
}

.auth-body {
  padding: 24px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field label {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  background: #ffffff;
  color: #0f172a;
}

.field textarea {
  resize: vertical;
  min-height: 160px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-primary-strong);
  outline: 3px solid var(--brand-focus-outline);
}

.field-hint {
  color: #64748b;
  font-size: 12px;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 44px;
  border-radius: 6px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  color: var(--brand-primary-text);
  background: var(--brand-primary);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.secondary-button {
  color: #172033;
  background: #e2e8f0;
}

.danger-button {
  color: #ffffff;
  background: #dc2626;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.text-link {
  color: #075985;
  font-weight: 700;
  text-decoration: none;
}

.notice,
.error {
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}

.notice {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.asin-sp-api-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
}

.asin-sp-api-notice[hidden] {
  display: none;
}

.list-status:empty,
.price-rules-status:empty {
  display: none;
}

.settings-shell {
  min-height: 100vh;
  padding: 32px clamp(16px, 4vw, 56px);
  background: var(--brand-page-bg);
}

.settings-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.settings-header h1 {
  color: #172033;
  font-size: clamp(34px, 4vw, 52px);
}

.settings-header p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #475569;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: start;
}

.header-center {
  display: flex;
  justify-content: center;
}

.user-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  justify-self: end;
}

.user-nav a,
.user-nav button,
.nav-menu-summary {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  color: #334155;
  background: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.user-nav a[aria-current="page"],
.nav-menu-summary[aria-current="page"] {
  border-color: #172033;
  color: #f8fafc;
  background: #172033;
}

.user-nav a[data-purchase-tool-nav].is-attention {
  border-color: var(--brand-primary);
  color: #92400e;
  background: #fffbeb;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.user-nav a[data-purchase-tool-nav].is-update:not([aria-current="page"]) {
  border-color: var(--brand-primary);
}

.nav-menu {
  position: relative;
}

.nav-menu-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-menu-summary::-webkit-details-marker {
  display: none;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  display: grid;
  min-width: 176px;
  gap: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

.nav-menu-panel .nav-menu-item {
  justify-content: flex-start;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: #334155;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-menu-panel .nav-menu-item:hover,
.nav-menu-panel .nav-menu-item:focus {
  background: #eef2f6;
}

.nav-menu-panel .nav-menu-item[aria-current="page"] {
  color: #f8fafc;
  background: #172033;
}

.user-nav button {
  cursor: pointer;
  background: #e2e8f0;
}

.nav-menu-panel button.nav-menu-item {
  cursor: pointer;
  background: transparent;
}

.nav-badge {
  border-radius: 999px;
  padding: 2px 6px;
  color: #92400e;
  background: #fef3c7;
  font-size: 11px;
  line-height: 1.2;
}

.nav-badge[hidden] {
  display: none;
}

.purchase-nav-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  color: #172033;
  background: #ffffff;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.purchase-nav-toggle.is-on {
  border-color: #16a34a;
  color: #166534;
  background: #ecfdf5;
}

.purchase-nav-toggle.is-error {
  border-color: #f59e0b;
  color: #92400e;
  background: #fffbeb;
}

.purchase-nav-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
}

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

.dashboard-card {
  min-height: 150px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  color: #172033;
  text-decoration: none;
}

.dashboard-card strong,
.dashboard-card span {
  display: block;
}

.dashboard-card strong {
  font-size: 18px;
}

.dashboard-card span {
  margin-top: 8px;
  color: #475569;
  font-size: 13px;
}

.settings-kicker {
  margin: 0 0 8px;
  color: #b45309;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.settings-grid > * {
  min-width: 0;
}

.settings-stack {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.settings-grid.single {
  grid-template-columns: minmax(320px, 720px);
}

.settings-panel {
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.settings-panel h2 {
  margin: 0 0 16px;
  color: #172033;
  font-size: 19px;
  letter-spacing: 0;
}

.purchase-tool-list {
  display: grid;
  gap: 12px;
}

.purchase-tool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.purchase-tool-client-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px 16px;
  background: #ffffff;
}

.purchase-tool-client-status.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
}

.purchase-tool-client-status.is-warning {
  border-color: #fcd34d;
  background: #fffbeb;
}

.purchase-tool-client-status.is-muted {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.purchase-tool-client-main {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.purchase-tool-client-title {
  color: #172033;
  font-size: 15px;
}

.purchase-tool-client-detail,
.purchase-tool-client-meta {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.purchase-tool-client-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.sp-api-speed-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}

.sp-api-speed-hint[hidden] {
  display: none;
}

.sp-api-speed-hint.empty,
.sp-api-speed-hint.single {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.sp-api-speed-hint.multi,
.sp-api-speed-hint.full {
  border-color: #86efac;
  background: #f0fdf4;
}

.sp-api-speed-hint-main {
  display: grid;
  gap: 3px;
  min-width: 220px;
}

.sp-api-speed-hint-main strong {
  color: #172033;
  font-size: 14px;
}

.sp-api-speed-hint-main span,
.sp-api-speed-hint-count {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.sp-api-speed-hint-count {
  white-space: nowrap;
}

.help-layout {
  display: grid;
  gap: 18px;
  max-width: 1120px;
}

.help-panel {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.help-panel h2 {
  margin: 0 0 12px;
  color: #172033;
  font-size: 22px;
  letter-spacing: 0;
}

.help-panel h3 {
  margin: 0 0 6px;
  color: #172033;
  font-size: 16px;
  letter-spacing: 0;
}

.help-panel p {
  margin: 0 0 12px;
  color: #475569;
}

.help-panel ol {
  margin: 0 0 16px 1.3em;
  padding: 0;
  color: #172033;
}

.help-panel li {
  margin: 4px 0;
}

.help-panel img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin-top: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.help-trouble {
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.help-trouble + .help-trouble {
  margin-top: 14px;
}

.platform-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 12px;
}

.platform-choice {
  display: grid;
  gap: 6px;
  min-height: 96px;
  justify-items: start;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 16px;
  color: #172033;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.platform-choice:hover {
  border-color: #f59e0b;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.platform-choice-title {
  font-size: 18px;
  font-weight: 900;
}

.platform-choice-subtitle {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.release-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.release-status-row h3 {
  margin: 0;
  color: #172033;
  font-size: 17px;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.is-new {
  color: #92400e;
  background: #fef3c7;
}

.status-pill.is-ok {
  color: #166534;
  background: #dcfce7;
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 10px 0 0;
  color: #475569;
  font-size: 13px;
}

.release-meta dt {
  font-weight: 800;
}

.release-meta dd {
  margin: 0;
}

.release-notes {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #475569;
  font-size: 13px;
}

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

.purchase-tool-download {
  text-decoration: none;
}

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

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

.compact-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.price-rules-panel,
.purchase-settings-panel {
  width: min(100%, 560px);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 auto 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.app-header .price-rules-panel {
  margin: 0;
}

.settings-stack > .price-rules-panel,
.settings-stack > .purchase-settings-panel {
  width: 100%;
  margin: 0;
}

.settings-stack .price-rules-body {
  display: grid;
  gap: 12px;
}

.settings-stack .price-inline-settings {
  justify-content: flex-start;
  margin-top: 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.settings-stack .price-inline-settings label {
  grid-template-columns: max-content 90px auto;
}

.settings-stack .price-rules-summary {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 6px 18px;
}

.asin-register-shell {
  padding: 10px clamp(8px, 1.2vw, 14px);
  background: #f3f6fa;
}

.asin-register-shell .settings-header {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.asin-register-shell .settings-kicker {
  margin-bottom: 3px;
  color: #475569;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.asin-register-shell .settings-header h1 {
  font-size: 26px;
  line-height: 1;
}

.asin-register-shell .settings-header p:not(.settings-kicker) {
  display: none;
}

.asin-register-shell .user-nav {
  gap: 6px;
}

.asin-register-shell .user-nav a,
.asin-register-shell .user-nav button,
.asin-register-shell .nav-menu-summary {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 12px;
}

.asin-register-shell .nav-menu-panel .nav-menu-item {
  min-height: 30px;
  font-size: 12px;
}

.asin-register-shell .purchase-nav-toggle {
  min-height: 28px;
  border-radius: 5px;
  padding: 0 8px;
  font-size: 12px;
}

.asin-register-shell .settings-grid {
  grid-template-columns: minmax(500px, 1fr) minmax(620px, 1.2fr);
  align-items: start;
  gap: 8px;
}

.asin-register-shell .settings-stack {
  display: contents;
}

.asin-register-shell .asin-registration-panel {
  grid-column: 1;
}

.asin-register-shell .price-rules-panel {
  grid-column: 2;
}

.asin-register-shell .asin-list-panel {
  grid-column: 1 / -1;
}

.asin-register-shell .settings-panel,
.asin-register-shell .price-rules-panel,
.asin-register-shell .purchase-settings-panel {
  border-radius: 4px;
  padding: 8px;
  box-shadow: none;
}

.asin-register-shell .settings-panel h2 {
  margin-bottom: 7px;
  font-size: 14px;
}

.asin-register-shell .asin-registration-panel .asin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
}

.asin-register-shell .asin-registration-panel .field {
  grid-column: 1 / -1;
  margin: 0;
}

.asin-register-shell .asin-registration-panel .registration-preview {
  grid-column: 1;
}

.asin-register-shell .asin-registration-panel .actions {
  grid-column: 2;
  align-self: end;
  justify-content: flex-end;
  margin: 0;
}

.asin-register-shell .asin-registration-panel .primary-button {
  min-height: 36px;
  padding: 0 18px;
}

.asin-register-shell .asin-form textarea {
  min-height: 58px;
  height: 58px;
  max-height: 160px;
}

.asin-register-shell .asin-registration-panel .field-hint {
  font-size: 11px;
  line-height: 1.35;
}

.asin-register-shell .price-rules-panel,
.asin-register-shell .purchase-settings-panel {
  padding: 10px 12px;
}

.asin-register-shell .compact-heading {
  margin-bottom: 8px;
}

.asin-register-shell .price-rules-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 6px;
  font-size: 11px;
}

.asin-register-shell .price-rules-summary li {
  flex: 0 0 auto;
  white-space: nowrap;
}

.asin-register-shell .price-rules-summary li::before {
  content: none;
}

.price-rule-chip {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 5px;
  border: 1px solid #dbe3ee;
  border-radius: 5px;
  padding: 0 7px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
}

.price-rule-chip strong {
  color: #172033;
}

.asin-register-shell .price-inline-settings {
  gap: 6px 14px;
  padding-top: 8px;
}

.asin-register-shell .price-inline-settings label {
  font-size: 12px;
}

.asin-register-shell .price-inline-settings input {
  min-height: 28px;
}

.asin-register-shell .panel-heading {
  align-items: start;
  margin-bottom: 8px;
}

.asin-register-shell .filter-row {
  margin-bottom: 0;
}

.asin-register-shell .sku-problem-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #fbbf24;
  border-radius: 6px;
  padding: 4px 7px;
  margin-bottom: 4px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.asin-register-shell .sku-problem-alert[hidden] {
  display: none;
}

.asin-register-shell .purchase-settings-panel {
  display: grid;
  gap: 6px;
}

.asin-register-shell .global-purchase-toggle {
  color: #172033;
}

.asin-register-shell .asin-list-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 6px 10px;
  margin-bottom: 7px;
}

.asin-register-shell .list-tool-row {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: end;
  justify-content: stretch;
  gap: 6px 8px;
  margin: 0;
}

.asin-register-shell .list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.asin-register-shell .search-field {
  width: 100%;
  flex: 0 1 auto;
  min-width: 0;
}

.asin-register-shell .filter-row {
  gap: 5px;
  margin: 0;
}

.asin-register-shell .title-count {
  margin-left: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.asin-register-shell .compact {
  min-height: 24px;
  padding: 0 7px;
  font-size: 11px;
}

.asin-register-shell .row-update-button:disabled {
  display: none;
}

.asin-register-shell .row-update-button.is-dirty {
  color: #ffffff;
  background: #1d4ed8;
  opacity: 1;
}

.asin-register-shell .asin-table.with-sku-lane {
  min-width: 0;
}

.asin-register-shell .asin-table.asin-only {
  min-width: 0;
}

.asin-register-shell .asin-table th.select-col,
.asin-register-shell .asin-table td.select-col {
  width: 28px;
  text-align: center;
}

.asin-register-shell .asin-table th:nth-child(2),
.asin-register-shell .asin-table td:nth-child(2) {
  width: 16%;
}

.asin-register-shell .asin-table th:nth-child(3),
.asin-register-shell .asin-table td:nth-child(3) {
  width: 27%;
}

.asin-register-shell .asin-table th:nth-child(4),
.asin-register-shell .asin-table td:nth-child(4) {
  width: 25%;
}

.asin-register-shell .asin-table th:nth-child(5),
.asin-register-shell .asin-table td:nth-child(5) {
  width: 8%;
  white-space: nowrap;
}

.asin-register-shell .asin-table th:nth-child(6),
.asin-register-shell .asin-table td:nth-child(6) {
  width: 8%;
  white-space: nowrap;
}

.asin-register-shell .asin-table th:nth-child(7),
.asin-register-shell .asin-table td:nth-child(7) {
  width: 6%;
  text-align: center;
}

.asin-register-shell .asin-table th:nth-child(8),
.asin-register-shell .asin-table td:nth-child(8) {
  width: 10%;
}

.asin-register-shell .asin-table td:nth-child(3),
.asin-register-shell .asin-table td:nth-child(4) {
  font-family: inherit;
}

.asin-register-shell .asin-table td:last-child {
  display: table-cell;
}

.asin-register-shell .settings-table th,
.asin-register-shell .settings-table td {
  padding: 7px 8px;
}

.asin-register-shell .table-sort-button {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border: 0;
  padding: 0;
  color: #334155;
  background: transparent;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.asin-register-shell .table-sort-button:hover,
.asin-register-shell .table-sort-button.is-active {
  color: #0f172a;
}

.asin-register-shell .table-sort-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}

.asin-register-shell .table-sort-group.identity-sort {
  gap: 3px 8px;
}

.asin-register-shell .table-sort-group.price-sort {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.asin-register-shell .last-notification-cell,
.asin-register-shell .registered-at-cell {
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.registration-preview {
  display: grid;
  gap: 5px;
  margin: 0;
}

.registration-preview[hidden] {
  display: none;
}

.registration-preview-summary {
  min-height: 28px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  padding: 6px 8px;
  color: #475569;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.registration-preview-summary.has-error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

.registration-preview-table-wrap {
  max-height: 96px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.registration-preview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.registration-preview-table th,
.registration-preview-table td {
  border-top: 1px solid #e2e8f0;
  padding: 4px 5px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.registration-preview-table th {
  color: #475569;
  background: #f8fafc;
  font-weight: 900;
}

.registration-preview-table th:nth-child(1),
.registration-preview-table td:nth-child(1) {
  width: 24px;
}

.registration-preview-table th:nth-child(4),
.registration-preview-table td:nth-child(4) {
  width: 40px;
}

.registration-preview-table tr.has-error td {
  color: #991b1b;
  background: #fff1f2;
}

.registration-preview-table tr.has-warning td {
  color: #92400e;
  background: #fffbeb;
}

.asin-identity-stack {
  display: grid;
  gap: 5px;
  align-content: start;
}

.asin-identity-stack strong {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
}

.asin-lane-sku-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 3px;
  align-items: center;
}

.external-product-link {
  color: #075985;
  text-decoration: none;
}

.external-product-link:hover {
  text-decoration: underline;
}

.title-link {
  color: #172033;
}

.product-title-cell strong {
  display: block;
  max-width: 100%;
  color: #172033;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.settings-table td.product-title-cell,
.settings-table td.product-summary-cell {
  font-family: inherit;
}

.product-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.product-thumb-frame {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
  text-decoration: none;
}

.product-thumb-frame > * {
  grid-area: 1 / 1;
}

.product-thumb {
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
  opacity: 0;
  background: #ffffff;
}

.product-thumb.is-loaded {
  opacity: 1;
}

.product-thumb.is-failed {
  display: none;
}

.product-thumb-placeholder {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 5px;
  color: #64748b;
  background: #eef2f6;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.product-thumb-placeholder.is-hidden {
  display: none;
}

.price-stack {
  display: grid;
  gap: 2px;
}

.price-result-stack {
  display: grid;
  gap: 3px;
}

.asin-register-shell .price-result-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.price-config-stack {
  display: grid;
  gap: 3px;
}

.asin-register-shell .price-config-stack {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 10px;
}

.price-control-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 3px;
  align-items: center;
}

.price-control-row > span:first-child {
  color: #475569;
  font-size: 10px;
  font-weight: 900;
}

.price-stack strong {
  font-size: 12px;
}

.profit-positive {
  color: #166534;
}

.profit-negative {
  color: #991b1b;
}

.count-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: #334155;
  background: #eef2f6;
  font-size: 12px;
  font-weight: 900;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.quantity-control input {
  box-sizing: border-box;
  width: 56px;
  min-height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 4px 6px;
  color: #172033;
  background: #ffffff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.quantity-control span {
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}

.status-stack {
  display: grid;
  gap: 3px;
  align-content: start;
}

.asin-register-shell .asin-table tr[data-sku-problem="true"] td {
  background: #fff7ed;
}

.asin-register-shell .asin-table tr[data-sku-problem="true"] td:first-child {
  box-shadow: inset 3px 0 0 #f97316;
}

.asin-register-shell .asin-table tr[data-status="paused"] td {
  background: #f8fafc;
  color: #475569;
}

.asin-register-shell
  .asin-table
  tr[data-sku-problem="true"][data-status="paused"]
  td {
  background: #fef3f2;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-start;
  position: relative;
}

.price-rules-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: #334155;
  font-size: 13px;
}

.price-rules-summary li::before {
  content: "•";
  margin-right: 7px;
  color: #475569;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.5);
}

.modal-panel {
  width: min(100%, 640px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

.modal-panel h2 {
  margin: 0 0 16px;
  color: #172033;
  font-size: 20px;
}

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

.modal-heading h2 {
  margin: 0;
}

.sp-api-edit-modal {
  width: min(100%, 720px);
}

.credential-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.credential-summary-item {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
}

.credential-summary-item span,
.credential-summary-item strong {
  display: block;
}

.credential-summary-item span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.credential-summary-item strong {
  margin-top: 4px;
  color: #172033;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.modal-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  margin-top: 16px;
}

.modal-section h3 {
  margin: 0 0 12px;
  color: #172033;
  font-size: 16px;
}

.modal-form {
  gap: 12px;
}

.modal-note {
  margin: -2px 0 12px;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.credential-rotation-section {
  margin-bottom: 4px;
}

.bulk-delete-modal {
  width: min(100%, 420px);
}

.delete-confirm-modal {
  width: min(100%, 420px);
}

.password-change-modal {
  width: min(100%, 460px);
}

.password-change-modal .modal-form {
  display: grid;
  gap: 14px;
}

.password-change-modal .field {
  margin-bottom: 0;
}

.password-change-modal .actions {
  justify-content: flex-end;
}

.delete-confirm-target {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 0 10px;
  color: #172033;
  background: #f8fafc;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.delete-target-summary {
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px 10px;
  margin: 0 0 12px;
  color: #172033;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.bulk-delete-modal textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px;
  color: #172033;
  background: #ffffff;
  font: inherit;
}

.price-rules-editor {
  display: grid;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.price-rules-editor-head,
.price-rules-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.price-rules-editor-head {
  color: #475569;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.price-rules-editor-row:last-child {
  border-bottom: 0;
}

.price-band-inputs,
.drop-rate-input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.drop-rate-input {
  justify-content: flex-start;
}

.price-rules-editor input {
  width: 100px;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
}

.drop-rate-input input {
  width: 72px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
}

.asin-table {
  min-width: 1080px;
  table-layout: fixed;
}

.asin-table th:nth-child(1),
.asin-table td:nth-child(1) {
  width: 14%;
}

.asin-table th:nth-child(2),
.asin-table td:nth-child(2) {
  width: 10%;
}

.asin-table th:nth-child(3),
.asin-table td:nth-child(3) {
  width: 20%;
}

.asin-table th:nth-child(4),
.asin-table td:nth-child(4) {
  width: 13%;
}

.asin-table th:nth-child(5),
.asin-table td:nth-child(5) {
  width: 14%;
}

.asin-table th:nth-child(6),
.asin-table td:nth-child(6) {
  width: 20%;
}

.settings-table th,
.settings-table td {
  border-top: 1px solid #e2e8f0;
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.asin-table th,
.asin-table td {
  padding: 10px 8px;
}

.asin-table th:nth-child(4),
.asin-table td:nth-child(4) {
  padding-right: 14px;
}

.asin-table th:nth-child(5),
.asin-table td:nth-child(5) {
  padding-left: 14px;
}

.settings-table th {
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
}

.settings-table td {
  color: #172033;
  font-size: 13px;
}

.asin-register-shell .settings-table td {
  font-size: 11px;
}

.settings-table td:nth-child(2),
.settings-table td:nth-child(3),
.settings-table td:nth-child(4) {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.settings-table td:last-child {
  display: flex;
  gap: 8px;
}

.asin-table td:last-child {
  flex-wrap: nowrap;
  gap: 6px;
}

.asin-table td:last-child .compact {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.inline-price-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  white-space: nowrap;
}

.inline-price-cell input {
  width: 104px;
  min-height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  color: #172033;
  background: #ffffff;
  font: inherit;
}

.asin-register-shell .inline-price-cell {
  gap: 4px;
}

.asin-register-shell .inline-price-cell input {
  width: 96px;
  min-width: 96px;
  min-height: 22px;
  padding: 3px 6px;
  font-size: 10px;
}

@media (max-width: 1280px) {
  .asin-register-shell .asin-table th:nth-child(2),
  .asin-register-shell .asin-table td:nth-child(2) {
    width: 17%;
  }

  .asin-register-shell .asin-table th:nth-child(3),
  .asin-register-shell .asin-table td:nth-child(3) {
    width: 28%;
  }

  .asin-register-shell .asin-table th:nth-child(4),
  .asin-register-shell .asin-table td:nth-child(4) {
    width: 22%;
  }

  .asin-register-shell .asin-table th:nth-child(5),
  .asin-register-shell .asin-table td:nth-child(5) {
    width: 8%;
  }

  .asin-register-shell .asin-table th:nth-child(6),
  .asin-register-shell .asin-table td:nth-child(6) {
    width: 8%;
  }

  .asin-register-shell .asin-table th:nth-child(7),
  .asin-register-shell .asin-table td:nth-child(7) {
    width: 6%;
  }

  .asin-register-shell .asin-table th:nth-child(8),
  .asin-register-shell .asin-table td:nth-child(8) {
    width: 11%;
  }

  .asin-register-shell .price-config-stack {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .asin-register-shell .price-control-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .asin-register-shell .inline-price-cell {
    width: 100%;
  }

  .asin-register-shell .inline-price-cell input {
    width: 100%;
    min-width: 0;
  }
}

.price-setup-hint {
  display: block;
  margin-top: 6px;
  color: #b45309;
  font-size: 12px;
  line-height: 1.45;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: #172033;
  font-weight: 800;
  white-space: nowrap;
}

.inline-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1d4ed8;
}

.inline-select,
.inline-sku-input {
  min-height: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 2px 6px;
  color: #172033;
  background: #ffffff;
  font: inherit;
}

.inline-select {
  width: 100%;
  min-width: 0;
  font-size: 10px;
  font-weight: 800;
}

.lane-select.sku {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.lane-select.asin {
  border-color: #bae6fd;
  color: #075985;
  background: #f0f9ff;
}

.inline-sku-input {
  width: 100%;
  min-width: 0;
  color: #172033;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
}

.inline-sku-input.has-value {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
  font-weight: 800;
}

.inline-sku-input::placeholder {
  color: #64748b;
  font-weight: 400;
}

.sku-health-badge {
  display: inline-flex;
  min-height: 17px;
  align-items: center;
  margin-top: 2px;
  border-radius: 999px;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.sku-health-badge.valid {
  background: #dcfce7;
  color: #166534;
}

.sku-health-badge.unchecked {
  background: #e2e8f0;
  color: #475569;
}

.sku-health-badge.not_found,
.sku-health-badge.asin_mismatch {
  background: #fee2e2;
  color: #991b1b;
}

.sku-health-badge.unavailable {
  background: #fef3c7;
  color: #92400e;
}

.muted-block {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 9px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.filter-row [aria-pressed="true"] {
  background: #172033;
  color: #f8fafc;
}

.list-tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.search-field {
  display: grid;
  gap: 6px;
  min-width: min(280px, 100%);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.search-field input {
  min-height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 9px;
  color: #172033;
  background: #ffffff;
  font: inherit;
}

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

.list-actions-menu,
.row-actions-menu {
  position: relative;
  flex: 0 0 auto;
}

.list-actions-menu summary,
.row-actions-menu summary {
  cursor: pointer;
  list-style: none;
}

.list-actions-menu summary::-webkit-details-marker,
.row-actions-menu summary::-webkit-details-marker {
  display: none;
}

.list-actions-menu-panel,
.row-actions-menu-panel {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.list-actions-menu-panel {
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
}

.row-actions-menu-panel {
  top: calc(100% + 4px);
  right: 0;
  min-width: 104px;
}

.list-actions-menu-panel button,
.row-actions-menu-panel button {
  justify-content: flex-start;
  width: 100%;
  min-height: 22px;
  white-space: nowrap;
}

.registered-count {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  color: #172033;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.price-extra-settings {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

.price-extra-settings label {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 110px auto;
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 13px;
}

.price-extra-settings input {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  color: #172033;
  background: #ffffff;
  font: inherit;
}

.price-inline-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 18px;
  margin-top: 12px;
}

.price-inline-settings label {
  display: grid;
  grid-template-columns: auto 90px auto;
  gap: 8px;
  align-items: center;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.price-inline-settings input {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  color: #172033;
  background: #ffffff;
  font: inherit;
}

.lane-badge,
.status-badge {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.lane-badge.sku {
  background: #dcfce7;
  color: #166534;
}

.lane-badge.asin {
  background: #e0f2fe;
  color: #075985;
}

.status-badge.active {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.paused {
  background: #e2e8f0;
  color: #475569;
}

.result-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.result-badge.success {
  background: #dcfce7;
  color: #166534;
}

.result-badge.failure {
  background: #fee2e2;
  color: #991b1b;
}

.result-badge.notified {
  background: #dbeafe;
  color: #1d4ed8;
}

.history-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 0 0 14px;
}

.compact-field {
  min-width: 160px;
  margin-bottom: 0;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  color: #475569;
  font-weight: 800;
}

.purchase-history-table {
  min-width: 1120px;
  table-layout: fixed;
}

.purchase-history-table th:nth-child(1),
.purchase-history-table td:nth-child(1) {
  width: 110px;
}

.purchase-history-table th:nth-child(2),
.purchase-history-table td:nth-child(2) {
  width: 170px;
}

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

.purchase-history-table th:nth-child(5),
.purchase-history-table td:nth-child(5) {
  width: 170px;
}

.purchase-history-table th:nth-child(6),
.purchase-history-table td:nth-child(6),
.purchase-history-table th:nth-child(7),
.purchase-history-table td:nth-child(7) {
  width: 74px;
}

.purchase-history-table th:nth-child(8),
.purchase-history-table td:nth-child(8) {
  width: 330px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.asin-lane-summary {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 18px;
}

.asin-lane-summary code {
  display: inline-block;
  margin-left: 8px;
  color: #334155;
}

.empty-cell {
  color: #64748b;
  text-align: center;
}

.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.rotation-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.rotation-badge.notice {
  background: #fef3c7;
  color: #92400e;
}

.rotation-badge.warning {
  background: #ffedd5;
  color: #9a3412;
}

.rotation-badge.critical,
.rotation-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.key-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e2e8f0;
  padding: 14px 0;
  color: #172033;
}

.key-summary span {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.settings-table code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.not-found-panel {
  max-width: 720px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.not-found-panel h1 {
  color: #172033;
  font-size: 42px;
}

.not-found-panel p {
  color: #475569;
}

@media (max-width: 860px) {
  .settings-shell {
    overflow-x: hidden;
  }

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

  .brand-pane {
    min-height: auto;
    padding: 28px 20px;
  }

  .form-pane {
    padding: 0 12px 28px;
    align-items: flex-start;
  }

  .signal-board {
    grid-template-columns: 1fr;
  }

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

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .settings-header,
  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .app-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .header-center {
    justify-content: stretch;
  }

  .user-nav {
    justify-content: stretch;
  }

  .user-nav a,
  .user-nav button,
  .nav-menu-summary {
    flex: 1 1 150px;
    justify-content: center;
  }

  .nav-menu {
    flex: 1 1 150px;
  }

  .nav-menu-panel {
    right: auto;
    left: 0;
    min-width: 100%;
  }

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

  .purchase-tool-card {
    grid-template-columns: 1fr;
  }

  .platform-choice-grid {
    grid-template-columns: 1fr;
  }

  .release-actions {
    justify-content: stretch;
  }

  .asin-register-shell .settings-header,
  .asin-register-shell .settings-grid,
  .asin-register-shell .asin-list-controls,
  .asin-register-shell .list-tool-row {
    grid-template-columns: 1fr;
  }

  .asin-register-shell .settings-stack {
    display: grid;
  }

  .asin-register-shell .asin-registration-panel,
  .asin-register-shell .price-rules-panel,
  .asin-register-shell .asin-list-panel {
    grid-column: auto;
  }

  .asin-register-shell .asin-registration-panel .asin-form {
    grid-template-columns: 1fr;
  }

  .asin-register-shell .asin-registration-panel .field,
  .asin-register-shell .asin-registration-panel .registration-preview,
  .asin-register-shell .asin-registration-panel .actions {
    grid-column: auto;
  }

  .asin-register-shell .list-tool-row,
  .asin-register-shell .list-actions {
    justify-content: flex-start;
  }

  .asin-register-shell .settings-header p:not(.settings-kicker) {
    display: block;
  }

  .asin-register-shell .asin-form textarea {
    min-height: 280px;
    height: 280px;
  }

  .asin-register-shell .price-rules-summary li {
    white-space: normal;
  }

  .settings-stack .price-rules-body {
    grid-template-columns: 1fr;
  }

  .settings-stack .price-inline-settings {
    justify-content: stretch;
  }

  .settings-stack .price-inline-settings label {
    grid-template-columns: 1fr 90px auto;
  }

  .asin-register-shell .table-wrap {
    overflow-x: hidden;
  }

  .asin-register-shell .asin-table,
  .asin-register-shell .asin-table thead,
  .asin-register-shell .asin-table tbody,
  .asin-register-shell .asin-table tr,
  .asin-register-shell .asin-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .asin-register-shell .asin-table {
    border-collapse: separate;
    border-spacing: 0;
  }

  .asin-register-shell .asin-table thead {
    display: none;
  }

  .asin-register-shell .asin-table tbody {
    display: grid;
    gap: 8px;
  }

  .asin-register-shell .asin-table tr {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    background: #ffffff;
  }

  .asin-register-shell .asin-table tr[data-sku-problem="true"] {
    border-color: #fed7aa;
    background: #fff7ed;
    box-shadow: inset 3px 0 0 #f97316;
  }

  .asin-register-shell .asin-table tr[data-status="paused"] {
    background: #f8fafc;
  }

  .asin-register-shell .asin-table th,
  .asin-register-shell .asin-table td,
  .asin-register-shell .asin-table td:last-child {
    display: block;
    border-top: 0;
    padding: 0;
  }

  .asin-register-shell .asin-table tr[data-sku-problem="true"] td,
  .asin-register-shell .asin-table tr[data-status="paused"] td,
  .asin-register-shell
    .asin-table
    tr[data-sku-problem="true"][data-status="paused"]
    td {
    background: transparent;
  }

  .asin-register-shell .asin-table tr[data-sku-problem="true"] td:first-child {
    box-shadow: none;
  }

  .asin-register-shell .asin-table .select-col {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
  }

  .asin-register-shell .asin-table .asin-identity-cell {
    grid-column: 2;
  }

  .asin-register-shell .asin-table .product-summary-cell,
  .asin-register-shell .asin-table .price-config-cell,
  .asin-register-shell .asin-table .last-notification-cell,
  .asin-register-shell .asin-table .registered-at-cell,
  .asin-register-shell .asin-table td:nth-child(7),
  .asin-register-shell .asin-table .row-actions-cell {
    grid-column: 1 / -1;
  }

  .asin-register-shell .product-summary {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .asin-register-shell .price-config-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .asin-register-shell .last-notification-cell,
  .asin-register-shell .registered-at-cell,
  .asin-register-shell .asin-table td:nth-child(7) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 28px;
  }

  .asin-register-shell .last-notification-cell::before {
    content: "最終通知";
    color: #64748b;
  }

  .asin-register-shell .registered-at-cell::before {
    content: "登録日";
    color: #64748b;
  }

  .asin-register-shell .asin-table td:nth-child(7)::before {
    content: "購入個数";
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
  }

  .asin-register-shell .row-actions {
    justify-content: flex-start;
  }

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

  .modal-backdrop {
    align-items: stretch;
    padding: 12px;
  }

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

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