/* ============================================================
   화면 4 · 관리자 — T14 프로세스 다이어그램
   좌→우 단방향 흐름 · 노드 4~6개 · 노드 사이 = 노드 폭의 0.8배
   모든 노드 수직 중심 일치 · 분기는 위아래 대칭 · 화살표 방향 통일
   1겹 완전 평면 · 그림자 없음 · 노드는 1px 테두리로만 구분
   장식용 다이어그램이 아니다 — 아래 표를 바꾸면 노드 수치가 따라 바뀐다
   ============================================================ */

.ad-head h1{
  font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.03em;
  line-height: 1.22; max-width: 26ch; margin-top: var(--s2);
}
.ad-head p{ font-size: var(--fs-sm); color: var(--muted); margin-top: var(--s3); max-width: 62ch; }

/* ---------- 흐름도 ----------
   생동 kinetic — 흐름을 흐름 순서대로 그린다. 이게 이 유형의 핵심 연출이다.
   전체 노드 동시 등장 금지 · 화살표 흐름 반복 애니메이션 금지 · 노드 부유 금지 */
.fn{ opacity: 0; transition: opacity 260ms var(--ease); }
.fn.in{ opacity: 1; }
html:not(.js) .fn{ opacity: 1; }
.farrow path{ stroke-dasharray: var(--len, 300); stroke-dashoffset: var(--len, 300); }
.farrow path.in{ stroke-dashoffset: 0; transition: stroke-dashoffset 420ms var(--ease); }
html:not(.js) .farrow path{ stroke-dashoffset: 0; }

/* 지금 손댄 단계만 테두리 농도가 천천히 오르내린다 — 그림자가 아니다 (이 유형은 그림자 없음) */
@media (prefers-reduced-motion: no-preference){
  .fn[data-focus="1"] rect{ animation: node-breathe 4s ease-in-out infinite; }
}
@keyframes node-breathe{ 0%,100%{ stroke-opacity: 1 } 50%{ stroke-opacity: .45 } }

@media (prefers-reduced-motion: reduce){
  .fn{ opacity: 1 !important; }
  .farrow path{ stroke-dashoffset: 0 !important; }
}
.flow-wrap{ padding: var(--s7) 0 0; }
.flow{ width: 100%; height: auto; display: block; }
.fn rect{ fill: var(--surface); stroke: var(--line2); stroke-width: 1; }
.fn[data-focus="1"] rect{ stroke: var(--accent); stroke-width: 2; fill: #fff; }
.fn .ft{ font-size: 14px; font-weight: 700; fill: var(--muted); letter-spacing: .02em; }
.fn .fv{ font-size: 31px; font-weight: 800; fill: var(--ink); letter-spacing: -.03em;
         font-variant-numeric: tabular-nums; }
.fn[data-focus="1"] .fv{ fill: var(--accent); }
.fn .fu{ font-size: 12px; font-weight: 600; fill: var(--muted); }
.fn .fi{ fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fn[data-focus="1"] .fi{ stroke: var(--accent); }
.farrow{ fill: none; stroke: var(--line2); stroke-width: 1.4; }
.fhead{ fill: var(--line2); }
.fcap{ font-size: 11.5px; font-weight: 600; fill: var(--muted); }
.flow-note{ font-size: var(--fs-cap); color: var(--muted); margin-top: var(--s3); }

/* ---------- 구역 — 가로줄 없이 여백과 제목 크기로만 나눈다 ---------- */
.sec{ padding-top: var(--s8); }
.sec > .st{ font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.025em; }
.sec > .sd{ font-size: var(--fs-sm); color: var(--muted); margin-top: var(--s2); max-width: 60ch; }
.sec > .bd{ margin-top: var(--s5); }

.cols{ display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: var(--s6); align-items: start; }

/* ---------- 폼 ---------- */
.form{ border: 1px solid var(--line2); border-radius: var(--r3); padding: var(--s5); background: var(--surface); }
.fld{ display: grid; gap: 4px; margin-bottom: var(--s4); }
.fld > label{ font-size: var(--fs-cap); font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.fld input, .fld select{
  -webkit-appearance: none; appearance: none;
  border: 1px solid var(--line2); border-radius: var(--r2); background: #fff;
  padding: 8px 12px; font-size: var(--fs-sm); width: 100%;
}
.fld select{
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23696E7C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.fld-2{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.sw{ display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); }
.sw .swl{ font-size: var(--fs-sm); font-weight: 600; }
.toggle{
  -webkit-appearance: none; appearance: none; cursor: pointer; flex: none;
  width: 44px; height: 25px; border-radius: var(--rp);
  border: 1px solid var(--line2); background: #fff; position: relative;
  transition: background var(--d1) var(--ease), border-color var(--d1) var(--ease);
}
.toggle::after{
  content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--line2);
  transition: transform var(--d1) var(--ease), background var(--d1) var(--ease);
}
.toggle[aria-checked="true"]{ background: var(--accent2); border-color: var(--accent2); }
.toggle[aria-checked="true"]::after{ transform: translateX(19px); background: #fff; }
.form .btn{ width: 100%; background: var(--accent); border-color: var(--accent); color: #fff; }
.form .btn:hover{ opacity: .9; border-color: var(--accent); }
.form-msg{ font-size: var(--fs-cap); color: var(--ok-ink); font-weight: 700; margin-top: var(--s3); min-height: 1.2em; }

/* ---------- 표 ---------- */
.tbl td .pill{
  display: inline-block; font-size: var(--fs-cap); font-weight: 700;
  border: 1px solid var(--line2); border-radius: var(--r1); padding: 2px 8px;
}
.tbl td .pill[data-s="발급"]{ color: var(--accent); border-color: currentColor; }
.tbl td .pill[data-s="사용"]{ color: var(--ok-ink); border-color: currentColor; }
.tbl td .pill[data-s="만료"]{ color: var(--muted); }
.tbl td .pill[data-s="취소"]{ color: var(--muted); border-style: dashed; }
.tbl select{
  -webkit-appearance: none; appearance: none;
  border: 1px solid var(--line2); border-radius: var(--r1); background: #fff;
  padding: 4px 24px 4px 8px; font-size: var(--fs-xs); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23696E7C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}
.tbl .lnk{ color: var(--accent); font-size: var(--fs-xs); word-break: break-all; }
.tbl .off{ color: var(--muted); }

/* 막대는 칠로만. 그림자 없음 */
.mbar{ display: flex; align-items: center; gap: var(--s2); }
.mbar .tr{ flex: 1; min-width: 54px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.mbar .tr i{ display: block; height: 100%; background: var(--accent); }
.mbar .pv{ font-size: var(--fs-cap); font-weight: 700; color: var(--muted); min-width: 38px; text-align: right; }

@media (max-width: 900px){
  .cols{ grid-template-columns: minmax(0, 1fr); }
  .ad-head h1{ font-size: var(--fs-lg); }
  .flow-wrap{ overflow-x: auto; -webkit-overflow-scrolling: touch; padding-top: var(--s5); }
  .flow{ min-width: 720px; }
}
