/*
 * Commerce Connect - Custom Stylesheet (Final Version)
 * Concept: Friendly & User-Centered Design
 */

/* Google Fontsのインポート */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* --- カラーパレットと基本変数の定義 --- */
:root {
  --primary-color: #00A99D;    /* ターコイズブルー */
  --secondary-color: #0070C0;  /* 明るい紺 */
  --accent-color: #FFC107;     /* アンバー */
  --background-color: #F0F8FF; /* ごく淡いスカイブルー */
  --text-color: #444444;       /* やや明るめの濃いグレー */
  --subtext-color: #A0A0A0;    /* 明るいグレー */
  --white-color: #FFFFFF;
  --border-color: #E0E0E0;
  --danger-color: #DC3545;
  --warning-color: #FFC107;
  --info-color: #0070C0;
  --success-color: #198754;
  --note-color-teal: #00A99D;
  --note-color-blue: #0070C0;
  --note-color-navy: #0B3C78;
  --note-color-green: #198754;
  --note-color-forest: #2E7D32;
  --note-color-purple: #6F42C1;
  --note-color-violet: #8E44AD;
  --note-color-orange: #C05621;
  --note-color-amber-dark: #B7791F;
  --note-color-red: #DC3545;

  --danger-bg-subtle: #f8d7da;
  --warning-bg-subtle: #fff3cd;
  --info-bg-subtle: #cce5ff;
  --success-bg-subtle: #d1e7dd;
  --default-bg-subtle: #f0f0f0;

  --base-font-family: 'Noto Sans JP', sans-serif;
  --border-radius-strong: 12px;
  --border-radius-normal: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- 基本スタイルのリセットと設定 --- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--base-font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  line-height: 1.6;
}

/* v-cloak: Vueがマウントされるまで要素を非表示 */
[v-cloak] {
  display: none !important;
}

/* router-view内の未処理テンプレートを非表示 */
router-view[v-cloak] {
  display: none !important;
}

router-view[v-cloak] * {
  display: none !important;
}

/* --- 全体レイアウト (2カラムサイドバー形式) --- */
.page-container {
  display: flex;
  --rail-width: 48px;
  --sidebar-panel-offset: 192px;
}
.page-container.rail-labels {
  --rail-width: 180px;
}
.page-container.panel-hidden:not(.sidebar-collapsed) {
  --sidebar-panel-offset: 0px;
}

/* ===============================
   SIDEBAR - 2カラム構成
   左グレーレール + 右白パネル(192px) ※幅は --rail-width / --sidebar-panel-offset
   =============================== */
.sidebar {
  width: calc(var(--rail-width) + var(--sidebar-panel-offset));
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.2s ease;
}

/* ----- 左グレーレール ----- */
.sidebar-rail {
  width: var(--rail-width);
  min-width: var(--rail-width);
  height: 100%;
  background-color: #3c3f48;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 8px;
  flex-shrink: 0;
  overflow: hidden;
}

/* レール上部ブランド（ロゴ・契約コード） */
.rail-brand.sidebar-brand {
  flex-shrink: 0;
  width: 100%;
  padding: 8px 6px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.rail-brand .sidebar-brand-contract {
  color: #a0a8b8;
}
.page-container:not(.rail-labels) .rail-brand.sidebar-brand {
  padding: 6px 4px 4px;
}
.page-container.rail-labels .rail-brand.sidebar-brand {
  padding-left: 3px;
  padding-right: 8px;
}
/* アイコンのみ時: メニュー .rail-item と同じ 36px 枠 */
.page-container:not(.rail-labels) .rail-brand .sidebar-brand-logo {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.page-container:not(.rail-labels) .rail-brand .sidebar-brand-logo img {
  width: 28px;
  height: 28px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.page-container.rail-labels .rail-brand .sidebar-brand-logo img {
  width: 110px;
  height: auto;
}
.page-container:not(.rail-labels) .rail-brand .sidebar-brand-contract--rail-compact {
  font-size: 0.5rem;
  line-height: 1.2;
  text-align: center;
  word-break: break-all;
  max-width: 36px;
  margin: 0;
  color: #a0a8b8;
}

.rail-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.rail-main::-webkit-scrollbar { display: none; }

.rail-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* レールアイテム共通 */
.rail-item {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #a0a8b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
  font-family: inherit;
}
.rail-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}
.rail-item--active {
  background-color: rgba(0, 169, 157, 0.25);
  color: #00c9bc;
}
.rail-item--active:hover {
  background-color: rgba(0, 169, 157, 0.35);
  color: #00c9bc;
}
.rail-item--danger {
  color: #e07070;
}
.rail-item--danger:hover {
  background-color: rgba(220, 53, 69, 0.2);
  color: #ff6b6b;
}

/* サブメニュー（白パネル）ありのレール項目 */
.rail-item--has-panel,
.rail-item--opens-panel {
  position: relative;
}
.page-container:not(.rail-labels) .rail-item--has-panel::after,
.page-container:not(.rail-labels) .rail-item--opens-panel::after {
  content: '';
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 10px;
  border-radius: 1px;
  background-color: #00c9bc;
  opacity: 0.45;
  pointer-events: none;
}
.page-container:not(.rail-labels) .rail-item--has-panel.rail-item--active::after,
.page-container:not(.rail-labels) .rail-item--opens-panel.rail-item--active::after {
  opacity: 0.85;
}
.rail-item__submenu-hint {
  display: none;
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.62rem;
  opacity: 0.55;
  line-height: 1;
}
.page-container.rail-labels .rail-item--has-panel .rail-item__submenu-hint,
.page-container.rail-labels .rail-item--opens-panel .rail-item__submenu-hint {
  display: inline-block;
}
.page-container.rail-labels .rail-item--has-panel.rail-item--active .rail-item__submenu-hint,
.page-container.rail-labels .rail-item--opens-panel.rail-item--active .rail-item__submenu-hint {
  opacity: 0.85;
}

.rail-item__label {
  display: none;
}
.page-container.rail-labels .rail-item__label {
  display: block;
}
.page-container.rail-labels .sidebar-rail {
  align-items: stretch;
  padding-left: 6px;
  padding-right: 6px;
}
.page-container.rail-labels .rail-main,
.page-container.rail-labels .rail-footer {
  align-items: stretch;
}
.page-container.rail-labels .rail-item {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  height: auto;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}
.page-container.rail-labels .rail-item__label {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.page-container.rail-labels .rail-item > i {
  flex-shrink: 0;
}
.page-container.rail-labels .rail-item--toggle {
  color: #c8ced8;
}
.page-container.rail-labels .rail-item--toggle:hover {
  color: #ffffff;
}

/* ----- 右白パネル ----- */
.sidebar-panel {
  flex: 1;
  min-width: 0;
  height: 100%;
  background-color: #f8fafa;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.panel-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--subtext-color);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background-color 0.15s, color 0.15s;
  z-index: 1;
}
.panel-close:hover {
  background-color: #e8eeee;
  color: var(--text-color);
}

/* ブランドエリア（ロゴ・名称・契約コード） */
.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 12px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #e0eaea;
  margin-bottom: 4px;
}
.sidebar-brand-logo {
  display: block;
  line-height: 0;
  margin-bottom: 5px;
}
.sidebar-brand-logo img {
  width: 48px;
  height: auto;
  display: block;
}
.sidebar-brand-name {
  margin: 0 0 3px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.sidebar-brand-name-line1 {
  display: block;
  font-size: inherit; /* 1行目は現状のサイズ（親の0.8rem）を維持 */
  line-height: 1.3;
}
.sidebar-brand-name-line2 {
  display: block;
  font-size: 0.95rem; /* 2行目だけ少し大きく */
  line-height: 1.15;
}
.sidebar-brand-contract {
  margin: 0;
  font-size: 0.62rem;
  color: var(--subtext-color);
  line-height: 1.3;
  word-break: break-all;
}


/* パネルナビ */
.panel-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #c0d0d0 transparent;
  padding-top: 36px;
}
.panel-nav::-webkit-scrollbar {
  width: 4px;
}
.panel-nav::-webkit-scrollbar-track {
  background: transparent;
}
.panel-nav::-webkit-scrollbar-thumb {
  background-color: #c0d0d0;
  border-radius: 4px;
}
.panel-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 16px;
}
.panel-nav li {
  margin: 0;
  padding: 0;
}

/*
 * カテゴリラベル：左ボーダーとアイコンの間の余白は padding-left で取る。
 * 注意: .panel-nav li { padding:0 } のほうが .panel-category-label より詳細度が高いため、
 * li.panel-category-label で padding を明示しないと常に 0 になり縦線とアイコンが密着する。
 */
.panel-category-label {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  box-sizing: border-box;
  border-left: 2px solid var(--primary-color);
  background-color: rgba(0, 169, 157, 0.08);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.01em;
  text-transform: none;
  margin-top: 10px;
  line-height: 1.45;
}
.panel-nav li.panel-category-label {
  padding: 10px 12px 10px 18px;
}
.panel-category-label .panel-nav-icon {
  opacity: 0.85;
  font-size: 0.85rem;
}
.panel-category-label:first-child {
  margin-top: 0;
}

/* パネルナビ内アイコン（Home/Dashboard/Note 用） */
.panel-nav-icon {
  margin-right: 8px;
  font-size: 0.85rem;
  opacity: 0.75;
  flex-shrink: 0;
  width: 1.1em;
  text-align: center;
}

/* パネルリンク（分類名行のアイコン列の右端〜テキスト位置に近づけて窮屈さを解消） */
.panel-nav a {
  display: block;
  padding: 8px 12px 8px 38px;
  border-left: 2px solid transparent;
  font-size: 0.85rem;
  font-weight: 400;
  color: #4a5568;
  text-decoration: none;
  line-height: 1.5;
  transition: background-color 0.15s, border-left-color 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-nav a:hover {
  background-color: rgba(0, 169, 157, 0.07);
  border-left-color: rgba(0, 169, 157, 0.45);
  color: var(--primary-color);
}
.panel-nav a.panel-link--active {
  font-weight: 700;
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  background-color: rgba(0, 169, 157, 0.08);
}
.panel-nav a.panel-link--active:hover {
  background-color: rgba(0, 169, 157, 0.12);
}
/* ホーム／ダッシュボード／ノートのみ左余白を詰める（分析メニューは .panel-nav a のまま） */
.panel-nav a.panel-nav-link--compact {
  padding: 8px 14px 8px 12px;
}

/* ===============================
   メインコンテンツ
   =============================== */
.main-content {
  flex-grow: 1;
  padding: 3rem;
  width: calc(100% - var(--rail-width) - var(--sidebar-panel-offset));
  position: relative;
  transition: width 0.2s ease;
}
.main-content > main {
  margin: 0;
  padding-top: 0;
}

/* パネル非表示時（レールのみ残す）— sidebar-collapsed より先に書く */
.page-container.panel-hidden .sidebar-panel {
  display: none;
}

/* サイドバー折りたたみ時（全体非表示）— 常に最優先 */
.page-container.sidebar-collapsed .sidebar {
  width: 0 !important;
  min-width: 0;
  overflow: hidden;
}
.page-container.sidebar-collapsed .main-content {
  width: 100% !important;
}
.page-container.sidebar-collapsed .sidebar-toggle {
  left: 0 !important;
}

/* サイドバー開閉トグルボタン（固定配置） */
.sidebar-toggle {
  position: fixed;
  left: calc(var(--rail-width) + var(--sidebar-panel-offset));
  top: 1rem;
  z-index: 1000;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  background-color: var(--white-color);
  color: var(--text-color);
  cursor: pointer;
  transition: left 0.2s ease, background-color 0.2s, color 0.2s;
}
.sidebar-toggle:hover {
  background-color: #f5f9fc;
  color: var(--primary-color);
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--subtext-color);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

/* --- 見出しとテキスト --- */
h1, h2 {
  color: var(--primary-color);
  margin-top: 0;
}
h1 { margin-bottom: 0.5rem; }
h2 { margin-bottom: 1.5rem; }

.home-page-title {
  margin: 0;
  line-height: 1.25;
}
.home-page-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.analyze-page-header--home {
  margin-bottom: 0.5rem;
  row-gap: 0.5rem;
}
.home-page-title-logo {
  display: block;
  width: 252px;
  max-width: 100%;
  height: auto;
}
.home-page-title-line1 {
  display: block;
}
.home-page-title-line2 {
  display: block;
  font-size: 0.6em;
  font-weight: 600;
  line-height: 1.35;
}

.page-description {
    color: var(--subtext-color);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* 分析メニュー共通ページヘッダー（説明文折り返し + 右上エリア固定） */
.analyze-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    column-gap: 1.5rem;
    row-gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
    width: 100%;
}
.analyze-page-header__main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}
.analyze-page-header__main .page-description {
    margin-top: 0.5rem;
    margin-bottom: 0;
    max-width: min(42rem, 100%);
    line-height: 1.55;
    overflow-wrap: break-word;
    color: var(--subtext-color);
}
.analyze-page-header__actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.analyze-page-header__buttons {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.analyze-page-header__buttons > *,
.analyze-page-header__buttons .btn,
.analyze-page-header__buttons button,
.analyze-page-header__buttons .inquiry-button {
    flex-shrink: 0;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .analyze-page-header {
        grid-template-columns: 1fr;
    }
    .analyze-page-header__main {
        grid-column: 1;
        grid-row: 1;
    }
    .analyze-page-header__actions {
        grid-column: 1;
        grid-row: 2;
        justify-self: stretch;
        align-items: stretch;
        width: 100%;
    }
    .analyze-page-header__buttons {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* --- カードUI --- */
.card {
  background-color: var(--white-color);
  border-radius: var(--border-radius-strong);
  box-shadow: var(--box-shadow);
  margin-bottom: 2.5rem;
  overflow: visible;
}

/* カード内のグラフなど、overflow制限が必要な要素用 */
.card-body > canvas,
.card-body > .table-responsive {
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background-color: #fafafa;
  position: relative;
  z-index: 1;
}

.card-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.card-body {
  padding: 1.5rem;
  position: relative;
  overflow: visible;
}

/* 購入地域分布：地図をカード内に収め、他コンテンツと重ならないようにする */
.purchase-region-map-wrap {
  isolation: isolate;
}
.purchase-region-map-wrap #purchaseRegionMap,
.purchase-region-map-wrap #purchaseRegionMap > div {
  max-width: 100%;
  min-height: 0;
}

/* 購入地域分布：詳細データを2列表示 */
.purchase-region-two-col-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .purchase-region-two-col-tables {
    grid-template-columns: 1fr;
  }
}

/* --- グラフのレイアウト --- */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

/* --- 検索/フィルターフォーム --- */
.search-form {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  position: relative;
}

.filter-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-group label {
    font-weight: 500;
    color: var(--subtext-color);
    font-size: 0.9rem;
}

.search-form select,
.search-form input[type="date"],
.search-form input[type="text"],
.search-form input[type="time"],
.search-form input[type="number"],
.search-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  background-color: var(--white-color);
  font-family: var(--base-font-family);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text-color);
}

.search-form select:focus,
.search-form input[type="date"]:focus,
.search-form input[type="text"]:focus,
.search-form input[type="time"]:focus,
.search-form input[type="number"]:focus,
.search-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}

.search-form textarea {
  resize: vertical;
  min-width: 16rem;
}

/* 販売検証：グラフカードをページ幅に合わせて変動 */
.sales-verification-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.sales-verification-charts .chart-card {
  min-width: 0;
}
.sales-verification-charts .chart-card-body {
  height: 400px;
  min-height: 280px;
}

/* 販売検証：条件指定エリア（希望デザイン：縦並び・集計ボタンは下） */
.sales-verification-condition-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 販売検証：条件グリッド（商品コード列のみ） */
.sales-verification-condition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: start;
}
.sales-verification-product-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.sales-verification-product-column > label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: bold;
}
.sales-verification-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.sales-verification-pattern-modal .pattern-modal-hint {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: var(--subtext-color);
}
.sales-verification-pattern-modal .pattern-modal-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}
.sales-verification-pattern-modal .pattern-modal-save-row .form-control {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  background-color: var(--white-color);
  font-family: var(--base-font-family);
  font-size: 1rem;
  color: var(--text-color);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.sales-verification-pattern-modal .pattern-modal-save-row .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}
.sales-verification-pattern-modal .pattern-modal-table-wrap {
  overflow-x: auto;
}
.sales-verification-pattern-modal .pattern-modal-table-wrap .btn-sm {
  margin-right: 0.35rem;
}

.sales-verification-result-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.sales-verification-result-header h2 {
  margin: 0;
}
.sales-verification-ai-report {
  margin-bottom: 1.5rem;
  padding: 0;
  border: none;
  background: transparent;
}
.sales-verification-ai-report-toolbar {
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--primary-color);
}
.sales-verification-ai-report-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.sales-verification-ai-report-sections {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.sales-verification-ai-report-section {
  background-color: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  border-left: 4px solid var(--primary-color);
  padding: 0.95rem 1rem 1.05rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.sales-verification-ai-report-section-heading {
  margin: 0 0 0.65rem 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-color);
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.35;
}
.sales-verification-ai-report-section-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.625rem;
  height: 1.625rem;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white-color);
  background-color: var(--primary-color);
  border-radius: 999px;
}
.sales-verification-ai-report-section-body {
  margin: 0;
  padding-left: 0.15rem;
}
.sales-verification-ai-report-p {
  margin: 0 0 0.55rem 0;
  font-size: 0.9375rem;
  line-height: 1.72;
  color: var(--text-color);
  word-break: break-word;
}
.sales-verification-ai-report-p:last-child {
  margin-bottom: 0;
}

.sales-verification-ai-report-actions {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sales-verification-ai-report-actions-li {
  position: relative;
  margin: 0 0 0.55rem 0;
  padding-left: 1.15em;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-color);
  word-break: break-word;
}
.sales-verification-ai-report-actions-li::before {
  content: '\30FB';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  font-weight: 700;
  line-height: inherit;
}
.sales-verification-ai-report-actions-li:last-child {
  margin-bottom: 0;
}

@media (prefers-color-scheme: dark) {
  .sales-verification-ai-report-section {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  }
}

.sales-verification-product-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}
.sales-verification-product-row > label {
  width: 100%;
}
.sales-verification-product-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}
.sales-verification-product-inputs textarea {
  width: 100%;
  min-width: 12rem;
}
.sales-verification-periods-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}
.sales-verification-submit-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.sales-verification-submit-row .btn-primary,
.sales-verification-submit-row .btn-secondary {
  margin: 0;
}
.sales-verification-condition-area .sales-verification-period-block .filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.sales-verification-condition-area .sales-verification-period-block .filter-group > label {
  width: 100%;
}

/* 販売検証：条件エリア内の input/textarea を search-form と同じスタイルに */
.sales-verification-condition-area select,
.sales-verification-condition-area input[type="date"],
.sales-verification-condition-area input[type="text"],
.sales-verification-condition-area input[type="time"],
.sales-verification-condition-area input[type="number"],
.sales-verification-condition-area textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  background-color: var(--white-color);
  font-family: var(--base-font-family);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text-color);
}
.sales-verification-condition-area select:focus,
.sales-verification-condition-area input[type="date"]:focus,
.sales-verification-condition-area input[type="text"]:focus,
.sales-verification-condition-area input[type="time"]:focus,
.sales-verification-condition-area input[type="number"]:focus,
.sales-verification-condition-area textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}
.sales-verification-condition-area textarea {
  resize: vertical;
  min-width: 16rem;
}
.sales-verification-condition-area .filter-group label,
.sales-verification-condition-area .sales-verification-period-block .filter-group label {
  font-weight: 500;
  color: var(--subtext-color);
  font-size: 0.9rem;
}

/* 販売検証：比較期間の条件エリア（視認性） */
.sales-verification-period-block {
  padding: 1rem;
  border-radius: var(--border-radius-normal);
  border: 1px solid var(--border-color);
  background-color: var(--gray-50, #f8f9fa);
}
.sales-verification-period-block h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}
.sales-verification-period-block .filter-group {
  flex-wrap: wrap;
}
.sales-verification-period-block .filter-group > label {
  width: 100%;
  margin-bottom: 0.25rem;
}

/* ブランドサジェスト機能のスタイル */
.brand-suggest-wrapper {
  position: relative;
  display: inline-block;
  vertical-align: top;
  z-index: 10001;
  isolation: isolate;
}

.brand-suggest-input {
  width: 300px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  background-color: var(--white-color);
  font-family: var(--base-font-family);
  font-size: 1rem;
  color: var(--text-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.brand-suggest-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}

.brand-suggest-input::placeholder {
  color: var(--subtext-color);
}

.brand-suggest-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 300px;
  width: 100%;
  background-color: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10000;
  display: none;
  margin-top: 0;
}

.brand-suggest-dropdown.visible {
  display: block;
}

.brand-suggest-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.brand-suggest-item:last-child {
  border-bottom: none;
}

.brand-suggest-item:hover,
.brand-suggest-item.highlighted {
  background-color: #f0f9ff;
  color: var(--primary-color);
}

.brand-suggest-item .brand-name {
  font-weight: 500;
}

.brand-suggest-item .brand-code {
  font-size: 0.85rem;
  color: var(--subtext-color);
  margin-left: 0.5rem;
}

