:root {
  color-scheme: light;
  --ink: #111713;
  --ink-2: #27332c;
  --muted: #6f7b73;
  --faint: #97a299;
  --line: #dfe6df;
  --line-2: #ecf0ec;
  --paper: #f4f6f2;
  --card: #ffffff;
  --green: #20b978;
  --green-dark: #087d4d;
  --green-soft: #e6f8ef;
  --amber: #ee9b35;
  --amber-soft: #fff3df;
  --red: #d95454;
  --red-soft: #ffeded;
  --nav: #101713;
  --shadow: 0 18px 50px rgba(20, 35, 26, 0.09);
  --radius: 18px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
[hidden] { display: none !important; }
::selection { background: #b8edd4; color: #082c1c; }

.eyebrow { margin: 0 0 8px; color: var(--green-dark); font-size: 10px; line-height: 1.2; font-weight: 800; letter-spacing: .16em; }
.eyebrow.light { color: #96dfbc; }

/* Login */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr); background: #f8faf6; }
.auth-visual { min-height: 720px; padding: 40px clamp(42px, 6vw, 96px) 34px; display: flex; flex-direction: column; position: relative; overflow: hidden; color: #fff; background: #0e1812; }
.auth-visual::before { content: ""; position: absolute; width: 660px; height: 660px; left: -180px; bottom: -420px; border: 1px solid rgba(64, 223, 147, .19); border-radius: 50%; box-shadow: 0 0 0 74px rgba(64, 223, 147, .035), 0 0 0 148px rgba(64, 223, 147, .025); }
.auth-visual::after { content: ""; position: absolute; width: 440px; height: 440px; right: -310px; top: 90px; border-radius: 50%; background: rgba(33, 186, 120, .13); filter: blur(2px); }
.visual-topline { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.mini-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.mini-brand i { width: 32px; height: 32px; display: grid; place-items: center; font-style: normal; border-radius: 10px; color: #0d1c14; background: #39d895; }
.secure-chip { padding: 8px 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 99px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: #b3c2b8; }
.visual-copy { position: relative; z-index: 1; margin: auto 0 38px; max-width: 690px; }
.visual-copy h1 { margin: 0; font-size: clamp(42px, 5vw, 72px); line-height: .99; letter-spacing: -.055em; font-weight: 650; }
.visual-copy h1 em { color: #37d58f; font-style: normal; }
.visual-copy > p:last-child { max-width: 580px; margin: 25px 0 0; color: #a7b6ac; line-height: 1.65; font-size: 16px; }
.visual-console { width: min(700px, 94%); position: relative; z-index: 1; margin-bottom: 30px; padding: 20px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.045); box-shadow: 0 22px 80px rgba(0,0,0,.2); backdrop-filter: blur(18px); }
.console-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; font-size: 12px; color: #c4d0c8; }
.live-pill { padding: 6px 9px; border-radius: 99px; color: #9ce2bd; background: rgba(33, 184, 119, .12); }
.live-pill i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #33d28d; box-shadow: 0 0 0 4px rgba(51,210,141,.12); }
.console-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border-radius: 12px; background: rgba(255,255,255,.09); }
.console-grid article { padding: 15px; background: #15211a; }
.console-grid span { display: block; color: #76877c; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.console-grid strong { display: block; margin: 6px 0 2px; font-size: 24px; letter-spacing: -.04em; }
.console-grid small { color: #809086; font-size: 10px; }
.console-line { display: grid; grid-template-columns: 8px 1.3fr .7fr auto; align-items: center; gap: 10px; padding: 14px 3px 1px; font-size: 11px; }
.console-line.muted { opacity: .65; }
.console-line b { font-size: 11px; }
.console-line > span:not(.pulse), .console-line small { color: #7e8e83; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #28cc83; box-shadow: 0 0 0 4px rgba(40,204,131,.1); }
.pulse.amber { background: var(--amber); box-shadow: 0 0 0 4px rgba(238,155,53,.1); }
.visual-note { position: relative; z-index: 1; margin: auto 0 0; color: #617168; font-size: 11px; }
.auth-panel { display: grid; place-items: center; padding: 60px clamp(35px, 5vw, 90px); }
.login-card { width: min(430px, 100%); }
.auth-logo { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 39px; border-radius: 15px; color: #08281a; background: #2dcc87; font-weight: 850; font-size: 22px; box-shadow: 0 12px 28px rgba(32,185,120,.24); }
.login-card h2 { margin: 0; font-size: clamp(36px, 5vw, 52px); line-height: 1; letter-spacing: -.045em; }
.auth-intro { margin: 16px 0 34px; color: var(--muted); line-height: 1.6; font-size: 14px; }
.auth-intro code { color: var(--ink); font-size: 12px; font-weight: 700; }
.login-card label { display: block; margin-bottom: 9px; font-weight: 700; font-size: 12px; }
.password-field { display: flex; align-items: center; border: 1px solid #d3dbd4; border-radius: 12px; background: white; transition: border .2s, box-shadow .2s; }
.password-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(32,185,120,.11); }
.password-field input { width: 100%; min-width: 0; padding: 15px 0 15px 16px; border: 0; outline: 0; background: transparent; }
.password-field button { padding: 9px 14px; border: 0; color: var(--green-dark); background: transparent; font-size: 11px; font-weight: 800; }
.form-error { min-height: 19px; margin: 8px 0 4px; color: var(--red); font-size: 12px; }
.primary-button { min-height: 42px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--ink); border-radius: 10px; color: white; background: var(--ink); font-size: 12px; font-weight: 750; transition: transform .15s, background .15s; }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); background: #233229; }
.auth-submit { width: 100%; min-height: 51px; justify-content: space-between; padding: 0 18px; }
.auth-submit b { font-size: 18px; }
.auth-help { margin: 20px auto 0; max-width: 350px; text-align: center; color: var(--faint); font-size: 10px; line-height: 1.6; }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 226px 1fr; }
.sidebar { height: 100vh; position: sticky; top: 0; z-index: 20; display: flex; flex-direction: column; padding: 25px 17px 18px; color: #d9e2dc; background: var(--nav); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 30px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; flex: none; border-radius: 10px; color: #08251a; background: #30cf8a; font-size: 16px; font-weight: 850; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1.06; }
.brand b { font-size: 14px; letter-spacing: -.015em; }
.brand small { margin-top: 4px; color: #67756c; font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.main-nav { display: grid; gap: 5px; margin-top: 24px; }
.nav-item { width: 100%; height: 44px; display: grid; grid-template-columns: 27px 1fr auto; align-items: center; padding: 0 11px; border: 0; border-radius: 9px; color: #809087; background: transparent; text-align: left; transition: color .15s, background .15s; }
.nav-item span { font-size: 19px; font-weight: 400; }
.nav-item b { font-size: 11px; font-weight: 650; }
.nav-item em { min-width: 22px; padding: 3px 6px; border-radius: 99px; color: #78877f; background: rgba(255,255,255,.06); font-size: 9px; font-style: normal; text-align: center; }
.nav-item:hover { color: #d5dfd9; background: rgba(255,255,255,.045); }
.nav-item.active { color: #e8fff3; background: rgba(39,199,130,.13); }
.nav-item.active span { color: #36d793; }
.nav-item.active em { color: #b6efd2; background: rgba(44,211,142,.12); }
.sidebar-spacer { flex: 1; }
.sidebar-status { padding: 15px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.03); }
.sidebar-status > p { margin: 0 0 11px; color: #59685f; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.sidebar-status > div { display: flex; align-items: center; gap: 8px; }
.sidebar-status b { font-size: 11px; }
.sidebar-status small { display: block; margin: 7px 0 0 17px; color: #637168; font-size: 9px; }
.status-orb { width: 8px; height: 8px; display: inline-block; flex: none; border-radius: 50%; background: #30ca88; box-shadow: 0 0 0 4px rgba(48,202,136,.11); }
.status-orb.offline { background: #9aa49e; box-shadow: 0 0 0 4px rgba(154,164,158,.1); }
.status-orb.warning { background: var(--amber); box-shadow: 0 0 0 4px rgba(238,155,53,.11); }
.logout-button { height: 38px; margin-top: 10px; padding: 0 12px; display: flex; gap: 9px; align-items: center; border: 0; border-radius: 8px; color: #65746b; background: transparent; font-size: 10px; }
.logout-button:hover { color: #c8d1cb; background: rgba(255,255,255,.04); }
.main-content { min-width: 0; padding: 0 clamp(24px, 3.2vw, 52px) 60px; }
.topbar { min-height: 128px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border-bottom: 1px solid var(--line); }
.breadcrumb { margin: 0 0 9px; color: #9ba69e; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.breadcrumb span { color: #506058; }
.topbar h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.1; letter-spacing: -.04em; }
.topbar > div:first-child > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.global-search { width: 228px; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.65); }
.global-search span { color: #8d9991; font-size: 17px; }
.global-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.72); font-size: 19px; }
.icon-button:hover { background: white; }
.icon-button.loading { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.bot-chip { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #cceadd; border-radius: 10px; color: #11633f; background: #edf9f2; }
.bot-chip b { font-size: 10px; }
.loading-bar { height: 2px; position: fixed; z-index: 80; top: 0; left: 226px; right: 0; overflow: hidden; opacity: 0; background: #d9f4e7; transition: opacity .2s; }
.loading-bar.active { opacity: 1; }
.loading-bar::after { content: ""; width: 34%; height: 100%; display: block; background: var(--green); animation: loading 1s infinite ease-in-out; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(320%); } }
.page-view { padding-top: 26px; }

/* Overview */
.status-banner { min-height: 126px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 25px 29px; overflow: hidden; position: relative; border-radius: var(--radius); color: white; background: #16271e; box-shadow: 0 18px 40px rgba(12, 36, 23, .12); }
.status-banner::after { content: ""; width: 420px; height: 420px; position: absolute; right: -220px; top: -265px; border: 1px solid rgba(83,221,155,.18); border-radius: 50%; box-shadow: 0 0 0 55px rgba(46,207,138,.025), 0 0 0 110px rgba(46,207,138,.025); }
.status-banner.offline { background: #342b25; }
.banner-icon { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(87,231,162,.25); border-radius: 15px; color: #5be0a1; background: rgba(53,210,142,.1); font-size: 22px; }
.offline .banner-icon { border-color: rgba(239,163,67,.25); color: #f2ad55; background: rgba(239,163,67,.1); }
.banner-copy { min-width: 0; position: relative; z-index: 1; }
.banner-copy p { margin: 0 0 6px; color: #62d49e; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.banner-copy h2 { margin: 0 0 6px; font-size: clamp(17px, 2vw, 22px); letter-spacing: -.03em; }
.banner-copy span { color: #90a79a; font-size: 11px; }
.uptime-box { min-width: 150px; position: relative; z-index: 1; padding-left: 27px; border-left: 1px solid rgba(255,255,255,.1); }
.uptime-box small { display: block; color: #71867a; font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.uptime-box strong { display: block; margin: 5px 0 2px; font-size: 19px; }
.uptime-box span { color: #71867a; font-size: 9px; }
.pairing-card { margin-top: 18px; padding: 25px 30px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border: 1px solid #f0d7ad; border-radius: var(--radius); background: #fff9ef; }
.pairing-card h2 { margin: 0 0 7px; font-size: 22px; letter-spacing: -.03em; }
.pairing-card p:last-child { max-width: 540px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.pairing-card img { width: 150px; border: 8px solid white; border-radius: 12px; box-shadow: var(--shadow); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.stat-card { min-height: 148px; padding: 19px 20px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.84); }
.stat-card.accent { border-color: #bde8d3; background: #effaf4; }
.stat-card > div { display: flex; align-items: center; gap: 8px; }
.stat-symbol { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--green-dark); background: var(--green-soft); font-size: 15px; }
.stat-card small { color: #79857d; font-size: 7px; font-weight: 850; letter-spacing: .13em; }
.stat-card > strong { display: block; margin-top: 15px; font-size: 31px; letter-spacing: -.055em; }
.stat-card > strong.word-stat { margin-top: 19px; color: var(--green-dark); font-size: 19px; letter-spacing: -.025em; text-transform: capitalize; }
.stat-card p { margin: 6px 0 0; color: #89948d; font-size: 9px; }
.stat-card p b { color: var(--green-dark); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(275px, .85fr); gap: 18px; margin-top: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.9); box-shadow: 0 9px 30px rgba(32,47,38,.035); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 23px 17px; }
.panel-head h2 { margin: 0; font-size: 18px; letter-spacing: -.035em; }
.text-button { display: inline-flex; gap: 8px; align-items: center; border: 0; color: var(--green-dark); background: transparent; font-size: 9px; font-weight: 800; }
.text-button span { font-size: 15px; }
.compact-groups { padding: 0 11px 11px; }
.compact-group { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; padding: 13px 12px; border: 0; border-top: 1px solid var(--line-2); background: transparent; text-align: left; }
.compact-group:hover { border-radius: 11px; background: #f7faf7; }
.group-avatar { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border-radius: 11px; color: #15724a; background: #ddf4e8; font-size: 11px; font-weight: 850; letter-spacing: -.03em; }
.group-avatar.amber { color: #9b5d13; background: #ffeed7; }
.group-copy { min-width: 0; }
.group-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.group-copy small { display: block; margin-top: 4px; color: #8a958e; font-size: 9px; }
.mini-metric { min-width: 62px; text-align: right; }
.mini-metric b { display: block; font-size: 11px; }
.mini-metric small { color: #9ba59f; font-size: 8px; }
.state-pill { min-width: 54px; padding: 5px 7px; border-radius: 99px; color: #14734b; background: #e5f8ee; font-size: 7px; font-weight: 850; text-align: center; letter-spacing: .06em; }
.state-pill.off { color: #8b6639; background: #fff1dc; }
.health-panel { padding-bottom: 17px; }
.score-badge { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #126f48; background: var(--green-soft); font-size: 12px; font-weight: 850; }
.health-meter { height: 5px; margin: 0 23px 19px; overflow: hidden; border-radius: 99px; background: #edf1ed; }
.health-meter span { height: 100%; display: block; border-radius: inherit; background: var(--green); transition: width .4s; }
.health-list { margin: 0 23px 17px; }
.health-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.health-row > span:first-child { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: #178057; background: #eaf8f1; font-size: 10px; font-weight: 900; }
.health-row.warn > span:first-child { color: #a4600c; background: var(--amber-soft); }
.health-row b { font-size: 10px; }
.health-row small { color: #929d96; font-size: 8px; }
.secondary-button, .danger-outline-button, .danger-button { min-height: 40px; padding: 0 15px; border-radius: 9px; font-size: 10px; font-weight: 750; }
.secondary-button { border: 1px solid var(--line); background: #fff; }
.secondary-button:hover { border-color: #bdc9c0; background: #f9fbf9; }
.secondary-button.full { width: calc(100% - 46px); margin: 0 23px; }
.recent-panel { margin-top: 18px; }
.activity-list { padding: 0 22px 17px; }
.activity-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.activity-dot { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #18764f; background: var(--green-soft); font-size: 11px; font-weight: 850; }
.activity-item b { display: block; font-size: 10px; }
.activity-item p { overflow: hidden; margin: 3px 0 0; color: #89958d; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.activity-item time { color: #9ba59f; font-size: 8px; white-space: nowrap; }
.empty-inline { padding: 25px 15px; color: #8b968f; text-align: center; font-size: 11px; }

/* Groups */
.section-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-toolbar > p { margin: 0; color: var(--muted); font-size: 10px; }
.filter-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.filter-tabs button { height: 30px; padding: 0 13px; border: 0; border-radius: 7px; color: #859088; background: transparent; font-size: 9px; font-weight: 750; }
.filter-tabs button.active { color: #fff; background: var(--ink); }
.group-card-grid { display: grid; grid-template-columns: repeat(3, minmax(230px, 1fr)); gap: 16px; }
.server-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: transform .18s, box-shadow .18s, border-color .18s; }
.server-card:hover { transform: translateY(-2px); border-color: #c8d5cc; box-shadow: var(--shadow); }
.server-card-head { padding: 19px 19px 15px; display: flex; align-items: flex-start; gap: 12px; }
.server-card .group-avatar { width: 43px; height: 43px; border-radius: 13px; }
.server-card-title { min-width: 0; flex: 1; }
.server-card-title h3 { overflow: hidden; margin: 2px 0 5px; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.server-card-title p { overflow: hidden; margin: 0; color: #8d9891; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.server-state { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(32,185,120,.1); }
.server-state.off { background: var(--amber); box-shadow: 0 0 0 4px rgba(238,155,53,.1); }
.server-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 19px; padding: 14px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.server-metrics div:not(:first-child) { padding-left: 13px; border-left: 1px solid var(--line-2); }
.server-metrics b { display: block; font-size: 13px; }
.server-metrics small { color: #97a199; font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.protection-row { min-height: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 19px; }
.feature-chip { padding: 5px 7px; border-radius: 6px; color: #557064; background: #f0f5f1; font-size: 7px; font-weight: 800; }
.feature-chip.off { color: #a0aaa3; background: #f6f7f6; text-decoration: line-through; }
.server-card-footer { padding: 11px 12px; background: #f8faf8; }
.server-card-footer button { width: 100%; min-height: 36px; border: 1px solid #dfe6df; border-radius: 8px; color: #1b3428; background: #fff; font-size: 9px; font-weight: 800; }
.server-card-footer button:hover { border-color: #aadbc4; color: #087e4d; }
.empty-state { padding: 90px 20px; color: #87938b; text-align: center; }
.empty-state span { display: block; margin-bottom: 10px; font-size: 35px; }
.empty-state h3 { margin: 0; color: var(--ink); font-size: 18px; }
.empty-state p { font-size: 11px; }

/* Activity */
.activity-summary { min-height: 135px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 24px 30px; margin-bottom: 18px; border-radius: var(--radius); color: white; background: #18231d; }
.activity-summary h2 { margin: 0 0 7px; font-size: 24px; letter-spacing: -.04em; }
.activity-summary div > p:last-child { margin: 0; color: #91a097; font-size: 11px; }
.activity-summary > span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 99px; color: #829188; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.activity-panel .activity-list { padding-top: 8px; }
.full-list .activity-item { padding: 16px 5px; }
.full-list .activity-dot { width: 38px; height: 38px; border-radius: 11px; }
.full-list .activity-item b { font-size: 11px; }
.full-list .activity-item p { font-size: 9px; }

/* Drawer */
.drawer-layer { position: fixed; z-index: 100; inset: 0; display: flex; justify-content: flex-end; }
.drawer-scrim { position: absolute; inset: 0; border: 0; background: rgba(9,17,12,.44); backdrop-filter: blur(2px); }
.group-drawer { width: min(720px, calc(100vw - 40px)); height: 100%; position: relative; z-index: 1; overflow: hidden; background: #f7f9f6; box-shadow: -22px 0 70px rgba(10,25,16,.18); animation: drawer-in .24s ease-out; }
@keyframes drawer-in { from { transform: translateX(35px); opacity: .4; } }
.drawer-loading { height: 100%; display: grid; place-items: center; align-content: center; gap: 13px; color: #7f8b83; }
.drawer-loading span { width: 26px; height: 26px; border: 3px solid #dfe7e1; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.drawer-loading p { margin: 0; font-size: 11px; }
#drawerContent { height: 100%; }
.drawer-header { min-height: 112px; display: grid; grid-template-columns: auto auto minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 23px 26px; color: white; background: #121d16; }
.close-button { width: 32px; height: 32px; align-self: start; margin-top: -5px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; color: #a8b4ac; background: rgba(255,255,255,.04); font-size: 20px; }
.drawer-avatar { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: #0d3724; background: #46d897; font-size: 13px; font-weight: 850; }
.drawer-kicker { margin: 0 0 5px; color: #638073; font-size: 7px; font-weight: 850; letter-spacing: .15em; }
.drawer-header h2 { overflow: hidden; margin: 0; font-size: 19px; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.drawer-header div > p:last-child { margin: 4px 0 0; color: #829188; font-size: 9px; }
.group-status-badge { padding: 6px 8px; border-radius: 99px; color: #7be1ad; background: rgba(38,197,127,.12); font-size: 7px; font-weight: 850; letter-spacing: .08em; }
.group-status-badge.off { color: #f2bc76; background: rgba(238,155,53,.12); }
.drawer-tabs { height: 54px; display: flex; align-items: flex-end; gap: 26px; padding: 0 27px; border-bottom: 1px solid var(--line); background: white; }
.drawer-tabs button { height: 100%; padding: 3px 0 0; position: relative; border: 0; color: #87938b; background: transparent; font-size: 10px; font-weight: 700; }
.drawer-tabs button.active { color: var(--ink); }
.drawer-tabs button.active::after { content: ""; height: 2px; position: absolute; left: 0; right: 0; bottom: -1px; background: var(--green); }
.drawer-body { height: calc(100% - 166px); overflow-y: auto; overscroll-behavior: contain; }
.tab-panel { padding: 22px 27px 48px; }
.detail-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.detail-stat { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.detail-stat span { display: block; color: #929d96; font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.detail-stat b { display: block; margin-top: 7px; font-size: 17px; letter-spacing: -.04em; }
.admin-alert { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 13px 14px; border: 1px solid #f0d5aa; border-radius: 10px; background: #fff7e9; }
.admin-alert > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #9b5b0d; background: #ffe8c2; font-weight: 900; }
.admin-alert b { font-size: 10px; }
.admin-alert p { margin: 3px 0 0; color: #977b58; font-size: 8px; }
.control-section, .form-section { padding-top: 25px; }
.control-section + .control-section, .form-section + .form-section { margin-top: 24px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-heading h3, .form-section h3 { margin: 0; font-size: 15px; letter-spacing: -.025em; }
.quick-action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.quick-action { min-height: 78px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: white; text-align: left; }
.quick-action:hover:not(:disabled) { border-color: #a9d8c1; background: #fbfefc; }
.quick-action span { color: var(--green-dark); font-size: 17px; }
.quick-action b { font-size: 9px; }
.message-form textarea { width: 100%; min-height: 105px; resize: vertical; padding: 13px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: white; font-size: 11px; line-height: 1.55; }
.message-form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(32,185,120,.09); }
.message-form > div { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.message-form small { color: #929d96; font-size: 8px; }
.leaderboard { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }
.leader-row { display: grid; grid-template-columns: 27px minmax(0,1fr) auto auto; align-items: center; gap: 9px; padding: 10px 13px; border-top: 1px solid var(--line-2); }
.leader-row:first-child { border-top: 0; }
.leader-row > span:first-child { color: #93a098; font-size: 9px; font-weight: 800; }
.leader-row b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.leader-row small { color: #929d96; font-size: 8px; }
.leader-row strong { min-width: 46px; color: var(--green-dark); font-size: 10px; text-align: right; }

/* Settings */
.form-section > .eyebrow { margin-bottom: 6px; }
.form-section > h3 { margin-bottom: 15px; }
.toggle-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.toggle-row { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 14px; border-top: 1px solid var(--line-2); }
.toggle-row:first-child { border-top: 0; }
.toggle-row b { display: block; font-size: 10px; }
.toggle-row p { margin: 4px 0 0; color: #929d96; font-size: 8px; }
.switch { width: 38px; height: 22px; flex: none; position: relative; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d7ded9; transition: .2s; }
.switch span::after { content: ""; width: 16px; height: 16px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.setting-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.setting-card-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.setting-card h4 { margin: 0; font-size: 11px; }
.setting-card p { margin: 4px 0 0; color: #939e97; font-size: 8px; line-height: 1.4; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form-section label, .setting-card label, #groupInfoForm label { display: block; margin-top: 13px; color: #4f5d55; font-size: 9px; font-weight: 750; }
.form-section label small { margin-left: 5px; color: #a0aaa3; font-weight: 500; }
.form-section textarea, .form-section input, .form-section select, .setting-card input, .setting-card select, #groupInfoForm input, #groupInfoForm textarea { width: 100%; margin-top: 7px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: white; font-size: 10px; line-height: 1.45; }
.form-section textarea:focus, .form-section input:focus, .form-section select:focus, .setting-card input:focus, .setting-card select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(32,185,120,.08); }
.sticky-save { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 30px -27px -48px; padding: 14px 27px; border-top: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(10px); }
.sticky-save span { color: #89958d; font-size: 8px; }

/* Members + tools */
.member-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.member-toolbar label { width: 250px; height: 37px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.member-toolbar input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 10px; }
.member-toolbar > span { color: #8a958e; font-size: 9px; }
.pending-section { margin-bottom: 22px; padding: 14px; border: 1px solid #f0d6ad; border-radius: 12px; background: #fff9ee; }
.pending-request { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #f3dfbe; }
.pending-request b { font-size: 10px; }
.pending-request div { display: flex; gap: 6px; }
.pending-request button { height: 28px; padding: 0 9px; border: 1px solid #e3ceb0; border-radius: 7px; background: white; font-size: 8px; font-weight: 750; }
.pending-request .approve { color: #087e4d; border-color: #b8dec9; }
.member-list { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.member-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 11px; padding: 11px 13px; border-top: 1px solid var(--line-2); }
.member-row:first-child { border-top: 0; }
.member-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #236549; background: #e9f6ef; font-size: 9px; font-weight: 850; }
.member-avatar.bot { color: #0d3020; background: #4bd596; }
.member-copy { min-width: 0; }
.member-copy b { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.member-copy span { display: inline-flex; gap: 6px; margin-top: 4px; color: #919c95; font-size: 8px; }
.role-tag { padding: 4px 6px; border-radius: 6px; color: #815b23; background: #fff0d8; font-size: 7px; font-weight: 800; }
.role-tag.bot { color: #137148; background: #e3f8ed; }
.member-score { text-align: right; }
.member-score b { display: block; color: var(--green-dark); font-size: 10px; }
.member-score small { color: #99a49d; font-size: 7px; }
.member-menu-wrap { position: relative; }
.member-menu-button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; background: white; font-weight: 800; }
.member-menu { min-width: 145px; position: absolute; z-index: 5; top: 33px; right: 0; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: var(--shadow); }
.member-menu button { width: 100%; height: 31px; display: block; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; text-align: left; font-size: 8px; }
.member-menu button:hover { background: #f3f7f4; }
.member-menu button.danger { color: var(--red); }
.section-copy { margin: -7px 0 15px; color: #89958d; font-size: 9px; line-height: 1.5; }
.inline-actions { display: flex; gap: 8px; }
.danger-outline-button { border: 1px solid #eccaca; color: #b83e3e; background: white; }
.danger-button { border: 1px solid #c84444; color: white; background: #c84444; }
.link-result { margin-top: 12px; padding: 11px; overflow-wrap: anywhere; border: 1px solid #cde5d7; border-radius: 9px; color: #126a45; background: #eff9f4; font-size: 9px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.danger-zone + .danger-zone { margin-top: 9px; }
.danger-zone.critical { border-color: #efd1d1; background: #fffafa; }
.danger-zone b { font-size: 10px; }
.danger-zone p { margin: 4px 0 0; color: #929d96; font-size: 8px; }

/* Confirm + toast */
.confirm-layer { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(9,17,12,.55); backdrop-filter: blur(3px); }
.confirm-dialog { width: min(410px, 100%); padding: 28px; border-radius: 17px; background: white; box-shadow: 0 30px 90px rgba(0,0,0,.22); text-align: center; }
.confirm-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 16px; border-radius: 13px; color: #b43d3d; background: var(--red-soft); font-size: 19px; font-weight: 900; }
.confirm-dialog h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.confirm-dialog p { margin: 10px 0 22px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.confirm-dialog > div { display: flex; justify-content: center; gap: 8px; }
.toast { min-width: 230px; max-width: 420px; position: fixed; z-index: 300; right: 24px; bottom: 24px; padding: 13px 16px; transform: translateY(18px); border: 1px solid #bfe2cf; border-radius: 11px; opacity: 0; pointer-events: none; color: #0f5b3b; background: #effaf4; box-shadow: var(--shadow); font-size: 10px; font-weight: 700; transition: .2s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { color: #9e3434; border-color: #ebc5c5; background: #fff0f0; }

@media (max-width: 1150px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .group-card-grid { grid-template-columns: repeat(2, minmax(230px, 1fr)); }
  .global-search { width: 180px; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; }
  .app-shell { display: block; }
  .sidebar { width: 100%; height: 63px; position: fixed; top: auto; bottom: 0; display: block; padding: 7px 13px; box-shadow: 0 -8px 30px rgba(15,25,19,.15); }
  .brand, .sidebar-status, .logout-button { display: none; }
  .main-nav { height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 0; }
  .nav-item { height: 49px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 0; text-align: center; }
  .nav-item span { font-size: 17px; line-height: 1; }
  .nav-item b { font-size: 8px; }
  .nav-item em { display: none; }
  .main-content { padding: 0 20px 90px; }
  .loading-bar { left: 0; }
  .topbar { min-height: 108px; }
  .global-search { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .main-content { padding-inline: 14px; }
  .topbar { min-height: 100px; gap: 12px; }
  .breadcrumb, .topbar > div:first-child > p:last-child { display: none; }
  .topbar h1 { font-size: 23px; }
  .bot-chip { display: none; }
  .page-view { padding-top: 15px; }
  .status-banner { grid-template-columns: auto 1fr; min-height: 112px; gap: 14px; padding: 20px; }
  .banner-icon { width: 43px; height: 43px; }
  .uptime-box { display: none; }
  .banner-copy span { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
  .stat-card { min-height: 124px; padding: 14px; }
  .stat-card > strong { margin-top: 11px; font-size: 26px; }
  .stat-card p { line-height: 1.3; }
  .pairing-card { flex-direction: column; text-align: center; }
  .group-card-grid { grid-template-columns: 1fr; }
  .section-toolbar { align-items: flex-start; gap: 12px; }
  .filter-tabs { max-width: 100%; }
  .filter-tabs button { padding: 0 9px; }
  .group-drawer { width: 100vw; max-width: none; }
  .drawer-header { grid-template-columns: auto auto minmax(0,1fr); padding: 18px 15px; }
  .group-status-badge { display: none; }
  .drawer-tabs { gap: 18px; padding: 0 18px; overflow-x: auto; }
  .tab-panel { padding: 18px 15px 46px; }
  .detail-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-action-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .sticky-save { margin-inline: -15px; padding-inline: 15px; }
  .sticky-save span { display: none; }
  .sticky-save .primary-button { width: 100%; }
  .member-toolbar label { width: 100%; }
  .member-toolbar > span { display: none; }
  .member-row { grid-template-columns: auto minmax(0,1fr) auto; }
  .member-score { display: none; }
  .danger-zone { align-items: flex-start; flex-direction: column; }
  .drawer-body { height: calc(100% - 166px); }
  .toast { left: 14px; right: 14px; bottom: 76px; max-width: none; }
}
