/* Shared visual layer. Loaded after page styles; no changes to behavior or data. */
body.modern-theme .sidebar { display:flex; flex-direction:column; }
body.modern-theme .sidebar>.brand,body.modern-theme .sidebar>nav { flex-shrink:0; }
body.modern-theme .sidebar-footer { margin-top:auto; padding-top:24px; flex-shrink:0; }
body.modern-theme .discord-support-link { display:flex; align-items:center; gap:10px; min-height:48px; padding:12px; border:1px solid #365780; border-radius:12px; background:#1b3150; color:#c6dfff; text-decoration:none; font-size:.875rem; font-weight:600; }
body.modern-theme .discord-support-link svg { flex-shrink:0; color:#95bbff; }
body.modern-theme .discord-support-link span:last-child { margin-left:auto; }
body.modern-theme .discord-support-link:hover { background:#26466e; border-color:#679bef; color:#fff; }
:root {
  color-scheme: dark;
  --bg:#0b1020; --panel:#131c2e; --panel2:#19253a; --line:#28364f;
  --text:#edf3ff; --muted:#a2b1c8; --blue:#438bff; --blue2:#2569e8;
  --green:#69ddb0; --orange:#f3be69; --danger:#ff929c;
  --head:Inter,system-ui,sans-serif; --body:Inter,system-ui,sans-serif;
  --radius:20px; --radius-small:12px;
}
body.modern-theme {
  background:radial-gradient(ellipse at 85% 0,rgba(53,104,194,.13),transparent 45rem),var(--bg);
  font:400 1rem/1.6 var(--body); color:var(--text);
  -webkit-font-smoothing:antialiased;
}
body.modern-theme:before { display:none; }
body.modern-theme h1,body.modern-theme h2,body.modern-theme h3,
body.modern-theme .panel-head h2 {
  font-family:var(--body); text-transform:none; letter-spacing:-.035em;
  font-weight:700; line-height:1.25; overflow-wrap:anywhere;
}
body.modern-theme .eyebrow { font:600 .75rem/1.5 var(--body); letter-spacing:.12em; color:#8dbaff; }
body.modern-theme main { margin-left:280px; max-width:1800px; padding:36px clamp(24px,3vw,52px) 64px; }
body.modern-theme .sidebar {
  width:264px; inset:16px auto 16px 16px; padding:24px 16px;
  background:linear-gradient(170deg,#152039,#101829 60%);
  border:1px solid var(--line); border-radius:24px; scrollbar-width:thin;
  box-shadow:0 16px 48px #03081630;
}
body.modern-theme .brand { gap:10px; padding:0 8px; }
body.modern-theme .brand-logo { width:52px; height:52px; flex-basis:52px; filter:none; }
body.modern-theme .brand-copy { font:700 1rem/1.35 var(--body); letter-spacing:.02em; }
body.modern-theme .brand-copy small { margin-top:4px; font-size:.65rem; }
body.modern-theme .sidebar nav { margin-top:30px; gap:26px; }
body.modern-theme .sidebar .nav-heading { padding:0 12px; color:#99abc7; font-size:.75rem; font-weight:600; }
body.modern-theme .sidebar nav a {
  padding:12px 14px; margin-top:5px; border:1px solid transparent; border-radius:12px;
  color:#b3c2d9; font-size:.875rem; font-weight:500;
}
body.modern-theme .sidebar nav a:hover { background:#1c2b45; color:#fff; }
body.modern-theme .sidebar nav a.active {
  background:linear-gradient(105deg,#234a83,#1c365c);
  border-color:#365e94; color:#fff; box-shadow:none;
}
body.modern-theme .sidebar nav a.nav-child { position:relative;margin:2px 0 0 14px;padding:9px 12px 9px 25px;border-radius:10px;font-size:.8125rem; }
body.modern-theme .sidebar nav a.nav-child:before { content:'';position:absolute;left:9px;top:0;width:8px;height:50%;border-left:1px solid #476382;border-bottom:1px solid #476382;border-radius:0 0 0 5px; }
body.modern-theme .sidebar .nav-context { border:1px solid #304463; border-radius:14px; background:#192740; padding:14px; margin-bottom:12px; }
body.modern-theme .nav-context .nav-heading { padding:0; }
body.modern-theme .sidebar .nav-context h2 { font-size:.9375rem; }
body.modern-theme .sidebar .nav-unavailable { border:0; padding:10px 14px; color:#8d9bb2; }
body.modern-theme .sidebar .alpha-label { color:#899ab5; padding:0 12px; font-size:.6875rem; letter-spacing:.08em; }
body.modern-theme .topbar { gap:20px; border:0; margin-bottom:30px; padding:0; }
body.modern-theme .topbar h1 { font-size:clamp(1.6rem,2.8vw,2.25rem); margin-top:6px; }
body.modern-theme .account-menu { padding:8px; gap:12px; border-radius:16px; border-color:var(--line); background:#141e31; }
body.modern-theme .account-menu.has-banner {
  background-image:linear-gradient(90deg,#10192af2 0%,#10192ade 58%,#10192ab8 100%),var(--account-banner);
  background-size:cover;background-position:center;box-shadow:inset 0 0 0 1px #ffffff0a;
}
body.modern-theme .account-menu.has-banner img,body.modern-theme .account-menu.has-banner .account-avatar { border:0;box-shadow:0 2px 12px #0008; }
body.modern-theme .account-menu.has-banner strong,body.modern-theme .account-menu.has-banner small { color:#fff;text-shadow:0 1px 4px #000; }
body.modern-theme .account-menu.has-banner button { background:#17243bd9;box-shadow:0 1px 8px #0005; }
body.modern-theme .account-menu img,body.modern-theme .account-avatar { width:40px; height:40px; border-radius:50%; }
body.modern-theme .account-menu strong { font-size:.875rem; }
body.modern-theme .account-menu small { font-size:.75rem; }
body.modern-theme .account-menu button { min-height:38px; padding:8px 12px; border:0; border-radius:10px; background:#21304a; text-transform:none; font-size:.8125rem; letter-spacing:0; }
body.modern-theme .panel,body.modern-theme .setup-copy,body.modern-theme .setup-form,
body.modern-theme .group-card,body.modern-theme .metrics article {
  border:1px solid var(--line); border-radius:var(--radius);
  background:linear-gradient(145deg,#172237,#131c2d);
  box-shadow:0 8px 28px #02081720;
}
body.modern-theme .panel { padding:clamp(20px,2.2vw,30px); }
body.modern-theme .panel-head { gap:16px; flex-wrap:wrap; padding-bottom:18px; border-color:var(--line); }
body.modern-theme .panel-head h2 { font-size:1.375rem; }
body.modern-theme .panel-head>span { font-size:.8125rem; }
body.modern-theme .hero,body.modern-theme .hero.compact {
  border:1px solid #304d78; border-radius:24px; padding:28px 32px;
  background:linear-gradient(120deg,#1c3458,#17263f 60%,#141e31);
}
body.modern-theme .hero:after { display:none; }
body.modern-theme .hero h2 { font-size:clamp(1.6rem,3vw,2.5rem); line-height:1.2; max-width:760px; }
body.modern-theme .hero p { margin-top:10px; }
body.modern-theme .metrics,body.modern-theme .module-grid { background:none; padding:0; gap:16px; }
body.modern-theme .metrics article { min-height:144px; padding:24px; }
body.modern-theme .metrics strong { font:700 2.5rem/1.2 var(--body); letter-spacing:-.04em; margin:12px 0 4px; color:#dceaff; }
body.modern-theme .metrics small,body.modern-theme .metrics span { font-size:.8125rem; }
body.modern-theme .group-card { padding:24px; }
body.modern-theme .group-card:hover { border-color:#578fd8; background:#1a2b46; transform:translateY(-2px); }
body.modern-theme .group-card h3 { font-size:1.125rem; }
body.modern-theme .group-open { font-size:.875rem; }
body.modern-theme .module-card { border:1px solid var(--line); border-radius:16px; background:#101a2b; padding:20px; }
body.modern-theme .module-card.enabled { border:1px solid #365783; background:linear-gradient(115deg,#1c3558,#18283f); }
body.modern-theme .module-card small { font-size:.8125rem; margin-top:5px; }
body.modern-theme .module-card button[role=switch] { width:44px; height:26px; padding:3px; border-radius:99px; background:#46556d; cursor:pointer; }
body.modern-theme .module-card button[role=switch] span { width:20px; height:20px; border-radius:50%; background:#fff; margin-left:0; box-shadow:0 2px 4px #0003; }
body.modern-theme .module-card.enabled button[role=switch] { background:var(--blue); }
body.modern-theme .module-card.enabled button[role=switch] span { margin-left:18px; }
body.modern-theme .group-module-panel .module-card .module-configure { border-radius:10px; padding:9px 13px; background:#243d61; border-color:#41618c; color:#d2e5ff; }
body.modern-theme .installation-card { border:1px solid var(--line); border-radius:18px; background:#152237; padding:24px; }
body.modern-theme .installation-card.connected { border-color:#2f6159; background:linear-gradient(110deg,#16332f,#152237 65%); }
body.modern-theme .installation-card.permission_warning { border-color:#715c39; background:#29281f; }
body.modern-theme .installation-icon,body.modern-theme .platform { border-radius:12px; }
body.modern-theme .installation-copy h2 { font-size:1.25rem; }
body.modern-theme .pill,body.modern-theme .status,body.modern-theme .connection-badge { border-radius:99px; padding:5px 10px; font-size:.6875rem; letter-spacing:.035em; }
body.modern-theme .notice,body.modern-theme .support-banner,body.modern-theme .credential-state,
body.modern-theme .configuration-note { border:1px solid var(--line); border-radius:14px; }
body.modern-theme .notice,body.modern-theme .support-banner { background:#192a44; }
body.modern-theme .group-panel { border-left-width:1px; }
body.modern-theme .group-breadcrumb { border:0; border-radius:12px; background:#131e31; padding:8px 16px; }
body.modern-theme .breadcrumb-current { border:0; border-radius:8px; background:#233859; }
body.modern-theme .content-nav-action { border:1px solid #365780; border-radius:12px; background:#1b3150; color:#b6d6ff; }
body.modern-theme :is(.primary-button,.discord-button,.vertical-form button,.group-settings button,.installation-actions a) {
  clip-path:none; border-radius:12px; text-transform:none; letter-spacing:0;
  font-size:.875rem; font-weight:600; padding:12px 18px;
}
body.modern-theme :is(.primary-button,.vertical-form>button,.group-settings button,.installation-actions a) { background:linear-gradient(135deg,#438bff,#2b6de7); border:1px solid #5a98ff; }
body.modern-theme :is(.managed-server button,.installation-actions button,.community-search button,.community-search a) { border-radius:10px; font-size:.875rem; text-transform:none; letter-spacing:0; }
body.modern-theme :is(.link-button,.manage-link,.primary-small,.back-link) { font-size:.875rem; text-transform:none; letter-spacing:0; }
body.modern-theme input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
body.modern-theme select,body.modern-theme textarea {
  border:1px solid #354762; border-radius:11px; background:#0e1829; color:var(--text);
  min-height:46px; padding:11px 14px; font:400 .9375rem/1.5 var(--body);
}
body.modern-theme input::placeholder { color:#8293af; }
body.modern-theme input[type=checkbox],body.modern-theme input[type=radio] { accent-color:var(--blue); }
/* Shared checkbox treatment; actual switches keep their existing track/thumb. */
body.modern-theme input[type=checkbox]:not([role=switch]) {
  appearance:none; -webkit-appearance:none; box-sizing:border-box;
  display:inline-grid; place-content:center; vertical-align:middle;
  width:1.25rem; height:1.25rem; min-width:1.25rem; min-height:1.25rem;
  flex:0 0 1.25rem; padding:0; margin:0; border:1.5px solid #7088a8;
  border-radius:6px; background:#101d30; color:white; cursor:pointer;
  box-shadow:inset 0 1px 3px #0002;
  transition:background-color .15s,border-color .15s,box-shadow .15s;
}
body.modern-theme input[type=checkbox]:not([role=switch])::before {
  content:''; width:.35rem; height:.65rem; border:solid currentColor;
  border-width:0 2px 2px 0; transform:translateY(-1px) rotate(45deg);
  visibility:hidden;
}
body.modern-theme input[type=checkbox]:not([role=switch]):checked {
  background:var(--blue); border-color:#71aaff; box-shadow:0 2px 6px #287fff30;
}
body.modern-theme input[type=checkbox]:not([role=switch]):checked::before {visibility:visible}
body.modern-theme input[type=checkbox]:not([role=switch]):not(:disabled):hover {border-color:#a5caff;box-shadow:0 0 0 3px #438fff20}
body.modern-theme input[type=checkbox]:not([role=switch]):focus-visible {outline:2px solid #a5caff;outline-offset:3px}
body.modern-theme input[type=checkbox]:not([role=switch]):disabled {opacity:.5;cursor:not-allowed;box-shadow:none}
body.modern-theme label.check {gap:10px;min-height:32px}
@media(prefers-reduced-motion:reduce) {body.modern-theme input[type=checkbox]:not([role=switch]) {transition:none}}
@media(forced-colors:active) {
  body.modern-theme input[type=checkbox]:not([role=switch]) {appearance:auto;-webkit-appearance:auto}
  body.modern-theme input[type=checkbox]:not([role=switch])::before {display:none}
}
body.modern-theme .vertical-form label,body.modern-theme .check,body.modern-theme .group-help { font-size:.875rem; }
body.modern-theme .community-search label { font-size:.8125rem; letter-spacing:0; text-transform:none; }
body.modern-theme .community-search>div { gap:8px; }
.subscription-paused-notice{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 20px;padding:15px 18px;border:1px solid #805f2c;border-radius:12px;background:#352817;color:#ffd68f}.subscription-paused-notice div{display:grid;gap:3px}.subscription-paused-notice span{color:#ddbf8c}.subscription-paused-notice a{padding:10px 14px;border:1px solid #b4863e;border-radius:9px;background:#4a351b;color:#fff;text-decoration:none;font-weight:700}
.access-pill.free{border-color:#2e8b6a;background:#12372d;color:#76e5b7}.access-pill.paid{border-color:#347bd4;background:#15365e;color:#a9d0ff}.access-pill.trial{border-color:#9d7030;background:#3a2a16;color:#ffd28a}.access-pill.paused{border-color:#8b4452;background:#391d27;color:#ff9aaa}.access-pill.development{border-color:#59677b;background:#222c3b;color:#c2cede}
body.modern-theme .role-dropdown { border-radius:14px; border-color:#354762; background:#101b2d; }
body.modern-theme .role-chip { border-radius:99px; background:#233f64; border-color:#416692; padding:5px 7px 5px 13px; }
body.modern-theme .vertical-form .role-chip button { border-radius:50%; padding:0; background:transparent; }
body.modern-theme .role-option { border-radius:8px; }
body.modern-theme .platform-choice { border-radius:12px; background:#17263b; border-color:#354762; }
body.modern-theme .table-wrap { border-radius:14px; border:1px solid var(--line); }
body.modern-theme table { background:#131e31; }
body.modern-theme th { font-size:.75rem; background:#19263d; color:#a7bbd8; padding:15px 18px; border-color:var(--line); }
body.modern-theme td { font-size:.875rem; padding:18px; }
body.modern-theme td small,body.modern-theme .server-row small { font-size:.8125rem; }
body.modern-theme tbody tr:hover { background:#1c2b44; }
body.modern-theme tbody tr:last-child td { border-bottom:0; }
body.modern-theme .feed-settings-dialog,body.modern-theme #server-rename-dialog {
  border:1px solid #3b5277; border-radius:24px; background:#172237; padding:28px;
  box-shadow:0 32px 100px #0009; max-height:90dvh;
}
body.modern-theme dialog::backdrop { background:#050a16bd; backdrop-filter:blur(6px); }
html.dialog-scroll-locked,html.dialog-scroll-locked body { overflow:hidden; overscroll-behavior:none; }
body.modern-theme dialog { overscroll-behavior:contain; }
body.modern-theme .feed-settings-form fieldset { border-radius:14px; border-color:#354762; }
body.modern-theme .feed-settings-form footer button { border-radius:11px; min-height:44px; }
body.modern-theme .auth-page { background:var(--bg); }
body.modern-theme.auth-page { background:radial-gradient(ellipse at 50% 0,#1c3861,transparent 65%),var(--bg); min-height:100dvh; }
body.modern-theme .login-card { width:min(500px,100%); border:1px solid #354e73; border-radius:28px; padding:40px; background:linear-gradient(160deg,#1c2c46,#131e31); box-shadow:0 30px 100px #02071460; }
body.modern-theme .login-card>img { width:112px; height:112px; filter:none; object-fit:contain; }
body.modern-theme .login-card h1 { font:700 clamp(1.8rem,4vw,2.5rem)/1.2 var(--body); text-transform:none; letter-spacing:-.04em; margin:14px 0; }
body.modern-theme .login-card>p { line-height:1.7; color:#aebdd3; }
body.modern-theme .login-foot { color:#94a6c0; font-size:.75rem; }
body.modern-theme :is(a,button,input,select,textarea):focus-visible { outline:3px solid #9bc7ff; outline-offset:3px; }
body.modern-theme button:disabled { opacity:.5; cursor:not-allowed; }
@media(max-width:1200px) {
  body.modern-theme .module-grid { grid-template-columns:1fr; }
}
@media(max-width:1000px) {
  body.modern-theme .sidebar { position:relative; inset:auto; width:auto; margin:16px; padding:20px; }
  body.modern-theme main { margin-left:0; padding:20px 24px 48px; }
  body.modern-theme .sidebar nav { margin-top:22px; }
  body.modern-theme .topbar { align-items:flex-start; }
}
@media(max-width:650px) {
  body.modern-theme main { padding:16px 16px 40px; }
  body.modern-theme .sidebar { margin:10px; border-radius:18px; }
  body.modern-theme .panel,body.modern-theme .hero { padding:20px; border-radius:16px; }
  body.modern-theme .account-menu { width:100%; flex-wrap:wrap; }
  body.modern-theme .account-menu div { display:grid; min-width:0; }
  body.modern-theme .login-card { padding:28px 22px; border-radius:22px; }
  body.modern-theme .module-card { flex-wrap:wrap; gap:16px; }
  body.modern-theme .community-search input { min-width:0; }
  body.modern-theme .table-wrap { margin:0; }
}
@media(prefers-reduced-motion:reduce) {
  body.modern-theme *,body.modern-theme *::before,body.modern-theme *::after { transition:none; animation:none; scroll-behavior:auto; }
}