.brand-suggest-no-results {
  padding: 0.75rem 1rem;
  color: var(--subtext-color);
  text-align: center;
  font-style: italic;
}

.brand-select-trigger {
  width: 300px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  background-color: var(--white-color);
  font-family: var(--base-font-family);
  font-size: 1rem;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.brand-select-trigger:hover {
  border-color: var(--primary-color);
}

.brand-select-trigger .placeholder {
  color: var(--subtext-color);
}

.brand-select-trigger .fas {
  color: var(--subtext-color);
  font-size: 0.875rem;
  transition: transform 0.2s;
}

.brand-suggest-list {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
}

/** 商品ランキングレポート **/

.report-modal-content {
  background: var(--white-color);
  border-radius: var(--border-radius-strong);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.report-modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #007a6b 0%, #005a8f 100%);
  color: #ffffff;
  border-radius: var(--border-radius-strong) var(--border-radius-strong) 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-modal-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
}

.report-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.report-modal-header h2 i {
  font-size: 1.75rem;
  color: #ffffff;
}

.report-sort-toggle {
  display: flex;
  gap: 0.5rem;
}

.report-sort-toggle .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.2s;
}

.report-sort-toggle .btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.report-sort-toggle .btn-primary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  border-color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.report-sort-toggle .btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}

.report-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--white-color);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-normal);
  transition: background-color 0.2s;
}

.report-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.report-modal-body {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

.report-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  text-align: right;
  background: #f7f9fc;
  border-radius: 0 0 var(--border-radius-strong) var(--border-radius-strong);
}

.report-section {
  margin-bottom: 2.5rem;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.report-section:last-child {
  margin-bottom: 0;
}

.report-section-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.report-extraction-condition {
  padding: 1rem 1.5rem;
  background: #f7f9fc;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-color);
}

.report-extraction-condition p {
  margin: 0;
  line-height: 1.6;
}

.report-extraction-condition strong {
  color: var(--primary-color);
  font-weight: 600;
}

.report-section-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
}

.report-section-header i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.report-product-list {
  padding: 1rem 1.5rem;
}

.report-product-item {
  display: grid;
  grid-template-columns: 150px 1fr 100px;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  transition: background-color 0.2s;
}

.report-product-item:last-child {
  border-bottom: none;
}

.report-product-item:hover {
  background-color: #f0f8ff;
}

.report-product-code {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--subtext-color);
  font-weight: 500;
}

.report-product-name {
  font-weight: 500;
  color: var(--text-color);
  text-align: left;
}

/* 機会ロスレポート：ブランドリストは2列（ブランド名｜金額）でブランド名を一番左に配置 */
.report-opportunity-loss-brands .report-product-item {
  grid-template-columns: 1fr 100px;
}

.report-product-quantity {
  text-align: right;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.report-comment-box {
  margin: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--border-radius-normal);
  border-left: 4px solid;
}

.report-comment-info {
  background: #e6f3ff;
  border-left-color: var(--info-color);
}

.report-comment-success {
  background: #d1e7dd;
  border-left-color: var(--success-color);
}

.report-comment-warning {
  background: #fff3cd;
  border-left-color: var(--warning-color);
}

.report-comment-box p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.report-comment-box p:first-child {
  margin-top: 0;
}

.report-comment-box p:last-child {
  margin-bottom: 0;
}

.report-action-box {
  margin: 1.5rem;
  padding: 1.25rem;
  background: #f7f9fc;
  border-radius: var(--border-radius-normal);
}

.report-action-box p {
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  color: var(--text-color);
}

.report-action-box ul {
  margin: 0;
  padding-left: 1.5rem;
  line-height: 1.8;
}

