/* =========================================================================
   EVE JAPAN 受発注管理システム — Prototype
   Design concept: "Athletic Operations Console" の土台（A 案）に、
   D 案（Claude Design・D-80 で確定）のトークンを重ねたもの。
   D 案＝ブランド緑 #00A344、青みを抜いた黒、ニュートラルグレーの地、角を締めた角丸、無彩色の影。
   レイアウト・コンポーネント・書体（Archivo ＋ Noto Sans JP）は A 案と共通＝トークンだけが違う。
   ⚠ D 案は --green（成功・正常の信号色）も #00832F にしている＝ブランド色と信号色が同系。
   ========================================================================= */

:root {
  /* brand & ink（D 案） */
  --brand: #00A344;
  --brand-700: #00832F;
  --brand-050: #e9f7ef;
  --brand-100: #c7ecd7;
  --ink: #0a0a0a;
  --ink-2: #333333;
  --muted: #6e6e6e;
  --muted-2: #9a9a9a;

  /* surfaces（D 案） */
  --bg: #f4f5f7;
  --bg-deep: #ebedf0;
  --surface: #ffffff;
  --surface-2: #f7f8f9;
  --line: #dcdfe4;
  --line-2: #eceef1;

  /* signal palette（--green は D 案の上書き。amber/red/slate は A 案のまま） */
  --green: #00832F;
  --green-bg: #e9f7ef;
  --amber: #ca8504;
  --amber-bg: #fdf3df;
  --red: #d83b3b;
  --red-bg: #fdecec;
  --slate: #5b6573;
  --slate-bg: #eef1f6;

  /* type */
  --f-display: 'Archivo', 'Noto Sans JP', sans-serif;
  --f-body: 'Noto Sans JP', 'Archivo', sans-serif;
  --f-num: 'Archivo', sans-serif;

  /* shape（D 案＝角を締める・影は無彩色） */
  --r-sm: 5px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --sh-1: 0 1px 2px rgba(10, 10, 10, .06), 0 1px 3px rgba(10, 10, 10, .05);
  --sh-2: 0 4px 14px rgba(10, 10, 10, .07), 0 2px 6px rgba(10, 10, 10, .05);
  --sh-3: 0 18px 50px rgba(10, 10, 10, .18), 0 6px 16px rgba(10, 10, 10, .10);

  --sidebar-w: 256px;
  --topbar-h: 62px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

/* inline SVG icon sizing (default + per-context) */
svg.ic { width: 16px; height: 16px; flex: 0 0 auto; display: inline-block; vertical-align: -3px; }
.cell-sub svg.ic, .li-meta svg.ic, .tm svg.ic, .op-item-meta svg.ic { width: 13px; height: 13px; vertical-align: -2px; }
.crumbs svg.ic { width: 14px; height: 14px; }
.stat .k svg.ic { width: 15px; height: 15px; }
.note-info > svg.ic { width: 18px; height: 18px; }
.preview-ribbon svg.ic { width: 15px; height: 15px; vertical-align: -3px; }
.op-thumb svg.ic { width: 22px; height: 22px; vertical-align: 0; }
.op-step-label .n, .stepper-q button { vertical-align: middle; }
.issue-check svg.ic, .op-done .ck svg.ic { width: 26px; height: 26px; stroke-width: 2.4; }
.li-empty > svg.ic, .empty-soft svg.ic { width: 30px; height: 30px; opacity: .55; }
.page-head .right svg.ic { width: 15px; height: 15px; }

/* ============================ App shell ================================ */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(190deg, #0c1b33 0%, #0a1426 60%, #080f1d 100%);
  color: #c9d4e6;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid #0a1322;
  overflow: hidden;
}
.sidebar::before {
  /* subtle athletic diagonal stripe */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    repeating-linear-gradient(125deg, transparent 0 22px, rgba(0,163,68,.05) 22px 23px);
  mask: linear-gradient(180deg, #000 0 120px, transparent 280px);
}
.brand { padding: 18px 20px 14px; display: flex; align-items: center; gap: 11px; position: relative; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand), #1fbf5f);
  display: grid; place-items: center; color: #fff; font-family: var(--f-display);
  font-weight: 800; font-size: 17px; letter-spacing: -.03em;
  box-shadow: 0 6px 18px rgba(0,163,68,.4), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand-name { font-family: var(--f-display); font-weight: 700; color: #fff; font-size: 14.5px; line-height: 1.15; letter-spacing: .01em; }
.brand-sub { font-size: 10.5px; color: #7d8aa3; letter-spacing: .04em; }

.nav { padding: 6px 12px 12px; position: relative; overflow-y: auto; flex: 1; }
.nav-sec { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #5f6e8a; padding: 16px 12px 7px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm);
  color: #aeb9cd; font-size: 13.5px; font-weight: 500; position: relative; margin: 1px 0;
  transition: background .14s, color .14s;
}
.nav-item .ic { width: 18px; height: 18px; opacity: .85; flex: 0 0 auto; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #eaf0fb; }
.nav-item.active { background: linear-gradient(90deg, rgba(0,163,68,.22), rgba(0,163,68,.05)); color: #fff; }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand); box-shadow: 0 0 12px rgba(0,163,68,.7);
}
.nav-item .pill { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.1); color: #cdd8ec; border-radius: 20px; padding: 1px 8px; font-family: var(--f-num); }
.nav-item.active .pill { background: var(--brand); color: #fff; }
.nav-ext { margin-left: auto; font-size: 12px; color: #6f7d99; font-weight: 700; }
.nav-item:hover .nav-ext { color: #cdd8ec; }

.side-foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255,255,255,.07); position: relative; }
.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#00b34f,#00A344); color:#fff; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 13px; }
.user-name { color: #e6ecf7; font-size: 12.5px; font-weight: 600; }
.user-role { color: #7d8aa3; font-size: 10.5px; }

/* main */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.crumbs b { color: var(--ink); font-weight: 700; }
.crumbs .sep { color: var(--muted-2); }
.topbar-spacer { flex: 1; }
.env-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  color: var(--amber); background: var(--amber-bg); border: 1px solid #f2dba0; border-radius: 20px; padding: 4px 11px;
}
.env-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(202,133,4,.18); }

.content { padding: 26px 30px 64px; width: 100%; } /* 横幅の上限なし＝広い画面では表を一杯に使う（2026-09-02 森井氏） */
.page-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 25px; letter-spacing: -.02em; }
.page-desc { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head .right { margin-left: auto; display: flex; gap: 10px; }

/* ============================ Buttons ================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 9px 15px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600;
  transition: all .14s ease; white-space: nowrap; box-shadow: var(--sh-1);
}
.btn:hover { border-color: var(--muted-2); color: var(--ink); transform: translateY(-1px); box-shadow: var(--sh-2); }
.btn:active { transform: translateY(0); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(180deg, #00b34f, var(--brand)); border-color: var(--brand-700); color: #fff; box-shadow: 0 6px 16px rgba(0,163,68,.28); }
.btn-primary:hover { background: linear-gradient(180deg, #12b556, #00832F); color: #fff; box-shadow: 0 10px 22px rgba(0,163,68,.34); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; color: var(--ink); }
.btn-lg { padding: 12px 22px; font-size: 14px; border-radius: var(--r); }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-danger-ghost { color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-bg); border-color: #f3c4c4; color: var(--red); }

/* ============================ Cards / tiles =========================== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 20px 22px; }
.card-head { padding: 16px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.card-head h3 { font-size: 15px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.grid { display: grid; gap: 16px; }
.stat-grid { grid-template-columns: repeat(4, 1fr); }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 17px 18px; box-shadow: var(--sh-1); position: relative; overflow: hidden;
}
.stat::after { content: ''; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle, var(--brand-050), transparent 70%); }
.stat .k { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .02em; display: flex; align-items: center; gap: 7px; }
.stat .v { font-family: var(--f-num); font-weight: 800; font-size: 30px; letter-spacing: -.02em; margin-top: 6px; line-height: 1; }
.stat .v small { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.stat .d .up { color: var(--green); font-weight: 700; }

/* ============================ Tables ================================== */
.tbl-wrap { overflow: auto; border-radius: var(--r-lg); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 700; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
table.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--brand-050); }
.cell-strong { font-weight: 700; color: var(--ink); }
.cell-mono { font-family: var(--f-num); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cell-sub { color: var(--muted); font-size: 11.5px; }
.t-right { text-align: right; }
.t-center { text-align: center; }

/* ============================ Badges / chips ========================== */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; border-radius: 20px; padding: 3px 10px; letter-spacing: .01em; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge--open { color: var(--brand); background: var(--brand-050); }
.badge--open .dot { background: var(--brand); }
.badge--closed { color: var(--slate); background: var(--slate-bg); }
.badge--closed .dot { background: var(--slate); }
.badge--confirmed { color: var(--green); background: var(--green-bg); }
.badge--confirmed .dot { background: var(--green); }
.badge--draft { color: var(--muted); background: var(--line-2); }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 2px 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.chip--brand { background: var(--brand-050); border-color: var(--brand-100); color: var(--brand-700); }
.chip--amber { background: var(--amber-bg); border-color: #f2dba0; color: var(--amber); }
.chip--slate { background: var(--slate-bg); border-color: var(--line); color: var(--slate); }
.chip--cat { background: #fff; }

.tag-method { font-size: 11px; font-weight: 600; color: var(--muted); }

/* ============================ Forms / inputs ========================== */
.field { display: block; margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.req { color: var(--red); font-weight: 800; margin-left: 3px; }
.input, .select, textarea.input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px;
  font-size: 13.5px; font-family: var(--f-body); color: var(--ink); background: var(--surface);
  transition: border-color .14s, box-shadow .14s;
}
.input:focus, .select:focus, textarea.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,163,68,.16); }
.input::placeholder { color: var(--muted-2); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7585' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* toggle */
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 10px; background: var(--surface); }
.toggle-row .tt { font-weight: 600; font-size: 13px; }
.toggle-row .ts { font-size: 11.5px; color: var(--muted); }
.switch { margin-left: auto; width: 42px; height: 24px; border-radius: 20px; background: #cdd4e0; position: relative; transition: background .16s; flex: 0 0 auto; border: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform .16s; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }

/* radio cards */
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-card { border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 15px; cursor: pointer; transition: all .14s; background: var(--surface); position: relative; }
.radio-card:hover { border-color: var(--brand-100); }
.radio-card.sel { border-color: var(--brand); background: var(--brand-050); box-shadow: 0 0 0 3px rgba(0,163,68,.1); }
.radio-card .rc-t { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.radio-card .rc-d { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.radio-card .rc-check { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); }
.radio-card.sel .rc-check { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 3px #fff; }

/* ============================ Wizard ================================== */
.wizard { display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start; }
.stepper { position: sticky; top: calc(var(--topbar-h) + 22px); }
.step { display: flex; gap: 13px; padding: 7px 0; position: relative; }
.step:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 36px; bottom: -4px; width: 2px; background: var(--line); }
.step.done:not(:last-child)::before { background: var(--brand); }
.step .sdot { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-family: var(--f-num); font-weight: 700; font-size: 13px; background: var(--surface); border: 2px solid var(--line); color: var(--muted); z-index: 1; transition: all .16s; }
.step.active .sdot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px rgba(0,163,68,.14); }
.step.done .sdot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step .st { font-weight: 700; font-size: 13px; color: var(--ink-2); padding-top: 5px; }
.step .ss { font-size: 11px; color: var(--muted); }
.step.active .st { color: var(--ink); }

.wizard-panel { min-height: 380px; }
.panel-title { font-size: 18px; margin-bottom: 3px; }
.panel-desc { color: var(--muted); font-size: 12.5px; margin-bottom: 20px; }
.wizard-foot { display: flex; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.wizard-foot .spacer { flex: 1; }

/* team pick list */
.pick-list { display: grid; gap: 8px; max-height: 340px; overflow: auto; padding-right: 4px; }
.pick { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; transition: all .13s; background: var(--surface); }
.pick:hover { border-color: var(--brand-100); background: var(--surface-2); }
.pick.sel { border-color: var(--brand); background: var(--brand-050); box-shadow: 0 0 0 3px rgba(0,163,68,.1); }
.tlogo { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg,#dde8fb,#eef3fc); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; color: var(--brand-700); font-size: 14px; flex: 0 0 auto; }
.tlogo-xs { width: 22px; height: 22px; border-radius: 5px; background: linear-gradient(135deg,#dde8fb,#eef3fc); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; color: var(--brand-700); font-size: 10px; flex: 0 0 auto; }
.op-hero-top { display: flex; align-items: center; gap: 14px; position: relative; }
.op-logo { width: 56px; height: 56px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--brand); flex: 0 0 auto; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.op-logo .pthumb { padding: 5px; }

/* team detail (SFA account hub) */
.tlink { color: var(--ink); text-decoration: none; font-weight: 700; }
.tlink:hover { color: var(--brand-700); text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13px; }
.back-link:hover { color: var(--brand-700); }
.back-link svg.ic { width: 15px; height: 15px; }
.acct-hero { display: flex; align-items: center; gap: 18px; padding: 20px 22px; }
.acct-logo { width: 64px; height: 64px; border-radius: 15px; background: linear-gradient(135deg,#dde8fb,#eef3fc); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; color: var(--brand-700); font-size: 24px; flex: 0 0 auto; }
.acct-main { flex: 1; min-width: 0; }
.acct-name { font-size: 22px; letter-spacing: -.01em; }
.acct-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.acct-cta { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; align-items: stretch; }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
.tl { list-style: none; padding: 0; margin: 0; }
.tl li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.tl li:last-child { border-bottom: none; }
.tl-k { flex: 0 0 auto; height: fit-content; font-size: 11px; font-weight: 700; color: var(--brand-700); background: var(--brand-050); border: 1px solid var(--brand-100); border-radius: 6px; padding: 2px 9px; }
.tl-t { font-size: 13.5px; font-weight: 600; }
.tl-d { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (max-width:1080px){ .detail-grid { grid-template-columns: 1fr; } .acct-hero { flex-wrap: wrap; } .acct-cta { width: 100%; flex-direction: row; } }
.pick .tn { font-weight: 700; font-size: 13.5px; }
.pick .tm { font-size: 11.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }

/* product picker */
.sku-search { position: relative; margin-bottom: 14px; }
.sku-pop { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); max-height: 320px; overflow: auto; padding: 6px; }
.sku-opt { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: var(--r-sm); cursor: pointer; }
.sku-opt:hover, .sku-opt.hl { background: var(--brand-050); }
.sku-opt .sku-code { font-family: var(--f-num); font-weight: 700; font-size: 12.5px; color: var(--brand-700); background: var(--brand-050); border: 1px solid var(--brand-100); border-radius: 5px; padding: 1px 7px; flex: 0 0 auto; }
.sku-opt .sku-nm { font-weight: 600; font-size: 13px; }
.sku-opt .sku-meta { font-size: 11px; color: var(--muted); }
.sku-opt .sku-price { margin-left: auto; font-family: var(--f-num); font-weight: 700; color: var(--ink-2); }

.line-item { display: grid; grid-template-columns: 1fr 130px 44px; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 9px; background: var(--surface); box-shadow: var(--sh-1); animation: fadeUp .25s ease both; }
.li-main { min-width: 0; display: flex; gap: 11px; align-items: center; }
.li-top { display: flex; align-items: center; gap: 9px; }
.li-sku { font-family: var(--f-num); font-weight: 700; font-size: 12px; color: var(--brand-700); }
.li-name { font-weight: 700; font-size: 13.5px; }
.li-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.price-field { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 9px; background: var(--surface-2); }
.price-field .yen { color: var(--muted); font-weight: 700; }
.price-field input { border: none; background: transparent; width: 100%; text-align: right; font-family: var(--f-num); font-weight: 700; font-size: 14px; color: var(--ink); outline: none; }
.price-field.edited { border-color: var(--amber); background: var(--amber-bg); }
.li-del { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); display: grid; place-items: center; transition: all .13s; }
.li-del:hover { color: var(--red); border-color: #f3c4c4; background: var(--red-bg); }
.li-empty { text-align: center; padding: 34px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r); font-size: 13px; }

/* review / preview step */
.review-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.kv { display: flex; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .kk { color: var(--muted); width: 120px; flex: 0 0 auto; font-weight: 600; }
.kv .vv { font-weight: 600; color: var(--ink); }
.sum-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; color: var(--ink-2); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-top: 6px; border-top: 2px solid var(--ink); }
.sum-total .lbl { font-weight: 700; }
.sum-total .amt { font-family: var(--f-num); font-weight: 800; font-size: 24px; letter-spacing: -.02em; }

/* phone preview frame inside review */
.phone { width: 264px; margin: 0 auto; border: 9px solid #11192b; border-radius: 34px; overflow: hidden; box-shadow: var(--sh-3); background: #fff; }
.phone-scroll { height: 420px; overflow: auto; background: var(--surface-2); }

/* ============================ Modal =================================== */
.overlay { position: fixed; inset: 0; background: rgba(8,15,28,.55); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fadeIn .18s ease; }
.modal { background: var(--surface); border-radius: var(--r-xl); width: 100%; max-width: 520px; box-shadow: var(--sh-3); overflow: hidden; animation: pop .26s cubic-bezier(.2,.9,.3,1.3) both; }
.modal-x { position: absolute; top: 18px; right: 20px; }

/* issue success */
.issue-hero { background: linear-gradient(160deg, #0c1b33, #0a1426); color: #fff; padding: 26px 26px 22px; text-align: center; position: relative; overflow: hidden; }
.issue-hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(125deg, transparent 0 26px, rgba(0,163,68,.08) 26px 27px); }
.issue-check { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg,#1fc16b,#15a05a); display: grid; place-items: center; margin: 0 auto 12px; box-shadow: 0 8px 22px rgba(21,160,90,.45); position: relative; animation: pop .4s cubic-bezier(.2,.9,.3,1.4) both .05s; }
.issue-hero h3 { color: #fff; font-size: 19px; position: relative; }
.issue-hero p { color: #aebbd2; font-size: 12.5px; margin: 4px 0 0; position: relative; }
.issue-body { padding: 22px 26px 26px; }
.qr-row { display: flex; gap: 18px; align-items: center; }
.qr { width: 116px; height: 116px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: #fff; box-shadow: var(--sh-1); }
.url-box { flex: 1; min-width: 0; }
.url-label { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.url-field { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; background: var(--surface-2); margin-top: 6px; }
.url-field .u { font-family: var(--f-num); font-size: 12.5px; color: var(--brand-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; font-weight: 600; }
.share-row { display: flex; gap: 9px; margin-top: 16px; }
.share-row .btn { flex: 1; }
.copied-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: var(--sh-3); z-index: 200; animation: toastUp .3s ease both; }

/* ============================ Order preview page ====================== */
.order-page { max-width: 460px; margin: 0 auto; }
.op-hero { background: linear-gradient(155deg, #0c1b33, #0a1730 55%, #06122a); color: #fff; border-radius: 0 0 var(--r-xl) var(--r-xl); padding: 22px 22px 24px; position: relative; overflow: hidden; }
.op-hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(125deg, transparent 0 24px, rgba(0,163,68,.1) 24px 25px); opacity: .7; }
.op-eve { font-family: var(--f-display); font-weight: 800; font-size: 12px; letter-spacing: .14em; color: #5fa3ff; position: relative; }
.op-team { font-family: var(--f-display); font-size: 22px; color: #fff; margin-top: 6px; position: relative; letter-spacing: -.01em; }
.op-sub { color: #aebbd2; font-size: 12px; margin-top: 4px; position: relative; }
.op-deadline { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; background: rgba(202,133,4,.16); border: 1px solid rgba(247,191,80,.3); color: #ffd591; border-radius: 20px; padding: 6px 13px; font-size: 12px; font-weight: 700; position: relative; }
.op-deadline .dot { width: 7px; height: 7px; border-radius: 50%; background: #ffc14d; animation: pulse 1.6s infinite; }
.op-body { padding: 18px 16px 120px; }
.op-step-label { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .03em; margin: 16px 4px 9px; display: flex; align-items: center; gap: 8px; }
.op-step-label .n { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; font-family: var(--f-num); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.op-item { border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; margin-bottom: 11px; background: var(--surface); box-shadow: var(--sh-1); }
.op-item-top { display: flex; gap: 12px; align-items: center; }
.op-thumb { width: 46px; height: 46px; border-radius: 9px; background: linear-gradient(135deg,#e7eefb,#f3f6fc); display: grid; place-items: center; flex: 0 0 auto; color: var(--brand); }

/* product thumbnails (image with icon fallback) */
.thumb { position: relative; overflow: hidden; }
.thumb .pthumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mthumb { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg,#e7eefb,#f3f6fc); display: grid; place-items: center; color: var(--brand); flex: 0 0 auto; }
.mthumb svg.ic { width: 18px; height: 18px; }
.lthumb { width: 44px; height: 44px; border-radius: 9px; background: linear-gradient(135deg,#e7eefb,#f3f6fc); display: grid; place-items: center; color: var(--brand); flex: 0 0 auto; }
.lthumb svg.ic { width: 20px; height: 20px; }
.op-item-nm { font-weight: 700; font-size: 13.5px; }
.op-item-meta { font-size: 11px; color: var(--muted); margin-top: 1px; }
.op-item-price { margin-left: auto; font-family: var(--f-num); font-weight: 800; font-size: 15px; }
.size-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.size-chip { min-width: 40px; text-align: center; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-family: var(--f-num); font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: all .12s; background: var(--surface); }
.size-chip:hover { border-color: var(--brand-100); }
.size-chip.sel { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 4px 10px rgba(0,163,68,.3); }
/* 赤黒訂正：当初の計上行は書き換えず、取消（赤）＋再計上（黒）を追記する */
.corr-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.corr-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 11px;
  border-radius: 8px; background: var(--surface-2); border-left: 3px solid var(--slate); }
.corr-row.is-red { border-left-color: var(--red); }
.corr-row.is-black { border-left-color: var(--ink); }
.corr-row .num { font-weight: 800; }
/* はじめての方へ（顧客がひとりで開いたときの入口） ------------------------- */
.intro { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 16px;
  border-left: 3px solid var(--brand); background: linear-gradient(90deg, var(--brand-050), var(--surface) 60%); }
.intro-l { flex: 1 1 420px; }
.intro-l b { display: block; font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.intro-l span { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
.intro-r { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
/* タブ・分析のバー・「次のステップ」のナビ表示 ----------------------------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.tab { border: none; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700;
  padding: 7px 16px; border-radius: 999px; cursor: pointer; transition: all .14s; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--surface); color: var(--brand); box-shadow: var(--sh-1); }
.ana-bars { display: flex; flex-direction: column; gap: 9px; }
.ana-bar { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 12px; align-items: center; font-size: 13px; }
.ana-l { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ana-t { height: 9px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.ana-t i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-700)); border-radius: 999px; }
.nav-item--next { opacity: .5; }
.nav-item--next:hover { opacity: .75; }
/* 月次締め（例外・確認・承認・確定）--------------------------------------- */
.close-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 12px; }
.close-grid > div { display: flex; flex-direction: column; gap: 4px; }
.close-grid b { font-size: 18px; font-weight: 800; }
.ex-block { padding: 12px 0; border-top: 1px solid var(--line-2); }
.ex-h { display: flex; align-items: center; gap: 8px; }
.ex-h b { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.ex-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ex-list li { font-size: 13px; color: var(--ink-2); padding: 7px 10px; background: var(--surface-2); border-radius: 8px; }
.close-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.close-step { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r-md, 11px); background: var(--surface); }
.close-step.is-done { border-color: var(--green); background: var(--green-bg); }
.close-step > div:first-child { flex: 1 1 320px; }
.close-step b { display: block; font-size: 14px; font-weight: 800; }
.close-step span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.close-step em { display: block; font-size: 12px; font-style: normal; color: var(--green); font-weight: 700; margin-top: 4px; }
.close-step .btn, .close-step .gate-ok { margin-left: auto; }
.close-step .deny-note { flex: 1 1 100%; margin-left: 0; }
.aud-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
@media (max-width: 900px) { .close-grid { grid-template-columns: 1fr; } }
/* 入金の充当（売掛／前受の振り分け）------------------------------------- */
.alloc-head { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md, 11px); }
.alloc-head > div { display: flex; flex-direction: column; gap: 3px; }
.alloc-head b { font-size: 14px; font-weight: 800; }
.alloc-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.alloc-row { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; }
/* 検算バー：入金額と充当額が一致するまで確定できない（充当誤りを構造で防ぐ） */
.alloc-check { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; margin-top: 16px;
  padding: 13px 15px; border-radius: var(--r-md, 11px); border: 1.5px solid var(--red); background: var(--red-bg); }
.alloc-check.is-ok { border-color: var(--green); background: var(--green-bg); }
.alloc-check > div { display: flex; flex-direction: column; gap: 2px; }
.alloc-check b { font-size: 11px; font-weight: 700; color: var(--muted); }
.alloc-check span { font-family: var(--f-num); font-size: 17px; font-weight: 800; }
.alloc-check .alloc-msg { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--red); }
.alloc-check.is-ok .alloc-msg { color: var(--green); }
.alloc-check .alloc-msg svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 720px) { .alloc-head, .alloc-check { grid-template-columns: 1fr 1fr; } .alloc-row { grid-template-columns: 1fr; } }
/* 請求チャネル（Bill One / 千葉銀行 / 現金）------------------------------- */
.ch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.ch-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md, 11px);
  cursor: pointer; transition: border-color .14s, box-shadow .14s, transform .14s; font: inherit; color: inherit; }
.ch-card:hover { border-color: var(--brand); box-shadow: var(--sh-2); transform: translateY(-1px); }
.ch-card b { font-size: 15px; font-weight: 800; color: var(--ink); }
.ch-card span { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.ch-card em { font-size: 11.5px; color: var(--muted); font-style: normal; line-height: 1.6; }
.ch-card--info { cursor: default; background: var(--surface-2); }
.ch-card--info:hover { border-color: var(--line); box-shadow: none; transform: none; }
@media (max-width: 1080px) { .ch-grid { grid-template-columns: 1fr; } }
/* 「次のステップ」＝今回は作らないものを、画面で線引きして見せる */
.next-step { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding: 12px 16px;
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-md, 11px); }
.next-step > div { flex: 1 1 320px; }
.next-step b { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.next-step span { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 2px; }
.next-step .btn { margin-left: auto; }
.sheet-bank { margin-top: 14px; padding: 9px 11px; background: #f6f6f6; border: 1px solid #e3e3e3; font-size: 11.5px; }
.sheet-bank span { color: #777; }
/* 納品・納品書 --------------------------------------------------------- */
.dn-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line-2); }
.dn-row > div:first-child { flex: 1 1 260px; min-width: 0; }
.dn-no { font-size: 14px; font-weight: 800; color: var(--ink); }
.modal--doc { width: min(760px, 94vw); max-width: none; max-height: 90vh; overflow: auto; background: var(--surface); border-radius: var(--r-lg, 16px); }
.mod-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.mod-head h3 { font-size: 16px; font-weight: 800; margin: 0; }
.mod-head .x { margin-left: auto; border: none; background: transparent; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.mod-head .x:hover { background: var(--surface-2); color: var(--ink); }
.mod-body { padding: 20px; }
.sheet-wrap { background: var(--bg-deep); }
/* 帳票そのものの見た目（A4 風・画像は使わず CSS だけで描く） */
.sheet { position: relative; background: #fff; color: #111; padding: 30px 32px; border: 1px solid #ddd;
  box-shadow: 0 8px 26px rgba(11,23,44,.13); font-size: 12.5px; line-height: 1.7; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid #111; }
.sheet-title { font-size: 22px; font-weight: 800; letter-spacing: .28em; }
.sheet-no { font-size: 12px; color: #555; margin-top: 4px; }
.sheet-issuer { text-align: right; }
.sheet-issuer b { display: block; font-size: 13px; }
.sheet-issuer span { display: block; font-size: 11px; color: #555; }
.sheet-to { margin: 16px 0 12px; }
.sheet-to b { font-size: 15px; border-bottom: 1px solid #111; padding-bottom: 2px; }
.sheet-to span { display: block; margin-top: 8px; color: #444; }
.sheet-kv { display: flex; gap: 24px; flex-wrap: wrap; padding: 10px 12px; background: #f6f6f6; border: 1px solid #e3e3e3; margin-bottom: 14px; }
.sheet-kv span { font-size: 11px; color: #666; margin-right: 6px; }
.sheet-kv b { font-size: 13px; }
.sheet-tbl { width: 100%; border-collapse: collapse; }
.sheet-tbl th, .sheet-tbl td { border: 1px solid #cfcfcf; padding: 7px 9px; }
.sheet-tbl thead th { background: #f0f0f0; font-weight: 700; font-size: 11.5px; }
.sheet-tbl tfoot td { background: #f6f6f6; font-weight: 800; }
.sheet-tbl .t-right { text-align: right; }
.sheet-re { margin-top: 12px; padding: 8px 10px; border: 1px dashed #c33; color: #c33; font-size: 11.5px; }
.sheet-foot { margin-top: 16px; padding-top: 10px; border-top: 1px solid #e3e3e3; font-size: 10.5px; color: #777; }
/* 再発行は帳票そのものに表示が出る（恣意的な再発行を抑止する） */
.sheet--re { border-color: #c33; }
.sheet-stamp { position: absolute; top: 22px; right: 30px; border: 3px solid #c33; color: #c33;
  font-size: 17px; font-weight: 800; letter-spacing: .18em; padding: 5px 14px; border-radius: 5px;
  transform: rotate(-11deg); opacity: .82; }
/* 受注の条件（使用日・外注加工・請求モード）＝受注時に必ず埋まっている項目 */
.od-cond { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line-2); }
.od-cond > div { display: flex; flex-direction: column; gap: 2px; }
.od-cond b { font-size: 14px; font-weight: 800; color: var(--ink); }
@media (max-width: 900px) { .od-cond { grid-template-columns: 1fr; } }
/* 仕様確認ゲート：受注と発注のあいだの関所。未通過は赤、通過は緑で状態が一目で分かる */
.gate { border-left: 3px solid var(--red); }
.gate.gate--ok { border-left-color: var(--green); }
.gate .od-sec-t { display: flex; align-items: center; }
.gate .od-sec-t svg { width: 16px; height: 16px; margin-right: 6px; }
.gate-lead { font-size: 13px; line-height: 1.7; color: var(--ink-2); margin: 2px 0 14px; }
.gate-row { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.2fr); gap: 14px;
  align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); }
.gate-row .gate-rl b { display: block; font-size: 14px; font-weight: 800; color: var(--ink); }
.gate-row .gate-rl span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.6; }
.gate-row.is-done .gate-rl b { color: var(--ink-2); }
.gate-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--green); }
.gate-ok svg { width: 15px; height: 15px; }
.gate-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.gate-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.gate-chk input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
/* 確認項目の 3 値（確認済み／おまかせ／未） */
.gate-items { display: grid; gap: 6px; }
.gate-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gate-item-l { font-size: 13px; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface-2); }
.seg button { border: none; background: transparent; font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); padding: 3px 10px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--brand-700); box-shadow: var(--sh-1); }
.seg button.on.on-om { color: var(--amber); }
/* 単価の承認（D-91）：承認対象のスナップショット */
.price-tbl { font-size: 12.5px; }
.price-tbl th, .price-tbl td { padding: 6px 8px; }
.price-tbl tr.is-changed td { background: var(--red-bg); }
.gate-note { padding-top: 12px; border-top: 1px solid var(--line-2); }
.gate-note textarea { margin-top: 6px; }
/* 誰として操作しているか（職務分掌の実演。画面の出し分けはせず実行可否だけ変わる） */
.who { display: inline-flex; align-items: center; gap: 8px; margin-right: 12px; }
.who-l { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.side-note { margin-top: 10px; font-size: 11px; line-height: 1.6; color: rgba(255,255,255,.44); }
/* 権限が無くて押せないときの説明（止めたら必ず「次にどうすればよいか」を書く） */
.deny-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 9px 11px;
  background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent);
  border-radius: 9px; font-size: 12px; line-height: 1.6; color: var(--ink-2); }
.deny-note svg { flex: none; width: 15px; height: 15px; color: var(--amber); margin-top: 1px; }
/* 自己検証の結果：画面には出さないがヘッドレス検証から読めるよう DOM には残す */
.selfcheck-result { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* 未入力のまま確定しようとしたときの指摘（サイズ未選択・氏名未入力） */
.size-chips.op-need { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 8px; }
.input.op-need { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.qty-row { display: flex; align-items: center; gap: 12px; margin-top: 11px; }
.qty-row .ql { font-size: 12px; color: var(--muted); font-weight: 600; }
.stepper-q { margin-left: auto; display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper-q button { width: 32px; height: 32px; border: none; background: var(--surface-2); color: var(--ink-2); font-size: 17px; font-weight: 700; }
.stepper-q button:hover { background: var(--brand-050); color: var(--brand); }
.stepper-q .qv { width: 38px; text-align: center; font-family: var(--f-num); font-weight: 700; }
.jersey-input { display: grid; grid-template-columns: 1fr 86px; gap: 9px; margin-top: 11px; }
.jersey-num { position: relative; }
.jersey-num input { text-align: center; font-family: var(--f-display); font-weight: 800; font-size: 18px; padding-right: 12px; }
.op-cart { position: fixed; bottom: 0; left: 0; right: 0; max-width: 460px; margin: 0 auto; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 13px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 -8px 24px rgba(11,23,44,.1); }
.op-cart .ct-l { font-size: 11px; color: var(--muted); font-weight: 600; }
.op-cart .ct-v { font-family: var(--f-num); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.op-cart .btn { margin-left: auto; }
.op-done { text-align: center; padding: 60px 24px; }
.op-done .ck { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg,#1fc16b,#15a05a); display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 10px 26px rgba(21,160,90,.4); animation: pop .4s cubic-bezier(.2,.9,.3,1.4) both; }

/* preview top ribbon */
.preview-ribbon { background: var(--ink); color: #fff; font-size: 12px; padding: 8px 16px; display: flex; align-items: center; gap: 10px; justify-content: center; }
.preview-ribbon b { color: #7fb3ff; }

/* ============================ Misc ==================================== */
.empty-soft { text-align: center; padding: 50px 20px; color: var(--muted); }
.fade-up { animation: fadeUp .4s ease both; }
.d1 { animation-delay: .04s; } .d2 { animation-delay: .08s; } .d3 { animation-delay: .12s; } .d4 { animation-delay: .16s; } .d5 { animation-delay: .2s; } .d6 { animation-delay: .24s; }
.hr { height: 1px; background: var(--line-2); border: none; margin: 18px 0; }
.note-info { display: flex; gap: 10px; padding: 12px 14px; background: var(--brand-050); border: 1px solid var(--brand-100); border-radius: var(--r); font-size: 12.5px; color: var(--brand-700); }
.note-info .ic { flex: 0 0 auto; margin-top: 1px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes toastUp { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .wizard { grid-template-columns: 1fr; }
  .stepper { position: static; display: flex; gap: 10px; overflow: auto; }
  .step:not(:last-child)::before { display: none; }
  .review-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   受注ステータスボード / ロール / 台帳 / 発注出力（追加コンポーネント）
   既存トークンのみ使用。lane-* がボールの所在（担当ロール）色を供給する。
   ========================================================================= */
.lane-sales { --lane: var(--brand); --lane-bg: var(--brand-050); }
.lane-buyer { --lane: var(--amber); --lane-bg: var(--amber-bg); }
.lane-eve   { --lane: var(--green); --lane-bg: var(--green-bg); }
.lane-acct  { --lane: var(--red);   --lane-bg: var(--red-bg); }
.lane-all   { --lane: var(--slate); --lane-bg: var(--slate-bg); }
.role-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lane, var(--muted)); flex: 0 0 auto; display: inline-block; }

/* chip 追加色 */
.chip--red { background: var(--red-bg); border-color: #f3c4c4; color: var(--red); }

/* nav 強調/淡色 + ★ */
.nav-item--dim { opacity: .38; }
.nav-sec--dim { opacity: .4; }
.nav-star { color: #ffd14d; font-size: 11px; margin-left: 5px; vertical-align: 1px; }

/* topbar ロールスイッチ */
.role-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.rs-btn { display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; transition: all .14s; }
.rs-btn:hover { color: var(--ink); }
.rs-btn .rs-emoji { font-size: 13px; }
.rs-btn.on { background: var(--surface); color: var(--lane, var(--ink)); box-shadow: var(--sh-1); }
.rs-btn.on::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lane); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lane) 22%, transparent); }
.rs-btn.lane-all.on::before { display: none; }
/* 社外（閲覧のみ）の担当は仕切りで区画し、レーン色は無彩色にする */
.rs-btn.lane-ext { --lane: var(--slate); }
.rs-btn.lane-ext.on { color: var(--slate); }
.rs-sep { width: 1px; align-self: stretch; margin: 3px 5px; background: var(--line); }
/* 保護者同意（D-76） */
.consent-box.op-need { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.6; color: var(--ink-2); cursor: pointer; }
.consent-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: 0 0 auto; }
.consent-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; }
.consent-meta .select { width: auto; min-width: 140px; }
/* 加工費の実績入力（D-51） */
.fee-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.fee-row .input { width: 150px; padding: 5px 8px; font-size: 12.5px; }
/* 発注：送信証跡の入力（D-67）と仕入単価の表（FR-103） */
.out-foot--wrap { flex-wrap: wrap; gap: 8px; }
.cost-tbl { font-size: 12.5px; margin-top: 4px; }
.cost-tbl th, .cost-tbl td { padding: 6px 8px; }
.cost-in { width: 96px; padding: 4px 8px; font-size: 12px; }
/* 請求媒体 4 枚（D-60） */
.ch-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ch-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* board head */
.board-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.bl-item { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.board-hint { display: flex; align-items: center; gap: 6px; margin: 2px 0 12px; }

/* role-summary tiles */
.role-tiles { grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; }
.role-tile { cursor: pointer; transition: border-color .14s, box-shadow .14s, transform .14s; border-left: 3px solid var(--lane); }
.role-tile:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.role-tile.is-active { border-color: var(--lane); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lane) 16%, transparent); }
.role-tile .k { color: var(--ink-2); }
.role-tile .rt-emoji { font-size: 15px; }
.role-tile .v small { font-size: 12px; }
.role-tile .rt-alert { color: var(--red); font-weight: 800; display: inline-flex; align-items: center; gap: 3px; }
.role-tile .rt-alert svg.ic { width: 13px; height: 13px; }
.role-tile .rt-stages { display: block; margin-top: 2px; font-weight: 500; }

/* kanban */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; }
.kanban-col { flex: 0 0 252px; width: 252px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; scroll-snap-align: start; transition: opacity .18s; }
.kanban-col--dim { opacity: .42; }
.kanban-col-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface-2); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.kanban-col-head .kc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lane); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lane) 18%, transparent); }
.kanban-col-head .kc-label { font-family: var(--f-display); font-weight: 700; font-size: 12.5px; color: var(--ink); }
.kanban-col-head .kc-count { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; min-width: 22px; text-align: center; padding: 0 7px; }
.kanban-col-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; min-height: 70px; }
.kc-empty { text-align: center; color: var(--muted-2); padding: 14px 0; font-size: 13px; }
.kanban-card { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--lane); border-radius: var(--r); padding: 11px 12px; cursor: pointer; box-shadow: var(--sh-1); transition: transform .12s, box-shadow .12s; animation: fadeUp .3s ease both; }
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.kc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kc-top .li-sku { font-size: 11.5px; }
.kc-alert { font-size: 10px; padding: 1px 6px; }
.kc-team { display: flex; align-items: center; gap: 6px; margin: 7px 0 8px; font-weight: 700; font-size: 13px; }
.kc-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-amount { font-family: var(--f-num); font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.kc-entry { display: flex; align-items: center; gap: 8px; }
.kc-entry-bar { flex: 1; height: 7px; background: var(--line-2); border-radius: 20px; overflow: hidden; }
.kc-entry-bar span { display: block; height: 100%; background: linear-gradient(90deg, #1fbf5f, var(--brand)); border-radius: 20px; }
.kc-next { font-size: 11.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }
.kc-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line-2); font-size: 11px; font-weight: 700; color: var(--lane); }

/* mini pipeline (table rows + drawer header) */
.pipe { display: inline-flex; gap: 3px; align-items: center; }
.pipe-seg { width: 13px; height: 7px; border-radius: 3px; background: var(--line); }
.pipe-seg.done { background: var(--lane); }
.pipe-seg.current { background: var(--lane); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--lane); }
.pipe-seg.future { background: var(--line); }

/* stage badge (outline, colored by lane) */
.stage-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; border-radius: 20px; padding: 3px 11px; color: var(--lane); background: color-mix(in srgb, var(--lane) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--lane) 30%, transparent); }

/* ledger checkmarks */
.ledger-tbl td.lc { font-size: 14px; }
.ledger-tbl .lc-on { color: var(--green); font-weight: 800; }
.ledger-tbl .lc-off { color: var(--muted-2); }

/* drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(8,15,28,.5); backdrop-filter: blur(2px); z-index: 110; opacity: 0; transition: opacity .2s; }
.drawer-scrim.show { opacity: 1; }
.drawer { position: absolute; right: 0; top: 0; height: 100vh; width: min(560px, 94vw); background: var(--surface); box-shadow: var(--sh-3); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.drawer-scrim.show .drawer { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.drawer-head-main { flex: 1; min-width: 0; }
.drawer-no { font-family: var(--f-num); font-weight: 700; font-size: 12px; color: var(--brand-700); }
.drawer-title { font-family: var(--f-display); font-weight: 700; font-size: 16px; margin-top: 2px; }
.drawer-team { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.drawer-x { flex: 0 0 auto; }
.drawer-body { overflow: auto; padding: 16px 18px 32px; flex: 1; }
.drawer-stage { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.drawer-body .pipe { margin-bottom: 14px; }
.drawer-body .pipe-seg { width: 100%; flex: 1; }
.drawer-body .pipe { display: flex; }
.amt-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 16px; }
.amt-cell { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.amt-v { font-family: var(--f-num); font-weight: 800; font-size: 17px; margin-top: 3px; }
.drawer-sec-t { font-family: var(--f-display); font-weight: 700; font-size: 12.5px; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; margin: 18px 0 9px; display: flex; align-items: center; gap: 6px; }
.drawer-tl .tl-d { margin-top: 3px; }
.tl-future { opacity: .5; }
.tl-future .tl-k { background: var(--line-2); color: var(--muted); border-color: var(--line); }
.tl-future .tl-t { font-weight: 500; }
.drawer-foot { display: flex; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }

/* PO rows (drawer) */
.po-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; background: var(--surface); box-shadow: var(--sh-1); }
.po-row.po-delayed { border-color: #f3c4c4; background: var(--red-bg); }
.po-main { flex: 1; min-width: 0; }
.po-maker { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.po-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.po-row .btn { flex: 0 0 auto; }

/* note variants */
.note-alert { background: var(--red-bg); border-color: #f3c4c4; color: var(--red); }
.note-omit { background: var(--amber-bg); border-color: #f2dba0; color: var(--amber); }

/* PO output modal */
.po-modal { max-width: 620px; position: relative; }
.po-modal-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.po-modal-maker { font-family: var(--f-display); font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.po-modal-body { padding: 18px 24px 24px; max-height: 72vh; overflow: auto; }
.out-banner { display: flex; gap: 10px; align-items: center; padding: 11px 14px; background: var(--green-bg); border: 1px solid #bfe6cf; border-radius: var(--r); color: var(--green); font-size: 12.5px; font-weight: 600; margin-bottom: 14px; }
.out-banner svg.ic { flex: 0 0 auto; }
.ver-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ver-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.ver-switch button { border: none; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 700; padding: 7px 14px; }
.ver-switch button.on { background: var(--brand); color: #fff; }
.out-sec-t { font-weight: 700; font-size: 12px; color: var(--muted); letter-spacing: .02em; margin: 16px 0 8px; }
.field-copy-row { display: grid; grid-template-columns: 104px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.field-copy-row .fc-l { font-size: 12px; font-weight: 700; color: var(--muted); }
.field-copy-row .fc-v { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.field-copy-row .btn { padding: 5px 9px; }
.sg-wrap, .sheet-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; }
.sg-tbl, .sheet-table { font-size: 12px; margin: 0; }
.sg-tbl th, .sheet-table th { padding: 8px 10px; font-size: 10px; }
.sg-tbl td, .sheet-table td { padding: 7px 10px; }
.sg-tbl .sg-total td { background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--ink); }
.sheet-table .sheet-row--new { background: var(--brand-050); }
.sheet-table .sheet-row--new:hover { background: var(--brand-100); }
.attach-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.attach-row svg.ic { color: var(--muted); }
.out-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; }
.out-foot { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }

/* board / drawer responsive */
@media (max-width: 1080px) {
  .role-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .role-switch .rs-label { display: none; }
  .rs-btn { padding: 6px 9px; }
}
@media (max-width: 760px) {
  .role-tiles { grid-template-columns: 1fr 1fr; }
  .drawer { width: 100vw; }
  .field-copy-row { grid-template-columns: 92px 1fr auto; }
  .amt-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* =========================================================================
   注文詳細ページ / 請求・入金 Bill One フロー（2026-06-10 続: Phase1 追加）
   役割概念は画面から撤去。lane-* は工程の無言カラーとしてのみ流用。
   ========================================================================= */
.od-hero { display: flex; gap: 18px; align-items: flex-start; padding: 18px 20px; }
.od-hero-main { flex: 1; min-width: 0; }
.od-hero-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.od-hero-id .li-sku { font-size: 13px; }
.od-title { font-size: 21px; margin-top: 8px; letter-spacing: -.01em; }
.od-meta { display: flex; align-items: center; gap: 7px; margin-top: 8px; flex-wrap: wrap; }
.od-hero-side { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; align-items: stretch; min-width: 210px; }
.od-sec-t { font-family: var(--f-display); font-weight: 700; font-size: 12.5px; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }
.od-next { margin-top: 14px; font-size: 13.5px; }
.od-amt-grid { grid-template-columns: repeat(3, 1fr); }
.od-amt-grid .amt-cell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--sh-1); }
.od-amt-grid .amt-v { font-family: var(--f-num); font-weight: 800; font-size: 20px; margin-top: 4px; }

.od-steps { display: flex; gap: 4px; overflow-x: auto; padding: 8px 0 4px; }
.od-step { flex: 1 0 auto; min-width: 78px; text-align: center; position: relative; padding-top: 20px; }
.od-step::before { content: ''; position: absolute; top: 6px; left: calc(-50% + 7px); right: calc(50% + 7px); height: 2px; background: var(--line); }
.od-step:first-child::before { display: none; }
.od-step.done::before, .od-step.current::before { background: var(--brand); }
.od-dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); }
.od-step.done .od-dot { background: var(--brand); border-color: var(--brand); }
.od-step.current .od-dot { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(0,163,68,.16); }
.od-slabel { font-size: 11px; color: var(--muted); font-weight: 600; display: block; }
.od-step.current .od-slabel { color: var(--brand-700); font-weight: 700; }
.od-step.done .od-slabel { color: var(--ink-2); }

.od-activity { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.od-act-row { display: grid; grid-template-columns: 116px 1fr auto; gap: 8px; align-items: center; }
.memo-compose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.memo-compose .btn { align-self: flex-end; }
.memo-list { display: flex; flex-direction: column; gap: 9px; }
.memo-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; }
.memo-text { font-size: 13px; white-space: pre-wrap; line-height: 1.55; }
.memo-item .cell-sub { margin-top: 6px; }

.billing-flow .bf-title { font-weight: 700; font-size: 13px; color: var(--ink-2); margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.bf-steps { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.bf-step { flex: 1 1 0; min-width: 150px; display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.bf-step.bf-ext { background: var(--amber-bg); border-color: #f2dba0; }
.bf-step .bf-n { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-family: var(--f-num); font-weight: 700; font-size: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.bf-step.bf-ext .bf-n { background: var(--amber); }
.bf-step b { font-size: 13px; display: block; }
.bf-step span { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }
.bf-arrow { display: flex; align-items: center; color: var(--muted-2); flex: 0 0 auto; }

@media (max-width: 900px) {
  .od-hero { flex-wrap: wrap; }
  .od-hero-side { width: 100%; min-width: 0; }
  .od-act-row { grid-template-columns: 1fr; }
  .bf-arrow { display: none; }
}

/* 商品マスタ 詳細 / 3画像データ（工場用 / 刺繍用 / 顧客用完成品） */
.pd-thumb { width: 72px; height: 72px; border-radius: 14px; background: linear-gradient(135deg,#e7eefb,#f3f6fc); display: grid; place-items: center; color: var(--brand); flex: 0 0 auto; }
.pd-thumb svg.ic { width: 30px; height: 30px; }
.asset-grid { grid-template-columns: repeat(3, 1fr); }
.asset-slot { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--sh-1); }
.asset-top { display: flex; gap: 12px; align-items: flex-start; }
.asset-img { width: 52px; height: 52px; border-radius: 10px; background: linear-gradient(135deg,#e7eefb,#f3f6fc); display: grid; place-items: center; color: var(--brand); flex: 0 0 auto; }
.asset-img svg.ic { width: 22px; height: 22px; }
.asset-ai { width: 52px; height: 52px; border-radius: 10px; border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--muted-2); flex: 0 0 auto; flex-direction: column; gap: 1px; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.asset-ai svg.ic { width: 17px; height: 17px; }
.asset-ai.has { border-style: solid; border-color: var(--brand-100); background: var(--brand-050); color: var(--brand-700); }
.asset-h { min-width: 0; }
.asset-label { font-weight: 700; font-size: 13px; line-height: 1.4; }
.asset-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.asset-file { font-size: 12px; min-height: 22px; }
.asset-file .chip { max-width: 100%; overflow: hidden; }
.asset-flow { font-size: 11px; }
.asset-slot .btn { align-self: flex-start; }
@media (max-width: 900px) { .asset-grid { grid-template-columns: 1fr; } }

/* ダッシュボード（健全性をひと目で） */
.dash-kpi { grid-template-columns: repeat(3, 1fr); }
.health { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; padding: 6px 13px; border-radius: 20px; }
.health svg.ic { width: 15px; height: 15px; }
.health.ok { color: var(--green); background: var(--green-bg); border: 1px solid #bfe6cf; }
.health.warn { color: var(--red); background: var(--red-bg); border: 1px solid #f3c4c4; }
@media (max-width: 900px) { .dash-kpi { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .dash-kpi { grid-template-columns: 1fr; } }
