:root {
  color-scheme: dark;
  --bg: #09080d;
  --sidebar: rgba(12, 11, 16, 0.88);
  --surface: rgba(21, 18, 29, 0.74);
  --surface-2: rgba(28, 24, 37, 0.74);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.065);
  --text: #f5f2f8;
  --muted: #aaa3b1;
  --muted-2: #746e7b;
  --purple: #a914e9;
  --purple-2: #ca6cff;
  --green: #50e7a2;
  --yellow: #f4c85b;
  --red: #fa7086;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100svh; overflow-x: hidden; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }

.dash-ambient { position: fixed; z-index: 0; width: 30rem; height: 30rem; border-radius: 50%; filter: blur(150px); opacity: .12; pointer-events: none; background: #7b179f; }
.dash-ambient-a { top: -18rem; left: 25%; }
.dash-ambient-b { right: -18rem; bottom: -18rem; background: #351873; }

.loading-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 20px; background: #09080d; }
.loading-screen img { width: 78px; height: 78px; object-fit: contain; animation: breathe 1.8s ease-in-out infinite; }
.loading-screen p { margin: 0; color: var(--muted); font-size: .73rem; letter-spacing: .14em; text-transform: uppercase; }
.loader-line { width: 180px; height: 2px; overflow: hidden; background: rgba(255,255,255,.09); }
.loader-line i { display: block; width: 50%; height: 100%; background: var(--purple); animation: load 1.2s ease-in-out infinite alternate; }

.auth-screen { position: relative; z-index: 2; min-height: 100svh; display: grid; place-items: center; padding: 100px 24px 50px; }
.auth-brand { position: absolute !important; top: 30px; left: 36px; }
.auth-card { width: min(560px, 100%); padding: clamp(30px, 6vw, 62px); border: 1px solid var(--line); background: rgba(18, 15, 25, .72); box-shadow: var(--shadow); backdrop-filter: blur(28px); }
.auth-card h1 { margin: 8px 0 24px; font-size: clamp(3rem, 8vw, 5.2rem); line-height: .9; letter-spacing: -.07em; }
.auth-card h1 em { color: var(--purple-2); font-family: Georgia, serif; font-weight: 400; }
.auth-card > p:not(.section-kicker) { margin: 0 0 30px; color: var(--muted); line-height: 1.7; }
.auth-card .text-link { display: block; margin-top: 20px; text-align: center; color: var(--muted); font-size: .82rem; }

.server-screen { position: relative; z-index: 2; min-height: 100svh; padding: 0 clamp(20px, 4vw, 62px) 60px; }
.server-header { width: min(1320px, 100%); min-height: 92px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.server-account { display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: .76rem; font-weight: 660; }
.server-account img { width: 34px; height: 34px; object-fit: cover; border: 1px solid var(--line); }
.server-selector { width: min(1320px, 100%); margin: 0 auto; padding-top: clamp(52px, 7vw, 92px); }
.server-selector-heading { margin-bottom: 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.server-selector-heading h1 { margin: 0; font-size: clamp(3.4rem, 7vw, 6.8rem); line-height: .88; letter-spacing: -.075em; }
.server-selector-heading h1 em { color: var(--purple-2); font-family: Georgia, serif; font-weight: 400; }
.server-selector-heading p:last-child { max-width: 670px; margin: 22px 0 0; color: var(--muted); line-height: 1.65; }
.server-count { flex: 0 0 auto; padding: 10px 12px; border: 1px solid rgba(202,108,255,.22); background: rgba(169,20,233,.06); color: var(--purple-2); font: 660 .62rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
.server-selector-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.server-add-button img { width: 18px; height: 18px; object-fit: contain; filter: grayscale(1) brightness(0) invert(1); }
.server-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); gap: 12px; }
.server-card { position: relative; min-height: 164px; padding: 22px; display: grid; grid-template-columns: 58px 1fr; grid-template-rows: auto 1fr; align-items: center; gap: 0 16px; overflow: hidden; border: 1px solid var(--line); background: rgba(20,17,27,.74); color: var(--text); text-align: left; box-shadow: 0 18px 46px rgba(0,0,0,.16); backdrop-filter: blur(22px); transition: transform 170ms ease, border-color 170ms ease, background-color 170ms ease; }
.server-card::after { content: ""; position: absolute; right: -28px; bottom: -42px; width: 104px; height: 104px; border: 1px solid rgba(202,108,255,.12); border-radius: 50%; }
.server-card:hover { transform: translateY(-3px); border-color: rgba(202,108,255,.42); background: rgba(28,22,38,.84); }
.server-card:focus-visible { outline: 3px solid rgba(202,108,255,.38); outline-offset: 3px; }
.server-card-avatar { grid-row: 1 / 3; width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(202,108,255,.24); background: rgba(169,20,233,.08); color: white; font-size: 1.1rem; font-weight: 800; }
.server-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.server-card-copy { min-width: 0; align-self: end; }
.server-card-copy strong { display: block; overflow: hidden; color: #f4eff7; font-size: .92rem; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.server-card-copy small { display: block; margin-top: 7px; color: var(--muted-2); font-size: .64rem; letter-spacing: .04em; }
.server-card-action { align-self: end; margin-top: 22px; display: flex; align-items: center; justify-content: space-between; color: var(--purple-2); font-size: .7rem; font-weight: 720; }
.server-card-action i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgba(80,231,162,.62); }
.server-card.not-installed .server-card-action { color: var(--yellow); }
.server-card.not-installed .server-card-action i { background: var(--yellow); box-shadow: 0 0 14px rgba(244,200,91,.5); }
.server-empty { grid-column: 1 / -1; padding: 46px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.server-empty h2 { margin: 0; font-size: 1.35rem; }
.server-empty p { max-width: 560px; margin: 12px auto 0; color: var(--muted); line-height: 1.6; }
.server-selector-foot { margin-top: 22px; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line-soft); color: var(--muted-2); font-size: .66rem; }
.server-selector-foot span { display: inline-flex; align-items: center; gap: 9px; }
.server-selector-foot span i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px rgba(80,231,162,.65); }
.server-selector-foot a { color: var(--muted); text-decoration: none; }
.server-selector-foot a:hover { color: white; }

.app-shell { position: relative; z-index: 2; min-height: 100svh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100svh; padding: 26px 20px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--sidebar); backdrop-filter: blur(30px); }
.dash-brand { position: relative; display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: .98rem; font-weight: 780; letter-spacing: -.03em; }
.dash-brand > span { width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(202,108,255,.36); background: rgba(169,20,233,.09); }
.dash-brand img { width: 31px; height: 31px; object-fit: contain; }
.dash-brand small { display: block; margin-top: 3px; color: var(--muted-2); font-size: .59rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

.side-nav { min-height: 0; margin: 34px -6px 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.side-nav p { margin: 22px 12px 9px; color: #5f5967; font-size: .59rem; font-weight: 760; letter-spacing: .17em; text-transform: uppercase; }
.nav-item { width: 100%; height: 43px; padding: 0 12px; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; border: 0; border-left: 2px solid transparent; background: transparent; color: #928b99; text-align: left; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
.nav-item i { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid transparent; background: rgba(255,255,255,.015); }
.nav-item i img { width: 17px; height: 17px; object-fit: contain; opacity: .78; filter: grayscale(1) brightness(0) invert(1); transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease; }
.nav-item span { font-size: .82rem; font-weight: 610; }
.nav-item:hover { color: #dcd6e1; background: rgba(255,255,255,.035); }
.nav-item.active { color: white; border-color: var(--purple); background: rgba(169,20,233,.09); }
.nav-item.active i { border-color: rgba(202,108,255,.18); background: rgba(169,20,233,.08); }
.nav-item:hover i img, .nav-item.active i img { opacity: 1; transform: scale(1.07); filter: grayscale(1) brightness(0) invert(1) drop-shadow(0 0 8px rgba(202,108,255,.5)); }
.sidebar-foot { margin-top: auto; padding: 14px 12px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.02); }
.sidebar-foot .live-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 18px rgba(80,231,162,.7); }
.sidebar-foot b, .sidebar-foot small { display: block; }
.sidebar-foot b { font-size: .7rem; }
.sidebar-foot small { margin-top: 3px; color: var(--muted-2); font-size: .58rem; }

.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 78px; padding: 12px clamp(20px, 3vw, 42px); display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); background: rgba(9,8,13,.78); backdrop-filter: blur(26px); }
.menu-button { display: none !important; }
.guild-picker { position: relative; min-width: min(360px, 45vw); padding-left: 48px; display: grid; }
.guild-picker select { min-width: 0; padding: 0 28px 0 0; border: 0; background: transparent; color: var(--text); font-weight: 720; appearance: auto; }
.guild-picker small { margin-top: 2px; color: var(--muted-2); font-size: .61rem; letter-spacing: .06em; text-transform: uppercase; }
.guild-avatar { position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center; overflow: hidden; background: #33253e; color: white; font-size: .78rem; font-weight: 800; }
.guild-avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.save-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .68rem; }
.save-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.save-state.working i { background: var(--yellow); animation: blink .8s linear infinite; }
.save-state.error i { background: var(--red); }
.user-menu { display: flex; align-items: center; gap: 9px; font-size: .76rem; font-weight: 650; }
.user-menu img { width: 32px; height: 32px; object-fit: cover; border: 1px solid var(--line); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--muted); }
.icon-button:hover { background: rgba(255,255,255,.07); color: white; }

.content { width: min(1500px, 100%); margin: 0 auto; padding: clamp(28px, 4vw, 54px); }
.page { display: none; animation: page-in 260ms ease both; }
.page.active { display: block; }
.page-heading { margin-bottom: 32px; display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; }
.section-kicker { margin: 0 0 10px; color: var(--purple-2); font: 650 .64rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .13em; text-transform: uppercase; }
.page-heading h1 { max-width: 900px; margin: 0; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: .95; letter-spacing: -.06em; }
.page-heading h1 em { color: var(--purple-2); font-family: Georgia, serif; font-weight: 400; }
.page-heading p:last-child { margin: 16px 0 0; color: var(--muted); line-height: 1.6; }
.page-heading .section-kicker { display: flex; align-items: center; gap: 10px; }
.section-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(202,108,255,.22); background: rgba(169,20,233,.07); box-shadow: inset 0 1px rgba(255,255,255,.05), 0 10px 24px rgba(75,9,104,.14); }
.section-icon img { width: 20px; height: 20px; object-fit: contain; filter: grayscale(1) brightness(0) invert(1) drop-shadow(0 0 8px rgba(202,108,255,.38)); }

