/**
 * 一気通貫 共通スタイル: テーマ変数 + レスポンシブ
 *
 *   ・theme-go : 個人事業主向け（寄り添い系）— Edico 風ティール
 *   ・theme-pro: プロ向け（信頼・専門性）— 濃紺 + ゴールド
 *
 * 各HTMLで <body class="theme-go"> or <body class="theme-pro"> を
 * service_type に応じて JS で切り替える（デフォルト theme-go）
 */

:root {
  /* デフォルト = Go (ティール基調 / Edico 寄せ) */
  --bg:               #fafbfc;
  --card-bg:          #ffffff;
  --card-border:      #ececec;
  --card-shadow:      0 1px 3px rgba(0, 0, 0, .05);
  --card-radius:      12px;

  --text:             #1a1a1a;
  --text-sub:         #666666;
  --text-mute:        #999999;

  --primary:          #2c8fc9;
  --primary-hover:    #226d9c;
  --primary-light:    #eaf6fb;
  --primary-light-bd: #d8eaf2;

  --accent:           #a0d8ef;
  --accent-dark:      #5dade2;
  --secondary:        #30717d;
  --header-bg:        #ffffff;
  --header-text:      #1a1a1a;
  --header-bd:        #e8e8e8;

  --danger:           #c0392b;
  --warn:             #d68910;
  --success:          #28a745;
}

/* ========== Go: 個人事業主向け（寄り添い・親しみ） ==========
   Edico ブランドキット準拠のティール系で、やわらかい印象 */
body.theme-go {
  --primary:          #2c8fc9;        /* 既存スカイブルー（深め）  */
  --primary-hover:    #226d9c;
  --primary-light:    #eaf6fb;
  --primary-light-bd: #d8eaf2;
  --accent:           #75b8c4;        /* Edico brand-300 */
  --accent-dark:      #47a1b1;        /* Edico brand-400 */
  --secondary:        #30717d;        /* Edico brand-500 */
  --header-bg:        #ffffff;
  --header-text:      #1a1a1a;
  --header-bd:        #e8e8e8;
  --brand-tag:        #2c8fc9;
}

/* ========== Pro: プロ向け（信頼・専門性・シャープ） ==========
   メイン濃紺 / セカンダリ深いティール / アクセントゴールド */
body.theme-pro {
  --primary:          #1e264a;        /* メイン: 濃紺 (信頼性) */
  --primary-hover:    #141a36;        /* hover 用にさらに濃く */
  --primary-light:    #e8eaf2;        /* 淡い背景用 (バナー等) */
  --primary-light-bd: #d4d8e6;
  --accent:           #fbb82f;        /* アクセント: ゴールド (活気) */
  --accent-dark:      #d99a1a;        /* hover 用 */
  --secondary:        #244951;        /* セカンダリ: 深いティール (落ち着き) */
  --header-bg:        #ffffff;
  --header-text:      #1a1a1a;
  --header-bd:        #e8e8e8;
  --brand-tag:        #1e264a;
}

/* ── 共通ベース ── */
body {
  background: var(--bg);
  color: var(--text);
}

/* ── Edico 風カード ── */
.ek-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  transition: box-shadow .15s, transform .15s;
}
.ek-card.clickable { cursor: pointer; }
.ek-card.clickable:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}

