/* オーダーシフト 共通スタイル */
:root {
  /* パステルオレンジ：塗りは淡く、文字は濃い茶色で読みやすく */
  --brand: #f6a878;
  --brand-fill: #fcd3b6;
  --brand-fill-h: #f9c29c;
  --brand-d: #b4602a;
  --brand-ink: #6e3712;
  --brand-bg: #fff4ec;
  /* ソフトグレー */
  --ink: #3a3b3f;
  --ink2: #5f636b;
  --muted: #8e9198;
  --line: #ebe8e4;
  --line2: #f3f1ee;
  --bg: #f8f6f3;
  --surface: #fff;
  --dark: #efedea;
  /* シフト表示 */
  --work: #fcd3b6;
  --work-d: #6e3712;
  --work-bg: #fff4ec;
  --req: #b8672f;
  --off: #e4e4e8;
  --off-ink: #5f636b;
  --off-bg: #fff0e5;
  --warn: #e8877d;
  --warn-ink: #b0463c;
  --warn-bg: #fdeeec;
  --sat: #3f7ad6;
  --sun: #d8574c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(60, 50, 40, .05), 0 4px 16px rgba(60, 50, 40, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-size: 15px; line-height: 1.55; -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-d); }
.num { font-variant-numeric: tabular-nums; }
.sat { color: var(--sat); }
.sun { color: var(--sun); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: #c9cacd; background: #fafafa; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand-fill); border-color: var(--brand-fill); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-fill-h); border-color: var(--brand-fill-h); }
.btn.green { background: var(--brand-fill); border-color: var(--brand); color: var(--brand-ink); }
.btn.green:hover { background: var(--brand-fill-h); }
.btn.danger { color: var(--warn-ink); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--brand-d); }
.btn.ghost:hover { background: var(--brand-bg); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn.lg { min-height: 52px; font-size: 17px; font-weight: 700; border-radius: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 13px; color: var(--ink2); font-weight: 500; }
.input, select.input, textarea.input {
  min-height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
.input:focus, .btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 1px; border-color: var(--brand); }
textarea.input { min-height: 72px; resize: vertical; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px;
  font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--line2); color: var(--ink2);
}
.badge.ok { background: var(--work-bg); color: var(--work-d); }
.badge.draft { background: var(--brand-bg); color: var(--brand-d); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.off { background: var(--warn-bg); color: var(--warn-ink); }
.badge.emp { background: #e3ecfa; color: #2f5a9e; }
.badge.imp { background: #fde3e1; color: #b3261e; font-weight: 700; } /* お知らせの「重要」 */

.card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }

/* シフト表示の2段（上：決定シフト / 下：希望） */
.pill {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 34px; border-radius: 6px; font-size: 14px; font-weight: 700; color: var(--brand-ink);
  background: var(--work); box-shadow: none; white-space: nowrap;
}
.pill.off { background: var(--off); color: var(--off-ink); }
.pill.warn { box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--warn); }
.req {
  margin-top: 6px; padding-bottom: 4px; text-align: center; font-size: 13px; color: var(--req);
  border-bottom: 3px solid #f8c9a6; white-space: nowrap;
}
.req.no { color: #a9acb1; font-size: 12px; border-bottom: 2px dotted #d6d7da; }
.req.helpok { color: var(--brand-d); border-bottom-style: dashed; font-size: 11px; }
.req .note { color: var(--warn); font-weight: 700; margin-left: 2px; }

/* トースト・ローディング */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #4a4c52; color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px;
  transition: .2s; z-index: 100; width: max-content; max-width: min(560px, calc(100vw - 32px)); white-space: pre-line; box-shadow: var(--shadow);
  /* left:50% だと幅が画面の半分までに縮むので、中身の幅に合わせる */
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--warn-ink); }
#busy {
  position: fixed; inset: 0; background: rgba(255,255,255,.55); display: none; align-items: center; justify-content: center; z-index: 90;
}
#busy.show { display: flex; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--brand-bg); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

dialog {
  border: 0; border-radius: 16px; padding: 0; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(20, 30, 40, .45); }
.dlg-head { padding: 18px 20px 6px; }
.dlg-head h3 { margin: 0; font-size: 17px; }
.dlg-body { padding: 10px 20px; display: flex; flex-direction: column; gap: 12px; }
.dlg-foot { padding: 14px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
