/* Mist Theme - カタログ用商品データ管理システム */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

:root {
  --app-bg: #f3f4f8;
  --app-surface: #ffffff;
  --app-sidebar-bg: #ffffff;
  --app-sidebar-border: #ebebef;
  --app-primary: #5b5fc7;
  --app-primary-hover: #4e51b0;
  --app-primary-soft: #eeeefb;
  --app-text: #1a1c2e;
  --app-text-2: #6c6f85;
  --app-text-3: #9a9cb0;
  --app-border: #e4e5eb;
  --app-hover: #f5f5f9;
  --app-success: #2da562;
  --app-success-soft: #e7f7ee;
  --app-warning: #d97b0d;
  --app-warning-soft: #fef3e2;
  --app-danger: #dc3d43;
  --app-danger-soft: #fde8e9;
  --app-info: #3b82f6;
  --app-info-soft: #eff6ff;
  --app-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.03);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--app-text);
  background: var(--app-bg);
  -webkit-font-smoothing: antialiased;
}
input, select, textarea, button { font: inherit; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.1); border-radius: 3px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

/* Layout */
.app-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 232px; min-width: 232px;
  background: var(--app-sidebar-bg);
  border-right: 1px solid var(--app-sidebar-border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--app-sidebar-border);
}
.sidebar-brand-label { font-size: 10px; font-weight: 700; color: var(--app-text-3); letter-spacing: 2px; text-transform: uppercase; }
.sidebar-brand-title { font-size: 14px; font-weight: 700; color: var(--app-text); margin-top: 3px; }
.sidebar-nav { flex: 1; padding: 8px 6px; display: flex; flex-direction: column; gap: 1px; }
.sidebar-nav a, .sidebar-nav .nav-item {
  display: block; padding: 7px 12px; border-radius: 7px;
  font-size: 13px; font-weight: 500; color: var(--app-text-2);
  cursor: pointer; transition: all .1s;
}
.sidebar-nav a:hover, .sidebar-nav .nav-item:hover { background: var(--app-hover); color: var(--app-text); }
.sidebar-nav a.active, .sidebar-nav .nav-item.active { font-weight: 600; background: var(--app-primary-soft); color: var(--app-primary); }
.sidebar-sep { height: 1px; background: var(--app-sidebar-border); margin: 6px 10px; }
.sidebar-section { padding: 14px 12px 4px; font-size: 10px; font-weight: 700; color: var(--app-text-3); letter-spacing: .8px; text-transform: uppercase; }
.sidebar-user {
  padding: 14px 16px; border-top: 1px solid var(--app-sidebar-border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--app-primary-soft);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--app-primary);
}
.sidebar-user-name { font-size: 12px; font-weight: 600; color: var(--app-text); }
.sidebar-user-role { font-size: 10px; color: var(--app-text-3); }
.sidebar-badge {
  background: var(--app-danger); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 9px; padding: 0 5px; flex-shrink: 0;
}
.sidebar-footer-links {
  padding: 0 16px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar-pw-change {
  display: block; padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--app-text-2);
  text-align: center; border: 1px solid var(--app-border); transition: all .1s;
}
.sidebar-pw-change:hover { color: var(--app-primary); border-color: var(--app-primary); background: var(--app-primary-soft); }
.sidebar-logout {
  display: block; padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--app-text-3);
  cursor: pointer; text-align: center;
  border: 1px solid var(--app-border); transition: all .1s;
  background: transparent;
  width: 100%;
}
.sidebar-logout:hover { color: var(--app-danger); border-color: var(--app-danger); background: var(--app-danger-soft); }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Header */
.header {
  min-height: 52px; background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 10;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.header-back-button { text-decoration: none; }
.header-back-button .material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.breadcrumb { font-size: 12px; color: var(--app-text-3); display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; background: none; }
.breadcrumb a { cursor: pointer; transition: color .1s; }
.breadcrumb a:hover { color: var(--app-primary); }
.header-title { font-size: 17px; font-weight: 700; color: var(--app-text); }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-role { font-size: 12px; color: var(--app-text-3); }

/* Content */
.content { flex: 1; padding: 24px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }

/* Cards & Panels */
.card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: var(--app-shadow);
}
.card-body { padding: 24px; }

