/* 単一責務: 月次勤務CSVビューアの見た目を定義する。 */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d7dde5;
  --line-strong: #b6c0cc;
  --text: #18212f;
  --muted: #637083;
  --header: #eef2f6;
  --job: #e8f3ff;
  --late: #fff0dc;
  --off: #eef5e5;
  --leave: #f7e8ee;
  --standby: #e9e6fb;
  --absence: #fde7e3;
  --summary: #f4f1ea;
  --selected: #1b64d8;
  --id-col-width: 88px;
  --name-col-width: 132px;
  --group-col-width: 92px;
  --date-col-width: 48px;
  --summary-col-width: 76px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Yu Gothic", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.scope-note {
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: baseline;
  min-width: 210px;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
}

.brand-subtitle,
.sheet-meta,
.candidate-empty {
  color: var(--muted);
  font-size: 12px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(240px, 1fr) auto auto auto;
  gap: 8px;
  width: min(1120px, 100%);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  height: calc(100vh - 91px);
}

.sheet-pane,
.detail-pane {
  min-width: 0;
  background: var(--panel);
}

.sheet-pane {
  border-right: 1px solid var(--line);
}

.detail-pane {
  padding: 14px;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.detail-title,
.candidate-title {
  font-weight: 700;
}

#clearSelectionButton {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
}

.detail-list {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.candidate-box {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .topbar,
  .layout {
    display: block;
  }

  .controls {
    grid-template-columns: 1fr;
    margin-top: 10px;
  }

  .layout {
    height: auto;
  }

}
