@charset "UTF-8";
/* ============================================================
   ランク評価システム 共通スタイル
   ============================================================ */

:root{
  --bg:#F3F4F1;
  --surface:#FFFFFF;
  --surface-2:#EDEFEA;
  --ink:#1D2623;
  --muted:#5E6A66;
  --line:#D5DBD6;
  --accent:#245E5A;
  --accent-ink:#FFFFFF;
  --accent-soft:#DCEBE8;
  --ok:#2F7A4B;
  --ok-soft:#DDF0E3;
  --ng:#B0413A;
  --ng-soft:#F6E0DD;
  --bronze:#9C6536;
  --silver:#737D86;
  --gold:#9E7A17;
  --plat:#46707F;
  --font-body:"BIZ UDPGothic","Hiragino Sans","Yu Gothic UI","Meiryo",sans-serif;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  font-size:14px;
  line-height:1.9;
}

h1{ font-size:22px; margin:0; }
h2{ font-size:17px; margin:0; }

a{ color:var(--accent); }

.muted{ color:var(--muted); }

/* ---------- ボタン ---------- */
.btn{
  display:inline-block;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--ink);
  border-radius:6px;
  padding:8px 16px;
  font:inherit;
  font-weight:bold;
  text-decoration:none;
  cursor:pointer;
}
.btn:hover{ background:var(--surface-2); }
.btn.primary{ background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.btn.primary:hover{ filter:brightness(1.08); }
.btn.wide{ width:100%; padding-block:10px; }

/* ---------- お知らせ ---------- */
.alert{
  background:var(--ng-soft);
  border:1px solid var(--ng);
  color:var(--ng);
  border-radius:8px;
  padding:14px 18px;
  margin:0 0 24px;
}
.ok{
  background:var(--ok-soft);
  border:1px solid var(--ok);
  color:var(--ok);
  border-radius:8px;
  padding:14px 18px;
  margin:0 0 24px;
}

/* ---------- ロゴ ---------- */
.logobox{
  display:block;
  background:#fff;
  border:1px solid var(--line);
  border-radius:6px;
  padding:8px 10px;
}
.logobox img{ display:block; width:100%; height:auto; }
.sys{ font-weight:bold; font-size:15px; }
.sys.small{ font-size:13px; margin-top:8px; }
.co{ font-size:12px; color:var(--muted); }
.logopreview img{ max-width:320px; height:auto; display:block; border:1px solid var(--line); border-radius:6px; background:#fff; padding:8px; }

/* ---------- ログイン画面 ---------- */
.login-body{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  padding:24px 16px;
}
.login-box{
  width:100%;
  max-width:400px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
  padding:34px 30px;
}
.login-box.wide-box{ max-width:460px; }
.login-brand{ margin-bottom:20px; text-align:center; }
.setup-title{ font-size:18px; margin-bottom:16px; }

.login-form .field{ margin-bottom:20px; }
.login-form label{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:4px;
}
.login-form input[type="text"],
.login-form input[type="password"],
.login-form select{
  width:100%;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--ink);
  font:inherit;
  padding:10px 12px;
}
.login-form input:focus,
.login-form select:focus{
  outline:2px solid var(--accent);
  outline-offset:1px;
}

/* ---------- ログイン後の画面 ---------- */
.shell{
  display:flex;
  min-height:100vh;
  align-items:stretch;
}
.side{
  width:252px;
  flex:none;
  background:var(--surface);
  border-right:1px solid var(--line);
  padding:24px 0;
}
.brand{ padding:0 16px 16px; }
.me{
  padding:0 20px 16px;
  font-size:13px;
  color:var(--muted);
}
.me strong{
  display:block;
  color:var(--ink);
  font-size:14px;
}
.nav{ display:flex; flex-direction:column; padding:0 10px; }
.nav a{
  display:block;
  padding:10px 12px;
  border-radius:6px;
  color:var(--ink);
  text-decoration:none;
}
.nav a:hover{ background:var(--surface-2); }
.nav a[aria-current="page"]{
  background:var(--accent-soft);
  color:var(--accent);
  font-weight:bold;
}

.main{
  flex:1;
  min-width:0;
  padding:32px 36px 80px;
}
.pagehead{
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:28px;
}
.pagehead p{ margin:0; color:var(--muted); }

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
  padding:26px 30px;
  margin-bottom:24px;
}
.card h2{ margin-bottom:14px; }
.card p{ margin:0 0 8px; }
.card p:last-child{ margin-bottom:0; }