/*
 * The page itself is the active scroll container on product screens.  The
 * default overflow on .content would otherwise become the sticky containing
 * block even though it does not scroll, so release it only when a product
 * summary card is present.
 */
.content:has(.product-summary-sticky-area) { overflow-y: visible; }

/* Include the card's surrounding vertical space in the sticky area. */
.product-summary-sticky-area {
  position: sticky;
  top: 52px;
  z-index: 9;
  padding: 16px 0;
  background: var(--app-bg);
}
.product-summary-sticky-area > .card {
  margin-bottom: 0 !important;
}
.product-edit-summary-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.product-summary-card-title {
  color: var(--app-text);
  font-size: 24px;
  font-weight: 700;
}
.product-summary-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.product-summary-title-divider {
  width: 1px;
  height: 1.1em;
  background: var(--app-border);
}

/* Section Title */
.section-title {
  font-size: 14px; font-weight: 700; color: var(--app-text);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--app-border);
}

/* Badges */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; line-height: 1.6;
  background: #e8e9ed; color: #6c6f85;
}
.badge-draft { background: #e8e9ed; color: #6c6f85; }
.badge-submitted { background: var(--app-warning-soft); color: var(--app-warning); }
.badge-reviewing { background: var(--app-info-soft); color: var(--app-info); }
.badge-approved { background: var(--app-success-soft); color: var(--app-success); }
.badge-resubmit { background: var(--app-danger-soft); color: var(--app-danger); }
.sales-status-cell,
.agency-publish-cell { text-align: center; }
.sales-status-active { color: var(--app-success); font-size: 11px; }
.agency-publish-toggle-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; color: var(--app-text-2); }
.agency-publish-toggle-label.is-disabled { cursor: not-allowed; color: var(--app-text-3); }
.agency-publish-toggle { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.agency-publish-toggle-slider { position: relative; inline-size: 32px; block-size: 18px; border-radius: 999px; background: var(--app-border); transition: background .12s; }
.agency-publish-toggle-slider::after { content: ""; position: absolute; inline-size: 14px; block-size: 14px; inset: 2px auto auto 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 18%); transition: transform .12s; }
.agency-publish-toggle:checked + .agency-publish-toggle-slider { background: var(--app-success); }
.agency-publish-toggle:checked + .agency-publish-toggle-slider::after { transform: translateX(14px); }
.agency-publish-toggle:focus-visible + .agency-publish-toggle-slider { outline: 2px solid var(--app-primary); outline-offset: 2px; }
.agency-publish-toggle:disabled + .agency-publish-toggle-slider { opacity: .5; }
.input-validation-error { border-color: var(--app-danger) !important; box-shadow: 0 0 0 2px var(--app-danger-soft); }
.product-submit-field-error { color: var(--app-danger); font-size: 12px; margin-top: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; box-sizing: border-box;
  vertical-align: middle; cursor: pointer; transition: all .12s;
  font-weight: 600; text-align: center; border: none; outline: none;
}
.btn:hover { opacity: .88; }
.product-detail-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  line-height: 1;
  gap: 6px;
}
.product-detail-actions .material-symbols-outlined {
  flex: 0 0 auto;
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.product-form-actions .btn { gap: 6px; }
.product-form-actions .material-symbols-outlined {
  flex: 0 0 auto;
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.btn-primary {
  padding: 7px 16px; border-radius: 8px;
  background: var(--app-primary); color: #fff; font-size: 13px;
}
.btn-primary:hover { transform: translateY(-1px); background: var(--app-primary-hover); }
.btn-secondary {
  padding: 6px 14px; border-radius: 7px; font-size: 12px;
  border: 1px solid var(--app-border); color: var(--app-text-2);
  background: transparent;
}
.btn-secondary:hover { border-color: var(--app-primary); color: var(--app-primary); opacity: 1; }
.btn-danger {
  padding: 6px 14px; border-radius: 7px; font-size: 12px;
  background: var(--app-danger); color: #fff;
}
.btn-danger-outline {
  padding: 6px 14px; border-radius: 7px; font-size: 12px;
  border: 1px solid var(--app-danger); color: var(--app-danger);
  background: transparent;
}
.btn-danger-outline:hover { background: var(--app-danger-soft); opacity: 1; }
.btn-sm { padding: 4px 10px; border-radius: 6px; font-size: 11px; }
.btn-sm-info {
  padding: 4px 10px; border-radius: 6px; font-size: 11px;
  background: var(--app-info); color: #fff;
}
.btn-sm-danger {
  padding: 4px 10px; border-radius: 6px; font-size: 11px;
  background: var(--app-danger); color: #fff;
}
.btn-w-full { width: 100%; }

/* Focus — キーボード操作時のフォーカス可視化（WCAG 2.4.7） */
.btn:focus-visible, .tab-item:focus-visible, a:focus-visible {
  outline: 2px solid var(--app-primary);
  outline-offset: 2px;
}

/* Password toggle */
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px;
  opacity: .5; padding: 4px;
}
.pw-toggle:hover { opacity: 1; }

/* Search collapse */
.search-details { margin-bottom: 4px; }
.search-summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--app-text-2);
  padding: 8px 0; list-style: none; user-select: none;
}
.search-summary::-webkit-details-marker { display: none; }
.search-summary::before { content: '▶ '; font-size: 10px; transition: transform .2s; display: inline-block; }
.search-details[open] > .search-summary::before { transform: rotate(90deg); }