.report-action-box li {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.simu-report-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.simu-report-card {
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 8px 18px rgba(20, 46, 89, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.simu-report-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(20, 46, 89, 0.12);
}

.simu-report-card-header {
  background: linear-gradient(135deg, #eef5ff 0%, #e7f8f4 100%);
  border-bottom: 1px solid #d8e5f2;
  padding: 1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.simu-report-card-header-main {
  min-width: 0;
  flex: 1;
}

.simu-report-card-index {
  display: inline-block;
  font-size: 0.78rem;
  color: #2d5a88;
  margin-bottom: 0.3rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.simu-report-card-header h3 {
  margin: 0;
  font-size: 1.08rem;
  color: #20354f;
  line-height: 1.5;
  word-break: break-word;
}

.simu-report-card-row {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid #e6edf5;
}

.simu-report-card-row:last-child {
  border-bottom: none;
}

.simu-report-card-label {
  margin: 0 0 0.5rem 0;
  font-size: 0.8rem;
  color: #50657f;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.simu-report-card-value {
  margin: 0;
  line-height: 1.7;
  color: var(--text-color);
  white-space: pre-line;
}

.simu-report-items {
  margin: 0;
  padding-left: 1.2rem;
}

.simu-report-items li {
  margin: 0.45rem 0;
  color: #26384d;
  line-height: 1.65;
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.simu-report-items li span {
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

.simu-report-item-code {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  color: #2b4f79;
  background: #edf4fc;
  border: 1px solid #d8e4f1;
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.simu-report-item-name {
  min-width: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.simu-report-copy-btn {
  white-space: nowrap;
  flex-shrink: 0;
  border-color: #7aa8d8;
  color: #2e618f;
  background: rgba(255, 255, 255, 0.7);
}

.simu-report-copy-btn:hover {
  border-color: #4f88bf;
  color: #1f4f79;
  background: #ffffff;
}

.simu-report-copy-btn.is-copied {
  border-color: #4fa36f;
  color: #1f7a42;
  background: #edf9f1;
}

.report-action-box li:last-child {
  margin-bottom: 0;
}

.report-no-data {
  padding: 2rem;
  text-align: center;
  color: var(--subtext-color);
  font-style: italic;
}

.report-description {
  padding: 1.5rem 2rem;
}

.report-description-intro {
  margin-bottom: 2rem;
}

.report-description-main {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.report-description-sub {
  font-size: 1rem;
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.report-description-points {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.report-description-point {
  background: #f7f9fc;
  border-left: 4px solid var(--primary-color);
  border-radius: var(--border-radius-normal);
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.report-description-point:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateX(4px);
}

.report-description-point-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e8f0;
}

.report-description-point-title i {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.report-description-point-content {
  padding-left: 0;
}

.report-description-point-content p {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.report-description-point-content p:last-child {
  margin-bottom: 0;
}

/** SKU検索モーダル **/

.sku-search-modal-content {
  background: var(--white-color);
  border-radius: var(--border-radius-strong);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.sku-search-modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #007a6b 0%, #005a8f 100%);
  color: #ffffff;
  border-radius: var(--border-radius-strong) var(--border-radius-strong) 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sku-search-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.sku-search-modal-header h2 i {
  font-size: 1.75rem;
  color: #ffffff;
}

.sku-search-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--white-color);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-normal);
  transition: background-color 0.2s;
}

.sku-search-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sku-search-modal-body {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

.sku-search-input-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.sku-search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  background-color: var(--white-color);
  font-family: var(--base-font-family);
  font-size: 1rem;
  color: var(--text-color);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sku-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}

.sku-search-results {
  margin-top: 1rem;
  overflow-x: auto;
}

.sku-search-results .custom-table {
  width: 100%;
  font-size: 0.85rem;
  table-layout: fixed;
}

.sku-search-results .custom-table th {
  background-color: #f7f9fc;
  font-weight: 600;
  padding: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sku-search-results .custom-table td {
  padding: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sku-search-results .custom-table tbody tr:hover {
  background-color: #f0f8ff;
}

.sku-search-results .custom-table th:nth-child(1),
.sku-search-results .custom-table td:nth-child(1) {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
}

.sku-search-results .custom-table th:nth-child(2),
.sku-search-results .custom-table td:nth-child(2) {
  width: 120px;
  min-width: 120px;
}

.sku-search-results .custom-table th:nth-child(3),
.sku-search-results .custom-table td:nth-child(3) {
  width: 120px;
  min-width: 120px;
}

.sku-search-results .custom-table th:nth-child(4),
.sku-search-results .custom-table td:nth-child(4) {
  width: auto;
  min-width: 200px;
  max-width: 300px;
  white-space: normal;
  word-wrap: break-word;
}

.sku-search-results .custom-table th:nth-child(5),
.sku-search-results .custom-table td:nth-child(5) {
  width: 80px;
  min-width: 80px;
}

.sku-search-results .custom-table th:nth-child(6),
.sku-search-results .custom-table td:nth-child(6) {
  width: 80px;
  min-width: 80px;
}

.sku-search-results .custom-table th:nth-child(7),
.sku-search-results .custom-table td:nth-child(7) {
  width: 100px;
  min-width: 100px;
}

/* 商品コード検索モーダル用（3列・商品名はモーダル幅いっぱい） */
.product-code-search-results .custom-table {
  width: 100%;
  table-layout: fixed;
}
.product-code-search-results .custom-table th:nth-child(1),
.product-code-search-results .custom-table td:nth-child(1) {
  width: 80px;
  min-width: 80px;
  max-width: 80px;
}
.product-code-search-results .custom-table th:nth-child(2),
.product-code-search-results .custom-table td:nth-child(2) {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}
.product-code-search-results .custom-table th:nth-child(3),
.product-code-search-results .custom-table td:nth-child(3) {
  width: auto;
  min-width: 150px;
  white-space: normal;
  word-wrap: break-word;
}

.sku-search-no-results,
.sku-search-initial-message {
  padding: 3rem;
  text-align: center;
  color: var(--subtext-color);
  font-style: italic;
}

.sku-search-modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border-color);
  text-align: right;
  background: #f7f9fc;
  border-radius: 0 0 var(--border-radius-strong) var(--border-radius-strong);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius-normal);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* --- テーブル --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* 複数購入分析: 詳細データの横スクロール（上下にスクロールバー） */
.multiple-purchases-table-wrapper {
  width: 100%;
}
.multiple-purchases-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  height: 17px;
}
.multiple-purchases-scroll-inner {
  height: 1px;
}
.multiple-purchases-scroll-main {
  overflow-x: auto;
  max-width: 100%;
}
.multiple-purchases-scroll-main:not(.is-scrollable) {
  overflow-x: hidden;
}
.multiple-purchases-scroll-main .table-responsive {
  overflow-x: visible;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
}

.custom-table th,
.custom-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.custom-table th.text-end,
.custom-table td.text-end {
  text-align: right;
}

.custom-table thead th {
  background-color: #f7f9fc;
  color: var(--text-color);
  font-weight: 700;
  vertical-align: bottom;
}
.custom-table thead .group-header th {
    text-align: center;
    border-bottom: 1px solid #d0d8e0;
    font-weight: 700;
}
.custom-table thead .sub-header th {
    font-weight: 500;
    color: var(--subtext-color);
    font-size: 0.9rem;
}

.custom-table th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 2rem;
}

.custom-table th.sortable .sort-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--subtext-color);
}

.custom-table tbody tr:hover {
  background-color: #f0f8ff;
}

.custom-table td a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}
.custom-table td a:hover {
    text-decoration: underline;
}

.truncate-text {
  display: inline-block;
  max-width: 350px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* AI受注傾向: カードヘッダー（タイトル＋対象期間） */
.ai-order-trend-card__header-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 1.5rem;
}
.ai-order-trend-card__header-left {
  flex: 1 1 16rem;
  min-width: 0;
}
.ai-order-trend-card__h2 {
  margin: 0 0 0.35rem 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.ai-order-trend-card__lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}
.ai-order-trend-period-badge {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 169, 157, 0.08);
  border: 1px solid rgba(0, 169, 157, 0.22);
  border-radius: 0.45rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.ai-order-trend-period-badge__label {
  display: block;
  font-weight: 700;
  color: var(--text-color, #212529);
  margin-bottom: 0.2rem;
}
.ai-order-trend-period-badge__label i {
  margin-right: 0.35rem;
  color: var(--primary-color, #00a99d);
}
.ai-order-trend-period-badge__value {
  display: block;
  color: var(--text-color, #212529);
  word-break: break-all;
}
.ai-order-trend-period-badge__ref {
  display: block;
  font-size: 0.78rem;
  color: var(--subtext-color, #6c757d);
  margin-top: 0.15rem;
}

/* AI受注傾向: テーブル（コンパクト行・商品名は40文字相当の列幅を確保しCSS省略しない） */
.ai-order-trend-card .ai-order-trend-table {
  table-layout: fixed;
  width: 100%;
}
.ai-order-trend-card .ai-order-trend-table th,
.ai-order-trend-card .ai-order-trend-table td {
  padding: 0.36rem 0.4rem;
  vertical-align: middle;
  line-height: 1.3;
}
.ai-order-trend-card .ai-order-trend-col-code {
  width: 18%;
  min-width: 9rem;
}
.ai-order-trend-card .ai-order-trend-col-name {
  width: auto;
  min-width: 24rem;
}
.ai-order-trend-card .ai-order-trend-col-action {
  width: 4.25rem;
  min-width: 4.25rem;
  white-space: nowrap;
  vertical-align: middle;
  text-align: right;
}
.ai-order-trend-card .ai-order-trend-code {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  padding-right: 0.25rem;
  box-sizing: border-box;
}
.ai-order-trend-card .ai-order-trend-name {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  cursor: default;
  padding-left: 0.05rem;
  font-size: 0.875rem;
}
.ai-order-trend-card .ai-order-trend-table th:nth-child(3),
.ai-order-trend-card .ai-order-trend-table td:nth-child(3),
.ai-order-trend-card .ai-order-trend-table th:nth-child(4),
.ai-order-trend-card .ai-order-trend-table td:nth-child(4),
.ai-order-trend-card .ai-order-trend-table th:nth-child(5),
.ai-order-trend-card .ai-order-trend-table td:nth-child(5),
.ai-order-trend-card .ai-order-trend-table th:nth-child(6),
.ai-order-trend-card .ai-order-trend-table td:nth-child(6) {
  width: 6.2rem;
}

/* AI受注傾向: アップ／ダウン切替（セグメントタブ） */
.ai-trend-seg {
  display: inline-flex;
  gap: 0;
  margin: 0 0 0.85rem 0;
  padding: 0.35rem;
  background: linear-gradient(180deg, rgba(0, 169, 157, 0.06) 0%, rgba(233, 236, 239, 0.65) 100%);
  border: 1px solid var(--border-color, #dee2e6);
  border-radius: 0.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.ai-trend-seg__btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: none;
  background: transparent;
  color: var(--subtext-color, #6c757d);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.15rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
  line-height: 1.25;
}
.ai-trend-seg__btn:hover {
  color: var(--primary-color, #00a99d);
  background: rgba(255, 255, 255, 0.65);
}
.ai-trend-seg__btn--active {
  color: #fff;
  background: linear-gradient(135deg, #00a99d 0%, #008c82 100%);
  box-shadow: 0 4px 14px rgba(0, 169, 157, 0.35);
  transform: translateY(-1px);
}
.ai-trend-seg__btn--down-active {
  background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
  box-shadow: 0 4px 14px rgba(220, 53, 69, 0.35);
}
.ai-trend-seg__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--primary-color, #00a99d);
}
.ai-trend-seg__btn--active .ai-trend-seg__icon--up {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.ai-trend-seg__btn--down-active .ai-trend-seg__icon--down {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.ai-trend-seg__btn:not(.ai-trend-seg__btn--active) .ai-trend-seg__icon--down {
  color: #dc3545;
}
.ai-trend-seg__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.ai-trend-seg__title {
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.ai-trend-seg__count {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.92;
}

/* AI受注傾向: ページ内グラフ（AIレポートの上） */
.ai-order-trend-chart-card {
  border: 1px solid var(--border-color, #dee2e6);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.ai-order-trend-chart-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(0, 169, 157, 0.07) 0%, rgba(255, 255, 255, 1) 55%);
  border-bottom: 1px solid var(--border-color, #dee2e6);
}
.ai-order-trend-chart-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem 0;
  color: var(--text-color, #212529);
}
.ai-order-trend-chart-card__meta {
  font-size: 0.875rem;
  line-height: 1.45;
  word-break: break-word;
}
.ai-order-trend-chart-card__body {
  width: 100%;
  box-sizing: border-box;
}
.ai-order-trend-inline-chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem 1.25rem;
  min-height: 360px;
  height: min(52vh, 560px);
}
.ai-order-trend-inline-chart-wrap canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

/* AI受注傾向: AIレポートカード */
.ai-product-report-card {
  border: 1px solid var(--border-color, #dee2e6);
}
.ai-product-report-card--attached {
  margin-top: -1px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.ai-product-report-card__header {
  background: linear-gradient(90deg, rgba(0, 169, 157, 0.08) 0%, rgba(255, 255, 255, 1) 50%);
  border-bottom: 1px solid var(--border-color, #dee2e6);
}
.ai-product-report-card .ai-product-report-card-body {
  padding-top: 1.15rem;
  padding-bottom: 1.35rem;
}
.ai-product-report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.ai-product-report-selected {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 169, 157, 0.06);
  border-radius: 0.4rem;
  border-left: 3px solid rgba(0, 169, 157, 0.55);
  color: var(--text-color, #212529);
}
.ai-product-report-loading {
  margin: 0;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--subtext-color, #6c757d);
  font-weight: 500;
}
.ai-product-report-loading__pulse {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--primary-color, #00a99d);
  animation: ai-report-pulse 1s ease-in-out infinite;
}
@keyframes ai-report-pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}
.ai-product-report-placeholder {
  margin: 0;
  line-height: 1.65;
}
.ai-product-report-content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-color, #212529);
}
.ai-product-report-block {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0 0 0.75rem 0;
  padding: 0.95rem 1rem 0.95rem 0.85rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.ai-product-report-block--stripe {
  background: rgba(248, 249, 250, 0.95);
}
.ai-product-report-block:last-child {
  margin-bottom: 0;
}
.ai-product-report-block__icon {
  flex: 0 0 auto;
  width: 1.75rem;
  text-align: center;
  color: var(--primary-color, #00a99d);
  padding-top: 0.1rem;
}
.ai-product-report-block__icon--muted {
  color: rgba(0, 169, 157, 0.45);
}
.ai-product-report-block__inner {
  flex: 1;
  min-width: 0;
}
.ai-product-report-block--head {
  font-weight: 600;
  border-left: 4px solid var(--primary-color, #00a99d);
  background: linear-gradient(90deg, rgba(0, 169, 157, 0.1) 0%, rgba(255, 255, 255, 1) 42%);
}
.ai-product-report-article {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 0 0 0.85rem 0;
  padding: 0.85rem 1rem;
  background: #fff;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 169, 157, 0.12);
  box-shadow: 0 2px 10px rgba(0, 169, 157, 0.06);
}
.ai-product-report-article__num {
  flex: 0 0 auto;
  min-width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background: var(--primary-color, #00a99d);
  border-radius: 0.45rem;
  box-shadow: 0 2px 6px rgba(0, 169, 157, 0.35);
}
.ai-product-report-article__body {
  flex: 1;
  min-width: 0;
  font-size: 0.94rem;
}
.ai-product-report-errors {
  margin-top: 0.85rem !important;
}
.ai-report-layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.ai-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.ai-report-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.55rem;
  background: #fff;
  padding: 0.8rem 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.ai-report-card--product {
  background: linear-gradient(180deg, rgba(0, 169, 157, 0.08) 0%, #ffffff 100%);
}
.ai-report-card--summary {
  border-left: 4px solid var(--primary-color, #00a99d);
  background: rgba(0, 169, 157, 0.03);
}
.ai-report-card__title {
  margin: 0 0 0.4rem 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-color, #212529);
}
.ai-report-card__body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 991.98px) {
  .ai-report-grid {
    grid-template-columns: 1fr;
  }
}

/* --- ステータスバッジ --- */
.status-badge { display: inline-block; padding: 0.25em 0.6em; font-size: 0.85rem; font-weight: 700; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: 1rem; }
.status-normal { background-color: var(--success-bg-subtle); color: var(--success-color); }
.status-loss { background-color: var(--danger-bg-subtle); color: var(--danger-color); }
.status-warning { background-color: var(--warning-bg-subtle); color: var(--warning-color); }
.status-attention { background-color: var(--info-bg-subtle); color: var(--info-color); }
.status-improve { background-color: var(--warning-bg-subtle); color: var(--warning-color); }
.status-no-improve { background-color: var(--default-bg-subtle); color: var(--text-color); }
.status-days-30 { background-color: var(--success-bg-subtle); color: var(--success-color); }
.status-days-60 { background-color: var(--info-bg-subtle); color: var(--info-color); }
.status-days-90 { background-color: var(--warning-bg-subtle); color: var(--warning-color); }
.status-days-120, .status-days-150, .status-days-180, .status-days-over-half-year { background-color: var(--danger-bg-subtle); color: var(--danger-color); }
.abc-rank-a { color: var(--success-color); font-weight: 700; }
.abc-rank-b { color: var(--info-color); font-weight: 700; }
.abc-rank-c { color: var(--warning-color); font-weight: 700; }

/* --- 注釈 --- */
.notes-card .card-body { font-size: 0.9rem; color: var(--subtext-color); }
.notes-card ul { margin: 0; padding-left: 1.2rem; }

/* 旧sidebar-footer-iconsスタイルは新しいrail-itemスタイルに統合済みのため削除 */

/* --- モーダル共通スタイル --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.modal-overlay.visible {
    display: flex;
    opacity: 1;
}

.modal-content {
  background: var(--white-color);
  padding: 2.5rem;
  border-radius: var(--border-radius-strong);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 500px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.2s ease-in-out;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.modal-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.modal-actions .btn-secondary {
    background-color: #e9ecef;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.modal-actions .btn-secondary:hover {
    background-color: #dee2e6;
}

/* --- ローディングモーダルスタイル --- */
.loading-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10010;
}

.loading-modal-content {
  background: var(--white-color);
  padding: 2.5rem 3rem;
  border-radius: var(--border-radius-strong);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  text-align: center;
  min-width: 200px;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 1.5rem;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  margin: 0;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
}

/* --- ログインページ専用スタイル --- */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
}

.login-card .logo {
  display: block;
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-card .logo img {
  display: inline-block;
  width: 252px;
  max-width: 100%;
  height: auto;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(2px);
  color: var(--subtext-color);
}

.login-card .input-with-icon {
  position: relative;
}

.login-card .input-with-icon .input-icon {
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none;
  line-height: 1;
  pointer-events: none;
  color: var(--subtext-color);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}

.login-card .btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 1.1rem;
  justify-content: center;
}

.forgot-password {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 0.9rem;
}
.forgot-password:hover {
  text-decoration: underline;
}

.forgot-password-page__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-color, #333);
}

.forgot-password-page__lead {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--secondary-color, #666);
  text-align: center;
}

.forgot-password-page__lead--success {
  color: var(--text-color, #333);
}

.forgot-password-page__back {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.forgot-password-page__back a {
  color: var(--secondary-color);
  text-decoration: none;
}

.forgot-password-page__back a:hover {
  text-decoration: underline;
}

.error-message {
    background-color: var(--danger-bg-subtle);
    color: var(--danger-color);
    padding: 1rem;
    border-radius: var(--border-radius-normal);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* --- トップページ専用スタイル --- */
.announcements-list { list-style: none; padding: 0; margin: 0; }
.announcements-list-scroll { max-height: 15rem; overflow-y: auto; }
.announcement-item { display: flex; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.announcement-item:last-child { border-bottom: none; }
.announcement-item a { text-decoration: none; color: var(--text-color); font-weight: 500; transition: color 0.2s; }
.announcement-item a:hover { color: var(--primary-color); }
.announcement-date { margin-left: auto; color: var(--subtext-color); font-size: 0.9rem; flex-shrink: 0; padding-left: 1rem; }
.new-badge { background-color: var(--danger-color); color: var(--white-color); font-size: 0.7rem; font-weight: 700; padding: 0.2em 0.6em; border-radius: 1rem; margin-right: 0.75rem; }

/* ショートカットカード */
.shortcut-cards-section { margin-top: 2rem; }
.shortcut-cards-section.home-utility-cards-section + .shortcut-cards-section { margin-top: 2rem; }
.shortcut-cards-title { margin: 0 0 1rem 0; font-size: 1.25rem; color: var(--text-color); display: flex; align-items: center; gap: 0.5rem; }
.shortcut-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; align-items: stretch; }
.shortcut-card { display: flex; flex-direction: column; height: 100%; background: var(--white-color); border-radius: var(--border-radius-normal); padding: 1.25rem; box-shadow: var(--box-shadow); text-decoration: none; color: var(--text-color); border: 1px solid var(--border-color); transition: transform 0.2s, box-shadow 0.2s; }
.shortcut-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); border-color: var(--primary-color); }
.shortcut-card-title { margin: 0 0 0.5rem 0; font-size: 1rem; color: var(--secondary-color); line-height: 1.4; }
.shortcut-card-comment { flex: 1 1 auto; margin: 0; font-size: 0.875rem; color: var(--subtext-color); line-height: 1.5; }
.shortcut-card-link { align-self: flex-end; margin-top: auto; padding-top: 0.75rem; font-size: 0.875rem; color: var(--primary-color); font-weight: 500; display: inline-flex; align-items: center; gap: 0.35rem; }
.shortcut-card:hover .shortcut-card-link { text-decoration: underline; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { background-color: #fff; border-radius: var(--border-radius-normal); padding: 1.5rem; box-shadow: var(--box-shadow); transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; color: var(--text-color); }
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.feature-card h3 { margin: 0 0 0.5rem 0; color: var(--secondary-color); display: flex; align-items: center; gap: 0.5rem; }
.feature-card p { margin: 0; font-size: 0.9rem; color: var(--subtext-color); line-height: 1.5; }
#announcementModal .modal-content { text-align: left; }
#announcementModal h3 { text-align: center; }
#announcementModal-date { text-align: center; color: var(--subtext-color); font-size: 0.9rem; margin-bottom: 1.5rem; }
#announcementModal-body { line-height: 1.7; }

/* --- ダッシュボード --- */
.dashboard-page { padding: 0; position: relative; }
.dashboard-warm-processing {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    border-radius: var(--border-radius-normal);
    min-height: 200px;
}
.dashboard-warm-processing-inner {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
}
.dashboard-warm-processing-title {
    margin: 1rem 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
}
.dashboard-warm-processing-desc {
    margin: 0;
    font-size: 0.95rem;
    color: var(--subtext-color);
}
.dashboard-grid--dimmed {
    opacity: 0.45;
    pointer-events: none;
}
.dashboard-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: start;
    margin-bottom: 1.5rem;
    width: 100%;
}
.dashboard-header > div:first-child {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}
.dashboard-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.dashboard-title-row h1 {
    margin: 0;
}
.dashboard-refresh-btn {
    flex-shrink: 0;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
}
.dashboard-header h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}
.dashboard-header .page-description {
    margin-top: 0.35rem;
    margin-bottom: 0;
    font-size: 0.95rem;
    max-width: min(42rem, 100%);
    line-height: 1.55;
    overflow-wrap: break-word;
}
.dashboard-header-right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.dashboard-header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.dashboard-header-buttons > * {
    flex-shrink: 0;
}
.dashboard-header-buttons .btn,
.dashboard-header-buttons button {
    white-space: nowrap;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}
.dashboard-column {
    min-width: 0;
    min-height: 120px;
    border-radius: var(--border-radius-normal);
    background: rgba(0, 169, 157, 0.03);
    border: 1px dashed var(--border-color);
    padding: 0.75rem;
    transition: background 0.2s, border-color 0.2s;
}
.dashboard-column[dragover] { background: rgba(0, 169, 157, 0.08); border-color: var(--primary-color); }
.dashboard-drop-slot {
    min-height: 20px;
    transition: min-height 0.15s ease, background 0.15s;
}
.dashboard-drop-slot-active {
    min-height: 24px;
    background: rgba(0, 169, 157, 0.06);
}
.dashboard-drop-placeholder {
    height: 4px;
    margin: 4px 0;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 0.9;
}
.dashboard-card-grip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: var(--subtext-color);
    padding: 0.25rem 0.15rem;
    margin: -0.25rem 0.25rem -0.25rem -0.25rem;
    border-radius: var(--border-radius-normal);
    user-select: none;
    -webkit-user-drag: element;
    touch-action: none;
    position: relative;
    z-index: 2;
    border: none;
    background: transparent;
    font: inherit;
    outline: none;
    min-width: 0;
    width: 1.25em;
    box-sizing: content-box;
}
.dashboard-card-grip:hover {
    color: var(--primary-color);
    background: rgba(0, 169, 157, 0.1);
}
.dashboard-card-grip:active {
    cursor: grabbing;
}
.dashboard-card-grip i {
    pointer-events: none;
}
.dashboard-card-wrap-dragging {
    opacity: 0.5;
    pointer-events: none;
}
.dashboard-card-wrap {
    margin-bottom: 1rem;
}
.dashboard-card-wrap:last-child { margin-bottom: 0; }
.dashboard-card {
    background: var(--white-color);
    border-radius: var(--border-radius-strong);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.dashboard-card:hover {
    box-shadow: 0 6px 20px rgba(0, 169, 157, 0.12);
    border-color: rgba(0, 169, 157, 0.25);
}
.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(0, 169, 157, 0.08) 0%, rgba(0, 112, 192, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}
.dashboard-card-header span:not(.dashboard-card-grip) { flex: 1; min-width: 0; }
.dashboard-card .btn-remove-card {
    background: transparent;
    border: none;
    color: var(--subtext-color);
    padding: 0.35rem 0.5rem;
    border-radius: var(--border-radius-normal);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s, background 0.2s;
}
.dashboard-card .btn-remove-card:hover {
    color: var(--danger-color);
    background: var(--danger-bg-subtle);
}
.dashboard-card-body {
    padding: 1.25rem 1.25rem;
    font-size: 0.95rem;
}
.dashboard-card-footer {
    padding: 0.65rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
    text-align: right;
}
.dashboard-card-menu-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.dashboard-card-menu-link:hover { text-decoration: underline; color: var(--secondary-color); }
.dashboard-card-summary { display: flex; flex-direction: column; gap: 0.65rem; }
.dashboard-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.9rem;
}
.dashboard-summary-row:last-child { border-bottom: none; }
.dashboard-summary-row span:first-child { color: var(--subtext-color); font-weight: 500; }
.dashboard-summary-row span:last-child { font-weight: 600; color: var(--text-color); }
.dashboard-chart-wrap { position: relative; width: 100%; }
.dashboard-chart-wrap-large { height: 220px; }
.dashboard-chart-wrap-large canvas { max-height: 220px !important; }
.dashboard-chart-wrap-hbar { height: 72px; }
.dashboard-chart-wrap-hbar canvas { max-height: 72px !important; }
.dashboard-chart-wrap-bar { height: 160px; }
.dashboard-chart-wrap-bar canvas { max-height: 160px !important; }
.dashboard-card-best-items .best-items-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}
.dashboard-card-best-items .best-items-tabs button {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--white-color);
    border-radius: var(--border-radius-normal);
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--subtext-color);
    transition: all 0.2s;
}
.dashboard-card-best-items .best-items-tabs button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white-color);
}
.dashboard-card-best-items .best-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dashboard-card-best-items .best-items-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.9rem;
}
.dashboard-card-best-items .best-items-list li .rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.dashboard-card-best-items .best-items-list li .amount { margin-left: auto; font-weight: 600; color: var(--primary-color); }
.dashboard-modal .modal-content { max-width: 420px; }
.dashboard-add-modal { text-align: left; padding: 0; overflow: hidden; }
.dashboard-add-modal .dashboard-add-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.dashboard-add-modal .dashboard-add-modal-title { margin: 0; font-size: 1.2rem; color: var(--text-color); flex: 1; }

/* 未出荷確認：経過日数別 詳細データ（2列・4列固定レイアウト） */
.unshipped-check-page .unshipped-check-summary-table {
  table-layout: fixed;
  width: 100%;
}
.unshipped-check-page .unshipped-check-summary-table .unshipped-check-summary-table__col-days {
  width: 20%;
}
.unshipped-check-page .unshipped-check-summary-table .unshipped-check-summary-table__col-count {
  width: 22%;
}
.unshipped-check-page .unshipped-check-summary-table .unshipped-check-summary-table__col-amount {
  width: 46%;
}
.unshipped-check-page .unshipped-check-summary-table .unshipped-check-summary-table__col-action {
  width: 12%;
  min-width: 4.25rem;
  text-align: center;
}
.unshipped-check-page .unshipped-check-summary-table .unshipped-check-summary-table__col-count,
.unshipped-check-page .unshipped-check-summary-table .unshipped-check-summary-table__col-amount {
  white-space: nowrap;
}
.unshipped-check-page .unshipped-check-summary-table .unshipped-check-summary-table__action-cell {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  vertical-align: middle;
  text-align: center;
}
.unshipped-check-page .unshipped-check-summary-table .unshipped-check-summary-table__action-cell .btn {
  width: auto;
  min-width: 3.25rem;
}

/* 未出荷確認：受注詳細モーダル（modal-overlay パターン） */
.unshipped-check-page .unshipped-order-detail-overlay .unshipped-order-detail-modal {
  max-width: 960px;
  width: 95%;
  text-align: left;
  padding: 0;
  overflow: hidden;
}
.unshipped-check-page .unshipped-order-detail-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}
.unshipped-check-page .unshipped-order-detail-modal__title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-color);
  flex: 1;
}
.unshipped-check-page .unshipped-order-detail-modal__body {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  text-align: left;
}
.unshipped-check-page .unshipped-order-detail-modal__pager {
  margin-bottom: 0.75rem;
}
.unshipped-check-page .unshipped-order-detail-modal__pager + .unshipped-order-detail-modal__table-wrap {
  margin-bottom: 0.75rem;
}
.unshipped-check-page .unshipped-order-detail-modal__table-wrap {
  overflow-x: auto;
}
.unshipped-check-page .unshipped-order-detail-modal__table {
  table-layout: fixed;
  width: 100%;
  margin-bottom: 0;
}
.unshipped-check-page .unshipped-order-detail-modal__table .unshipped-order-detail-modal__col-order-no {
  width: 24%;
}
.unshipped-check-page .unshipped-order-detail-modal__table .unshipped-order-detail-modal__col-product {
  width: 40%;
}
.unshipped-check-page .unshipped-order-detail-modal__table .unshipped-order-detail-modal__col-qty {
  width: 12%;
}
.unshipped-check-page .unshipped-order-detail-modal__table .unshipped-order-detail-modal__col-amount {
  width: 24%;
}
.unshipped-check-page .unshipped-order-detail-modal__table-wrap + .unshipped-order-detail-modal__pager {
  margin-top: 0.75rem;
  margin-bottom: 0;
}
.unshipped-check-page .unshipped-order-detail-modal__product-name,
.unshipped-check-page .unshipped-order-detail-modal__order-no {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}
.unshipped-check-page .unshipped-order-detail-modal__table td.text-nowrap,
.unshipped-check-page .unshipped-order-detail-modal__table th.text-end {
  white-space: nowrap;
}
.dashboard-add-modal .dashboard-add-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #fafafa;
}
.dashboard-add-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 280px; overflow-y: auto; }
.dashboard-add-item { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.4rem 0; }

/* ダッシュボード: タイプ切替・KPIタイプ */
.dashboard-type-switch {
    display: inline-flex;
    gap: 0;
    margin-top: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    overflow: hidden;
    background: #f0f3f6;
}
.dashboard-type-switch__btn {
    border: none;
    background: transparent;
    color: var(--subtext-color);
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dashboard-type-switch__btn + .dashboard-type-switch__btn {
    border-left: 1px solid var(--border-color);
}
.dashboard-type-switch__btn.active {
    background: #fff;
    color: var(--primary-color);
}
.dashboard-type-switch__btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.6);
}
.dashboard-kpi-section {
    margin-bottom: 1.5rem;
}
.dashboard-kpi-alert {
    margin-bottom: 1rem;
}
.dashboard-kpi-empty {
    font-size: 0.95rem;
}
.dashboard-kpi-meta {
    margin: 0 0 1rem;
}
.dashboard-kpi-formula {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.75rem 0.5rem;
}
.dashboard-kpi-card {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    flex: 1 1 160px;
    min-width: 0;
}
.dashboard-kpi-card__inner {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    min-height: 11.5rem;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color);
    background: #f8fafb;
}
.dashboard-kpi-card__inner.card,
.dashboard-kpi-sales-label.card {
    margin-bottom: 0;
}
.dashboard-kpi-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.dashboard-kpi-card__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
}
.dashboard-kpi-card__link {
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.dashboard-kpi-card__value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 0.35rem;
}
.dashboard-kpi-card__desc {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    color: var(--subtext-color);
    line-height: 1.45;
}
.dashboard-kpi-card__compare {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: auto;
    font-size: 0.72rem;
    color: var(--subtext-color);
}
.dashboard-kpi-advice-panel {
    margin-top: 1.25rem;
    padding: 1.15rem 1.25rem 1.25rem;
    background: #f8fafb;
    border: 1px solid var(--border-color);
}
.dashboard-kpi-advice-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
.dashboard-kpi-advice-panel__head-text {
    min-width: 0;
    flex: 1 1 auto;
}
.dashboard-kpi-advice-panel__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
}
.dashboard-kpi-advice-panel__title .fa-robot {
    margin-right: 0.35rem;
    color: var(--primary-color);
}
.dashboard-kpi-advice-panel__meta {
    margin: 0;
    font-size: 0.78rem;
    color: var(--subtext-color);
}
.dashboard-kpi-advice-panel__cached {
    color: var(--primary-color);
}
.dashboard-kpi-advice-panel__generate {
    flex: 0 0 auto;
    white-space: nowrap;
}
.dashboard-kpi-advice-panel__idle {
    margin: 0;
    padding: 1.25rem 0 0.35rem;
    text-align: center;
    font-size: 0.85rem;
}
.dashboard-kpi-advice-panel__loading {
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
}
.dashboard-kpi-advice-panel__subtitle {
    margin: 1.15rem 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--subtext-color);
}
.dashboard-kpi-product-tips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.dashboard-kpi-product-tip {
    display: flex;
    flex-direction: column;
    padding: 0.9rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 0.35rem;
    min-height: 0;
}
.dashboard-kpi-product-tip__head {
    margin-bottom: 0.45rem;
}
.dashboard-kpi-product-tip__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.35;
}
.dashboard-kpi-product-tip__body {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-color);
}
.dashboard-kpi-product-tip__products {
    margin: 0 0 0.65rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.dashboard-kpi-product-tip__products li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.35rem 0.45rem;
    background: #f8fafb;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
}
.dashboard-kpi-product-tip__code {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
    word-break: break-all;
}
.dashboard-kpi-product-tip__name {
    font-size: 0.78rem;
    color: var(--text-color);
    line-height: 1.35;
    word-break: break-word;
}
.dashboard-kpi-product-tip__empty {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
}
.dashboard-kpi-product-tip__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.35rem;
}
.dashboard-kpi-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e8f6f4;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.dashboard-kpi-icon-link:hover {
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
}
.dashboard-kpi-icon-link--sm {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
}
.dashboard-kpi-advice-panel__list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.dashboard-kpi-advice-panel__list--grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}
.dashboard-kpi-advice-item {
    padding: 1rem 1.15rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.35rem;
}
.dashboard-kpi-advice-item--compact {
    padding: 0.75rem 0.9rem;
}
.dashboard-kpi-advice-item__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    flex-wrap: wrap;
}
.dashboard-kpi-advice-item--compact .dashboard-kpi-advice-item__head {
    margin-bottom: 0.4rem;
}
.dashboard-kpi-advice-item__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-color);
}
.dashboard-kpi-advice-item--compact .dashboard-kpi-advice-item__title {
    font-size: 0.88rem;
}
.dashboard-kpi-advice-item__metric {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}
.dashboard-kpi-advice-item--compact .dashboard-kpi-advice-item__metric {
    font-size: 0.82rem;
}
.dashboard-kpi-advice-item__body {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-color);
}
.dashboard-kpi-advice-item--compact .dashboard-kpi-advice-item__body {
    margin: 0 0 0.55rem;
    font-size: 0.8rem;
    line-height: 1.5;
}
.dashboard-kpi-advice-item__links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.dashboard-kpi-advice-item__links li {
    margin: 0;
}
.dashboard-kpi-advice-item__links a:not(.dashboard-kpi-icon-link) {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--primary-color);
    background: #f0faf9;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s ease;
}
.dashboard-kpi-advice-item__links a:not(.dashboard-kpi-icon-link):hover {
    background: #e2f5f3;
    text-decoration: none;
}
.dashboard-kpi-advice-alert {
    margin-bottom: 0.75rem;
}
.dashboard-kpi-operator {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--subtext-color);
    align-self: center;
}
.dashboard-kpi-operator--equals {
    width: auto;
    padding: 0 0.25rem;
}
.dashboard-kpi-card--sales {
    flex: 0 0 auto;
    min-width: 8.5rem;
}
.dashboard-kpi-card--sales .dashboard-kpi-sales-label {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 11.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    background: #f0faf9;
    text-align: center;
}
.dashboard-kpi-sales-label__text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}
.dashboard-kpi-sales-label__hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: var(--subtext-color);
    line-height: 1.4;
}
.dashboard-kpi-sales-label__budget {
    margin-top: 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}
.dashboard-kpi-sales-label__budget-label {
    font-size: 0.7rem;
    color: var(--subtext-color);
}
.dashboard-kpi-sales-label__budget-rate {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}
.dashboard-kpi-sales-label__link {
    margin-top: 0.55rem;
    font-size: 0.72rem;
    color: var(--primary-color);
    text-decoration: none;
}
.dashboard-kpi-sales-label__link:hover {
    text-decoration: underline;
}
@media (min-width: 993px) {
    .dashboard-kpi-formula {
        flex-wrap: nowrap;
    }
}
@media (max-width: 1100px) {
    .dashboard-kpi-product-tips {
        grid-template-columns: 1fr;
    }
    .dashboard-kpi-advice-panel__list--grid {
        grid-template-columns: 1fr;
    }
    .dashboard-kpi-advice-panel__head {
        flex-wrap: wrap;
    }
    .dashboard-kpi-advice-panel__generate {
        width: 100%;
    }
}
@media (max-width: 992px) {
    .dashboard-kpi-formula {
        flex-direction: column;
        align-items: stretch;
    }
    .dashboard-kpi-card {
        flex-direction: column;
        align-items: stretch;
    }
    .dashboard-kpi-card__inner {
        min-height: 0;
        height: auto;
    }
    .dashboard-kpi-operator {
        width: auto;
        height: 1.5rem;
        align-self: center;
    }
    .dashboard-kpi-card--sales {
        min-width: 0;
    }
    .dashboard-kpi-card--sales .dashboard-kpi-sales-label {
        min-height: 0;
        height: auto;
    }
}

