/* 業務システムの設計。style.css・flow.css・fm.css の上に重ねる */
.ds-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ds-hist { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 10px; align-items: start; }
.ds-ans, .ds-rows { padding: 12px 14px; }
.ds-ans h3, .ds-rows h3 { margin: 0 0 6px; font-size: 14px; }
.ds-dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; }
.ds-dl dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.ds-dl dd { margin: 0; font-size: 16px; font-weight: 700; }
.ds-judge { margin: 8px 0 0; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 7px 10px; }
.ds-judge.ok { background: #f0fdf4; color: #14532d; }
.ds-judge.ng { background: #fef2f2; color: #7f1d1d; }
.ds-judge.mid { background: #fffbeb; color: #78350f; }
.ds-what { margin: 8px 0 0; font-size: 13px; color: var(--ink2); }
.fm-table tr.on td, .fm-table tr.on th { background: #fef9c3; }
.ds-sql { margin: 8px 0 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 8px 10px; font: 500 12px/1.55 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; }
.ds-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ds-month { padding: 12px 14px; }
.ds-month h3 { margin: 0 0 6px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ds-lock, .ds-open { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 8px; }
.ds-lock { background: #e2e8f0; color: #334155; }
.ds-open { background: #dcfce7; color: #166534; }
.fm-table td.n, .fm-table th.n { text-align: right; font-family: var(--latin); }
.ds-sum { margin: 8px 0 0; font-size: 12.5px; color: var(--ink2); }
.ds-sum b { margin-left: 4px; border-radius: 6px; padding: 1px 8px; }
.ds-sum b.ok { background: #dcfce7; color: #166534; }
.ds-sum b.ng { background: #fee2e2; color: #991b1b; }
.ds-verdict { margin-top: 2px; }
.ds-states { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.ds-states li { font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 6px 10px; color: var(--ink2); display: flex; flex-direction: column; justify-content: center; }
.ds-states li small { font-size: 10.5px; font-weight: 500; color: var(--muted); }
.ds-states li.now { background: #0f172a; border-color: #0f172a; color: #fff; }
.ds-states li.now small { color: #cbd5e1; }
.ds-states li.skip { opacity: .45; }
.ds-states li.side { border-style: dashed; }
.ds-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; margin-bottom: 10px; }
.ds-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.ds-act { appearance: none; font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 7px 10px; color: var(--ink); display: flex; flex-direction: column; gap: 1px; }
.ds-act small { font-size: 11px; font-weight: 500; color: var(--muted); }
.ds-act:hover:not([disabled]) { border-color: #94a3b8; }
.ds-act[disabled] { opacity: .4; cursor: default; }
.ds-log { padding: 12px 14px; }
.ds-log h3 { margin: 0 0 6px; font-size: 14px; }
.ds-log ol { margin: 0; padding-left: 1.3em; font-size: 12.5px; color: var(--ink2); display: grid; gap: 3px; }
.ds-log li.ph { list-style: none; margin-left: -1.3em; color: var(--muted); }
.ds-perm th.on, .ds-perm td.on { background: #eff6ff; }
.ds-perm td.n { color: #94a3b8; }
.ds-perm td.y.on { font-weight: 700; color: #1d4ed8; }
.fm-table td.t { font-family: var(--latin); font-size: 12px; white-space: nowrap; }
.ds-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ds-money .card { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.ds-money h3 { margin: 0; font-size: 14px; }
.ds-money p { margin: 0; font-size: 13px; color: var(--ink2); }
.ds-out { background: #0f172a; color: #e2e8f0 !important; border-radius: 8px; padding: 8px 10px; font: 500 13px/1.6 var(--latin); overflow-wrap: anywhere; }
.ds-out b { color: #fde68a; }
.ds-out small { color: #94a3b8; font-family: var(--sans); }
.ds-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.ds-sel select { font: inherit; font-size: 13.5px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--paper); }
.ds-date { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 10px; }
.ds-cal, .ds-dateans { padding: 12px 14px; }
.ds-cal h3, .ds-dateans h3 { margin: 0 0 6px; font-size: 14px; }
.ds-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; font: 600 13px/1.9 var(--latin); }
.ds-grid b { font: 700 11.5px/1.8 var(--sans); color: var(--muted); }
.ds-grid span { border-radius: 6px; }
.ds-grid span.off { background: #f1f5f9; color: #94a3b8; }
.ds-grid span.hol { color: #be123c; }
.ds-grid span.orig { box-shadow: inset 0 0 0 2px #f59e0b; }
.ds-grid span.res { background: #1d4ed8; color: #fff; }
.ds-key { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 11.5px; color: var(--muted); }
.ds-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 3px; vertical-align: -1px; }
.ds-key .k-off { background: #e2e8f0; }
.ds-key .k-orig { box-shadow: inset 0 0 0 2px #f59e0b; }
.ds-key .k-res { background: #1d4ed8; }
.ds-dateans .ds-big { margin: 0 0 6px; font: 700 28px var(--latin); color: #1d4ed8; }
.ds-dateans p { margin: 0 0 6px; font-size: 13.5px; color: var(--ink2); }
.ds-hols b { display: block; font-size: 12px; color: var(--muted); }
.ds-act:focus-visible, .ds-sel select:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
@media (max-width: 1100px) {
  .ds-money { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ds-hist, .ds-months, .ds-flow, .ds-date { grid-template-columns: minmax(0, 1fr); }
}
