/* MODA IAM — 「한국 실무형」(2026-10 개편). adm 새 관리자와 같은 글꼴·색·틀.
 * 웹폰트는 불러오지 않는다(기본 한글 글꼴). 모서리 4px, 표 위 굵은 선, 버튼 36px.
 *
 * 테마는 세 가지다.
 *   자동  data-theme 이 없음 — 기기(운영체제) 설정을 따른다
 *   밝게  data-theme="light"
 *   어둡게 data-theme="dark"
 * 고른 값은 쿠키에 담고 서버가 <html> 에 미리 붙여 준다(첫 화면 깜빡임 방지). */
:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #222222; --sub: #555555; --muted: #666666;
  --line: #dde1e6; --line-in: #ebedf0; --line-input: #c9ced6; --th: #f4f5f7; --label-cell: #f7f8fa; --strong-line: #333333;
  --primary: #1d5fd8; --primary-hover: #1548a8; --primary-ink: #ffffff; --row-on: #f3f7fe; --menu-on: #eef3fd;
  --danger: #c0392b; --ok: #1f7a3d; --wait: #8a5a00;
  --ok-bg: #e7f4ec; --ok-ink: #1f5c34; --err-bg: #fdecea; --err-ink: #8e2a1f; --note-bg: #fff8e6; --note-ink: #5c3d00; --note-line: #e8c77a;
  --admin-bar: #f0b429; --admin-ink: #3a2600;
  --font: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121418; --card: #1b1e24; --text: #e6e8eb; --sub: #b8bec6; --muted: #9aa3ad;
    --line: #2e333b; --line-in: #262a31; --line-input: #3b414b; --th: #20242b; --label-cell: #1f2329; --strong-line: #9aa3ad;
    --primary: #5b8ff0; --primary-hover: #7ea6f3; --row-on: #1c2638; --menu-on: #1c2638;
    --danger: #f0867a; --ok: #7fcf98; --wait: #e9c46a;
    --ok-bg: #143021; --ok-ink: #9fe0b3; --err-bg: #3a1a17; --err-ink: #f2aaa2; --note-bg: #352a0e; --note-ink: #f2d98c; --note-line: #6b5414;
  }
}
:root[data-theme="dark"] {
  --bg: #121418; --card: #1b1e24; --text: #e6e8eb; --sub: #b8bec6; --muted: #9aa3ad;
  --line: #2e333b; --line-in: #262a31; --line-input: #3b414b; --th: #20242b; --label-cell: #1f2329; --strong-line: #9aa3ad;
  --primary: #5b8ff0; --primary-hover: #7ea6f3; --row-on: #1c2638; --menu-on: #1c2638;
  --danger: #f0867a; --ok: #7fcf98; --wait: #e9c46a;
  --ok-bg: #143021; --ok-ink: #9fe0b3; --err-bg: #3a1a17; --err-ink: #f2aaa2; --note-bg: #352a0e; --note-ink: #f2d98c; --note-line: #6b5414;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.6; }
a { color: var(--primary); text-decoration: none; } a:hover { color: var(--primary-hover); text-decoration: underline; }
code { font-size: .9em; background: var(--th); border: 1px solid var(--line-in); padding: 0 5px; border-radius: 3px; }
h1 { font-size: 22px; font-weight: 700; margin: 0 0 14px; } h2 { font-size: 16px; margin: 0 0 12px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* 상단 바 */
.top { display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-size: 17px; font-weight: 700; color: var(--text); white-space: nowrap; } .brand:hover { text-decoration: none; color: var(--text); }
.brand span { display: none; }
.top nav { display: flex; gap: 18px; align-items: center; flex: 1; min-width: 0; }
.top nav a { color: var(--sub); font-size: 14px; padding: 17px 0 15px; border-bottom: 2px solid transparent; white-space: nowrap; }
.top nav a:hover { color: var(--text); text-decoration: none; }
.top nav a.on { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }
.top .spacer { flex: 1; }
.top .who { color: var(--sub); font-size: 13px; white-space: nowrap; }

main { max-width: 1100px; margin: 24px auto 48px; padding: 0 16px; } main.narrow { max-width: 440px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } @media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 12px; } .row.wrap { flex-wrap: wrap; align-items: center; }
.row label { flex: 1; min-width: 140px; }
.row.wrap label.check { flex: none; min-width: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
label.check { flex-direction: row; align-items: center; gap: 6px; font-weight: 400; font-size: 14px; }
input[type=text], input[type=email], input[type=search], input[type=password], input[type=number], input[type=date], select, textarea {
  height: 36px; padding: 0 10px; border: 1px solid var(--line-input); border-radius: 4px; background: var(--card); color: var(--text); font: inherit; font-size: 14px; width: 100%; }
textarea { height: auto; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
button, .button { height: 36px; min-width: 72px; padding: 0 14px; border: 1px solid var(--line-input); border-radius: 4px; background: var(--card); color: var(--text);
  font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.button:hover, button:hover { border-color: var(--strong-line); text-decoration: none; color: var(--text); }
button.primary, .button.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 600; }
button.primary:hover, .button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
button.danger, .button.danger { color: var(--danger); border-color: var(--danger); }
button.small, .button.small { height: 28px; min-width: 0; padding: 0 10px; font-size: 13px; }
button.block, .button.block { width: 100%; height: 40px; }
button.link { height: auto; min-width: 0; border: none; background: none; color: var(--primary); padding: 0; font-size: inherit; }
button:disabled, button:disabled:hover { cursor: not-allowed; color: #8a8a8a; border-color: var(--line); background: var(--th); }
button.primary:disabled { background: #9db6e8; border-color: #9db6e8; color: #fff; }
form.inline { display: inline; }
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; background: var(--note-bg); color: var(--note-ink); border: 1px solid var(--note-line); }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; } .alert.error { background: var(--err-bg); color: var(--err-ink); border-color: transparent; }
.muted { color: var(--muted); } .small { font-size: 13px; } .nowrap { white-space: nowrap; }
.chip { display: inline-block; padding: 0 6px; border: 1px solid var(--line-input); border-radius: 3px; font-size: 12px; line-height: 20px; margin-right: 4px; color: var(--sub); background: var(--card); }
.chip.st-active { color: var(--ok); border-color: currentColor; } .chip.st-suspended { color: var(--danger); border-color: currentColor; }
.chip.st-invited { color: var(--wait); border-color: currentColor; }
.chip.st-departed { color: var(--danger); border-color: currentColor; text-decoration: line-through; }
.chip.su { color: #6b21a8; border-color: currentColor; font-weight: 700; }
table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 13px; background: var(--card); border-top: 2px solid var(--strong-line); } table.small { font-size: 12.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-in); vertical-align: middle; }
th { background: var(--th); color: var(--text); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; } dt { color: var(--muted); font-size: 13px; } dd { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 상태 점 */
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.dot.on { background: #2e9e57; } .dot.slow { background: #e0a100; } .dot.off { background: #c0392b; } .dot.ext { background: #9aa3ad; }

/* ── A 로그인: 한 카드 안에서 상태만 바뀐다 ── */
.auth { min-height: calc(100vh - 56px); display: flex; align-items: flex-start; justify-content: center; padding: 72px 16px 40px; }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-title { margin: 0; font-size: 22px; font-weight: 700; }
.auth-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.auth-mail { font-weight: 700; color: var(--text); background: var(--note-bg); padding: 0 3px; border-radius: 2px; word-break: break-all; }
.auth-meta { font-size: 13px; color: var(--sub); }
.auth-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.auth-links .sep { color: var(--line-input); }
.auth-help { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.7; }
.auth-step { font-size: 12px; color: var(--sub); }
.auth-state-icon { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--admin-bar); margin-right: 6px; vertical-align: 0; }

/* 테마 고르개 */
.theme-pick { display: inline-flex; border: 1px solid var(--line-input); border-radius: 4px; overflow: hidden; flex: none; }
.theme-pick button { height: 26px; min-width: 0; border: none; border-radius: 0; background: var(--card); color: var(--sub); padding: 0 8px; font-size: 12px; }
.theme-pick button + button { border-left: 1px solid var(--line-input); }
.theme-pick button:hover { color: var(--text); }
.theme-pick button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); font-weight: 700; }

/* ── 옛 홈 타일(C 개편 전까지 남김) ── */
.hero { margin: 0 0 14px; } .hero-title { font-size: 22px; font-weight: 700; margin: 0; } .hero-sub { display: none; }
.lead { font-size: 14px; margin: 0 0 14px; color: var(--sub); }
.hero.left, .lead.left { text-align: left; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; color: var(--text); }
.tile:hover { border-color: var(--primary); text-decoration: none; color: var(--text); } .tile strong { font-size: 15px; } .tile code { align-self: flex-start; margin-top: 6px; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile .desc { color: var(--sub); font-size: 13px; line-height: 1.55; margin: 4px 0 6px; }
.tile .path { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tile.down { opacity: .7; }
.newwin { font-size: 11px; color: var(--muted); font-weight: 400; vertical-align: 2px; }
.tile-icon { width: 18px; height: 18px; flex: none; color: var(--primary); }
.tile .tile-head strong { display: inline-flex; align-items: center; gap: 7px; }
.tile.down .tile-icon { color: var(--muted); }

/* 서비스 키(관리, 2단계 개편 전까지 남김) */
.chip.k-active { color: var(--ok); border-color: currentColor; }
.chip.k-rotating, .chip.k-requested, .chip.k-switching { color: var(--wait); border-color: currentColor; }
.chip.k-expired { color: var(--muted); }
.chip.k-revoked { color: var(--danger); border-color: currentColor; }
tr.dim td { opacity: .6; }
.keybox { display: block; padding: 12px 14px; margin: 8px 0 12px; border: 1px solid var(--line-input); border-radius: 4px;
  background: var(--label-cell); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; user-select: all; }
pre.keybox { white-space: pre-wrap; }
.days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 96px; margin: 8px 0 4px; }
.days .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
.days .bar { width: 100%; min-height: 2px; background: var(--primary); border-radius: 2px 2px 0 0; }
.days .bar.zero { background: var(--line); }
.days .n { font-size: 11px; color: var(--muted); line-height: 1; }
.daylabels { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; font-size: 10.5px; color: var(--muted); text-align: center; }
.targets { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-bottom: 12px; }
.targets label.check { flex: none; white-space: nowrap; }

@media (max-width: 700px) {
  .top { padding: 0 16px; gap: 14px; height: auto; min-height: 56px; flex-wrap: wrap; }
  .top nav { flex-wrap: wrap; gap: 14px; }
  .auth { padding-top: 32px; }
  .auth-card { padding: 24px 20px; }
}

/* A 로그인 다듬기 */
.auth-card label { display: block; }
button.link:disabled, button.link:disabled:hover { background: none; border: none; color: var(--muted); }
.auth-who { display: block; font-size: 17px; font-weight: 700; word-break: break-all; margin-bottom: 2px; }
.auth-who .auth-mail { font-size: 17px; }
@media (max-width: 700px) {
  .top { padding: 8px 16px 0; gap: 8px 12px; }
  .top nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; gap: 16px; }
  .top nav .spacer { display: none; }
  .top nav .who { display: none; }
  .top nav form.inline { margin-left: auto; padding: 8px 0; }
  .top nav a { padding: 10px 0 8px; }
  .theme-pick { margin-left: auto; }
}

/* B 초대 수락 */
.auth-box { border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; background: var(--label-cell); }
.auth-box-title { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.auth-box-list { margin: 0; font-size: 14px; line-height: 1.7; }

/* ── C 상단 바 · 관리자 모드 ── */
.admin-switch { border-color: var(--strong-line); font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  background: var(--th); border: 1px solid var(--line-input); color: var(--text); font-weight: 700; font-size: 14px; }
.avatar:hover, .avatar.on { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.admin-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 24px; background: var(--admin-bar); color: var(--admin-ink); font-size: 14px; border-bottom: 1px solid #c99410; }
.admin-bar .admin-end { color: var(--admin-ink); font-weight: 700; text-decoration: underline; }
.subnav { display: flex; gap: 4px; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; }
.subnav a { padding: 10px 12px; font-size: 14px; color: var(--sub); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.on { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }

/* ── C 홈 ── */
.home-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.svc-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--strong-line); border-radius: 0 0 4px 4px; }
.svc { display: flex; align-items: center; gap: 12px; padding: 0 8px 0 16px; min-height: 56px; border-bottom: 1px solid var(--line-in); position: relative; }
.svc:last-child { border-bottom: 0; }
.svc:hover { background: var(--row-on); }
.svc-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: var(--text); padding: 10px 0; }
.svc-main:hover { text-decoration: none; color: var(--text); }
.svc-main:hover .svc-name { color: var(--primary); text-decoration: underline; }
.svc-icon { width: 20px; height: 20px; flex: none; color: var(--primary); display: inline-flex; }
.svc-icon svg { width: 20px; height: 20px; }
.svc-text { display: flex; flex-direction: column; min-width: 0; }
.svc-name { font-size: 15px; font-weight: 600; }
.svc-desc { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-meta { font-size: 13px; color: var(--sub); white-space: nowrap; }
.pin-label { display: inline-flex; align-items: center; gap: 3px; }
svg.pin { width: 14px; height: 14px; fill: var(--danger); stroke: none; }
.svc-state { display: inline-flex; align-items: center; gap: 6px; min-width: 10px; font-size: 13px; white-space: nowrap; }
.svc-state .dot:not([class*=" "]) { background: var(--line); }
.state-text.st-off { color: var(--danger); } .state-text.st-slow { color: var(--wait); }
.svc.down .svc-name, .svc.down .svc-icon { color: var(--muted); }
.svc.is-pinned + .svc-sep { }
.svc-sep { list-style: none; border-top: 2px solid var(--strong-line); border-bottom: 1px solid var(--line-in); padding: 6px 16px; font-size: 12px; color: var(--muted); background: var(--label-cell); }
.rowmenu { position: relative; flex: none; }
.rowmenu summary { list-style: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px; color: var(--sub); font-size: 18px; letter-spacing: 1px; }
.rowmenu summary::-webkit-details-marker { display: none; }
.rowmenu summary:hover, .rowmenu[open] summary { background: var(--th); color: var(--text); }
.rowmenu-pop { position: absolute; right: 0; top: 44px; z-index: 10; min-width: 140px; background: var(--card); border: 1px solid var(--line-input); border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.08); padding: 4px; }
.rowmenu-pop form { display: flex; flex-direction: column; }
.rowmenu-pop button { border: 0; justify-content: flex-start; height: 40px; width: 100%; background: none; }
.rowmenu-pop button:hover { background: var(--row-on); }
.home-foot { margin-top: 12px; }
.pinned-cards { display: none; }
/* 단계 묶음: 운영 · 베타 · 실험(접힘) */
.stage-head { font-size: 14px; font-weight: 700; margin: 22px 0 6px; color: var(--text); }
.stage-head:first-of-type { margin-top: 14px; }
.stage-note { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 6px; }
.stage-fold { margin-top: 22px; }
.stage-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; }
.stage-fold > summary::-webkit-details-marker { display: none; }
.stage-fold > summary::before { content: "▸"; color: var(--sub); font-size: 12px; width: 12px; }
.stage-fold[open] > summary::before { content: "▾"; }
.stage-fold > summary .stage-head { display: inline; margin: 0; }
.stage-fold > summary + * { margin-top: 6px; }
.stage-fold .svc-list, .stage-fold .svc-cards { opacity: .92; }
.chip.stage-live { color: var(--ok); border-color: currentColor; }
.chip.stage-beta { color: var(--wait); border-color: currentColor; font-weight: 600; }
.chip.stage-lab { color: var(--sub); border-style: dashed; }
.svc-name .chip { margin: 0 0 0 4px; vertical-align: 1px; font-weight: 600; }

