/* 모듈 7: 회사 · 직원관리 · 설정 (tokens.css 변수만 사용) */
.adm { display: flex; flex-direction: column; gap: 0; }
.adm-head { display: flex; align-items: flex-end; gap: 12px; }
.adm-head > div { flex: 1; min-width: 0; }
.adm .grow, .adm-md .grow { flex: 1; }
.adm-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.adm-row.end { justify-content: flex-end; }
.adm-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.adm-bar .inp { width: 260px; }
.adm-pad { padding: 16px 18px; margin-bottom: 12px; }
.adm-h3 { font-size: 15px; font-weight: 800; margin: 0 0 10px; color: var(--navy-700); }
.adm-h3 small { font-weight: 500; margin-left: 6px; }
.inp.sm { height: 30px; padding: 0 8px; font-size: 13px; }
.inp.area { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; width: 100%; font-family: var(--font); }
.inp.wide { width: 100%; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 6px 0 0; }
.chip.ok { background: #dcfce7; color: #166534; } .chip.warn { background: #fef3c7; color: #92400e; } .chip.bad { background: #fee2e2; color: #b91c1c; } .chip.new { background: var(--grad); color: #fff; }

/* 모달 본문 */
.adm-md { padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 10px; }
.adm-md h2 { margin: 0; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--navy-800); }
.adm-md .mut, .adm-md p { margin: 0; font-size: 13px; line-height: 1.55; }
.adm-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-f > span { font-size: 12px; font-weight: 700; color: var(--text-2); }
.adm-f small { font-size: 11px; color: var(--mute-2); }
.adm-f .inp { width: 100%; }
.adm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.adm-cred { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.adm-cred div { display: flex; gap: 10px; align-items: baseline; }
.adm-cred span { width: 96px; flex: none; font-size: 12px; color: var(--mute); }
.adm-cred b { font-family: ui-monospace, Consolas, monospace; font-size: 15px; word-break: break-all; }
.adm-cks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.adm-ck { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 13px; background: #fff; transition: border-color var(--t); }
.adm-ck:hover { border-color: var(--blue-400); }
.adm-ck.mod { border-color: var(--warn); background: #fffbeb; }
.adm-ck em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--warn); }
.adm-ck input { width: 16px; height: 16px; accent-color: var(--blue-500); flex: none; }

/* 계정 표 (직원 수가 적어 일반 그리드) */
.adm-tbl { overflow: hidden; }
.adm-tr { display: grid; grid-template-columns: 1.4fr 1fr 120px 150px 120px minmax(260px, 1.8fr); gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 14px; }
.adm-tr.hd { border-top: 0; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--mute); padding: 9px 16px; }
.adm-tr.off { opacity: .55; }
.adm-tr .nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.adm-tr .nm em { font-style: normal; font-size: 11px; }
.adm-tr .av { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); color: #fff; font-style: normal; font-weight: 800; font-size: 13px; flex: none; }
.adm-tr .act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.adm-tr select.inp, .adm-tr input.inp { width: 100%; }
.adm-mx { overflow: auto; }
.adm-mx table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.adm-mx th { position: sticky; top: 0; background: var(--surface-2); font-weight: 700; color: var(--mute); padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.adm-mx th span { display: block; max-width: 74px; margin: 0 auto; line-height: 1.25; font-size: 11.5px; word-break: keep-all; }
.adm-mx td { text-align: center; padding: 8px 6px; border-bottom: 1px solid var(--line-2); }
.adm-mx td:first-child, .adm-mx th:first-child { text-align: left; padding-left: 16px; white-space: nowrap; }
.adm-mx td:first-child small { margin-left: 6px; color: var(--mute); }
.adm-mx td.y { color: var(--blue-500); font-size: 15px; } .adm-mx td.n { color: var(--mute-2); }
.adm-why { margin: 12px 0 0; padding-left: 18px; line-height: 1.8; font-size: 14px; }
.adm-why .bad { color: var(--bad); font-weight: 700; }

/* 회사: 목록 */
.adm-list { overflow: hidden; }
.adm-li { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-2); cursor: pointer; transition: background var(--t); min-width: 0; }
.adm-li:first-child { border-top: 0; }
.adm-li:hover { background: #f1f5ff; }
.adm-li.must { background: #fff7f5; }
.adm-li b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.adm-li .ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 40%; }
.adm-nb .adm-body { white-space: pre-wrap; line-height: 1.75; margin-top: 14px; font-size: 14.5px; }
.adm-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0; }
.adm-dl div { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--line-2); min-width: 0; }
.adm-dl dt { width: 120px; flex: none; color: var(--mute); font-size: 13px; }
.adm-dl dd { margin: 0; font-weight: 600; white-space: pre-wrap; word-break: break-word; min-width: 0; }