@media (max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 576px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-header { flex-direction: column; }
    .dashboard-header-right { align-items: stretch; }
}

/* --- ページネーション --- */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 0 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.pagination-controls .rows-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pagination-controls .rows-per-page select {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}
.pagination-controls .page-info {
    font-size: 0.9rem;
    color: var(--subtext-color);
    font-weight: 500;
}
.pagination-controls .page-nav button {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.pagination-controls .page-nav button:hover:not(:disabled) {
    background-color: #e9ecef;
}
.pagination-controls .page-nav button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* --- AI Concierge ボタンとモーダル --- */
.ai-concierge-btn {
    position: absolute;
    top: 60px;
    right: 3rem;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-concierge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.ai-concierge-btn i {
    font-size: 16px;
}

/* AI Concierge モーダル */
#aiConciergeModal.ai-concierge-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 2000 !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
}

#aiConciergeModal.ai-concierge-modal.visible {
    display: flex !important;
}

.ai-concierge-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.ai-concierge-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-concierge-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.ai-concierge-title i {
    color: #667eea;
    font-size: 24px;
}

.ai-concierge-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--subtext-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ai-concierge-close:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}

.ai-concierge-body {
    padding: 24px;
}

.ai-concierge-section {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: white;
}

.ai-concierge-section:last-child {
    margin-bottom: 0;
}

.ai-concierge-section-header {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 16px;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-concierge-section-header i {
    font-size: 18px;
}

.ai-concierge-section-content {
    padding: 20px;
    background: white;
    color: var(--text-color);
    line-height: 1.6;
}

.ai-concierge-section-content p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.ai-concierge-section-content p:first-child {
    margin-top: 0;
}

.ai-concierge-section-content p:last-child {
    margin-bottom: 0;
}

/* 見出しの直後の要素のマージンを調整 */
.ai-concierge-section-content h2 + *,
.ai-concierge-section-content h3 + *,
.ai-concierge-section-content h4 + * {
    margin-top: 0.5rem;
}

/* リストの前の要素のマージンを調整 */
.ai-concierge-section-content * + .ai-section-list,
.ai-concierge-section-content * + .ai-numbered-list {
    margin-top: 0.5rem;
}

/* セクション1: 数値の状況（概要レポート） */
.ai-concierge-section.overview {
    border: 2px solid var(--primary-color);
}

.ai-concierge-section.overview .ai-concierge-section-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* セクション2: 有効な対策の提案 */
.ai-concierge-section.suggestions {
    border: 2px solid #6B7280;
}

.ai-concierge-section.suggestions .ai-concierge-section-header {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .ai-concierge-btn {
        top: 50px;
        right: 1.5rem;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    #aiConciergeModal.ai-concierge-modal {
        padding: 10px !important;
    }
    
    .ai-concierge-modal-content {
        max-height: 90vh;
    }
    
    .ai-concierge-header {
        padding: 20px 20px 12px 20px;
    }
    
    .ai-concierge-title {
        font-size: 18px;
    }
    
    .ai-concierge-body {
        padding: 20px;
    }
    
    .ai-concierge-section-header {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .ai-concierge-section-content {
        padding: 16px;
    }
}

/* --- AI Concierge ローディング・エラー表示 --- */
.ai-concierge-loading {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.ai-concierge-error {
    text-align: center;
    padding: 2rem;
    color: var(--danger-color);
}

.ai-concierge-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* --- AI Concierge レポート表示 --- */
.ai-concierge-report {
    padding: 0;
}

.ai-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem 0;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.ai-section-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0.5rem 0 0.5rem 0;
    color: var(--text-color);
}

.ai-section-text {
    line-height: 1.6;
    margin: 0.5rem 0;
    color: var(--text-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-section-list {
    margin: 0.5rem 0;
    padding-left: 2rem;
}

.ai-section-list:first-child {
    margin-top: 0;
}

.ai-section-list:last-child {
    margin-bottom: 0;
}

.ai-section-list li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.ai-code-block {
    background-color: #2d2d2d;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.ai-code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #f8f8f2;
    white-space: pre;
}

.ai-inline-code {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.2em 0.4em;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

.ai-section-h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0 0.5rem 0;
    color: var(--text-color);
}

.ai-numbered-list {
    margin: 0.5rem 0;
    padding-left: 2rem;
    list-style-type: decimal;
}

.ai-numbered-list:first-child {
    margin-top: 0;
}

.ai-numbered-list:last-child {
    margin-bottom: 0;
}

.ai-numbered-list li {
    margin: 0.5rem 0;
    line-height: 1.6;
    padding-left: 0.5rem;
}

.ai-blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: var(--border-radius-normal);
}

.ai-hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

/* 強調表示の改善 */
.ai-section-text strong {
    color: #667eea;
    font-weight: 700;
}

/* AI Concierge 注意書き */
.ai-concierge-disclaimer {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--border-radius-normal);
    border-left: 4px solid #ffc107;
}

.ai-concierge-disclaimer p {
    margin: 0;
    font-size: 0.9rem;
    color: #856404;
    line-height: 1.6;
}

/* AI分析機能共通の注意書き */
.ai-feature-disclaimer {
    margin: 0 0 0.75rem 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--subtext-color, #64748b);
}
.ai-feature-disclaimer .fa-info-circle {
    margin-right: 0.25rem;
    opacity: 0.85;
}
.weekly-report-page .ai-feature-disclaimer {
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}
.sales-verification-ai-report .ai-feature-disclaimer {
    margin-bottom: 0.85rem;
}
.report-modal-body .ai-feature-disclaimer {
    margin-bottom: 1rem;
}
.ai-product-report-card-body .ai-feature-disclaimer {
    margin-bottom: 0.65rem;
}
.ai-media-prediction-page .ai-feature-disclaimer {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

/** 店舗分析 **/

/* タブスタイル */
.tenpo-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 2px solid var(--border-color);
  flex-wrap: wrap;
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  padding-bottom: 2px;
}

/* スクロールバーのスタイリング（Webkit系ブラウザ用） */
.tenpo-tabs::-webkit-scrollbar {
  width: 8px;
}

.tenpo-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.tenpo-tabs::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 4px;
}

.tenpo-tabs::-webkit-scrollbar-thumb:hover {
  background-color: var(--subtext-color);
}

.tenpo-tab {
  padding: 0.5rem 1rem;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--subtext-color);
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
  margin-right: 0.25rem;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.tenpo-tab:hover {
  color: var(--primary-color);
  background-color: rgba(0, 169, 157, 0.08);
  border-color: var(--primary-color);
  box-shadow: 0 -2px 6px rgba(0, 169, 157, 0.15);
}

.tenpo-tab.active {
  color: var(--primary-color);
  background-color: var(--white-color);
  border-color: var(--primary-color);
  border-bottom-color: var(--white-color);
  font-weight: 700;
  box-shadow: 0 -3px 8px rgba(0, 169, 157, 0.2);
  z-index: 1;
}

.tenpo-tab-content {
  display: none;
}

.tenpo-tab-content.active {
  display: block;
}

/* 機会ロス状況ページ: タブエリアとコンテンツの余白を広く */
.opportunity-loss-page .opportunity-loss-tabs {
  margin-bottom: 1.5rem;
  padding-bottom: 4px;
}
.opportunity-loss-page .opportunity-loss-tab-content {
  margin-top: 1.5rem;
}
.opportunity-loss-page .opportunity-loss-tab-content.active {
  padding-top: 0;
}
.opportunity-loss-page .brand-link {
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: underline;
}
.opportunity-loss-page .brand-link:hover {
  text-decoration: none;
}

/** 商品ランキング **/

/* ランキングタブスタイル */
.ranking-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.ranking-tab {
  padding: 0.75rem 1.5rem;
  background: var(--white-color);
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--subtext-color);
  transition: all 0.2s;
  position: relative;
  bottom: -2px;
}

.ranking-tab:hover {
  background: var(--background-color);
  color: var(--text-color);
}

.ranking-tab.active {
  background: var(--white-color);
  color: var(--primary-color);
  border-color: var(--primary-color);
  border-bottom-color: var(--white-color);
  font-weight: 700;
  z-index: 1;
}

/* ソート切り替えボタン */
.sort-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.sort-toggle .btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* グリッドレイアウト用のスタイル */
/*
.search-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
*/
.filter-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* 滞留商品：CSVダウンロードボタン（薄グレー・角丸・軽い影・高さは再検索ボタンに合わせる） */
.btn-csv-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  background-color: #f0f0f0;
  color: #000;
  border: none;
  border-radius: 6px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.08);
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.btn-csv-download:hover {
  background-color: #e8e8e8;
  color: #000;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.12);
}
.btn-csv-download i {
  color: #000;
}
.btn-csv-download.disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: not-allowed;
}

.filter-row-full {
  width: 100%;
}

.filter-group-full {
  flex: 1;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.shop-select-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

/* 店舗選択のチェックボックススタイル */
.shop-select-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  max-height: 150px;
  overflow-y: auto;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-normal);
  background-color: var(--white-color);
}

.shop-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  min-width: 0;
}

.shop-checkbox-item:hover {
  background-color: rgba(0, 169, 157, 0.05);
}

.shop-checkbox-item input[type="checkbox"] {
  cursor: pointer;
  flex-shrink: 0;
}

.shop-checkbox-item label {
  cursor: pointer;
  flex: 1;
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  min-width: 0;
}

.shop-select-info {
  font-size: 0.85rem;
  color: var(--subtext-color);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .shop-select-container {
    grid-template-columns: 1fr;
  }
}




/** common parts **/

    .setting-item {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      padding: 1rem 0;
      border-bottom: 1px solid var(--border-color);
    }
    .setting-item:last-child {
      border-bottom: none;
    }
    .setting-item-label {
      width: 150px;
      flex-shrink: 0;
      font-weight: 500;
    }
    .setting-item-input {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .setting-item-input input {
      width: 120px;
      text-align: right;
    }
    .account-settings-page .setting-item-input {
      flex: 1;
      flex-direction: column;
      align-items: flex-start;
    }
    .account-settings-page .setting-item-input input {
      width: 100%;
      max-width: 20rem;
      text-align: left;
      padding: 0.75rem 1rem;
      border: 1px solid var(--border-color);
      border-radius: var(--border-radius-normal);
      background-color: var(--white-color);
      font-family: var(--base-font-family);
      font-size: 1rem;
      color: var(--text-color);
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .account-settings-page .setting-item-input input:focus {
      outline: none;
      border-color: var(--primary-color);
      box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
    }
    .setting-item-description {
      flex-grow: 1;
      font-size: 0.9rem;
      color: var(--subtext-color);
    }
    /* 週次レポート設定: 項目名＋入力＋単位は1行、解説は右側で折り返し可 */
    .weekly-report-settings .setting-item {
      align-items: flex-start;
      flex-wrap: nowrap;
    }
    .weekly-report-settings .setting-item-controls {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      flex-shrink: 0;
      flex-wrap: nowrap;
    }
    .weekly-report-settings .setting-item-label {
      width: auto;
      min-width: 11rem;
      max-width: none;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .weekly-report-settings .setting-item-input {
      flex-shrink: 0;
      white-space: nowrap;
    }
    .weekly-report-settings .setting-item-description {
      flex: 1 1 auto;
      min-width: 10rem;
      align-self: center;
    }
    @media (max-width: 900px) {
      .weekly-report-settings .setting-item {
        flex-wrap: wrap;
      }
      .weekly-report-settings .setting-item-description {
        flex: 1 1 100%;
        padding-left: 0;
      }
    }
    .form-actions {
        text-align: right;
        margin-top: 1.5rem;
    }



/* vue transition */
.fade-enter-active, .fade-leave-active {transition: all .25s;}
.fade-enter-from, .fade-leave-to {opacity: 0;}
.fade-enter-to, .fade-leave-from {opacity: 1;}

.toast {
    --bs-toast-zindex: 1090;
    --bs-toast-padding-x: 0.75rem;
    --bs-toast-padding-y: 0.5rem;
    --bs-toast-spacing: 1.5rem;
    --bs-toast-max-width: 350px;
    --bs-toast-font-size: 0.875rem;
    --bs-toast-color: ;
    --bs-toast-bg: rgba(var(--bs-body-bg-rgb), 0.85);
    --bs-toast-border-width: var(--bs-border-width);
    --bs-toast-border-color: var(--bs-border-color-translucent);
    --bs-toast-border-radius: var(--bs-border-radius);
    --bs-toast-box-shadow: var(--bs-box-shadow);
    --bs-toast-header-color: var(--bs-secondary-color);
    --bs-toast-header-bg: rgba(var(--bs-body-bg-rgb), 0.85);
    --bs-toast-header-border-color: var(--bs-border-color-translucent);
    width: var(--bs-toast-max-width);
    max-width: 100%;
    font-size: var(--bs-toast-font-size);
    color: var(--bs-toast-color);
    pointer-events: auto;
    background-color: var(--bs-toast-bg);
    background-clip: padding-box;
    border: var(--bs-toast-border-width) solid var(--bs-toast-border-color);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius-strong)
}

.toast.showing {
    opacity: 0
}

.toast:not(.show) {
    display: none
}

.toast-container {
    --bs-toast-zindex: 1090;
    position: absolute;
    z-index: var(--bs-toast-zindex);
    width: -webkit-max-content;
    width: -moz-max-content;
    width: max-content;
    max-width: 100%;
    pointer-events: none;
}

.toast-container>:not(:last-child) {
    margin-bottom: var(--bs-toast-spacing)
}

.toast-header {
    display: flex;
    align-items: center;
    padding: var(--bs-toast-padding-y) var(--bs-toast-padding-x);
    color: var(--bs-toast-header-color);
    background-color: var(--bs-toast-header-bg);
    background-clip: padding-box;
    border-bottom: var(--bs-toast-border-width) solid var(--bs-toast-header-border-color);
    border-top-left-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width));
    border-top-right-radius: calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))
}

.toast-header .btn-close {
    margin-right: calc(-.5 * var(--bs-toast-padding-x));
    margin-left: var(--bs-toast-padding-x)
}

.toast-body {
    padding: var(--bs-toast-padding-x);
    word-wrap: break-word
}

.text-bg-success {
    color: #fff!important;
    background-color: RGBA(25,135,84,var(--bs-bg-opacity,1))!important
}

.text-bg-info {
    color: #000!important;
    background-color: RGBA(13,202,240,var(--bs-bg-opacity,1))!important
}

.text-bg-warning {
    color: #000!important;
    background-color: RGBA(255,193,7,var(--bs-bg-opacity,1))!important
}

/* 受注サマリ用のスタイル */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.summary-item {
  padding: 1.5rem;
  background-color: var(--background-color);
  border-radius: var(--border-radius-normal);
  border: 1px solid var(--border-color);
  text-align: center;
}

.summary-label {
  font-size: 0.9rem;
  color: var(--subtext-color);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.summary-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.text-bg-danger {
    color: #fff!important;
    background-color: RGBA(220,53,69,var(--bs-bg-opacity,1))!important
}


.float-start {
    float: left!important
}

.float-end {
    float: right!important
}

.float-none {
    float: none!important
}

/* --- ブランド複数選択UI --- */

.btn-close {
    --bs-btn-close-color: #000;
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    --bs-btn-close-opacity: 0.5;
    --bs-btn-close-hover-opacity: 0.75;
    --bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    --bs-btn-close-focus-opacity: 1;
    --bs-btn-close-disabled-opacity: 0.25;
    --bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: .25em .25em;
    color: var(--bs-btn-close-color);
    background: transparent var(--bs-btn-close-bg) center/1em auto no-repeat;
    border: 0;
    border-radius: .375rem;
    opacity: var(--bs-btn-close-opacity)
}

/* --- 相談・依頼機能のスタイル --- */

/* 相談・依頼ボタン */
.inquiry-button {
    position: relative;
    height: auto;
    min-height: 2.75rem;
    white-space: nowrap;
}

.inquiry-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 6px;
    line-height: 1;
}

/* 相談・依頼モーダル */
.inquiry-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10003 !important;
    /* 親（ヘッダー右寄せブロック等）の text-align を継承しない */
    text-align: left !important;
}

.inquiry-modal-content {
    background: white;
    border-radius: var(--border-radius-strong);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--box-shadow);
    text-align: left;
    overflow-x: hidden;
}

.inquiry-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.inquiry-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.inquiry-modal-header .btn-close {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
    color: var(--text-color);
}

.inquiry-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    text-align: left;
}

/* ノートモーダル：幅を広げ、内容エリアをタイトル等と同幅に */
.note-modal-card {
    max-width: 640px;
    width: 90%;
}
.note-modal-body .form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    padding: 0.75rem;
}
.note-modal-body textarea.form-control {
    min-height: 120px;
    font-size: 1rem;
    line-height: 1.5;
}

/* ノート：アラートON/OFFスイッチ */
.note-alert-switch-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.note-alert-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}
.note-alert-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.note-alert-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 26px;
    transition: 0.3s;
}
.note-alert-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.note-alert-switch input:checked + .note-alert-slider {
    background-color: var(--primary-color, #00a99d);
}
.note-alert-switch input:checked + .note-alert-slider:before {
    transform: translateX(22px);
}
.note-alert-switch-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

/* タブ（接続型 .inquiry-tabs--connected 以外のレガシー用） */
.inquiry-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.inquiry-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--subtext-color);
    transition: all 0.3s;
    position: relative;
    box-sizing: border-box;
    vertical-align: bottom;
}

.inquiry-tab .inquiry-tab-text {
    display: inline-block;
    line-height: 1.35;
    font-size: 1rem;
}

.inquiry-tab:hover {
    color: var(--primary-color);
}

/* レガシー用。接続型（.inquiry-tabs--connected）では下線色を上書きしない */
.inquiry-tabs:not(.inquiry-tabs--connected) .inquiry-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* 相談・依頼モーダル：2タブ固定・接続型フォルダタブ（tenpo-tabs 準拠） */
.inquiry-tab-shell {
    margin-bottom: 0;
    overflow: visible;
}

