/* SFiT 통합 관리 콘솔 — 토큰은 shared/theme.css. 좌측 목차 + 본문 2단. (2026-09-04) */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.5; }
[hidden] { display: none !important; }
.adm { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - var(--appbar-h)); }
.adm-nav { background: var(--card); border-right: 1px solid var(--border); padding: 18px 0; position: sticky; top: 0; align-self: start; height: calc(100vh - var(--appbar-h)); overflow: auto; display: flex; flex-direction: column; }
.adm-nav-head { padding: 0 18px 14px; border-bottom: 1px solid var(--border); }
.adm-nav-title { font-weight: 800; font-size: 15px; letter-spacing: -.3px; }
.adm-nav-sub { font-size: 11.5px; color: var(--text-sub); margin-top: 2px; }
.adm-group { font-size: 10.5px; font-weight: 700; color: var(--text-sub); letter-spacing: .4px; text-transform: uppercase; padding: 14px 18px 4px; }
.adm-item { display: block; padding: 7px 18px; color: var(--text); text-decoration: none; font-size: 13px; border-left: 3px solid transparent; transition: background .12s; }
.adm-item:hover { background: rgba(15, 23, 42, .04); }
.adm-item.on { background: rgba(15, 23, 42, .06); border-left-color: var(--primary); font-weight: 600; }
.adm-nav-foot { margin-top: auto; padding: 14px 18px 0; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-sub); }
.adm-nav-foot a { color: var(--primary); text-decoration: none; font-weight: 600; }
.adm-main { padding: 22px 28px 48px; min-width: 0; }
.adm-sec h1 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; margin: 0 0 4px; }
.adm-desc { margin: 0 0 16px; color: var(--text-sub); font-size: 12.5px; max-width: 900px; }
.adm-gate { max-width: 520px; margin: 60px auto; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }

/* 카드·표·폼 — 두 앱과 같은 결 */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 18px; margin: 0 0 14px; }
.card h2 { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.card h2 .hint, .hint { font-weight: 400; font-size: 11.5px; color: var(--text-sub); }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
input, select, textarea { height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; font: inherit; color: var(--text); }
textarea { height: auto; padding: 6px 8px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(71, 85, 105, .25); outline-offset: 1px; border-color: #94a3b8; }
.btn { height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-weight: 600; font-size: 12.5px; cursor: pointer; transition: background .15s, border-color .15s; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #475569, #3f4b5b); border-color: #3f4b5b; color: #fff; }
.btn-primary:hover { background: #334155; border-color: #334155; }
.btn-danger { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.btn-danger:hover { background: #fecaca; border-color: #fca5a5; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: default; }
table.grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: middle; }
table.grid th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; }
table.grid tr:hover td { background: rgba(15, 23, 42, .025); }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.ctr, table.grid th.ctr { text-align: center; }
.table-scroll { overflow: auto; max-height: 70vh; }
.badge { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; background: #e2e8f0; color: #334155; }
.badge.ok { background: #ccfbf1; color: #0f766e; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fecaca; color: #991b1b; }
.badge.sys { background: #e0e7ff; color: #3730a3; }
.empty { color: var(--text-sub); text-align: center; padding: 14px; }
.adm-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: var(--radius); padding: 10px 12px; }
.adm-toast { position: fixed; right: 20px; bottom: 20px; background: #1e293b; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 12.5px; box-shadow: var(--shadow-md); z-index: 50; max-width: 420px; }
.adm-toast.bad { background: #b91c1c; }
.adm-toast.ok { background: #0f766e; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .adm { grid-template-columns: 1fr; } .adm-nav { position: static; height: auto; } .split { grid-template-columns: 1fr; } }

/* 사용자·권한 매트릭스 표 — 계정/탭권한/기능권한을 한 표에 (2026-09-04, A 작업지시) */
.adm-matrix { font-size: 12px; }
.adm-matrix th, .adm-matrix td { white-space: normal; word-break: keep-all; }
.adm-matrix th { text-align: center; vertical-align: bottom; }
.adm-matrix thead tr:first-child th { border-bottom: 1px solid var(--border); }
.adm-matrix td { text-align: center; }
.adm-matrix .mtx-sticky { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; box-shadow: 1px 0 0 var(--border); }
.adm-matrix thead .mtx-sticky { z-index: 2; background: #f8fafc; }
.adm-matrix .mtx-acct-id { font-weight: 700; }
.adm-matrix .mtx-acct-name { color: var(--text-sub); font-size: 11px; }
.adm-matrix .mtx-acct-badges { margin-top: 2px; }
.adm-matrix .mtx-acct-badges .badge { margin: 1px 2px 0 0; }
.adm-matrix .mtx-cell { padding: 3px 4px; }
.adm-matrix .mtx-cell.diff { background: #fdf9ee; box-shadow: inset 0 0 0 1px #f3e6c4; }   /* (사용자 지시 2026-09-04) 오버라이드 표시 — 저채도·고명도 */
.adm-matrix .mtx-dash { color: var(--text-sub); }
.adm-matrix .mtx-full { color: var(--text-sub); font-style: italic; background: #f1f5f9; }
.adm-matrix .seg3 { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.adm-matrix .seg-btn { border: 0; border-right: 1px solid var(--border); background: #fff; color: var(--text-sub); font: inherit; font-size: 11px; padding: 3px 6px; cursor: pointer; line-height: 1.2; }
.adm-matrix .seg-btn:last-child { border-right: 0; }
.adm-matrix .seg-btn:hover { background: #f1f5f9; }
/* (사용자 지시 2026-09-04 "조회·수정은 파스텔톤으로 달리, −는 진회색") 선택된 단계별 색 */
.adm-matrix .seg-btn.on { font-weight: 600; }
.adm-matrix .seg-btn.on[data-lv="none"] { background: #64748b; color: #fff; }
.adm-matrix .seg-btn.on[data-lv="read"] { background: #dbeafe; color: #1e40af; }
.adm-matrix .seg-btn.on[data-lv="write"] { background: #d1fae5; color: #047857; }
.adm-matrix .mtx-fp-cell { position: relative; }
.adm-matrix .mtx-fp-cell input { vertical-align: middle; }
.adm-matrix .mtx-reset { border: 0; background: transparent; color: var(--text-sub); cursor: pointer; font-size: 11px; margin-left: 2px; padding: 0 2px; }
.adm-matrix .mtx-reset:hover { color: var(--text); }

/* 표 열 너비 드래그 손잡이(admin.js makeResizable) */
table.grid th .col-resize { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; user-select: none; z-index: 1; }
table.grid th .col-resize:hover, body.col-resizing table.grid th .col-resize { background: rgba(71, 85, 105, .25); }
body.col-resizing { cursor: col-resize; user-select: none; }
table.grid[style*="fixed"] td, table.grid[style*="fixed"] th { overflow: hidden; text-overflow: ellipsis; }
