/* ドドスコ — 見た目は在庫管理システム（zaiko.fgear-os.com）の設計値に合わせる（2026-09-18 ボブ指示） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  color-scheme: light;
  --ink: #16281b; --muted: #61705f; --line: #d8e3d6; --navy: #1b5e30; --navy-light: #2e8b45;
  --g-light: #3f9a3c; --g-mid: #2f8a3a; --g-dark: #236b32;
  --teal: #2e8b45; --danger: #b63d37; --amber: #b7791f;
  --bg: #eef5ea; --card: rgba(255,255,255,.97);
  --input-line: #c6d6c2; --focus: #3a9a3f;
  /* 旧名（app.js の inline style が参照） */
  --text: var(--ink); --accent: var(--danger); --header: var(--navy); --blue: var(--navy-light); --safe: var(--teal); --hot: var(--amber);
}
html, body { min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: radial-gradient(circle at 14% 18%, rgba(92,181,49,.14), transparent 31%), linear-gradient(145deg, #eef5ea 0%, #f7faf5 52%, #eef5ea 100%);
  background-attachment: fixed; color: var(--ink); font-size: 14px; line-height: 1.55;
}
a { color: var(--navy-light); word-break: break-all; }

/* ヘッダー */
.top { position: sticky; top: 0; z-index: 10; background: linear-gradient(135deg, var(--g-light) 0%, var(--g-dark) 100%); color: #fff; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 6px 18px rgba(27,78,40,.18); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 16px; letter-spacing: .03em; }
.brand .mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 5px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); font-size: 15px; font-weight: 800; }
.brand .eyebrow { display: block; color: #d9f2c8; font-size: 9px; font-weight: 800; letter-spacing: .14em; line-height: 1.1; }
.brand small { display: block; font-weight: 700; font-size: 11px; opacity: .85; letter-spacing: .02em; }
.live { font-size: 10px; color: #d9f2c8; opacity: .45; }
.live.on { opacity: 1; }

main { max-width: 680px; margin: 0 auto; padding: 16px 14px 40px; }
.card { background: var(--card); border: 1px solid #c9e4c0; border-radius: 8px; padding: 18px 18px 16px; margin-bottom: 14px; box-shadow: 0 12px 34px rgba(27,57,78,.08); }
h2 { font-size: 16px; color: var(--ink); font-weight: 800; padding-bottom: 8px; margin-bottom: 12px; letter-spacing: .02em; }
h2 .num { color: var(--navy-light); font-weight: 800; margin-right: 4px; }
h2 .count, .listhead .count { color: var(--muted); font-size: 12px; font-weight: 700; margin-left: 6px; }
.listhead { border: 0; margin: 6px 0 8px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.intro { font-size: 13px; line-height: 1.8; margin-bottom: 8px; color: #44586c; }

/* 入力 */
label { display: block; font-size: 11px; font-weight: 700; color: #44586c; margin: 12px 0 0; letter-spacing: .02em; }
label .sub { display: block; font-weight: 500; font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
label input { display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 10px 12px; font-size: 15px; border: 1px solid var(--input-line); border-radius: 4px; background: #fff; color: var(--ink); font-family: inherit; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
label input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(50,138,162,.13); }
.row { display: flex; gap: 10px; } .row label { flex: 1; }
.req { font-size: 10px; background: var(--danger); color: #fff; padding: 2px 6px; border-radius: 3px; margin-left: 4px; font-weight: 700; }

/* ボタン */
.btn { display: inline-block; min-height: 40px; padding: 9px 16px; border: 1px solid #c8d4df; background: #fff; color: var(--ink); border-radius: 4px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; transition: filter .15s ease, transform .15s ease; }
.btn:hover { filter: brightness(1.04); } .btn:active { transform: translateY(1px); }
.btn.primary { min-height: 46px; margin-top: 16px; width: 100%; border-color: #1b5e30; background: linear-gradient(135deg, var(--g-mid) 0%, var(--g-dark) 100%); color: #fff; font-weight: 750; }
.btn.danger { color: var(--danger); border-color: #e2b8b5; background: #fff; }
.btn.small { min-height: 32px; padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; }
.btn.primary.cta { border-color: #2e8b45; background: linear-gradient(135deg, var(--g-light) 0%, var(--g-mid) 100%); }

/* 依頼カード */
.job { background: var(--card); border: 1px solid rgba(91,117,139,.22); border-left: 4px solid var(--muted); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 8px 24px rgba(27,57,78,.06); }
.job .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.job .title { font-weight: 800; color: var(--navy); }
.job .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.badge { font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border-radius: 3px; white-space: nowrap; background: #e6edf3; color: #44586c; }
.job.queued, .job.fetching, .job.registering, .job.confirmed, .job.publishing { border-left-color: var(--navy-light); }
.job.fetching .badge, .job.registering .badge, .job.publishing .badge { background: #e3edf5; color: var(--navy-light); }
.job.waiting_confirm, .job.review, .job.scheduled { border-left-color: var(--amber); }
.job.waiting_confirm .badge, .job.review .badge, .job.scheduled .badge { background: #fff4de; color: #7a4f0f; }
.job.waiting_auth, .job.error { border-left-color: var(--danger); }
.job.waiting_auth .badge, .job.error .badge { background: #fff2f1; color: var(--danger); }
.job.done, .job.published { border-left-color: var(--teal); }
.job.done .badge, .job.published .badge { background: #e6f4e0; color: var(--g-dark); }
.job.cancelled { opacity: .6; }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--navy-light); border-top-color: transparent; border-radius: 50%; animation: r .8s linear infinite; vertical-align: middle; margin-right: 4px; }
@keyframes r { to { transform: rotate(360deg); } }

/* 状態パネル */
.panel { margin-top: 10px; padding: 10px 12px; border-radius: 6px; font-size: 13px; line-height: 1.7; border: 1px solid var(--line); background: #f8fafc; }
.panel.confirm { background: #fffdf5; border-color: #ecd9a6; }
.panel.auth, .panel.error { background: #fff2f1; border-color: #e2b8b5; border-left: 3px solid var(--danger); color: #6d2c28; }
.panel.done { background: #f0f8ec; border-color: #c9e4c0; border-left: 3px solid var(--g-mid); }
.panel table { border-collapse: collapse; width: 100%; margin: 6px 0; }
.panel td { padding: 4px 6px; border-bottom: 1px solid #e9eef3; vertical-align: top; }
.panel td:first-child { color: var(--muted); white-space: nowrap; width: 92px; font-size: 12px; }
.actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.actions input { flex: 1; min-width: 120px; min-height: 40px; padding: 8px 10px; font-size: 15px; border: 1px solid var(--input-line); border-radius: 4px; font-family: inherit; }
.actions input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(50,138,162,.13); }
details { margin-top: 8px; font-size: 12px; }
details summary { color: var(--muted); cursor: pointer; }
.log { margin-top: 6px; color: var(--muted); }
.log div { padding: 3px 0; border-bottom: 1px dashed #e3e9ee; }
.shot { display: block; max-width: 100%; border: 1px solid var(--line); border-radius: 4px; margin: 4px 0; }

/* 価格・在庫の確認 */
.pricebox { margin-top: 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--navy-light); border-left: 3px solid var(--navy); border-radius: 6px; }
.pricebox-q { font-weight: 700; line-height: 2; color: var(--ink); }
.pricebox-q small { font-weight: 500; color: var(--muted); }
.pricebox-inline { display: inline-flex; align-items: center; gap: 2px; }
.pricebox-inline input { width: 118px; min-height: 36px; padding: 5px 8px; font-size: 17px; font-weight: 800; border: 1px solid var(--input-line); border-radius: 4px; text-align: right; margin: 0 2px; font-family: inherit; color: var(--navy); }
.pricebox-inline input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(50,138,162,.13); }
.pricebox-tax { font-size: 12px; color: var(--muted); }

/* 確認カードの見出し・注意 */
.confirm-hero { display: flex; gap: 12px; align-items: flex-start; margin: 10px 0 8px; }
.hero-img { width: 140px; height: 140px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; flex: none; }
.hero-none { width: 140px; height: 140px; display: flex; align-items: center; justify-content: center; background: #f3f6f9; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; flex: none; text-align: center; }
.hero-name { font-weight: 800; font-size: 15px; line-height: 1.6; color: var(--navy); }
.dupbox { border: 1px solid #e2b8b5; border-left: 3px solid var(--danger); background: #fff2f1; color: #6d2c28; border-radius: 6px; padding: 10px 12px; margin: 8px 0; font-size: 13px; line-height: 1.6; }
.dupbox .dup-list { margin: 4px 0 6px; color: #333; }
.dupbox .dup-check { display: block; margin-top: 8px; font-weight: 700; }
.warnbox { border: 1px solid #ecd9a6; border-left: 3px solid var(--amber); background: #fffdf5; color: #5c4400; border-radius: 6px; padding: 8px 12px; margin: 8px 0; font-size: 12px; }
.warnbox label { margin-top: 8px; }
.warnbox label input { min-height: 38px; font-size: 14px; }

/* ログイン画面（zaiko と同じ構成） */
.login-shell { display: grid; min-height: calc(100vh - 54px); place-items: center; padding: 32px 18px; }
.login-panel { width: min(100%, 430px); padding: 34px 36px 28px; border: 1px solid #c9e4c0; border-radius: 8px; background: var(--card); box-shadow: 0 22px 60px rgba(27,78,40,.13); }
.login-brand { display: flex; align-items: center; gap: 13px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.brand-mark { display: grid; width: 45px; height: 45px; place-items: center; border-radius: 5px; background: linear-gradient(145deg, var(--g-light), var(--g-dark)); color: #fff; font-size: 21px; font-weight: 800; }
.login-brand p, .login-brand h1 { margin: 0; }
.login-brand p { color: var(--g-mid); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.login-brand h1 { margin-top: 4px; font-size: 17px; letter-spacing: .03em; }
.login-brand h1 small { color: #617789; font-size: .6em; font-weight: 700; white-space: nowrap; }
.login-copy { margin: 27px 0 23px; }
.login-copy .eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.login-copy h2 { margin: 0; font-size: 25px; border: 0; padding: 0; color: var(--ink); }
.login-copy > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-alert { margin: 0 0 17px; padding: 10px 12px; border-left: 3px solid var(--danger); background: #fff2f1; color: #86342f; font-size: 12px; line-height: 1.55; }
.login-form { display: grid; gap: 17px; }
.login-form label { display: grid; gap: 7px; margin: 0; }
.login-form label span { color: #44586c; font-size: 11px; font-weight: 700; }
.login-form input { margin: 0; min-height: 46px; }
.login-form button { min-height: 48px; margin-top: 5px; }
.login-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 22px 0 0; color: #77889a; font-size: 10px; }
.login-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--g-light); }
@media (max-width: 480px) {
  .login-shell { padding: 0; place-items: stretch; }
  .login-panel { width: 100%; min-height: calc(100vh - 54px); padding: 28px 23px; border: 0; border-radius: 0; box-shadow: none; }
  .confirm-hero { gap: 10px; } .hero-img, .hero-none { width: 110px; height: 110px; }
}

/* ヘッダーのメニュー */
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: #e8f1f6; text-decoration: none; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 4px; opacity: .85; }
.nav a.on, .nav a:hover { background: rgba(255,255,255,.14); opacity: 1; }
.nav .live { margin-left: 6px; }
/* 1画面: 進行中は最大2件分だけ見せ、余りはカード内でスクロール（ページはスクロールさせない） */
main.one { max-width: 720px; }
main.one #jobs .job { border-left-width: 4px; }
#view-job .actions { margin-top: 14px; }
.listhead .right { float: right; font-weight: 500; }
.adv { margin-top: 8px; }
.adv summary { color: var(--muted); font-size: 12px; cursor: pointer; }
@media (max-width: 480px) { main.one #jobs { max-height: 52vh; } .nav a { padding: 6px 8px; font-size: 11px; } }

/* 確認画面: 商品カードの見出し行は控えめに */
#view-job .job { box-shadow: none; }

/* 進捗（zaiko の更新前レポートと同じ作り） */
.progress { margin: 6px 0 4px; padding: 12px 14px; border: 1px solid #c9e4c0; border-left: 3px solid var(--g-mid); border-radius: 6px; background: #f0f8ec; }
.progress-title { font-weight: 800; color: var(--ink); font-size: 14px; }
.progress-bar { height: 6px; margin: 10px 0 8px; background: #dcebd5; border-radius: 3px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--g-light), var(--g-dark)); border-radius: 3px; transition: width .9s linear; }
.progress-text { color: #44586c; font-size: 12px; }

.progress-head { display: flex; justify-content: space-between; align-items: baseline; }
.progress-status { color: var(--teal); font-size: 12px; font-weight: 700; }
.progress.is-done { background: #f4faf1; }

table.status { border-collapse: collapse; width: 100%; margin: 4px 0 10px; }
table.status td { padding: 8px 6px; border-bottom: 1px solid #e9eee6; vertical-align: middle; }
table.status td:first-child { color: var(--muted); width: 90px; font-size: 12px; }
