/* ============================================================
   オーナーポータル 共通スタイル
     ページを分けたので、見た目の定義はこの1枚に集約する。
     ページ側に <style> を持たせない（同じ部品が枝分かれするため）。
   ============================================================ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{--bg:#f6f7f9;--panel:#fff;--line:#e5e7eb;--text:#1f2937;--muted:#6b7280;--accent:#4f46e5;--accent-d:#4338ca;--accent-soft:#eef2ff;--ok:#16a34a;--warn:#d97706;--bad:#dc2626}
html,body{height:100%}
body{font-family:-apple-system,'Hiragino Sans','Yu Gothic UI',sans-serif;font-size:14px;color:var(--text);background:var(--bg);line-height:1.6;-webkit-font-smoothing:antialiased}
button{font-family:inherit;cursor:pointer}
input{font-family:inherit;font-size:14px}
.hidden{display:none!important}
/* 認証が済むまで本体を出さない。ownerBoot() が booting を外す */
body.booting .app{visibility:hidden}

/* ---------- ログイン ---------- */
.login-wrap{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:20px}
.login-card{width:100%;max-width:380px;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:28px 26px;box-shadow:0 10px 40px rgba(0,0,0,.06)}
.brand{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.brand svg{width:26px;height:26px;stroke:var(--accent);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.brand .bt{font-size:17px;font-weight:800;letter-spacing:.2px}
.login-sub{font-size:12px;color:var(--muted);margin-bottom:22px}
.field{margin-bottom:14px}
.field label{display:block;font-size:11.5px;font-weight:700;color:#374151;margin-bottom:5px}
.field input{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:#fff}
.field input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.field .hint{font-size:11px;color:var(--muted);margin-top:5px;line-height:1.6}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid var(--line);background:#fff;color:var(--text);padding:10px 16px;border-radius:9px;font-size:13.5px;font-weight:700}
.btn:hover{background:#f3f4f6}
/* ページ遷移するボタンは <a>。下線は出さない（見た目はボタンのまま） */
a.btn{text-decoration:none}
.btn:disabled{opacity:.55;cursor:default}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff;width:100%;padding:12px}
.btn-primary:hover{background:var(--accent-d)}
.err{font-size:12px;color:var(--bad);background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:8px 10px;margin-bottom:12px}
.ok{font-size:12px;color:#166534;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:8px 10px;margin-bottom:12px}
.login-note{font-size:11px;color:var(--muted);margin-top:16px;text-align:center;line-height:1.7}

/* ---------- アプリ ----------
   上部ヘッダーとタブは固定し、本文だけスクロールさせる（他のMCJ開発ページと同じ既定）。 */
.app{display:flex;flex-direction:column;height:100dvh;overscroll-behavior:none}
.topbar{display:flex;align-items:center;gap:10px;padding:11px 16px;background:var(--panel);border-bottom:1px solid var(--line);flex:none}
.topbar .brand{margin-bottom:0}
.topbar .brand .bt{font-size:15px}
.topbar .grow{flex:1}
.topbar .who{font-size:12px;color:var(--muted);text-align:right;line-height:1.4}
.topbar .who b{color:var(--text);font-size:13px}
.iconbtn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 10px;font-size:12px;font-weight:700;color:#374151;text-decoration:none;display:inline-flex;align-items:center}
.iconbtn:hover{background:#f3f4f6}
.tabs{display:flex;gap:4px;padding:0 12px;background:var(--panel);border-bottom:1px solid var(--line);flex:none;overflow-x:auto}
/* タブはページ遷移になったのでリンク。見た目は従来のボタンと同じに保つ */
.tabs a{border:none;background:none;padding:10px 15px;font-size:13px;font-weight:700;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap;text-decoration:none;display:inline-block}
.tabs a:hover{color:#374151}
.tabs a.on{color:var(--accent-d);border-bottom-color:var(--accent)}
.body{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:18px 16px 40px}
.wrap{max-width:1080px;margin:0 auto}
.card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:16px 18px;margin-bottom:14px}
.card h2,.list-head h2{font-size:14px;font-weight:800;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.card h2 svg,.list-head h2 svg{width:17px;height:17px;stroke:var(--accent);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.soon{font-size:12.5px;color:var(--muted);line-height:1.8}
.soon b{color:#374151}

/* ---------- ダッシュボード ---------- */
.dash-top{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.dash-top-r{margin-left:auto;display:flex;align-items:center;gap:9px}
.dash-hello{font-size:16px;font-weight:800}
.dash-sub{font-size:12px;color:var(--muted);margin-top:2px}
.dash-updated{font-size:11px;color:var(--muted)}
.tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
@media(max-width:820px){.tiles{grid-template-columns:repeat(2,1fr)}}
.tile{background:var(--panel);border:1px solid var(--line);border-radius:11px;padding:12px 14px}
.tile .tl{font-size:11px;color:var(--muted);font-weight:700;margin-bottom:4px}
.tile .tv{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.25}
.tile .tv small{font-size:11.5px;font-weight:700;color:var(--muted);margin-left:2px}
.tile .td{font-size:11px;font-weight:700;margin-top:3px;color:var(--muted)}
.tile .td.up{color:var(--ok)}.tile .td.dn{color:var(--bad)}
.dash-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:14px;align-items:start}
@media(max-width:900px){.dash-grid{grid-template-columns:1fr}}
h3.dh{font-size:13px;font-weight:800;margin-bottom:10px;display:flex;align-items:center;gap:8px}
h3.dh .hint{font-weight:400}
.dlk{margin-left:auto;font-size:11.5px;font-weight:700;color:var(--accent);text-decoration:none;cursor:pointer}
.drow{display:flex;gap:9px;align-items:center;padding:6px 0;border-bottom:1px dashed #f1f3f5;font-size:12px}
.drow:last-child{border-bottom:none}
.drow .dt{font-weight:800;font-variant-numeric:tabular-nums;color:#374151;flex:none;width:62px}
.drow .dm{flex:1;color:#4b5563;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.drow .dr{font-variant-numeric:tabular-nums;color:var(--muted);flex:none;font-size:11.5px}
/* 月別売上の棒。値そのものは右の数字で読めるので、棒は比較のためだけに置く */
.bars{display:flex;flex-direction:column;gap:5px}
.barrow{display:flex;align-items:center;gap:8px;font-size:11.5px}
.barrow .bl{width:30px;font-weight:800;color:#6b7280;flex:none;text-align:right}
.barrow .bt{flex:1;height:10px;background:#f1f5f9;border-radius:99px;overflow:hidden}
.barrow .bt i{display:block;height:100%;background:var(--accent);border-radius:99px}
.barrow .bv{width:78px;text-align:right;font-variant-numeric:tabular-nums;color:#4b5563;flex:none}
.barrow.cur .bl{color:var(--accent-d)}
.barrow.cur .bt i{background:var(--accent-d)}

/* ---------- 販売状況 ---------- */
.filters{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.filters select{border:1px solid #cbd5e1;border-radius:7px;padding:5px 9px;background:#fff;font-size:12.5px;font-weight:700;color:#374151;font-family:inherit}
.filters .grow{flex:1}
.filters .ck{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;font-weight:700;color:#4b5563;cursor:pointer}
.filters .ck input{width:auto;margin:0}
.btn-sm{padding:5px 12px;font-size:12.5px}
.scrollx{overflow-x:auto;-webkit-overflow-scrolling:touch}
table.sales{width:100%;min-width:900px;border-collapse:collapse;font-size:12.5px}
table.sales th{background:#f9fafb;text-align:left;padding:8px 10px;font-size:11px;color:var(--muted);font-weight:700;border-bottom:1px solid var(--line);white-space:nowrap;position:sticky;top:0;z-index:1}
/* 共通部分（rowspan のセル）は区間の行数ぶん縦に伸びるので、中央に置く。予約管理と同じ。 */
table.sales td{padding:8px 10px;vertical-align:middle;white-space:nowrap}
table.sales td.num{text-align:right;font-variant-numeric:tabular-nums}
/* 罫線は予約管理の予約一覧に合わせる（#d1d5db・やや濃いめ）。
   全ての行に上罫線だけを引き、下罫線は引かない。共通セルは rowspan で貫くため、
   同じ案件の区間と区間の間には「運航日時・区間」の2列ぶんだけ線が入る。 */
table.sales tr.grp>td,table.sales tr.grp-c>td{border-top:1px solid #d1d5db;border-bottom:0}
table.sales td.past{color:#9ca3af}
table.sales tr.sub td{background:#f9fafb;font-weight:800;border-top:1px solid #d1d5db;border-bottom:1px solid var(--line)}
table.sales tr.tot td{background:#eef2ff;font-weight:800;color:#3730a3;border-top:1px solid #d1d5db;border-bottom:none}
table.sales tr.head-gap td{padding:0;height:6px;border:none;background:none}
.chip{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;font-weight:700;border-radius:5px;padding:1px 7px;border:1px solid;white-space:nowrap}
.chip.CHARTER{background:#fffbeb;color:#b45309;border-color:#fde68a}
.chip.TRNG{background:#f5f3ff;color:#7c3aed;border-color:#ddd6fe}
.chip.TF{background:#ecfeff;color:#0891b2;border-color:#a5f3fc}
.chip.ORG_TRANSPORT{background:#fff1f2;color:#be123c;border-color:#fecdd3}
.chip.OWNER_FLT{background:#f0fdfa;color:#0f766e;border-color:#99f6e4}
/* ダッシュボードの「直近の運航予定」は整備・回送も出す（機体が止まる日が見えないと困るため） */
.chip.MAINTENANCE_BLOCK,.chip.FERRY{background:#f1f5f9;color:#334155;border-color:#cbd5e1}
.stat{font-size:11.5px;color:var(--muted);font-weight:700}
.note-cell{color:#9ca3af;font-weight:700;font-size:11.5px}
.empty{font-size:12.5px;color:var(--muted);padding:22px 4px;text-align:center}
.foot-note{font-size:11px;color:var(--muted);margin-top:12px;line-height:1.8}

/* ---------- 申込フォーム ---------- */
.btn-accent{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-accent:hover{background:var(--accent-d)}
.back{font-size:12px;color:var(--accent);text-decoration:none;font-weight:700}
.frow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.flbl{font-size:12px;font-weight:700;color:#374151;width:90px;flex:none}
.frow textarea{flex:1;min-width:260px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:13px;font-family:inherit}
.frow select,.frow input[type=number]{border:1px solid #cbd5e1;border-radius:7px;padding:6px 10px;font-size:13px;font-family:inherit;background:#fff}
.nums{width:80px;text-align:right}
.hint{font-size:11px;color:var(--muted);font-weight:400}
.legs-head{font-size:12px;font-weight:800;color:#374151;margin:18px 0 8px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.leg{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid var(--line);border-radius:9px;padding:9px 11px;margin-bottom:7px;background:#fcfcfd}
.leg .lno{font-size:11px;font-weight:800;color:#fff;background:var(--accent);border-radius:5px;padding:2px 7px;flex:none}
.leg input,.leg select{border:1px solid #cbd5e1;border-radius:7px;padding:6px 8px;font-size:13px;font-family:inherit;background:#fff}
.leg input[type=date]{width:150px}
.leg input[type=time]{width:100px}
.leg .ap{width:152px}
.leg .arr{font-size:12px;color:var(--muted);font-weight:700;min-width:120px}
.leg .rm{margin-left:auto;border:1px solid var(--line);background:#fff;border-radius:7px;padding:4px 9px;font-size:12px;color:var(--bad);font-weight:700}
.avail-box{margin-top:14px;border-radius:9px;padding:10px 13px;font-size:12.5px;line-height:1.7}
.avail-box.ok{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534}
.avail-box.busy{background:#fffbeb;border:1px solid #fde68a;color:#92400e}
/* お見積（他機のときだけ出す。自機は請求対象外なので金額を出さない） */
.quote-box{margin-top:12px;border:1px solid #c7d2fe;background:var(--accent-soft);border-radius:10px;padding:12px 14px}
.quote-box .qh{font-size:12px;font-weight:800;color:var(--accent-d);margin-bottom:8px}
.quote-box .qr{display:flex;justify-content:space-between;gap:12px;font-size:13px;padding:4px 0;border-bottom:1px dashed #c7d2fe}
.quote-box .qr:last-of-type{border-bottom:none}
.quote-box .qr.tot{font-weight:800;font-size:14.5px;color:var(--accent-d);border-bottom:none;border-top:1px solid #c7d2fe;margin-top:4px;padding-top:8px}
.quote-box .hint{display:block;margin-top:8px;line-height:1.7}
.banner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#fffbeb;border:1px solid #fde68a;color:#92400e;border-radius:10px;padding:11px 14px;margin-bottom:14px;font-size:12.5px;font-weight:700}
.banner .grow{flex:1}
.acbadge{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;background:var(--accent-soft);color:#3730a3;border:1px solid #c7d2fe;border-radius:99px;padding:2px 10px}

/* ---------- マイページ（モーダル） ---------- */
.ov{position:fixed;inset:0;background:rgba(17,24,39,.45);display:flex;align-items:center;justify-content:center;padding:20px;z-index:60}
.ov.hidden{display:none}
.dlg{background:var(--panel);border-radius:14px;width:100%;max-width:420px;max-height:90dvh;overflow:auto;padding:22px 24px}
.dlg h3{font-size:15px;font-weight:800;margin-bottom:4px}
.dlg .sub{font-size:12px;color:var(--muted);margin-bottom:16px}
.dlg .sec{font-size:11.5px;font-weight:800;color:var(--muted);margin:18px 0 8px;letter-spacing:.5px}
.dlg .sec:first-of-type{margin-top:0}
.dlg .row{display:flex;gap:8px;margin-top:12px}
.dlg.wide{max-width:520px}

/* ---------- 仮押さえ（プレホールド）の日付選び ---------- */
/* 「この日は飛ぶかも」を正式なリクエストの前に置く枠。確定ではないので、
   確定の予定と見分けがつくよう控えめな面で作る。 */
.hmn{display:flex;align-items:center;gap:8px;margin:6px 0 8px}
.hmn button{border:1px solid var(--line);background:#fff;border-radius:8px;width:30px;height:28px;font-size:14px;cursor:pointer;color:#374151}
.hmn .t{font-size:13px;font-weight:800;min-width:104px;text-align:center}
.hcal{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.hcal .hwd{text-align:center;font-size:11px;font-weight:700;color:var(--muted);padding:2px 0}
.hcal button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:7px 0;font-size:13px;cursor:pointer;color:#374151}
.hcal button.off{visibility:hidden}
.hcal button.past{color:#d1d5db;background:#fafafa;cursor:not-allowed}
.hcal button.on{background:#0f766e;border-color:#0f766e;color:#fff;font-weight:800}
.hcal button.sun{color:#dc2626}.hcal button.sat{color:#2563eb}
.hcal button.on.sun,.hcal button.on.sat{color:#fff}
.hsel{font-size:12px;color:var(--muted);margin-top:10px;line-height:1.7;min-height:20px}
.hsel b{color:#115e59}

/* 予定一覧の「仮押さえ」カード */
.holdcard{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:14px}
.holdcard h3{font-size:14px;font-weight:800;display:flex;align-items:center;gap:8px;margin-bottom:4px}
.holdcard h3 svg{width:17px;height:17px;stroke:#0f766e;fill:none;stroke-width:1.9}
.holdcard .lead{font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:10px}
.hrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 0;border-top:1px solid var(--line)}
.hrow .hst{font-size:11px;font-weight:800;border-radius:20px;padding:2px 9px;border:1px solid #99f6e4;background:#f0fdfa;color:#115e59;white-space:nowrap}
.hrow .hst.ask{border-color:#fed7aa;background:#fff7ed;color:#9a3412}
.hrow .hnm{font-size:13px;font-weight:700}
.hrow .hdt{font-size:12px;color:var(--muted)}
.hrow .grow{flex:1}

/* 仮押さえのやり取り。主経路は LINE なので、開かないと出ない控えめな置き方にする。 */
.hchat{border-top:1px solid var(--line);padding:10px 0 2px}
.hchat summary{cursor:pointer;font-size:12px;font-weight:700;color:var(--accent);list-style:revert}
.hchat .msgs{margin:8px 0;max-height:240px;overflow:auto;display:flex;flex-direction:column;gap:7px}
.hchat .m{font-size:12.5px;line-height:1.7;background:#f8fafc;border:1px solid var(--line);border-radius:9px;padding:7px 10px}
.hchat .m.mine{background:#eef2ff;border-color:#c7d2fe}
.hchat .m .who{font-size:11px;font-weight:800;color:var(--muted);display:flex;gap:8px}
.hchat .m .who .t{font-weight:400}
.hchat .snd{display:flex;gap:8px}
.hchat .snd textarea{flex:1;min-height:56px;font-family:inherit;font-size:13px;padding:7px 9px;border:1px solid var(--line);border-radius:9px;resize:vertical}
.hchat .note{font-size:11px;color:var(--muted);line-height:1.7;margin-top:6px}

/* ---------- 運航依頼書（mcj-reservation のフォームを iframe で開く） ---------- */
/* フォーム本体は予約管理側の1枚を共有する。こちらで作り直すと様式が二重管理になる。 */
.fm{background:var(--panel);border-radius:14px;width:100%;max-width:1000px;height:92dvh;display:flex;flex-direction:column;overflow:hidden}
.fm-h{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line)}
.fm-h .t{font-size:14px;font-weight:800}
.fm-h .s{font-size:12px;color:var(--muted)}
.fm-h .grow{flex:1}
.fm iframe{flex:1;width:100%;border:0;background:#fff}
.fm iframe.hidden{display:none}
.fm-tabs{display:flex;gap:4px}
.fm-tabs button{font-size:12.5px;font-weight:700;padding:5px 14px;border-radius:8px;border:1px solid var(--line);background:#fff;color:var(--muted);cursor:pointer}
.fm-tabs button.on{background:var(--accent);border-color:var(--accent);color:#fff}
.fm-photo{flex:1;overflow:auto;padding:18px 20px;background:#fff}
.fm-photo.hidden{display:none}
.phh{font-size:12.5px;font-weight:800;margin-bottom:8px}
.phadd{display:inline-block;font-size:12.5px;font-weight:700;padding:7px 14px;border:1px dashed var(--line);border-radius:8px;color:var(--accent);cursor:pointer}
/* 添付（写真/PDF）の一覧。サムネイルを並べていたころは何のファイルか分からず、
   名前で探せなかった。エクスプローラーの「詳細」表示に寄せて、名前・種類・サイズ・
   登録日時を列で出す。行クリックでプレビュー（.phv）。3ポータルで同じ見た目にする。 */
.phtbl{overflow-x:auto;border:1px solid var(--line);border-radius:9px}
/* 列の位置を3区分でそろえる。表ごとに幅を計算させると、ファイル名の長さで
   種類・サイズ・登録日時の位置が区分ごとにずれてしまう（幅は thead で決める）。 */
.phlist{width:100%;border-collapse:collapse;font-size:12.5px;table-layout:fixed;min-width:540px}
.phlist th:nth-child(2){width:104px}   /* 種類 */
.phlist th:nth-child(3){width:82px}    /* サイズ */
.phlist th:nth-child(4){width:126px}   /* 登録日時 */
.phlist th:nth-child(5){width:74px}    /* 削除 */
.phlist th{text-align:left;font-size:11px;color:var(--muted);font-weight:700;padding:6px 9px;border-bottom:1px solid var(--line);white-space:nowrap;background:#f8fafc}
.phlist td{padding:6px 9px;border-bottom:1px solid #f3f4f6;white-space:nowrap}
.phlist tr:last-child td{border-bottom:none}
.phlist tbody tr{cursor:pointer}
.phlist tbody tr:hover{background:#f3f7fb}
.phlist .nm{display:flex;align-items:center;gap:7px;white-space:normal;word-break:break-all;min-width:170px;font-weight:600}
.phlist .nm svg{flex:none;width:16px;height:16px;stroke:#6b7280;fill:none;stroke-width:1.6}
.phlist .r{text-align:right}
.phlist .sub{color:var(--muted);font-size:11.5px;font-weight:600}
.phdel{border:1px solid #fecaca;background:#fff;color:#991b1b;font:inherit;font-size:11px;font-weight:700;padding:3px 9px;border-radius:7px;cursor:pointer;line-height:1.7}
.phdel:hover{background:#fef2f2}
@media(max-width:640px){.phlist .kind{display:none}.phlist{min-width:430px}}
/* 添付プレビュー。← → ↑ ↓ で前後のファイルへ、Esc で閉じる */
.phv{position:fixed;inset:0;background:rgba(17,24,39,.88);z-index:120;display:none;flex-direction:column}
.phv.on{display:flex}
.phv .hd{display:flex;align-items:center;gap:10px;padding:10px 14px;color:#fff;font-size:12.5px;flex-wrap:wrap}
.phv .hd .nm{font-weight:800;word-break:break-all}
.phv .hd .mt{color:#cbd5e1;font-size:11.5px;white-space:nowrap}
.phv .hd .sp{flex:1}
.phv .hd button,.phv .hd a{border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;font:inherit;font-size:12px;font-weight:700;padding:5px 11px;border-radius:7px;cursor:pointer;text-decoration:none}
.phv .hd button:hover,.phv .hd a:hover{background:rgba(255,255,255,.14)}
.phv .bd{flex:1;display:flex;align-items:center;justify-content:center;padding:0 58px 14px;min-height:0}
.phv .bd img{max-width:100%;max-height:100%;object-fit:contain;background:#fff;border-radius:6px}
.phv .bd iframe{width:100%;height:100%;border:none;border-radius:6px;background:#fff}
.phv .bd .ld{color:#e5e7eb;font-size:13px}
.phnav{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:66px;border:none;border-radius:9px;background:rgba(255,255,255,.14);color:#fff;font-size:26px;line-height:1;cursor:pointer;padding:0}
.phnav:hover{background:rgba(255,255,255,.28)}
.phnav.pv{left:10px}.phnav.nx{right:10px}
.phnav[disabled]{opacity:.25;cursor:default}
@media(max-width:640px){.phv .bd{padding:0 8px 60px}.phnav{top:auto;bottom:8px;transform:none;height:40px;width:64px}}
/* 依頼書の状態チップ。オレンジ＝こちらで対応が要る（予約管理・代理店ポータルと同じ意味） */
.fchip{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:999px;border:1px solid transparent;white-space:nowrap}
.fchip.todo{background:#fff7ed;color:#9a3412;border-color:#fdba74}
.fchip.done{background:#f0fdf4;color:#166534;border-color:#bbf7d0}
.dlg .row .btn{flex:1}

/* ---------- 案件詳細（plan.html） ---------- */
.plan-head{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap}
.plan-head-r{margin-left:auto}
.plan-code{font-size:17px;font-weight:800;letter-spacing:.3px}
.plan-sub{font-size:12.5px;color:var(--muted);margin-top:4px;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
/* 状態のラベル。色は予約管理・代理店ポータルと同じ。
   オレンジの枠＝御社が次に動く番（全ポータル共通の意味）。 */
.ost{display:inline-block;font-size:12px;font-weight:800;padding:3px 12px;border-radius:999px;border:1px solid var(--line);background:#f9fafb;color:#374151;white-space:nowrap}
.ost.pend{box-shadow:0 0 0 2px #ea580c}
.ost.s-inq{background:#e0e7ff;color:#3730a3;border-color:#c7d2fe}
.ost.s-fr{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.ost.s-ord{background:#dcfce7;color:#166534;border-color:#86efac}
.ost.s-lost{background:#fee2e2;color:#991b1b;border-color:#fca5a5}
.ost.s-cnl{background:#fef3c7;color:#92400e;border-color:#fde68a}
.ost.s-end{background:#f1f5f9;color:#475569;border-color:#cbd5e1}
td .ost{font-size:11px;padding:2px 9px}

/* 詳細ページの操作（正式依頼・見送り・再依頼） */
.actbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px dashed var(--line)}
.actbar .grow{flex:1}
.acthint{font-size:12.5px;color:#4b5563;margin-top:10px;line-height:1.7}
.btn-danger{color:var(--bad);border-color:#fecaca}
.btn-danger:hover{background:#fef2f2}
/* ブロックの見出し（タブをやめて縦に連ねる） */
.blk{font-size:13px;font-weight:800;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:8px}
/* 進捗バー。代理店ポータルと同じ見た目にそろえる（MCJ側の段取りは出さない） */
.prog{display:flex;align-items:center;gap:0;margin:12px 0 4px;flex-wrap:wrap}
.prog .step{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:#9ca3af}
.prog .step.on{color:var(--accent)}
.prog .step.done{color:#166534}
.prog .dot{width:20px;height:20px;border-radius:50%;border:2px solid #d1d5db;display:flex;align-items:center;justify-content:center;font-size:11px}
.prog .step.on .dot{border-color:var(--accent);background:var(--accent);color:#fff}
.prog .step.done .dot{border-color:#166534;background:#166534;color:#fff}
.prog .bar{width:26px;height:2px;background:#e5e7eb;margin:0 4px}
.metarow{display:flex;gap:10px;padding:8px 0;border-top:1px dashed #f1f3f5;font-size:12.5px}
.metarow .k{flex:none;width:104px;font-weight:800;color:#374151}
.metarow .v{flex:1;color:#4b5563}
/* 運航依頼書は、運航区間の表の下に開く（独立ブロックは持たない） */
.fmwrap{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.fmwrap-h{display:flex;align-items:center;gap:9px;margin-bottom:8px}
.fmwrap-h .t{font-size:13px;font-weight:800}
.fmwrap-h .grow{flex:1}
/* 依頼書は画面いっぱいに見せる。モーダルをやめてページ内に置いたぶん、高さを確保する。 */
.planframe{width:100%;height:calc(100dvh - 320px);min-height:420px;border:1px solid var(--line);border-radius:10px;background:#fff}
.codelink{font-weight:800;color:var(--accent);text-decoration:none}
.codelink:hover{text-decoration:underline}

/* お支払い（案件詳細） */
.payrow{font-size:12.5px;font-weight:700;margin:4px 0;display:flex;align-items:center;gap:6px}
.payrow .paid{color:var(--ok);font-weight:900}
.payrow .waiting{color:var(--warn);font-weight:900}
#pt-pay .muted{font-size:12px}

/* ---------- 車両情報（提出枠） ---------- */
.vdleg{border:1px solid var(--line);border-radius:10px;margin-bottom:10px;overflow:hidden}
.vdleg-h{font-size:12px;font-weight:800;color:#374151;background:#f8fafc;border-bottom:1px solid var(--line);padding:7px 11px}
.vdrow{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:9px 11px;border-bottom:1px dashed #f1f3f5;font-size:12.5px}
.vdrow:last-child{border-bottom:none}
.vdrow .grow{flex:1}
.vdslot{font-weight:800;color:#374151;min-width:52px}
.vdap{color:#4b5563;min-width:64px}
.vdst{font-size:11px;font-weight:800;border-radius:999px;padding:2px 9px;border:1px solid;white-space:nowrap}
.vd-ok{background:#f0fdf4;color:#166534;border-color:#bbf7d0}
.vd-todo{background:#fff7ed;color:#9a3412;border-color:#fdba74}
.vd-over{background:#fef2f2;color:#991b1b;border-color:#fca5a5}
.vd-none{background:#f1f5f9;color:#475569;border-color:#cbd5e1}
.vddue{font-size:11.5px;font-weight:700;color:var(--muted)}
.vddue.near{color:var(--warn)}
.vddue.over{color:var(--bad)}
.vdfiles{display:flex;gap:6px;flex-wrap:wrap}
.vdfile{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;background:#f8fafc;border:1px solid var(--line);border-radius:7px;padding:2px 4px 2px 8px}
.vdfile a{color:var(--accent);text-decoration:none;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vdfile .vddl{color:var(--muted);font-weight:700;max-width:none}
.vdx{border:0;background:none;color:var(--muted);font-size:13px;line-height:1;cursor:pointer;padding:0 3px}
.vdx:hover{color:var(--bad)}
/* 「1つ前の枠と同じ」。書類も申し送りも参照先のものを見せる */
.vd-same{background:var(--accent-soft);color:var(--accent-d);border-color:#c7d2fe}
/* 申し送り（自由記述）。枠ごとに1行、書ききれなければ伸びる */
.vdnote{display:flex;gap:9px;align-items:flex-start;padding:0 11px 9px 11px;border-bottom:1px dashed #f1f3f5}
.vdrow+.vdnote{border-top:0}
.vdleg .vdnote:last-child{border-bottom:none}
.vdnote .k{flex:none;width:52px;font-size:11.5px;font-weight:800;color:var(--muted);padding-top:6px}
.vdnote .v{flex:1;font-size:12.5px;color:#4b5563;padding-top:6px}
.vdnote .v.ro{color:var(--muted)}
.vdnote textarea{flex:1;min-height:32px;border:1px solid #e5e7eb;border-radius:7px;padding:6px 9px;font-size:12.5px;font-family:inherit;background:#fff;resize:vertical}
.vdnote textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.vdnote textarea.saved{border-color:#bbf7d0;background:#f0fdf4}

/* ---------- 予定一覧（代理店ポータルのチャーター予約一覧と同じ構成） ----------
   見出し＋操作／絞り込みの2段を固定し、下のストリップだけスクロールさせる。
   1件＝1ストリップで、行のどこを押しても案件詳細へ入る（受付番号だけのリンクはやめた）。
   ストリップの中身は予約管理の携帯カード（order-row.js の .ocard）に寄せてある。 */
.list-sticky{position:sticky;top:0;z-index:18;background:var(--bg);padding:2px 0 8px;margin-bottom:8px;border-bottom:1px solid var(--line)}
.list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;flex-wrap:wrap}
.list-head h2{margin-bottom:0}
.list-head-r{display:flex;gap:8px;align-items:center}
/* 絞り込みの1段。日付(以降)・本日・チェック2つ・並べ替え。 */
.list-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:12px;color:var(--muted);font-weight:700}
.list-filters input[type=date]{padding:6px 8px;border:1px solid var(--line);border-radius:8px;font-size:12px;font-family:inherit}
.list-filters select{width:auto;padding:6px 10px;border:1px solid var(--line);border-radius:8px;font-size:12px;font-weight:700;color:#374151;font-family:inherit;background:#fff}
.list-filters .grow{flex:1}
.list-filters .ck{display:inline-flex;gap:5px;align-items:center;cursor:pointer;font-weight:700;color:#4b5563}
.list-filters .ck input{width:auto;margin:0}
/* 携帯は絞り込みを畳む（代理店ポータルと同じ）。既定は閉じている。 */
.filt-toggle{display:none;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:8px;padding:7px 12px;font-size:12.5px;font-weight:700;color:#374151}
.filt-toggle svg{width:14px;height:14px;stroke:#6b7280;fill:none;stroke-width:2}
.filt-toggle svg:last-child{transition:transform .15s}
.filt-toggle[aria-expanded="true"] svg:last-child{transform:rotate(180deg)}
@media(max-width:720px){
  .filt-toggle{display:inline-flex}
  .list-filters{display:none!important}
  .list-filters.open{display:flex!important;width:100%;margin-top:8px}
}

/* ストリップ本体 */
.strip{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:11px 13px;margin-bottom:9px;cursor:pointer}
.strip:hover{border-color:var(--accent);box-shadow:0 2px 12px rgba(79,70,229,.08)}
.strip:active{background:#f9fafb}
.strip.dead{opacity:.6;background:#f8f9fb;filter:grayscale(.2)}
/* 1段目 … 受付番号・区分・（右）状態 */
.strip .s-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:5px}
.strip .s-code{font-size:13px;font-weight:800;color:var(--accent-d);letter-spacing:.3px;font-variant-numeric:tabular-nums}
.strip .s-sp{flex:1}
/* 2段目 … 運航日と区間。1日1行で、往復・周遊はそのぶん行が増える */
.strip .s-day{display:flex;gap:9px;align-items:baseline;flex-wrap:wrap;margin-bottom:2px}
.strip .s-day:last-of-type{margin-bottom:0}
.strip .s-date{font-size:14px;font-weight:800;color:#374151;font-variant-numeric:tabular-nums;flex:none}
.strip .s-time{font-size:12px;font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums;flex:none}
.strip .s-route{font-size:14px;font-weight:800}
.strip .s-day.past .s-date,.strip .s-day.past .s-time,.strip .s-day.past .s-route{color:#9ca3af}
/* 3段目 … 機材まわりの補足。予約管理の .oc-sub と同じ並び */
.strip .s-sub{font-size:11.5px;color:var(--muted);margin-top:5px;display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.strip .s-sub .sep{color:#d1d5db}
.strip .s-sub b{color:#374151;font-weight:800}

/* ---------- 右上（担当者／ベル／マイページ）と携帯ドロワー ----------
   並び・色・意味は代理店ポータル(mcj-sales)に合わせてある。
   ・担当者 … いま誰として書いているか。認証ではなく表示ラベル
   ・ベル  … ページ内のお知らせ（INAPP）。赤バッジ＝未読件数
   ・マイページ … ログイン中の表示＋マイページ／ログアウト */
.icon-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;border-radius:9px;
  padding:6px 10px;font-size:12.5px;font-weight:700;color:#374151;text-decoration:none;white-space:nowrap}
.icon-btn:hover{background:#f3f4f6}
.icon-btn svg{width:15px;height:15px;stroke:#6b7280;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ctc-btn{max-width:190px}
.ctc-btn span{overflow:hidden;text-overflow:ellipsis}
.mypage-wrap{position:relative}
.mypage-btn .mp-ico{display:inline-flex}
.mypage-btn .mp-ico svg{stroke:var(--accent)}
.mypage-btn .mp-caret{width:13px;height:13px;stroke:#9ca3af;transition:transform .15s}
.mypage-btn[aria-expanded="true"] .mp-caret{transform:rotate(180deg)}
.mypage-pop{position:absolute;top:42px;right:0;min-width:230px;background:#fff;border:1px solid var(--line);
  border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.14);z-index:70;padding:6px}
.mypage-pop.hidden{display:none}
.mp-head{padding:9px 11px 10px;border-bottom:1px solid var(--line);margin-bottom:5px}
.mp-label{font-size:10.5px;font-weight:800;color:var(--muted);letter-spacing:.4px}
.mp-name{font-size:13px;font-weight:800;margin-top:2px}
.mp-sub{font-size:11px;color:var(--muted);margin-top:2px}
.mp-item{display:flex;align-items:center;gap:9px;width:100%;border:0;background:none;text-align:left;cursor:pointer;
  padding:9px 11px;border-radius:8px;font-size:13px;font-weight:700;color:#374151;text-decoration:none;font-family:inherit}
.mp-item:hover{background:#f3f4f6}
.mp-item svg{width:16px;height:16px;stroke:#6b7280;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.mp-item.danger{color:var(--bad)}
.mp-item.danger svg{stroke:var(--bad)}

/* 通知ベル */
.notif{position:relative}
.notif-btn{position:relative;border:1px solid var(--line);background:#fff;border-radius:9px;padding:6px 9px;display:inline-flex}
.notif-btn:hover{background:#f3f4f6}
.notif-btn svg{width:17px;height:17px;stroke:#6b7280;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
/* 未読のバッジ。ダッシュボードの「要対応」と同じ赤で揃える */
.notif-dot{position:absolute;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;
  background:#dc2626;color:#fff;font-size:10.5px;font-weight:800;line-height:17px;text-align:center}
.notif-pop{position:absolute;top:42px;right:0;width:320px;max-height:400px;overflow:auto;background:#fff;
  border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 40px rgba(0,0,0,.14);z-index:70}
.notif-pop.hidden{display:none}
.notif-pop .nh{display:flex;align-items:center;justify-content:space-between;padding:10px 13px;
  border-bottom:1px solid var(--line);font-size:12px;font-weight:800;position:sticky;top:0;background:#fff}
.notif-pop .nh a{font-size:11.5px;font-weight:700;color:var(--accent);cursor:pointer}
.notif-empty{padding:26px 14px;text-align:center;font-size:12.5px;color:var(--muted)}
.notif-item{padding:10px 13px;border-bottom:1px solid #f1f3f5;cursor:pointer}
.notif-item:last-child{border-bottom:none}
.notif-item:hover{background:#f9fafb}
.notif-item.unread{background:#fef2f2;border-left:3px solid #dc2626;padding-left:10px}
.notif-item .nt{font-size:12.5px;font-weight:800;margin-bottom:2px}
.notif-item .nb{font-size:12px;color:#4b5563;line-height:1.6}
.notif-item .ntime{font-size:10.5px;color:var(--muted);margin-top:3px}

/* 携帯ドロワー（ハンバーガー）。PCでは出さない */
.hamb{display:none;border:1px solid var(--line);background:#fff;border-radius:9px;padding:6px 9px}
.hamb svg{width:18px;height:18px;stroke:#374151;fill:none;stroke-width:2;stroke-linecap:round}
.navdrawer-ov{position:fixed;inset:0;background:rgba(17,24,39,.45);z-index:80;display:flex;justify-content:flex-end}
.navdrawer-ov.hidden{display:none}
.navdrawer{width:264px;max-width:82vw;background:#fff;height:100%;display:flex;flex-direction:column;padding:14px 12px}
.nd-head{display:flex;align-items:center;gap:8px;padding:2px 4px 12px;border-bottom:1px solid var(--line)}
.nd-ag{flex:1;font-size:13px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nd-x{border:0;background:none;font-size:16px;color:var(--muted);cursor:pointer;padding:2px 6px}
.nd-nav{display:flex;flex-direction:column;gap:2px;padding:10px 0;flex:1}
.nd-nav a{display:block;padding:11px 12px;border-radius:9px;font-size:13.5px;font-weight:700;color:#374151;text-decoration:none}
.nd-nav a.on{background:var(--accent-soft);color:var(--accent-d)}
.nd-foot{border-top:1px solid var(--line);padding-top:8px;display:flex;flex-direction:column;gap:2px}
.nd-item{display:flex;align-items:center;gap:9px;border:0;background:none;text-align:left;cursor:pointer;
  padding:11px 12px;border-radius:9px;font-size:13.5px;font-weight:700;color:#374151;text-decoration:none;font-family:inherit}
.nd-item:hover{background:#f3f4f6}
.nd-item svg{width:16px;height:16px;stroke:#6b7280;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.nd-item.danger{color:var(--bad)}
.nd-item.danger svg{stroke:var(--bad)}
/* 担当者を選ぶダイアログの「いま選んでいる方」 */
.btn.ctc-pick.on{background:var(--accent-soft);border-color:#c7d2fe;color:var(--accent-d)}

@media(max-width:720px){
  /* 上段はロゴ＋ベル＋ハンバーガーだけにする。担当者とマイページはドロワーへ */
  .hamb{display:inline-flex}
  .ctc-btn,.mypage-wrap{display:none}
  .topbar .who{display:none}
  .notif-pop{width:min(92vw,320px);right:-6px}
}

/* ============================================================
   マイページ（右ドロワー）。owner-mypage.js が全ページに注入する。
   もとは mypage.html という1枚のページだったが、代理店ポータルと同じ
   「右から出す／節は折りたたみ」に揃えた。設定を見るのに画面を離れずに済む。
   ============================================================ */
.my-ov{position:fixed;inset:0;background:rgba(17,24,39,.45);z-index:95;display:flex;justify-content:flex-end}
.my-dr{background:var(--panel);width:100%;max-width:420px;height:100%;display:flex;flex-direction:column;
  box-shadow:-18px 0 50px rgba(0,0,0,.22);animation:myIn .18s ease-out}
@keyframes myIn{from{transform:translateX(24px);opacity:.6}to{transform:none;opacity:1}}
.my-head{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1px solid var(--line);flex:none}
.my-head h3{flex:1;font-size:14.5px;font-weight:800}
.my-x{border:none;background:none;padding:5px;line-height:0;border-radius:7px;color:#9ca3af}
.my-x:hover{background:#f3f4f6;color:#374151}
.my-x svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.my-body{padding:18px;overflow:auto;flex:1;min-height:0}
.my-ids{display:flex;align-items:center;gap:7px;flex-wrap:wrap;background:#f8fafc;border:1px solid var(--line);
  border-radius:9px;padding:8px 11px;margin-bottom:10px}
.my-ids .k{font-size:10.5px;font-weight:700;color:var(--muted)}
.my-ids .v{font-size:12.5px;font-weight:800;color:#374151;font-family:ui-monospace,monospace}
/* 節は既定で閉じ、押したものだけ開く（縦に伸びる設定を全部開くと下が見つけにくい） */
.my-sec{border:1px solid var(--line);border-radius:10px;margin-bottom:9px;background:#fff;overflow:hidden}
.my-sec-t{width:100%;font-size:13px;font-weight:800;display:flex;align-items:center;gap:8px;
  padding:11px 13px;background:none;border:none;text-align:left;color:inherit}
.my-sec-t:hover{background:#f8fafc}
.my-sec-t span{flex:1}
.my-sec-t svg{width:15px;height:15px;stroke:var(--accent);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.my-sec-t .cv{stroke:#9ca3af;transition:transform .16s;margin-left:auto}
.my-sec.open .my-sec-t{border-bottom:1px solid var(--line);background:#f8fafc}
.my-sec.open .my-sec-t .cv{transform:rotate(180deg)}
.my-sec-b{display:none;padding:13px}
.my-sec.open .my-sec-b{display:block}
.my-sec .ck{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;color:#4b5563;cursor:pointer}
/* 設定欄の中のチェックは1行に1つ。横並びにすると2つ目を見落とす */
.my-sec .field .ck{display:flex}
.my-sec .ck input{width:auto;margin:0;flex:none}
.my-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}
.my-row select,.my-row input,.my-sec-b>input{border:1px solid var(--line);border-radius:8px;padding:8px 10px;
  font-size:12.5px;font-family:inherit;background:#fff}
.my-note{font-size:11.5px;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:8px;
  padding:7px 10px;margin-bottom:11px;line-height:1.7}
/* 別画面を開くだけのボタン。押すと何かが起きることを矢印で示す */
.my-link-btn{width:100%;margin-bottom:11px;justify-content:space-between;font-size:12.5px}
.my-link-btn::after{content:"\203A";font-size:15px;color:#9ca3af}

/* iPhone の「ホーム画面に追加」手順。ドロワーの上に重ねるので z-index はさらに上 */
.ios-ov{z-index:96;align-items:center;justify-content:center;padding:16px}
.ios-dlg{background:var(--panel);border-radius:14px;width:100%;max-width:440px;max-height:88dvh;
  display:flex;flex-direction:column;overflow:hidden}
.ios-body{padding:16px 18px 18px;overflow:auto}
.ios-steps{margin:0 0 12px;padding-left:20px;font-size:12.5px;color:#374151;line-height:1.9}
.ios-steps li{margin-bottom:4px}

@media(max-width:720px){
  .my-dr{max-width:none}
}
/* 通知先の1件。幅420pxのドロワーに1行で詰めると内容の長短で行の作りが変わるので、
   「名前＋状態／URL／用途＋操作」の3段に固定する。 */
.my-ch{border:1px solid var(--line);border-radius:9px;padding:9px 11px;margin-bottom:7px;font-size:12.5px}
.my-ch .r1{display:flex;align-items:center;gap:7px}
.my-ch .nm{flex:1;font-weight:800;color:#374151;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.my-ch .url{font-size:11px;color:var(--muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.my-ch .r2{display:flex;align-items:center;gap:7px;margin-top:8px}
.my-ch .r2 .hint{flex:1}
.my-ch .er{font-size:11px;color:var(--bad);margin-top:6px;line-height:1.6}
