/* ==========================================================================
   全システム共通の画面の形（js/sys.js）。見本は docs/portal/preview-layout.html。
   上の帯のすぐ下に、どのシステムでも同じ位置・同じ見た目の「上側のタブ」を出す。
   システムごとに別のタブの見た目を作らない（機能のタブは、必ずここに出す）。
   ========================================================================== */
/* 色（2026-11-19 決定。案B3）：帯は濃い紺（2026-11-23 アースカラーに統一して焦げ茶・印は砂金に）。選んでいるタブだけ画面の中身と同じ地の色で抜いて、下の画面とつながって見せる */
:root {
  --sys-tabs-height: 42px;   /* 画面の高さを自分で決めるシステム（CRM など）が、この分を引く */
  --sys-tabs-bg: #3a332b; --sys-tabs-ink: #e2d9ca; --sys-tabs-sub: #b5a993; --sys-tabs-line: #5c5245; --sys-tabs-mark: #c8a978;
}
.sys-tabs {
  flex-shrink: 0; display: flex; align-items: stretch; gap: 4px; height: var(--sys-tabs-height); padding: 6px 20px 0;
  background: var(--sys-tabs-bg); overflow-x: auto; scrollbar-width: none;
}
.sys-tabs::-webkit-scrollbar { display: none; }
.sys-tabs[hidden] { display: none; }
.sys-tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; border: 0; background: none;
  border-radius: 8px 8px 0 0; color: var(--sys-tabs-ink);
  font: inherit; font-size: 13.5px; white-space: nowrap; cursor: pointer;
}
.sys-tabs button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.sys-tabs button:focus-visible { outline: 2px solid var(--sys-tabs-mark); outline-offset: -2px; }
.sys-tabs button.on { color: var(--c-ink); background: var(--c-canvas, #f7f5f0); font-weight: 700; box-shadow: inset 0 3px 0 var(--sys-tabs-mark); }
.sys-tabs button.sep { margin-left: 14px; position: relative; color: var(--sys-tabs-sub); }
.sys-tabs button.sep.on { color: var(--c-ink); }
.sys-tabs button.sep::before { content: ''; position: absolute; left: -9px; top: 8px; bottom: 14px; width: 1px; background: var(--sys-tabs-line); }
.sys-tabs sup { font-size: 11px; font-weight: 700; color: #f0a493; margin-left: -2px; }
.sys-tabs button.on sup { color: var(--c-danger, #a8392b); }
.sys-tabs sup.quiet { color: var(--sys-tabs-sub); font-weight: 500; }
.sys-tabs button.on sup.quiet { color: var(--c-brand); }
.sys-tabs .sys-sub { font-size: 12.5px; font-weight: 400; color: var(--sys-tabs-sub); }
.sys-tabs button.on .sys-sub { color: var(--c-brand); }
.sys-tabs .sys-dot { width: 8px; height: 8px; border-radius: 50%; background: #e0b467; }
.sys-tabs button.on .sys-dot { background: var(--c-warning, #94630f); }
@media (min-width: 901px) { body .main-wrapper .sys-tabs { margin-left: 200px; } }

/* 上側のタブに写した、画面の中の前からあるタブ（Sys.mirror）。状態の持ち主として残し、見た目は隠す */
.sys-mirrored { display: none !important; }

/* 画面いっぱいに使う（見積・受注の入力。同じページの中にはめ込んだ画面） */
body.sys-fill .main-wrapper .content-area { padding: 0 !important; overflow: hidden; position: relative; }
body.sys-fill .content-area > .page.active { position: absolute; inset: 0; height: auto !important; animation: none; display: flex !important; flex-direction: column; }
body.sys-fill .content-area > .page.active > * { flex: 1; min-height: 0; width: 100%; max-width: none; margin: 0; }
.sys-frame { display: block; width: 100%; height: 100%; border: 0; background: #f7f5f0; }
.sys-view[hidden] { display: none !important; }
.sys-view.sys-view-fill { height: 100%; }
.sys-empty { max-width: 560px; margin: 60px auto; padding: 28px; text-align: center; color: var(--c-muted); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 8px; }
.sys-empty .btn { margin: 14px 4px 0; }

@media (max-width: 900px) {
  :root { --sys-tabs-height: 40px; }
  .sys-tabs { padding: 5px 8px 0; } .sys-tabs button { padding: 0 11px; font-size: 13px; }
  body.sys-fill .content-area > .page.active { bottom: 58px; }   /* スマホの下のボタンの分 */
}

/* 確認の窓 */
.sys-ask-bg { position: fixed; inset: 0; z-index: 10050; background: rgba(28, 26, 23, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sys-ask { width: 100%; max-width: 480px; background: var(--c-surface); border-radius: 10px; padding: 20px 22px; box-shadow: 0 12px 40px rgba(28, 26, 23, .25); }
.sys-ask h3 { margin: 0 0 8px; font-size: 16px; }
.sys-ask p { margin: 0; color: var(--c-ink-2); white-space: pre-line; }
.sys-ask-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; }
