@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Bounded; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/fonts/Bounded-Variable.woff2) format("woff2"); }

/* FearSupport palette: black page, dark panels, quiet borders, violet accent, no glow. */
:root {
  --bg: #000; --panel: #0a0a10; --raised: #101018; --input: #050508;
  --border: #1c1c27; --border-2: #23232f; --border-3: #2a2a38;
  --text: #f4f4f5; --soft: #c4c4cc; --muted: #8b8b94; --faint: #5d5d68;
  --accent: #7b7cf6; --accent-soft: rgba(123, 124, 246, .16); --accent-line: rgba(123, 124, 246, .35); --accent-text: #c7c9ff;
  --green: #22c55e; --red: #f87171; --amber: #fbbf24; --blue: #60a5fa;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 Onest, ui-sans-serif, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--border); background: rgba(7, 7, 12, .72); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 13px Bounded, Onest, sans-serif; letter-spacing: .02em; }
.brand img { width: 32px; height: 32px; padding: 3px; border-radius: 9px; background: var(--accent); object-fit: contain; }
.guild { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.guild img { width: 24px; height: 24px; border-radius: 50%; }

.top-right { display: flex; align-items: center; gap: 16px; }
.me { display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--border); }
.me img { width: 28px; height: 28px; border-radius: 50%; background: var(--raised); }
.me span { font-weight: 600; font-size: 13px; }
.me button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--border-2); border-radius: 9px; background: transparent; color: var(--muted); }
.me button:hover { color: var(--text); border-color: var(--border-3); }
.me button svg { width: 16px; height: 16px; }
.login { display: grid; place-items: center; height: calc(100vh - 56px); padding: 24px; }
.login-card { width: min(400px, 100%); padding: 32px 28px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); text-align: center; }
.login-card img { width: 56px; height: 56px; padding: 6px; border-radius: 14px; background: var(--accent); }
.login-card h1 { margin: 16px 0 8px; font: 700 26px Bounded, Onest, sans-serif; }
.login-card p { margin: 0 0 22px; color: var(--muted); }
.login-card .login-error { margin: -8px 0 18px; padding: 10px 12px; border: 1px solid rgba(248, 113, 113, .3); border-radius: 10px; background: rgba(248, 113, 113, .08); color: #fca5a5; }
.btn.discord { width: 100%; }
.btn.discord svg { fill: currentColor; stroke: none; }
.layout { display: flex; height: calc(100vh - 56px); }
.sidebar { width: 232px; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-right: 1px solid var(--border); background: var(--panel); }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; transition: background-color .15s, color .15s; }
.sidebar a:hover { background: var(--raised); color: var(--text); }
.sidebar a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.content { flex: 1; min-width: 0; overflow: auto; padding: 28px 32px 40px; }
.content h1 { margin: 0 0 20px; font: 700 34px/1.1 Bounded, Onest, sans-serif; letter-spacing: -.01em; }

.card { border: 1px solid var(--border); border-radius: 16px; background: var(--panel); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 0; flex-wrap: wrap; }
.card-head b { display: block; font-size: 15px; font-weight: 700; }
.card-head small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.card-body { padding: 18px 20px 20px; }
.section-title { margin: 4px 0 12px; font-size: 14px; font-weight: 700; }
.hint { color: var(--muted); font-size: 13px; }

/* Filters */
.filters { display: grid; gap: 10px; padding: 16px 20px; }
.filters .row { display: grid; gap: 10px; }
.filters .row.r1 { grid-template-columns: 160px 1fr 1fr; }
.filters .row.r2 { grid-template-columns: 1fr 1fr 1fr; }
.field { position: relative; display: flex; align-items: center; min-width: 0; height: 42px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--input); transition: border-color .15s; }
.field:focus-within { border-color: var(--accent-line); }
.field > svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.field input { width: 100%; height: 100%; padding: 0 14px 0 36px; border: 0; background: transparent; outline: none; }
.field input::placeholder { color: var(--faint); }
.field input[type="date"] { padding-left: 14px; color-scheme: dark; }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Dropdown (single and multi select) */
.dd { position: relative; min-width: 0; }
.dd-btn { width: 100%; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--input); text-align: left; transition: border-color .15s; }
.dd-btn:hover, .dd.open .dd-btn { border-color: var(--border-3); }
.dd-btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn span.placeholder { color: var(--faint); }
.dd-btn em { color: var(--muted); font-style: normal; font-size: 12px; }
.dd-btn svg { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; max-height: 320px; overflow: auto; padding: 6px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--panel); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.dd-menu.wide { min-width: 280px; }
.dd-search { width: 100%; height: 36px; margin-bottom: 6px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 9px; background: var(--input); outline: none; }
.dd-group { padding: 8px 10px 4px; color: var(--faint); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.dd-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.dd-item:hover { background: var(--raised); }
.dd-item.sel { color: var(--accent-text); }
.dd-item .check { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border: 1px solid var(--border-3); border-radius: 5px; }
.dd-item.sel .check { border-color: var(--accent); background: var(--accent); }
.dd-item.sel .check::after { content: ""; width: 8px; height: 4px; margin-top: -2px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.dd-item small { margin-left: auto; color: var(--faint); }
.dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--muted); }

