.adm { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; padding: 8px 0 32px; }
.adm-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 16px; background: var(--field); }
.adm-title { padding: 6px 12px 10px; font-size: 18px; }
.adm-tab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; font: 500 15px/20px var(--font); cursor: pointer; }
.adm-tab:hover { background: var(--bg); }
.adm-tab[aria-pressed="true"] { background: var(--blue); color: #fff; }
.adm-tab i, .adm-badge { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.adm-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.adm-main h2 { margin: 0; font-size: 24px; }
.adm-main h2 small, .adm-row small { color: var(--muted); font-weight: 400; font-size: 14px; }
.adm-main h4 { margin: 12px 0 4px; font-size: 15px; }
.adm-loading, .adm-muted { color: var(--muted); font-size: 14px; }
.adm-cards, .adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.adm-card, .adm-stat { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 0; border-radius: 14px; background: var(--field); color: var(--text); text-align: left; font: inherit; }
.adm-card { cursor: pointer; }
.adm-card:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.adm-card span, .adm-stat span { color: var(--muted); font-size: 13px; }
.adm-card b, .adm-stat b { font-size: 22px; line-height: 28px; }
.adm-stat b { font-size: 17px; overflow-wrap: anywhere; }
.adm-fold { border-radius: 14px; background: var(--field); }
.adm-fold > summary { padding: 14px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.adm-fold > summary::-webkit-details-marker { display: none; }
.adm-fold > summary::after { content: "▾"; float: right; color: var(--muted); }
.adm-fold:not([open]) > summary::after { content: "▸"; }
.adm-fold-in { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 16px; }
.adm-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.adm-kv { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg); cursor: copy; }
.adm-kv span { color: var(--muted); font-size: 12px; }
.adm-kv b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.adm-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.adm-form.adm-col { flex-direction: column; align-items: stretch; max-width: 520px; }
.adm-form label { display: flex; flex-direction: column; gap: 4px; min-width: 150px; color: var(--muted); font-size: 13px; }
.adm-form input, .adm-form select, .adm-form textarea, .adm-search input, .adm-search select, .adm-filters select, .adm-threads input, .adm-send textarea {
  height: 44px; padding: 0 12px; border: 0; border-radius: 10px; outline: 0; background: var(--bg); color: var(--text); font: 400 15px var(--font); box-shadow: inset 0 0 0 2px transparent; }
.adm-form textarea, .adm-send textarea { height: auto; padding: 10px 12px; resize: vertical; }
.adm-form input:focus, .adm-form select:focus, .adm-form textarea:focus, .adm-search input:focus, .adm-threads input:focus, .adm-send textarea:focus { box-shadow: inset 0 0 0 2px var(--blue); }
.adm-fold .adm-form input, .adm-fold .adm-form select { background: var(--card); }
.adm-check { flex-direction: row !important; align-items: center; color: var(--text) !important; }
.adm-check input { height: auto; width: auto; }
.adm-search, .adm-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.adm-search input { flex: 1; min-width: 200px; background: var(--field); }
.adm-search select, .adm-filters select { background: var(--field); }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-list { display: flex; flex-direction: column; gap: 8px; }
.adm-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--field); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
button.adm-row:hover, .adm-row.on { box-shadow: inset 0 0 0 2px var(--blue); }
.adm-row .avatar { flex: none; width: 40px; height: 40px; }
.adm-row-in { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.adm-row-in b { font-weight: 600; }
.adm-row-in small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-tag { padding: 1px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-style: normal; font-size: 12px; font-weight: 600; }
.adm-red { background: var(--red-soft); color: var(--red); }
.adm-green { background: var(--green-soft); color: var(--green); }
.adm-pulse { display: inline-block; padding: 2px 10px; border-radius: 6px; background: var(--red); color: #fff; font-weight: 800; animation: adm-pulse 1.2s ease-in-out infinite; }
@keyframes adm-pulse { 50% { opacity: .45; } }
.adm-back { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--blue); font: 500 15px var(--font); cursor: pointer; }
.adm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.adm-head > div { flex: 1; min-width: 160px; }
.adm-head .avatar { width: 56px; height: 56px; }
.adm-tw { overflow-x: auto; }
.adm-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-tbl th { padding: 8px 10px; color: var(--muted); font-weight: 500; font-size: 12px; text-align: left; white-space: nowrap; }
.adm-tbl td { padding: 10px; border-top: 1px solid var(--line); vertical-align: top; }
.adm-tbl a { color: var(--blue); }
.adm-wd { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--field); }
.adm-wd-h { display: flex; justify-content: space-between; gap: 12px; }
.adm-wd-h span { color: var(--muted); }
.adm-proofs { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-proofs img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; }
.adm-sup { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; min-height: 520px; }
.adm-threads { display: flex; flex-direction: column; gap: 8px; max-height: 70vh; overflow-y: auto; }
.adm-threads input { background: var(--field); }
.adm-chat { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.adm-chat-h { font-size: 17px; }
.adm-quick { padding: 10px 12px; border-radius: 12px; background: var(--field); }
.adm-quick summary { margin-bottom: 8px; font-weight: 600; cursor: pointer; }
.adm-msgs { display: flex; flex-direction: column; gap: 6px; height: 340px; padding: 12px; overflow-y: auto; border-radius: 12px; background: var(--field); }
.adm-msgs .msg { max-width: 80%; padding: 8px 12px; border-radius: 12px; background: var(--bg); align-self: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.adm-msgs .msg.me { align-self: flex-end; background: var(--blue); color: #fff; }
.adm-msgs time { display: block; margin-top: 2px; font-size: 11px; opacity: .7; }
.adm-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chip { display: inline-flex; align-items: center; border-radius: 999px; background: var(--field); }
.adm-chip button { padding: 6px 4px 6px 12px; border: 0; background: none; color: var(--text); font: 13px var(--font); cursor: pointer; }
.adm-chip i { padding: 0 10px 0 4px; color: var(--muted); font-style: normal; cursor: pointer; }
.adm-send { display: flex; flex-direction: column; gap: 8px; }
.adm-send .adm-actions { justify-content: flex-end; }
@media (max-width: 960px) {
  .adm { grid-template-columns: 1fr; gap: 12px; }
  .adm-nav { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 8px; }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-title { display: none; }
  .adm-tab { flex: none; white-space: nowrap; }
  .adm-sup { grid-template-columns: 1fr; }
  .adm-threads { max-height: 220px; }
  .adm-main h2 { font-size: 20px; }
}
.adm-main-in { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.adm-head-act { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.adm-sub { margin: 28px 0 12px; font-size: 18px; font-weight: 800; }
.adm-staff { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.adm-staff-user { display: flex; flex-direction: column; gap: 6px; max-width: 360px; font-size: 13px; color: var(--muted); }
.adm-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-seg label { position: relative; cursor: pointer; }
.adm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.adm-seg span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 12px; background: var(--bg-soft); font-size: 14px; font-weight: 600; transition: background .2s, color .2s, box-shadow .2s; }
.adm-seg input:checked + span { background: var(--blue); color: #fff; }
.adm-seg input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 35%, transparent); }
.adm-presets-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.adm-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; transition: opacity .2s; }
.adm-perms.is-off { opacity: .4; pointer-events: none; }
.adm-perm { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-soft); font-size: 14px; line-height: 1.35; cursor: pointer; transition: background .2s, box-shadow .2s; }
.adm-perm:hover { background: var(--bg-soft-2); }
.adm-perm:has(input:checked) { box-shadow: inset 0 0 0 2px var(--blue); }
.adm-perm:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.adm-perm input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.adm-staff-row { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chip-perm { padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue); font-size: 12px; font-weight: 600; }
.adm-back { display: inline-flex; align-items: center; gap: 6px; width: auto; height: 36px; padding: 0 14px 0 10px; border: 0; border-radius: 12px; background: var(--bg-soft); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; }
.adm-back::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.adm-back:hover { background: var(--bg-soft-2); }
