/* 근태설정 모달 (2026-10-02, C 개선안 — 샘플 sample/attendance-settings/c.html)
   요약 띠 · 근무 유형(하루 타임라인) · 사무실 허용 IP · 설정(상시근로자·반차·미리보기) + 근무 유형 추가·수정 모달.
   색 = 테마 토큰만(라이트/다크). 동작 = attendance_settings_controller.js / attendance_type_form_controller.js */

.ast { padding: 16px; background: var(--ord-surface-2); min-height: 100%; box-sizing: border-box; color: var(--ord-text-2); font-size: 13px; }
.ast *, .ast *::before, .ast *::after, .ast-form *, .ast-form *::before, .ast-form *::after { box-sizing: border-box; }
.ast-hide { display: none !important; }

/* 요약 띠 */
.ast-sum { display: flex; flex-wrap: wrap; background: var(--ord-surface); border: 1px solid var(--ord-line); border-radius: 10px; margin-bottom: 12px; }
.ast-sum > div { flex: 1 1 0; min-width: 104px; padding: 9px 14px; border-left: 1px solid var(--ord-line-soft); }
.ast-sum > div:first-child { border-left: 0; }
.ast-sum small { display: block; font-size: 11px; color: var(--ord-text-4); }
.ast-sum b { font-size: 14px; font-weight: 700; color: var(--ord-text); }
.ast-sum .ast-warn { margin-left: 4px; font-size: 11.5px; font-weight: 600; color: var(--ord-tint-amber-fg); }
.ast-sum button { all: unset; display: block; cursor: pointer; }

/* 카드 */
.ast-card { background: var(--ord-surface); border: 1px solid var(--ord-line); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.ast-card-h { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--ord-band); border-bottom: 1px solid var(--ord-line); font-size: 12px; font-weight: 700; color: var(--ord-accent); }
.ast-card-h .ast-sp { flex: 1; }
.ast-card-h small { font-weight: 500; color: var(--ord-text-4); font-size: 11.5px; }
.ast-card-foot { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-top: 1px solid var(--ord-line-soft); font-size: 12px; color: var(--ord-text-3); }
.ast-card-foot .ast-sp { flex: 1; }
.ast-empty { padding: 28px 14px; text-align: center; color: var(--ord-text-4); }
.ast-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--ord-accent); cursor: pointer; }
.ast-link:hover { text-decoration: underline; }
.ast-mono { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ord-text-2); }
.ast-muted { color: var(--ord-text-4); }

/* 근무 유형 행 */
.ast-tr { display: grid; grid-template-columns: 170px minmax(0, 1fr) 56px; gap: 14px; align-items: center; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--ord-line-soft); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ast-tr:first-of-type { border-top: 0; }
.ast-tr:hover { background: var(--ord-surface-2); }
.ast-tr .ast-nm { font-weight: 700; color: var(--ord-text); }
.ast-tr .ast-tm { display: block; margin-top: 1px; font-size: 12px; color: var(--ord-text-3); }
.ast-tr .ast-ct { text-align: right; font-size: 12.5px; color: var(--ord-text-2); }
.ast-tr .ast-ct.is-none { color: var(--ord-text-4); }
.ast-axrow { display: grid; grid-template-columns: 170px minmax(0, 1fr) 56px; gap: 14px; padding: 2px 14px 10px; }

/* 하루 타임라인 — 축 06~24시. 위치는 style 의 --l(왼쪽 %)·--w(폭 %) */
.ast-tl { position: relative; height: 24px; border-radius: 6px; border: 1px solid var(--ord-line); overflow: hidden;
  background: repeating-linear-gradient(90deg, var(--ord-surface-2) 0 calc(100% / 18 - 1px), var(--ord-line-soft) calc(100% / 18 - 1px) calc(100% / 18)); }
.ast-tl > i { position: absolute; left: var(--l); width: var(--w); top: 4px; bottom: 4px; border-radius: 4px; }
.ast-tl .is-work { background: var(--ord-accent); }
.ast-tl .is-flex { top: 2px; bottom: 2px; background: var(--ord-tint-violet-bg); border: 1px dashed var(--ord-tint-violet-fg); }
.ast-tl .is-break { background: repeating-linear-gradient(135deg, var(--ord-panel) 0 3px, var(--ord-surface-2) 3px 6px); border-radius: 0; } /* 휴게 시간대 */
.ast:not(.is-ampm) .ast-tl .is-cut { display: none; }
.ast-tl .is-cut { width: 0; top: -1px; bottom: -1px; border-radius: 0; border-left: 2px solid var(--ord-solid-amber); }
.ast-ax { position: relative; height: 14px; font-size: 10px; color: var(--ord-text-4); }
.ast-ax span { position: absolute; transform: translateX(-50%); }

/* 사무실 행 */
.ast-or { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--ord-line-soft); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ast-or:first-of-type { border-top: 0; }
.ast-or:hover { background: var(--ord-surface-2); }
.ast-or .ast-nm { font-weight: 700; color: var(--ord-text); }
.ast-or .ast-ip { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--ord-text-2); }
.ast-or .ast-ip + .ast-ip::before { content: ", "; color: var(--ord-text-4); }
.ast-or .ast-miss { font-size: 12.5px; font-weight: 600; color: var(--ord-tint-amber-fg); }
.ast-or .ast-ct { font-size: 12px; color: var(--ord-text-3); white-space: nowrap; }

