* { box-sizing: border-box; }
:root {
  --bg: #f4f6f9; --panel: #fff; --line: #e2e6ee; --ink: #1c2430;
  --muted: #6b7688; --brand: #2563eb; --brand-d: #1d4ed8;
  --good: #0d9488; --best: #059669; --bad: #d97706; --danger: #dc2626;
}
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #0f1b33; color: #fff; padding: 10px 20px;
}
.brand { font-size: 18px; font-weight: 700; }
.ver { font-size: 11px; background: var(--brand); padding: 2px 7px; border-radius: 10px; margin-left: 6px; }
.who select { padding: 5px 8px; border-radius: 6px; border: none; }
.who label { color: #cfd7e6; font-size: 12px; }

.tabs { display: flex; gap: 2px; background: #1a2947; padding: 0 12px; flex-wrap: wrap; }
.tabs button {
  background: transparent; color: #b9c4da; border: none; padding: 11px 16px;
  cursor: pointer; font-size: 14px; border-bottom: 3px solid transparent;
}
.tabs button:hover { color: #fff; }
.tabs button.active { color: #fff; border-bottom-color: var(--brand); font-weight: 700; }

main { padding: 18px; max-width: 1280px; margin: 0 auto; }
.tab-panel.hidden, .hidden { display: none; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 16px;
}
.panel h3 { margin: 0 0 12px; font-size: 15px; }
.panel h4 { margin: 16px 0 6px; font-size: 13px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px){ .grid2 { grid-template-columns: 1fr; } }

.cards { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px){ .cards { grid-template-columns: repeat(2,1fr); } }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px;
}
.card .num { font-size: 28px; font-weight: 800; color: var(--brand); }
.card .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card.accent .num { color: var(--best); }

button.primary { background: var(--brand); color: #fff; border: none; padding: 9px 16px;
  border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
button.primary:hover { background: var(--brand-d); }
button.primary.big { width: 100%; padding: 13px; font-size: 15px; margin-top: 6px; }
button.mini { font-size: 11px; padding: 3px 8px; border: 1px solid var(--line);
  background: #fff; border-radius: 6px; cursor: pointer; color: var(--brand); }

.note { color: var(--muted); font-size: 12px; }
.tag, .ai-tag { font-size: 10px; background: #eef2ff; color: var(--brand); padding: 2px 6px;
  border-radius: 8px; margin-left: 4px; }
.ai-tag { background: #ecfdf5; color: var(--best); }

/* 架電画面 */
.call-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.call-toolbar select { padding: 7px; border-radius: 7px; border: 1px solid var(--line); }
.grid-call { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; }
@media (max-width: 1100px){ .grid-call { grid-template-columns: 1fr; } }

.target-card .target-head { display: flex; align-items: center; gap: 10px; }
.target-card h2 { margin: 0; font-size: 22px; }
.kana { font-size: 11px; color: var(--muted); min-height: 14px; }
.phone-big { font-size: 26px; font-weight: 800; color: var(--brand); letter-spacing: 1px; margin: 4px 0; }
.t-meta { color: var(--muted); margin: 3px 0; }
/* 住所: 読み上げしやすいよう大きく太字で表示 + ふりがな */
.addr-kana { font-size: 13px; color: var(--muted); margin-top: 8px; }
.addr-big { font-size: 20px; font-weight: 800; line-height: 1.5; margin: 2px 0 6px; }
.map-links { display: flex; gap: 10px; margin: 4px 0 10px; }
.map-links a { font-size: 13px; font-weight: 600; text-decoration: none;
               padding: 5px 10px; border: 1px solid var(--brand); border-radius: 8px;
               color: var(--brand); }
.map-links a:hover { background: var(--brand); color: #fff; }
.hint { background: #fff8e6; border: 1px solid #fde68a; border-radius: 8px;
  padding: 8px 10px; margin: 10px 0; font-size: 13px; }
.score-badge { font-weight: 800; padding: 3px 10px; border-radius: 8px; font-size: 15px;
  background: #eee; color: #555; }
.score-badge.A { background: #dcfce7; color: #15803d; }
.score-badge.B { background: #fef9c3; color: #a16207; }
.score-badge.C { background: #fee2e2; color: #b91c1c; }

.loglist { max-height: 260px; overflow: auto; }
.loglist .row { border-bottom: 1px solid var(--line); padding: 6px 0; font-size: 12px; }
.loglist .row .r { font-weight: 700; }

.field { margin-bottom: 12px; }
.field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.field.inline { display: flex; gap: 14px; }
.field.inline > div { flex: 1; }
.field input, .field textarea, .field select {
  width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px;
  font-family: inherit;
}
.field.voice { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px; }

.btn-group { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-group button {
  border: 1px solid var(--line); background: #fff; padding: 8px 12px; border-radius: 8px;
  cursor: pointer; font-size: 13px;
}
.btn-group.small button { padding: 5px 10px; font-size: 12px; }
.btn-group button:hover { border-color: var(--brand); }
.btn-group button.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-group button.good.sel { background: var(--good); border-color: var(--good); }
.btn-group button.best.sel { background: var(--best); border-color: var(--best); }
.btn-group button.bad.sel { background: var(--bad); border-color: var(--bad); }
.btn-group button.danger.sel { background: var(--danger); border-color: var(--danger); }

#scripts .script { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
#scripts .script .st { font-weight: 700; margin-bottom: 4px; font-size: 13px; }
#scripts .script .sb { font-size: 13px; white-space: pre-wrap; color: #333; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; background: #fafbfd; }
tr:hover td { background: #fafbff; }

.search-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.search-bar input { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: 7px; }
.search-bar select { padding: 8px; border: 1px solid var(--line); border-radius: 7px; }

.heatcell { display: inline-block; min-width: 42px; text-align: center; padding: 4px 0;
  border-radius: 5px; font-size: 12px; margin: 1px; }
.empty { text-align: center; color: var(--muted); padding: 40px; }

.bar { background: #eef2ff; border-radius: 5px; height: 20px; position: relative; margin: 3px 0; }
.bar > span { position: absolute; left: 8px; top: 2px; font-size: 12px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 5px; opacity: .25; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 8px; opacity: 0;
  transition: opacity .3s; pointer-events: none; z-index: 50; }
#toast.show { opacity: 1; }

.brief { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--line);
  border-radius: 8px; padding: 12px; font-size: 12px; margin-top: 6px; font-family: ui-monospace, monospace; }
details summary { cursor: pointer; color: var(--brand); font-size: 13px; }

/* 営業スケジュール(架電画面 左下・空き確認) */
.schedule-card h3 { margin-top: 0; }
.schedule-grid { overflow-x: auto; margin-top: 8px; }
.sched-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.sched-table th, .sched-table td { border: 1px solid var(--line); padding: 4px 5px; text-align: center; }
.sched-table tr:first-child th { background: #f8fafc; font-weight: 600; line-height: 1.3; }
.sched-table th.sched-today, .sched-table td.sched-today { background: #fffbeb; }
.sched-staff { background: #f8fafc; white-space: nowrap; font-weight: 600; }
.sched-cell { cursor: pointer; vertical-align: top; min-width: 52px; }
.sched-cell:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.sched-cell.all-free { background: #f0fdf4; }
.sched-cell.all-free.sched-today { background: #ecfdf0; }
.slot { display: inline-block; border-radius: 4px; padding: 1px 5px; margin: 1px; font-size: 11px; }
.slot.busy { background: #fee2e2; color: #b91c1c; font-weight: 600; }
.slot.free { color: #15803d; font-weight: 600; }
.assignment-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:10px; margin-top:14px }
.assignment-item { display:flex; gap:10px; align-items:flex-start; padding:12px; border:1px solid #dbe2ea; border-radius:8px; background:#fff; cursor:pointer }
.assignment-item input { margin-top:4px; width:auto }
.assignment-item span { display:flex; flex-direction:column; gap:3px }
.assignment-item small { color:#64748b }

/* アポインターSFA: 大きな文字・明確な順序・44px以上の操作領域 */
.sfa-body { margin:0; background:#f3f6fa; color:#172033; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif; font-size:18px; }
.sfa-body * { box-sizing:border-box; }
.sfa-header { min-height:82px; padding:14px max(20px,calc((100% - 1440px)/2)); display:flex; align-items:center; justify-content:space-between; gap:24px; background:#171a5e; color:#fff; }
.brand-row { display:flex; align-items:center; gap:14px; }
.brand-badge { display:grid; place-items:center; flex:0 0 52px; width:52px; height:52px; border-radius:12px; background:#fff; box-shadow:0 2px 8px #00000033; }
.brand-badge img { width:44px; height:44px; object-fit:contain; }
.sfa-brand { font-size:25px; font-weight:900; letter-spacing:.03em; }
.sfa-subtitle { margin-top:3px; font-size:14px; color:#dbeafe; }
.sfa-user { display:flex; align-items:center; gap:20px; white-space:nowrap; }
.sfa-user a { color:#fff; padding:10px 14px; border:1px solid #93c5fd; border-radius:9px; text-decoration:none; font-size:15px; }
.sfa-nav { position:sticky; top:0; z-index:20; display:flex; justify-content:center; gap:8px; padding:10px 20px; background:#fff; box-shadow:0 2px 8px #0f172a18; }
.sfa-nav button { min-width:180px; min-height:54px; border:0; border-radius:10px; background:#e8eef5; color:#334155; font-size:18px; font-weight:800; cursor:pointer; }
.sfa-nav button.active { background:#171a5e; color:#fff; }
.sfa-main { max-width:1440px; margin:0 auto; padding:24px; }
.sfa-view.hidden,.sfa-body .hidden { display:none !important; }
.sfa-welcome { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:20px; }
.sfa-welcome h1 { margin:5px 0 0; font-size:32px; }
.sfa-primary { min-height:56px; padding:13px 26px; border:0; border-radius:11px; background:#171a5e; color:#fff; font-size:19px; font-weight:900; cursor:pointer; box-shadow:0 2px 5px #0f172a22; }
.sfa-primary:hover { background:#23268f; }
.sfa-primary:disabled { background:#94a3b8; cursor:not-allowed; box-shadow:none; }
.sfa-secondary { display:inline-flex; align-items:center; justify-content:center; min-height:46px; padding:9px 16px; border:2px solid #1769aa; border-radius:9px; background:#fff; color:#1769aa; font-size:16px; font-weight:800; text-decoration:none; cursor:pointer; }
.sfa-metrics { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; margin-bottom:22px; }
.sfa-metrics article { padding:20px; border:1px solid #dbe3ec; border-radius:14px; background:#fff; box-shadow:0 2px 8px #0f172a0b; }
.sfa-metrics span { display:block; color:#526174; font-size:15px; font-weight:700; }
.sfa-metrics strong { display:inline-block; margin-top:7px; color:#24364b; font-size:40px; line-height:1; }
.sfa-metrics small { margin-left:5px; font-size:16px; }
.sfa-metrics .metric-blue { border-left:7px solid #1769aa; }.sfa-metrics .metric-green { border-left:7px solid #16835d; }
.sfa-panel { padding:24px; border:1px solid #dbe3ec; border-radius:15px; background:#fff; box-shadow:0 2px 10px #0f172a0c; }
.sfa-panel h1,.sfa-panel h2 { margin-top:0; }.sfa-panel h2 { font-size:23px; }
.sfa-list { display:grid; gap:10px; }.sfa-list article { display:grid; grid-template-columns:190px 1fr 180px; gap:12px; align-items:center; padding:14px 16px; border-radius:10px; background:#f4f8fc; }
.sfa-empty-small { padding:28px; text-align:center; color:#64748b; background:#f8fafc; border-radius:10px; }
.sfa-callbar { display:flex; align-items:end; gap:14px; margin-bottom:18px; padding:16px; border-radius:13px; background:#fff; }
.sfa-callbar label { display:flex; flex-direction:column; gap:6px; font-size:15px; font-weight:800; }
.sfa-callbar select { min-width:310px; min-height:50px; padding:8px 12px; border:2px solid #b8c5d3; border-radius:9px; background:#fff; font-size:17px; }
#call-time-warning { color:#b42318; font-size:15px; font-weight:800; }
.sfa-empty { padding:70px 20px; text-align:center; border:2px dashed #cbd5e1; border-radius:15px; background:#fff; color:#526174; }
.sfa-empty-icon { font-size:55px; color:#1769aa; }.sfa-empty h2 { color:#24364b; }
.sfa-columns { display:grid; grid-template-columns:minmax(360px,.85fr) minmax(500px,1.15fr); gap:18px; align-items:start; }
.step-label { display:inline-block; margin-bottom:10px; padding:5px 11px; border-radius:7px; background:#e8f2fb; color:#125b94; font-size:15px; font-weight:900; }
.sfa-customer-code { display:inline-block; padding:3px 10px; border-radius:7px; background:#eef2f7; color:#526174; font-size:13px; font-weight:800; letter-spacing:.05em; }
.customer-panel { position:sticky; top:86px; }.customer-panel h1 { margin:5px 0; font-size:34px; }.sfa-kana { min-height:20px; color:#64748b; font-size:15px; }
.sfa-phone { display:block; margin:10px 0; color:#075fa8; font-size:36px; font-weight:900; text-decoration:none; letter-spacing:.03em; }
.sfa-address-kana { margin-top:12px; color:#64748b; font-size:15px; line-height:1.5; }
.sfa-address { margin:2px 0 12px; font-size:22px; font-weight:800; line-height:1.6; }
.sfa-alert { margin:18px 0; padding:14px; border:1px solid #f6cf65; border-radius:10px; background:#fff8dc; font-size:16px; line-height:1.5; }
.sfa-history { border-top:1px solid #dbe3ec; padding-top:15px; }.sfa-history summary { min-height:44px; color:#24364b; font-size:18px; font-weight:900; }
.history-row { padding:12px 0; border-bottom:1px solid #e7edf3; font-size:15px; }.history-row span { margin-left:10px; color:#64748b; }.history-row p { margin:6px 0 0; }
.sfa-choice-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:20px; }
.sfa-choice-grid button { min-height:58px; padding:10px; border:2px solid #bac6d3; border-radius:11px; background:#fff; color:#24364b; font-size:18px; font-weight:900; cursor:pointer; }
.sfa-choice-grid button:hover { border-color:#1769aa; }.sfa-choice-grid button.selected { border-color:#1769aa; background:#1769aa; color:#fff; }
.sfa-choice-grid .choice-good.selected { background:#34835d; border-color:#34835d; }.sfa-choice-grid .choice-best { border-color:#54a77d; background:#f0fff7; }.sfa-choice-grid .choice-best.selected { background:#08784f; border-color:#08784f; }.sfa-choice-grid .choice-danger.selected { background:#b42318; border-color:#b42318; }
.sfa-field { display:flex; flex-direction:column; gap:7px; margin:16px 0; color:#334155; font-size:16px; font-weight:800; }
.sfa-field input,.sfa-field select,.sfa-field textarea { width:100%; min-height:52px; padding:11px 13px; border:2px solid #b8c5d3; border-radius:9px; background:#fff; color:#172033; font:inherit; font-weight:500; }
.sfa-field textarea { min-height:105px; line-height:1.55; resize:vertical; }.sfa-field input:focus,.sfa-field select:focus,.sfa-field textarea:focus { outline:3px solid #93c5fd; border-color:#1769aa; }
#connected-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.appointment-panel { margin-top:18px; }.sfa-help { color:#526174; font-size:16px; }
.slot-calendar { display:grid; grid-template-columns:repeat(7,minmax(150px,1fr)); gap:10px; overflow-x:auto; padding-bottom:8px; }
.slot-day { min-width:150px; border:1px solid #cfd9e3; border-radius:11px; overflow:hidden; }.slot-day header { padding:11px; text-align:center; background:#eaf1f8; }.slot-day header strong { display:block; font-size:20px; }.slot-day header span { font-size:14px; }
.time-band { width:100%; min-height:92px; padding:10px; border:0; border-top:1px solid #dbe3ec; background:#effbf5; color:#135c43; cursor:pointer; }.time-band b,.time-band span,.time-band em { display:block; }.time-band b { font-size:18px; }.time-band span { margin:4px 0; font-size:13px; }.time-band em { font-style:normal; font-weight:900; }.time-band:hover { background:#d9f5e8; outline:3px solid #4a9d79; outline-offset:-3px; }.time-band.full { background:#f2f3f5; color:#7a8694; cursor:not-allowed; }
.staff-slots { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }.staff-slot { min-height:75px; padding:12px; border:2px solid #4a9d79; border-radius:11px; background:#effbf5; color:#135c43; cursor:pointer; }.staff-slot b,.staff-slot span { display:block; font-size:18px; }.staff-slot span { margin-top:5px; }.staff-slot:hover { background:#d9f5e8; }
/* 1時間区切りアポ枠 + フリー枠 */
.sfa-buyback { display:inline-block; margin:4px 0 8px; padding:6px 12px; border-radius:8px; background:#fdf2f8; border:1px solid #f0abcf; color:#9d2463; font-size:15px; font-weight:800; }
.slot-daybtn { min-height:100px; padding:12px; border:1px solid #cfd9e3; border-radius:11px; background:#effbf5; color:#135c43; cursor:pointer; }
.slot-daybtn strong,.slot-daybtn span,.slot-daybtn em { display:block; }
.slot-daybtn strong { font-size:22px; }.slot-daybtn span { margin:3px 0; font-size:14px; }.slot-daybtn em { font-style:normal; font-weight:900; font-size:13px; }
.slot-daybtn:hover:not(:disabled) { background:#d9f5e8; outline:3px solid #4a9d79; outline-offset:-3px; }
.slot-daybtn.full { background:#f2f3f5; color:#7a8694; cursor:not-allowed; }
.slot-detail h3 { margin:14px 0 10px; font-size:21px; }
.staff-hour-row { padding:14px; border:1px solid #d6e0e9; border-radius:11px; margin-bottom:12px; background:#fff; }
.staff-hour-row.off { background:#f4f5f7; color:#7a8694; }
.staff-hour-name { display:flex; align-items:center; gap:10px; margin-bottom:9px; font-size:19px; }
.avail-badge { padding:3px 10px; border-radius:14px; font-size:13px; font-weight:900; }
.avail-badge.on { background:#eaf9f2; color:#08784f; }
.avail-badge.off { background:#eceef1; color:#64748b; }
.avail-badge.unknown { background:#fff4dc; color:#8a6410; }
.hour-chips { display:flex; flex-wrap:wrap; gap:7px; }
.free-chips-row { margin-top:8px; padding-top:8px; border-top:1px dashed #d6e0e9; }
.hour-chip { min-width:74px; min-height:52px; padding:6px 10px; border:2px solid #4a9d79; border-radius:9px; background:#effbf5; color:#135c43; font-size:16px; font-weight:900; cursor:pointer; }
.hour-chip small { display:block; font-size:11px; font-weight:700; }
.hour-chip:hover:not(:disabled) { background:#d9f5e8; }
.hour-chip.busy { border-color:#dbe0e6; background:#f2f3f5; color:#98a2af; cursor:not-allowed; }
.hour-chip.free { border-color:#7c5cd6; background:#f5f2fe; color:#4c2fa8; }
.hour-chip.free:hover:not(:disabled) { background:#e9e2fc; }
.hour-chip.free.busy { border-color:#dbe0e6; background:#f2f3f5; color:#98a2af; }
.selected-slot { display:flex; align-items:center; gap:18px; margin-top:16px; padding:18px; border:3px solid #16835d; border-radius:11px; background:#effbf5; }.selected-slot span { flex:1; font-size:19px; }.selected-slot button { min-height:44px; border:1px solid #64748b; border-radius:8px; background:#fff; cursor:pointer; }
.sfa-savebar { position:sticky; bottom:0; z-index:15; display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:18px; padding:16px 20px; border:2px solid #b9cadb; border-radius:14px; background:#fff; box-shadow:0 -5px 20px #0f172a18; }.sfa-savebar p { margin:2px 0; color:#526174; font-size:15px; }.sfa-savebar .step-label { margin:0; }
#sfa-toast { position:fixed; left:50%; bottom:28px; z-index:100; max-width:90%; padding:16px 24px; border-radius:11px; background:#172033; color:#fff; font-size:18px; font-weight:800; opacity:0; transform:translate(-50%,20px); pointer-events:none; transition:.2s; }#sfa-toast.show { opacity:1; transform:translate(-50%,0); }
.appointment-list { display:grid; gap:12px; }.appointment-list article { position:relative; padding:18px; border:1px solid #dbe3ec; border-left:7px solid #1769aa; border-radius:11px; }.appointment-list article strong { color:#075fa8; font-size:19px; }.appointment-list article h3 { margin:7px 0; font-size:22px; }.appointment-list article p { margin:0; color:#526174; }.appointment-list article>span { position:absolute; top:16px; right:16px; padding:5px 10px; border-radius:20px; background:#e8f2fb; color:#125b94; font-weight:800; }
@media (max-width:1000px) { .sfa-metrics { grid-template-columns:repeat(2,1fr); }.sfa-columns { grid-template-columns:1fr; }.customer-panel { position:static; }.slot-calendar { grid-template-columns:repeat(7,170px); }.sfa-list article { grid-template-columns:1fr; }.sfa-callbar { align-items:stretch; flex-direction:column; }.sfa-callbar select { width:100%; min-width:0; } }
@media (max-width:650px) { .sfa-header { align-items:flex-start; flex-direction:column; }.sfa-user { width:100%; justify-content:space-between; }.sfa-nav { padding:8px; }.sfa-nav button { min-width:0; flex:1; font-size:15px; }.sfa-main { padding:14px; }.sfa-welcome { align-items:stretch; flex-direction:column; }.sfa-metrics { grid-template-columns:1fr 1fr; }.sfa-metrics article { padding:15px; }.sfa-metrics strong { font-size:32px; }.sfa-panel { padding:17px; }.sfa-choice-grid { grid-template-columns:1fr 1fr; }.sfa-phone { font-size:29px; }#connected-fields { grid-template-columns:1fr; }.sfa-savebar { align-items:stretch; flex-direction:column; }.sfa-savebar button { width:100%; }.selected-slot { align-items:flex-start; flex-direction:column; } }

/* 管理者CRM v2 */
.admin-body { background:#f5f7fa; font-size:16px; }.admin-header { background:#12143f; }.admin-layout { display:grid; grid-template-columns:245px minmax(0,1fr); min-height:calc(100vh - 82px); }.admin-nav { position:sticky; top:0; height:100vh; padding:22px 14px; background:#fff; border-right:1px solid #dce3eb; }.admin-nav button { display:flex; align-items:center; gap:12px; width:100%; min-height:56px; margin-bottom:8px; padding:10px 13px; border:0; border-radius:10px; background:transparent; color:#425269; text-align:left; font-size:16px; font-weight:800; cursor:pointer; }.admin-nav button span { display:grid; place-items:center; width:29px; height:29px; border-radius:7px; background:#eaf0f6; color:#526174; font-size:12px; }.admin-nav button:hover { background:#f1f5f9; }.admin-nav button.active { background:#e9f3fb; color:#0d5f9e; }.admin-nav button.active span { background:#1769aa; color:#fff; }.admin-main { min-width:0; max-width:1600px; width:100%; padding:28px 30px 60px; }.admin-view.hidden { display:none; }.admin-title { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:22px; }.admin-title small { color:#1769aa; font-weight:900; }.admin-title h1 { margin:4px 0 0; font-size:30px; }.admin-refresh { min-height:45px; padding:8px 15px; border:1px solid #9babbc; border-radius:9px; background:#fff; color:#334155; font-weight:800; cursor:pointer; }.admin-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }.admin-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.admin-actions button { min-height:64px; border:2px solid #b9c8d7; border-radius:10px; background:#f8fafc; color:#21415f; font-size:16px; font-weight:900; cursor:pointer; }.admin-actions button:hover { border-color:#1769aa; background:#eaf4fc; }.compact-list { display:grid; gap:8px; }.compact-list article { display:grid; grid-template-columns:145px 1fr; gap:4px 12px; padding:11px; background:#f5f8fb; border-radius:8px; }.compact-list small { grid-column:2; color:#64748b; }.admin-step { display:flex; gap:20px; margin-bottom:18px; }.admin-step-no { display:grid; place-items:center; flex:0 0 48px; height:48px; border-radius:50%; background:#1769aa; color:#fff; font-size:21px; font-weight:900; }.admin-step-content { flex:1; min-width:0; }.admin-step-content>p { color:#526174; }.admin-upload { display:grid; grid-template-columns:minmax(250px,1fr) minmax(180px,.6fr) auto; gap:10px; }.admin-upload input { min-height:50px; padding:10px; border:2px solid #c4cfda; border-radius:9px; background:#fff; font-size:15px; }.success-box,.error-box { margin-top:12px; padding:12px; border-radius:8px; background:#eaf9f2; color:#146247; font-weight:800; }.error-box { background:#fff0ef; color:#a32920; }.assignment-toolbar { display:flex; align-items:end; justify-content:space-between; gap:15px; margin:18px 0; }.assignment-toolbar label { display:flex; flex-direction:column; gap:6px; font-weight:800; }.assignment-toolbar select { min-width:280px; min-height:50px; padding:9px; border:2px solid #b8c5d3; border-radius:9px; font-size:16px; }.admin-table-wrap { overflow:auto; }.admin-table-wrap table { min-width:700px; font-size:15px; }.admin-table-wrap th,.admin-table-wrap td { padding:12px; }.assignment-matrix th small { display:block; margin-top:3px; color:#7a8694; }.matrix-cell { text-align:center; color:#94a3b8; }.matrix-cell.assigned { background:#eaf9f2; color:#08784f; font-weight:900; }.cleaning-guide { display:flex; gap:15px; margin-bottom:18px; padding:17px 20px; border-left:6px solid #1769aa; border-radius:9px; background:#eaf3fb; }.cleaning-guide span { color:#425269; }.cleaning-options { display:grid; gap:10px; }.cleaning-options>label:not(.digits-rule) { display:flex; gap:12px; align-items:flex-start; padding:14px; border:1px solid #d4dee8; border-radius:10px; cursor:pointer; }.cleaning-options input[type=checkbox] { width:24px; height:24px; accent-color:#1769aa; }.cleaning-options span { display:flex; flex-direction:column; gap:4px; }.cleaning-options small { color:#64748b; }.digits-rule { display:flex; align-items:center; gap:10px; padding:12px; font-weight:800; }.digits-rule input { width:75px; min-height:44px; border:2px solid #b8c5d3; border-radius:8px; text-align:center; font-size:18px; }.cleaning-options+.sfa-secondary { width:100%; margin-top:15px; }.cleaning-preview { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.cleaning-preview article { padding:15px; border-radius:10px; background:#f4f7fa; }.cleaning-preview span { display:block; color:#526174; }.cleaning-preview strong { display:inline-block; margin-top:7px; font-size:30px; }.cleaning-warning { margin:15px 0; padding:13px; border:1px solid #efc66c; border-radius:8px; background:#fff8e5; color:#79530b; }.danger-action { width:100%; background:#ad332b; }.danger-action:hover { background:#8f261f; }.analysis-row { display:grid; grid-template-columns:1fr 70px 65px; padding:12px 5px; border-bottom:1px solid #e2e8f0; }.analysis-row em { color:#08784f; font-style:normal; font-weight:900; }.analysis-bar { position:relative; display:grid; grid-template-columns:130px 1fr 55px; align-items:center; gap:10px; min-height:38px; }.analysis-bar i { height:18px; border-radius:5px; background:#a9cce8; }.live-indicator { padding:9px 14px; border-radius:20px; background:#eaf9f2; color:#08784f; font-weight:900; }.schedule-rulebar { margin-bottom:18px; }.rule-fields { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }.rule-fields label { display:flex; flex-direction:column; gap:5px; color:#526174; font-size:14px; font-weight:800; }.rule-fields input { width:125px; min-height:45px; padding:7px; border:2px solid #b8c5d3; border-radius:8px; font-size:16px; }.admin-slot-board { display:grid; grid-template-columns:repeat(7,minmax(145px,1fr)); gap:10px; overflow-x:auto; }.admin-slot-board>article { min-width:145px; border:1px solid #cfd9e3; border-radius:11px; overflow:hidden; }.admin-slot-board header { padding:11px; text-align:center; background:#e9f0f6; }.admin-slot-board header b,.admin-slot-board header span { display:block; }.admin-time-block { padding:12px 9px; border-top:1px solid #d7e0e8; background:#effaf5; color:#155f46; }.admin-time-block>* { display:block; }.admin-time-block span { margin:3px 0; font-size:12px; }.admin-time-block strong { font-size:18px; }.admin-time-block em { font-size:12px; font-style:normal; }.admin-time-block.full { background:#f1f3f5; color:#7a8694; }.booking-chip,.free-chip { display:inline-block; margin:2px; padding:4px 7px; border-radius:6px; background:#fee9e7; color:#a32920; font-weight:800; }.free-chip { background:#eaf9f2; color:#08784f; }
@media(max-width:1100px){.admin-layout{grid-template-columns:1fr}.admin-nav{position:sticky;top:0;z-index:30;display:flex;height:auto;padding:8px;overflow-x:auto;border-right:0;border-bottom:1px solid #dce3eb}.admin-nav button{min-width:180px;margin:0 5px}.admin-main{padding:22px}.admin-slot-board{grid-template-columns:repeat(7,155px)}}
@media(max-width:700px){.admin-main{padding:14px}.admin-title,.assignment-toolbar{align-items:stretch;flex-direction:column}.admin-grid2{grid-template-columns:1fr}.admin-upload{grid-template-columns:1fr}.admin-step{gap:10px}.admin-step-no{flex-basis:38px;height:38px}.cleaning-guide{flex-direction:column}.rule-fields>*{width:100%!important}.rule-fields input{width:100%}.admin-actions{grid-template-columns:1fr}.sfa-metrics{grid-template-columns:1fr 1fr}}

/* 営業マン管理・稼働日程グリッド */
.staff-add-form { display:grid; grid-template-columns:1fr 1fr 1fr auto; gap:9px; margin-bottom:14px; }
.staff-add-form input { min-height:48px; padding:9px 12px; border:2px solid #c4cfda; border-radius:9px; font-size:15px; }
.staff-del { min-height:38px; padding:5px 12px; border:1px solid #c9838a; border-radius:7px; background:#fff; color:#a32920; font-weight:800; cursor:pointer; }
.avail-table th small { display:block; font-weight:600; color:#7a8694; }
.avail-table th.sunday small { color:#c0392b; }.avail-table th.saturday small { color:#2264a8; }
.avail-table td { padding:4px; text-align:center; }
.avail-cell { min-width:52px; min-height:44px; padding:5px; border:0; border-radius:8px; font-size:13px; font-weight:900; cursor:pointer; }
.avail-cell.on { background:#dcf5e9; color:#08784f; }
.avail-cell.off { background:#fbe4e2; color:#a32920; }
.avail-cell.unknown { background:#eef1f5; color:#98a2af; }
.avail-cell:hover { outline:3px solid #1769aa; outline-offset:-2px; }
.sched-off { background:#f4f5f7; color:#98a2af; text-align:center; font-weight:800; }
.booking-chip.free-frame { background:#efe9fd; color:#4c2fa8; }
@media(max-width:900px){.staff-add-form{grid-template-columns:1fr}}

/* アポ表スプレッドシート同期 */
.sheets-panel { margin-top:18px; border-left:6px solid #0f9d58; }
.sheets-status { margin:10px 0 14px; color:#425269; }
.sheets-warn { display:block; margin-top:6px; color:#a32920; font-weight:800; }
.sheets-actions { display:flex; gap:10px; align-items:center; }
.sheets-actions a { text-decoration:none; }

/* Google Drive架電リスト取込 */
.google-import-panel { border-left:6px solid #4285f4; }
.google-connect-state { margin:15px 0; }
.google-not-configured { display:flex; flex-direction:column; gap:7px; padding:15px; border-radius:10px; background:#fff8e5; color:#6f5011; }
.google-not-configured code { padding:7px; border-radius:6px; background:#fff; overflow-wrap:anywhere; }
.google-connect-button { display:inline-flex; align-items:center; text-decoration:none; }
.google-connect-state>span { margin-left:12px; color:#64748b; }
.google-connected { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 15px; border-radius:10px; background:#eaf9f2; color:#146247; }
.google-connected span { display:flex; flex-direction:column; gap:3px; }
.google-connected button { min-height:40px; padding:7px 12px; border:1px solid #728195; border-radius:7px; background:#fff; cursor:pointer; }
.google-folder-bar { display:grid; grid-template-columns:auto 1fr auto; gap:9px; margin:14px 0; }
.google-folder-bar input,.google-list-name input { min-height:46px; padding:9px 12px; border:2px solid #b8c5d3; border-radius:8px; font-size:15px; }
.google-breadcrumb { margin-bottom:8px; color:#526174; font-weight:800; }
.google-files { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:9px; max-height:360px; padding:5px; overflow:auto; }
.google-file { display:flex; align-items:center; gap:11px; min-height:70px; padding:11px; border:2px solid #d3dce6; border-radius:10px; background:#fff; text-align:left; cursor:pointer; }
.google-file:hover { border-color:#4285f4; background:#f5f9ff; }
.google-file.selected { border-color:#1769aa; background:#e9f3fb; box-shadow:0 0 0 2px #9cc9ed; }
.google-file-icon { font-size:27px; }
.google-file>span:last-child { display:flex; min-width:0; flex-direction:column; gap:4px; }
.google-file b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.google-file small { color:#64748b; }
.google-list-name { display:flex; flex-direction:column; gap:5px; margin:15px 0 10px; font-weight:800; }
@media(max-width:700px){.google-folder-bar{grid-template-columns:1fr}}

/* リスト内地域の割り当て */
.region-toolbar { display:grid; grid-template-columns:minmax(210px,.8fr) minmax(280px,1.2fr) auto; }
.region-toolbar label { min-width:0; }.region-toolbar select { width:100%; min-width:0; }
.full-list-option { display:flex; align-items:flex-start; gap:12px; margin:12px 0; padding:14px; border:2px solid #a9c8e1; border-radius:10px; background:#eef7fe; cursor:pointer; }
.full-list-option input { width:24px; height:24px; accent-color:#1769aa; }.full-list-option span { display:flex; flex-direction:column; gap:4px; }.full-list-option small { color:#526174; }
.region-select-heading { display:flex; align-items:center; gap:8px; margin:18px 0 9px; font-weight:900; }.region-select-heading button { min-height:38px; padding:6px 11px; border:1px solid #8fa2b5; border-radius:7px; background:#fff; color:#334155; cursor:pointer; }.region-select-heading button:first-of-type { margin-left:auto; }
.region-assignment-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:12px; max-height:500px; overflow:auto; }
.region-group { padding:12px; border:1px solid #d6e0e9; border-radius:11px; background:#f8fafc; }.region-group h3 { margin:0 0 9px; color:#21415f; font-size:17px; }
.region-item { display:flex; align-items:flex-start; gap:9px; margin-bottom:7px; padding:10px; border:1px solid #d9e2ea; border-radius:8px; background:#fff; cursor:pointer; }.region-item:last-child { margin-bottom:0; }.region-item input { width:22px; height:22px; accent-color:#1769aa; }.region-item span { display:flex; min-width:0; flex-direction:column; gap:3px; }.region-item small { color:#64748b; }.assignment-matrix .matrix-cell { min-width:160px; max-width:260px; white-space:normal; line-height:1.45; }
@media(max-width:800px){.region-toolbar{grid-template-columns:1fr}.region-select-heading{flex-wrap:wrap}.region-select-heading button:first-of-type{margin-left:0}}