.inquiry-tabs--connected {
    display: flex;
    gap: 0;
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 2px solid var(--border-color, #dee2e6);
    background: transparent;
    overflow: visible;
    position: relative;
}

.inquiry-tabs--connected .inquiry-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    gap: 0.45rem;
    margin-right: 0;
    border: 1px solid var(--border-color, #dee2e6);
    border-bottom: none;
    border-radius: var(--border-radius-strong, 8px) var(--border-radius-strong, 8px) 0 0;
    background: #f0f3f6;
    font-size: 0.88rem;
    color: var(--subtext-color, #6c757d);
    position: relative;
    bottom: -2px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.inquiry-tabs--connected .inquiry-tab + .inquiry-tab {
    margin-left: -1px;
}

.inquiry-tabs--connected .inquiry-tab:last-child {
    margin-right: 0;
}

.inquiry-tabs--connected .inquiry-tab .inquiry-tab-text {
    font-size: 0.88rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inquiry-tabs--connected .inquiry-tab:hover {
    background: rgba(0, 169, 157, 0.06);
    border-color: rgba(0, 169, 157, 0.35);
    color: var(--primary-color, #00a99d);
}

.inquiry-tabs--connected .inquiry-tab.active {
    background: #fff;
    border-color: var(--primary-color, #00a99d);
    border-bottom: 1px solid #fff;
    bottom: -2px;
    color: var(--primary-color, #00a99d);
    font-weight: 700;
    z-index: 2;
    box-shadow: none;
}

.inquiry-tabs--connected .inquiry-tab.active::after {
    content: none;
}

.inquiry-tab-icon {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: inherit;
    opacity: 0.85;
}

.inquiry-tabs--connected .inquiry-tab.active .inquiry-tab-icon {
    opacity: 1;
}

.inquiry-tab-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    margin-left: 0.35rem;
    padding: 0 0.3rem;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px;
    background: var(--danger-color, #dc3545);
    color: #fff;
}

.inquiry-tab-panels {
    border: 1px solid var(--border-color, #dee2e6);
    border-top: none;
    border-radius: 0 0 var(--border-radius-strong, 8px) var(--border-radius-strong, 8px);
    background: #fff;
}

.inquiry-tab-panels .inquiry-tab-content {
    min-height: 300px;
    padding: 1rem 1.05rem 0.35rem;
    margin-bottom: 0;
}

@media (max-width: 520px) {
    .inquiry-tabs--connected .inquiry-tab {
        padding: 0.55rem 0.5rem;
        min-height: 2.65rem;
    }

    .inquiry-tabs--connected .inquiry-tab .inquiry-tab-text {
        white-space: normal;
        text-align: center;
        font-size: 0.76rem;
    }

    .inquiry-tab-panels .inquiry-tab-content {
        padding: 0.85rem 0.75rem 0.25rem;
    }

    .inquiry-kind-segment__option {
        min-width: calc(50% - 0.25rem);
    }
}

.inquiry-required {
    color: var(--danger-color, #dc3545);
}

/* フォーム */
.inquiry-tab-content .form-group {
    margin-bottom: 1.5rem;
}

.inquiry-tab-content label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: left;
}

/* 種別ラジオ：.form-group label の display:block より詳細度を上げ、折り返し崩れを防ぐ */
.inquiry-tab-content .form-group .inquiry-kind-radios {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.inquiry-tab-content .form-group .inquiry-kind-radios label {
    display: inline-flex !important;
    flex-direction: row;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0 !important;
    font-weight: normal;
    cursor: pointer;
    white-space: nowrap;
    width: auto;
    max-width: none;
    min-width: max-content;
    line-height: 1.4;
}

.inquiry-tab-content .form-group .inquiry-kind-radios input[type="radio"] {
    width: auto;
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
}

.inquiry-tab-content .form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    font-size: 1rem;
    font-family: var(--base-font-family);
}

.inquiry-tab-content textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* メッセージ一覧 */
.inquiry-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inquiry-message-item {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    background: white;
}

.inquiry-message-item.unread {
    background: var(--info-bg-subtle);
    border-color: var(--info-color);
}

.inquiry-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.inquiry-message-header strong {
    color: var(--text-color);
    font-size: 1rem;
}

.inquiry-message-date {
    color: var(--subtext-color);
    font-size: 0.875rem;
}

.inquiry-message-body {
    color: var(--text-color);
    line-height: 1.6;
    white-space: pre-wrap;
    margin-bottom: 0.75rem;
}

.inquiry-message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.inquiry-modal-wide {
    max-width: 720px;
    width: 92%;
}

.inquiry-kind-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: var(--border-radius-normal, 4px);
    background: var(--bs-gray-200, #e9ecef);
    color: var(--text-color, #333);
    flex-shrink: 0;
}

.inquiry-reply-banner {
    margin-bottom: 1rem;
}

/* 相談・依頼モーダル：送信 compose カード（種別〜行追加） */
.inquiry-send-compose-card {
    min-width: 0;
    margin-bottom: 1.5rem;
    padding: 1rem 1.05rem;
    background: #f8fafb;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--border-radius-strong, 8px);
}

.inquiry-send-compose-card__section {
    min-width: 0;
}

.inquiry-send-compose-card__section + .inquiry-send-compose-card__section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.inquiry-send-compose-card__label {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-color, #212529);
}

.inquiry-send-compose-card__foot {
    margin: 0 0 0.75rem 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--subtext-color, #6c757d);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.inquiry-kind-segment {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.inquiry-kind-segment__option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 7.5rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-normal, 6px);
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color, #212529);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.inquiry-kind-segment__option:hover {
    border-color: rgba(0, 169, 157, 0.35);
    color: var(--primary-color, #00a99d);
}

.inquiry-kind-segment__option.active {
    border-color: var(--primary-color, #00a99d);
    background: rgba(0, 169, 157, 0.1);
    color: var(--primary-color, #00a99d);
    box-shadow: 0 1px 3px rgba(0, 169, 157, 0.12);
}

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

.inquiry-kind-segment__text {
    line-height: 1.35;
}

.inquiry-item-set-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.inquiry-item-set-row {
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-normal, 6px);
    padding: 0.75rem 0.8rem;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.inquiry-item-set-row__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.inquiry-item-set-row__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(0, 169, 157, 0.12);
    color: var(--primary-color, #00a99d);
}

.inquiry-item-set-row__remove {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
}

.inquiry-item-set-row__field-label {
    display: block;
    margin: 0 0 0.3rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--subtext-color, #6c757d);
}

.inquiry-item-set-row__input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.55rem;
}

.inquiry-item-set-row__input:last-child {
    margin-bottom: 0;
}

.inquiry-item-set-row__textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.inquiry-send-compose-card textarea.form-control.inquiry-item-set-row__textarea {
    min-height: 4.5rem;
}

.inquiry-send-add-row-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.55rem 0.85rem;
    border: 1px dashed rgba(0, 169, 157, 0.45);
    border-radius: var(--border-radius-normal, 6px);
    background: #fff;
    color: var(--primary-color, #00a99d);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.inquiry-send-add-row-btn:hover {
    background: rgba(0, 169, 157, 0.06);
    border-color: var(--primary-color, #00a99d);
}

.inquiry-item-set-row .form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* 相談・依頼モーダル：送信 → 下書き（送信ボタン下） */
.inquiry-send-primary {
    margin-top: 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #dee2e6);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.inquiry-send-submit-btn {
    min-width: 7.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.inquiry-send-draft-panel {
    margin-top: 1.25rem;
}

.inquiry-send-draft-panel-inner {
    padding: 1rem 1.125rem 1.125rem;
    background: linear-gradient(165deg, #fafbfc 0%, #f0f3f6 100%);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-strong, 8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 6px rgba(0, 0, 0, 0.04);
    min-width: 0;
}

.inquiry-send-draft-intro {
    margin-bottom: 0.75rem;
    min-width: 0;
}

.inquiry-send-draft-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.35rem 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.inquiry-send-draft-desc {
    font-size: 0.78rem;
    color: var(--bs-secondary, #6c757d);
    margin: 0;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.inquiry-send-draft-save-btn {
    font-weight: 500;
}

.inquiry-send-draft-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.inquiry-send-draft-tool-btn {
    font-size: 0.8rem;
    white-space: normal;
    word-break: break-word;
}

.inquiry-send-draft-loading {
    font-size: 0.85rem;
    color: var(--bs-secondary, #6c757d);
    padding: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.65);
    border-radius: var(--border-radius-normal, 6px);
    border: 1px solid var(--border-color, #e9ecef);
}

.inquiry-send-draft-empty {
    font-size: 0.85rem;
    color: var(--bs-secondary, #6c757d);
    padding: 1.1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.55);
    border-radius: var(--border-radius-normal, 6px);
    border: 1px dashed var(--border-color, #ced4da);
}

.inquiry-send-draft-cards {
    margin: 0;
    padding: 0;
    list-style: none;
}

.inquiry-send-draft-card {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: var(--border-radius-normal, 6px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inquiry-send-draft-card:last-child {
    margin-bottom: 0;
}

.inquiry-send-draft-card:hover {
    border-color: rgba(0, 169, 157, 0.45);
    box-shadow: 0 2px 10px rgba(0, 169, 157, 0.1);
}

.inquiry-send-draft-card-check {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 0.15rem;
}

.inquiry-send-draft-card-body {
    flex: 1;
    min-width: 0;
}

.inquiry-send-draft-card-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color);
    margin-bottom: 0.2rem;
    line-height: 1.35;
}

.inquiry-send-draft-card-meta {
    font-size: 0.72rem;
    color: var(--bs-secondary, #6c757d);
    margin-bottom: 0.35rem;
}

.inquiry-send-draft-card-preview {
    font-size: 0.78rem;
    color: #495057;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.inquiry-send-draft-card-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.inquiry-send-draft-load-btn {
    font-weight: 600;
    white-space: normal;
    word-break: keep-all;
}

.inquiry-todo-tab {
    min-height: 280px;
}

.inquiry-todo-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.inquiry-todo-cat-tab {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-normal, 4px);
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1.35;
    max-width: 100%;
    text-align: center;
    flex: 1 1 auto;
    min-width: 0;
}

.inquiry-todo-cat-tab.active {
    border-color: var(--primary-color, #00a99d);
    color: var(--primary-color, #00a99d);
    font-weight: 600;
}

/* TO DO 内ステータス別タブ（店舗分析 .tenpo-tabs に準拠・モーダル向けにコンパクト化） */
.inquiry-todo-status-wrap {
    margin-top: 0.25rem;
}

.inquiry-todo-status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 0.65rem 0;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--border-color, #dee2e6);
    max-height: 104px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color, #dee2e6) transparent;
}

.inquiry-todo-status-tabs::-webkit-scrollbar {
    width: 6px;
}

.inquiry-todo-status-tabs::-webkit-scrollbar-thumb {
    background-color: var(--border-color, #cfd4da);
    border-radius: 4px;
}

.inquiry-todo-status-tab {
    padding: 0.38rem 0.72rem;
    margin-right: 0.2rem;
    margin-bottom: 2px;
    background: var(--white-color, #fff);
    border: 1px solid var(--border-color, #dee2e6);
    border-bottom: none;
    border-radius: 0.45rem 0.45rem 0 0;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--subtext-color, #6c757d);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    bottom: -2px;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04);
}

.inquiry-todo-status-tab:hover {
    color: var(--primary-color, #00a99d);
    background-color: rgba(0, 169, 157, 0.07);
    border-color: rgba(0, 169, 157, 0.45);
}

.inquiry-todo-status-tab.active {
    color: var(--primary-color, #00a99d);
    font-weight: 700;
    background-color: var(--white-color, #fff);
    border-color: var(--primary-color, #00a99d);
    border-bottom-color: var(--white-color, #fff);
    z-index: 1;
    box-shadow: 0 -2px 6px rgba(0, 169, 157, 0.12);
}

.inquiry-todo-status-tab-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    max-width: 100%;
}

.inquiry-todo-status-tab-label {
    text-align: left;
}

.inquiry-todo-status-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.32rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px;
    background: var(--danger-color, #dc3545);
    color: #fff;
    flex-shrink: 0;
}

.inquiry-todo-status-tab.active .inquiry-todo-status-tab-count {
    background: var(--primary-color, #00a99d);
    color: #fff;
}

.inquiry-todo-status-panel {
    padding-top: 0.1rem;
}

.inquiry-todo-bucket {
    margin-bottom: 1.35rem;
    padding-bottom: 0.15rem;
}

/* 連続する角丸カード（リスト行）との差別化：見出しはフラット＋左ライン＋下線のみ */
.inquiry-todo-bucket + .inquiry-todo-bucket {
    margin-top: 1.1rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.inquiry-todo-bucket-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.01em;
    margin: 0 0 0.45rem 0;
    padding: 0.15rem 0 0.42rem 0.55rem;
    color: var(--text-color, #212529);
    background: transparent;
    border: none;
    border-radius: 0;
    border-left: 3px solid rgba(0, 169, 157, 0.42);
    border-bottom: 1px solid var(--border-color, #e2e6ea);
}

.inquiry-todo-bucket > .text-muted.small {
    margin: 0 0 0.5rem 0;
    padding: 0;
    font-size: 0.8rem;
}

.inquiry-todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.inquiry-todo-li {
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: var(--border-radius-normal, 4px);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
    background: #fff;
}

.inquiry-todo-li--compact {
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.4rem;
    background: #fff;
    border-color: #cfd4da;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.inquiry-todo-li--compact:hover {
    background: #f3f5f7;
    border-color: var(--primary-color, #00a99d);
}

.inquiry-todo-li--compact.inquiry-message-item.unread:hover {
    background: #fff;
    border-color: var(--primary-color, #00a99d);
}

.inquiry-todo-li-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.inquiry-todo-li-titlewrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.inquiry-todo-li-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color, #212529);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inquiry-todo-li-date {
    flex-shrink: 0;
    font-size: 0.75rem;
    white-space: nowrap;
}

.inquiry-todo-li-toolbar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-end;
}

.inquiry-todo-detail-btn {
    white-space: nowrap;
}

.inquiry-todo-li-detail {
    margin-top: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 4px;
    background: #fff;
    border: 1px dashed #ced4da;
}

.inquiry-todo-li-detail-body {
    font-size: 0.85rem;
    line-height: 1.45;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

.inquiry-todo-li-detail-meta {
    margin-top: 0.35rem;
}

.inquiry-todo-li-detail-label {
    margin-bottom: 0.2rem;
}

.inquiry-todo-li-head {
    margin-bottom: 0.35rem;
}

.inquiry-todo-li-actions {
    margin-top: 0.5rem;
}

.inquiry-todo-panel {
    margin-top: 1rem;
    border: 1px solid var(--border-color, #dee2e6);
}

/* --- 相談・依頼 TO DO タブ（サイドバー型レイアウト） --- */
.inquiry-todo-layout--sidebar {
    min-height: 320px;
}

.inquiry-todo-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.85rem;
    min-height: 280px;
}

.inquiry-todo-sidebar {
    flex: 0 0 11rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem;
    background: #f8fafb;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--border-radius-strong, 8px);
}

.inquiry-todo-sidebar-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    padding: 0.5rem 0.55rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius-normal, 6px);
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: var(--text-color, #212529);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.inquiry-todo-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 169, 157, 0.25);
}

.inquiry-todo-sidebar-item.active {
    background: #fff;
    border-color: var(--border-color, #dee2e6);
    border-left: 3px solid var(--primary-color, #00a99d);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding-left: calc(0.55rem - 2px);
}

.inquiry-todo-sidebar-item-body {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
}

.inquiry-todo-sidebar-item-icon {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(0, 169, 157, 0.1);
    font-size: 0.75rem;
    color: var(--primary-color, #00a99d);
    line-height: 1;
}

.inquiry-todo-sidebar-item.active .inquiry-todo-sidebar-item-icon {
    background: rgba(0, 169, 157, 0.18);
}

.inquiry-todo-sidebar-item-label {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.inquiry-todo-sidebar-badge {
    position: static;
    flex-shrink: 0;
    margin-left: 0.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.28rem;
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: 999px;
    background: var(--danger-color, #dc3545);
    color: #fff;
}

.inquiry-todo-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.inquiry-todo-main-intro {
    margin: 0 0 0.65rem 0;
    font-size: 0.78rem;
    color: var(--subtext-color, #6c757d);
    line-height: 1.45;
}

.inquiry-todo-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    font-size: 0.88rem;
    color: var(--subtext-color, #6c757d);
}

.inquiry-todo-loading--inline {
    padding: 1.5rem 0.5rem;
}

.inquiry-todo-chips-wrap {
    margin-bottom: 0.75rem;
    min-width: 0;
}

.inquiry-todo-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color, #dee2e6) transparent;
}

.inquiry-todo-chips::-webkit-scrollbar {
    height: 5px;
}

.inquiry-todo-chips::-webkit-scrollbar-thumb {
    background-color: var(--border-color, #cfd4da);
    border-radius: 4px;
}

.inquiry-todo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.38rem 0.72rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 999px;
    background: #f1f3f5;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--subtext-color, #6c757d);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.inquiry-todo-chip:hover {
    background: rgba(0, 169, 157, 0.08);
    border-color: rgba(0, 169, 157, 0.4);
    color: var(--primary-color, #00a99d);
}

.inquiry-todo-chip.active {
    background: #fff;
    border-color: var(--primary-color, #00a99d);
    color: var(--primary-color, #00a99d);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 169, 157, 0.12);
}

.inquiry-todo-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.28rem;
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: 999px;
    background: #adb5bd;
    color: #fff;
}

.inquiry-todo-chip-count--attention {
    background: var(--danger-color, #dc3545);
}

.inquiry-todo-chip.active .inquiry-todo-chip-count:not(.inquiry-todo-chip-count--attention) {
    background: var(--primary-color, #00a99d);
}

.inquiry-todo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--subtext-color, #6c757d);
    font-size: 0.82rem;
    border: 1px dashed var(--border-color, #ced4da);
    border-radius: var(--border-radius-normal, 6px);
    background: rgba(255, 255, 255, 0.6);
}

.inquiry-todo-empty i {
    font-size: 1.35rem;
    color: rgba(0, 169, 157, 0.45);
}

.inquiry-todo-empty p {
    margin: 0;
}

.inquiry-todo-card {
    list-style: none;
    min-width: 0;
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: var(--border-radius-normal, 6px);
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.5rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inquiry-todo-card:hover {
    border-color: rgba(0, 169, 157, 0.4);
    box-shadow: 0 2px 8px rgba(0, 169, 157, 0.08);
}

.inquiry-todo-card.unread,
.inquiry-todo-card.inquiry-message-item.unread {
    border-left: 3px solid var(--primary-color, #00a99d);
    background: #f0faf9;
    padding-left: calc(0.85rem - 2px);
}

.inquiry-todo-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
}

.inquiry-todo-card__partner {
    font-weight: 500;
    color: var(--text-color, #212529);
}

.inquiry-todo-card__date {
    margin-left: auto;
    color: var(--subtext-color, #6c757d);
    white-space: nowrap;
    font-size: 0.72rem;
}

.inquiry-todo-card__title {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--text-color, #212529);
    margin-bottom: 0.55rem;
    word-break: break-word;
}

.inquiry-todo-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.inquiry-todo-card__actions-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.inquiry-todo-card-detail-link {
    margin-left: auto;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--primary-color, #00a99d);
    text-decoration: none;
    white-space: nowrap;
}

.inquiry-todo-card-detail-link:hover {
    text-decoration: underline;
}

.inquiry-todo-card__detail {
    min-width: 0;
    margin-top: 0.55rem;
    padding: 0.6rem 0.7rem;
    border-radius: var(--border-radius-normal, 6px);
    background: #fff;
    border: 1px dashed var(--border-color, #ced4da);
    overflow-wrap: break-word;
}

.inquiry-todo-card__detail-hint {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.inquiry-todo-card__detail-body {
    font-size: 0.84rem;
    line-height: 1.45;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
}

.inquiry-todo-card__detail-meta {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--subtext-color, #6c757d);
}

.inquiry-todo-card__detail-actions {
    margin-top: 0.75rem;
}

.inquiry-todo-card__reconsider-form {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.inquiry-todo-action-panel {
    margin-top: 0.65rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(0, 169, 157, 0.35);
    border-radius: var(--border-radius-normal, 6px);
    background: linear-gradient(165deg, #f8fffe 0%, #f0faf9 100%);
}

.inquiry-todo-action-panel-label {
    margin: 0 0 0.35rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--subtext-color, #6c757d);
}

.inquiry-todo-action-panel-preview {
    margin-bottom: 0.65rem;
    font-size: 0.82rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-color, #212529);
}

.inquiry-todo-action-panel-field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.inquiry-todo-action-panel-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

@media (max-width: 520px) {
    .inquiry-todo-layout {
        flex-direction: column;
    }

    .inquiry-todo-sidebar {
        flex: 0 0 auto;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.45rem;
    }

    .inquiry-todo-sidebar-item {
        flex: 0 0 auto;
        min-width: 8.5rem;
        align-items: center;
    }

    .inquiry-todo-sidebar-item.active {
        padding-left: calc(0.55rem - 2px);
    }
}

/* --- ノートカレンダー --- */
.note-calendar-page { padding: 0; }
.note-calendar-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
    row-gap: 1rem;
    align-items: start;
    margin-bottom: 1.5rem;
    width: 100%;
}
.note-calendar-header > div:first-child {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}
.note-calendar-header h1 { margin: 0; font-size: 1.75rem; font-weight: 700; color: var(--primary-color); }
.note-calendar-header .page-description {
    margin-top: 0.35rem;
    margin-bottom: 0;
    max-width: min(42rem, 100%);
    line-height: 1.55;
    overflow-wrap: break-word;
}
.note-calendar-header-right {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.note-calendar-header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.note-calendar-header-buttons > * { flex-shrink: 0; }
.note-calendar-header-buttons .btn,
.note-calendar-header-buttons button { white-space: nowrap; }
.note-calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.note-calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.note-calendar-title { font-weight: 600; min-width: 12rem; text-align: center; }
.note-calendar-mode { display: flex; gap: 0.25rem; }
.note-calendar-grid-wrap { min-height: 200px; }
.note-calendar-grid { border: 1px solid var(--border-color); border-radius: var(--border-radius-normal); overflow: hidden; }
.note-calendar-cell {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    min-height: 3.5rem;
}
.note-calendar-cell:nth-child(7n) { border-right: none; }
.note-calendar-header-cell {
    background: var(--default-bg-subtle);
    font-weight: 600;
    font-size: 0.875rem;
}
.note-calendar-day-cell { background: var(--white-color); cursor: pointer; }
.note-calendar-other-month { background: #fafafa; color: var(--subtext-color); }
.note-calendar-today { background: var(--info-bg-subtle); }
.note-calendar-day-num { font-weight: 600; margin-right: 0.25rem; }
.note-calendar-bands { display: flex; flex-direction: column; gap: 0.25rem; }
.note-calendar-band {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    background: var(--note-color-teal);
    color: var(--white-color);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.note-calendar-band:hover { opacity: 0.9; }

/* --- ノート検索 --- */
.note-search-card { margin-top: 1.5rem; }
.note-search-card-header {
    background: var(--default-bg-subtle);
    border-bottom: 1px solid var(--border-color);
}
.note-search-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.note-search-form {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.8rem 0.9rem;
    align-items: end;
    width: 100%;
}
.note-search-form .filter-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
}
.note-search-form input[type="text"],
.note-search-form input[type="date"],
.note-search-form select,
.note-search-form textarea {
    width: 100%;
    box-sizing: border-box;
}
.note-search-form .filter-group label {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.25;
    text-align: left;
}
.note-search-form-content { grid-column: 1 / span 5; min-width: 0; }
.note-search-form-content textarea {
    min-height: 44px;
    max-height: 44px;
    line-height: 1.4;
    resize: none;
}
.note-search-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0;
    grid-column: 6 / span 2;
    justify-content: flex-end;
}
.note-search-item-title { grid-column: 1 / span 2; min-width: 0; }
.note-search-item-date-from { grid-column: 3 / span 1; min-width: 0; }
.note-search-item-date-to { grid-column: 4 / span 1; min-width: 0; }
.note-search-item-public { grid-column: 5 / span 1; min-width: 0; }
.note-search-item-color { grid-column: 6 / span 2; min-width: 0; }
.note-search-item-actions {
    min-width: 0;
}
.note-search-item-actions .btn {
    min-height: 44px;
    white-space: nowrap;
}
.note-search-results {
    margin-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}
.note-search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}
.note-search-count {
    font-size: 0.9rem;
    color: var(--subtext-color);
    font-weight: 500;
}
.note-search-table td {
    vertical-align: middle;
}
.note-search-color-dot {
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    margin-right: 0.4rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    vertical-align: -0.1rem;
}
.note-search-color-dot.is-large {
    width: 1.15rem;
    height: 1.15rem;
    margin-right: 0;
    vertical-align: middle;
}
.note-search-color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 44px;
    align-items: center;
}
.note-search-color-chip {
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--white-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.note-search-color-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.note-search-color-chip.is-selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}
.note-search-color-chip-all {
    width: auto;
    min-width: 3.9rem;
    border-radius: 999px;
    padding: 0 0.6rem;
    color: var(--subtext-color);
    font-size: 0.8rem;
    font-weight: 600;
}
.note-search-pagination {
    margin-top: 0.85rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.6rem;
}
.note-search-pagination-status {
    min-width: 7.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--subtext-color);
}
@media (max-width: 768px) {
    .note-search-form {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        align-items: start;
    }
    .note-search-item-title,
    .note-search-item-date,
    .note-search-item-public,
    .note-search-item-color,
    .note-search-form-content,
    .note-search-item-actions {
        grid-column: 1 / -1;
        min-width: 0;
    }
    .note-search-form-content textarea {
        min-height: 90px;
        max-height: none;
        resize: vertical;
    }
    .note-search-actions {
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
    }
    .note-search-color-chip {
        width: 2rem;
        height: 2rem;
    }
    .note-search-pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
}
@media (max-width: 1200px) and (min-width: 769px) {
    .note-search-form {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
    .note-search-item-title { grid-column: 1 / span 2; }
    .note-search-item-date-from { grid-column: 3 / span 2; }
    .note-search-item-date-to { grid-column: 5 / span 2; }
    .note-search-item-public { grid-column: 7 / span 1; }
    .note-search-item-color { grid-column: 8 / span 1; }
    .note-search-form-content { grid-column: 1 / span 6; }
    .note-search-actions { grid-column: 6 / span 3; justify-content: flex-end; }
}

/* --- ノート詳細カード（表示・編集）--- */
.note-detail-card { margin-top: 1.5rem; }
.note-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(0, 169, 157, 0.1) 0%, rgba(0, 112, 192, 0.06) 100%);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--border-radius-strong) var(--border-radius-strong) 0 0;
}
.note-detail-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.note-detail-title i { color: var(--primary-color); }
.note-detail-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.note-detail-btn-edit {
    background: var(--white-color);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius-normal);
    padding: 0.4rem 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.note-detail-btn-edit:hover { background: var(--primary-color); color: var(--white-color); }
.note-detail-btn-delete {
    background: var(--white-color);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    border-radius: var(--border-radius-normal);
    padding: 0.4rem 0.85rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.note-detail-btn-delete:hover { background: var(--danger-bg-subtle); color: var(--danger-color); }
.note-detail-body { padding: 1.5rem; }

/* 表示モード：行スタイル（ダッシュボード summary に合わせる） */
.note-detail-view { display: flex; flex-direction: column; gap: 0; }
.note-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    gap: 1rem;
}
.note-detail-row:last-of-type { border-bottom: none; }
.note-detail-row-label { color: var(--subtext-color); font-weight: 500; flex-shrink: 0; min-width: 5rem; }
.note-detail-row-value { font-weight: 600; color: var(--text-color); text-align: right; word-break: break-word; }
.note-detail-title-value { font-size: 1.05rem; }
.note-detail-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.note-detail-badge-on { background: var(--success-bg-subtle); color: var(--success-color); }
.note-detail-badge-off { background: var(--default-bg-subtle); color: var(--subtext-color); }
.note-detail-badge-public { background: var(--info-bg-subtle); color: var(--info-color); }
.note-detail-badge-private { background: var(--default-bg-subtle); color: var(--subtext-color); }

/* 表示モード：内容ブロック */
.note-detail-content-block {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(0, 169, 157, 0.04);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius-normal) var(--border-radius-normal) 0;
}
.note-detail-content-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--subtext-color);
    margin-bottom: 0.5rem;
}
.note-detail-content-text {
    white-space: pre-wrap;
    line-height: 1.65;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* 昨年同日パネル */
.note-detail-lastyear-trigger { margin-top: 1.25rem; }
.note-detail-lastyear-btn { font-weight: 500; }
.note-detail-lastyear-panel {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--default-bg-subtle);
    border-radius: var(--border-radius-normal);
    border: 1px solid var(--border-color);
}
.note-detail-lastyear-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.note-detail-lastyear-title { font-weight: 600; font-size: 0.95rem; color: var(--text-color); }
.note-detail-lastyear-title i { color: var(--secondary-color); margin-right: 0.35rem; }
.note-detail-lastyear-close {
    background: transparent;
    border: none;
    color: var(--subtext-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-normal);
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.note-detail-lastyear-close:hover { color: var(--text-color); background: rgba(0,0,0,0.06); }
.note-detail-lastyear-empty { color: var(--subtext-color); font-size: 0.9rem; }
.note-detail-lastyear-body { font-size: 0.9rem; }
.note-detail-lastyear-subtitle { font-weight: 600; margin-bottom: 0.35rem; color: var(--text-color); }
.note-detail-lastyear-content { white-space: pre-wrap; line-height: 1.55; color: var(--text-color); }

/* 編集モード */
.note-detail-edit { display: flex; flex-direction: column; gap: 1.25rem; }
.note-detail-edit-field { display: flex; flex-direction: column; gap: 0.35rem; }
.note-detail-edit-field-full { width: 100%; }
.note-detail-edit-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}
.note-detail-edit-input,
.note-detail-edit-textarea {
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.note-detail-edit-input:focus,
.note-detail-edit-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.15);
}
.note-detail-edit-textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.note-detail-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.note-detail-edit-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}
.note-detail-save-btn { font-weight: 600; min-width: 7rem; }
.note-detail-save-btn i { margin-right: 0.35rem; }

.note-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.note-color-swatch {
    width: 2rem;
    height: 2rem;
    border: 2px solid transparent;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.note-color-swatch:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.note-color-swatch.is-selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18);
}

/* 未選択時のメッセージ */
.note-detail-card-empty { padding: 1.5rem; }
.note-detail-empty-message {
    text-align: center;
    color: var(--subtext-color);
    font-size: 0.95rem;
    padding: 1rem;
}
.note-detail-empty-message i { margin-right: 0.5rem; color: var(--primary-color); }

/* --- システム確認ダイアログ（削除確認など）を画面中央のモーダル表示 --- */
/* ノート・相談モーダル(10003)より前面、システム通知(10005)より背面 */
.sysconfirm-open {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10004;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}
.sysconfirm-open .sysconfirm {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}
.sysconfirm-open .sysconfirm__inner {
    position: relative;
    width: 100%;
    max-width: 28rem;
}
.sysconfirm-open .sysconfirm__content {
    background: var(--white-color);
    border-radius: var(--border-radius-strong);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 1.5rem 2rem;
    text-align: center;
}
.sysconfirm-open .sysconfirm__content .modal-body { padding: 0; }
.sysconfirm-open .sysconfirm__content p { margin: 0 0 1.5rem 0; font-size: 1rem; }
.sysconfirm-open .sysconfirm__button {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.sysconfirm-open .sysconfirm__button button {
    min-width: 6rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-normal);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}
.sysconfirm-open .sysconfirm__button button:first-of-type {
    background: var(--primary-color);
    color: var(--white-color);
}
.sysconfirm-open .sysconfirm__button button.button__outline {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

/* --- システム通知（成功・エラー）画面中央オーバーレイ --- */
.sys-notice-portal {
    pointer-events: none;
}

.sys-notice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10005;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: auto;
}

.sys-notice {
    position: relative;
    width: 100%;
    max-width: 28rem;
    background: var(--white-color);
    border-radius: var(--border-radius-strong);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 1.75rem 2rem 1.5rem;
    text-align: center;
}

.sys-notice--success {
    border-top: 4px solid var(--primary-color);
}

.sys-notice--error {
    border-top: 4px solid var(--danger-color);
}

.sys-notice__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--subtext-color);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--border-radius-normal);
}

.sys-notice__close:hover {
    color: var(--text-color);
    background: var(--background-color);
}

.sys-notice__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.sys-notice--success .sys-notice__icon {
    color: var(--primary-color);
}

.sys-notice--error .sys-notice__icon {
    color: var(--danger-color);
}

.sys-notice__title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.sys-notice__list {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.sys-notice__list li {
    margin: 0.35rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.sys-notice--success .sys-notice__list {
    text-align: center;
}

.sys-notice--success .sys-notice__list li:only-child {
    font-size: 1rem;
    font-weight: 500;
}

.sys-notice-enter-active,
.sys-notice-leave-active {
    transition: opacity 0.2s ease-in-out;
}

.sys-notice-enter-active .sys-notice,
.sys-notice-leave-active .sys-notice {
    transition: transform 0.2s ease-in-out;
}

.sys-notice-enter-from,
.sys-notice-leave-to {
    opacity: 0;
}

.sys-notice-enter-from .sys-notice,
.sys-notice-leave-to .sys-notice {
    transform: scale(0.95);
}

/* --- AIコンシェルジュ（右下フローティング） --- */
.ai-concierge-root {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 10020;
    font-size: 0.95rem;
    pointer-events: none;
}
.ai-concierge-root > * {
    pointer-events: auto;
}
.ai-concierge-fab {
    position: absolute;
    right: 0;
    bottom: 0;
    min-height: 3.25rem;
    padding: 0.5rem 0.95rem;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    background: var(--primary-color);
    color: var(--white-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.ai-concierge-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(0, 0, 0, 0.08);
    filter: brightness(1.05);
}
.ai-concierge-fab__icon {
    font-size: 1.15rem;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}
.ai-concierge-fab__label {
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    line-height: 1;
}
.ai-concierge-panel {
    position: absolute;
    right: 0;
    bottom: 4.35rem;
    width: min(26rem, calc(100vw - 2.5rem));
    max-height: min(36rem, calc(100vh - 6rem));
    background: var(--white-color);
    border-radius: var(--border-radius-strong);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(110%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.28s ease, opacity 0.22s ease, visibility 0.28s;
}
.ai-concierge-panel.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.ai-concierge-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light-color, #f8f9fa);
    flex-shrink: 0;
}
.ai-concierge-panel__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.ai-concierge-panel__close {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    color: var(--subtext-color);
    font-size: 1.1rem;
    line-height: 1;
}
.ai-concierge-panel__close:hover {
    color: var(--text-color);
}
.ai-concierge-panel__meta {
    flex-shrink: 0;
    padding: 0.65rem 1rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--white-color);
}
.ai-concierge-panel__response {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.75rem 1rem;
}
.ai-concierge-panel__footer {
    flex-shrink: 0;
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light-color, #f8f9fa);
}
.ai-concierge-panel__question {
    margin: 0 0 0.75rem 0;
    padding: 0.55rem 0.7rem;
    background: #f3f4f6;
    border-radius: var(--border-radius-normal);
    border: 1px solid var(--border-color);
}
.ai-concierge-panel__question-label {
    margin: 0 0 0.35rem 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--subtext-color);
}
.ai-concierge-panel__question-label i {
    margin-right: 0.25rem;
}
.ai-concierge-panel__question-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.ai-concierge-panel__hint {
    margin: 0 0 0.5rem 0;
    color: var(--subtext-color);
    font-size: 0.88rem;
    line-height: 1.45;
}
.ai-concierge-panel__quota {
    font-size: 0.8rem;
    color: var(--subtext-color);
    margin-bottom: 0;
}
.ai-concierge-panel__errors {
    margin: 0 0 0.75rem 0;
    padding: 0.5rem 0.65rem;
    background: #fdecea;
    border-radius: var(--border-radius-normal);
    color: #b71c1c;
    font-size: 0.88rem;
}
.ai-concierge-panel__errors p {
    margin: 0.15rem 0;
}
.ai-concierge-panel__loading {
    margin: 0.5rem 0 1rem 0;
    color: var(--subtext-color);
}
.ai-concierge-panel__subhead {
    margin: 0 0 0.35rem 0;
    font-weight: 600;
    font-size: 0.9rem;
}
.ai-concierge-panel__list {
    margin: 0 0 0.75rem 0;
    padding-left: 1.1rem;
}
.ai-concierge-panel__list li {
    margin-bottom: 0.65rem;
}
.ai-concierge-panel__link {
    display: inline-block;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.ai-concierge-panel__link--disabled {
    color: var(--subtext-color);
    cursor: default;
}
.ai-concierge-panel__reason {
    display: block;
    font-size: 0.85rem;
    color: var(--subtext-color);
    line-height: 1.4;
}
.ai-concierge-panel__advice {
    margin: 0.5rem 0 0 0;
    padding: 0.55rem 0.7rem;
    background: #f0f7ff;
    border-radius: var(--border-radius-normal);
    font-size: 0.88rem;
    line-height: 1.45;
    border: 1px solid rgba(0, 100, 200, 0.12);
}
.ai-concierge-panel__textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 4.5rem;
    margin-bottom: 0.5rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    background: var(--white-color);
    font-family: var(--base-font-family);
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ai-concierge-panel__textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}
.ai-concierge-panel__textarea:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.85;
}
.ai-concierge-panel__textarea::placeholder {
    color: var(--subtext-color);
    opacity: 0.85;
}
.ai-concierge-panel__actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.ai-concierge-panel__disclaimer {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    font-size: 0.62rem;
    line-height: 1.25;
    color: var(--subtext-color);
    opacity: 0.85;
    word-break: break-word;
}
.ai-concierge-panel__actions-buttons {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}
.ai-concierge-panel__mic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    padding-left: 0;
    padding-right: 0;
    line-height: 1;
}
.ai-concierge-panel__mic i {
    margin-right: 0;
    line-height: 1;
}
.ai-concierge-panel__speech-note {
    margin: 0.45rem 0 0 0;
    font-size: 0.8rem;
    color: var(--subtext-color);
}
.ai-concierge-panel__speech-note--muted {
    opacity: 0.9;
}

/* =============================================================================
   在庫高推移（inventory_value_trend）
   ============================================================================= */
.inventory-value-trend-page .page-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.inventory-value-trend-page .page-heading-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.inventory-value-trend-page .page-heading-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-color);
}
.inventory-value-trend-page .page-description {
    margin: 0.5rem 0 0 0;
    max-width: 42rem;
    line-height: 1.55;
    color: var(--subtext-color);
}
.inventory-value-trend-page .page-heading-actions {
    flex: 0 0 auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.inventory-value-trend-page .page-heading-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-shrink: 0;
}
.inventory-value-trend-page .page-heading-buttons > *,
.inventory-value-trend-page .page-heading-buttons .btn,
.inventory-value-trend-page .page-heading-buttons .inquiry-button {
    flex-shrink: 0;
    white-space: nowrap;
}

/* 検索条件カード（overflow は visible のまま：ブランドサジェストがカード外へはみ出すため hidden にしない） */
.ivt-filter-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    overflow: visible;
}
.ivt-filter-card-header {
    padding: 1.1rem 1.25rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(0, 169, 157, 0.06) 0%, transparent 100%);
}
.ivt-filter-card-title {
    margin: 0 0 0.35rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-color);
}
.ivt-filter-card-title .fas {
    color: var(--primary-color);
    opacity: 0.95;
}
.ivt-filter-card-lead {
    margin: 0;
    font-size: 0.88rem;
    color: var(--subtext-color);
    line-height: 1.45;
}
.ivt-filter-body {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    overflow: visible;
}
/* z-index: ブランドサジェストが absolute でグリッドの下方向へはみ出すため、後続の .ivt-filter-actions より前面に積む */
.ivt-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.35rem;
    position: relative;
    z-index: 5;
}
@media (min-width: 960px) {
    .ivt-filter-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem 2rem;
        align-items: start;
    }
    .ivt-filter-section--period {
        grid-column: 1;
    }
    .ivt-filter-section--scope {
        grid-column: 2;
    }
    .ivt-filter-section--brand,
    .ivt-filter-section--sku {
        grid-column: 1 / -1;
    }
}
.ivt-filter-section {
    padding: 0.85rem 1rem;
    border-radius: var(--border-radius-normal);
    background: var(--white-color);
    border: 1px solid var(--border-color);
    overflow: visible;
}
.ivt-section-head {
    margin-bottom: 0.65rem;
}
.ivt-section-label {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.ivt-section-label .fas {
    color: var(--primary-color);
    opacity: 0.9;
}
.ivt-field-hint {
    margin: 0.55rem 0 0 0;
    font-size: 0.82rem;
    color: var(--subtext-color);
    line-height: 1.45;
}
.ivt-field-hint--sku {
    margin-top: 0.35rem;
}

/* 期間（.search-form で input の既存スタイルを継承） */
.ivt-date-range.search-form {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}
.ivt-date-input {
    min-width: 11rem;
    flex: 1 1 10rem;
}
.ivt-date-sep {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--subtext-color);
    font-weight: 500;
    flex-shrink: 0;
}
.ivt-date-sep-line {
    width: 0.6rem;
    height: 1px;
    background: var(--border-color);
    display: none;
}
@media (min-width: 480px) {
    .ivt-date-sep-line {
        display: inline-block;
    }
}
.ivt-date-sep-text {
    padding: 0 0.15rem;
}

/* 集計単位セグメント */
.ivt-scope-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}
.ivt-scope-item {
    position: relative;
    flex: 1 1 auto;
    min-width: 7.5rem;
    margin: 0;
    cursor: pointer;
}
.ivt-scope-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.ivt-scope-face {
    display: block;
    text-align: center;
    padding: 0.62rem 0.85rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--subtext-color);
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.ivt-scope-item:hover .ivt-scope-face {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.7);
}
.ivt-scope-item input:checked + .ivt-scope-face {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 169, 157, 0.35);
}
.ivt-scope-item input:focus-visible + .ivt-scope-face {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.ivt-brand-wrap .ivt-brand-trigger {
    width: 100%;
    max-width: 100%;
}

.ivt-sku-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
}
.ivt-sku-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: var(--border-radius-normal);
    border: 1px solid var(--primary-color);
    background: #fff;
    color: var(--primary-color);
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease;
}
.ivt-sku-search-btn:hover {
    background: rgba(0, 169, 157, 0.08);
    color: var(--primary-color);
}
.ivt-sku-selected {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.45rem 0.75rem;
    border-radius: var(--border-radius-normal);
    background: rgba(0, 169, 157, 0.09);
    border: 1px solid rgba(0, 169, 157, 0.25);
}
.ivt-sku-selected-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--subtext-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ivt-sku-code {
    font-family: ui-monospace, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.ivt-filter-actions {
    position: relative;
    z-index: 1;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}
@media (min-width: 640px) {
    .ivt-filter-actions {
        justify-content: flex-end;
    }
}
.ivt-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: min(100%, 16rem);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-normal);
    box-shadow: 0 4px 14px rgba(0, 169, 157, 0.28);
}
.ivt-submit-btn .fas {
    font-size: 0.95rem;
}

/* グラフ指標トグル */
.ivt-chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}
.ivt-chart-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}
.ivt-metric-toggle {
    display: inline-flex;
    padding: 0.25rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    gap: 0.2rem;
}
.ivt-metric-btn {
    margin: 0;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--subtext-color);
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.ivt-metric-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.65);
}
.ivt-metric-btn--active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 169, 157, 0.3);
}

.ivt-notes-card .card-header h2 {
    font-size: 1.05rem;
}
.ivt-notes-list {
    margin: 0;
    padding-left: 1.15rem;
    line-height: 1.65;
    color: var(--subtext-color);
}
.ivt-notes-list li {
    margin-bottom: 0.45rem;
}
.ivt-notes-list li:last-child {
    margin-bottom: 0;
}

/* ヘルプ・規約ページ */
.help-page {
    max-width: 1040px;
    margin: 0 auto;
}
.help-page__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.help-page__header h1 {
    margin: 0;
}
.help-page__revision {
    margin-top: 0.45rem;
}
.help-page__header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 0;
}
.help-page__header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap;
}
.help-document {
    background: #fff;
}
.help-document__body {
    padding: 2rem 2.25rem;
    font-size: 0.98rem;
    line-height: 1.9;
}
.help-document__body h2 {
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.25rem;
    color: var(--secondary-color);
}
.help-document__body h2:first-child {
    margin-top: 0;
}
.help-document__body h3 {
    margin: 1.5rem 0 0.5rem;
    font-size: 1.05rem;
    color: var(--text-color);
}
.help-document__body p,
.help-document__body li {
    margin: 0 0 0.75rem;
}
.help-document__body ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}
.help-document__list-line,
.help-document__numbered {
    padding-left: 1em;
    text-indent: -1em;
}
.help-document__contact {
    margin: 0.5rem 0 1rem;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    background: rgba(0, 169, 157, 0.08);
    font-style: normal;
}
.help-document__end {
    margin-top: 2rem;
    text-align: right;
}
@media (max-width: 768px) {
    .help-page__header {
        flex-direction: column;
    }
    .help-page__header-actions {
        align-items: flex-start;
        width: 100%;
    }
    .help-document__body {
        padding: 1.25rem;
    }
}

/* FAQ */
.help-faq-page .help-faq__category {
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.25rem;
    color: var(--secondary-color);
}
.help-faq-page .help-faq__category:first-child {
    margin-top: 0;
}
.help-faq-page .help-faq__item {
    margin: 0 0 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fafbfc;
}
.help-faq-page .help-faq__item summary {
    padding: 0.85rem 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.help-faq-page .help-faq__item summary::-webkit-details-marker {
    display: none;
}
.help-faq-page .help-faq__item summary::before {
    content: "\25B6";
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.7rem;
    color: var(--primary-color);
    transition: transform 0.15s ease;
}
.help-faq-page .help-faq__item[open] summary::before {
    transform: rotate(90deg);
}
.help-faq-page .help-faq__answer {
    padding: 0 1rem 1rem 1.75rem;
    font-size: 0.95rem;
    line-height: 1.8;
}
.help-faq-page .help-faq__answer p {
    margin: 0;
}
.help-faq-page .help-faq__footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
}

/* お問い合わせ */
.help-contact-page .help-contact-condition-card {
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafb;
    box-shadow: none;
    overflow: visible;
}
.help-contact-page .help-contact-condition-card__body {
    padding: 1.15rem 1.35rem;
}
.help-contact-page .help-contact-condition-card__foot {
    margin: 0;
    padding: 0.75rem 1.35rem 1rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
    font-size: 0.82rem;
    color: var(--subtext-color, #64748b);
    line-height: 1.5;
}
.help-contact-page .help-contact-form {
    width: 100%;
}
.help-contact-page .help-contact-field {
    margin-bottom: 1.15rem;
}
.help-contact-page .help-contact-field:last-child {
    margin-bottom: 0;
}
.help-contact-page .help-contact-field__label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--subtext-color, #64748b);
}
.help-contact-page .help-contact-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal, 6px);
    background-color: var(--white-color, #fff);
    font-family: var(--base-font-family);
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.help-contact-page .help-contact-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}
.help-contact-page .help-contact-control--textarea {
    min-height: 12rem;
    resize: vertical;
    line-height: 1.65;
}
.help-contact-page .help-contact__readonly {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    background: #f0f3f6;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal, 6px);
    min-height: 2.75rem;
    line-height: 1.5;
    color: var(--text-color);
}
.help-contact-page .help-contact__char-count {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: right;
    margin-top: 0.35rem;
}
.help-contact-page .help-contact__char-count--over {
    color: #dc3545;
}
.help-contact-page .help-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.help-contact-page .help-contact-review__dl {
    margin: 0;
}
.help-contact-page .help-contact-review__row {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.help-contact-page .help-contact-review__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.help-contact-page .help-contact-review__row dt {
    margin: 0;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--subtext-color, #64748b);
}
.help-contact-page .help-contact-review__row dd {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    word-break: break-word;
}
.help-contact-page .help-contact-review__body-text {
    white-space: pre-wrap;
    line-height: 1.7;
}
.help-contact-page .help-contact-thanks {
    max-width: 640px;
    margin: 2rem auto 3rem;
    text-align: center;
}
.help-contact-page .help-contact-thanks__icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.help-contact-page .help-contact-thanks__title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
}
.help-contact-page .help-contact-thanks__lead {
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}
.help-contact-page .help-contact-thanks__note {
    margin: 0 0 1.75rem;
    font-size: 0.9rem;
    color: var(--subtext-color, #64748b);
}
.help-contact-page .help-contact-thanks__links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    max-width: 16rem;
    margin-left: auto;
    margin-right: auto;
}
.help-contact-page .help-contact-thanks__action {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    text-decoration: none;
    text-align: center;
}
.help-contact-page .help-contact-thanks__action:hover,
.help-contact-page .help-contact-thanks__action:focus {
    text-decoration: none;
}
.help-contact-page .help-contact-thanks__link {
    padding: 0.5rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-color);
    background: none;
    border: none;
}
.help-contact-page .help-contact-thanks__link:hover,
.help-contact-page .help-contact-thanks__link:focus {
    color: var(--primary-color);
    opacity: 0.85;
}
@media (max-width: 768px) {
    .help-contact-page .help-contact-review__row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* =============================================================================
   AI週次レポート（weekly_report）
   ============================================================================= */
.weekly-report-page {
    padding: 0;
}
.weekly-report-control-card {
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--box-shadow);
}
.weekly-report-control-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}
.weekly-report-period-label {
    font-size: 0.85rem;
    color: var(--subtext-color);
    margin-bottom: 0.25rem;
}
.weekly-report-period-badge {
    display: inline-block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-color);
    padding: 0.25rem 0.65rem;
    background: rgba(0, 169, 157, 0.08);
    border-radius: var(--border-radius-normal);
    border: 1px solid rgba(0, 169, 157, 0.2);
}
.weekly-report-prev-period {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--subtext-color);
}
.weekly-report-control-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}
.wr-btn-generate {
    min-width: 10rem;
    font-weight: 600;
}
.wr-btn-generating {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: var(--white-color) !important;
    opacity: 0.85;
    cursor: not-allowed;
    box-shadow: none !important;
}
.weekly-report-errors {
    margin-top: 1rem;
    margin-bottom: 0;
}
.weekly-report-generating-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, rgba(0, 169, 157, 0.12) 0%, rgba(255, 193, 7, 0.08) 100%);
    border: 1px solid rgba(0, 169, 157, 0.25);
    border-radius: var(--border-radius-normal);
    border-left: 4px solid var(--primary-color);
}
.weekly-report-generating-banner > .fas {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}
.weekly-report-generating-banner p {
    margin: 0.35rem 0 0 0;
    font-size: 0.9rem;
    color: var(--subtext-color);
    line-height: 1.55;
}
.weekly-report-section-card {
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
}
.weekly-report-section-card .card-header h2 {
    margin: 0;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.weekly-report-section-card .card-header h2 .fas {
    color: var(--primary-color);
    opacity: 0.9;
}
.weekly-report-kpi-caption {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
}
.weekly-report-kpi-caption-label {
    font-weight: 600;
    color: var(--subtext-color);
    margin-right: 0.25rem;
}
.weekly-report-kpi-caption-sep {
    margin: 0 0.35rem;
    color: var(--subtext-color);
}
.weekly-report-kpi-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    background: var(--white-color);
}
.weekly-report-kpi-table {
    margin-bottom: 0;
    width: 100%;
    border-collapse: collapse;
}
.weekly-report-kpi-table th,
.weekly-report-kpi-table td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.weekly-report-kpi-table thead th {
    border-bottom: 1px solid var(--border-color);
}
.weekly-report-kpi-head-row th {
    background: linear-gradient(135deg, rgba(0, 169, 157, 0.1) 0%, rgba(0, 112, 192, 0.06) 100%);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-color);
}
.weekly-report-kpi-subhead-row th {
    background: rgba(0, 169, 157, 0.04);
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--subtext-color);
    padding-top: 0.35rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}