.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat-card { min-height: 128px; padding: 20px; border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(20px); }
.stat-card span, .stat-card small, .stat-card b { display: block; }
.stat-card span { color: var(--muted-2); font-size: .59rem; font-weight: 720; letter-spacing: .12em; text-transform: uppercase; }
.stat-card b { margin-top: 20px; font-size: clamp(1.35rem, 2.4vw, 2rem); letter-spacing: -.05em; }
.stat-card small { margin-top: 6px; color: var(--muted); font-size: .65rem; }

.overview-grid, .split-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.overview-grid { grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); }
.panel { margin-bottom: 12px; padding: clamp(20px, 2.5vw, 28px); border: 1px solid var(--line); background: var(--surface); box-shadow: 0 18px 45px rgba(0,0,0,.12); backdrop-filter: blur(22px); }
.panel-heading { margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading.compact { margin-top: 24px; }
.panel-heading h2 { margin: 0; font-size: clamp(1.12rem, 2vw, 1.45rem); letter-spacing: -.035em; }
.status-badge, .mini-code { padding: 7px 9px; border: 1px solid rgba(80,231,162,.2); background: rgba(80,231,162,.06); color: var(--green); font: 650 .58rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.status-badge.warning { color: var(--yellow); border-color: rgba(244,200,91,.2); background: rgba(244,200,91,.06); }
.mini-code { color: var(--purple-2); border-color: rgba(202,108,255,.2); background: rgba(169,20,233,.06); }
.setup-visual { min-height: 110px; margin-bottom: 20px; padding: 18px; display: flex; align-items: center; gap: 20px; border: 1px solid var(--line-soft); background: rgba(169,20,233,.04); }
.setup-visual img { width: 70px; height: 70px; object-fit: contain; }
.setup-visual b, .setup-visual span { display: block; }
.setup-visual b { margin-bottom: 6px; }
.setup-visual span { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.detail-list { margin-bottom: 20px; }
.detail-row { padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: .76rem; }
.detail-row b { color: #ddd7e2; font-weight: 650; }

.action { min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; background: transparent; color: white; font-size: .74rem; font-weight: 720; text-decoration: none; transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease; }
.action:hover { transform: translateY(-1px); }
.action:disabled { opacity: .5; cursor: wait; transform: none; }
.action.primary { background: var(--purple); border-color: var(--purple); box-shadow: 0 12px 30px rgba(169,20,233,.16); }
.action.primary:hover { background: #ba26ee; }
.action.secondary { border-color: var(--line); background: rgba(255,255,255,.03); }
.action.secondary:hover { background: rgba(255,255,255,.07); }
.action.danger { border-color: rgba(250,112,134,.32); background: rgba(250,112,134,.09); color: #ff9dac; }
.action.wide { width: 100%; }

.toggle-list { display: grid; gap: 3px; }
.toggle-row { min-height: 54px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.toggle-row:last-child { border: 0; }
.toggle-row b, .toggle-row small { display: block; }
.toggle-row b { font-size: .8rem; }
.toggle-row small { margin-top: 4px; color: var(--muted-2); font-size: .64rem; }
.toggle-list.roomy .toggle-row { min-height: 64px; }
.switch { position: relative; width: 42px; height: 23px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { position: absolute; inset: 0; border: 1px solid var(--line); background: #1b1821; transition: background-color 160ms ease, border-color 160ms ease; }
.switch i::after { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #746e7b; transition: transform 160ms ease, background-color 160ms ease; }
.switch input:checked + i { border-color: rgba(202,108,255,.5); background: rgba(169,20,233,.32); }
.switch input:checked + i::after { transform: translateX(19px); background: white; }
.switch input:focus-visible + i { outline: 3px solid rgba(202,108,255,.25); outline-offset: 2px; }

.form-panel hr { height: 1px; margin: 28px 0; border: 0; background: var(--line); }
.form-grid { display: grid; gap: 18px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 8px; color: #c9c3ce; font-size: .72rem; font-weight: 650; }
label small { color: var(--muted-2); font-weight: 450; line-height: 1.5; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: rgba(7,6,10,.42); color: var(--text); outline: none; transition: border-color 150ms ease, background-color 150ms ease; }
input, select { min-height: 44px; padding: 0 12px; }
textarea { padding: 12px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: rgba(202,108,255,.55); background: rgba(11,9,15,.7); }
select option { background: #17131d; }
input[type="checkbox"] { width: auto; min-height: auto; accent-color: var(--purple); }
input[type="range"] { min-height: 22px; padding: 0; accent-color: var(--purple); background: transparent; border: 0; }
.range-field { margin-top: 24px; }
.range-field span { justify-self: end; margin-top: -25px; color: var(--purple-2); font-family: ui-monospace, monospace; }
.inline-form { display: flex; align-items: end; gap: 9px; }
.inline-form input, .inline-form select { flex: 1 1 auto; }
.stack-form, .stack-fields { display: grid; gap: 16px; }
.stack-fields { align-content: start; }
.check-row { display: flex; flex-wrap: wrap; gap: 20px; }
.check-row label { display: flex; align-items: center; }
.crew-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
fieldset { min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--line-soft); }
legend { width: 100%; padding: 0 0 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 720; }
.action-form .action { margin-top: 17px; }
.engage-forms .panel { height: fit-content; }

.tag-list { min-height: 94px; margin-top: 18px; display: flex; align-content: flex-start; flex-wrap: wrap; gap: 8px; }
.tag { padding: 8px 10px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: #d8d2dd; font-size: .69rem; }
.tag button { padding: 0; border: 0; background: none; color: var(--muted-2); }
.tag button:hover { color: var(--red); }
.empty-state:empty::after, .card-list:empty::after, .rank-list:empty::after, .data-table:empty::after { content: "Nothing here yet."; color: var(--muted-2); font-size: .73rem; }

.card-list { display: grid; gap: 8px; max-height: 460px; overflow-y: auto; }
.list-card { padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 12px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.018); }
.list-card b, .list-card span { display: block; }
.list-card b { margin-bottom: 5px; font-size: .75rem; }
.list-card span { color: var(--muted); font-size: .68rem; line-height: 1.5; }
.list-card button { align-self: start; border: 0; background: none; color: var(--muted-2); font-size: .68rem; }
.list-card button:hover { color: var(--red); }
.compact-list .list-card { padding: 10px 12px; }
.rank-list { display: grid; }
.rank-row { min-height: 51px; display: grid; grid-template-columns: 35px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.rank-row > i { color: var(--purple-2); font: 600 .64rem/1 ui-monospace, monospace; }
.rank-row b { font-size: .74rem; }
.rank-row span { color: var(--muted); font-size: .68rem; }

.table-panel { overflow: hidden; }
.data-table { overflow-x: auto; }
.table-row { min-width: 650px; min-height: 52px; padding: 10px 0; display: grid; grid-template-columns: 82px minmax(150px,1.6fr) minmax(110px,1fr) minmax(120px,1fr) 36px; align-items: center; gap: 14px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: .68rem; }
.table-row.header { min-height: 34px; color: var(--muted-2); font-size: .57rem; font-weight: 720; letter-spacing: .1em; text-transform: uppercase; }
.table-row b { color: #ded8e3; font-weight: 650; }
.table-row .row-action { min-height: 28px; padding: 0 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.state { color: var(--green); text-transform: capitalize; }
.state.closed, .state.cancelled, .state.ended { color: var(--muted-2); }
.state.pending, .state.scheduled { color: var(--yellow); }

.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.access-grid .panel { min-width: 0; }
.access-form + .access-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.access-form + .card-list { margin-top: 20px; }
.activity-feed { display: grid; }
.activity-item { min-height: 68px; padding: 12px 0; display: grid; grid-template-columns: 10px 110px 1fr auto; align-items: center; gap: 16px; border-bottom: 1px solid var(--line-soft); }
.activity-item > i { width: 7px; height: 7px; border-radius: 50%; background: var(--purple-2); box-shadow: 0 0 15px rgba(202,108,255,.5); }
.activity-item > span, .activity-item > time { color: var(--muted-2); font: 600 .61rem/1.3 ui-monospace, monospace; }
.activity-item b { display: block; margin-bottom: 4px; font-size: .74rem; }
.activity-item small { color: var(--muted); }

.toast-region { position: fixed; z-index: 200; right: 24px; bottom: 24px; width: min(390px, calc(100% - 48px)); display: grid; gap: 8px; }
.toast { padding: 15px 16px; border: 1px solid var(--line); border-left: 3px solid var(--purple); background: rgba(19,16,25,.96); box-shadow: var(--shadow); color: #ddd7e2; font-size: .74rem; line-height: 1.45; animation: toast-in 220ms ease both; }
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }
.blocking-loader { position: fixed; inset: 0; z-index: 190; place-items: center; background: rgba(4,3,6,.68); backdrop-filter: blur(8px); }
.blocking-loader:not([hidden]) { display: grid; }
.blocking-loader > div { padding: 26px 32px; display: grid; place-items: center; border: 1px solid var(--line); background: #15111b; box-shadow: var(--shadow); }
.blocking-loader img { width: 54px; height: 54px; object-fit: contain; animation: breathe 1.5s ease-in-out infinite; }
.blocking-loader p { margin: 12px 0 0; color: var(--muted); font-size: .7rem; }
.sidebar-scrim { display: none; }

@media (hover: hover) {
  .panel { transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease; }
  .panel:hover { transform: translateY(-2px); border-color: rgba(202,108,255,.18); background: rgba(24,20,33,.8); }
}

@keyframes load { from { transform: translateX(-20%); } to { transform: translateX(120%); } }
@keyframes breathe { 50% { transform: scale(.9); opacity: .65; } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 920px) {
  .server-selector-heading { align-items: flex-start; flex-direction: column; }
  .server-selector-actions { width: 100%; justify-content: space-between; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; width: min(310px, 88vw); left: 0; padding-top: max(26px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-105%); transition: transform 220ms ease; box-shadow: 30px 0 80px rgba(0,0,0,.5); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim.visible { position: fixed; top: 0; right: 0; bottom: 0; left: min(310px, 88vw); z-index: 50; display: block; border: 0; background: rgba(3,2,5,.66); backdrop-filter: blur(4px); }
  .dashboard-body.nav-open { overflow: hidden; }
  .menu-button { display: grid !important; }
  .topbar { padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left)); }
  .guild-picker { min-width: 0; flex: 1; }
  .save-state, .user-menu span { display: none; }
  .content { padding: 30px 18px 50px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .overview-grid, .split-grid, .access-grid { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .server-screen { padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: max(46px, env(safe-area-inset-bottom)); padding-left: max(16px, env(safe-area-inset-left)); }
  .server-header { min-height: 78px; }
  .server-account > span { display: none; }
  .server-account .action { min-height: 36px; padding: 0 11px; }
  .server-selector { padding-top: 46px; }
  .server-selector-heading h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .server-selector-actions { align-items: stretch; flex-direction: column; }
  .server-selector-actions .server-count { text-align: center; }
  .server-add-button { width: 100%; min-height: 48px; }
  .server-grid { grid-template-columns: 1fr; }
  .server-selector-foot { align-items: flex-start; flex-direction: column; }
  .topbar-actions { gap: 7px; }
  .user-menu img { width: 34px; height: 34px; }
  .guild-picker { padding-left: 42px; }
  .guild-picker small { display: none; }
  .page-heading h1 { font-size: clamp(2.5rem, 13vw, 3.8rem); }
  .stats-grid, .activity-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-card { min-height: 110px; padding: 16px; }
  .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .form-grid.two, .form-grid.three, .crew-grid { grid-template-columns: 1fr; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .panel { padding: 19px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .panel-heading .action { width: 100%; }
  .setup-visual { align-items: flex-start; }
  .setup-visual img { width: 52px; height: 52px; }
  .activity-item { grid-template-columns: 8px 1fr auto; }
  .activity-item > span { display: none; }
  .toast-region { right: 16px; bottom: 16px; width: calc(100% - 32px); }
  input, select, textarea { font-size: 16px; }
  .action, .icon-button, .nav-item { min-height: 44px; }
}

@media (max-width: 430px) {
  .server-account img { display: none; }
  .server-card { min-height: 148px; padding: 18px; }
  .content { padding-right: 14px; padding-left: 14px; }
  .stats-grid, .activity-stats { grid-template-columns: 1fr; }
  .stat-card:last-child:nth-child(odd) { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}


.dashboard-legal { padding: 4px 12px 0; display: flex; gap: 11px; flex-wrap: wrap; }
.dashboard-legal a, .dashboard-legal button { padding: 0; border: 0; background: transparent; color: var(--muted-2); font: inherit; font-size: .58rem; text-decoration: none; cursor: pointer; }
.dashboard-legal a:hover, .dashboard-legal button:hover { color: var(--text); }
