/* ===== 採用コア スタイルシート ===== */

/* 基本リセットと共通スタイル */
*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:13px;background:#f8f8f7;color:#1a1a1a;}
.app{max-width:1600px;margin:0 auto;padding:1.5rem;}

/* ログイン */
/* ヘッダー */
.header{display:flex;align-items:center;justify-content:space-between;padding-bottom:1rem;border-bottom:1px solid #e8e8e6;margin-bottom:1.25rem;flex-wrap:wrap;gap:8px;background:#fff;padding:1rem 1.25rem;border-radius:10px;margin-bottom:1rem;box-shadow:0 1px 4px rgba(0,0,0,.04);}
.logo{font-size:17px;font-weight:600;letter-spacing:-.02em;}
.logo span{color:#378ADD;}
.client-badge{font-size:11px;color:#666;background:#f0f0ee;border-radius:20px;padding:3px 10px;}
.nav{display:flex;gap:4px;flex-wrap:wrap;}
.nb{padding:6px 13px;border:1px solid #ddd;border-radius:8px;background:transparent;color:#666;cursor:pointer;font-size:12px;font-family:inherit;transition:all .15s;}
.nb.active{background:#1a1a1a;color:#fff;border-color:#1a1a1a;}
.nb:hover:not(.active){background:#f0f0ee;color:#1a1a1a;}
.nb-logout{padding:6px 13px;border:1px solid #f5d4c5;border-radius:8px;background:#fdf3ef;color:#b04020;cursor:pointer;font-size:12px;font-family:inherit;font-weight:600;display:inline-flex;align-items:center;gap:4px;transition:all .15s;}
.nb-logout::before{content:"↪";font-size:13px;line-height:1;}
.nb-logout:hover{background:#f9e0d4;border-color:#e8b9a3;color:#9a3618;}
.nb-logout:active{transform:scale(.97);}

/* セクション */
.sec{display:none;background:#fff;border-radius:10px;padding:1.25rem;box-shadow:0 1px 4px rgba(0,0,0,.04);}
.sec.active{display:block;}

/* ボタン */
.btn{padding:8px 16px;border-radius:8px;cursor:pointer;font-size:12px;font-family:inherit;font-weight:500;border:none;transition:all .15s;}
.btn-p{background:#1a1a1a;color:#fff;}
.btn-p:hover{background:#333;}
.btn-s{background:transparent;color:#666;border:1px solid #ddd;}
.btn-s:hover{background:#f0f0ee;color:#1a1a1a;}
.btn-sm{padding:4px 9px;font-size:11px;border-radius:6px;cursor:pointer;font-family:inherit;border:1px solid #ddd;background:transparent;color:#666;transition:all .15s;}
.btn-sm:hover{background:#f0f0ee;}
.btn-del{background:transparent;color:#D85A30;border:1px solid #D85A30;border-radius:6px;padding:4px 9px;font-size:11px;cursor:pointer;font-family:inherit;}
.btn-exp{padding:6px 12px;border:1px solid #ddd;border-radius:8px;background:transparent;color:#666;cursor:pointer;font-size:11px;font-family:inherit;}
.btn-exp:hover{background:#f0f0ee;}

/* マルチセレクトフィルター */
.multi-filter{position:relative;display:inline-block;font-family:inherit;}
.mf-trigger{padding:6px 28px 6px 10px;border:1px solid #ddd;border-radius:8px;background:#fafafa;font-size:11px;color:#1a1a1a;cursor:pointer;min-width:130px;max-width:200px;display:inline-block;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.mf-trigger::after{content:"▾";position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:9px;color:#888;}
.mf-trigger.active{border-color:#378ADD;background:#fff;}
.mf-trigger .mf-count{display:inline-block;background:#378ADD;color:#fff;font-size:9px;padding:1px 6px;border-radius:8px;margin-left:4px;font-weight:600;}
.mf-panel{display:none;position:absolute;top:calc(100% + 4px);left:0;background:#fff;border:1px solid #e8e8e6;border-radius:10px;padding:8px;z-index:300;min-width:180px;max-width:260px;max-height:300px;overflow-y:auto;box-shadow:0 4px 16px rgba(0,0,0,.12);}
.mf-panel.open{display:block;}
.mf-panel .mf-actions{display:flex;justify-content:space-between;align-items:center;padding:4px 4px 6px;border-bottom:1px solid #f0f0ee;margin-bottom:6px;}
.mf-panel .mf-actions a{font-size:10px;color:#378ADD;cursor:pointer;text-decoration:none;}
.mf-panel .mf-actions a:hover{text-decoration:underline;}
.mf-panel .mf-group-label{font-size:10px;color:#999;font-weight:600;padding:6px 4px 3px;letter-spacing:.04em;}
.mf-panel label{display:flex;align-items:center;gap:6px;font-size:11px;padding:5px 6px;border-radius:6px;cursor:pointer;color:#1a1a1a;}
.mf-panel label:hover{background:#f5f5f3;}
.mf-panel label input{cursor:pointer;}

/* フォーム */
.fg{display:flex;flex-direction:column;gap:4px;}
.fg label{font-size:11px;color:#666;font-weight:500;}
.req{color:#D85A30;}
.fg input,.fg select,.fg textarea{padding:7px 10px;border:1px solid #ddd;border-radius:8px;background:#fafafa;color:#1a1a1a;font-size:12px;font-family:inherit;transition:border .15s;}
.fg input:focus,.fg select:focus,.fg textarea:focus{outline:none;border-color:#378ADD;background:#fff;}
.fg textarea{min-height:70px;resize:vertical;}
.fgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.full{grid-column:1/-1;}
.fsec{grid-column:1/-1;font-size:10px;font-weight:600;color:#aaa;letter-spacing:.08em;text-transform:uppercase;padding:10px 0 6px;border-bottom:1px solid #f0f0ee;margin-top:6px;}
.dr3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;}

/* 書類エリア */
.doc-area{grid-column:1/-1;border:1px solid #e8e8e6;border-radius:8px;padding:12px;display:flex;flex-direction:column;gap:8px;background:#fafafa;}
.doc-area-title{font-size:11px;color:#666;}
.doc-item{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#fff;border:1px solid #e8e8e6;border-radius:6px;}
.doc-add-row{display:flex;gap:6px;align-items:center;flex-wrap:wrap;}
.doc-add-row input,.doc-add-row select{padding:6px 9px;border:1px solid #ddd;border-radius:6px;background:#fff;color:#1a1a1a;font-size:11px;font-family:inherit;}

/* 一覧 */
.list-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;flex-wrap:wrap;gap:8px;}
.sr-row{display:flex;gap:5px;flex-wrap:wrap;}
.sr-row input,.sr-row select{padding:6px 9px;border:1px solid #ddd;border-radius:8px;background:#fafafa;color:#1a1a1a;font-size:11px;font-family:inherit;}
.tbl-wrap{overflow-x:auto;}
table{width:100%;border-collapse:collapse;font-size:12px;}
th{text-align:left;padding:8px 10px;font-size:10px;font-weight:600;color:#aaa;border-bottom:1px solid #f0f0ee;white-space:nowrap;}
td{padding:8px 10px;border-bottom:1px solid #f8f8f7;vertical-align:middle;}
tr:hover td{background:#fafafa;}
.badge{display:inline-block;padding:2px 8px;border-radius:20px;font-size:10px;font-weight:500;white-space:nowrap;}
.bb{background:#E6F1FB;color:#185FA5;}.bg{background:#EAF3DE;color:#3B6D11;}
.ba{background:#FAEEDA;color:#854F0B;}.br{background:#FCEBEB;color:#A32D2D;}
.bgr{background:#F1EFE8;color:#5F5E5A;}.bt{background:#E1F5EE;color:#0F6E56;}
.bc{background:#FAECE7;color:#993C1D;}

/* 詳細パネル */
.dp{display:none;background:#fff;border:1px solid #e8e8e6;border-radius:10px;padding:1.25rem;margin-top:1rem;box-shadow:0 2px 8px rgba(0,0,0,.06);}
.dp.open{display:block;}
.dp-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid #f0f0ee;}
.dp-hd h3{font-size:15px;font-weight:600;}
.dp-cls{background:none;border:none;cursor:pointer;font-size:18px;color:#aaa;line-height:1;}
.dp-cls:hover{color:#1a1a1a;}
.dp-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px;}
.dp-doc-item{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#fafafa;border-radius:6px;font-size:11px;margin-top:4px;}
.dp-act{display:flex;gap:7px;margin-top:1rem;padding-top:.75rem;border-top:1px solid #f0f0ee;justify-content:flex-end;}

/* 分析 */
.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px;margin-bottom:1.25rem;}
.mc{background:#f8f8f7;border-radius:8px;padding:.875rem;}
.mc-lbl{font-size:10px;color:#888;margin-bottom:3px;}
.mc-val{font-size:22px;font-weight:600;color:#1a1a1a;}
.tab{padding:5px 12px;border:1px solid #ddd;border-radius:8px;background:transparent;color:#666;cursor:pointer;font-size:11px;font-family:inherit;}
.tab.active{background:#f0f0ee;color:#1a1a1a;border-color:#ccc;}
/* マスター管理 */
.mg-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;}
.mg-block h3{font-size:11px;font-weight:600;color:#888;text-transform:uppercase;letter-spacing:.06em;margin-bottom:10px;padding-bottom:6px;border-bottom:1px solid #f0f0ee;}
.mg-list{list-style:none;display:flex;flex-direction:column;gap:5px;margin-bottom:10px;}
.mg-list li{display:flex;justify-content:space-between;align-items:center;padding:5px 9px;background:#f8f8f7;border-radius:6px;font-size:12px;}
.mg-add{display:flex;gap:5px;}
.mg-add input{flex:1;padding:6px 9px;border:1px solid #ddd;border-radius:6px;font-size:12px;font-family:inherit;background:#fafafa;}
.mg-add button{padding:6px 12px;background:#1a1a1a;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:12px;font-family:inherit;}

/* クライアント管理 */
.client-table{width:100%;border-collapse:collapse;font-size:12px;margin-bottom:1rem;}
.client-table th{text-align:left;padding:8px 10px;font-size:10px;font-weight:600;color:#aaa;border-bottom:1px solid #f0f0ee;}
.client-table td{padding:9px 10px;border-bottom:1px solid #f8f8f7;vertical-align:middle;}
.add-client-form{background:#f8f8f7;border-radius:8px;padding:1rem;display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;align-items:end;margin-top:1rem;}
.add-client-form .fg label{font-size:10px;}
.add-client-form input{padding:7px 9px;border:1px solid #ddd;border-radius:6px;font-size:12px;font-family:inherit;background:#fff;width:100%;}

.empty{text-align:center;padding:2.5rem;color:#aaa;font-size:12px;}
.divider{height:1px;background:#f0f0ee;margin:1.25rem 0;}
/* パスワード変更 */
.pw-row{display:flex;gap:7px;flex-wrap:wrap;align-items:center;}
.pw-row input{padding:7px 10px;border:1px solid #ddd;border-radius:8px;font-size:12px;font-family:inherit;background:#fafafa;width:160px;}

/* ステータスバー */
.status-bar{font-size:11px;color:#aaa;padding:6px 0;text-align:right;}
.status-bar.ok{color:#3B6D11;}
.status-bar.err{color:#D85A30;}

/* ログイン画面用アニメーション */
    @keyframes floatChar {
      0%,100%{transform:translateY(0px)}
      50%{transform:translateY(-10px)}
    }
    @keyframes floatLogo {
      0%,100%{transform:translateY(-5px)}
      50%{transform:translateY(5px)}
    }
    @keyframes floatDot {
      0%,100%{transform:translateY(0)}
      50%{transform:translateY(-8px)}
    }

/* ========================================
   新規登録フォーム（2カラム形式）
   ======================================== */
.addform-container {
  max-width: 1080px;
  margin: 0 auto;
}
.addform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #ecefef;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.addform-head h1 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 12px;
}
.addform-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #6ab49a, #5aaa8e);
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(106,180,154,.3);
}
.addform-meta {
  display: flex;
  gap: 18px;
  font-size: 11px;
  color: #888;
  align-items: center;
}
.addform-meta strong { color: #444; font-weight: 600; margin-right: 4px; }

.addform-nav {
  display: flex;
  gap: 4px;
  padding: 0 1.75rem;
  background: #fff;
  border-bottom: 1px solid #ecefef;
  flex-wrap: wrap;
}
.addform-nav a {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  cursor: pointer;
}
.addform-nav a:hover { color: #5aaa8e; }
.addform-nav a.active {
  color: #5aaa8e;
  border-bottom-color: #5aaa8e;
}

.addform-body {
  background: #fff;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}

.afsec { border-top: 1px solid #f0f3f2; }
.afsec:first-of-type { border-top: none; }
.afsec-head {
  padding: 16px 1.75rem 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #fafcfb, #fff);
}
.afsec-marker {
  width: 4px; height: 18px;
  background: linear-gradient(180deg, #6ab49a, #5aaa8e);
  border-radius: 2px;
}
.afsec-head h2 {
  font-size: 13px;
  font-weight: 700;
  color: #2a4a3e;
  letter-spacing: .04em;
  margin: 0;
}
.afsec-body { padding: 4px 0 12px; }

.afrow {
  display: flex;
  align-items: flex-start;
  padding: 12px 1.75rem;
  border-top: 1px solid #f4f6f5;
  transition: background .15s;
  min-height: 56px;
}
.afrow:hover { background: #fafcfb; }
.afrow:first-child { border-top: none; }
.afrow-label {
  flex: 0 0 180px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2a4a3e;
}
.afrow-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.afreq {
  display: inline-flex;
  align-items: center;
  background: #e85a5a;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: .04em;
  line-height: 1.4;
  flex-shrink: 0;
}
.afreq-spacer {
  display: inline-block;
  width: 30px;
  flex-shrink: 0;
}

/* 新規登録フォーム内の入力共通スタイル（既存formとぶつからないようスコープ） */
#sec-add input[type=text], #sec-add input[type=email], #sec-add input[type=tel],
#sec-add input[type=number], #sec-add input[type=date],
#sec-add input[type=datetime-local], #sec-add input[type=url],
#sec-add select {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 12px;
  border: 1.5px solid #e4e8e7;
  border-radius: 8px;
  background: #fafcfb;
  color: #1a1a1a;
  transition: all .15s;
  outline: none;
}
#sec-add input:focus, #sec-add select:focus, #sec-add textarea:focus {
  border-color: #6ab49a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(106,180,154,.12);
}
#sec-add input::placeholder, #sec-add textarea::placeholder { color: #b8bdbb; }

#sec-add select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%23888' d='M2 4l4 4 4-4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.afw-full { width: 100%; flex: 1 1 100%; }
.afw-lg { width: 320px; }
.afw-md { width: 220px; }
.afw-sm { width: 140px; }
.afw-xs { width: 100px; }

.afbd-fields {
  display: flex;
  gap: 8px;
  align-items: center;
}
.afbd-suffix {
  font-size: 12px;
  color: #888;
  margin-left: -4px;
  margin-right: 2px;
}
.afbd-age {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding-left: 16px;
  border-left: 1px solid #e4e8e7;
  font-size: 12px;
  color: #666;
}

.afdoc-area {
  background: #f8faf9;
  border: 1px dashed #c8d6d2;
  border-radius: 10px;
  padding: 14px;
  flex: 1;
  width: 100%;
}
.afdoc-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.afbtn-add {
  background: #5aaa8e;
  color: #fff;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all .15s;
}
.afbtn-add:hover { background: #4d9a7e; transform: translateY(-1px); }

.addform-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 1.75rem;
  border-top: 1px solid #ecefef;
  background: #fafcfb;
  border-radius: 0 0 14px 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.addform-help {
  font-size: 11px;
  color: #888;
}
.addform-actions {
  display: flex;
  gap: 10px;
}

/* ========================================
   ダッシュボード：本日カード
   ======================================== */
.mc-today {
  background: linear-gradient(135deg, #fff8eb, #fff) !important;
  position: relative;
}
.mc-today .badge-today {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #EF9F27;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: .04em;
}

/* ========================================
   一覧画面：求人番号・求人名称・面接日列
   ======================================== */
.list-col-job-no {
  color: #5aaa8e;
  font-weight: 600;
  font-family: Menlo, Consolas, monospace;
  font-size: 11px;
}
.list-col-job-name {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.list-col-empty { color: #ccc; }
.list-col-int {
  color: #888;
  font-size: 11px;
  white-space: nowrap;
}
.list-col-int.has-value {
  color: #185FA5;
  font-weight: 600;
}

/* ========================================
   分析画面：ファネル統一型UI
   ======================================== */

/* セクションラッパー */
.an-section-wrap {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  overflow: hidden;
}
.an-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid #f0f0ee;
  cursor: pointer;
}
.an-section-head:hover { background: #fafafa; }
.an-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
}
.an-section-body {
  padding: 1rem;
}

/* ファネルカード（共通） */
.funnel-card {
  background: #fff;
  border: 1px solid #ecefef;
  border-radius: 10px;
  padding: 12px 14px;
  transition: all .15s;
}
.funnel-card:hover {
  border-color: #c8d6d2;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.funnel-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f3f2;
}
.funnel-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
}
.funnel-card-total {
  font-size: 10px;
  color: #888;
  background: #f5f7f6;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: 600;
}

/* ファネルステップ行 */
.fstep {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 11px;
}
.fstep-label {
  flex: 0 0 70px;
  font-weight: 600;
  color: #444;
  font-size: 10px;
}
.fstep-bar-wrap {
  flex: 1;
  height: 18px;
  background: #f5f7f6;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.fstep-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease;
}
.fstep-stat {
  flex: 0 0 80px;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  align-items: baseline;
  white-space: nowrap;
}
.fstep-num {
  font-weight: 700;
  color: #1a1a1a;
  font-size: 11px;
}
.fstep-pct {
  color: #888;
  font-size: 10px;
}

/* ステップごとの色 */
.fstep[data-step="applied"] .fstep-bar     { background: linear-gradient(90deg, #378ADD, #5DA1E5); }
.fstep[data-step="in_progress"] .fstep-bar { background: linear-gradient(90deg, #EF9F27, #F0B65F); }
.fstep[data-step="interview"] .fstep-bar   { background: linear-gradient(90deg, #9B59B6, #B07DC9); }
.fstep[data-step="hired"] .fstep-bar       { background: linear-gradient(90deg, #639922, #82B842); }
.fstep[data-step="joined"] .fstep-bar      { background: linear-gradient(90deg, #1D9E75, #5DCAA5); }
.fstep[data-step="resigned"] .fstep-bar    { background: linear-gradient(90deg, #95A5A6, #BDC3C7); opacity: .7; }
.fstep[data-step="other"] .fstep-bar       { background: linear-gradient(90deg, #888, #aaa); opacity: .7; }

.fstep-divider {
  height: 1px;
  background: #f0f3f2;
  margin: 6px 0 4px;
  position: relative;
}
.fstep-divider::after {
  content: '参考';
  position: absolute;
  right: 0;
  top: -8px;
  background: #fff;
  padding: 0 6px;
  font-size: 9px;
  color: #aaa;
  font-weight: 600;
}
.fstep[data-ref="true"] {
  opacity: .65;
}

/* グリッド：単一軸 */
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

/* === ネスト型カード === */
.nest-card {
  background: #fff;
  border: 1px solid #ecefef;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.nest-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid #f0f3f2;
  flex-wrap: wrap;
  gap: 8px;
}
.nest-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #2a4a3e;
}
.nest-card-summary {
  display: flex;
  gap: 10px;
  font-size: 10px;
  color: #666;
}
.nest-card-summary span strong {
  color: #1a1a1a;
  font-size: 12px;
  margin-right: 2px;
}

.nest-parent {
  background: #fafcfb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-left: 3px solid #5aaa8e;
}
.nest-parent-label {
  font-size: 10px;
  color: #5aaa8e;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: .04em;
}

.nest-children-label {
  font-size: 10px;
  color: #888;
  font-weight: 600;
  margin: 10px 0 6px;
  letter-spacing: .04em;
}
.nest-children {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}
.nest-child {
  background: #fafcfb;
  border: 1px solid #f0f3f2;
  border-radius: 8px;
  padding: 8px 10px;
}
.nest-child-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid #ecefef;
}
.nest-child-title {
  font-size: 11px;
  font-weight: 700;
  color: #444;
}
.nest-child-total {
  font-size: 10px;
  color: #888;
  font-weight: 600;
}
.nest-child .fstep {
  padding: 3px 0;
  font-size: 10px;
}
.nest-child .fstep-label {
  flex: 0 0 60px;
  font-size: 9px;
}
.nest-child .fstep-bar-wrap {
  height: 12px;
}
.nest-child .fstep-stat {
  flex: 0 0 70px;
}
.nest-child .fstep-num { font-size: 10px; }
.nest-child .fstep-pct { font-size: 9px; }

/* 3軸：孫（1行ミニバー） */
.nest-grandchildren-label {
  font-size: 9px;
  color: #aaa;
  font-weight: 600;
  margin: 6px 0 3px;
  padding-left: 4px;
  letter-spacing: .04em;
}
.nest-grandchildren {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 6px;
  border-left: 2px solid #f0f3f2;
}
.nest-grandchild {
  background: #fff;
  border: 1px solid #f5f7f6;
  border-radius: 5px;
  padding: 5px 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
}
.nest-gc-title {
  flex: 0 0 70px;
  font-size: 9px;
  font-weight: 700;
  color: #666;
}
.nest-gc-mini {
  flex: 1;
  display: flex;
  gap: 5px;
  align-items: center;
}
.gc-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
}
.gc-bar-wrap {
  flex: 1;
  height: 5px;
  background: #f0f3f2;
  border-radius: 2px;
  overflow: hidden;
  min-width: 16px;
}
.gc-bar { height: 100%; border-radius: 2px; }
.gc-step[data-step="applied"] .gc-bar     { background: #378ADD; }
.gc-step[data-step="in_progress"] .gc-bar { background: #EF9F27; }
.gc-step[data-step="interview"] .gc-bar   { background: #9B59B6; }
.gc-step[data-step="hired"] .gc-bar       { background: #639922; }
.gc-step[data-step="joined"] .gc-bar      { background: #1D9E75; }
.gc-num {
  font-weight: 700;
  color: #1a1a1a;
  min-width: 16px;
  text-align: right;
  font-size: 9px;
}

/* ========================================
   比較ビュー（テーブル + ピックアップ詳細）
   ======================================== */

/* ビュー切り替えトグル */
.view-toggle {
  display: inline-flex;
  border: 1.5px solid #e4e8e7;
  border-radius: 8px;
  overflow: hidden;
  background: #fafcfb;
}
.view-toggle button {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.view-toggle button.active {
  background: #5aaa8e;
  color: #fff;
}
.view-toggle button:hover:not(.active) {
  background: #f5f7f6;
  color: #5aaa8e;
}

/* 比較テーブル */
.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid #ecefef;
  border-radius: 10px;
  background: #fff;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px;
}
.compare-table thead th {
  background: linear-gradient(180deg, #fafcfb, #f5f7f6);
  color: #2a4a3e;
  font-weight: 700;
  padding: 9px 10px;
  text-align: center;
  font-size: 11px;
  border-bottom: 2px solid #e4e8e7;
  white-space: nowrap;
}
.compare-table thead th.col-name { text-align: left; }
.compare-table thead th.col-step { font-size: 10px; }
.compare-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid #f0f3f2;
  text-align: center;
  vertical-align: middle;
}
.compare-table tbody tr:hover {
  background: #fafcfb;
}
.compare-table tbody tr.selected {
  background: #f0faf6;
}
.compare-table tbody td.cell-checkbox {
  width: 36px;
  padding: 0 0 0 12px;
}
.compare-table tbody td.cell-name {
  text-align: left;
  font-weight: 700;
  color: #1a1a1a;
}
.compare-table tbody td.cell-name .badge-rank {
  display: inline-block;
  background: #f5f7f6;
  color: #888;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 6px;
  font-weight: 600;
}
.compare-table tbody td.cell-applied {
  font-weight: 700;
  color: #1a1a1a;
}
.compare-table tbody td.cell-step {
  font-size: 11px;
}
.compare-table tbody td.cell-step .num {
  font-weight: 700;
  color: #1a1a1a;
}
.compare-table tbody td.cell-step .pct {
  color: #888;
  font-size: 10px;
  margin-left: 3px;
}
/* ヒートマップ色付け */
.compare-table tbody td.heat-good {
  background: linear-gradient(180deg, transparent, rgba(99,153,34,.08));
  position: relative;
}
.compare-table tbody td.heat-good::after {
  content: '';
  position: absolute;
  left: 4px; top: 6px;
  width: 4px; height: 4px;
  background: #639922;
  border-radius: 50%;
}
.compare-table tbody td.heat-bad {
  background: linear-gradient(180deg, transparent, rgba(216,90,48,.08));
  position: relative;
}
.compare-table tbody td.heat-bad::after {
  content: '';
  position: absolute;
  left: 4px; top: 6px;
  width: 4px; height: 4px;
  background: #D85A30;
  border-radius: 50%;
}
.compare-table tfoot td {
  background: #f5f7f6;
  font-weight: 700;
  color: #444;
  padding: 9px 10px;
  text-align: center;
  font-size: 11px;
  border-top: 2px solid #e4e8e7;
}
.compare-table tfoot td.cell-name {
  text-align: left;
  font-size: 12px;
}
input.row-check {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: #5aaa8e;
}

/* 比較アクションバー */
.compare-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 1px solid #f0f3f2;
  flex-wrap: wrap;
  gap: 8px;
}
.compare-action-info {
  font-size: 11px;
  color: #888;
}
.compare-action-info strong {
  color: #5aaa8e;
  font-weight: 700;
}
.compare-action-btn {
  background: linear-gradient(135deg, #6ab49a, #5aaa8e);
  color: #fff;
  border: none;
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.compare-action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(106,180,154,.4);
}
.compare-action-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.compare-legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: #888;
  align-items: center;
}
.compare-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.compare-legend .legend-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* ピックアップ詳細 */
.pickup-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px dashed #e4e8e7;
}
.pickup-details-head {
  font-size: 12px;
  font-weight: 700;
  color: #2a4a3e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pickup-details-head .check-icon {
  color: #5aaa8e;
  font-weight: 700;
}
.pickup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

/* ========================================
   担当者バッジ用パレット
   ======================================== */
/* LinkCore = 青(.bb)、クライアント = オレンジ(.ba) は既存利用 */
/* 5色パレット（名前ハッシュで自動割り当て） */
.bo1 { background:#EFE6F8; color:#5C3B89; } /* 紫 */
.bo2 { background:#E0F2EA; color:#1F6B3E; } /* 緑 */
.bo3 { background:#FCECDC; color:#8C4A14; } /* 黄土 */
.bo4 { background:#E1EFF7; color:#1E5C7A; } /* 青緑 */
.bo5 { background:#F8E1E8; color:#8C2854; } /* ピンク */

/* 担当者にクライアント名を付記する場合の小さなサブテキスト */
.owner-suffix {
  font-size: 9px;
  color: #999;
  font-weight: 500;
  margin-left: 3px;
}

/* ========================================
   Phase E/F：詳細絞り込みパネル スライドイン
   ======================================== */
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* アクティブフィルタチップ */
.fchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 9px;
  background: #EEEDFE;
  color: #3C3489;
  border-radius: 11px;
  font-weight: 500;
}
.fchip-x {
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0 2px;
  user-select: none;
}
.fchip-clear {
  font-size: 11px;
  color: #888;
  cursor: pointer;
  text-decoration: underline;
  padding: 3px 6px;
}

/* === 期間フィルタタブ（ダッシュボード） === */
.dash-period-tab:hover {
  background: rgba(255, 255, 255, 0.6) !important;
  color: #1a1a1a !important;
}
.dash-period-tab.active:hover {
  background: #fff !important;
}

/* スケジュールKPIカードの i ボタン＋ツールチップ */
.sch-info-btn{position:relative;}
.sch-info-btn:hover{filter:brightness(0.92);transform:scale(1.05);}
.sch-info-btn::after{
  content:attr(data-tip);
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  background:#1a1a1a;
  color:#fff;
  font-size:10.5px;
  font-weight:500;
  line-height:1.6;
  padding:8px 11px;
  border-radius:6px;
  white-space:pre-line;
  text-align:left;
  min-width:180px;
  max-width:240px;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
  opacity:0;
  visibility:hidden;
  transition:opacity .15s ease,visibility 0s linear .15s;
  pointer-events:none;
  z-index:200;
}
.sch-info-btn::before{
  content:"";
  position:absolute;
  top:100%;
  right:5px;
  border:5px solid transparent;
  border-bottom-color:#1a1a1a;
  opacity:0;
  visibility:hidden;
  transition:opacity .15s ease,visibility 0s linear .15s;
  z-index:201;
}
.sch-info-btn:hover::after,
.sch-info-btn:hover::before{
  opacity:1;
  visibility:visible;
  transition:opacity .15s ease;
}

/* 平均リードタイム：レスポンシブ */
@media (max-width: 720px) {
  #anLeadTime { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 420px) {
  #anLeadTime { grid-template-columns: 1fr !important; }
}

/* リードタイムカードのiボタン（スケジュールと別系統で動作） */
.lt-info-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:16px;height:16px;
  background:rgba(106,180,154,.18);color:#3B6D11;
  border-radius:50%;font-size:10px;font-weight:600;
  cursor:help;line-height:1;font-family:inherit;
  position:relative;
}
.lt-info-btn:hover{filter:brightness(.92);}
.lt-info-btn::after{
  content:attr(data-tip);
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  background:#1a1a1a;color:#fff;
  font-size:10.5px;font-weight:500;line-height:1.6;
  padding:8px 11px;border-radius:6px;
  white-space:pre-line;text-align:left;
  min-width:200px;max-width:280px;
  box-shadow:0 4px 14px rgba(0,0,0,.18);
  opacity:0;visibility:hidden;
  transition:opacity .15s ease,visibility 0s linear .15s;
  pointer-events:none;z-index:200;
}
.lt-info-btn:hover::after{opacity:1;visibility:visible;transition:opacity .15s ease;}

/* 予算管理：ヒーローKPI */
.mc.bk-hero{padding:14px 16px;}
.mc.bk-hero .mc-lbl{font-size:11px;font-weight:600;}
.mc.bk-hero .mc-val{font-size:24px;font-weight:700;color:#1a1a1a;line-height:1.1;margin-top:3px;}
.mc.bk-hero .mc-sub{font-size:9.5px;margin-top:3px;}
.bk-spark{display:block;}

/* マスター管理：左タブ式UI */
.mm-shell{display:grid;grid-template-columns:180px 1fr;gap:16px;background:transparent;}
.mm-side{display:flex;flex-direction:column;gap:3px;background:#f8f8f7;border-radius:10px;padding:8px;}
.mm-side-btn{display:flex;align-items:center;gap:8px;padding:8px 10px;border:none;background:transparent;border-radius:7px;cursor:pointer;font-family:inherit;font-size:12px;color:#666;text-align:left;width:100%;transition:all .12s;}
.mm-side-btn:hover{background:#fff;color:#1a1a1a;}
.mm-side-btn.active{background:#1a1a1a;color:#fff;font-weight:600;}
.mm-side-icon{font-size:14px;line-height:1;width:18px;flex-shrink:0;text-align:center;}
.mm-side-label{flex:1;}
.mm-side-count{background:rgba(255,255,255,.18);color:inherit;font-size:9.5px;font-weight:600;padding:1px 6px;border-radius:9px;min-width:18px;text-align:center;}
.mm-side-btn:not(.active) .mm-side-count{background:#e8e8e6;color:#888;}
.mm-side-divider{height:1px;background:#e0e0de;margin:6px 4px;}

/* マスター管理：メインペイン */
.mm-main{background:#fff;border-radius:10px;padding:1rem 1.25rem;box-shadow:0 1px 4px rgba(0,0,0,.04);min-height:300px;}
.mm-pane-header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px;flex-wrap:wrap;}
.mm-pane-header h3{font-size:14px;font-weight:600;margin:0;color:#1a1a1a;}
.mm-search{padding:6px 10px;border:1px solid #ddd;border-radius:7px;font-size:11.5px;font-family:inherit;background:#fafafa;width:160px;outline:none;}
.mm-search:focus{border-color:#6ab49a;background:#fff;}

/* マスター管理：項目リスト */
.mm-list{list-style:none;display:flex;flex-direction:column;gap:5px;margin:0 0 12px 0;padding:0;}
.mm-item{display:flex;align-items:center;gap:8px;padding:8px 12px;background:#fafafa;border:1px solid #f0f0ee;border-radius:7px;font-size:12px;transition:background .12s;}
.mm-item:hover{background:#fff;border-color:#e0e0de;}
.mm-item.dragging{opacity:.4;}
.mm-item.drop-target{border-top:2px solid #6ab49a;}
.mm-handle{color:#ccc;cursor:grab;font-size:14px;line-height:1;user-select:none;}
.mm-handle:hover{color:#888;}
.mm-name{flex:1;color:#1a1a1a;cursor:text;padding:2px 4px;border-radius:3px;}
.mm-name:hover{background:#f0f0ee;}
.mm-name-input{flex:1;border:1px solid #6ab49a;background:#fff;padding:1px 4px;border-radius:3px;font-family:inherit;font-size:12px;outline:none;color:#1a1a1a;}
.mm-usage{font-size:9.5px;color:#888;font-weight:500;}
.mm-usage.zero{color:#993C1D;background:#fdf3ef;border:0.5px solid #f5d4c5;border-radius:9px;padding:1px 7px;}
.mm-usage.has{color:#3B6D11;background:#eaf3de;border:0.5px solid #c0dd97;border-radius:9px;padding:1px 7px;}
.mm-del{background:transparent;border:none;color:#D85A30;cursor:pointer;font-size:13px;padding:2px 4px;line-height:1;opacity:.5;transition:opacity .12s;}
.mm-del:hover{opacity:1;}

.mm-add{display:flex;gap:6px;}
.mm-add input{flex:1;padding:7px 10px;border:1px solid #ddd;border-radius:7px;font-size:12px;font-family:inherit;background:#fafafa;outline:none;}
.mm-add input:focus{border-color:#6ab49a;background:#fff;}
.mm-add button{padding:7px 14px;background:#1a1a1a;color:#fff;border:none;border-radius:7px;cursor:pointer;font-size:12px;font-family:inherit;font-weight:500;}
.mm-add button:hover{background:#333;}

.mm-empty{padding:14px;text-align:center;color:#aaa;font-size:11.5px;font-style:italic;background:#fafafa;border-radius:7px;}

/* スマホ対応 */
@media (max-width: 720px) {
  .mm-shell{grid-template-columns:1fr;}
  .mm-side{flex-direction:row;overflow-x:auto;gap:4px;padding:6px;}
  .mm-side-divider{display:none;}
  .mm-side-btn{flex-shrink:0;padding:6px 10px;font-size:11px;}
  .mm-side-label{display:none;}
}

/* ============================================
 * AIペースト機能スタイル（2026/05/05追加）
 * ============================================ */

/* ペースト枠 */
.paste-box {
  background: #fff;
  border: 0.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color .15s ease;
}
.paste-box:hover { border-color: #AFA9EC; }
.paste-box.empty { border-style: dashed; border-color: #d0d0ce; }
.paste-box-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.paste-box-num {
  background: #534AB7;
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.paste-box-num.empty { background: #aaa; }
.paste-box-label {
  font-size: 11px;
  color: #666;
}
.paste-box-remove {
  margin-left: auto;
  padding: 2px 8px;
  background: transparent;
  border: none;
  font-size: 11px;
  color: #993C1D;
  cursor: pointer;
  font-family: inherit;
}
.paste-box-remove:hover { text-decoration: underline; }
.paste-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 0.5px solid #e0e0e0;
  border-radius: 6px;
  font-family: Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  box-sizing: border-box;
  background: #fafafa;
  resize: vertical;
  outline: none;
}
.paste-textarea:focus { border-color: #534AB7; background: #fff; }

/* 解析結果カード */
.parse-card {
  background: #f3faf0;
  border: 0.5px solid #5aaa8e;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.parse-card.has-error { background: #fdf3ef; border-color: #D85A30; }
.parse-card.excluded { background: #f8f8f7; border-color: #ccc; opacity: 0.6; }
.parse-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.parse-card-num {
  font-size: 11px;
  color: #0F6E56;
  background: #E1F5EE;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.parse-card.has-error .parse-card-num {
  color: #993C1D;
  background: #FAECE7;
}
.parse-card-name {
  font-size: 13px;
  font-weight: 600;
}
.parse-card-kana {
  font-size: 10px;
  color: #aaa;
}
.parse-card-stat {
  margin-left: auto;
  font-size: 10px;
  color: #666;
}
.parse-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 11px;
}
@media (max-width: 720px) {
  .parse-fields { grid-template-columns: 1fr; }
}
.parse-field {
  background: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.parse-field-label {
  color: #888;
  font-size: 10px;
  white-space: nowrap;
}
.parse-field-value {
  flex: 1;
  font-size: 11px;
}
.parse-field-input {
  flex: 1;
  border: 0.5px solid #ddd;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 11px;
  font-family: inherit;
  outline: none;
  background: #fff;
}
.parse-field-input:focus { border-color: #5aaa8e; }
.parse-field.tag-mapped { background: #EAF3DE; }
.parse-field.tag-fixed { background: #FAEEDA; }
.parse-field.tag-koala { background: #EEEDFE; }
.parse-card-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
}
.parse-card-btn {
  padding: 4px 10px;
  background: #fff;
  border: 0.5px solid #e0e0e0;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
}
.parse-card-btn.danger { color: #993C1D; border-color: #f5c6b5; }
.parse-card-btn:hover { background: #f8f8f7; }

/* テンプレ編集モーダル */
.te-mapping-row {
  display: grid;
  grid-template-columns: 70px 1fr 18px 1fr 24px;
  gap: 4px;
  align-items: center;
  background: #f8f8f7;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
}
.te-mapping-row.kind-extract { background: #FBEAF0; }
.te-mapping-row.kind-split { background: #EAF3DE; }
.te-mapping-row.kind-fixed { background: #fff; border: 0.5px dashed #d0d0ce; }
.te-mapping-row.kind-auto { background: #fff; border: 0.5px dashed #d0d0ce; }

.te-kind-badge {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
}
.te-kind-badge.extract { background: #fff; color: #993556; }
.te-kind-badge.split { background: #fff; color: #3B6D11; }
.te-kind-badge.fixed { background: #534AB7; color: #fff; }
.te-kind-badge.auto { background: #888; color: #fff; }

.te-config-input {
  font-size: 11px;
  padding: 4px 6px;
  border: 0.5px solid #e0e0e0;
  border-radius: 3px;
  font-family: Menlo, Consolas, monospace;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.te-config-input:focus { border-color: #534AB7; }

.te-target-select {
  font-size: 11px;
  padding: 4px 6px;
  border: 0.5px solid #e0e0e0;
  border-radius: 3px;
  font-family: inherit;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}

.te-arrow {
  text-align: center;
  color: #888;
  font-size: 11px;
}

.te-row-del {
  background: transparent;
  border: none;
  color: #993C1D;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  line-height: 1;
}
.te-row-del:hover { opacity: 0.7; }

/* ============================================
 * 応募者一覧テーブル レイアウト修正（2026/05/05追加）
 * 求人名称が長文でも他列が縦書きにならないようにする
 * ============================================ */

/* セクションをスコープにして、応募者一覧のテーブルだけを対象 */
#sec-list .tbl-wrap table {
  table-layout: auto;
}

/* 全セルを基本1行で固定（縦書き化を防ぐ） */
#sec-list .tbl-wrap th,
#sec-list .tbl-wrap td {
  white-space: nowrap;
  vertical-align: middle;
}

/* 求人名称セルだけ：省略表示＋ホバー全文 */
/* 5列目：求人名称（th/td どちらにも適用） */
#sec-list .tbl-wrap thead tr th:nth-child(5),
#sec-list .tbl-wrap tbody tr td:nth-child(5) {
  max-width: 240px;
  min-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 部署セルも長めの社名や部署名で崩れないようにmin-width設定 */
#sec-list .tbl-wrap thead tr th:nth-child(7),
#sec-list .tbl-wrap tbody tr td:nth-child(7) {
  min-width: 90px;
}

/* 横スクロールが必要になったときに、ヘッダーとボディが揃うように */
#sec-list .tbl-wrap {
  overflow-x: auto;
}

/* 詳細パネル展開行は別構造なので影響を受けないようガード */
#sec-list .tbl-wrap td.dp-row,
#sec-list .tbl-wrap tr.dp-row td {
  white-space: normal;
}

/* ============================================
 * 応募者一覧 横幅最大化＋列幅最適化（2026/05/06）
 * ============================================ */

/* 応募者一覧の幅は .app の1600px統一に追従（個別指定は不要） */

/* テーブルのフォントを少しコンパクトに */
#sec-list .tbl-wrap {
  overflow-x: auto;
}
#sec-list .tbl-wrap table {
  font-size: 11px;
  table-layout: auto;
}
#sec-list .tbl-wrap th,
#sec-list .tbl-wrap td {
  padding: 6px 8px;
  white-space: nowrap;
  vertical-align: middle;
}

/* 求人名称セル（5列目）：省略＋ホバー全文 */
#sec-list .tbl-wrap thead tr th:nth-child(5),
#sec-list .tbl-wrap tbody tr td:nth-child(5) {
  max-width: 220px;
  min-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 職種列（6列目）：省略＋ホバー全文（求人名称と同じ220px） */
#sec-list .tbl-wrap thead tr th:nth-child(6),
#sec-list .tbl-wrap tbody tr td:nth-child(6) {
  max-width: 220px;
  min-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 部署列（7列目）：省略 */
#sec-list .tbl-wrap thead tr th:nth-child(7),
#sec-list .tbl-wrap tbody tr td:nth-child(7) {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* メール列（8列目）：適度な幅で省略＋クリック可能 */
#sec-list .tbl-wrap thead tr th:nth-child(8),
#sec-list .tbl-wrap tbody tr td:nth-child(8) {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#sec-list .tbl-wrap td.list-col-email a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* メモ列（13列目）：省略＋ホバー全文 */
#sec-list .tbl-wrap thead tr th:nth-child(13),
#sec-list .tbl-wrap tbody tr td:nth-child(13) {
  max-width: 240px;
  min-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #666;
}
#sec-list .tbl-wrap td.list-col-memo {
  font-size: 10.5px;
  font-style: italic;
}

/* 名前列（3列目）：適度な幅 */
#sec-list .tbl-wrap thead tr th:nth-child(3),
#sec-list .tbl-wrap tbody tr td:nth-child(3) {
  max-width: 160px;
}

/* 詳細パネル展開行は別 */
#sec-list .tbl-wrap td.dp-row,
#sec-list .tbl-wrap tr.dp-row td {
  white-space: normal;
}

/* ============================================
 * 1600px統一に伴うフォーム系の中央寄せ調整
 * 入力欄が画面いっぱいに広がるのを防ぐ
 * ============================================ */

/* 新規登録フォーム：中央寄せ＋最大幅900px */
#sec-add > .af-form,
#sec-add .af-grid,
#sec-add-paste #pasteStep1,
#sec-add-paste #pasteStep2,
#sec-add-choice > div {
  /* 内側の余白は維持して、中身は読みやすい幅に絞る */
}

#sec-add {
  max-width: 1100px;
  margin: 0 auto;
}

#sec-add-choice {
  max-width: 1100px;
  margin: 0 auto;
}

#sec-add-paste {
  max-width: 1100px;
  margin: 0 auto;
}

#sec-import {
  max-width: 1100px;
  margin: 0 auto;
}

/* 議事録・タスクのフォーム部分も読みやすい幅に */
#sec-minutes .new-min-form,
#sec-tasks .new-task-form {
  max-width: 900px;
}

/* レスポンシブ */
@media (max-width: 1700px) {
  .app {
    max-width: 100%;
    padding: 1rem;
  }
}

/* ============================================
 * チップ式選択UI（2026/05/06追加）
 * 性別・職種・部署のボタン横並び選択
 * ============================================ */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.chip-btn {
  padding: 6px 14px;
  background: #fff;
  color: #444;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 400;
  transition: all .12s ease;
  white-space: nowrap;
  line-height: 1.3;
}
.chip-btn:hover {
  background: #f3faf0;
  border-color: #5aaa8e;
  color: #3B6D11;
}
.chip-btn.selected {
  background: #5aaa8e;
  color: #fff;
  border-color: #5aaa8e;
  font-weight: 500;
}
.chip-btn.selected::before {
  content: '✓ ';
  font-size: 11px;
}
.chip-btn.selected:hover {
  background: #4a9881;
  border-color: #4a9881;
  color: #fff;
}

/* ============================================================
 * スマホ対応 レベル1（2026/05/06追加）
 * 目標：375px〜414px のスマホで「最低限見れる・使える」
 * ============================================================ */

@media (max-width: 768px) {

  /* === ベース設定 === */
  body {
    font-size: 13px;
  }
  .app {
    padding: 0.75rem !important;
  }

  /* === ヘッダー：ロゴ＋クライアント名＋担当 === */
  .app > div:first-child,
  .app > section:first-child {
    /* ヘッダーコンテナ：折り返しを許容 */
  }

  /* ロゴ・採用コアタイトル列を縦積み風に */
  .app .nb,
  .app button.nb {
    /* ナビボタン：折り返し対応はFlexbox側に頼る */
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

  /* === ナビゲーション：折り返し === */
  /* ナビが横並びの場合、画面に収まるよう折り返し */
  .app > div:has(button.nb),
  .app .nav-row,
  .nav-area {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  /* === セクションのパディング縮小 === */
  .sec {
    padding: 0.875rem !important;
  }

  /* === ダッシュボード KPI === */
  /* 大きいKPIカード（本日の応募/面接）：縦積み */
  #sec-dashboard > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  /* 期間連動KPI（今月の応募数・対応中など6つ）：2列に */
  #sec-dashboard div[style*="grid-template-columns:repeat(6"],
  #sec-dashboard div[style*="grid-template-columns: repeat(6"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  /* 5月の応募数〜入社数（5カード）：2列 */
  #sec-dashboard div[style*="grid-template-columns:repeat(5"],
  #sec-dashboard div[style*="grid-template-columns: repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  /* 媒体別ランキング・平均選考日数・ステータス滞留 */
  #sec-dashboard div[style*="grid-template-columns:repeat(3"],
  #sec-dashboard div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* コアラ画像（右下吹き出し）はスマホでは小さく */
  [id^="char_sec-"] img {
    width: 44px !important;
    height: 44px !important;
  }
  [id^="char_sec-"] {
    bottom: 12px !important;
    right: 12px !important;
  }

  /* === スケジュール：3カードを縦積み === */
  #sec-schedule > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* === 応募者一覧 === */
  /* 検索バー周辺の上部コントロールを折り返し */
  #sec-list > div:first-child {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  /* 詳細絞り込みメニュー */
  .mf-trigger {
    max-width: 100% !important;
  }
  /* テーブル：font-sizeをさらに小さく＋PCと同じ横スクロール許容 */
  #sec-list .tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #sec-list .tbl-wrap table {
    font-size: 10.5px !important;
  }
  #sec-list .tbl-wrap th,
  #sec-list .tbl-wrap td {
    padding: 5px 6px !important;
  }

  /* === 新規登録フォーム === */
  /* afrow（ラベル横並び→縦積み） */
  .afrow {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
  }
  .afrow-label {
    width: 100% !important;
    min-width: auto !important;
    font-size: 12px !important;
  }
  .afrow-input {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .afrow-input input,
  .afrow-input select,
  .afrow-input textarea {
    width: 100% !important;
    max-width: 100% !important;
  }
  .afw-md, .afw-lg, .afw-full, .afw-xs, .afw-sm {
    width: 100% !important;
    max-width: 100% !important;
  }
  .afbd-fields {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .afsec {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  /* チップグループ：折り返し（既存wrapあり、念のため） */
  .chip-group {
    gap: 4px !important;
  }
  .chip-btn {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }

  /* タブ（基本情報・個人情報など） */
  .af-tabs {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .af-tab {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }

  /* 登録ボタン・クリアボタン */
  .af-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .af-actions button {
    width: 100% !important;
  }

  /* === モーダル全般 === */
  /* 編集モーダル / メール作成 / テンプレ編集 / AIペースト確認 etc */
  div[style*="position:fixed"][style*="inset:0"] > div,
  .modal-content {
    max-width: 100% !important;
    max-height: 95vh !important;
    margin: 0 !important;
    border-radius: 10px !important;
  }
  /* モーダル内ヘッダーも折り返し */
  div[style*="position:fixed"][style*="inset:0"] .modal-header {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* === メール作成モーダル === */
  #emailComposerModal > div {
    max-width: 100% !important;
  }
  #emailComposerModal input,
  #emailComposerModal textarea,
  #emailComposerModal select {
    font-size: 13px !important;  /* iOSでズームされない最小サイズ */
  }

  /* === テンプレ編集モーダル === */
  #emailTemplateEditorModal > div,
  #templateEditorModal > div {
    max-width: 100% !important;
  }
  /* テンプレ編集モーダルの2カラム → 1カラム */
  #templateEditorModal div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* === AIペースト関連 === */
  /* ペースト枠 */
  .paste-box {
    padding: 10px !important;
  }
  .paste-textarea {
    font-size: 12px !important;
  }
  /* 解析結果カード：2列フィールド→1列 */
  .parse-fields {
    grid-template-columns: 1fr !important;
  }
  /* 登録方法選択：2カラム→1カラム */
  #sec-add-choice div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* === マスター管理：サイドナビ＋ペイン → 縦積み === */
  #sec-master > section > div[style*="grid-template-columns"],
  #sec-master section div[style*="display:grid"][style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  .mm-side {
    width: 100% !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    border-right: none !important;
    border-bottom: 0.5px solid #e0e0e0;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }
  .mm-side-btn {
    width: auto !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
  }

  /* === 分析・予算管理 === */
  #sec-analytics div[style*="grid-template-columns"],
  #sec-budget div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  /* グラフ系SVG/canvasは横スクロール許容 */
  #sec-analytics .chart-wrap,
  #sec-budget .chart-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* === 議事録・タスク === */
  #sec-minutes .new-min-form,
  #sec-tasks .new-task-form,
  #sec-minutes form,
  #sec-tasks form {
    max-width: 100% !important;
  }

  /* === 全般：iOSのズーム防止（input/textareaは13px以上） === */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  input[type="password"],
  textarea,
  select {
    font-size: 13px !important;
  }

  /* タップターゲット最低40px確保 */
  button:not(.chip-btn):not(.te-row-del):not(.parse-card-btn) {
    min-height: 36px;
  }

  /* スクロールバー隠す */
  .tbl-wrap::-webkit-scrollbar {
    height: 6px;
  }
  .tbl-wrap::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
  }
}

/* === さらに小さい画面（〜375px）向けの追加調整 === */
@media (max-width: 380px) {
  .app {
    padding: 0.5rem !important;
  }
  .sec {
    padding: 0.625rem !important;
  }
  /* ナビボタンをさらに小さく */
  .app .nb {
    font-size: 10px !important;
    padding: 5px 8px !important;
  }
  /* タイトル・見出し */
  h1 { font-size: 16px !important; }
  h2 { font-size: 14px !important; }
  h3 { font-size: 13px !important; }
}
