* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Poppins, sans-serif; color: #1E1C3A; background: #F6F6FB; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
.app { min-height: 100vh; display: flex; flex-direction: column; }
.top { display: flex; background: #fff; border-bottom: 1px solid #ECECF4; min-height: 78px; }
.brand { width: 248px; flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-right: 1px solid #ECECF4; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: #4B43B5; color: #fff; display: flex; align-items: center; justify-content: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: 0.16em; color: #4B43B5; }
.brand-sub { font-size: 10px; font-weight: 500; letter-spacing: 0.22em; color: #75758F; margin-top: 4px; }
.top-main { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 28px; }
.top-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.top-title span:first-child { font-size: 21px; font-weight: 600; }
.top-title span:last-child { font-size: 13px; color: #6B6B85; }
.top-user { display: flex; align-items: center; gap: 14px; }
.icon-btn, .who { border: 0; background: transparent; color: #4A4A63; display: flex; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; justify-content: center; position: relative; }
.dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: #E0663D; }
.who { gap: 8px; padding: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 14px; flex: none; }
.avatar.lg { width: 84px; height: 84px; font-size: 28px; }
.avatar.sm { width: 38px; height: 38px; font-size: 13px; }
.avatar.org { border-radius: 11px; }
.coral { background: #E0663D; }
.body { display: flex; flex: 1; min-height: 0; }
nav { width: 248px; flex: none; background: #fff; border-right: 1px solid #ECECF4; padding: 28px 16px; display: flex; flex-direction: column; gap: 4px; }
.nav-btn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; color: #4A4A63; font-size: 15px; font-weight: 500; text-align: left; }
.nav-btn.on { background: #ECEAFB; color: #4B43B5; font-weight: 600; }
.nav-btn span.grow { flex: 1; }
.nav-count { font-size: 11px; font-weight: 600; color: #6B6B85; background: #F2F1F8; border-radius: 999px; padding: 2px 8px; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em; color: #75758F; padding: 26px 14px 8px; }
main { flex: 1; min-width: 0; padding: 28px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.card { background: #fff; border: 1px solid #ECECF4; border-radius: 18px; }
.pad { padding: 22px 24px; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #75758F; }
.search input { width: 100%; height: 50px; padding: 0 16px 0 48px; border: 1px solid #E2E2EC; border-radius: 13px; background: #FBFBFE; font-size: 15px; color: #1E1C3A; }
.search.big input { height: 56px; padding-left: 52px; border-radius: 14px; font-size: 16px; }
.search.big svg { left: 18px; }
.hint { margin: 12px 2px 0; font-size: 13px; color: #6B6B85; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat { background: #fff; border: 1px solid #ECECF4; border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat b { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.stat span { font-size: 13px; color: #6B6B85; font-weight: 500; }
.stat em { font-style: normal; font-size: 12.5px; font-weight: 500; }
.green { color: #1B6F45; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split .grow { flex: 3 1 540px; min-width: 0; }
.split .side { flex: 2 1 380px; min-width: 0; }
.headrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
h1 { margin: 0; font-size: 24px; font-weight: 600; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
.pill { font-size: 12px; font-weight: 600; background: #ECEAFB; color: #4B43B5; border-radius: 999px; padding: 4px 12px; }
.btn, .ghost { height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.btn { border: 0; background: #4B43B5; color: #fff; }
.ghost { border: 1px solid #E2E2EC; background: #fff; color: #4B43B5; }
.link { border: 0; background: none; padding: 0; color: #4B43B5; font-size: 13px; font-weight: 600; }
.row-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 16px; border: 0; border-top: 1px solid #F1F1F7; background: transparent; text-align: left; color: inherit; }
.row-btn:hover, .hit:hover { background: #FBFBFE; }
.hit { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: inherit; }
.sub { font-size: 12.5px; color: #6B6B85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name { font-size: 14px; font-weight: 600; }
.chip { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; border: 1px solid #E2E2EC; background: #fff; color: #4A4A63; }
.chip-btn.on { background: #4B43B5; color: #fff; border-color: #4B43B5; }
.table-card { overflow: hidden; }
.table-head { display: flex; justify-content: space-between; gap: 10px; padding: 14px 20px; background: #FBFBFE; border-bottom: 1px solid #F0F0F6; }
.scroll { overflow: auto; }
.scroll.cap { max-height: 640px; }
.grid, .ghead { display: grid; gap: 16px; align-items: center; }
.g-person { grid-template-columns: minmax(230px, 2.2fr) minmax(200px, 2fr) 120px minmax(170px, 1.3fr) 140px; }
.g-org { grid-template-columns: minmax(250px, 2.4fr) minmax(200px, 2fr) 120px 90px 140px; }
.ghead { padding: 10px 20px; font-size: 11px; letter-spacing: 0.08em; font-weight: 600; color: #75758F; position: sticky; top: 0; background: #fff; border-bottom: 1px solid #F0F0F6; }
.grid { width: 100%; padding: 12px 20px; border: 0; border-bottom: 1px solid #F3F3F8; background: transparent; text-align: left; color: inherit; }
.minw { min-width: 920px; }
.who-cell, .two { display: flex; flex-direction: column; min-width: 0; }
.who-cell { flex-direction: row; align-items: center; gap: 12px; }
.empty, .loading { padding: 28px 20px; text-align: center; color: #6B6B85; font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; letter-spacing: 0.08em; color: #75758F; font-weight: 600; padding: 14px 12px; border-bottom: 1px solid #F0F0F6; background: #F7F7FB; }
td { padding: 12px; border-bottom: 1px solid #F1F1F7; }
td.num, th.num { text-align: right; }
.bar { display: block; height: 4px; border-radius: 4px; background: #F0EFF7; width: 120px; margin-top: 6px; }
.bar i { display: block; height: 4px; border-radius: 4px; }
.profile { display: flex; flex-wrap: wrap; gap: 28px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 28px; flex: 1; }
.kv small { display: block; font-size: 11px; letter-spacing: 0.08em; font-weight: 600; color: #75758F; }
.kv b { font-size: 15px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: #4A4A63; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.setrow { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid #F1F1F7; font-size: 13.5px; }
.setrow span { color: #6B6B85; }
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(30, 28, 58, 0.38); border: 0; }
.panel { position: fixed; top: 0; right: 0; z-index: 21; height: 100%; width: min(980px, 100%); background: #F6F6FB; box-shadow: -12px 0 40px rgba(30, 28, 58, 0.18); display: flex; flex-direction: column; }
.panel.wide { width: min(1180px, 100%); }
.panel-top, .panel-foot { background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; }
.panel-top { border-bottom: 1px solid #ECECF4; }
.panel-foot { border-top: 1px solid #ECECF4; }
.panel-body { flex: 1; overflow: auto; padding: 22px 28px 28px; display: flex; flex-direction: column; gap: 18px; }
.hero { display: flex; gap: 16px; align-items: flex-start; }
.kicker { font-size: 12px; color: #6B6B85; }
.group { background: #fff; border: 1px solid #ECECF4; border-radius: 16px; padding: 18px 20px; }
.group h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: #4A4A63; }
.fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 16px; }
.span1 { grid-column: span 1; } .span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: span 4; } .span6 { grid-column: span 6; }
label.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
label.fld span { font-size: 12px; font-weight: 600; color: #4A4A63; }
input, select, textarea { border: 1px solid #E2E2EC; border-radius: 10px; background: #fff; font-size: 14px; color: #1E1C3A; width: 100%; }
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 10px 12px; min-height: 96px; }
.items { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.item small { display: block; font-size: 11px; letter-spacing: 0.06em; font-weight: 600; color: #75758F; }
.person-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid #F1F1F7; }
.err { color: #B23A2A; font-size: 13.5px; font-weight: 600; margin: 0; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 40; background: #1E1C3A; color: #fff; font-size: 14px; padding: 12px 20px; border-radius: 12px; box-shadow: 0 10px 30px rgba(30, 28, 58, 0.25); }
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 420px; max-width: 100%; background: #fff; border: 1px solid #ECECF4; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login-lead { margin: 8px 0 0; color: #6B6B85; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: #4A4A63; }
.login-msg { min-height: 20px; margin: 0; color: #B23A2A; font-size: 13.5px; font-weight: 600; }
.login-card .btn { justify-content: center; }
@media (max-width: 860px) {
	.brand, nav { width: 100%; border-right: 0; }
	.top, .body { flex-direction: column; }
	.fields { grid-template-columns: 1fr; }
	.span1, .span2, .span3, .span4, .span6 { grid-column: auto; }
}
