/* 任意サポート管理（運営 optional-support-admin.html）と講師用ページ（optional-support-staff.html）の共通スタイル。
   ヘッダー・ユーザーメニューは mock-application-admin.html と同じ見た目。操作ボタンはティール。 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans JP', sans-serif; background: #f8f9fa; min-height: 100vh; color: #333; }

.header { background: #111; padding: 18px 24px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; }
.header-content { max-width: 1200px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.back-btn { display: flex; align-items: center; gap: 6px; color: #aaa; text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 8px; transition: all 0.2s; white-space: nowrap; }
.back-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.header-divider { width: 1px; height: 20px; background: #444; }
.header-title { font-size: 20px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-right { display: flex; align-items: center; gap: 12px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: rgba(255,255,255,0.1); border: none; border-radius: 8px; color: #fff; font-size: 13px; font-family: inherit; cursor: pointer; }
.user-avatar { width: 28px; height: 28px; background: #10b981; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); min-width: 200px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.2s; z-index: 200; }
.user-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.dropdown-name { font-size: 14px; font-weight: 600; color: #111; margin-bottom: 2px; }
.dropdown-email { font-size: 12px; color: #888; }
.dropdown-menu { padding: 8px; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: #555; text-decoration: none; cursor: pointer; border: none; background: none; width: 100%; font-family: inherit; }
.dropdown-item:hover { background: #f5f5f5; color: #111; }
.dropdown-item.danger { color: #ef4444; }
.dropdown-divider { height: 1px; background: #f0f0f0; margin: 4px 8px; }

.container { max-width: 1200px; margin: 0 auto; padding: 28px 24px 80px; }
.page-title { font-size: 24px; font-weight: 700; color: #111; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.page-subtitle { font-size: 13px; color: #777; margin-bottom: 20px; line-height: 1.8; max-width: 900px; }
.note { font-size: 12px; color: #888; line-height: 1.7; }
.err { color: #c62828 !important; }
.empty { font-size: 13px; color: #888; padding: 4px 0; }

/* タブ（文字タブ＋下線） */
.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid #e5e5e5; margin-bottom: 18px; overflow-x: auto; }
.tab-btn { padding: 10px 22px; background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: 14px; font-weight: 700; font-family: inherit; color: #888; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tab-btn.active { color: #111; border-bottom-color: #111; }
.tab-btn > .cnt { background: #c62828; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 14px 16px; }
.stat-card.warn { border-color: #ffe082; background: #fffdf5; }
.stat-label { font-size: 12px; color: #888; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.stat-label .material-icons { font-size: 16px; }
.stat-value { font-size: 24px; font-weight: 700; color: #111; }
.stat-value small { font-size: 12px; font-weight: 500; color: #999; margin-left: 4px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters select { font-family: inherit; font-size: 13px; border: 1px solid #d5d9e3; border-radius: 8px; padding: 7px 10px; background: #fff; }

.tbl-wrap { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; overflow-x: auto; }
.list-table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 980px; }
.list-table th { background: #fafafa; color: #555; font-weight: 700; font-size: 12px; padding: 10px; border-bottom: 1px solid #eee; text-align: center; white-space: nowrap; }
.list-table td { padding: 10px; border-bottom: 1px solid #f2f2f2; text-align: center; vertical-align: middle; line-height: 1.6; }
.list-table td.l { text-align: left; }
.list-table td.nw { white-space: nowrap; }
.list-table tr.click { cursor: pointer; }
.list-table tr.click:hover td { background: #f9fafb; }
.list-table tr.dim td { color: #9ca3af; }
.empty-cell { color: #888; padding: 28px !important; }
.mark { background: none; border: none; color: #c62828; cursor: pointer; vertical-align: middle; padding: 0 2px; }
.mark .material-icons { font-size: 18px; vertical-align: -4px; }

.badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; display: inline-block; }
.b-navy { background: #eef0fa; color: #1a237e; }
.b-teal { background: #e6f4f2; color: #0f766e; }
.b-gray { background: #f3f4f6; color: #666; }
.b-green { background: #e8f5e9; color: #2e7d32; }
.b-amber { background: #fff8e1; color: #8d6e00; }
.b-red { background: #fdecea; color: #c62828; }

.btn-teal { font-family: inherit; border: none; border-radius: 8px; background: #0f766e; color: #fff; font-weight: 700; font-size: 13px; padding: 8px 14px; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.btn-teal:disabled { background: #b8c4c2; cursor: not-allowed; }
.btn-line { font-family: inherit; border: 1px solid #d5d9e3; border-radius: 8px; background: #fff; color: #444; font-weight: 600; font-size: 13px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.btn-red { font-family: inherit; border: 1px solid #ef9a9a; border-radius: 8px; background: #fff; color: #c62828; font-weight: 700; font-size: 13px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.rowr { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; align-items: center; }

.inp { font-family: inherit; font-size: 14px; border: 1px solid #cfd4e2; border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
textarea.inp { resize: vertical; line-height: 1.7; }
.inp.date { width: 170px; max-width: 100%; }
.inp.money { width: 140px; max-width: 100%; }

/* モーダル: 見出し固定・中身だけスクロール。背景クリックでは閉じない（右上の × のみ） */
.ov { position: fixed; inset: 0; background: rgba(17,17,17,.45); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.ov.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; }
.modal.wide { max-width: 780px; }
.m-head { padding: 14px 18px; border-bottom: 1px solid #eee; display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.m-head .t { flex: 1; min-width: 0; }
.m-head .t b { display: block; font-size: 15px; }
.m-head .t small { color: #888; font-size: 12px; }
.x { width: 34px; height: 34px; border: none; background: #f3f4f6; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #555; flex-shrink: 0; }
.m-body { padding: 16px 18px; overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.m-body > * { flex-shrink: 0; }

.sec { border: 1px solid #e8e8e8; border-radius: 12px; overflow: hidden; background: #fff; }
.sec > h4 { margin: 0; padding: 9px 14px; font-size: 13px; background: #f5f6f8; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sec > .in { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.sec > .in > * { flex-shrink: 0; }
.cand { display: flex; gap: 10px; align-items: center; border: 1px solid #e8e8e8; border-radius: 10px; padding: 10px 12px; }
.cand .who { flex: 1; min-width: 0; }
.cand .who b { font-size: 13.5px; }
.cand .who small { display: block; color: #888; font-size: 12px; line-height: 1.7; }
.info { background: #e6f4f2; color: #134e4a; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.8; }
.info.gray { background: #f3f4f6; color: #555; }
.info.red { background: #fdecea; color: #7f1d1d; }
.nominate { border-top: 1px dashed #e5e5e5; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.nom-h { font-size: 13px; font-weight: 700; color: #0f766e; }
.nom-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nom-row select { width: 260px; max-width: 100%; }
.book-row { display: flex; gap: 8px; flex-wrap: wrap; }
.book-row .inp:not(.date) { flex: 1; min-width: 180px; }

/* 申込内容（js/optional-support-view.js が出す .conf / .kv） */
.conf { border: 1px solid #ececec; border-radius: 10px; overflow: hidden; }
.conf + .conf { margin-top: 10px; }
.conf h4 { background: #f7f7f9; color: #444; font-size: 12.5px; padding: 6px 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 12.5px; line-height: 1.75; padding: 8px 12px; }
.sec > .in > .kv { padding: 0; }
.kv dt { color: #888; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv a { color: #0f766e; }

/* 講師用ページのカード */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ocard { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ocard > * { flex-shrink: 0; }
.ocard .hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ocard .hd b { font-size: 14.5px; }
.ocard details summary { cursor: pointer; font-size: 12.5px; color: #0f766e; font-weight: 700; }
.ocard details[open] summary { margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: #666; }
.m-body .ocard { border: none; padding: 0; }
.answers { display: flex; flex-direction: column; gap: 10px; }
.answers .conf + .conf { margin-top: 0; }
/* いまの状況（js/optional-support-steps.js） */
.st-box { display: flex; flex-direction: column; gap: 8px; }
.st-now { background: #fff8e1; color: #7a5b00; border-radius: 8px; padding: 8px 12px; font-size: 13px; line-height: 1.7; }
.st-now.done { background: #e8f5e9; color: #2e7d32; }
.st-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.7; }
.st-list li .material-icons { font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.st-list li.done .material-icons { color: #2e7d32; }
.st-list li.todo .material-icons { color: #d97706; }
.st-list li.wait .material-icons { color: #b0b6c3; }
.st-list li.wait { color: #888; }
.st-h { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.st-owner { font-size: 11px; font-weight: 700; background: #f3f4f6; color: #555; border-radius: 999px; padding: 0 8px; }
.st-list li.todo .st-owner { background: #fff3cd; color: #8d6e00; }
.st-t { color: #555; }
.acts { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.acts .badge { white-space: nowrap; }
.lesson-pick { display: flex; flex-direction: column; gap: 6px; }
.lp-row { display: flex; gap: 10px; align-items: center; border: 1px solid #e8e8e8; border-radius: 10px; padding: 8px 12px; }
.lp-row.on { border-color: #0f766e; background: #f0faf8; }
.lp-when { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.lead-box { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 12px 16px; font-size: 12.5px; color: #555; line-height: 1.8; margin-bottom: 14px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: #111; color: #fff; padding: 12px 22px; border-radius: 30px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: transform 0.3s; z-index: 2000; max-width: calc(100vw - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: #c62828; }

@media (max-width: 760px) {
  .header { padding: 12px 14px; }
  .header-title { font-size: 16px; }
  .header-divider, .user-name { display: none; }
  .container { padding: 18px 14px 60px; }
  .page-title { font-size: 20px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
  .ov { padding: 0; align-items: stretch; }
  .modal, .modal.wide { border-radius: 0; max-height: none; height: 100%; max-width: none; }
  .cand { flex-direction: column; align-items: stretch; }
  .cand .btn-teal { align-self: flex-end; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 4px; }
}