@media (max-width: 700px) {
  .admin-bar { padding: 9px 16px; font-size: 13px; }
  .top .logout { display: none; }
  .svc { padding-left: 12px; min-height: 52px; }
  .svc-desc { display: none; }
  .svc-meta { display: none; }
  /* 모바일: 고정한 서비스는 위에 가로 카드로 */
  .pinned-cards { display: block; }
  .cards-label { margin: 0 0 6px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
  .svc-list.has-pinned { display: flex; flex-direction: column; border: 0; background: none; }
  .svc-list.has-pinned .svc.is-pinned { display: none; }
  .svc-list.has-pinned .svc-sep { display: none; }
  .svc-list.has-pinned .svc:not(.is-pinned) { background: var(--card); border: 1px solid var(--line); border-bottom: 0; }
  .svc-list.has-pinned .svc:not(.is-pinned):last-child { border-bottom: 1px solid var(--line); }
  .mcards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scroll-snap-type: x mandatory; }
  .mcard { flex: 0 0 62%; scroll-snap-align: start; min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px;
    background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 6px; color: var(--text); font-weight: 700; font-size: 16px; }
  .mcard:hover { text-decoration: none; color: var(--text); }
}
@media (max-width: 700px) {
  .mcard.svc { display: flex; align-items: stretch; text-align: left; padding: 10px 6px 12px 14px; min-height: 104px; border-bottom: 1px solid var(--note-line); gap: 4px; }
  .mcard .dot:not([class*=" "]) { background: var(--line); }
  .mcard-top { display: flex; align-items: center; justify-content: space-between; }
  .mcard-top .rowmenu summary { width: 36px; height: 36px; }
  .mcard-name { color: var(--text); font-weight: 700; font-size: 16px; padding-right: 8px; }
  .mcard-name::after { content: ""; position: absolute; inset: 40px 0 0 0; }
  .mcard .state-text { font-size: 12px; font-weight: 400; }
}
@media (max-width: 700px) { .top .avatar { margin-left: auto; } }
.view-only { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 24px; font-size: 13px; background: var(--note-bg); color: var(--note-ink); border-bottom: 1px solid var(--note-line); }
.view-only.need { background: var(--err-bg); color: var(--err-ink); border-bottom-color: transparent; }
@media (max-width: 700px) { .view-only { padding: 8px 16px; } }