/* Product list search */
.product-search-form { margin-bottom: 16px; }
.product-list-page-title { margin-bottom: 12px; }
.product-search-card { margin-bottom: 12px; }
.product-list-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.product-list-toolbar-controls { display: grid; grid-template-columns: repeat(2, minmax(160px, 1fr)); gap: 14px; width: min(100%, 480px); }
.product-search-advanced { padding: 0 2px; margin-top: 8px; border-bottom: 1px solid var(--app-border); }
.product-search-advanced[open] { padding-bottom: 12px; }
.product-search-advanced .grid-3 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-search-sort-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-search-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.approval-search-form { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 0; }
.approval-search-form > .form-group { flex: 0 1 340px; width: min(100%, 340px); }
.approval-search-actions { margin-top: 0; margin-left: auto; flex: none; }
.approval-status-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.approval-status-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.approval-status-note { flex: 1 1 300px; font-size: 12px; color: var(--app-text-2); }
.search-results-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-top: 1px solid var(--app-border); }
.search-results-toolbar { display: flex; justify-content: flex-end; min-width: min(100%, 360px); }
.search-results-toolbar .product-search-result-controls { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 10px; width: 100%; margin: 0 !important; }
.search-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.search-filter-chip { display: inline-flex; align-items: center; padding: 2px 8px; background: var(--app-hover); border: 1px solid var(--app-border); border-radius: 999px; font-size: 11px; color: var(--app-text-2); }
.search-filter-clear { font-size: 11px; color: var(--app-primary); text-decoration: underline; }
@media (max-width: 760px) {
  .product-search-advanced .grid-3, .product-search-sort-grid, .search-results-toolbar .product-search-result-controls { grid-template-columns: 1fr; }
  .product-list-toolbar { flex-direction: column; align-items: stretch; }
  .product-list-toolbar-controls { grid-template-columns: 1fr; width: 100%; }
  .approval-search-form { align-items: stretch; flex-direction: column; }
  .approval-search-form > .form-group { width: 100%; }
  .approval-search-actions { margin-left: 0; }
  .search-results-summary { flex-direction: column; align-items: stretch; }
  .search-results-toolbar { min-width: 0; width: 100%; }
}