.kvtable{ border-collapse:collapse; width:100%; }
.kvtable th,
.kvtable td{
  border-bottom:1px solid var(--line);
  padding:8px 10px;
  text-align:left;
  vertical-align:top;
}
.kvtable th{
  width:180px;
  color:var(--muted);
  font-weight:bold;
  background:var(--surface-2);
}
.kvtable tr:last-child th,
.kvtable tr:last-child td{ border-bottom:0; }

/* ---------- 一覧表 ---------- */
.toolbar{ margin:0 0 18px; }
.tablewrap{
  overflow-x:auto;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:10px;
  margin-bottom:24px;
}
.tablewrap table{ border-collapse:collapse; width:100%; }
.tablewrap th,
.tablewrap td{
  border-bottom:1px solid var(--line);
  padding:14px 20px;
  text-align:left;
  white-space:nowrap;
}
.tablewrap thead th{
  background:var(--surface-2);
  color:var(--muted);
  font-size:12px;
  padding-block:10px;
  letter-spacing:.04em;
}
.tablewrap tbody tr:last-child th,
.tablewrap tbody tr:last-child td{ border-bottom:0; }
.tablewrap td.center,
.tablewrap th.center{ text-align:center; }
.tablewrap td.right{ text-align:right; }

.chip{
  display:inline-block;
  border-radius:999px;
  padding:3px 12px;
  font-size:12px;
  font-weight:bold;
  line-height:1.5;
}
.chip.ok{ background:var(--ok-soft); color:var(--ok); border:0; }
.chip.muted{ background:var(--surface-2); color:var(--muted); }
.chip.ng{ background:var(--ng-soft); color:var(--ng); border:0; }
.chip.warn{ background:#FBEFD6; color:#8A6200; border:0; }

.btn.sm{ padding:5px 14px; font-size:13px; }

/* ---------- 入力フォーム ---------- */
.form{ max-width:720px; }
.form.narrow{ max-width:460px; }
.form .field{
  margin-bottom:26px;
  padding-bottom:22px;
  border-bottom:1px solid var(--surface-2);
}
.form .field:last-of-type{
  margin-bottom:8px;
  padding-bottom:0;
  border-bottom:0;
}
.form label{
  display:block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:8px;
  font-weight:bold;
}
.form input[type="text"],
.form input[type="password"],
.form input[type="date"],
.form select{
  width:100%;
  max-width:380px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--ink);
  font:inherit;
  padding:10px 12px;
}
.form input:focus,
.form select:focus{ outline:2px solid var(--accent); outline-offset:1px; }
.form small{ display:block; margin-top:8px; font-size:12px; line-height:1.7; }
.form .req{
  display:inline-block;
  margin-left:6px;
  background:var(--ng-soft);
  color:var(--ng);
  border-radius:4px;
  padding:0 6px;
  font-size:11px;
}
.form .static{ margin:0; }
.form .checkline{
  display:flex;
  gap:8px;
  align-items:flex-start;
  font-weight:normal;
  color:var(--ink);
}
.form .checkline input{ margin-top:7px; width:18px; height:18px; }
.formactions{
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:20px;
}

.lead{ color:var(--muted); max-width:70ch; }

/* ---------- 申請画面 ---------- */
.rank-1{ color:var(--bronze); }
.rank-2{ color:var(--silver); }
.rank-3{ color:var(--gold); }
.rank-4{ color:var(--plat); }

.notice-line{
  background:var(--surface-2);
  border-radius:8px;
  padding:14px 18px;
  margin:0 0 24px;
}

.summary .sumrow{
  display:flex;
  flex-wrap:wrap;
  gap:16px 40px;
  margin-bottom:12px;
}
.summary .sumrow div{ display:flex; flex-direction:column; }
.summary .sumrow span{ font-size:12px; color:var(--muted); }
.summary .sumrow strong{ font-size:20px; line-height:1.4; }

.ranksection .rankhead{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  align-items:center;
  padding-bottom:14px;
  margin-bottom:6px;
  border-bottom:1px solid var(--line);
}
.ranksection h2{ margin:0; font-size:18px; }
.ranksection.is-locked{ background:var(--surface-2); }
.ranksection.is-locked .itemrow{ opacity:.6; }

.itemlist{ list-style:none; margin:0; padding:0; }
.itemrow{
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding:18px 4px;
  border-bottom:1px solid var(--surface-2);
}
.itemrow:last-child{ border-bottom:0; padding-bottom:4px; }
.itemcheck{ flex:none; width:28px; padding-top:2px; text-align:center; }
.itemcheck input[type="checkbox"]{ width:22px; height:22px; cursor:pointer; }
.itemcheck input[type="checkbox"]:disabled{ cursor:not-allowed; }
.mark-got{ color:var(--ok); font-size:20px; font-weight:bold; opacity:.45; }

