/* D-HR · Attendance calendar, leave, pay, me */
/* ---------- attendance calendar ---------- */
.monthbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.monthbar b {
  font-family: var(--display);
  font-size: 20px;
  color: #fff;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal .wd {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
  padding: 4px 0;
}
.cal button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 13px;
  background: var(--card2);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--text);
  border: 1px solid transparent;
}
.cal button i {
  position: absolute;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.cal button.today {
  border-color: var(--plum);
  box-shadow: 0 0 0 2px rgba(90, 52, 130, 0.18);
}
.cal .P {
  background: var(--mintbg);
  color: var(--mint2);
}
.cal .HD {
  background: linear-gradient(135deg, var(--mintbg) 50%, var(--amberbg) 50%);
  color: var(--mint2);
}
.cal .A,
.cal .LOP {
  background: var(--redbg);
  color: var(--red);
}
.cal .L {
  background: var(--bluebg);
  color: var(--blue);
}
.cal .H {
  background: var(--amberbg);
  color: var(--amber);
}
.cal .WO {
  background: var(--chip);
  color: var(--muted);
}
.cal .late i {
  background: var(--red);
}
.cal .blank {
  visibility: hidden;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  display: inline-block;
}
.sumgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: -56px;
  position: relative;
  z-index: 2;
  padding: 0 16px;
}
.sumgrid div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.sumgrid b {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  color: var(--ink);
}
.sumgrid span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- leave ---------- */
.bals {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 16px 10px;
  scrollbar-width: none;
  margin-top: -62px;
  position: relative;
  z-index: 2;
}
.bals::-webkit-scrollbar {
  display: none;
}
.bal {
  flex: 0 0 132px;
  border-radius: 22px;
  padding: 14px;
  color: #fff;
  box-shadow: var(--shadow2);
  position: relative;
  overflow: hidden;
}
.bal b {
  display: block;
  font-family: var(--display);
  font-size: 32px;
  line-height: 1;
}
.bal span {
  font-weight: 700;
  font-size: 13px;
  display: block;
  margin-top: 4px;
}
.bal small {
  font-size: 12px;
  opacity: 0.85;
}
.bal::after {
  content: '';
  position: absolute;
  right: -22px;
  bottom: -22px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.bal.c0 {
  background: linear-gradient(140deg, #3ddc97, #1b8f62);
}
.bal.c1 {
  background: linear-gradient(140deg, #7c83f2, #4f3bb5);
}
.bal.c2 {
  background: linear-gradient(140deg, #f5a35c, #d2453b);
}
.bal.c3 {
  background: linear-gradient(140deg, #b18ae0, #5a3482);
}
.bal.tot {
  background: linear-gradient(140deg, #2a1742, #140a22);
}
.lv {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.lv:last-child {
  border-bottom: 0;
}
.lv .code {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--chip);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--plum);
}
.lv b {
  font-size: 14.5px;
}
.lv small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
}
.lv .acts {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.fab {
  position: fixed;
  right: max(18px, calc(50% - 292px));
  bottom: calc(var(--tabh) + var(--safe-b) + 16px);
  z-index: 15;
  border: 0;
  border-radius: 20px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 15px;
  color: #062a1c;
  background: linear-gradient(135deg, #55e6a8, #1fa873);
  box-shadow: 0 14px 30px rgba(31, 168, 115, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14.5px;
  padding: 6px 0;
}
.chk input {
  width: 22px;
  height: 22px;
  accent-color: #1fa873;
}
.note {
  background: var(--card2);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--muted);
}
.note .bad {
  color: var(--red);
  font-weight: 700;
}
.phprev {
  display: flex;
  align-items: center;
  gap: 10px;
}
.phprev img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

/* ---------- pay ---------- */
.slipc {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  width: 100%;
  text-align: left;
}
.slipc + .slipc {
  margin-top: 10px;
}
.slipc .m {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.05;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, #7c83f2, #4f3bb5);
  font-size: 12px;
}
.slipc .m b {
  display: block;
  font-size: 19px;
  font-family: var(--display);
}
.slipc .amt {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}
.netbig {
  border-radius: 22px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(140deg, #2a1742, #5a3482 60%, #1b8f62);
  margin-bottom: 14px;
}
.netbig span {
  font-size: 13px;
  color: #d8cceb;
  font-weight: 700;
}
.netbig b {
  display: block;
  font-family: var(--display);
  font-size: 34px;
  line-height: 1.1;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv span {
  color: var(--muted);
}
.kv b {
  text-align: right;
}
.kvh {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 4px;
}

/* ---------- me ---------- */
.mecard {
  display: flex;
  gap: 14px;
  align-items: center;
}
.mecard .big {
  width: 66px;
  height: 66px;
  border-radius: 22px;
  font-size: 22px;
}
.mecard b {
  font-family: var(--display);
  font-size: 22px;
  display: block;
  line-height: 1.15;
}
.dgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dcell {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
}
.dcell small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.dcell span {
  font-weight: 700;
  font-size: 14.5px;
  word-break: break-word;
}
.menu .row {
  cursor: pointer;
}
.seg {
  display: inline-grid;
  grid-auto-flow: column;
  background: var(--chip);
  border-radius: 12px;
  padding: 3px;
}
.seg button {
  border: 0;
  background: none;
  padding: 6px 12px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
}
.seg button.on {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