/* Forms */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.form-label { font-size: 11px; font-weight: 600; color: var(--app-text-2); }
.form-input {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--app-border); border-radius: 8px;
  font-size: 13px; color: var(--app-text);
  background: var(--app-surface); outline: none;
  transition: border-color .15s;
}
.form-input:focus { border-color: var(--app-primary); }
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.form-hint { font-size: 11px; color: var(--app-text-3); margin-top: 2px; }
/* 変更不可項目の表示: 入力枠を出さず通常テキストとして表示する（入力可能と誤認させない）
   .form-static-text … 値をテキストとして表示する場合
   .form-input.form-input-static … JSが値を書き込むため input 要素を残す必要がある場合 */
.form-static-text {
  display: inline-block; padding: 8px 0;
  font-size: 13px; color: var(--app-text);
}
.form-input.form-input-static,
.form-input.form-input-static:focus {
  border: none; border-radius: 0;
  padding-left: 0; padding-right: 0;
  background: transparent;
}
.checkbox-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; cursor: pointer; user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--app-primary);
}
/* あり/なしラジオボタン用（checkbox-label と同等の見た目 / CR-2026-07-17c レビュー指摘対応） */
.radio-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; cursor: pointer; user-select: none;
}
.radio-label input[type="radio"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--app-primary);
}

/* Notice */
.notice {
  padding: 14px 18px; border-radius: 10px;
  font-size: 13px; line-height: 1.6;
}
.notice-info { background: var(--app-info-soft); border: 1px solid rgba(59,130,246,.2); color: var(--app-text); }
.notice-success { background: var(--app-success-soft); border: 1px solid rgba(45,165,98,.2); color: var(--app-text); }
.notice-danger { background: var(--app-danger-soft); border: 1px solid rgba(220,61,67,.2); color: var(--app-danger); }
.notice-close {
  position: absolute; top: 8px; right: 10px; background: none; border: none;
  font-size: 18px; cursor: pointer; color: inherit; opacity: .6; line-height: 1; padding: 0;
}
.notice-close:hover { opacity: 1; }

/* Tables */
.table-card { overflow-x: auto; }
.table-card thead tr { background: var(--app-bg); }
.table-card th {
  padding: 10px 16px; font-size: 11px; font-weight: 600; color: var(--app-text-2); white-space: nowrap;
  position: sticky; top: 0; z-index: 1; background: var(--app-bg);
}
.table-card td { padding: 11px 16px; font-size: 12px; border-bottom: 1px solid var(--app-border); }
/* 商品一覧: カーソルが乗っている行の色変更＋行全体クリックで詳細遷移（CR-2026-07-17j） */
tr.row-clickable { cursor: pointer; transition: background-color .12s; }
tr.row-clickable:hover td { background: var(--app-primary-soft); }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
/* 仕入先ダッシュボード用: KPI5枚を1行で表示 */
.kpi-grid.kpi-grid-5 { grid-template-columns: repeat(5, 1fr); }
.kpi-grid.kpi-grid-6 { grid-template-columns: repeat(6, 1fr); }
.kpi-card { padding: 18px 16px; }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--app-text-2); letter-spacing: .3px; }
.kpi-value { font-size: 30px; font-weight: 700; margin-top: 6px; line-height: 1; }
/* クリック可能なKPIカード（絞り込み商品一覧への遷移 / CR-2026-07-17i）にホバー効果を付与 */
a.kpi-card { display: block; cursor: pointer; transition: transform .15s, box-shadow .15s; }
a.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 2px 12px rgba(0,0,0,.08); }

