/* 配送管理システム：スマホ（幅375px）を先に考え、PCでは広げるだけ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif; font-size: 16px; color: #222; background: #f4f5f7; line-height: 1.5; }
main { padding: 12px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 1.25rem; margin: 8px 0 12px; }
h2 { font-size: 1.05rem; margin: 18px 0 8px; }
a { color: #1a5fb4; }

.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: #1f3b57; color: #fff; }
.top .brand { color: #fff; font-weight: bold; text-decoration: none; }
.top .who { font-size: .85rem; opacity: .9; margin-left: auto; }
.top button.link { color: #fff; }
.menu { display: flex; overflow-x: auto; gap: 2px; background: #2c5078; padding: 0 6px; }
.menu a { color: #fff; text-decoration: none; padding: 9px 10px; white-space: nowrap; font-size: .9rem; }

.card { background: #fff; border-radius: 8px; padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.08); margin-bottom: 12px; }
.narrow { max-width: 420px; margin: 12px auto; }
label { display: block; margin: 0 0 12px; font-size: .9rem; }
input, select, textarea { display: block; width: 100%; font-size: 16px; padding: 9px 10px; border: 1px solid #b8c0c8; border-radius: 6px; background: #fff; margin-top: 4px; }
input[type=checkbox], input[type=radio] { display: inline-block; width: auto; margin: 0 6px 0 0; }
button, .btn { display: inline-block; font-size: 16px; padding: 10px 16px; border: 1px solid #8a96a3; border-radius: 6px; background: #fff; color: #222; cursor: pointer; text-decoration: none; }
button.primary, .btn.primary { background: #1a5fb4; border-color: #1a5fb4; color: #fff; width: 100%; font-weight: bold; }
button.danger { background: #fff; border-color: #c01c28; color: #c01c28; }
button.link { background: none; border: none; padding: 0; text-decoration: underline; font-size: .85rem; }
button.small, .btn.small { padding: 4px 10px; font-size: .85rem; white-space: nowrap; }
form.inline { display: inline; margin: 0; }

.flash { padding: 10px 12px; border-radius: 6px; margin: 0 0 12px; }
.flash.ok { background: #e6f4ea; color: #1e5631; }
.flash.ng { background: #fdecea; color: #8a1c1c; }
.flash.warn { background: #fff7e0; color: #6b4e00; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { display: block; background: #fff; border-radius: 8px; padding: 22px 12px; text-align: center; text-decoration: none; color: #1f3b57; font-weight: bold; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.table-wrap { overflow-x: auto; background: #fff; border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { border-bottom: 1px solid #e3e6ea; padding: 6px 8px; text-align: left; vertical-align: top; }
th { background: #eef1f4; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.deleted td { color: #999; text-decoration: line-through; }
tr.total td { font-weight: bold; background: #f7f8fa; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.row > label { flex: 1 1 140px; margin-bottom: 8px; }
.muted { color: #666; font-size: .85rem; }

/* 稼働入力：大きなボタンで選ぶ */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chips label { margin: 0; flex: 0 1 auto; max-width: 100%; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 9px 12px; border: 1px solid #b8c0c8; border-radius: 18px; background: #fff; font-size: .95rem; }
.chips input:checked + span { background: #1a5fb4; border-color: #1a5fb4; color: #fff; }
.step-title { font-size: .85rem; color: #555; margin: 4px 0 0; }

@media (min-width: 768px) {
  main { padding: 18px; }
  button.primary { width: auto; }
}
