/* CANDLE — 深い紺（通信の信頼感）に、琥珀色の灯り */
:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --text: #2a2118;
  --muted: #6a5c4e;
  --border: #e4d9c8;
  --accent: #b45309;        /* 琥珀（濃いめ：白地・白文字とも 5:1 以上） */
  --accent-dark: #92400e;
  --accent-soft: #fff3e0;
  --flame: #f59e0b;         /* 装飾用の明るい琥珀（文字には使わない） */
  --navy: #1b2436;
  --danger: #b42318;
  --ok-bg: #e6f4ea;
  --ok-text: #1e6b34;
  --error-bg: #fdecea;
  --error-text: #a12622;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Yu Gothic UI", "Meiryo UI", "Hiragino Sans", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
main { flex: 1; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- 上部バー ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  min-height: 56px;
  background: var(--navy);
  border-bottom: 3px solid var(--flame);
  color: #fff;
  flex-wrap: wrap;
}
.topbar a { color: #d9e0ee; }
.topbar nav a:hover { color: #fff; text-decoration-color: var(--flame); }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 0; }
.topbar .brand:hover { text-decoration: none; }
.brand-icon { width: 20px; height: 30px; flex: none; filter: drop-shadow(0 0 6px rgba(245, 158, 11, .55)); }
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: 0.08em; }
.brand-sub { font-size: 10px; font-weight: 400; color: #a9b7d0; letter-spacing: 0; }
.brand-sub strong { color: #ffc46b; font-weight: 700; }
.topbar nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.topbar .account { display: flex; gap: 14px; align-items: center; }
.topbar form { margin: 0; }
.clock { color: #b9c4d8; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 900px) {
  .brand-sub { display: none; }
  .topbar { row-gap: 0; }
  .topbar .brand { order: 1; }
  .topbar .account { order: 2; margin-left: auto; }
  .topbar nav { order: 3; flex: 1 0 100%; gap: 6px 16px; padding: 2px 0 8px; }
}
@media (max-width: 480px) {
  .clock { display: none; }
}

main { max-width: 1180px; width: 100%; margin: 0 auto; padding: 24px 16px 64px; }

h1 { font-size: 22px; margin: 0 0 16px; }
h1 small { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 10px; }
h2 { font-size: 17px; margin: 28px 0 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(60, 40, 10, .04);
}
.card.narrow { max-width: 460px; margin: 48px auto; }
.card > h2:first-child { margin-top: 0; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-text); }
.flash.error { background: var(--error-bg); color: var(--error-text); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input[type=search] { flex: 1 1 280px; }
.filters select { max-width: 260px; }

input[type=text], input[type=search], input[type=password], input[type=email], input[type=date], select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d3c5ae;
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: inherit;
}
input:disabled { background: #f1ebe1; color: var(--muted); }
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.filters input, .filters select { width: auto; }
.filters input[type=search] { width: auto; }

button, .button {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #d3c5ae;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: #f7efe1; text-decoration: none; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button.danger { color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: var(--error-bg); }
button.small, .button.small { padding: 3px 10px; font-size: 13px; }
button.link { background: none; border: none; color: #d9e0ee; padding: 0; }
button.link:hover { background: none; text-decoration: underline; }

.summary { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; color: var(--muted); }

/* overflow-x:auto は overflow-y も auto にする（縦スクロールも自前で持つ）ことで、
   見出し行の sticky（画面ではなく、この枠の中でスクロール）が正しく効く様にする */
.table-wrap { overflow: auto; max-height: 75vh; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; min-width: 640px; border-collapse: collapse; }   /* 狭い画面では、文字が潰れず横にスクロールする */
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f7efe1; font-size: 13px; white-space: nowrap; }
th a { color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fffaf1; }
td.addr { min-width: 260px; font-size: 14px; }
table.customers { min-width: 880px; }
table.customers td:nth-child(2) { min-width: 11em; }
table.customers td:nth-child(3) { min-width: 13em; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 18px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
.row, .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .wide { grid-column: 1 / -1; }
.grid2 label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
th.group-head { background: #f3ead9; text-align: left; font-size: 13px; }
.export-ok { color: var(--ok-text); }
.export-warn { color: var(--danger); font-weight: 600; }
tr.export-warn-row td { background: #fffaf9; }
table.export td, table.export th { vertical-align: top; }
.export-cells { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--muted); }
.ntt-secret { margin: 0 0 12px; padding: 10px 14px; background: #fffaf9; border: 1px solid var(--border); border-left: 4px solid var(--danger); border-radius: 8px; }
.notice-band { padding: 12px 16px; background: var(--accent-soft); border-left: 4px solid var(--accent); }
.notice-band p { margin: 0; }
.req { color: var(--danger); font-size: 12px; font-weight: 400; margin-left: 6px; }

.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.card > .actions { margin-top: 20px; }
/* 入力フォームの保存・キャンセルのボタンは、画面が縦に長くても、下端に貼り付いて常に見える（フォームの終わりに来ると、通常の位置に収まる） */
form.stack > .actions:last-child {
  position: sticky; bottom: 0; z-index: 10;
  margin-top: 16px; padding: 12px 0;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -8px 10px -8px rgba(60, 40, 10, .2);
}

.muted { color: var(--muted); }
.badge { display: inline-block; padding: 1px 10px; border-radius: 10px; font-size: 12px; background: #efe6d6; }
.badge.create { background: var(--ok-bg); color: var(--ok-text); }
.badge.delete { background: var(--error-bg); color: var(--error-text); }
.badge.restore { background: #fff3d6; color: #7a5300; }
.field-label { display: inline-block; min-width: 4.5em; color: var(--muted); font-size: 13px; }
.old { color: var(--muted); text-decoration: line-through; }
.new { font-weight: 600; }
footer.site-footer { max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 16px 28px; color: var(--muted); font-size: 13px; text-align: center; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input[type=text] { flex: 1 1 280px; width: auto; }

/* ---- 顧客ごとのPC・端末 ---- */
table.pcs { min-width: 900px; }
.pc-more td { padding-top: 0; }
.pc-more details { font-size: 14px; }
.pc-more summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.pc-more .detail { grid-template-columns: 110px 1fr; margin-top: 8px; }
.pc-more .detail dd.pre { white-space: pre-wrap; word-break: break-word; }
.pc-more form { margin-top: 10px; }
form.inline { display: inline; margin: 0; }
form.mail-test-send { display: block; margin-top: 16px; }
.password-unlock { margin-top: 6px; font-size: 13px; color: var(--muted); }
.small { font-size: 12px; }
.badge.st-active { background: var(--ok-bg); color: var(--ok-text); }
.badge.st-ended { background: #ece7de; color: #5d5245; }
.badge.st-upcoming { background: #fff3d6; color: #7a5300; }
.badge.st-none { background: #efe6d6; color: var(--muted); }
.secret-value { margin: 12px 0; padding: 12px 14px; background: #fff7e6; border: 1px solid #f0d9a8; border-radius: 8px; font-size: 18px; word-break: break-all; }

/* ---- 従業員台帳 ---- */
table.employees { min-width: 1050px; }
.employee-more td { padding-top: 0; }
.employee-more details { font-size: 14px; }
.employee-more summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.employee-more .detail { grid-template-columns: 110px 1fr; margin-top: 8px; }
.employee-more .detail dd.pre { white-space: pre-wrap; word-break: break-word; }

/* ---- 経費 ---- */
table.expenses { min-width: 860px; }
.num { text-align: right; }
.center { text-align: center; }
.check-toggle { margin: 0; }
.check-toggle input[type=checkbox] { width: auto; margin: 0; }
.summary strong { margin-left: 4px; }

/* ---- 品目マスタ ---- */
table.items { min-width: 820px; }
.item-more td { padding-top: 0; }
.item-more details { font-size: 14px; }
.item-more summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.item-more .detail { grid-template-columns: 110px 1fr; margin-top: 8px; }
.item-more .detail dd.pre { white-space: pre-wrap; word-break: break-word; }

/* ---- 見積書 ---- */
table.quotes { min-width: 900px; }
table.qi-table { min-width: 1100px; }
table.qi-table select, table.qi-table input[type=text] { width: auto; min-width: 90px; }
table.qi-table .qi-item-select { min-width: 220px; }
table.qi-table .qi-name { min-width: 160px; }
table.qi-table .qi-quantity, table.qi-table .qi-unit-price { min-width: 70px; text-align: right; }
table.qi-table .qi-amount { white-space: nowrap; }
.quote-totals { display: flex; justify-content: flex-end; gap: 28px; padding: 12px 4px; border-top: 1px solid var(--border); margin: 4px 0; }
.quote-totals strong { margin-left: 6px; font-size: 16px; }
.quote-totals .quote-total-amount { font-size: 20px; color: var(--accent-dark); }

/* ---- 顧客ごとのネットワーク機器 ---- */
table.devices { min-width: 900px; }
table.ntt { min-width: 760px; }
.device-note { min-width: 120px; }
.device-note details { font-size: 14px; }
.device-note summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.device-note details.memo-secret summary { color: var(--danger); }
.device-note .pre { white-space: pre-wrap; word-break: break-word; margin-top: 6px; }
form.danger-zone { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ---- 顧客ごとのメモ ---- */
.memo { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--flame); border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; }
.memo.secret { border-left-color: var(--danger); background: #fffaf9; }
.memo header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.memo-title { font-size: 15px; }
.memo-customer { margin: 4px 0 0; font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.memo-body { white-space: pre-wrap; word-break: break-word; margin-top: 8px; font-size: 14px; }
.memo-secret { margin-top: 8px; }
.memo-secret summary { cursor: pointer; color: var(--danger); font-size: 13px; }
.memo-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; font-size: 12px; }
.secret-badge { background: #fde2df; color: var(--danger); font-weight: 700; }
textarea { width: 100%; padding: 8px 10px; border: 1px solid #d3c5ae; border-radius: 6px; font: inherit; line-height: 1.6; resize: vertical; background: #fff; color: inherit; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
label.check input { width: auto; }
h2 .button { margin-left: 10px; vertical-align: middle; }
.checklist { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0; }
tr.user-more td { padding-top: 0; }

.subtitle { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.subtitle strong { color: var(--accent); }

.postal-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: -6px;
  padding: 8px 12px;
  background: #fff7e6;
  border: 1px solid #f0d9a8;
  border-radius: 6px;
  font-size: 14px;
}
.postal-result[hidden] { display: none; }
.postal-error { color: var(--error-text); }

.detail { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; margin: 0; }
.detail dt { color: var(--muted); font-size: 13px; padding-top: 2px; }
.detail dd { margin: 0; }

/* ---- ログイン画面：紺の夜に、灯り ---- */
body.login {
  background: radial-gradient(ellipse at 50% 18%, #36425f 0%, var(--navy) 52%, #121a29 100%);
  background-attachment: fixed;
}
body.login main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 96px 16px 32px; }
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 32px 28px;
  background: #fffdf9;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(245, 158, 11, .18);
  text-align: center;
}
.login-card .stack { text-align: left; }
.login-card h1 { margin: 4px 0 6px; font-size: 28px; letter-spacing: 0.12em; }
.login-lead { margin: 14px 0 18px; color: var(--muted); }
.login-candle {
  display: block;
  width: 56px;
  height: 84px;
  margin: -84px auto 0;            /* カードの上に、少し はみ出させる */
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, .8));
}
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 3.2s ease-in-out infinite; }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  20% { transform: scale(1.03, .98) rotate(-1.2deg); }
  45% { transform: scale(.97, 1.04) rotate(1deg); }
  70% { transform: scale(1.02, .99) rotate(-.6deg); }
}
@media (prefers-reduced-motion: reduce) { .flame { animation: none; } }
footer.site-footer .sep { margin: 0 6px; }
.release.current { border-left: 4px solid var(--flame); }
.release h2 { margin-top: 0; }
.release-date { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.release-title { margin: 0 0 6px; font-weight: 600; }
.release ul { margin: 0; padding-left: 20px; }
.release li { margin-bottom: 3px; }
body.login footer.site-footer { color: #b9c4d8; }
body.login footer.site-footer a { color: #ffc46b; }
body.login .flash { max-width: 400px; margin-left: auto; margin-right: auto; }

@media (max-width: 640px) {
  .topbar { min-height: 0; padding: 8px 16px; gap: 10px; }
  .row, .grid2 { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; gap: 2px; }
  .detail dd { margin-bottom: 10px; }
  .login-card { padding: 28px 20px 24px; }
}

button:disabled { opacity: .45; cursor: not-allowed; }

/* NTT一覧：表の中で直接編集する入力欄（普段は枠を目立たせず、触ると入力欄と分かる） */
table.ntt .ntt-inline { width: 10em; padding: 4px 6px; font-size: 13px; border-color: transparent; background: transparent; }
table.ntt .ntt-inline:hover { border-color: var(--border); background: var(--surface); }
table.ntt .ntt-inline:focus { border-color: var(--accent); background: var(--surface); }
table.ntt .ntt-inline.saved { border-color: #4a9a5b; background: #eef8f0; }
table.ntt .ntt-inline.failed { border-color: var(--danger); background: var(--error-bg); }
table.ntt select.ntt-inline { width: auto; min-width: 7em; border-color: var(--border); background: var(--surface); }
table.ntt input.ntt-inline[data-field="申込日"] { width: 10em; }
table.ntt input.ntt-inline[data-field="p_number"] { width: 9.5em; }
table.ntt input.ntt-inline[data-field="U番"] { width: 9em; }
table.ntt input.ntt-inline[data-field="contract_name"] { width: 16em; }
table.ntt th, table.ntt td { padding-left: 6px; padding-right: 6px; }
table.ntt td.ntt-addr { min-width: 11em; }
table.ntt td.ntt-ops { min-width: 8em; }
table.ntt td.ntt-ops .button { margin: 0 2px 4px 0; }

/* 入力例（placeholder）は、入力済みの値と区別できるよう、薄く・斜体にする */
::placeholder { color: #b5a690; font-style: italic; opacity: 1; }

/* 画面の下に出る通知（NTT一覧の保存など） */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; max-width: min(92vw, 560px);
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #fff; background: #3a3226;
  box-shadow: 0 4px 14px rgba(40, 25, 5, .3); opacity: 0; pointer-events: none; transition: opacity .15s; }
.toast.show { opacity: 1; }
.toast.ok { background: #2f7d45; }
.toast.error { background: var(--danger); }
.toast.saving { background: #6b5b45; }

/* NTT一覧：編集できる欄だと分かるよう、枠は常に薄く見せる */
table.ntt .ntt-inline { border-color: var(--border); background: var(--surface); }

/* 帯に集めた複製・削除などのボタン（元のフォームは隠す。削除は右端へ） */
form.moved-to-bar { display: none !important; }
form.stack > .actions button.danger { margin-left: auto; }

/* 一覧画面（表が直接置かれた画面）は、横幅を広げる。入力フォームなどは、読みやすい幅のまま */
main:has(> .table-wrap) { max-width: 1680px; }
main:has(> .table-wrap) ~ footer.site-footer, body:has(main > .table-wrap) footer.site-footer { max-width: 1680px; }

/* 横に長い表でも、末尾の操作ボタン（編集・複製など）は、右端に貼り付いて常に見える */
.table-wrap th:last-child:empty { position: sticky; right: 0; }
.table-wrap td:last-child:has(> .button, > form) { position: sticky; right: 0; background: var(--surface); }
.table-wrap td:last-child:has(> .button, > form) { box-shadow: -8px 0 8px -8px rgba(60, 40, 10, .25); }

/* 一覧画面の表は、縦にスクロールしても見出し行が隠れない様に、画面の上に貼り付ける */
main:has(> .table-wrap) table thead th { position: sticky; top: 0; z-index: 6; box-shadow: 0 1px 0 var(--border); }

/* 一覧の「顧客・拠点」欄は、会社名が1文字ずつ縦に折り返されない様に、最低限の幅を確保する */
.col-customer { min-width: 12em; }

/* 未入力の日付欄（ブラウザが出す「年/月/日」）は、値と混同しない様に薄く見せる */
input[type="date"].date-empty { color: var(--muted); }

/* 日付の入力欄の下に出る曜日（祝日名つき） */
.weekday { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted); }
.weekday:empty { display: none; }
.weekday.sat { color: #2b6cb0; }
.weekday.sun { color: #c0392b; }
table.ntt input.ntt-inline[data-field="NTT申込日"], table.ntt input.ntt-inline[data-field="NTT現場調日"], table.ntt input.ntt-inline[data-field="NTT工事日"] { width: 10em; }

/* NTT一覧：状況の進み具合が一目でわかる様に、状況をピル形のバッジ風に見せる（進行順：登録待ち→設備検討待ち→現調待ち→工事待ち→開通済み） */
table.ntt select.ntt-inline[data-field="status"] {
  appearance: none; -webkit-appearance: none;
  width: auto; min-width: 8.5em; padding: 4px 26px 4px 24px; border-radius: 999px; border-width: 1px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
  background-repeat: no-repeat; background-position: right 9px center, left 11px center; background-size: 10px, 8px;
  box-shadow: 0 1px 2px rgba(60, 40, 10, .08);
  transition: box-shadow .15s, transform .1s;
}
table.ntt select.ntt-inline[data-field="status"]:hover { box-shadow: 0 2px 6px rgba(60, 40, 10, .16); transform: translateY(-1px); }
table.ntt select.ntt-inline[data-field="status"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23887a63'/%3E%3C/svg%3E");
}
table.ntt select.ntt-inline[data-field="status"][data-orig="登録待ち"] { background-color: #efece5; border-color: #d8d0bf; color: #6a5c4e; }
table.ntt select.ntt-inline[data-field="status"][data-orig="登録待ち"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236a5c4e'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='4' fill='%23a89a86'/%3E%3C/svg%3E"); }
table.ntt select.ntt-inline[data-field="status"][data-orig="設備検討待ち"] { background-color: #e8f0fa; border-color: #b7cbe0; color: #2b5580; }
table.ntt select.ntt-inline[data-field="status"][data-orig="設備検討待ち"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%232b5580'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='4' fill='%234f86c6'/%3E%3C/svg%3E"); }
table.ntt select.ntt-inline[data-field="status"][data-orig="現調待ち"] { background-color: #fff2d1; border-color: #e0c27a; color: #7a5300; }
table.ntt select.ntt-inline[data-field="status"][data-orig="現調待ち"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a5300'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='4' fill='%23e0a531'/%3E%3C/svg%3E"); }
table.ntt select.ntt-inline[data-field="status"][data-orig="工事待ち"] { background-color: #fde3cd; border-color: #e0a86a; color: #8a4a10; }
table.ntt select.ntt-inline[data-field="status"][data-orig="工事待ち"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a4a10'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='4' fill='%23dc7a2e'/%3E%3C/svg%3E"); }
table.ntt select.ntt-inline[data-field="status"][data-orig="開通済み"] { background-color: var(--ok-bg); border-color: #4a9a5b; color: var(--ok-text); }
table.ntt select.ntt-inline[data-field="status"][data-orig="開通済み"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231e6b34'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='4' fill='%2331a34a'/%3E%3C/svg%3E"); }

/* メモのカード：編集ボタンを押さずに、日付・件名・内容を直接その場で編集できる（普段は枠を見せず、地の文の様に見せる） */
.memo-inline { border: 1px solid transparent; background: transparent; padding: 3px 6px; margin: -3px -6px; border-radius: 4px; font: inherit; color: inherit; }
.memo-inline:hover { border-color: var(--border); background: var(--surface); }
.memo-inline:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.memo-inline.saved { border-color: #4a9a5b; background: #eef8f0; }
.memo-inline.failed { border-color: var(--danger); background: var(--error-bg); }
input.memo-title { font-weight: 700; font-size: 15px; width: 22em; max-width: 100%; }
input.memo-date { width: 9.5em; }
textarea.memo-body-input { width: 100%; margin-top: 8px; resize: none; overflow: hidden; word-break: break-word; line-height: 1.6; min-height: 1.7em; }
textarea.memo-body-input:not(:hover):not(:focus) { border-color: transparent; }
