/* オンデマンドメイク（OMS）お客様マイページ 2026-11-27 */
:root {
  --navy: #0f2a4a; --navy2: #17385f; --accent: #0e9f6e; --accent-d: #047857; --blue: #2563eb;
  --ink: #0f172a; --sub: #475569; --mute: #94a3b8; --line: #e2e8f0; --bg: #f4f6fa; --card: #fff;
  --warn: #d97706; --ng: #dc2626;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.65; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.35; }

/* 枠組み */
.o-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--navy) 240px, var(--bg) 240px); }
.o-side { background: var(--navy); color: #cbd5e1; padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.o-brand { display: block; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; padding: 0 10px 4px; }
.o-brand small { display: block; font-size: .72rem; color: #7dd3fc; font-weight: 700; letter-spacing: .05em; }
.o-client { margin: 14px 4px 18px; padding: 12px; background: rgba(255,255,255,.06); border-radius: 10px; font-size: .82rem; }
.o-client b { display: block; color: #fff; font-size: .92rem; }
.o-nav a { display: flex; align-items: center; gap: 10px; color: #cbd5e1; text-decoration: none; padding: 10px 12px; border-radius: 9px; font-weight: 600; font-size: .93rem; }
.o-nav a svg { width: 19px; height: 19px; flex: none; }
.o-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.o-nav a.on { background: #fff; color: var(--navy); }
.o-nav .o-badge { margin-left: auto; background: #f59e0b; color: #fff; font-size: .72rem; border-radius: 10px; padding: 0 7px; }
.o-nav hr { border: 0; border-top: 1px solid rgba(255,255,255,.1); margin: 12px 4px; }
.o-side-cta { display: block; margin: 16px 4px 8px; text-align: center; background: var(--accent); color: #fff !important; font-weight: 800; padding: 11px; border-radius: 10px; text-decoration: none; }
.o-side-cta.sub { background: transparent; border: 1px solid rgba(255,255,255,.3); margin-top: 0; font-weight: 700; }
.o-side form button { background: none; border: 0; color: #94a3b8; font: inherit; cursor: pointer; padding: 10px 12px; font-size: .88rem; }
.o-side-help { font-size: .75rem; color: #8aa0bd; padding: 10px 10px 0; line-height: 1.6; }
.o-main { padding: 26px 32px 60px; min-width: 0; }
.o-topbar { display: none; }

@media (max-width: 900px) {
  .o-shell { display: block; background: none; }
  .o-side { position: fixed; z-index: 50; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .o-side.open { transform: none; }
  .o-topbar { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 10px 14px; position: sticky; top: 0; z-index: 40; }
  .o-topbar b { font-size: .95rem; }
  .o-topbar small { color: #93c5fd; font-size: .72rem; display: block; }
  .o-topbar button { background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px; font-size: 1.1rem; padding: 4px 10px; }
  .o-main { padding: 18px 14px 50px; }
}

/* 見出し・カード */
.o-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.o-head h1 { margin: 0; font-size: 1.45rem; }
.o-head p { margin: 4px 0 0; color: var(--sub); font-size: .9rem; }
.o-crumb { font-size: .82rem; color: var(--sub); margin-bottom: 6px; }
.o-crumb a { color: var(--sub); }
.o-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.o-card h2 { font-size: 1.05rem; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.o-card h2 a { font-size: .82rem; font-weight: 600; }
.o-grid2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.o-grid2 > .o-card { margin-bottom: 0; }
.o-grid2 + * { margin-top: 18px; }
@media (max-width: 1100px) { .o-grid2 { grid-template-columns: 1fr; } }

/* 数字のタイル */
.o-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1000px) { .o-kpis { grid-template-columns: repeat(2, 1fr); } }
.o-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: inherit; display: block; }
a.o-kpi:hover { border-color: #93c5fd; }
.o-kpi .l { font-size: .82rem; color: var(--sub); font-weight: 600; }
.o-kpi .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; margin-top: 4px; }
.o-kpi .v small { font-size: .9rem; font-weight: 700; color: var(--sub); margin-left: 2px; }
.o-kpi .s { font-size: .78rem; color: var(--sub); margin-top: 2px; }
.o-kpi.warn .v { color: var(--warn); }
.o-kpi.ok .v { color: var(--accent-d); }

/* 棒グラフ（月ごとの枚数） */
.o-bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 170px; padding-top: 18px; }
.o-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.o-bar i { display: block; width: 100%; max-width: 34px; background: #93c5fd; border-radius: 5px 5px 0 0; min-height: 2px; position: relative; }
.o-bar.cur i { background: var(--blue); }
.o-bar i b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--sub); font-weight: 700; white-space: nowrap; }
.o-bar span { font-size: .68rem; color: var(--sub); margin-top: 5px; white-space: nowrap; text-align: center; line-height: 1.25; height: 2.5em; }
.o-bar span small { font-size: .62rem; color: var(--mute); }
.o-bars-note { font-size: .78rem; color: var(--sub); margin-top: 8px; }

/* 表 */
.o-table-wrap { overflow-x: auto; }
.o-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.o-table th { text-align: left; font-size: .78rem; color: var(--sub); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #f8fafc; }
.o-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.o-table tr:last-child td { border-bottom: 0; }
.o-table tr.link { cursor: pointer; }
.o-table tr.link:hover td { background: #f8fbff; }
.o-table .num { text-align: right; white-space: nowrap; }
.o-table .nw { white-space: nowrap; }
.o-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; }
.o-muted { color: var(--sub); font-size: .85em; }
.o-empty { text-align: center; color: var(--sub); padding: 26px 10px; }

/* 状態のバッジ */
.o-st { display: inline-block; font-size: .76rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; white-space: nowrap; border: 1px solid transparent; }
.o-st.received { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.o-st.producing, .o-st.checking, .o-st.working { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.o-st.shipped, .o-st.done, .o-st.active { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.o-st.hold, .o-st.paused, .o-st.preparing { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }
.o-st.provisional { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.o-st.cancelled, .o-st.rejected, .o-st.ended { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* 絞り込み */
.o-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.o-filter select, .o-filter input[type=search], .o-filter input[type=text] { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: .9rem; background: #fff; }
.o-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.o-tabs a { text-decoration: none; color: var(--sub); background: #fff; border: 1px solid var(--line); padding: 6px 13px; border-radius: 20px; font-size: .86rem; font-weight: 600; }
.o-tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.o-tabs a b { font-weight: 800; margin-left: 4px; }

/* ボタン */
.o-btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; padding: 9px 16px; border-radius: 9px; border: 1px solid #cbd5e1; background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.o-btn:hover { border-color: #94a3b8; }
.o-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.o-btn.primary:hover { background: var(--accent-d); }
.o-btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.o-btn.sm { padding: 6px 11px; font-size: .82rem; }
.o-btn.block { width: 100%; }
.o-btn[disabled] { opacity: .5; cursor: not-allowed; }
.o-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.o-btn.prov { background: #fff; border-color: #8b5cf6; color: #6d28d9; }
.o-btn.prov:hover { background: #f5f3ff; }
.o-reg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 760px) { .o-reg { grid-template-columns: 1fr; } }
.o-reg-box { border-radius: 12px; padding: 14px 16px; font-size: .86rem; }
.o-reg-box b { display: block; font-size: .98rem; margin-bottom: 4px; }
.o-reg-box p { margin: 0; color: var(--sub); line-height: 1.7; }
.o-reg-box.full { background: #ecfdf5; border: 1px solid #a7f3d0; }
.o-reg-box.full b { color: #047857; }
.o-reg-box.prov { background: #f5f3ff; border: 1px solid #ddd6fe; }
.o-reg-box.prov b { color: #6d28d9; }
.o-prov-card { border-color: #ddd6fe; background: #faf8ff; }

/* フォーム */
.o-field { margin-bottom: 16px; }
.o-field > label, .o-label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.o-field .req { background: var(--ng); color: #fff; font-size: .7rem; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }
.o-input, .o-field input[type=text], .o-field input[type=email], .o-field input[type=password], .o-field input[type=tel], .o-field select, .o-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px; font: inherit; font-size: .95rem; background: #fff; }
.o-field textarea { resize: vertical; min-height: 90px; }
.o-field input:focus, .o-field select:focus, .o-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.o-help { font-size: .8rem; color: var(--sub); margin-top: 4px; }
.o-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .o-row2 { grid-template-columns: 1fr; } }

/* 依頼の種類 */
.o-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.o-type { display: block; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; text-decoration: none; color: inherit; }
.o-type b { display: block; font-size: .95rem; }
.o-type span { font-size: .78rem; color: var(--sub); }
.o-type.on { border-color: var(--accent); background: #f0fdf8; }

/* 入稿の欄 */
.o-drop { border: 2px dashed #cbd5e1; border-radius: 12px; padding: 18px; text-align: center; background: #fafcff; cursor: pointer; transition: all .15s; }
.o-drop:hover, .o-drop.over { border-color: var(--accent); background: #f0fdf8; }
.o-drop b { display: block; font-size: .95rem; }
.o-drop small { color: var(--sub); font-size: .78rem; }
.o-files { list-style: none; margin: 10px 0 0; padding: 0; }
.o-files li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: #fff; font-size: .88rem; }
.o-files .bar { grid-column: 1 / -1; height: 6px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.o-files .bar i { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.o-files li.done .bar i { background: var(--accent); }
.o-files li.err { border-color: #fecaca; background: #fef2f2; }
.o-files .x { background: none; border: 0; color: var(--sub); cursor: pointer; font-size: .82rem; }

/* 版（差し替え）の表示 */
.o-parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .o-parts { grid-template-columns: 1fr; } }
.o-part { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfdff; }
.o-part .t { font-size: .82rem; color: var(--sub); font-weight: 700; }
.o-part .v { font-size: 1.25rem; font-weight: 800; margin: 2px 0; }
.o-part .d { font-size: .8rem; color: var(--sub); }
.o-part .o-btn { margin-top: 10px; width: 100%; }
.o-ver { font-size: .75rem; font-weight: 700; background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.o-timeline { list-style: none; margin: 0; padding: 0; }
.o-timeline li { position: relative; padding: 0 0 14px 22px; font-size: .9rem; }
.o-timeline li::before { content: ""; position: absolute; left: 5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.o-timeline li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.o-timeline li:last-child::after { display: none; }

/* 知らせ */
.o-flash { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: .92rem; }
.o-flash.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.o-flash.ng { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.o-flash ul { margin: 0; padding-left: 1.2em; }
.o-note { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: .86rem; color: var(--sub); }
.o-dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; font-size: .92rem; }
.o-dl dt { color: var(--sub); font-weight: 600; }
.o-dl dd { margin: 0; word-break: break-all; }
@media (max-width: 640px) { .o-dl { grid-template-columns: 1fr; gap: 2px; } .o-dl dd { margin-bottom: 8px; } }

/* ページ送り */
.o-pager { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.o-pager a, .o-pager span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; font-size: .86rem; color: var(--ink); }
.o-pager span.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.o-pager span.off { color: var(--mute); }

/* ログイン画面 */
.o-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 16px; background: linear-gradient(160deg, #0f2a4a 0%, #17385f 55%, #0e9f6e 140%); }
.o-auth-box { background: #fff; border-radius: 18px; padding: 32px 30px; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.o-auth-brand { text-align: center; margin-bottom: 22px; }
.o-auth-brand b { display: block; font-size: 1.3rem; color: var(--navy); }
.o-auth-brand span { font-size: .8rem; color: var(--sub); }
.o-check { display: flex; gap: 8px; align-items: center; font-size: .88rem; }
.o-auth-foot { text-align: center; margin-top: 16px; font-size: .88rem; }
@media (max-width: 640px) { .o-bar span small { display: none; } .o-bar i b { font-size: .6rem; } }