.wr-kpi-metric {
    min-width: 9.5rem;
    width: 28%;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    background: #fafafa;
}
.weekly-report-kpi-table tbody .wr-kpi-metric {
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}
.wr-kpi-num-head {
    width: 24%;
}
.wr-kpi-num {
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
    color: var(--text-color);
}
.wr-kpi-num--amount {
    font-size: 1.05rem;
    font-weight: 600;
}
.weekly-report-kpi-table tbody tr.wr-kpi-row:nth-child(even) td,
.weekly-report-kpi-table tbody tr.wr-kpi-row:nth-child(even) th.wr-kpi-metric {
    background-color: rgba(0, 0, 0, 0.02);
}
.weekly-report-kpi-table tbody tr.wr-kpi-row:nth-child(even) th.wr-kpi-metric {
    background-color: #f5f5f5;
}
.weekly-report-kpi-table tbody tr.wr-kpi-row:last-child td,
.weekly-report-kpi-table tbody tr.wr-kpi-row:last-child th {
    border-bottom: none;
}
.weekly-report-kpi-table .wr-kpi-up {
    color: var(--success-color);
    font-weight: 700;
}
.weekly-report-kpi-table .wr-kpi-down {
    color: var(--danger-color);
    font-weight: 700;
}
.weekly-report-kpi-note {
    margin: 0.75rem 0 0 0;
    font-size: 0.82rem;
    color: var(--subtext-color);
    line-height: 1.5;
}
.weekly-report-generated-at {
    margin: 0.75rem 0 0 0;
    font-size: 0.85rem;
    color: var(--subtext-color);
}
.weekly-report-summary-card .card-body {
    line-height: 1.75;
}
.weekly-report-summary-paragraph {
    margin-bottom: 0.85rem;
}
.weekly-report-summary-paragraph:last-child {
    margin-bottom: 0;
}
.weekly-report-insights-row {
    margin-bottom: 1rem;
}
.weekly-report-insight-card {
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}
.weekly-report-insight-card--highlight {
    border-top: 3px solid var(--primary-color);
}
.weekly-report-insight-card--concern {
    border-top: 3px solid #ffc107;
}
.weekly-report-insight-card--action {
    border-top: 3px solid var(--secondary-color, #0070c0);
}
.weekly-report-insight-card--highlight .card-header {
    background: rgba(0, 169, 157, 0.06);
}
.weekly-report-insight-card--concern .card-header {
    background: rgba(255, 193, 7, 0.1);
}
.weekly-report-insight-card--action .card-header {
    background: rgba(0, 112, 192, 0.06);
}
.wr-insight-item {
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius-normal);
    border: 1px solid var(--border-color);
}
.wr-insight-item:last-child {
    margin-bottom: 0;
}
.wr-insight-title {
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-color);
}
.wr-insight-body {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-color);
}
.wr-insight-deadline {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--subtext-color);
}
.wr-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--border-color);
}
.wr-detail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 169, 157, 0.08);
    border: 1px solid rgba(0, 169, 157, 0.2);
    transition: background 0.15s ease;
}
.wr-detail-link:hover {
    background: rgba(0, 169, 157, 0.15);
    text-decoration: none;
    color: var(--secondary-color);
}
.weekly-report-comment-review {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.65;
}
.weekly-report-comment-card .card-body {
    width: 100%;
}
.weekly-report-comment-lead {
    font-size: 0.9rem;
    color: var(--subtext-color);
    margin-bottom: 0.75rem;
}
.weekly-report-comment-textarea {
    width: 100%;
    min-height: 12rem;
    box-sizing: border-box;
    line-height: 1.6;
    resize: vertical;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-normal);
    background-color: var(--white-color);
    font-family: var(--base-font-family);
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.weekly-report-comment-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
}
.weekly-report-comment-actions {
    margin-top: 0.75rem;
}
.weekly-report-empty-card .card-body {
    padding: 2rem;
}
@media (max-width: 768px) {
    .weekly-report-control-actions {
        align-items: stretch;
        width: 100%;
    }
    .wr-btn-generate {
        width: 100%;
    }
}