/* 설정 */
.adm-set { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
.adm-set > nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.adm-set > nav a { padding: 9px 12px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--text-2); cursor: pointer; transition: background var(--t), color var(--t); }
.adm-set > nav a:hover { background: var(--surface-2); }
.adm-set > nav a.on { background: var(--grad); color: #fff; box-shadow: 0 6px 14px rgba(37,99,235,.22); }
.adm-set > nav small { padding: 10px 12px 4px; font-size: 11.5px; line-height: 1.5; }
.adm-gt { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.adm-gt th { text-align: left; font-size: 12px; color: var(--mute); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.adm-gt td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.adm-gt td .inp { width: 100%; max-width: 160px; }
.adm-gt tr.team td { background: #f1f5ff; }
.adm-gt tr.sum td { color: var(--mute); font-weight: 700; }
.adm-scr { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 420px; overflow: hidden; }
.adm-scr > nav { border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.adm-scr > nav > div { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.adm-scr > nav small { padding: 4px 8px; font-size: 11.5px; }
.adm-scr > nav a { padding: 8px 10px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.adm-scr > nav a em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--mute-2); }
.adm-scr > nav a:hover { background: #fff; }
.adm-scr > nav a.on { background: #fff; color: var(--blue-500); box-shadow: var(--sh-1); }
.adm-scr .ed { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.adm-scr .ed > .adm-row { margin-top: 0; }
.adm-vars { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.adm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.adm-prev { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: #f8fbff; min-width: 0; overflow: auto; max-height: 520px; }
.adm-prev pre { margin: 6px 0 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font); font-size: 13.5px; line-height: 1.65; }
.adm-stl { border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; background: #fff; position: relative; padding-bottom: 14px; font-size: 13px; }
.adm-stl .hd { background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.adm-stl .hd b { font-size: 17px; } .adm-stl .hd small { opacity: .7; font-size: 11px; }
.adm-stl p { padding: 0 18px; line-height: 1.6; }
.adm-stl .ac { margin: 0 18px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.adm-stl .ac span { font-size: 11px; color: var(--mute); }
.adm-stl .seal { position: absolute; right: 18px; bottom: 34px; width: 64px; height: 64px; display: grid; place-items: center; }
.adm-stl .seal img { max-width: 64px; max-height: 64px; }
.adm-stl .seal span { width: 58px; height: 58px; border: 2px solid #dc2626; color: #dc2626; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1.15; text-align: center; }
.adm-stl > small { display: block; padding: 12px 90px 0 18px; }
.adm-st { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.adm-st .r { display: grid; grid-template-columns: 120px minmax(0, 1fr); grid-template-areas: 'c m' 'i p'; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.adm-st .r .chip { grid-area: c; justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.adm-st .r .mut { grid-area: m; font-size: 12px; }
.adm-st .r .inp { grid-area: i; width: 100%; }
.adm-st .pal { grid-area: p; display: flex; gap: 4px; flex-wrap: wrap; }
.adm-st .pal i { width: 18px; height: 18px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; box-sizing: border-box; }
.adm-st .pal i.on { border-color: #fff; box-shadow: 0 0 0 2px var(--navy-700); }
.adm-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.adm-feat .f { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 's b' 's d'; gap: 2px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color var(--t), opacity var(--t); }
.adm-feat .f:hover { border-color: var(--blue-400); }
.adm-feat .f.off { opacity: .55; }
.adm-feat .f b { grid-area: b; font-size: 14px; } .adm-feat .f small { grid-area: d; color: var(--mute); font-size: 12px; }
.adm-feat .sw { grid-area: s; position: relative; width: 38px; height: 22px; }
.adm-feat .sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.adm-feat .sw i { position: absolute; inset: 0; border-radius: 11px; background: #cbd5e1; transition: background var(--t); pointer-events: none; }
.adm-feat .sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--t) var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.adm-feat .sw input:checked + i { background: var(--grad); }
.adm-feat .sw input:checked + i::after { transform: translateX(16px); }
.adm-hl { display: grid; gap: 8px; }
.adm-hl > div { display: grid; grid-template-columns: 12px 180px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.adm-hl i { width: 10px; height: 10px; border-radius: 50%; }
.adm-hl .ok i { background: var(--ok); box-shadow: 0 0 0 4px rgba(5,150,105,.15); } .adm-hl .bad i { background: var(--bad); box-shadow: 0 0 0 4px rgba(220,38,38,.15); }
.adm-hl span { color: var(--text-2); word-break: break-word; }

/* 비밀번호 */
.adm-pw { padding: 24px; display: flex; flex-direction: column; gap: 10px; width: 100%; box-sizing: border-box; }
.adm-pw h2 { margin: 0; font-size: 19px; color: var(--navy-700); }
.adm-pw .inp { width: 100%; }
.adm-gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: radial-gradient(1200px 600px at 50% 0%, rgba(34,211,238,.18), transparent), linear-gradient(180deg, var(--navy-900), var(--navy-700)); }
.adm-gate .adm-pw { width: min(380px, 92vw); background: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-3); }

@media (max-width: 1100px) { .adm-tr { grid-template-columns: 1.2fr 1fr 110px 120px 110px; } .adm-tr .act { grid-column: 1 / -1; justify-content: flex-start; } .adm-feat { grid-template-columns: repeat(2, minmax(0, 1fr)); } .adm-cks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .adm-set { grid-template-columns: 1fr; } .adm-two, .adm-st, .adm-dl, .adm-grid2 { grid-template-columns: 1fr; } }