/* ── D 내 계정 ── */
.acct-profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar.big { width: 64px; height: 64px; font-size: 24px; }
.acct-who { flex: 1; min-width: 200px; }
.acct-who p { margin: 0; }
.acct-name { font-size: 20px; font-weight: 700; }
.acct-edit { position: relative; }
.acct-edit summary { list-style: none; } .acct-edit summary::-webkit-details-marker { display: none; }
.acct-edit-form { display: flex; gap: 8px; margin-top: 8px; min-width: 260px; }
.acct-edit[open] { flex-basis: 100%; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-head h2 { margin: 0; }
.dev-list, .hid-list { list-style: none; margin: 0 0 8px; padding: 0; border-top: 2px solid var(--strong-line); }
.dev { display: flex; align-items: center; gap: 14px; padding: 10px 4px; border-bottom: 1px solid var(--line-in); }
.dev-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--sub); stroke-width: 1.5; }
.dev-text { flex: 1; min-width: 0; }
.dev-text p { margin: 0; }
.dev-name { font-weight: 600; }
.dev-meta { font-size: 13px; color: var(--sub); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.chip.big { font-size: 13px; line-height: 26px; padding: 0 10px; color: var(--text); }
.hid-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line-in); }
.acct-misc { display: grid; grid-template-columns: 1fr 1fr auto; gap: 18px; align-items: start; }
.acct-misc h2 { margin-bottom: 8px; font-size: 14px; }
@media (max-width: 700px) { .acct-misc { grid-template-columns: 1fr; } }