/* 本契約手続き（未ログイン） */
.login-card.onboarding-wide {
    max-width: 960px;
    width: 100%;
}
.onboarding-wrap {
    text-align: left;
    width: 100%;
}
/* ログイン画面用の左余白（アイコン分）をオンボーディングでは打ち消す */
.onboarding-wrap .form-group {
    margin-bottom: 1rem;
}
.onboarding-wrap .form-group label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}
.onboarding-wrap .form-group input,
.onboarding-wrap .form-group input.form-control,
.onboarding-wrap .form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--border-radius-normal, 6px);
    font-size: 0.95rem;
}
.onboarding-wrap .form-group input:focus,
.onboarding-wrap .form-control:focus {
    outline: none;
    border-color: var(--primary-color, #00a99d);
    box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.18);
}
.onboarding-wrap .form-row .form-group {
    margin-bottom: 0;
}
.onboarding-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}
.onboarding-section {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 1rem;
}
.onboarding-section h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}
.onboarding-legal-scroll {
    display: block;
    box-sizing: border-box;
    height: 240px;
    max-height: 240px;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    -webkit-overflow-scrolling: touch;
}
@supports (max-height: min(0px, 0px)) {
    .onboarding-legal-scroll {
        height: min(240px, 32vh);
        max-height: min(240px, 32vh);
    }
}
.onboarding-legal-scroll .legal-doc-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.onboarding-legal-scroll::-webkit-scrollbar {
    width: 8px;
}
.onboarding-legal-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.onboarding-legal-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.onboarding-legal-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.onboarding-legal-scroll .help-document {
    background: transparent;
    margin: 0;
}
.onboarding-legal-scroll .help-document__body {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    line-height: 1.65;
}
.onboarding-legal-scroll h1 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}
.onboarding-legal-scroll .help-page__revision,
.onboarding-legal-scroll .page-description {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
}
.onboarding-legal-scroll .help-document__body h2 {
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
    padding-bottom: 0.35rem;
}
.onboarding-legal-scroll .help-document__body h2:first-child {
    margin-top: 0;
}
.onboarding-legal-scroll .help-document__body h3 {
    margin: 1rem 0 0.35rem;
    font-size: 0.95rem;
}
.onboarding-legal-scroll .help-document__body p,
.onboarding-legal-scroll .help-document__body li {
    margin: 0 0 0.5rem;
}
@media (max-width: 640px) {
    .onboarding-legal-scroll {
        height: 200px;
        max-height: 200px;
        padding: 0.5rem;
    }
    @supports (max-height: min(0px, 0px)) {
        .onboarding-legal-scroll {
            height: min(200px, 28vh);
            max-height: min(200px, 28vh);
        }
    }
}
.login-page:has(.onboarding-wide) {
    align-items: flex-start;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}