/* Task Cards */
.task-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: 10px;
  cursor: pointer; transition: all .15s ease;
}
.task-card:hover { transform: translateX(3px); box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.task-count {
  min-width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 700;
  background: var(--app-primary-soft); color: var(--app-primary);
}
.task-label { font-size: 14px; font-weight: 600; color: var(--app-text); }
.task-card-submitted { background: var(--app-warning-soft); border-color: var(--app-warning-soft); }
.task-card-submitted .task-count { background: #fff; color: var(--app-warning); }
.task-card-reviewing { background: var(--app-info-soft); border-color: var(--app-info-soft); }
.task-card-reviewing .task-count { background: #fff; color: var(--app-info); }
.task-card-resubmit { background: var(--app-danger-soft); border-color: var(--app-danger-soft); }
.task-card-resubmit .task-count { background: #fff; color: var(--app-danger); }
/* ダッシュボード「今やるべきこと」— タスクカードの横並びグリッドと0件時の淡色表示 */
.dashboard-task-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.task-card-muted { opacity: .55; }

/* Login */
.login-wrap {
  display: grid; place-items: center; min-height: 100vh;
  background: var(--app-bg); padding: 24px;
}
.login-card {
  width: 100%; max-width: 520px;
  animation: fadeInUp .4s cubic-bezier(.2,1,.3,1) forwards;
}
.login-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--app-primary); margin-bottom: 16px;
}
.login-brand { font-size: 11px; font-weight: 700; color: var(--app-text-3); letter-spacing: 2.5px; text-transform: uppercase; }
.login-title { font-size: 21px; font-weight: 700; color: var(--app-text); margin-top: 6px; line-height: 1.4; }
.login-form {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px; padding: 28px;
  box-shadow: var(--app-shadow);
}

/* Actions row */
.actions { display: flex; gap: 8px; }
.actions-end { justify-content: flex-end; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.gap-14 { gap: 14px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.span-2 { grid-column: span 2; }

/* 受信通知の検索条件: 通知種別だけを広く取り、デスクトップでは1行で表示する。 */
.inbox-search-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(140px, .75fr) minmax(500px, 2.25fr);
  gap: 14px;
}
.inbox-notification-types { min-width: 0; }
.notification-history-search-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) minmax(500px, 2.5fr);
  gap: 14px;
}
.inbox-checkbox-options {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  white-space: nowrap;
}
.overflow-x { overflow-x: auto; }

/* Tab UI */
.tab-bar {
  display: flex; gap: 2px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 10px; padding: 3px;
}
.tab-item {
  flex: 1; padding: 9px 16px; border-radius: 8px;
  text-align: center; font-size: 13px; font-weight: 500;
  cursor: pointer; color: var(--app-text-2); transition: all .15s;
}
.tab-item:hover { background: var(--app-hover); color: var(--app-text); }
.tab-item.active { font-weight: 600; background: var(--app-primary); color: #fff; }
.tab-item { position: relative; }
.tab-item[data-tab="basic"]::before,
.tab-item[data-tab="price"]::before,
.tab-item[data-tab="spec"]::before,
.tab-item[data-tab="mgmt"]::before,
.tab-item[data-tab="management"]::before,
.tab-item[data-tab="admin"]::before {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  vertical-align: -5px;
  font-family: "Material Symbols Outlined";
  font-size: 20px;
  line-height: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.tab-item[data-tab="basic"]::before { content: "description"; }
.tab-item[data-tab="price"]::before { content: "currency_yen"; }
.tab-item[data-tab="spec"]::before { content: "image"; }
.tab-item[data-tab="mgmt"]::before,
.tab-item[data-tab="management"]::before,
.tab-item[data-tab="admin"]::before { content: "settings"; }
.tab-error-dot {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--app-danger);
}
.tab-item.active .tab-error-dot { background: #fff; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Diff comparison — 差分比較画面（S-009B）用 */
.diff-table { width: 100%; border-collapse: collapse; }
.diff-table th {
  padding: 8px 14px; font-size: 11px; font-weight: 600;
  color: var(--app-text-2); background: var(--app-bg);
  border-bottom: 1px solid var(--app-border); text-align: left;
}
.diff-table td {
  padding: 10px 14px; font-size: 13px;
  border-bottom: 1px solid var(--app-border); vertical-align: top;
}
.diff-table td:first-child {
  font-size: 12px; font-weight: 600; color: var(--app-text-2);
  width: 200px; white-space: nowrap;
}
.scheduled-settings-master-panel {
  display: none;
}
.scheduled-settings-meta {
  caption-side: top;
  padding: 0 0 12px;
}
.scheduled-settings-meta-grid {
  display: grid;
  grid-template-columns: 20% 40% 40%;
  gap: 0;
}
.scheduled-settings-meta-content {
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.scheduled-settings-meta-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--app-text-2);
}
.scheduled-settings-meta-input {
  max-width: 220px;
}
.scheduled-settings-meta-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--app-text-3);
}
.scheduled-settings-meta-warning {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #8a2b2b;
}
.scheduled-settings-disabled .scheduled-settings-table th:nth-child(3),
.scheduled-settings-disabled .scheduled-settings-table td:nth-child(3) {
  background: #f4f5f8;
}
.scheduled-settings-disabled .scheduled-settings-table th:nth-child(3) {
  color: var(--app-text-3);
}
.scheduled-settings-disabled .scheduled-settings-table td:nth-child(3) {
  color: var(--app-text-2);
}
.scheduled-settings-disabled .scheduled-settings-table td:nth-child(3) .form-input,
.scheduled-settings-disabled .scheduled-settings-table td:nth-child(3) .form-input:focus {
  background: #eef0f4;
  border-color: #dfe3eb;
  color: var(--app-text-3);
}
.scheduled-settings-disabled .scheduled-settings-table td:nth-child(3) .form-static-text,
.scheduled-settings-disabled .scheduled-settings-table td:nth-child(3) .radio-label,
.scheduled-settings-disabled .scheduled-settings-table td:nth-child(3) .field-note,
.scheduled-settings-disabled .scheduled-settings-table td:nth-child(3) .form-hint {
  color: var(--app-text-3);
}
.diff-table .diff-changed { background: var(--app-warning-soft); }
.diff-table .diff-changed td:first-child { color: var(--app-warning); }
.diff-old { color: var(--app-text-3); text-decoration: line-through; }
.diff-new { font-weight: 600; color: var(--app-primary); }