/* ── E 접근 거부 ── */
.auth-card.deny { align-items: center; text-align: center; }
.deny-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--th); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; }
.deny-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--sub); stroke-width: 1.6; }
.deny-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.deny-switch button { font-size: 13px; color: var(--sub); text-decoration: underline; }
.auth-card.deny .alert { margin: 0; text-align: left; }

/* ── F 관리 > 사람 ── */
.page-head { display: flex; align-items: center; justify-content: space-between; }
.people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.people.with-panel { grid-template-columns: minmax(0, 1fr) 380px; }
.people-search { display: flex; gap: 8px; margin-bottom: 10px; }
.people-search input { flex: 1; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filter { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border: 1px solid var(--line-input); border-radius: 15px; color: var(--sub); font-size: 13px; background: var(--card); }
.filter b { color: var(--text); font-weight: 700; }
.filter:hover { text-decoration: none; border-color: var(--strong-line); color: var(--text); }
.filter.on { background: var(--strong-line); border-color: var(--strong-line); color: #fff; } .filter.on b { color: #fff; }
.people-table td a { color: var(--text); } .people-table td a:hover { color: var(--primary); }
.people-table tr.on td { background: var(--note-bg); }
.people-table tr.st-row-departed td { color: var(--muted); }
.dot.st-active { background: #2e9e57; } .dot.st-invited { background: #e0a100; } .dot.st-suspended { background: #c0392b; } .dot.st-departed { background: #9aa3ad; }
.danger-link { color: var(--danger) !important; }
.invite-box textarea { min-height: 72px; font-family: inherit; }
.inv-warn { margin: 0; padding: 8px 10px; border-radius: 4px; background: var(--err-bg); color: var(--err-ink); font-size: 13px; }
.roles-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.roles-pick legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-left: 2px solid var(--strong-line); border-radius: 4px; padding: 18px 20px; position: sticky; top: 12px; max-height: calc(100vh - 140px); overflow: auto; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0 0 8px; font-size: 19px; }
.panel-sub { font-size: 13px; margin: 16px 0 8px; color: var(--sub); }
.seg { display: inline-flex; border: 1px solid var(--line-input); border-radius: 4px; overflow: hidden; }
.seg form + form .seg-btn { border-left: 1px solid var(--line-input); }
.seg-btn { border: 0; border-radius: 0; height: 34px; min-width: 76px; }
.seg-btn.on, .seg-btn.on:disabled { background: var(--menu-on); color: var(--text); font-weight: 700; cursor: default; }
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-x { border: 0; background: none; height: auto; min-width: 0; padding: 0 0 0 4px; font-size: 15px; line-height: 1; color: var(--sub); cursor: pointer; }
.chip-x:hover { color: var(--danger); background: none; }
.role-add { position: relative; } .role-add summary { list-style: none; cursor: pointer; min-width: 30px; text-align: center; }
.role-add summary::-webkit-details-marker { display: none; }
.role-add-pop { position: absolute; left: 0; top: 32px; z-index: 10; width: 300px; background: var(--card); border: 1px solid var(--line-input); border-radius: 4px; padding: 10px 12px; box-shadow: 0 4px 12px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 8px; }
.su-row, .sess-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-in); margin-top: 16px; }
.sess-row { margin-top: 0; }
.switch { min-width: 64px; height: 30px; border-radius: 15px; font-size: 13px; }
.switch.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.mini-dev, .mini-log { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; }
.mini-dev li, .mini-log li { padding: 4px 0; border-bottom: 1px dashed var(--line-in); }
.panel-more { margin-top: 12px; border-top: 1px solid var(--line-in); padding-top: 12px; }
.panel-more summary { cursor: pointer; font-size: 13px; font-weight: 600; }
dialog.modal { border: 1px solid var(--line-input); border-radius: 6px; padding: 22px 24px; max-width: 440px; width: calc(100% - 32px); background: var(--card); color: var(--text); }
dialog.modal::backdrop { background: rgba(0,0,0,.45); }
dialog.modal h2 { font-size: 17px; }
dialog.modal ul { padding-left: 18px; margin: 0 0 10px; line-height: 1.8; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.danger-fill:hover { background: #a93226; color: #fff; }
@media (max-width: 1000px) { .people.with-panel { grid-template-columns: minmax(0, 1fr); } .panel { position: static; max-height: none; } }

/* ── G 관리 > 서비스 ── */
.svc-admin td a { color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.svc-admin td a:hover { color: var(--primary); }
.svc-admin .svc-icon svg, .page-head .svc-icon svg { width: 18px; height: 18px; }
td.num { text-align: right; }
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--strong-line); margin: 6px 0 16px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--sub); font-size: 14px; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); font-weight: 700; border-bottom-color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .span2 { grid-column: 1 / -1; }
.hint { font-weight: 400; font-size: 12px; color: var(--muted); }
fieldset.plain { border: 0; padding: 0; margin: 0; }
fieldset.plain legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.pick-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; margin-top: 10px; max-height: 280px; overflow: auto; }
.promo-line { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px dashed var(--strong-line); border-radius: 4px; background: var(--card); }
.promo-line .promo-x { margin-left: auto; color: var(--sub); }
details.card > summary { list-style: none; cursor: pointer; } details.card > summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.key-modal { max-width: 560px; margin: 24px auto; background: var(--card); border: 1px solid var(--strong-line); border-radius: 6px; padding: 24px 26px; box-shadow: 0 8px 24px rgba(0,0,0,.12); display: flex; flex-direction: column; gap: 14px; }
.key-modal h1 { font-size: 19px; margin: 0; }
.key-modal .alert { margin: 0; }
.key-copy { display: flex; align-items: stretch; }
.key-copy .keybox { flex: 1; margin: 0; border-radius: 4px 0 0 4px; }
.key-copy button { height: auto; border-radius: 0 4px 4px 0; border-left: 0; }
.key-saved { font-weight: 600; }
.button.is-disabled, .button.is-disabled:hover { background: #9aa3ad; border-color: #9aa3ad; color: #fff; cursor: not-allowed; }
.home-promo { margin-top: 14px; }
.home-promo a { color: var(--text); } .home-promo a:hover { color: var(--primary); }
.home-promo .promo-x button { font-size: 16px; color: var(--sub); padding: 0 4px; }
@media (max-width: 700px) { .home-promo { flex-wrap: wrap; gap: 6px 10px; } }

/* ── H 감사 기록 ── */
.audit-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.audit-filters select, .audit-filters input { width: auto; min-width: 140px; }
.audit-filters input[name=q] { flex: 1; min-width: 200px; }
.day-label { font-size: 13px; color: var(--muted); font-weight: 600; margin: 16px 0 6px; }
.timeline { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--strong-line); }
.tl { border-bottom: 1px solid var(--line-in); } .tl:last-child { border-bottom: 0; }
.tl a { display: flex; align-items: center; gap: 12px; padding: 9px 14px; color: var(--text); }
.tl a:hover { background: var(--row-on); text-decoration: none; }
.tl.on a { background: var(--note-bg); }
.tl.deny a { background: var(--err-bg); }
.tl-time { font-variant-numeric: tabular-nums; color: var(--muted); width: 44px; flex: none; font-size: 13px; }
.tl-text { font-size: 14px; min-width: 0; }
.chip.cat-deny { color: var(--danger); border-color: currentColor; } .chip.cat-request { color: var(--wait); border-color: currentColor; }
.chip.cat-mode { color: #6b21a8; border-color: currentColor; } .chip.cat-role { color: var(--primary); border-color: currentColor; }
table.kv { border-top: 1px solid var(--line); margin: 6px 0 10px; }
table.kv th { width: 84px; background: var(--label-cell); font-weight: 600; }
.panel pre.keybox { max-height: 320px; overflow: auto; font-size: 12px; }

/* ── 서비스 소개 · 보기 방식 · 기술 상세(다른 분, 10-06) ── */
/* ── 홈: 보기 방식 · 서비스 소개 자리 ── */
.view-pick { display: inline-flex; margin-left: auto; border: 1px solid var(--line-input); border-radius: 4px; overflow: hidden; }
.view-pick button { display: inline-flex; align-items: center; gap: 5px; height: 30px; min-width: 0; padding: 0 10px;
  border: 0; border-radius: 0; background: var(--card); color: var(--sub); font-size: 12.5px; }
.view-pick button + button { border-left: 1px solid var(--line-input); }
.view-pick svg { width: 14px; height: 14px; }
.view-pick button:hover { background: var(--th); color: var(--text); }
.view-pick button[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); font-weight: 700; }