/* 外部公開用・法務ドキュメント */
.public-legal-page {
    text-align: left;
    width: 100%;
}
.public-legal-page .help-page__header {
    margin-bottom: 1rem;
}
.onboarding-staff-row {
    border-top: 1px dashed #cbd5e1;
    padding-top: 1rem;
    margin-top: 1rem;
}
.onboarding-badge-rep {
    display: inline-block;
    background: #0ea5e9;
    color: #fff;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.onboarding-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.onboarding-note {
    font-size: 0.875rem;
    color: var(--subtext-color, #64748b);
}
.onboarding-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.onboarding-modal {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 420px;
    width: 90%;
}

/* オンボーディング：バリデーション・注意メッセージ */
.onboarding-alert {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    border-radius: 10px;
    border: 1px solid transparent;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
}
.onboarding-alert--error {
    background: linear-gradient(145deg, #fff1f2 0%, #ffffff 55%);
    border-color: #fecdd3;
    border-left: 4px solid #e11d48;
}
.onboarding-alert__icon {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ffe4e6;
    color: #e11d48;
    font-size: 1.05rem;
    line-height: 1;
}
.onboarding-alert__body {
    flex: 1;
    min-width: 0;
}
.onboarding-alert__title {
    margin: 0 0 0.45rem;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #9f1239;
}
.onboarding-alert__message {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #881337;
}
.onboarding-alert__list {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 12rem;
    overflow-y: auto;
    scrollbar-gutter: stable;
}
.onboarding-alert__list li {
    position: relative;
    padding: 0.3rem 0 0.3rem 1.15rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #881337;
}
.onboarding-alert__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f43f5e;
}
.onboarding-alert__list li + li {
    border-top: 1px dashed rgba(225, 29, 72, 0.15);
}
.onboarding-alert-fade-enter-active,
.onboarding-alert-fade-leave-active {
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.onboarding-alert-fade-enter-from,
.onboarding-alert-fade-leave-to {
    opacity: 0;
    transform: translateY(-8px);
}

/* オンボーディング：入力内容の確認 */
.onboarding-confirm__lead {
    text-align: center;
    margin: -0.35rem 0 1.1rem;
}
.onboarding-confirm .onboarding-section {
    border: none;
    padding: 0;
    margin-bottom: 1.25rem;
    background: transparent;
}
.onboarding-review-card {
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}
.onboarding-review-card__head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.85rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f766e;
    background: linear-gradient(90deg, #f0fdfa 0%, #fff 100%);
    border-bottom: 1px solid #e2e8f0;
}
.onboarding-review-card__head i {
    color: var(--primary-color, #00a99d);
    font-size: 1rem;
}
.onboarding-review-card__body {
    padding: 1rem 1.1rem 1.1rem;
}
.onboarding-review-agree {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.onboarding-review-agree__item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.onboarding-review-agree__icon {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #d1fae5;
    color: #059669;
    font-size: 0.95rem;
}
.onboarding-review-agree__label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    margin-bottom: 0.15rem;
}
.onboarding-review-agree__date {
    display: block;
    font-size: 0.8125rem;
    color: #64748b;
}
.onboarding-review-company {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
    border-radius: 8px;
    border: 1px solid #99f6e4;
}
.onboarding-review-company__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #0f766e;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}
.onboarding-review-company__name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #134e4a;
    line-height: 1.4;
}
.onboarding-review-dl {
    margin: 0;
    display: grid;
    gap: 0;
}
.onboarding-review-dl__row {
    display: grid;
    grid-template-columns: minmax(7.5rem, 32%) 1fr;
    gap: 0.65rem 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: start;
}
.onboarding-review-dl__row:last-child {
    border-bottom: none;
}
.onboarding-review-dl__row dt {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.45;
}
.onboarding-review-dl__row dd {
    margin: 0;
    font-size: 0.9rem;
    color: #1e293b;
    line-height: 1.5;
    word-break: break-word;
}
.onboarding-review-staff {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.onboarding-review-staff-card {
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.onboarding-review-staff-card .onboarding-badge-rep {
    margin-bottom: 0.65rem;
}
.onboarding-review-field {
    display: grid;
    grid-template-columns: minmax(5.5rem, 28%) 1fr;
    gap: 0.35rem 0.75rem;
    padding: 0.35rem 0;
    font-size: 0.875rem;
}
.onboarding-review-field + .onboarding-review-field {
    border-top: 1px dashed #e2e8f0;
    margin-top: 0.25rem;
    padding-top: 0.5rem;
}
.onboarding-review-field__label {
    color: #64748b;
    font-weight: 500;
}
.onboarding-review-field__value {
    color: #1e293b;
    font-weight: 500;
    word-break: break-word;
}
.onboarding-review-options {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.onboarding-review-options__item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
}
.onboarding-review-options__item i {
    font-size: 0.75rem;
    color: #059669;
}
.onboarding-review-empty {
    margin: 0;
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
}
.onboarding-confirm .onboarding-modal {
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    max-width: 440px;
}
.onboarding-confirm .onboarding-modal > p:first-child {
    margin-top: 0;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.55;
}
@media (max-width: 640px) {
    .onboarding-review-dl__row,
    .onboarding-review-field {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* オンボーディング：完了画面 */
.onboarding-done {
    max-width: 520px;
    margin: 0 auto;
}
.onboarding-done-card {
    text-align: center;
    padding: 2rem 1.5rem 1.75rem;
    background: linear-gradient(160deg, #ecfdf5 0%, #ffffff 55%);
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(5, 150, 105, 0.1);
}
.onboarding-done-card__icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #d1fae5;
    color: #059669;
    font-size: 1.75rem;
    line-height: 1;
}
.onboarding-done-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #134e4a;
    line-height: 1.4;
}
.onboarding-done-card__lead {
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #334155;
}
.onboarding-done-card__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
}
.onboarding-done-card__btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    justify-content: center;
}
.onboarding-done-card__notice {
    margin: 0;
    padding: 0.75rem 0.85rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}
.onboarding-done__footnote {
    margin-top: 1.25rem;
    text-align: center;
}

/* データ連携準備中（ログイン後グローバル） */
.integration-pending-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f766e;
    background: linear-gradient(90deg, #ecfeff 0%, #f0fdfa 100%);
    border: 1px solid #99f6e4;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.08);
}
.integration-pending-banner i {
    font-size: 1rem;
    color: var(--primary-color, #00a99d);
}
.main-content > .integration-pending-banner {
    margin-left: 0;
    margin-right: 0;
}

/* 商品単品分析：統合検索条件カード */
.shouhin-tanpin-page .shouhin-tanpin-condition-card {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafb;
    box-shadow: none;
    overflow: visible;
}
.shouhin-tanpin-page .shouhin-tanpin-condition-card__body {
    padding: 0.85rem 1.15rem;
}
.shouhin-tanpin-page .shouhin-tanpin-condition-card .filter-group select {
    min-width: 12rem;
}
.shouhin-tanpin-page .shouhin-tanpin-code-input {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.shouhin-tanpin-page .shouhin-tanpin-code-input input {
    flex: 1;
    min-width: 10rem;
}

/* 商品ランキング：1画面に収まる列幅 */
.product-ranking-page .product-ranking-table {
    width: 100%;
    table-layout: fixed;
}
.product-ranking-page .product-ranking-table th,
.product-ranking-page .product-ranking-table td {
    padding: 0.55rem 0.4rem;
}
.product-ranking-page .product-ranking-table .col-rank { width: 3.5rem; }
.product-ranking-page .product-ranking-table .col-code { width: 9rem; }
.product-ranking-page .product-ranking-table .col-brand { width: 8rem; }
.product-ranking-page .product-ranking-table .col-customers { width: 4.5rem; }
.product-ranking-page .product-ranking-table .col-qty { width: 4.25rem; }
.product-ranking-page .product-ranking-table .col-amount { width: 7rem; }
.product-ranking-page .product-ranking-table .col-margin { width: 4.75rem; }
.product-ranking-page .product-ranking-table .col-stock { width: 4.5rem; }
.product-ranking-page .product-ranking-table .col-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ブランド分析：統合検索条件カード */
.brand-analysis-page .brand-analysis-condition-card {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafb;
    box-shadow: none;
    overflow: visible;
}
.brand-analysis-page .brand-analysis-condition-card__body {
    padding: 0.85rem 1.15rem;
}
.brand-analysis-page .brand-analysis-condition-card__foot {
    margin: 0.75rem 0 0 0;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
    font-size: 0.82rem;
    color: var(--subtext-color, #64748b);
    line-height: 1.45;
}
.brand-analysis-page .brand-analysis-condition-card .filter-group select {
    min-width: 12rem;
}

/* お気に入り画面：登録方法の説明カード */
.favorite-page .favorite-guide-card {
    margin-top: 0.25rem;
    background: #f8fafb;
}
.favorite-page .favorite-guide-card__body {
    padding: 1.5rem 1.75rem;
    font-size: 0.98rem;
    line-height: 1.75;
}
.favorite-page .favorite-guide-card__empty-notice {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--primary-color);
    background: rgba(0, 169, 157, 0.08);
    color: var(--text-color);
    font-size: 0.92rem;
}
.favorite-page .favorite-guide-card__empty-notice i {
    margin-right: 0.35rem;
    color: var(--primary-color);
}
.favorite-page .favorite-guide-card__body h2 {
    margin: 0 0 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.25rem;
    color: var(--secondary-color);
}
.favorite-page .favorite-guide-card__body > p {
    margin: 0 0 1rem;
    color: var(--text-color);
}
.favorite-page .favorite-guide-card__steps {
    margin: 0 0 1.25rem;
    padding-left: 1.35rem;
}
.favorite-page .favorite-guide-card__steps li {
    margin-bottom: 0.5rem;
}
.favorite-page .favorite-guide-card__steps li:last-child {
    margin-bottom: 0;
}
.favorite-page .favorite-guide-card__sample {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: #fff;
}
.favorite-page .favorite-guide-card__sample-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}
.favorite-page .favorite-guide-card__sample-label {
    font-size: 0.82rem;
    color: var(--subtext-color);
}
.favorite-page .favorite-guide-card__sample-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.58rem;
    line-height: 1;
    min-width: 2.35rem;
    pointer-events: none;
}
.favorite-page .favorite-guide-card__notes {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.88rem;
    color: var(--subtext-color);
}
.favorite-page .favorite-guide-card__notes li {
    margin-bottom: 0.35rem;
}
.favorite-page .favorite-guide-card__notes li:last-child {
    margin-bottom: 0;
}

/* 掲載数サマリ */
.posting-count-summary-page .posting-count-summary-tabs {
    margin-bottom: 1rem;
}
.posting-count-summary-page .posting-count-summary-condition-card {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafb;
    box-shadow: none;
    overflow: visible;
}
.posting-count-summary-page .posting-count-summary-condition-card__body {
    padding: 0.85rem 1.15rem;
}
.posting-count-summary-page .posting-count-summary-condition-card .filter-row {
    align-items: flex-end;
}
.posting-count-summary-page .posting-count-summary-chart-card {
    margin-bottom: 1rem;
}
.posting-count-summary-page .posting-count-summary-chart-body {
    height: 400px;
}
.posting-count-summary-page .notes-card {
    margin-top: 1rem;
}
.posting-count-summary-page .notes-card ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    color: var(--subtext-color, #64748b);
    line-height: 1.6;
}
.posting-count-summary-page .notes-card li {
    margin-bottom: 0.35rem;
}
.posting-count-summary-page .notes-card li:last-child {
    margin-bottom: 0;
}
.posting-count-summary-page .pcs-data-table {
    table-layout: fixed;
    width: 100%;
}
.posting-count-summary-page .pcs-data-table .pcs-col-brand {
    width: 34%;
}
.posting-count-summary-page .pcs-data-table .pcs-col-metric {
    width: 22%;
}
.posting-count-summary-page .pcs-data-table tbody td:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}
.posting-count-summary-page .pcs-data-table th.pcs-col-metric {
    white-space: normal;
    line-height: 1.35;
    font-size: 0.88rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}
.posting-count-summary-page .pcs-data-table td.text-end {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}
.posting-count-summary-page .pcs-data-table th.pcs-col-metric .pcs-sort-label {
    line-height: 1.35;
}
.posting-count-summary-page th.sortable {
    white-space: nowrap;
    cursor: default;
    padding-right: 1rem;
    vertical-align: middle;
}
.posting-count-summary-page .pcs-sort-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.posting-count-summary-page .pcs-sort-cell--end {
    justify-content: flex-end;
    width: 100%;
}
.posting-count-summary-page .pcs-sort-label {
    cursor: pointer;
}
.posting-count-summary-page .pcs-sort-label:hover {
    color: var(--primary-color, #00a99d);
}
.posting-count-summary-page .pcs-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    color: var(--subtext-color, #64748b);
    background: #fff;
    border: 1px solid #c5cdd8;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
}
.posting-count-summary-page .pcs-sort-btn:hover {
    color: var(--primary-color, #00a99d);
    border-color: var(--primary-color, #00a99d);
    background: rgba(0, 169, 157, 0.04);
}
.posting-count-summary-page .pcs-sort-btn--active {
    color: var(--primary-color, #00a99d);
    border-color: var(--primary-color, #00a99d);
    background: rgba(0, 169, 157, 0.1);
}

/* セット商品分析 */
.set-product-analysis-page .set-product-analysis-condition-card {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafb;
    box-shadow: none;
    overflow: visible;
}
.set-product-analysis-page .set-product-analysis-condition-card__body {
    padding: 0.85rem 1.15rem;
}
.set-product-analysis-page .set-product-analysis-condition-card .filter-row {
    align-items: flex-end;
}
.set-product-analysis-page .set-product-analysis-condition-card__foot {
    padding: 0.5rem 1.15rem 0.85rem;
    font-size: 0.8125rem;
    color: var(--subtext-color, #64748b);
    border-top: 1px solid var(--border-color, #e2e8f0);
}
.set-product-analysis-page .set-product-analysis-chart-card {
    margin-bottom: 1rem;
}
.set-product-analysis-page .set-product-analysis-chart-body {
    height: 400px;
}
.set-product-analysis-page .notes-card {
    margin-top: 1rem;
}
.set-product-analysis-page .notes-card ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    color: var(--subtext-color, #64748b);
    line-height: 1.6;
}
.set-product-analysis-page .notes-card li {
    margin-bottom: 0.35rem;
}
.set-product-analysis-page .notes-card li:last-child {
    margin-bottom: 0;
}
.set-product-analysis-page .tenpo-tabs {
    margin-bottom: 1rem;
}
.set-product-analysis-page .spa-data-table {
    table-layout: fixed;
    width: 100%;
}
.set-product-analysis-page .spa-data-table th,
.set-product-analysis-page .spa-data-table td {
    vertical-align: middle;
    line-height: 1.35;
}
.set-product-analysis-page .spa-data-table th:nth-child(1),
.set-product-analysis-page .spa-data-table td:nth-child(1) {
    width: 11%;
}
.set-product-analysis-page .spa-data-table th:nth-child(2),
.set-product-analysis-page .spa-data-table td:nth-child(2) {
    width: 13%;
}
.set-product-analysis-page .spa-data-table th:nth-child(3),
.set-product-analysis-page .spa-data-table td:nth-child(3) {
    width: 32%;
}
.set-product-analysis-page .spa-data-table th:nth-child(4),
.set-product-analysis-page .spa-data-table td:nth-child(4) {
    width: 10%;
}
.set-product-analysis-page .spa-data-table th:nth-child(5),
.set-product-analysis-page .spa-data-table td:nth-child(5) {
    width: 12%;
}
.set-product-analysis-page .spa-data-table th:nth-child(6),
.set-product-analysis-page .spa-data-table td:nth-child(6) {
    width: 8%;
}
.set-product-analysis-page .spa-data-table th:nth-child(7),
.set-product-analysis-page .spa-data-table td:nth-child(7) {
    width: 14%;
}
.set-product-analysis-page .spa-col-ellipsis {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.set-product-analysis-page .spa-col-code,
.set-product-analysis-page .spa-col-datetime {
    font-variant-numeric: tabular-nums;
}
.set-product-analysis-page .spa-data-table td.text-end {
    white-space: nowrap;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.customer-unit-price-trend-page .cupt-card-caption {
    margin: 0.35rem 0 0;
    color: var(--subtext-color);
    font-size: 0.92rem;
}

.customer-unit-price-trend-page .cupt-period-card {
    margin-top: 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.customer-unit-price-trend-page .cupt-period-card__body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
}

.customer-unit-price-trend-page .cupt-period-card__main {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.customer-unit-price-trend-page .cupt-period-card__shop-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.customer-unit-price-trend-page .cupt-period-card__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.customer-unit-price-trend-page .cupt-period-card__shop {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.35;
}

.customer-unit-price-trend-page .cupt-period-card__ranges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.5rem;
}

.customer-unit-price-trend-page .cupt-period-badge {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    border: 1px solid rgba(0, 169, 157, 0.16);
    background: rgba(0, 169, 157, 0.06);
    color: #006d66;
    border-radius: 0.85rem;
    padding: 0.55rem 0.75rem 0.6rem;
    min-width: 0;
}

.customer-unit-price-trend-page .cupt-period-badge__label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0.78;
}

.customer-unit-price-trend-page .cupt-period-badge__value {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.customer-unit-price-trend-page .cupt-period-badge--sub {
    border-color: rgba(139, 92, 246, 0.16);
    background: rgba(139, 92, 246, 0.06);
    color: #6842c2;
}

.customer-unit-price-trend-page .cupt-period-card__formula {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--subtext-color);
}

.customer-unit-price-trend-page .cupt-period-card__formula-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #64748b;
}

.customer-unit-price-trend-page .cupt-period-card__formula-text {
    color: var(--subtext-color);
    font-size: 0.84rem;
    font-weight: 500;
}

.customer-unit-price-trend-page .cupt-chart-card__header,
.customer-unit-price-trend-page .cupt-ai-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.customer-unit-price-trend-page .cupt-chart-wrap {
    position: relative;
    min-height: 360px;
}

.customer-unit-price-trend-page .cupt-summary-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.customer-unit-price-trend-page .cupt-summary-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.42rem 0.9rem;
    background: rgba(0, 169, 157, 0.09);
    color: #006d66;
    font-weight: 600;
    font-size: 0.9rem;
}

.customer-unit-price-trend-page .cupt-summary-pill--sub {
    background: rgba(139, 92, 246, 0.08);
    color: #6842c2;
}

.customer-unit-price-trend-page .cupt-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.customer-unit-price-trend-page .cupt-kpi-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #f8fafb;
    padding: 0.95rem 1rem;
}

.customer-unit-price-trend-page .cupt-kpi-card__label {
    color: var(--subtext-color);
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
}

.customer-unit-price-trend-page .cupt-kpi-card__value {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.customer-unit-price-trend-page .cupt-kpi-card__value--up {
    color: #0f766e;
}

.customer-unit-price-trend-page .cupt-kpi-card__value--down {
    color: #b91c1c;
}

.customer-unit-price-trend-page .cupt-ai-card__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.customer-unit-price-trend-page .cupt-ai-card__status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    background: rgba(0, 169, 157, 0.08);
    color: #006d66;
    font-size: 0.84rem;
    font-weight: 700;
}

.customer-unit-price-trend-page .cupt-ai-card__status--fallback {
    background: rgba(245, 158, 11, 0.12);
    color: #a16207;
}

.customer-unit-price-trend-page .cupt-ai-errors {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: #fff8e8;
    color: #8a5a00;
}

.customer-unit-price-trend-page .cupt-ai-errors p {
    margin: 0;
}

.customer-unit-price-trend-page .cupt-ai-errors p + p {
    margin-top: 0.35rem;
}

.customer-unit-price-trend-page .cupt-ai-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.customer-unit-price-trend-page .cupt-ai-section {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #f8fafb;
    padding: 1rem;
}

.customer-unit-price-trend-page .cupt-ai-section h3 {
    margin: 0 0 0.55rem;
    font-size: 1rem;
}

.customer-unit-price-trend-page .cupt-ai-section p,
.customer-unit-price-trend-page .cupt-ai-placeholder {
    margin: 0;
    color: var(--text-color);
    line-height: 1.75;
}

.customer-unit-price-trend-page .cupt-compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.customer-unit-price-trend-page .cupt-compare-panel {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.customer-unit-price-trend-page .cupt-compare-panel__title {
    padding: 0.85rem 1rem;
    font-weight: 700;
    background: #f8fafb;
    border-bottom: 1px solid var(--border-color);
}

.customer-unit-price-trend-page .cupt-compare-table-wrap {
    max-height: 680px;
    overflow: auto;
}

.customer-unit-price-trend-page .cupt-compare-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ffffff;
}

@media (max-width: 960px) {
    .customer-unit-price-trend-page .cupt-period-card__body {
        padding: 0.8rem 0.9rem;
    }

    .customer-unit-price-trend-page .cupt-period-card__ranges {
        grid-template-columns: 1fr;
    }

    .customer-unit-price-trend-page .cupt-kpi-grid,
    .customer-unit-price-trend-page .cupt-ai-grid,
    .customer-unit-price-trend-page .cupt-compare-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== ブランド別在庫高 ===== */
.inventory-value-by-brand-page .card {
    margin-bottom: 1.25rem;
}

/* 条件カード：ブランドサジェストのドロップダウンがカード外にはみ出せるよう overflow を visible にする */
.inventory-value-by-brand-page .ivbb-condition-card {
    overflow: visible;
}

/* 条件カード下部の補足文（横並びを崩さないよう filter-row の外に置く） */
.inventory-value-by-brand-page .ivbb-condition-card__foot {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

/* 左右2表の横並び（狭幅では縦積み） */
.inventory-value-by-brand-page .ivbb-tables {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.inventory-value-by-brand-page .ivbb-table-panel {
    flex: 1 1 0;
    min-width: 0;
}

.inventory-value-by-brand-page .ivbb-table-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #f8fafb;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.inventory-value-by-brand-page .ivbb-table-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
}

/* colgroup で列幅を明示し table-layout: fixed で厳密に適用する。
   overflow-x は auto のまま（visible にするとパネル外へはみ出す）。 */
.inventory-value-by-brand-page .ivbb-table-panel .custom-table {
    table-layout: fixed;
    width: 100%;
}

/* セル余白を圧縮して2表横並びでも収まるようにする */
.inventory-value-by-brand-page .ivbb-table-panel .custom-table th,
.inventory-value-by-brand-page .ivbb-table-panel .custom-table td {
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
}

/* ヘッダは折り返し可（見出しが収まる）、データ行の数値は折り返さない */
.inventory-value-by-brand-page .ivbb-table-panel .custom-table th {
    white-space: normal;
    word-break: break-word;
}

/* ブランド名列はデータ行も折り返して全文表示 */
.inventory-value-by-brand-page .ivbb-table-panel .custom-table td:nth-child(2) {
    white-space: normal;
    word-break: break-word;
}

/* 数値データ列は桁崩れを防ぐため折り返さない */
.inventory-value-by-brand-page .ivbb-table-panel .custom-table td.text-end {
    white-space: nowrap;
}

/* ブランド名セル：省略表示（マウスオーバーで title 属性の全文を確認できる） */
.inventory-value-by-brand-page .ivbb-table-panel .ivbb-brand-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0; /* table-layout:fixed 下でセルが colgroup 指定幅に正しく収まる */
}

@media (max-width: 960px) {
    .inventory-value-by-brand-page .ivbb-tables {
        flex-direction: column;
    }
}

/* 商品登録日別受注 */
.product-registration-order-page .product-registration-order-condition-card {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafb;
    box-shadow: none;
    overflow: visible;
}
.product-registration-order-page .product-registration-order-condition-card__body {
    padding: 0.85rem 1.15rem;
}
.product-registration-order-page .product-registration-order-condition-card .filter-row {
    align-items: flex-end;
}
.product-registration-order-page .product-registration-order-condition-card__foot {
    padding: 0.5rem 1.15rem 0.85rem;
    font-size: 0.8125rem;
    color: var(--subtext-color, #64748b);
    border-top: 1px solid var(--border-color, #e2e8f0);
}
.product-registration-order-page .tenpo-tabs {
    margin-bottom: 1rem;
}
.product-registration-order-page .product-registration-order-summary-card {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #f8fafb;
    box-shadow: none;
}
.product-registration-order-page .product-registration-order-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem 1.15rem;
}
.product-registration-order-page .product-registration-order-summary__item {
    text-align: center;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    background: #fff;
}
.product-registration-order-page .product-registration-order-summary__label {
    font-size: 0.8125rem;
    color: var(--subtext-color, #64748b);
    margin-bottom: 0.35rem;
}
.product-registration-order-page .product-registration-order-summary__value {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-color, #1e293b);
}
.product-registration-order-page .notes-card {
    margin-top: 1rem;
}
.product-registration-order-page .notes-card ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    color: var(--subtext-color, #64748b);
    line-height: 1.6;
}
.product-registration-order-page .notes-card li {
    margin-bottom: 0.35rem;
}
.product-registration-order-page .notes-card li:last-child {
    margin-bottom: 0;
}
.product-registration-order-page .pro-data-table {
    table-layout: fixed;
    width: 100%;
}
.product-registration-order-page .pro-data-table th,
.product-registration-order-page .pro-data-table td {
    vertical-align: middle;
    line-height: 1.35;
}
.product-registration-order-page .pro-data-table th:nth-child(1),
.product-registration-order-page .pro-data-table td:nth-child(1) {
    width: 12%;
}
.product-registration-order-page .pro-data-table th:nth-child(2),
.product-registration-order-page .pro-data-table td:nth-child(2) {
    width: 14%;
}
.product-registration-order-page .pro-data-table th:nth-child(3),
.product-registration-order-page .pro-data-table td:nth-child(3) {
    width: 12%;
}
.product-registration-order-page .pro-data-table th:nth-child(4),
.product-registration-order-page .pro-data-table td:nth-child(4) {
    width: 24%;
}
.product-registration-order-page .pro-data-table th:nth-child(5),
.product-registration-order-page .pro-data-table td:nth-child(5) {
    width: 12%;
}
.product-registration-order-page .pro-data-table th:nth-child(6),
.product-registration-order-page .pro-data-table td:nth-child(6) {
    width: 10%;
}
.product-registration-order-page .pro-data-table th:nth-child(7),
.product-registration-order-page .pro-data-table td:nth-child(7) {
    width: 16%;
}
.product-registration-order-page .pro-col-ellipsis {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-registration-order-page .pro-col-code,
.product-registration-order-page .pro-col-date {
    font-variant-numeric: tabular-nums;
}
.product-registration-order-page .pro-data-table td.text-end {
    white-space: nowrap;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}
.product-registration-order-page .pro-data-table th.text-end .pcs-sort-label {
    line-height: 1.35;
}
.product-registration-order-page th.sortable {
    white-space: nowrap;
    cursor: default;
    padding-right: 1rem;
    vertical-align: middle;
}
.product-registration-order-page .pcs-sort-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.product-registration-order-page .pcs-sort-cell--end {
    justify-content: flex-end;
    width: 100%;
}
.product-registration-order-page .pcs-sort-label {
    cursor: pointer;
}
.product-registration-order-page .pcs-sort-label:hover {
    color: var(--primary-color, #00a99d);
}
.product-registration-order-page .pcs-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    color: var(--subtext-color, #64748b);
    background: #fff;
    border: 1px solid #c5cdd8;
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
}
.product-registration-order-page .pcs-sort-btn:hover {
    color: var(--primary-color, #00a99d);
    border-color: var(--primary-color, #00a99d);
    background: rgba(0, 169, 157, 0.04);
}
.product-registration-order-page .pcs-sort-btn--active {
    color: var(--primary-color, #00a99d);
    border-color: var(--primary-color, #00a99d);
    background: rgba(0, 169, 157, 0.1);
}
@media (max-width: 768px) {
    .product-registration-order-page .product-registration-order-summary {
        grid-template-columns: 1fr;
    }
}