.itembody{ flex:1; min-width:0; }
.itemtitle{
  display:block;
  font-weight:normal;
  color:var(--ink);
  font-size:14px;
  margin:0 0 8px;
  cursor:pointer;
}
.itemno{ color:var(--muted); margin-right:8px; font-size:13px; }
.itemmeta{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.chip.line{
  background:transparent;
  border:1px solid var(--line);
  color:var(--muted);
  font-weight:normal;
}
.chip.accent{ background:var(--accent-soft); color:var(--accent); }

.itemcomment{ margin-top:12px; max-width:520px; }
.itemcomment label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:4px;
}
.itemcomment textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--ink);
  font:inherit;
  padding:8px 10px;
  resize:vertical;
}
.itemcomment textarea:focus{ outline:2px solid var(--accent); outline-offset:1px; }
.is-hidden{ display:none; }

.card.formactions{
  position:sticky;
  bottom:16px;
  flex-wrap:wrap;
  margin-top:0;
  box-shadow:0 4px 16px rgba(29,38,35,.12);
}
/* 画面のいちばん下に置くボタン（追従させません） */
.card.formactions.bottombar{
  position:static;
  margin-top:20px;
}

/* ---------- ○を付けるボタン ---------- */
.visually-hidden{
  position:absolute;
  width:1px; height:1px;
  margin:-1px; padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}
.circlewrap{ display:inline-block; cursor:pointer; }
.circlewrap input{
  position:absolute;
  width:1px; height:1px;
  opacity:0;
}
.circle{
  display:inline-grid;
  place-items:center;
  width:36px; height:36px;
  border:2px solid var(--line);
  border-radius:50%;
  background:#fff;
  color:transparent;
  font-size:19px;
  font-weight:bold;
  line-height:1;
  transition:background-color .12s, border-color .12s, color .12s;
}
.circlewrap:hover .circle{ border-color:var(--accent); }
.circlewrap input:checked + .circle{
  border-color:var(--ok);
  background:var(--ok);
  color:#fff;
}
.circlewrap input:disabled + .circle{
  border-style:dashed;
  background:transparent;
  cursor:not-allowed;
}
.circlewrap input:disabled:checked + .circle{
  border-style:solid;
  background:var(--ok);
  color:#fff;
  opacity:.65;
}
.circlewrap input:focus-visible + .circle{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.circle.is-got{
  border-color:var(--ok);
  background:var(--ok-soft);
  color:var(--ok);
  opacity:.75;
}

/* ---------- 申請内容の表（判定の確認） ---------- */
.mx{ min-width:820px; }
.mx .c-no{ width:56px; text-align:center; color:var(--muted); }
.mx .c-item{ min-width:340px; white-space:normal; }
.mx .item-text{ display:block; margin-bottom:6px; }
.mx .itemmeta{ display:flex; flex-wrap:wrap; gap:6px; }
.mx tr.rank-row td{
  background:var(--surface-2);
  padding-block:8px;
}
.mx tr.rank-row .rank{ font-weight:bold; }
.mark{ font-size:18px; font-weight:bold; line-height:1; }
.mark.o{ color:var(--ok); }
.mark.x{ color:var(--ng); }
.mark.wait{ color:var(--muted); font-size:12px; font-weight:normal; }
.mx tr.cmt-row td{ background:var(--surface-2); white-space:normal; }
.cmt{ margin:0 0 6px; font-size:13px; }
.cmt:last-child{ margin-bottom:0; }
.cmt-who{
  display:inline-block;
  min-width:96px;
  color:var(--muted);
  font-weight:bold;
}

/* ---------- 判定画面 ---------- */
.oxgroup{ display:inline-flex; gap:6px; }
.ox{ display:inline-block; cursor:pointer; }
.ox input{
  position:absolute;
  width:1px; height:1px;
  opacity:0;
}
.ox span{
  display:inline-grid;
  place-items:center;
  width:40px; height:36px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--muted);
  font-size:17px;
  font-weight:bold;
  line-height:1;
}
.ox:hover span{ border-color:var(--accent); }
.ox-o input:checked + span{ background:var(--ok); border-color:var(--ok); color:#fff; }
.ox-x input:checked + span{ background:var(--ng); border-color:var(--ng); color:#fff; }
.ox input:focus-visible + span{ outline:2px solid var(--accent); outline-offset:2px; }

.sideselect{
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--ink);
  font:inherit;
  font-size:12px;
  padding:2px 6px;
}
.judgenote{ margin-top:10px; max-width:460px; }
.judgenote label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:4px;
}
.judgenote textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  color:var(--ink);
  font:inherit;
  padding:8px 10px;
  resize:vertical;
}
.hasnote{
  display:block;
  margin-top:4px;
  font-size:11px;
  color:var(--muted);
}
.inlineform{ margin:0; }
.withdrawlist{ list-style:none; margin:0 0 8px; padding:0; }
.withdrawlist li{
  padding:12px 0;
  border-bottom:1px solid var(--surface-2);
}
.withdrawlist li:last-child{ border-bottom:0; }
.checkline{
  display:flex;
  gap:10px;
  align-items:flex-start;
  cursor:pointer;
}
.checkline input{ margin-top:6px; width:18px; height:18px; flex:none; }