/* 統計カード */
.ek-stat {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 1.2rem 1.4rem;
  min-height: 120px;
  display: flex; flex-direction: column; justify-content: space-between;
}
/* 統計カードの各要素は1行表示（折り返し抑制） */
.ek-stat .label { font-size: .82rem; color: var(--text-sub); margin-bottom: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ek-stat .value { font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--text); white-space: nowrap; }
.ek-stat .unit  { font-size: 1rem; font-weight: 500; margin-left: .15rem; color: var(--text-sub); }
.ek-stat .diff  { font-size: .75rem; color: var(--text-sub); margin-top: .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ek-stat .diff.up   { color: #28a745; }
.ek-stat .diff.down { color: #c0392b; }
.ek-stat .link  { font-size: .82rem; color: var(--primary); text-decoration: none; margin-top: .6rem; }
.ek-stat .link:hover { text-decoration: underline; }

/* 機能ショートカット */
.ek-feature {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 1.5rem; text-decoration: none; color: var(--text);
  transition: box-shadow .15s, transform .15s, border-color .15s;
  display: block;
}
.ek-feature:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
  border-color: var(--primary);
}
.ek-feature .title { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.ek-feature .desc  { font-size: .85rem; color: var(--text-sub); line-height: 1.5; }

/* 強調バナー（薄ブルー） */
.ek-banner {
  background: var(--primary-light);
  border: 1px solid var(--primary-light-bd);
  border-radius: var(--card-radius);
  padding: .8rem 1.2rem;
  font-size: .88rem; color: var(--text);
}
.ek-banner .title {
  font-size: .75rem; color: var(--text-mute); margin-bottom: .25rem;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ヘッダー（Edico風: 白背景・横並び） */
.ek-header {
  background: var(--header-bg); color: var(--header-text);
  border-bottom: 1px solid var(--header-bd);
  padding: .9rem 2rem;
  display: flex; align-items: center; gap: 2rem;
  position: sticky; top: 0; z-index: 50;
}
.ek-header .brand {
  font-size: 1.2rem; font-weight: 700; letter-spacing: .02em;
  color: var(--header-text); text-decoration: none;
}
.ek-header nav { display: flex; gap: 1.6rem; flex: 1; }
.ek-header nav a {
  color: var(--text-sub); font-size: .9rem; text-decoration: none;
  padding: .3rem 0; transition: color .15s;
}
.ek-header nav a:hover, .ek-header nav a.active { color: var(--text); }
.ek-header .user { display: flex; align-items: center; gap: 1.2rem; }
.ek-header .user a, .ek-header .user button {
  color: var(--text-sub); font-size: .85rem; text-decoration: none;
  background: none; border: none; padding: 0; cursor: pointer;
}
.ek-header .user a:hover, .ek-header .user button:hover { color: var(--text); }
.ek-header .user .name { color: var(--text); }

/* セクション見出し */
.ek-section-title {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  margin: 2rem 0 1rem;
}
.ek-greeting {
  font-size: 1.6rem; font-weight: 700; margin-bottom: .3rem;
}
.ek-greeting .sub { font-size: .9rem; color: var(--text-sub); font-weight: 400; margin-top: .2rem; display: block; }

/* ボタン */
.ek-btn-primary {
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px;
  padding: .65rem 1.4rem; font-size: .9rem; cursor: pointer;
  transition: background .15s;
}
.ek-btn-primary:hover { background: var(--primary-hover); }
.ek-btn-primary:disabled { background: #aaa; cursor: not-allowed; }

.ek-btn-secondary {
  background: #fff; color: var(--primary);
  border: 1px solid var(--primary); border-radius: 8px;
  padding: .55rem 1.2rem; font-size: .9rem; cursor: pointer;
  transition: background .15s;
}
.ek-btn-secondary:hover { background: var(--primary-light); }

/* グリッド */
.ek-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.ek-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ek-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* レスポンシブ: スマホ */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .ek-header { padding: .7rem 1rem; flex-wrap: wrap; gap: .8rem; }
  .ek-header .brand { font-size: 1.05rem; }
  .ek-header nav { gap: 1rem; order: 3; width: 100%; overflow-x: auto; }
  .ek-header nav a { font-size: .82rem; white-space: nowrap; }
  .ek-header .user { gap: .6rem; }
  .ek-header .user a, .ek-header .user button { font-size: .75rem; }
  .container, .ek-container { padding: 1rem !important; max-width: 100% !important; }
  .ek-card, .ek-stat, .ek-feature { padding: 1.1rem !important; }
  .ek-stat .value { font-size: 1.8rem; }
  .ek-greeting { font-size: 1.2rem; }
  .ek-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ek-grid-3 { grid-template-columns: 1fr; }
  .modal { padding: 1.2rem !important; width: 95% !important; max-height: 92vh !important; }
  table { font-size: .85rem; }
  th, td { padding: .4rem .5rem !important; }
  .table-wrap { overflow-x: auto; }
  .tabs { overflow-x: auto; flex-wrap: nowrap !important; }
  .tab-btn { white-space: nowrap; font-size: .8rem !important; padding: .4rem .8rem !important; }
}