/* 설정 */
.ast-set { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; align-items: start; }
.ast-sec { padding: 14px; border-top: 1px solid var(--ord-line-soft); }
.ast-sec:first-child { border-top: 0; }
.ast-sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ast-sec-h.is-flat { margin-bottom: 0; }
.ast-sec-h b { font-size: 13px; color: var(--ord-text); }
.ast-sec-h .ast-sp { flex: 1; }
.ast-foot { margin: 8px 0 0; font-size: 12px; color: var(--ord-text-4); }

/* 반차 방식 — 한 줄짜리 라디오 목록 */
.ast-rad { display: flex; align-items: baseline; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--ord-line-soft); cursor: pointer; }
.ast-rad:first-child { border-top: 0; }
.ast-rad input { position: relative; top: 2px; flex: none; margin: 0; accent-color: var(--ord-accent); }
.ast-rad b { min-width: 104px; font-size: 13px; color: var(--ord-text); }
.ast-rad span { font-size: 12px; color: var(--ord-text-3); }

.ast-kv { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.ast-kv > span:first-child { width: 64px; flex: none; font-size: 12px; color: var(--ord-text-3); }
.ast-chk { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid var(--ord-line); border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--ord-text-2); background: var(--ord-surface); cursor: pointer; }
.ast-chk input { margin: 0; accent-color: var(--ord-accent); }
.ast-chk:has(input:checked) { border-color: var(--ord-accent); color: var(--ord-accent); background: var(--ord-accent-soft); }

.ast-cut { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ast-cut th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ord-text-4); padding: 6px 8px; border-bottom: 1px solid var(--ord-line); }
.ast-cut td { padding: 6px 8px; border-bottom: 1px solid var(--ord-line-soft); color: var(--ord-text-2); }
.ast-cut td b { color: var(--ord-text); }
.ast-in { padding: 6px 9px; border: 1.5px solid var(--ord-line-2); border-radius: 10px; background: var(--ord-input-bg); color: var(--ord-text); font: inherit; min-width: 0; }
.ast-in:focus { outline: 0; border-color: var(--ord-accent); box-shadow: 0 0 0 3px var(--ord-focus-ring); }
.ast-in[readonly] { background: var(--ord-surface-2); color: var(--ord-text-3); } /* 휴게(분) — 시간대를 정하면 자동 */
.ast-in.is-time { width: 118px; }

/* 미리보기 */
.ast-pv { position: sticky; top: 0; padding: 12px 14px; background: var(--ord-surface); border: 1px solid var(--ord-line); border-radius: 12px; }
.ast-pv-h { margin-bottom: 10px; font-size: 12px; font-weight: 700; color: var(--ord-accent); }
.ast-pv .ast-in { width: 100%; }
.ast-pv .ord-choice { margin: 8px 0 10px; }
.ast-pv-t { font-size: 13px; font-weight: 700; color: var(--ord-text); }
.ast-pv input[type=range] { width: 100%; accent-color: var(--ord-accent); }
.ast-res { margin-top: 10px; border-top: 1px solid var(--ord-line-soft); }
.ast-res > div { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--ord-line-soft); }
.ast-res small { font-size: 12px; color: var(--ord-text-3); }
.ast-res b { font-size: 13.5px; color: var(--ord-text); }
.ast-res b.is-bad { color: var(--ord-tint-red-fg); }
.ast-pv-msg { margin-top: 8px; min-height: 18px; font-size: 12px; color: var(--ord-text-3); }

/* 근무 유형 추가·수정 모달 */
.ast-form { padding: 16px; background: var(--ord-surface-2); display: flex; flex-direction: column; gap: 12px; min-height: 100%; box-sizing: border-box; color: var(--ord-text-2); font-size: 13px; }
.ast-form > form { display: flex; flex-direction: column; gap: 12px; }
.ast-form .ast-hide { display: none !important; }
.ast-form .ast-tl { height: 22px; }
.ast-fld { display: flex; flex-direction: column; gap: 4px; }
.ast-fld > span { font-size: 12px; font-weight: 600; color: var(--ord-text-3); }
.ast-fld .ast-in { width: 100%; }
.ast-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ast-g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ast-std { font-size: 12px; color: var(--ord-text-3); }
.ast-std b { color: var(--ord-text); }
.ast-guide { padding: 10px 12px; border-radius: 10px; background: var(--ord-surface); border: 1px solid var(--ord-line); font-size: 12.5px; line-height: 1.7; color: var(--ord-text-2); }
.ast-guide strong { color: var(--ord-accent); }
.ast-form-top { display: flex; justify-content: flex-end; }

/* 사무실 IP 모달 */
.ast-iprow { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--ord-line-soft); }
.ast-iprow .ast-in { width: 100%; }
.ast-iprow-act { display: flex; gap: 14px; flex-wrap: wrap; }

/* 모바일 */
@media (max-width: 768px) {
  .ast { padding: 12px; }
  .ast-set { grid-template-columns: minmax(0, 1fr); }
  .ast-pv { position: static; }
  .ast-tr { grid-template-columns: minmax(0, 1fr) 48px; }
  .ast-tr > .ast-tl { grid-column: 1 / -1; grid-row: 2; }
  .ast-axrow { grid-template-columns: minmax(0, 1fr); }
  .ast-axrow > span { display: none; }
  .ast-or { grid-template-columns: minmax(0, 1fr) auto; }
  .ast-or > div { grid-column: 1 / -1; grid-row: 2; }
  .ast-rad { flex-wrap: wrap; row-gap: 2px; }
  .ast-rad span { flex-basis: 100%; padding-left: 23px; }
  .ast-g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ast-fld .ord-choice { align-self: flex-start; }