/* 商品詳細の承認済データ（左2列）と提出データ（右2列）を色分けする。 */
.approval-submission-comparison .approval-header-group,
.approval-submission-comparison .approval-column {
  background: var(--app-bg);
  color: var(--app-text-2);
}
.approval-submission-comparison td:nth-child(2),
.approval-submission-comparison td:nth-child(3) {
  background: transparent;
}
.approval-submission-comparison .submission-header-group,
.approval-submission-comparison .submission-column {
  background: #eaf3ff;
  color: #245b8f;
}
.approval-submission-comparison td:nth-child(4),
.approval-submission-comparison td:nth-child(5) {
  background: #f5f9ff;
}
/* 差分ありセルは列色より黄色の差分強調を優先する。 */
.approval-submission-comparison td.diff-changed {
  background: var(--app-warning-soft);
}
/* 承認済状態では右側の提出データは承認済スナップショットと同内容のため表示しない。 */
.approval-submission-comparison.approved-only-comparison .submission-header-group,
.approval-submission-comparison.approved-only-comparison .submission-column,
.approval-submission-comparison.approved-only-comparison td:nth-child(4),
.approval-submission-comparison.approved-only-comparison td:nth-child(5) {
  display: none;
}
/* 承認済スナップショットがない初回登録では、今回の申請内容のみを表示する。 */
.approval-submission-comparison.submission-only-comparison .approval-header-group,
.approval-submission-comparison.submission-only-comparison .approval-column,
.approval-submission-comparison.submission-only-comparison td:nth-child(2),
.approval-submission-comparison.submission-only-comparison td:nth-child(3) {
  display: none;
}
.comparison-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.comparison-section-heading .section-title {
  flex: 0 0 auto;
}
.comparison-description {
  margin: 0 0 16px;
  color: var(--app-text-3);
  font-size: 12px;
  text-align: right;
}
.review-diff-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.review-diff-heading .section-title {
  flex: 0 0 auto;
}
.review-diff-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--app-text-2);
  font-size: 12px;
}
.review-diff-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.review-diff-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.review-diff-legend-swatch-changed {
  background: var(--app-warning-soft);
  border: 1px solid var(--app-warning);
}
.review-diff-legend-swatch-unchanged {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}
@media (max-width: 900px) {
  .comparison-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .comparison-description {
    text-align: left;
  }
  .review-diff-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}
