/* ───────────────────────── Multi Practice – yellow theme ───────────────────────── */
:root {
  --bg: #0b0a07;
  --bg-2: #110f0a;
  --surface: #17150e;
  --surface-2: #1f1c12;
  --border: #2c2717;
  --border-2: #3a331d;
  --text: #f6f1df;
  --muted: #a69e83;
  --dim: #6f6852;
  --yellow: #ffd21f;
  --yellow-2: #ffb300;
  --yellow-soft: rgba(255, 210, 31, 0.12);
  --green: #3ddc84;
  --red: #ff5b5b;
  --idle: #f0b232;
  --dnd: #f23f43;
  --offline: #80848e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Lexend', 'Inter', system-ui, sans-serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(255, 210, 31, 0.10), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(255, 179, 0, 0.06), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
main { flex: 1; }
a { color: var(--yellow); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; }
h2 { font-size: 26px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
::selection { background: var(--yellow); color: #111; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.eyebrow { font: 600 12px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); margin-bottom: 10px; display: block; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }
.hidden { display: none !important; }

/* ───────── Nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 7, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 800 18px var(--display); }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255, 210, 31, .35)); }
.brand span b { color: var(--yellow); }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-links a.active { color: var(--yellow); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 7px 10px; cursor: pointer; }

.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary img { width: 30px; height: 30px; border-radius: 50%; }
.usermenu .menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-width: 200px; padding: 6px; box-shadow: var(--shadow); }
.usermenu .menu a, .usermenu .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; color: var(--text); border-radius: 8px; background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu .menu a:hover, .usermenu .menu button:hover { background: var(--surface-2); text-decoration: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .nav-links { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 10px 16px; }
  .nav-links.open { display: flex; }
  .nav-right .btn-discord span { display: none; }
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font: 600 14px var(--font);
  cursor: pointer; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--yellow); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--yellow), var(--yellow-2)); color: #1a1400; border-color: transparent; box-shadow: 0 6px 24px rgba(255, 196, 0, .25); }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(255, 196, 0, .4); border-color: transparent; }
.btn-discord { background: #5865f2; border-color: transparent; color: #fff; }
.btn-discord:hover { background: #4752c4; border-color: transparent; }
.btn-danger { background: rgba(255, 91, 91, .12); border-color: rgba(255, 91, 91, .4); color: #ff9c9c; }
.btn-danger:hover { border-color: var(--red); }
.btn-success { background: rgba(61, 220, 132, .12); border-color: rgba(61, 220, 132, .4); color: #8ff0b8; }
.btn-success:hover { border-color: var(--green); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn svg { width: 18px; height: 18px; }

/* ───────── Cards ───────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card-link { display: block; color: inherit; transition: border-color .15s, transform .15s; }
.card-link:hover { text-decoration: none; border-color: var(--yellow); transform: translateY(-2px); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ───────── Hero ───────── */
.hero { padding: 70px 0 40px; text-align: center; position: relative; }
.hero-logo { width: min(360px, 70vw); filter: drop-shadow(0 0 40px rgba(255, 210, 31, .35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.hero h1 { margin-top: 10px; font-size: clamp(38px, 6vw, 64px); background: linear-gradient(180deg, #fff6c9, var(--yellow) 60%, var(--yellow-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 18px; max-width: 560px; margin: 0 auto 26px; }
.hero .row { justify-content: center; }
.ip-pill { display: inline-flex; align-items: center; gap: 4px; padding: 6px 6px 6px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); font: 600 15px var(--display); }
.ip-pill .ip { color: var(--yellow); margin-right: 8px; }
.stats-line { margin-top: 24px; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.stats-line b { color: var(--text); font-family: var(--display); }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: pulse 2s infinite; vertical-align: middle; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

.explore .card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.explore .card p { margin: 0; color: var(--muted); font-size: 14px; }
.icon-badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--yellow-soft); color: var(--yellow); font-size: 18px; flex: none; }

/* ───────── Status / avatars / roles ───────── */
.avatar { position: relative; display: inline-block; flex: none; }
.avatar img { width: 44px; height: 44px; border-radius: 50%; display: block; background: var(--surface-2); object-fit: cover; }
.avatar.lg img { width: 120px; height: 120px; border: 5px solid var(--bg); }
.avatar.md img { width: 64px; height: 64px; }
.avatar.sm img { width: 28px; height: 28px; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; border: 3px solid var(--surface); }
.avatar.lg .dot { width: 26px; height: 26px; right: 6px; bottom: 6px; border-width: 5px; border-color: var(--bg); }
.dot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; background: var(--offline); }
.s-online { background: var(--green); }
.s-idle { background: var(--idle); }
.s-dnd { background: var(--dnd); }
.s-offline, .s-unknown { background: var(--offline); }
.s-unknown { opacity: .5; }
.status-text { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.status-text .dot { width: 10px; height: 10px; }

.role { --rc: var(--yellow); display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font: 600 12px/20px var(--display); color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent); white-space: nowrap; }
.role::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rc); }
.roles { display: flex; flex-wrap: wrap; gap: 6px; }
.name-colored { font-weight: 700; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 600 12px/20px var(--display); background: var(--surface-2); border: 1px solid var(--border-2); color: var(--muted); }
.pill.yellow { background: var(--yellow-soft); color: var(--yellow); border-color: rgba(255, 210, 31, .35); }
.pill.pending { background: rgba(240, 178, 50, .12); color: #ffd27a; border-color: rgba(240, 178, 50, .4); }
.pill.accepted, .pill.open { background: rgba(61, 220, 132, .12); color: #8ff0b8; border-color: rgba(61, 220, 132, .4); }
.pill.denied, .pill.closed { background: rgba(255, 91, 91, .12); color: #ff9c9c; border-color: rgba(255, 91, 91, .4); }

/* ───────── People ───────── */
.person { display: flex; gap: 14px; align-items: center; padding: 14px 16px; }
.person .meta { min-width: 0; }
.person .meta .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .meta .sub { color: var(--dim); font-size: 13px; }
.person .mc { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.person .mc img { width: 26px; height: 26px; border-radius: 5px; image-rendering: pixelated; }
.staff-group + .staff-group { margin-top: 34px; }
.staff-group h3 { display: flex; align-items: center; gap: 10px; }

/* ───────── News ───────── */
.news-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.news-card .cover { aspect-ratio: 16/8; background: linear-gradient(135deg, #2a2310, #14120b); position: relative; overflow: hidden; }
.news-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card .cover .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.news-card .cover .ph img { width: 90px; height: 90px; object-fit: contain; opacity: .7; }
.news-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.news-card h3 { color: var(--text); margin: 8px 0 6px; }
.news-card p { color: var(--muted); font-size: 14px; flex: 1; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.byline img { width: 26px; height: 26px; border-radius: 50%; }
.byline a { color: inherit; }
.byline a.name-colored:hover { text-decoration: underline; }

.article-hero { padding: 46px 0 10px; }
.article-cover { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin: 22px 0; }
.article-cover img { display: block; width: 100%; max-height: 460px; object-fit: cover; }
.author-card { display: flex; gap: 14px; align-items: center; padding: 14px 18px; margin: 18px 0; }
.author-card:hover { border-color: var(--yellow); text-decoration: none; }
.layout-article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; }
@media (max-width: 900px) { .layout-article { grid-template-columns: 1fr; } }

/* Markdown content */
.prose { font-size: 16px; line-height: 1.75; color: #e9e3cc; overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3 { margin: 1.6em 0 .6em; color: var(--text); }
.prose h1 { font-size: 30px; } .prose h2 { font-size: 24px; } .prose h3 { font-size: 19px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: 10px; border: 1px solid var(--border); }
.prose blockquote { margin: 1em 0; padding: 10px 18px; border-left: 4px solid var(--yellow); background: var(--yellow-soft); border-radius: 0 10px 10px 0; color: var(--text); }
.prose blockquote p:last-child { margin: 0; }
.prose code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: #0f0e09; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; }
.prose th { background: var(--surface-2); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li::marker { color: var(--yellow); }
.prose iframe { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 10px; }
.prose hr { border-top-color: var(--border-2); }
.prose > :first-child { margin-top: 0; }

/* ───────── Forms ───────── */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.help { color: var(--dim); font-size: 13px; margin: -2px 0 8px; font-weight: 400; }
.input, input[type=text], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border-2); border-radius: 10px; padding: 11px 14px; font: 15px var(--font); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
input[type=color] { width: 46px; height: 40px; padding: 3px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--bg-2); cursor: pointer; }
.field { margin-bottom: 18px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin: 0; }
.check input { width: 17px; height: 17px; accent-color: var(--yellow); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { padding: 9px 18px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--bg-2); cursor: pointer; font-weight: 500; margin: 0; }
.radio-row input { display: none; }
.radio-row input:checked + span { color: var(--yellow); }
.radio-row label:has(input:checked) { border-color: var(--yellow); background: var(--yellow-soft); }
.req { color: var(--yellow); }
.search-bar { display: flex; gap: 10px; }
.search-bar input { font-size: 17px; padding: 14px 18px; }

/* ───────── Flash ───────── */
.flash-wrap { margin-top: 18px; }
.flash { padding: 12px 16px; border-radius: 10px; border: 1px solid; margin-bottom: 10px; font-weight: 500; }
.flash.success { background: rgba(61, 220, 132, .1); border-color: rgba(61, 220, 132, .4); color: #b5f5d0; }
.flash.error { background: rgba(255, 91, 91, .1); border-color: rgba(255, 91, 91, .4); color: #ffc0c0; }
.flash.info { background: var(--yellow-soft); border-color: rgba(255, 210, 31, .35); color: #ffeaa0; }

/* ───────── Tables ───────── */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--dim); font: 600 12px var(--display); text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

/* ───────── Profile ───────── */
.profile-banner { --rc: #ffd21f; height: 180px; border-radius: var(--radius); background: radial-gradient(420px 220px at 20% 120%, color-mix(in srgb, var(--rc) 50%, transparent), transparent), linear-gradient(135deg, color-mix(in srgb, var(--rc) 22%, #17130a), #17130a 60%, #0f0d08); border: 1px solid var(--border); position: relative; overflow: hidden; }
.profile-banner::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 210, 31, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 210, 31, .05) 1px, transparent 1px); background-size: 28px 28px; }
.profile-head { display: flex; gap: 22px; align-items: end; margin: -64px 0 0 26px; position: relative; z-index: 1; flex-wrap: wrap; }
.profile-head .info { padding-bottom: 10px; }
.profile-head h1 { font-size: 32px; margin: 0; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 26px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }
.mc-card { text-align: center; }
.mc-card .body-render { height: 260px; margin: 6px auto 10px; image-rendering: pixelated; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); }
.mc-card .mc-name { font: 800 22px var(--display); }
.uuid { font: 12px ui-monospace, monospace; color: var(--dim); word-break: break-all; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; }

/* ───────── Admin ───────── */
.admin { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 26px; padding: 30px 0 60px; }
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } }
.admin-side { position: sticky; top: 90px; align-self: start; }
.admin-side a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.admin-side a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.admin-side a.active { background: var(--yellow-soft); color: var(--yellow); }
.admin-side .count { margin-left: auto; background: var(--yellow); color: #1a1400; font: 700 11px/18px var(--display); padding: 0 7px; border-radius: 999px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-head h1 { font-size: 28px; margin: 0; }
.stat { padding: 18px 20px; }
.stat .n { font: 800 30px var(--display); color: var(--yellow); }
.stat .l { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 14px; border-radius: 9px; color: var(--muted); border: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.tabs a.active { color: #1a1400; background: var(--yellow); border-color: var(--yellow); }
.tabs a:hover { text-decoration: none; border-color: var(--yellow); }
.answer { padding: 16px 0; border-bottom: 1px solid var(--border); }
.answer:last-child { border-bottom: 0; }
.answer .q { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.answer .a { white-space: pre-wrap; overflow-wrap: anywhere; }

.qb-item { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.qb-item .qb-top { display: grid; grid-template-columns: 26px 1fr 160px; gap: 10px; align-items: center; }
.qb-item .qb-num { font: 700 14px var(--display); color: var(--yellow); }
.qb-item .qb-row { display: flex; gap: 10px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.qb-item .qb-row input[type=text] { flex: 1; min-width: 200px; }
@media (max-width: 600px) { .qb-item .qb-top { grid-template-columns: 1fr; } }

.md-editor { border: 1px solid var(--border-2); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.md-toolbar { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border-2); background: var(--surface); flex-wrap: wrap; }
.md-toolbar button { background: none; border: 0; color: var(--muted); padding: 6px 10px; border-radius: 7px; cursor: pointer; font: 600 13px var(--font); }
.md-toolbar button:hover { background: var(--surface-2); color: var(--text); }
.md-toolbar .sep { width: 1px; background: var(--border-2); margin: 4px 6px; }
.md-toolbar .tab-btn.active { color: var(--yellow); background: var(--yellow-soft); }
.md-editor textarea { border: 0; border-radius: 0; min-height: 420px; font: 14px/1.65 ui-monospace, Menlo, monospace; background: transparent; }
.md-editor textarea:focus { box-shadow: none; }
.md-preview { padding: 18px 22px; min-height: 420px; }

.role-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.role-edit summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; }
.role-edit summary::-webkit-details-marker { display: none; }
.role-edit[open] summary { margin-bottom: 16px; }
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 600px) { .perm-grid { grid-template-columns: 1fr; } }
.perm-grid .check { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.perm-grid .check small { display: block; color: var(--dim); font-weight: 400; }
.role-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.role-checks .check { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.role-checks .check.locked { opacity: .5; cursor: not-allowed; }

/* ───────── Footer ───────── */
.footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 44px 0 30px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.footer a { display: block; color: var(--muted); padding: 3px 0; font-size: 14px; }
.footer a:hover { color: var(--yellow); }
.footer .legal { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--dim); font-size: 13px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.join-rows .join-row { display: flex; align-items: center; gap: 16px; padding: 18px 22px; }
.join-rows .join-row + .join-row { border-top: 1px solid var(--border); }
.join-rows .join-row .t { font-weight: 700; }
.join-rows .join-row .d { color: var(--muted); font-size: 14px; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