/* Table */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; color: var(--soft); font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
tbody tr { cursor: pointer; transition: background-color .12s; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
tbody tr:last-child td { border-bottom: 0; }
td.reason { max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
td.muted, .muted { color: var(--faint); }
.mono { font-variant-numeric: tabular-nums; }
.kind { display: inline-flex; align-items: center; gap: 8px; }
.kind svg { width: 16px; height: 16px; }
.kind i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.kind i.on { background: var(--green); }
.k-red svg { color: var(--red); } .k-green svg { color: var(--green); } .k-amber svg { color: var(--amber); } .k-blue svg { color: var(--blue); } .k-violet svg { color: var(--accent); }
.user { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; }
.user img { width: 22px; height: 22px; border-radius: 50%; flex: none; background: var(--raised); }
.user span { overflow: hidden; text-overflow: ellipsis; }
.user.unknown span { color: var(--faint); }
.empty { padding: 48px 20px; color: var(--muted); text-align: center; }

/* Pagination */
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pager .per { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.pager .per .dd { width: 72px; }
.pager .per .dd-btn { height: 36px; }
.pages { display: flex; align-items: center; gap: 6px; }
.pages button { min-width: 34px; height: 34px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 9px; background: var(--input); font-variant-numeric: tabular-nums; }
.pages button:hover:not(:disabled) { border-color: var(--border-3); }
.pages button.cur { border-color: var(--accent); background: var(--accent); color: #fff; }
.pages .gap { color: var(--faint); padding: 0 2px; }
.pages svg { width: 15px; height: 15px; }

/* Settings rows */
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--input); }
.set-row + .set-row { margin-top: 10px; }
.set-row .ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--raised); color: var(--accent); }
.set-row .ico svg { width: 17px; height: 17px; }
.set-row .txt { flex: 1; min-width: 0; }
.set-row .txt b { display: block; font-weight: 600; }
.set-row .txt small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.set-row .dd { width: 260px; flex: none; }
.set-row.off .txt b { color: var(--muted); }
.mass { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.mass label { display: block; margin-bottom: 6px; color: var(--soft); font-size: 12.5px; font-weight: 600; }

.switch { position: relative; width: 40px; height: 24px; flex: none; padding: 0; border: 0; border-radius: 12px; background: var(--border-3); transition: background-color .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #f4f4f5; transition: transform .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--raised); font-weight: 600; white-space: nowrap; transition: border-color .15s, background-color .15s; }
.btn:hover:not(:disabled) { border-color: var(--border-3); }
.btn.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #6c6df0; }
.btn.small { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; }

/* Roles */
.rank-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--raised); color: var(--muted); font-size: 12px; font-weight: 600; }
.rank-pill.r { background: var(--accent-soft); color: var(--accent-text); }
.roles-tools { display: flex; gap: 10px; align-items: center; padding: 16px 20px; flex-wrap: wrap; }
.roles-tools .field { width: 320px; }
.roles-table td .dd { width: 240px; }
tr.static { cursor: default; }

/* Commands */
.cmd-group + .cmd-group { margin-top: 20px; }
.cmd { border: 1px solid var(--border); border-radius: 14px; background: var(--input); }
.cmd + .cmd { margin-top: 10px; }
.cmd-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.cmd-head .txt { flex: 1; min-width: 0; }
.cmd-head .txt b { font-weight: 600; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13.5px; }
.cmd-head .txt b.plain { font-family: inherit; font-size: 14px; }
.cmd-head .txt small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.cmd-head .dd { width: 250px; flex: none; }
.cmd-head .more { width: 36px; height: 36px; display: grid; place-items: center; flex: none; padding: 0; border: 1px solid var(--border-2); border-radius: 10px; background: transparent; color: var(--muted); }
.cmd-head .more:hover { color: var(--text); border-color: var(--border-3); }
.cmd-head .more svg { transition: transform .15s; }
.cmd.open .cmd-head .more svg { transform: rotate(180deg); }
.cmd.off .cmd-head .txt b, .cmd.off .cmd-head .txt small { color: var(--faint); }
.badge { display: inline-flex; align-items: center; margin-left: 8px; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--raised); color: var(--muted); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.badge.acc { background: var(--accent-soft); color: var(--accent-text); }
.cmd-roles { padding: 4px 16px 14px; border-top: 1px solid var(--border); }
.cmd-roles .hint { margin: 10px 0; }
.role-line { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.role-line .name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.role-line .name small { color: var(--faint); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--panel); }
.seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.seg button:hover { color: var(--text); }
.seg button.cur { background: var(--raised); color: var(--text); }
.seg button.cur.allow { background: rgba(34, 197, 94, .16); color: #86efac; }
.seg button.cur.deny { background: rgba(248, 113, 113, .14); color: #fca5a5; }

/* Details dialog */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .66); }
.dialog { width: min(560px, 100%); max-height: 86vh; overflow: auto; border: 1px solid var(--border-2); border-radius: 18px; background: var(--panel); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.dialog-head b { font-size: 16px; }
.dialog-head button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); }
.dialog-head button:hover { background: var(--raised); color: var(--text); }
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 12px 16px; padding: 18px 20px 22px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translateX(-50%); max-width: min(460px, calc(100vw - 32px)); padding: 12px 18px; border: 1px solid var(--border-3); border-radius: 12px; background: #14141d; color: #f2f2f7; font-weight: 600; text-align: center; box-shadow: 0 18px 44px rgba(0, 0, 0, .7); }
.spinner { width: 28px; height: 28px; margin: 80px auto; border: 3px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row td { color: var(--muted); text-align: center; padding: 40px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: #23232f content-box; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1100px) {
  .filters .row.r1, .filters .row.r2, .mass { grid-template-columns: 1fr; }
  .set-row, .cmd-head { flex-wrap: wrap; }
  .set-row .dd, .cmd-head .dd { width: 100%; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .content { padding: 20px 14px 32px; }
}