.diff-same { color: var(--app-text-2); }
.diff-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
}
.diff-badge-changed { background: var(--app-warning-soft); color: var(--app-warning); }
.diff-badge-same { background: var(--app-bg); color: var(--app-text-3); }
.field-note { font-size: 11px; font-weight: 400; color: var(--app-text-3); }

/* Meta (detail) label/value */
.meta-label { font-size: 12px; color: var(--app-text-3); margin-bottom: 4px; }
.meta-value { font-size: 14px; color: var(--app-text); }
.meta-value-lg { font-size: 18px; font-weight: 600; }

/* 受信通知詳細: 項目名と内容を別列にして、各内容の開始位置を揃える。 */
.notification-detail-meta {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px 24px;
  align-items: start;
}
.notification-detail-meta-label .meta-label { margin: 0; }

/* 一括価格修正: 設定適用基準日を新設定の列グループ直上に配置する。 */
.bulk-price-new-settings-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.bulk-price-effective-date {
  display: flex;
  align-items: center;
  align-self: stretch;
  justify-content: flex-end;
  gap: 8px;
}
.bulk-price-new-settings-header .form-label { color: var(--app-text-2); margin: 0; }
.bulk-price-new-settings-header .form-input { width: 180px; }

/* Tag */
.tag {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  font-size: 12px; background: var(--app-surface); border: 1px solid var(--app-border);
}

/* Required marker */
.req { color: var(--app-danger); font-weight: 600; }

/* Table cell helpers */
.td-code { font-family: monospace; font-size: 13px; white-space: nowrap; }
.td-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-sub { font-size: 13px; color: var(--app-text-2); }
.td-price { text-align: right; font-family: monospace; }
.td-date { font-size: 13px; white-space: nowrap; color: var(--app-text-2); }

/* Utility */
.flex-col { display: flex; flex-direction: column; }
.anim-fade { animation: fadeIn .25s ease forwards; }
.text-link { color: var(--app-text-2); font-size: 13px; text-decoration: underline; }
.text-link:hover { color: var(--app-primary); }
.text-danger { color: var(--app-danger); font-size: 12px; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-24 { margin-bottom: 24px; }

/* Hamburger — モバイルでサイドバーを開閉する */
.sidebar-toggle {
  display: none; position: fixed; top: 10px; left: 10px; z-index: 1100;
  width: 40px; height: 40px; border: none; border-radius: 8px;
  background: var(--app-surface); box-shadow: var(--app-shadow);
  cursor: pointer; font-size: 20px; line-height: 40px; text-align: center;
  color: var(--app-text);
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.3);
}

/* Responsive */
@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  /* 5枚表示のグリッドも狭い画面では2列に落とす（.kpi-grid.kpi-grid-5 は詳細度が高く上のルールでは上書きされないため個別指定） */
  .kpi-grid.kpi-grid-5 { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid.kpi-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .grid-4, .inbox-search-grid, .notification-history-search-grid { grid-template-columns: 1fr; }
  .inbox-notification-types { grid-column: auto; }
  .notification-detail-meta { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 768px) {
  .sidebar-toggle { display: block; }
  .sidebar {
    position: fixed; z-index: 1000; left: -260px;
    transition: left .25s ease;
  }
  .sidebar.open { left: 0; }
  .sidebar.open + .sidebar-overlay { display: block; }
  .main { padding-top: 56px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-grid.kpi-grid-5 { grid-template-columns: 1fr 1fr; }
  .kpi-grid.kpi-grid-6 { grid-template-columns: 1fr 1fr; }
  .tab-bar { flex-wrap: wrap; }
  .tab-item { flex: none; padding: 7px 12px; font-size: 12px; }
  .btn-primary { padding: 10px 16px; font-size: 14px; }
  .btn-secondary { padding: 9px 14px; font-size: 13px; }
  .btn-sm, .btn-sm-info, .btn-sm-danger { padding: 7px 12px; font-size: 12px; }
}