.intro-card { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 4px; color: var(--text); }
.intro-card:hover { background: var(--row-on); text-decoration: none; color: var(--text); }
.intro-icon { width: 20px; height: 20px; flex: none; color: var(--primary); }
.intro-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.intro-text b { font-size: 14.5px; } .intro-text > span { font-size: 13px; color: var(--muted); }
.intro-go { margin-left: auto; color: var(--muted); flex: none; }
.intro-card:hover .intro-go { color: var(--primary); }
@media (max-width: 700px) { .intro-text > span { display: none; } }

/* 홈 카드 보기 — 줄 보기와 같은 markup 을 격자로 다시 배치한다(상태 점 스크립트가 그대로 돈다). */
.svc-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.svc-cards .svc { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main menu" "meta state";
  align-items: start; gap: 8px; min-height: 112px; padding: 14px 8px 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.svc-cards .svc:hover { background: var(--card); border-color: var(--primary); }
.svc-cards .svc.is-pinned { border-left: 3px solid var(--danger); padding-left: 12px; }
.svc-cards .svc-main { grid-area: main; align-items: flex-start; padding: 0; }
.svc-cards .svc-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc-cards .rowmenu { grid-area: menu; }
.svc-cards .rowmenu summary { width: 32px; height: 32px; }
.svc-cards .svc-meta { grid-area: meta; align-self: end; }
.svc-cards .svc-state { grid-area: state; align-self: end; justify-content: flex-end; }
.svc-cards .svc-sep { grid-column: 1 / -1; border-radius: 4px; border-top: 0; }
@media (max-width: 700px) { .svc-cards .svc-desc, .svc-cards .svc-meta { display: block; } }

/* ── 서비스 소개 ── */
.guide-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a { padding: 7px 13px; border-radius: 4px; color: var(--sub); font-size: 14px; white-space: nowrap; }
.tabs a:hover { background: var(--th); color: var(--text); text-decoration: none; }
.tabs a.on { background: var(--primary); color: var(--primary-ink); font-weight: 600; }
.level-pick { display: inline-flex; border: 1px solid var(--line-input); border-radius: 4px; overflow: hidden; }
.level-pick a { padding: 6px 13px; font-size: 12.5px; color: var(--sub); background: var(--card); white-space: nowrap; }
.level-pick a + a { border-left: 1px solid var(--line-input); }
.level-pick a:hover { color: var(--text); background: var(--th); text-decoration: none; }
.level-pick a.on { background: var(--primary); color: var(--primary-ink); font-weight: 700; }

.guide h2 { font-size: 17px; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--strong-line); }
.guide h3 { font-size: 14.5px; margin: 18px 0 8px; }
.guide p { margin: 0 0 10px; } .guide .card p:last-child { margin-bottom: 0; }
.guide ul { margin: 0 0 12px; padding-left: 20px; } .guide li { margin-bottom: 5px; }
.guide .lead-line { font-size: 16px; line-height: 1.65; margin: 0 0 14px; }
.guide .lead-line b { color: var(--primary); }

