/* 个别：运管桌面 B2 布局。配色只改 :root / [data-theme] 变量。默认 ① ネイビー。 */
:root, html[data-theme="1"] {
  --ink: #15202b;
  --muted: #5b6b7a;
  --line: #c5d0da;
  --bg: #e6edf3;
  --paper: #ffffff;
  --header: #13283a;
  --primary: #1a4f7a;
  --head-row: #e4eef5;
  --fixed: #f0f5f9;
  --banner: #3a4f66;
  --banner-ink: #eef4f8;
  --header-ink: #eef4f8;
  --header-muted: #b7c6d4;
  --accent-line: #3d7ab0;
  --ghost-border: #8aa0b3;
  --add-line: #8aa0b3;
  --sheet-wrap: #d5dee6;
}
html[data-theme="2"] {
  --ink: #0f2438;
  --muted: #3e6a7a;
  --line: #c5dde0;
  --bg: #f4f8fb;
  --paper: #ffffff;
  --header: #0a4ea3;
  --primary: #0b7d7a;
  --head-row: #e6f4f3;
  --fixed: #eef7f8;
  --banner: #0d47a1;
  --banner-ink: #e8f1ff;
  --header-ink: #f4f9ff;
  --header-muted: #c5dbf2;
  --accent-line: #14b8a6;
  --ghost-border: #7eb0b8;
  --add-line: #7eb0b8;
  --sheet-wrap: #dceeee;
}
html[data-theme="3"] {
  --ink: #1a1640;
  --muted: #5a5a78;
  --line: #c9d6e8;
  --bg: #e8f2fb;
  --paper: #ffffff;
  --header: #1c1a4a;
  --primary: #c45c26;
  --head-row: #e8e9f6;
  --fixed: #eef3fb;
  --banner: #3a3560;
  --banner-ink: #eeeaf8;
  --header-ink: #f3f1ff;
  --header-muted: #c4c0e0;
  --accent-line: #d4a017;
  --ghost-border: #8b89b0;
  --add-line: #8b89b0;
  --sheet-wrap: #d4e4f4;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans CJK JP", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.45;
  min-width: 1280px;
}
.banner {
  background: var(--banner);
  color: var(--banner-ink);
  text-align: center;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 5px 16px;
}
header.app {
  background: var(--header);
  color: var(--header-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  border-bottom: 3px solid var(--accent-line);
}
header.app h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .08em; }
header.app .sub { margin: 1px 0 0; font-size: 11px; color: var(--header-muted); }
header.app .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--header-muted);
}
.ghost {
  background: transparent;
  border: 1px solid var(--ghost-border);
  color: var(--header-ink);
  border-radius: 3px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ghost.ink { border-color: var(--line); color: var(--muted); }
.wrap { max-width: 1440px; margin: 0 auto; padding: 12px 24px 24px; }
h2.sec {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--header);
}
table.info {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--paper);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
table.info col.c-lab { width: 11%; }
table.info col.c-val { width: 14%; }
table.info th, table.info td {
  border: 1px solid var(--line);
  padding: 5px 8px;
  vertical-align: middle;
  font-size: 13px;
}
table.info th {
  background: var(--head-row);
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  text-align: left;
  letter-spacing: .04em;
  white-space: nowrap;
}
table.info tr.fixed td { background: var(--fixed); font-weight: 700; }
table.info tr.edit td { background: var(--paper); }
table.info input, table.info select {
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px 7px;
  background: var(--paper);
  width: 100%;
  height: 26px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 12px;
  align-items: start;
}
@media (min-width: 1400px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 480px; }
}
.table-block {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
}
table.orders {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}
table.orders thead th {
  background: var(--head-row);
  font-weight: 700;
  text-align: left;
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  white-space: nowrap;
  font-size: 11px;
}
table.orders thead th:last-child { border-right: 0; }
table.orders td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
  background: var(--paper);
}
table.orders td:last-child { border-right: 0; }
table.orders tr.detail td { background: var(--fixed); vertical-align: top; }
table.orders input, table.orders select {
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px 5px;
  background: var(--paper);
  width: 100%;
  height: 26px;
}
.stack { display: flex; flex-direction: column; gap: 4px; }
.cell-lab {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 2px;
}
.cell-lab.spaced { margin-top: 4px; }
.col-num { width: 32px; text-align: center; }
.col-name { width: 200px; }
.col-place { width: 158px; }
.col-pax { width: 44px; }
.col-yen { width: 64px; }
.col-act { width: 64px; }
table.orders .ghost { white-space: nowrap; padding: 4px 6px; cursor: pointer; }
.fee-note { display: grid; grid-template-columns: 80px 1fr; gap: 8px; align-items: end; }
.fee-note .mini { display: flex; flex-direction: column; gap: 2px; font-size: 10px; color: var(--muted); }
.btn-add {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-top: 1px dashed var(--add-line);
  background: var(--fixed);
  color: var(--header);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}
.table-note {
  margin: 0;
  padding: 4px 10px 6px;
  font-size: 11px;
  color: var(--muted);
  background: var(--fixed);
  border-top: 1px solid var(--line);
}
.preview-pane {
  position: sticky;
  top: 8px;
  align-self: start;
  max-height: calc(100vh - 16px);
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 8px;
}
.tabs { display: flex; flex-wrap: wrap; }
.tabs button {
  font: inherit;
  font-size: 12px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: var(--fixed);
  color: var(--muted);
  cursor: pointer;
}
.tabs button:first-child { border-radius: 4px 0 0 4px; }
.tabs button + button { border-left: 0; }
.tabs button:last-child { border-radius: 0 4px 4px 0; }
.tabs button.is-on { background: var(--header); color: #fff; border-color: var(--header); }
.sheet-wrap {
  background: var(--sheet-wrap);
  padding: 6px 8px;
  min-height: 240px;
}
.sheet-wrap .pdf-page { display: block; width: 100%; height: auto; background: #fff; }
.pane-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 4px 10px 6px;
}
.btn {
  font: inherit;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 8px 18px;
}
.form-error {
  margin: 0 0 10px;
  padding: 6px 10px;
  background: #fdecea;
  color: #8a1f11;
  border: 1px solid #e7b6ae;
  border-radius: 3px;
  font-size: 12px;
}
.form-error[hidden], [hidden] { display: none !important; }
.save-status { font-size: 11px; color: var(--muted); margin: 0 10px 0 auto; }
.preview-empty {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* login */
.login-main {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.login-card {
  width: 480px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 32px 24px;
}
.login-card h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: .08em;
  text-align: center;
}
.login-card .lead {
  margin: 0 0 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.login-card label.f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.login-card input {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
  width: 100%;
  height: 36px;
  background: var(--paper);
}
.login-card .btn-primary { width: 100%; margin-top: 4px; height: 40px; }
.login-card .note {
  margin: 14px 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: normal;
}

.when { display: flex; flex-direction: column; gap: 4px; }
.when input[type="date"],
.when input[type="time"] { width: 100%; flex: none; min-width: 0; }
header.app form { margin: 0; }
