/* daichi-input V2 UI */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --c-main: #2b6cb0; --c-main-d: #234e77; --c-bg: #f4f6f8; --c-line: #d5dbe1;
  --c-danger: #c0392b; --c-ok: #2e7d52;
}
body { font-family: 'Yu Gothic', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif; background: var(--c-bg); color: #1c2733; font-size: 14px; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; padding: 5px 7px; border: 1px solid var(--c-line); border-radius: 5px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc3e8; }
label { font-size: 12px; color: #48586a; display: block; margin-bottom: 2px; }

/* ログイン */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; border: 1px solid var(--c-line); border-radius: 10px; padding: 28px 32px; width: 320px; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.login-box h1 { font-size: 18px; margin-bottom: 4px; }
.login-box .sub { font-size: 12px; color: #6a7a8c; margin-bottom: 18px; }
.login-box .field { margin-bottom: 12px; }
.login-box input { width: 100%; }
.login-box button { width: 100%; padding: 9px; background: var(--c-main); color: #fff; border: none; border-radius: 6px; font-size: 15px; }
.login-err { color: var(--c-danger); font-size: 12px; min-height: 16px; margin-bottom: 6px; }

/* シェル */
header.app { background: var(--c-main-d); color: #fff; display: flex; align-items: center; gap: 14px; padding: 8px 16px; position: sticky; top: 0; z-index: 20; }
header.app .brand { font-weight: 700; }
header.app .brand small { font-weight: 400; opacity: .8; margin-left: 6px; }
header.app nav { display: flex; gap: 4px; flex: 1; }
header.app nav button { background: transparent; color: #dbe7f3; border: none; padding: 7px 13px; border-radius: 6px; font-size: 14px; }
header.app nav button.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
header.app .who { font-size: 12px; opacity: .9; }
header.app .logout { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 5px; padding: 4px 10px; font-size: 12px; }
main { max-width: 1080px; margin: 18px auto; padding: 0 14px; }

/* カード・フォーム */
.card { background: #fff; border: 1px solid var(--c-line); border-radius: 9px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin-bottom: 12px; color: var(--c-main-d); border-left: 4px solid var(--c-main); padding-left: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; }
.grid .wide { grid-column: 1 / -1; }
.grid .w2 { grid-column: span 2; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.btn { background: var(--c-main); color: #fff; border: none; border-radius: 6px; padding: 8px 18px; font-size: 14px; }
.btn.sub { background: #fff; color: var(--c-main-d); border: 1px solid var(--c-line); }
.btn.danger { background: var(--c-danger); }
.btn:disabled { opacity: .5; cursor: default; }
.msg { font-size: 13px; min-height: 18px; margin-top: 8px; }
.msg.ok { color: var(--c-ok); } .msg.err { color: var(--c-danger); }
.seg { display: inline-flex; border: 1px solid var(--c-line); border-radius: 7px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 7px 16px; font-size: 14px; }
.seg button.on { background: var(--c-main); color: #fff; }

/* 一覧 */
table.list { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
table.list th, table.list td { border: 1px solid var(--c-line); padding: 5px 7px; text-align: left; }
table.list th { background: #eef2f6; font-weight: 600; white-space: nowrap; }
table.list tr:hover td { background: #f4f9ff; }
table.list td.num { text-align: right; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; }

/* 担当者行 */
.staff-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.staff-row button { background: none; border: none; color: var(--c-danger); font-size: 16px; }

/* モーダル */
.modal-bg { position: fixed; inset: 0; background: rgba(20,30,40,.45); display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 30px 10px; z-index: 50; }
.modal { background: #fff; border-radius: 10px; padding: 18px 20px; width: min(980px, 96vw); }
.modal h2 { font-size: 15px; margin-bottom: 12px; }

.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #e3ecf5; color: var(--c-main-d); margin-left: 6px; }
.note { font-size: 12px; color: #6a7a8c; }
.kbd-hint { font-size: 12px; color: #4a6076; background: #eef4fa; border: 1px solid #d7e5f2; border-radius: 6px; padding: 5px 10px; margin-top: 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 2px 14px; border: 1px solid var(--c-line); border-radius: 6px; padding: 6px 10px; background: #fbfcfd; }
.checks label.chk { padding: 2px 0; font-size: 13px; }
.daily-card h2 .note { font-weight: 400; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.thumb { position: relative; }
.thumb img { width: 120px; height: 120px; object-fit: cover; border: 1px solid var(--c-line); border-radius: 6px; }
.thumb .p-del { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 4px; width: 22px; height: 22px; }
tr.inactive td { opacity: .45; }
table.list th.muted, table.list td.muted { color: #8a99a8; font-size: 12px; }
input.m-edit, input.m-add { padding: 3px 6px; font-size: 13px; }
table.list td .btn.sub { padding: 3px 10px; font-size: 12px; }
label.chk { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #1c2733; margin: 0; padding: 6px 0; }
input[readonly] { background: #f2f5f8; color: #5a6b7c; }