/* ---------- 総評 ---------- */
.reviews{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:16px;
}
.review{
  border:1px solid var(--line);
  border-radius:8px;
  padding:14px 16px;
}
.review.is-done{ border-color:var(--ok); }
.review-head{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:8px;
}
.review-text{ margin:0; }
.review textarea{ width:100%; }

/* ---------- ×が付いたときの、2つの選択肢 ---------- */
.choicebox{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:16px;
  margin-top:20px;
}
.choice{
  border:1px solid var(--line);
  border-radius:8px;
  padding:18px 20px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.choice h3{ margin:0; font-size:16px; }
.choice p{ margin:0; flex:1; }
.choice .btn{ align-self:flex-start; }

/* ---------- ホームの「やること」 ---------- */
.card.todo{ border-left:4px solid var(--accent); }
.todolist{ list-style:none; margin:0; padding:0; }
.todolist li{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  padding:14px 0;
  border-bottom:1px solid var(--surface-2);
}
.todolist li:last-child{ border-bottom:0; }

/* ---------- 評価項目の管理 ---------- */
.tabs{
  display:inline-flex;
  gap:6px;
  margin-left:auto;
  flex-wrap:wrap;
}
.tab{
  display:inline-block;
  padding:7px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface);
  color:var(--ink);
  text-decoration:none;
  font-size:13px;
  font-weight:bold;
}
.tab:hover{ background:var(--surface-2); }
.tab.is-on{
  background:var(--accent);
  border-color:var(--accent);
  color:var(--accent-ink);
}
.itemadmin td{ vertical-align:top; }
.itemadmin .editcell{ min-width:360px; }
.itemadmin .editcell textarea{ width:100%; }
.editrow{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:8px;
}
.editrow label{ font-size:12px; color:var(--muted); }
.pointinput{ width:90px; }
.itemadmin tr.is-revised td{ background:#FDF6E7; }

/* ---------- 評価項目・履歴 ---------- */
.pickform{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  padding:16px 20px;
}
.pickform label{ font-size:13px; color:var(--muted); }
.pickform select{ min-width:220px; }

.rankbars{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid var(--surface-2);
}
.rankbar{
  display:flex;
  gap:10px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 14px;
}
.rankbar strong{ font-size:15px; }

.mx tr.is-got td{ background:var(--ok-soft); }
.mx tr.is-got .chip.ok{ background:var(--surface); }

.histable th,
.histable td{ white-space:nowrap; }
.diff{ font-weight:bold; }
.diff.up{ color:var(--ok); }
.diff.down{ color:var(--ng); }
.histable tfoot th,
.histable tfoot td{ background:var(--surface-2); }

/* ---------- ホームの四半期一覧 ---------- */
.qsched th,
.qsched td{ white-space:nowrap; }
.qsched tr.is-open td{ background:var(--accent-soft); }
.qsched tr.is-open .chip.accent{ background:var(--surface); }
.qsched .chip{ margin-left:8px; }
.btn.is-disabled{
  background:var(--surface-2);
  border-color:var(--line);
  color:var(--muted);
  cursor:default;
  opacity:.7;
}

/* ---------- 申請期間の設定 ---------- */
.qtable input[type="date"]{ width:150px; padding:6px 8px; }
.qtable th,
.qtable td{ padding-inline:14px; white-space:nowrap; }
.autocell{ white-space:normal; }
.autocell .btn{ display:block; margin:6px 0 0; }

/* ---------- 通知の履歴 ---------- */
.notifybody{ max-width:320px; }
.notifybody .cmt{ margin-top:6px; }

/* ---------- 画面が狭いとき ---------- */
@media (max-width:760px){
  .shell{ display:block; }
  .side{
    width:auto;
    border-right:0;
    border-bottom:1px solid var(--line);
    padding:12px 0;
  }
  .nav{ flex-direction:row; flex-wrap:wrap; }
  .main{ padding:24px 16px 56px; }
  .card{ padding:20px 18px; }
  .tablewrap th,
  .tablewrap td{ padding:12px 14px; }
}
