/* EC-WMS デモモック 共通スタイル (管理画面 + ハンディ 2 系統・絵文字禁止 SVG のみ) */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --navy: #1b2a4a; --navy-2: #24365e; --accent: #2f6fed; --bg: #f2f4f8;
  --ok: #1d9a6c; --warn: #d97706; --err: #dc2626; --line: #dde3ec; --txt: #1f2937; --muted: #6b7280;
}
body { font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif; background: var(--bg); color: var(--txt); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
svg.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---- 管理画面レイアウト ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: var(--navy); color: #cbd5e1; flex-shrink: 0; }
.sidebar .logo { padding: 18px 16px; color: #fff; font-weight: 700; font-size: 16px; border-bottom: 1px solid var(--navy-2); }
.sidebar .logo small { display: block; color: #8fa3c8; font-weight: 400; font-size: 11px; margin-top: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: #cbd5e1; font-size: 13px; }
.sidebar nav a:hover { background: var(--navy-2); }
.sidebar nav a.active { background: var(--accent); color: #fff; }
.sidebar nav .nav-sec { padding: 12px 16px 5px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; color: #8fa3c8; border-top: 1px solid var(--navy-2); margin-top: 6px; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; align-items: center; gap: 14px; }
.topbar .wh { font-weight: 700; }
.topbar select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.topbar .spacer { flex: 1; }
.badge-demo { background: var(--err); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 4px; letter-spacing: 1px; }
.badge-role { background: #e8eefc; color: var(--accent); font-size: 12px; padding: 3px 10px; border-radius: 10px; }
.btn-reset { border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 12px; }
.content { padding: 20px; max-width: 1180px; }
.page-title { font-size: 19px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }

/* ---- 部品 ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; }
.card:hover { border-color: var(--accent); }
.card .num { font-size: 26px; font-weight: 700; margin-top: 4px; }
.card .lbl { color: var(--muted); font-size: 12px; }
.card.alert .num { color: var(--err); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.panel h3 { font-size: 14px; margin-bottom: 10px; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px 10px; white-space: nowrap; }
.tbl td { border-bottom: 1px solid var(--line); padding: 9px 10px; }
.tbl tr.row-click { cursor: pointer; }
.tbl tr.row-click:hover { background: #f7f9fd; }
.tbl tr.row-danger { background: #fef2f2; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.tag.ok { background: #d9f2e5; color: var(--ok); } .tag.warn { background: #fdf0dd; color: var(--warn); }
.tag.err { background: #fde3e3; color: var(--err); } .tag.info { background: #e8eefc; color: var(--accent); }
.tag.gray { background: #eceff3; color: var(--muted); }
.ch { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 5px; color: #fff; font-size: 11px; font-weight: 700; }
.ch.rakuten { background: #bf0000; } .ch.amazon { background: #e47911; } .ch.yahoo { background: #7b0099; } .ch.own { background: #64748b; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 7px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; }
.btn:hover { opacity: .9; }
.btn.ghost { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btn.green { background: var(--ok); } .btn.red { background: var(--err); } .btn.gray { background: #eceff3; color: var(--txt); }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.tabs button { border: none; background: none; padding: 9px 16px; font-size: 13px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); }
.tabs .cnt { background: #eceff3; border-radius: 9px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.flow { display: flex; gap: 0; margin: 12px 0 18px; }
.flow .step { flex: 1; text-align: center; padding: 8px 4px; background: #eceff3; color: var(--muted); font-size: 12px; position: relative; }
.flow .step.done { background: #d9f2e5; color: var(--ok); }
.flow .step.now { background: var(--accent); color: #fff; font-weight: 700; }
.flow .step .n { display: block; font-size: 16px; font-weight: 700; }
.bar-wrap { background: #eceff3; border-radius: 6px; height: 10px; overflow: hidden; }
.bar { background: var(--ok); height: 100%; transition: width .3s; }
input.inp, select.inp { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; width: 100%; }
input.inp.bad { border-color: var(--err); background: #fef2f2; }
.field { margin-bottom: 10px; } .field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.masked { letter-spacing: 2px; color: var(--muted); }

/* モーダル・トースト */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 12px; padding: 22px; width: 440px; max-width: 92vw; max-height: 86vh; overflow: auto; }
.modal h3 { margin-bottom: 12px; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ok); color: #fff; padding: 11px 16px; border-radius: 8px; font-size: 13px; max-width: 340px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.toast.warn { background: var(--warn); } .toast.err { background: var(--err); }

/* ---- ハンディ端末系 ---- */
body.handy { background: #10151f; display: flex; justify-content: center; }
.handy-frame { width: 390px; min-height: 100vh; background: #182032; color: #e5e9f2; display: flex; flex-direction: column; }
.handy-head { padding: 12px 16px; background: #10151f; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #9aa7bd; }
.handy-body { flex: 1; padding: 18px; }
.handy-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.hbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 17px; border: none; border-radius: 12px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; margin-bottom: 12px; }
.hbtn.green { background: var(--ok); } .hbtn.gray { background: #2a3550; } .hbtn.red { background: var(--err); }
.hbtn .cnt { background: rgba(255,255,255,.25); border-radius: 10px; padding: 2px 10px; font-size: 13px; }
.hcard { background: #212c46; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.hcard .loc { font-size: 26px; font-weight: 800; color: #7fb2ff; }
.hcard .sku { font-size: 17px; font-weight: 700; color: #fff; margin: 6px 0; }
.hcard .qty { font-size: 15px; color: #9aa7bd; }
.hcard.cold { border-left: 5px solid #38bdf8; } .hcard.gift { border-left: 5px solid #eab308; }
.handy-alert { position: fixed; inset: 0; background: var(--err); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; z-index: 70; text-align: center; animation: shake .28s 2; }
.handy-alert .big { font-size: 24px; font-weight: 800; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.pin-row { display: flex; gap: 8px; justify-content: center; margin: 14px 0; }
.pin-dot { width: 46px; height: 54px; background: #212c46; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; }

/* ログイン */
body.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1b2a4a, #2f4270); }
.login-box { background: #fff; border-radius: 14px; padding: 30px; width: 400px; max-width: 92vw; }
.login-box h1 { font-size: 20px; margin-bottom: 4px; }
.login-box .sub { color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.demo-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0 10px; }
.demo-sep::before, .demo-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.block { width: 100%; justify-content: center; margin-bottom: 8px; }
@media print { .sidebar, .topbar, .btn, #toasts { display: none !important; } }