.summary { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--primary); border-radius: 4px; padding: 14px 16px; margin-bottom: 18px; }
.summary .mark { width: 28px; height: 28px; flex: none; color: var(--primary); }
.summary .mark svg { width: 28px; height: 28px; }

.inout { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; margin: 0 0 16px; }
.inout .box { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; }
.inout .box h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.inout .box p { margin: 0; font-size: 14px; }
.inout .arrow { align-self: center; color: var(--muted); font-size: 20px; }
@media (max-width: 820px) { .inout { grid-template-columns: 1fr; } .inout .arrow { transform: rotate(90deg); justify-self: center; } }

.guide table.spec th { width: 170px; vertical-align: top; white-space: normal; }
.guide table.spec td { vertical-align: top; }
.guide table.refs th { width: 120px; vertical-align: top; white-space: normal; }
.guide table.refs td { vertical-align: top; }
.guide table.refs td.what { width: 210px; font-weight: 600; color: var(--text); }
.guide table.refs td a { word-break: break-all; }

.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.link-card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; }
.link-card .dir { font-size: 11.5px; font-weight: 700; }
.link-card .dir.out { color: var(--primary); } .link-card .dir.in { color: var(--ok); }
.link-card strong { display: block; margin: 3px 0 4px; font-size: 14.5px; }
.link-card span { font-size: 13px; color: var(--muted); line-height: 1.55; }

.figure { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 16px; margin: 0 0 16px; overflow-x: auto; }
.figure svg { display: block; width: 100%; height: auto; min-width: 640px; }
.figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.figure .b-fill { fill: var(--bg); } .figure .c-fill { fill: var(--card); }
.figure .stroke { stroke: var(--line-input); fill: none; }
.figure .accent { stroke: var(--primary); fill: none; }
.figure text { fill: var(--text); font-family: inherit; }
.figure text.small { fill: var(--muted); font-size: 11px; }
.figure text.label { font-size: 13px; font-weight: 600; }
.figure text.tiny { fill: var(--muted); font-size: 10px; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; }
.fact .n { font-size: 20px; font-weight: 700; line-height: 1.2; }
.fact .k { font-size: 12px; color: var(--muted); margin-top: 3px; }
.guide h4 { font-size: 13.5px; margin: 16px 0 6px; color: var(--sub); }
