:root{color-scheme:dark;--bg:#111318;--panel:#1b1e25;--panel2:#242832;--text:#f5f7fb;--muted:#9aa3b2;--accent:#5865f2;--line:#303644}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top,#202743 0,#111318 45%);color:var(--text);font:15px/1.5 Inter,system-ui,-apple-system,Segoe UI,sans-serif;min-height:100vh}a{color:#aeb7ff;text-decoration:none}header{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1180px)/2));border-bottom:1px solid #252a35;background:#111318dd;backdrop-filter:blur(12px);position:sticky;top:0;z-index:2}.brand{font-size:22px;font-weight:800;color:#fff}.user{display:flex;gap:14px;align-items:center}main{max-width:1180px;margin:auto;padding:54px 24px 90px}.hero{padding:72px 0;max-width:800px}.hero h1{font-size:clamp(44px,7vw,78px);line-height:1;margin:14px 0 22px;letter-spacing:-.045em}.hero p,.section-title p{color:var(--muted);font-size:18px}.pill{display:inline-flex;border:1px solid #414a78;border-radius:999px;padding:6px 12px;color:#c7cdff;background:#242a45}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:10px;background:var(--accent);color:white;padding:11px 16px;font-weight:700;cursor:pointer}.btn.secondary{background:#262b36}.actions{margin-top:28px}.section-title{margin-bottom:26px}.section-title h1{font-size:38px;margin:8px 0}.guild-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}.guild-card,.panel,.empty{background:linear-gradient(180deg,var(--panel2),var(--panel));border:1px solid var(--line);border-radius:16px;padding:20px}.guild-card{display:flex;gap:14px;align-items:center;color:#fff;transition:.15s transform,.15s border-color}.guild-card:hover{transform:translateY(-2px);border-color:#6874f7}.guild-card small{display:block;color:var(--muted);margin-top:3px}.guild-icon{width:48px;height:48px;border-radius:14px;background:#323746;display:grid;place-items:center;font-weight:800;overflow:hidden}.guild-icon img{width:100%;height:100%;object-fit:cover}.panel{margin-bottom:20px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid label{font-weight:700}.form-grid input,.form-grid select{display:block;width:100%;margin-top:7px;padding:11px 12px;background:#11151d;color:#fff;border:1px solid #343b49;border-radius:9px}.checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:22px 0}.checks label{background:#151922;border:1px solid #303644;border-radius:9px;padding:10px 12px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:11px;border-bottom:1px solid #303644}th{color:#b8c0cf}footer{text-align:center;color:#70798a;padding:30px}@media(max-width:720px){.form-grid,.checks{grid-template-columns:1fr}.hero{padding-top:30px}.hero h1{font-size:48px}}
.policy pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.7;margin:0;color:var(--text)}


/* Dashboard section navigation */
.dashboard-jump{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 22px;position:sticky;top:84px;z-index:1;padding:10px;background:#111318d9;border:1px solid var(--line);border-radius:14px;backdrop-filter:blur(12px)}
.dashboard-jump a{padding:8px 13px;border-radius:9px;background:#1a1f2a;color:#dce2ff;font-weight:700}
.dashboard-jump a:hover{background:#262d3b;color:#fff}

/* Twitch configuration */
.twitch-panel{border-color:#4f2a86;background:linear-gradient(180deg,#21172e 0%,#1b1e25 32%)}
.twitch-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}
.twitch-hero h2,.panel-heading-row h2{margin:4px 0 6px}
.twitch-hero p,.panel-heading-row p{margin:0;color:var(--muted)}
.eyebrow{font-size:11px;font-weight:900;letter-spacing:.15em;color:#b895ff}
.twitch-logo-badge{background:#9146ff;color:#fff;font-weight:900;padding:10px 14px;border-radius:12px;box-shadow:0 8px 24px #9146ff33}
.twitch-config-form{background:#15121d;border:1px solid #4f2a86;border-radius:14px;padding:18px;margin-bottom:20px}
.token-row{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px}
.token-row span{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;padding:5px 8px;border-radius:7px;background:#2a1c3b;color:#d8c5ff;border:1px solid #54357a}
.twitch-btn{background:#9146ff}
.twitch-btn:hover{filter:brightness(1.08)}
.twitch-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.twitch-card{background:#171a21;border:1px solid #313744;border-radius:14px;padding:16px;box-shadow:0 10px 30px #00000018}
.twitch-card.is-live{border-color:#e91916;box-shadow:0 0 0 1px #e9191620,0 12px 34px #e9191610}
.twitch-card-top{display:flex;gap:12px;align-items:center}
.twitch-avatar{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:#9146ff;color:white;font-weight:900;font-size:20px}
.twitch-identity{min-width:0;flex:1;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.twitch-name{font-weight:850;font-size:17px;color:#fff;overflow:hidden;text-overflow:ellipsis}
.status-badge{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:900;letter-spacing:.05em;padding:4px 7px;border-radius:999px}
.status-badge.live{background:#3b1112;color:#ff8181}
.status-badge.offline{background:#242933;color:#aab2c0}
.status-dot{width:7px;height:7px;border-radius:50%;background:currentColor}
.icon-btn{width:34px;height:34px;border-radius:9px;border:1px solid #3a404c;background:#222730;color:#c7ceda;font-size:20px;cursor:pointer}
.icon-btn.danger:hover{background:#3a171a;border-color:#7d2e35;color:#ff9aa3}
.twitch-card-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}
.twitch-card-grid>div,.twitch-message-preview{background:#11151d;border:1px solid #2d3340;border-radius:10px;padding:10px}
.mini-label{display:block;color:#7f899a;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.twitch-card-grid strong{font-size:13px;color:#eef1f6}
.twitch-message-preview p{margin:4px 0 0;color:#c9d0da;font-size:13px;overflow-wrap:anywhere}
.twitch-card-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px}
.twitch-card-footer a{font-weight:700;font-size:13px}
.twitch-empty{grid-column:1/-1}

/* Command catalog */
.command-panel{background:linear-gradient(180deg,#1c2230,#1b1e25)}
.panel-heading-row{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:24px}
.command-total{white-space:nowrap;padding:7px 10px;border-radius:999px;background:#20283a;color:#bfcaff;border:1px solid #34405a;font-size:12px;font-weight:800}
.command-category{margin-top:24px}
.category-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.category-heading h3{margin:0;font-size:18px}
.category-heading span{color:var(--muted);font-size:12px}
.command-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.command-card{background:#141820;border:1px solid #303744;border-radius:13px;padding:15px}
.command-card:hover{border-color:#5865f2;transform:translateY(-1px);transition:.15s ease}
.command-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.command-card code{font-size:15px;color:#d8ddff;background:#20263a;border:1px solid #343d5a;border-radius:8px;padding:5px 8px}
.command-card p{color:#aeb7c6;margin:12px 0;font-size:13px}
.command-badges{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.pill.subtle{font-size:10px;padding:4px 7px;background:#222834;border-color:#343d4e;color:#b8c2d2}
.command-subcommands{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.command-subcommands span{font:11px ui-monospace,SFMono-Regular,Menlo,monospace;color:#aeb7ff;background:#1d2435;padding:5px 7px;border-radius:7px}
.command-meta{display:block;margin-top:10px;color:#788293;font-size:11px}

@media(max-width:720px){
  .dashboard-jump{position:static}
  .twitch-hero,.panel-heading-row{flex-direction:column}
  .twitch-card-grid{grid-template-columns:1fr}
}


/* Privacy page */
.privacy-page{max-width:900px;margin:0 auto}
.privacy-hero{padding:20px 0 30px}
.privacy-hero>a{display:inline-block;margin-bottom:24px}
.privacy-hero h1{font-size:clamp(42px,7vw,66px);letter-spacing:-.04em;line-height:1;margin:8px 0 14px}
.privacy-hero p{max-width:720px;color:var(--muted);font-size:18px;margin:0}
.privacy-updated{display:inline-flex;margin-top:18px;padding:7px 10px;border-radius:999px;border:1px solid #343d4e;background:#1c212b;color:#b8c2d2;font-size:12px;font-weight:700}
.privacy-summary{margin-bottom:18px}
.privacy-summary>strong{display:block;font-size:18px;margin-bottom:12px}
.privacy-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.privacy-summary-grid span{padding:11px 12px;border-radius:10px;background:#151922;border:1px solid #303744;color:#cbd3df}
.privacy-content{padding:28px}
.privacy-section{scroll-margin-top:96px;padding:6px 0 24px;border-bottom:1px solid #303744}
.privacy-section:last-child{border-bottom:0;padding-bottom:0}
.privacy-section h2{font-size:23px;margin:18px 0 9px}
.privacy-section p{color:#c8cfda;line-height:1.75;margin:8px 0}
.privacy-section code{font:12px ui-monospace,SFMono-Regular,Menlo,monospace;padding:2px 5px;border-radius:5px;background:#11151d;color:#d8ddff;border:1px solid #303744}

/* Essential-cookie notice */
.cookie-notice{position:fixed;left:20px;right:20px;bottom:20px;z-index:20;max-width:900px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 18px;border:1px solid #3a4251;border-radius:15px;background:#171b23f2;box-shadow:0 18px 60px #0008;backdrop-filter:blur(16px)}
.cookie-notice.is-hidden{display:none}
.cookie-copy strong{font-size:15px}
.cookie-copy p{margin:4px 0 0;color:#aeb7c6;font-size:13px}
.cookie-actions{display:flex;gap:9px;flex-shrink:0}

@media(max-width:720px){
  .privacy-summary-grid{grid-template-columns:1fr}
  .cookie-notice{align-items:stretch;flex-direction:column;left:12px;right:12px;bottom:12px}
  .cookie-actions{width:100%}
  .cookie-actions .btn{flex:1}
}

.legal-crosslink{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.legal-crosslink strong{font-size:17px}
.legal-crosslink p{flex:1 1 420px;margin:0;color:var(--muted)}


/* Advanced ticket configuration */
.ticket-config-panel{background:linear-gradient(180deg,#202536,#1b1e25)}
.ticket-panel-publisher{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,1.5fr) auto;gap:14px;align-items:end;padding:16px;margin-bottom:18px;border:1px solid #37405a;border-radius:14px;background:#151a24}
.ticket-panel-publisher label{font-weight:700}
.ticket-panel-publisher select{display:block;width:100%;margin-top:7px;padding:11px 12px;background:#11151d;color:#fff;border:1px solid #343b49;border-radius:9px}
.ticket-panel-publisher p{margin:3px 0 0;color:var(--muted);font-size:13px}
.ticket-module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px}
.ticket-module-card{border:1px solid #343b49;border-radius:15px;background:#151922;padding:16px}
.ticket-module-card.enabled{border-color:#405078}
.ticket-module-card.disabled{opacity:.72}
.ticket-module-head{display:flex;align-items:center;gap:12px;margin-bottom:15px}
.ticket-module-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:#222a3a;border:1px solid #38445d;font-size:22px}
.ticket-module-head h3{margin:0;font-size:18px}
.switch-label{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:12px;color:#c9d2df}
.ticket-module-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ticket-module-fields label{font-weight:700;font-size:13px}
.ticket-module-fields .wide{grid-column:1/-1}
.ticket-module-fields input,.ticket-module-fields select,.ticket-module-fields textarea{display:block;width:100%;margin-top:6px;padding:10px 11px;background:#10141b;color:#fff;border:1px solid #303846;border-radius:9px;font:inherit}
.ticket-module-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:15px;padding-top:13px;border-top:1px solid #2c3340}
.ticket-module-footer span{color:#7f899a;font-size:11px}
.ticket-module-footer code{color:#bfcaff}

/* Expanded cookie consent */
.cookie-actions{flex-wrap:wrap;justify-content:flex-end}
.cookie-actions .btn{white-space:nowrap}

@media(max-width:860px){
  .ticket-panel-publisher{grid-template-columns:1fr}
}
@media(max-width:720px){
  .ticket-module-grid{grid-template-columns:1fr}
  .ticket-module-fields{grid-template-columns:1fr}
  .ticket-module-fields .wide{grid-column:auto}
  .ticket-module-head{align-items:flex-start;flex-wrap:wrap}
  .switch-label{width:100%;margin-left:56px}
}


/* Advanced Feature Center */
.feature-center-panel{background:linear-gradient(180deg,#151b2c 0%,#1b1e25 38%);border-color:#354269}
.feature-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:16px}
.feature-card{position:relative;padding:18px;border:1px solid #30394a;border-radius:16px;background:linear-gradient(145deg,#151a23,#11151c);box-shadow:0 12px 34px #0002;overflow:hidden}
.feature-card:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#465069}
.feature-card.feature-enabled{border-color:#495b82;box-shadow:0 14px 38px #0003}
.feature-card.feature-enabled:before{background:#57f287}
.feature-card.priority-very-high:before{background:#ed4245}
.feature-card.priority-high:before{background:#f0b232}
.feature-card.priority-growing:before{background:#5865f2}
.feature-card.priority-popular:before{background:#23a559}
.feature-card.priority-differentiator:before{background:#eb459e}
.feature-card-head{display:flex;align-items:flex-start;gap:12px}
.feature-icon{width:46px;height:46px;display:grid;place-items:center;flex:0 0 auto;border-radius:13px;background:#202738;border:1px solid #34405b;font-size:24px}
.feature-title-wrap{min-width:0;flex:1}
.feature-label-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.feature-label-row h3{margin:0;font-size:17px}
.feature-priority{display:block;margin-top:5px;color:#7f8ca4;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.04em}
.feature-status{font-size:9px;font-weight:900;padding:4px 7px;border-radius:999px;text-transform:uppercase;letter-spacing:.06em}
.feature-status.core{background:#153520;color:#75e69a;border:1px solid #295c39}
.feature-status.partial{background:#342d15;color:#f3cf6b;border:1px solid #635527}
.feature-status.integration{background:#321d34;color:#e8a5ef;border:1px solid #613768}
.feature-toggle{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:800;color:#b9c3d5}
.feature-description{color:#aab4c4;font-size:13px;line-height:1.55;margin:14px 0}
.feature-requirement{padding:9px 10px;margin-bottom:12px;border-radius:9px;background:#251d2c;color:#dcbbea;border:1px solid #44304c;font-size:12px}
.feature-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border-radius:12px;background:#0f131a;border:1px solid #293140}
.feature-fields label{font-size:12px;font-weight:750;color:#c3cad6}
.feature-fields input[type="text"],.feature-fields input[type="number"],.feature-fields select{display:block;width:100%;margin-top:6px;padding:9px 10px;border:1px solid #343d4d;border-radius:8px;background:#151a22;color:#fff;font:inherit}
.feature-check{display:flex!important;align-items:center;gap:7px;padding:9px;border-radius:8px;background:#171d27}
.feature-card-footer{display:flex;justify-content:flex-end;margin-top:14px}
.feature-open{margin-left:auto}

@media(max-width:720px){
  .feature-grid{grid-template-columns:1fr}
  .feature-fields{grid-template-columns:1fr}
  .feature-card-head{flex-wrap:wrap}
  .feature-toggle{margin-left:58px}
}

.feature-status.foundation{background:#1c2c38;color:#8fd3ff;border:1px solid #31546a}
.feature-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.ticket-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 18px}
.ticket-stat-grid>div{padding:14px;border-radius:12px;background:#111722;border:1px solid #303b50;text-align:center}
.ticket-stat-grid strong{display:block;font-size:24px;color:#fff}
.ticket-stat-grid span{display:block;margin-top:3px;color:#8995a8;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:800}
@media(max-width:720px){.ticket-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Custom automation rule builder */
.automation-builder{margin-top:26px;padding-top:22px;border-top:1px solid #30394a}
.automation-form{padding:16px;border:1px solid #35405a;border-radius:14px;background:#10151f;margin-bottom:14px}
.automation-form input,.automation-form select{display:block;width:100%;margin-top:6px;padding:10px 11px;border:1px solid #343d4d;border-radius:8px;background:#151a22;color:#fff}
.automation-rule-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:10px}
.automation-rule-card{display:flex;align-items:flex-start;gap:12px;padding:14px;border-radius:12px;background:#151a22;border:1px solid #30394a}
.automation-rule-card>div:first-child{min-width:0;flex:1}
.automation-rule-card strong{display:block;color:#fff}
.automation-rule-card span{display:block;margin-top:3px;color:#8e9aab;font-size:11px;text-transform:uppercase;letter-spacing:.05em}
.automation-rule-detail{display:flex;flex:2;gap:5px;flex-wrap:wrap}
.automation-rule-detail code{padding:4px 7px;border-radius:6px;background:#0d1118;color:#aebaff;border:1px solid #2e3748;font-size:10px}


/* Autosaving enable/disable controls */
.autosave-toggle{accent-color:#5865f2}
.autosaving{opacity:.62;pointer-events:none;transition:opacity .15s ease}
.command-card.disabled,.ticket-module-card.disabled,.feature-card:not(.feature-enabled){filter:saturate(.72)}
.command-card.disabled{opacity:.64;border-style:dashed}
.command-card.enabled{border-color:#35405a}
.command-toggle{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:999px;background:#151a24;border:1px solid #343d4e;color:#c7d0dd;font-size:10px;font-weight:800}
.command-toggle input{margin:0}


/* Ticket behavior controls */
.ticket-behavior-form{padding:16px;margin-bottom:16px;border:1px solid #3a4560;border-radius:14px;background:linear-gradient(145deg,#141a25,#10141b)}
.ticket-behavior-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}
.ticket-behavior-grid label{font-size:13px;font-weight:800;color:#cbd3df}
.ticket-behavior-grid input,.ticket-behavior-grid select{display:block;width:100%;margin-top:6px;padding:10px 11px;border:1px solid #343d4d;border-radius:9px;background:#0f141c;color:#fff;font:inherit}
.ticket-behavior-switches{margin:0 0 14px;padding:12px;border-radius:10px;background:#0e131b;border:1px solid #2c3442}
@media(max-width:720px){.ticket-behavior-grid{grid-template-columns:1fr}}


/* === Legacy dashboard structural repair ===
   Keeps the current master dashboard usable until the file-based dashboard is merged.
*/
.site-header{
  height:auto;
  min-height:72px;
  padding:0 24px;
  display:block;
}
.header-inner{
  width:100%;
  max-width:1280px;
  min-height:72px;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:20px;
}
.header-inner .brand{
  flex:0 0 auto;
  white-space:nowrap;
}
.site-nav{
  display:flex;
  align-items:center;
  gap:4px;
  flex:1 1 auto;
  min-width:0;
}
.site-nav a{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 10px;
  border-radius:9px;
  color:var(--muted);
  font-size:13px;
  font-weight:750;
  white-space:nowrap;
}
.site-nav a:hover{
  background:var(--panel2);
  color:var(--text);
}
.header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex:0 0 auto;
}
.header-auth,.header-auth .user{
  display:flex;
  align-items:center;
  gap:9px;
}
.header-auth .user>span{
  max-width:170px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.nav-toggle{
  display:none;
  width:42px;
  height:42px;
  padding:0;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel2);
  color:var(--text);
  cursor:pointer;
}
.theme-toggle{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel2);
  color:var(--text);
  cursor:pointer;
}
.header-actions .add-bot-button{
  min-height:42px;
  padding:10px 14px;
  white-space:nowrap;
}

/* Server statistics page */
.stats-page-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:18px;
}
.stats-page-hero h1{
  margin:7px 0 8px;
  font-size:clamp(34px,5vw,48px);
  line-height:1.05;
  letter-spacing:-.035em;
}
.stats-page-hero p{
  margin:0;
  max-width:720px;
  color:var(--muted);
  font-size:15px;
}
.server-stats-summary{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.server-stats-summary>div{
  min-width:0;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:15px;
  background:linear-gradient(180deg,var(--panel2),var(--panel));
  box-shadow:0 14px 36px rgba(0,0,0,.12);
}
.server-stats-summary strong{
  display:block;
  font-size:24px;
  line-height:1.05;
  color:var(--text);
}
.server-stats-summary span{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.statistics-panel{
  padding:18px;
}
.stats-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.stats-toolbar>span{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.server-search{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1 1 420px;
  max-width:620px;
  min-width:0;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:#11151d;
}
.server-search>span{
  flex:0 0 auto;
  font-size:14px;
}
.server-search input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
}
.server-search input::placeholder{
  color:var(--muted);
}
.server-statistics-table{
  min-width:980px;
}
.server-statistics-table th{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.server-statistics-table td{
  vertical-align:middle;
}
.server-statistics-table td>strong,
.server-statistics-table td>small{
  display:block;
  white-space:nowrap;
}
.server-statistics-table td>small{
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}
.stats-server-cell{
  display:flex;
  align-items:center;
  gap:11px;
  min-width:260px;
}
.stats-server-cell>div:last-child{
  min-width:0;
}
.stats-server-cell strong,
.stats-server-cell small{
  display:block;
}
.stats-server-cell strong{
  max-width:220px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.stats-server-cell small{
  margin-top:2px;
  color:var(--muted);
  font-size:10px;
}
.stats-server-icon{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:13px;
  background:#323746;
  font-size:12px;
  font-weight:900;
}
.stats-server-icon img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.statistics-panel .table-wrap{
  border:1px solid var(--line);
  border-radius:12px;
  overflow:auto;
}
.statistics-panel table{
  background:var(--panel);
}
.statistics-panel th,
.statistics-panel td{
  padding:13px 12px;
}

/* Light mode contrast for legacy dashboard */
html[data-theme="light"] .site-nav a{
  color:#596579;
}
html[data-theme="light"] .site-nav a:hover{
  color:#172033;
  background:#f0f3f8;
}
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .nav-toggle{
  background:#f4f6fa;
  color:#29344a;
  border-color:#d8e0ea;
}
html[data-theme="light"] .server-stats-summary>div,
html[data-theme="light"] .statistics-panel,
html[data-theme="light"] .statistics-panel table{
  background:#fff;
}
html[data-theme="light"] .server-search{
  background:#fff;
}
html[data-theme="light"] .btn{
  color:#fff;
}
html[data-theme="light"] .btn.secondary{
  color:#29344a;
}

/* Responsive legacy header/statistics */
@media(max-width:1080px){
  .header-inner{gap:11px}
  .site-nav{gap:1px}
  .site-nav a{padding:8px 7px;font-size:12px}
  .header-auth .user>span{display:none}
  .server-stats-summary{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:860px){
  .site-header{padding:0 14px}
  .header-inner{position:relative;min-height:64px}
  .nav-toggle{
    display:grid;
    place-items:center;
    margin-left:auto;
  }
  .site-nav{
    display:none;
    position:absolute;
    top:calc(100% + 8px);
    left:0;
    right:0;
    z-index:20;
    padding:8px;
    border:1px solid var(--line);
    border-radius:13px;
    background:var(--panel);
    box-shadow:0 18px 48px rgba(0,0,0,.18);
  }
  .site-nav.open{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .site-nav a{
    min-height:42px;
    padding:10px 12px;
  }
  .header-actions .add-bot-button{display:none}
}
@media(max-width:720px){
  .stats-page-hero{
    align-items:stretch;
    flex-direction:column;
    gap:14px;
  }
  .stats-page-hero>.btn{align-self:flex-start}
  .server-stats-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .server-stats-summary>div{padding:13px 14px}
  .stats-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .stats-toolbar>span{white-space:normal}
  .server-search{
    flex-basis:auto;
    max-width:none;
    width:100%;
  }
}
@media(max-width:460px){
  .header-auth{display:none}
  .site-nav.open{grid-template-columns:1fr}
  .server-stats-summary{grid-template-columns:1fr}
}


/* === Complete dashboard theme consistency ===
   The theme switch now changes the entire dashboard instead of only individual cards.
*/
html[data-theme="light"]{
  color-scheme:light;
  --bg:#f4f7fe;
  --panel:#ffffff;
  --panel2:#f8f9fd;
  --text:#1b2559;
  --muted:#707eae;
  --accent:#5865f2;
  --line:#e1e7f0;
}
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#111318;
  --panel:#1b1e25;
  --panel2:#242832;
  --text:#f5f7fb;
  --muted:#9aa3b2;
  --accent:#5865f2;
  --line:#303644;
}
html[data-theme="light"] body{
  background:linear-gradient(180deg,#eef2ff 0,#f7f9fc 270px,#f4f7fe 100%);
  color:var(--text);
}
html[data-theme="dark"] body{
  background:radial-gradient(circle at top,#202743 0,#111318 45%);
  color:var(--text);
}
html[data-theme="light"] header,
html[data-theme="light"] .site-header{
  background:rgba(255,255,255,.92);
  border-color:var(--line);
}
html[data-theme="dark"] header,
html[data-theme="dark"] .site-header{
  background:rgba(17,19,24,.92);
  border-color:#252a35;
}
html[data-theme="light"] .brand{color:#1b2559}
html[data-theme="dark"] .brand{color:#fff}
html[data-theme="light"] a{color:#5865f2}
html[data-theme="dark"] a{color:#aeb7ff}

/* Generic dashboard surfaces */
html[data-theme="light"] .panel,
html[data-theme="light"] .guild-card,
html[data-theme="light"] .empty,
html[data-theme="light"] .statistics-panel,
html[data-theme="light"] .server-stats-summary>div,
html[data-theme="light"] .dashboard-home-stats>div,
html[data-theme="light"] .dashboard-toolbar,
html[data-theme="light"] .stats-toolbar,
html[data-theme="light"] .command-card,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .ticket-module-card,
html[data-theme="light"] .automation-rule-card,
html[data-theme="light"] .twitch-card,
html[data-theme="light"] .settings-group,
html[data-theme="light"] .settings-toggle-section{
  background:#fff;
  border-color:var(--line);
  color:var(--text);
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .guild-card,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .statistics-panel,
html[data-theme="dark"] .server-stats-summary>div,
html[data-theme="dark"] .dashboard-home-stats>div,
html[data-theme="dark"] .dashboard-toolbar,
html[data-theme="dark"] .stats-toolbar{
  background:linear-gradient(180deg,var(--panel2),var(--panel));
  border-color:var(--line);
  color:var(--text);
}
html[data-theme="dark"] .command-card,
html[data-theme="dark"] .feature-card,
html[data-theme="dark"] .ticket-module-card,
html[data-theme="dark"] .automation-rule-card,
html[data-theme="dark"] .twitch-card,
html[data-theme="dark"] .settings-group,
html[data-theme="dark"] .settings-toggle-section{
  background:#151922;
  border-color:var(--line);
  color:var(--text);
}

/* Statistics table follows the active theme */
html[data-theme="light"] .statistics-panel table,
html[data-theme="light"] .server-statistics-table{
  background:#fff;
  color:#1b2559;
}
html[data-theme="dark"] .statistics-panel table,
html[data-theme="dark"] .server-statistics-table{
  background:#1b1e25;
  color:#f5f7fb;
}
html[data-theme="light"] .statistics-panel th,
html[data-theme="light"] .statistics-panel td{
  border-color:#e1e7f0;
}
html[data-theme="dark"] .statistics-panel th,
html[data-theme="dark"] .statistics-panel td{
  border-color:#303644;
}
html[data-theme="light"] .statistics-panel th{color:#707eae}
html[data-theme="dark"] .statistics-panel th{color:#b8c0cf}

/* Inputs and search fields */
html[data-theme="light"] .server-search,
html[data-theme="light"] .form-grid input,
html[data-theme="light"] .form-grid select,
html[data-theme="light"] .ticket-module-fields input,
html[data-theme="light"] .ticket-module-fields select,
html[data-theme="light"] .ticket-module-fields textarea,
html[data-theme="light"] .feature-fields input,
html[data-theme="light"] .feature-fields select,
html[data-theme="light"] .automation-form input,
html[data-theme="light"] .automation-form select{
  background:#fff;
  color:#1b2559;
  border-color:#d7deea;
}
html[data-theme="dark"] .server-search,
html[data-theme="dark"] .form-grid input,
html[data-theme="dark"] .form-grid select,
html[data-theme="dark"] .ticket-module-fields input,
html[data-theme="dark"] .ticket-module-fields select,
html[data-theme="dark"] .ticket-module-fields textarea,
html[data-theme="dark"] .feature-fields input,
html[data-theme="dark"] .feature-fields select,
html[data-theme="dark"] .automation-form input,
html[data-theme="dark"] .automation-form select{
  background:#11151d;
  color:#fff;
  border-color:#343b49;
}

/* Buttons must keep readable contrast in either theme */
html[data-theme="light"] .btn{
  color:#fff;
}
html[data-theme="light"] .btn.secondary{
  background:#eef2f7;
  color:#29344a;
}
html[data-theme="dark"] .btn{
  color:#fff;
}
html[data-theme="dark"] .btn.secondary{
  background:#262b36;
  color:#f5f7fb;
}
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .nav-toggle{
  background:#f4f6fa;
  color:#29344a;
  border-color:#d8e0ea;
}
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .nav-toggle{
  background:#242832;
  color:#f5f7fb;
  border-color:#303644;
}

/* Text that was previously hard-coded for dark mode */
html[data-theme="light"] .guild-card{color:#1b2559}
html[data-theme="light"] .twitch-name,
html[data-theme="light"] .ticket-module-head h3,
html[data-theme="light"] .feature-label-row h3,
html[data-theme="light"] .command-card strong{
  color:#1b2559;
}
html[data-theme="dark"] .guild-card,
html[data-theme="dark"] .twitch-name,
html[data-theme="dark"] .ticket-module-head h3,
html[data-theme="dark"] .feature-label-row h3{
  color:#f5f7fb;
}


/* === Homepage content spacing and category layout === */
.landing-hero{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);
  align-items:center;
  gap:42px;
  min-height:520px;
  padding:58px 4px 70px;
}
.hero-copy{
  min-width:0;
}
.hero-copy .pill{
  display:inline-flex;
  align-items:center;
  margin-bottom:22px;
}
.hero-copy h1{
  max-width:760px;
  margin:0 0 24px;
  font-size:clamp(42px,5vw,68px);
  line-height:1.02;
  letter-spacing:-.045em;
}
.hero-slogan{
  margin:0 0 16px;
  max-width:820px;
  line-height:1.55;
}
.hero-detail{
  margin:0;
  max-width:900px;
  color:var(--muted);
  line-height:1.7;
}
.hero-copy .actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:28px;
}

/* Right-side command center card */
.hero-console{
  align-self:center;
  padding:22px;
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(180deg,var(--panel2),var(--panel));
  box-shadow:0 22px 50px rgba(0,0,0,.16);
}
.hero-console-heading{
  display:flex;
  flex-direction:column;
  gap:5px;
  margin-bottom:16px;
  padding-bottom:15px;
  border-bottom:1px solid var(--line);
}
.hero-console-label{
  color:#aeb7ff;
  font-size:10px;
  font-weight:900;
  letter-spacing:.15em;
}
.hero-console-title{
  color:var(--text);
  font-size:21px;
  line-height:1.2;
}
.hero-console-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.hero-category{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.025);
  color:var(--text);
  font-size:12px;
  font-weight:750;
  line-height:1.25;
}
.hero-category b{
  width:22px;
  flex:0 0 22px;
  text-align:center;
  font-size:15px;
}

/* Footer spacing */
footer{
  padding:34px 24px 42px;
}
.footer-inner{
  max-width:1280px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
  text-align:center;
}
.footer-brand-block{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
}
.footer-brand-block strong{
  color:var(--text);
  font-weight:850;
}
.footer-brand-block span{
  color:var(--muted);
}
.footer-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:7px;
}
.footer-nav a{
  font-weight:700;
}
.footer-nav>span{
  color:var(--muted);
}

/* Theme-aware homepage cards */
html[data-theme="light"] .hero-console{
  background:#fff;
  border-color:#dfe5ef;
  box-shadow:0 22px 50px rgba(44,62,100,.10);
}
html[data-theme="light"] .hero-console-label{
  color:#5865f2;
}
html[data-theme="light"] .hero-category{
  background:#f7f9fd;
  border-color:#dfe5ef;
  color:#1b2559;
}
html[data-theme="dark"] .hero-console{
  background:linear-gradient(180deg,#1b2030,#171b24);
}
html[data-theme="dark"] .hero-category{
  background:#202530;
  color:#f5f7fb;
}

/* Responsive homepage */
@media(max-width:980px){
  .landing-hero{
    grid-template-columns:1fr;
    gap:28px;
    padding-top:42px;
  }
  .hero-console{
    width:100%;
  }
}
@media(max-width:620px){
  .landing-hero{
    padding-top:30px;
    padding-bottom:48px;
  }
  .hero-copy h1{
    font-size:clamp(38px,12vw,52px);
  }
  .hero-copy .actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .hero-copy .actions .btn{
    width:100%;
  }
  .hero-console{
    padding:16px;
  }
  .hero-console-grid{
    grid-template-columns:1fr;
  }
  .footer-brand-block{
    flex-direction:column;
    gap:2px;
  }
}


/* === Advanced dashboard control center === */
.dashboard-control-shell{
  display:flex;
  flex-direction:column;
  gap:18px;
}
.dashboard-home-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:26px 28px;
  border:1px solid var(--line);
  border-radius:22px;
  background:
    radial-gradient(circle at top right,rgba(88,101,242,.18),transparent 38%),
    linear-gradient(180deg,var(--panel2),var(--panel));
  box-shadow:0 20px 50px rgba(0,0,0,.14);
}
.dashboard-hero-copy{
  min-width:0;
}
.dashboard-home-badge{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:9px;
  padding:6px 9px;
  border:1px solid rgba(88,101,242,.35);
  border-radius:999px;
  background:rgba(88,101,242,.10);
  color:#aeb7ff;
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
}
.dashboard-home-badge i,
.dashboard-online-pill i,
.guild-status i{
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-radius:50%;
  background:#20d587;
  box-shadow:0 0 0 4px rgba(32,213,135,.10);
}
.dashboard-home-hero h1{
  margin:5px 0 8px;
  font-size:clamp(38px,5vw,56px);
  line-height:1;
  letter-spacing:-.045em;
}
.dashboard-home-hero p{
  max-width:700px;
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.65;
}
.dashboard-hero-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}
.dashboard-online-pill{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:40px;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(255,255,255,.025);
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  white-space:nowrap;
}

/* six-card overview */
.dashboard-server-summary{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  margin:2px 0 0;
  align-items:stretch;
}
.dashboard-server-summary>div{
  min-width:0;
  padding:0;
}
.dashboard-server-summary .summary-card{
  display:flex;
  align-items:center;
  gap:11px;
  min-height:86px;
  padding:14px 15px;
  border:1px solid var(--line);
  border-radius:15px;
  background:linear-gradient(180deg,var(--panel2),var(--panel));
  box-shadow:0 10px 28px rgba(0,0,0,.09);
  overflow:hidden;
}
.summary-icon{
  width:38px;
  height:38px;
  flex:0 0 38px;
  display:grid;
  place-items:center;
  border:1px solid rgba(88,101,242,.28);
  border-radius:11px;
  background:rgba(88,101,242,.10);
  color:#aeb7ff;
}
.summary-icon svg{
  width:18px;
  height:18px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.summary-icon-members svg,
.summary-icon-tickets svg{
  width:19px;
  height:19px;
}
.summary-icon-channels svg{
  width:17px;
  height:17px;
}
.summary-icon-commands svg{
  width:18px;
  height:18px;
}
.dashboard-server-summary .summary-card>div{
  min-width:0;
}
.dashboard-server-summary strong{
  display:block;
  font-size:22px;
  line-height:1.05;
  letter-spacing:-.025em;
  color:var(--text);
}
.dashboard-server-summary .summary-card>div>span{
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:8px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.075em;
  text-transform:uppercase;
  white-space:normal;
}

/* managed servers section */
.dashboard-server-section{
  padding:22px;
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(180deg,var(--panel2),var(--panel));
  box-shadow:0 18px 46px rgba(0,0,0,.12);
}
.dashboard-server-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}
.dashboard-server-section-head h2{
  margin:4px 0 4px;
  font-size:24px;
  letter-spacing:-.025em;
}
.dashboard-server-section-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}
.managed-server-count{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--panel2);
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
  white-space:nowrap;
}
.dashboard-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 16px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(0,0,0,.08);
}
.dashboard-toolbar .server-search{
  max-width:640px;
}
.dashboard-toolbar-hint{
  color:var(--muted);
  font-size:10px;
  font-weight:700;
  white-space:nowrap;
}

/* server cards */
.friendly-guild-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.friendly-guild-card{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  min-width:0;
  padding:17px;
  border-radius:17px;
  overflow:hidden;
}
.friendly-guild-card:hover{
  transform:translateY(-2px);
  border-color:rgba(88,101,242,.55);
  box-shadow:0 16px 38px rgba(0,0,0,.14);
}
.guild-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.guild-card-main{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1 1 auto;
}
.friendly-guild-card .guild-icon{
  width:54px;
  height:54px;
  flex:0 0 54px;
  border-radius:15px;
}
.guild-card-copy{
  min-width:0;
  flex:1 1 auto;
}
.guild-title-row{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.guild-title-row>strong{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:15px;
}
.guild-status{
  display:inline-flex;
  align-items:center;
  gap:5px;
  flex:0 0 auto;
  padding:4px 7px;
  border:1px solid rgba(32,213,135,.18);
  border-radius:999px;
  background:rgba(32,213,135,.08);
  color:#5ee2a7;
  font-size:8px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.guild-card-copy>small{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:9px;
}
.guild-mini-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:15px;
}
.guild-mini-stats>div{
  min-width:0;
  padding:10px;
  border:1px solid var(--line);
  border-radius:11px;
  background:rgba(0,0,0,.07);
}
.guild-mini-stats span,
.guild-mini-stats strong{
  display:block;
}
.guild-mini-stats span{
  color:var(--muted);
  font-size:8px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.guild-mini-stats strong{
  margin-top:4px;
  color:var(--text);
  font-size:15px;
}
.guild-card-actions{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:14px;
}
.guild-card-actions .btn{
  flex:1 1 0;
  min-width:0;
}
.guild-configure-btn{
  box-shadow:0 10px 24px rgba(88,101,242,.18);
}

/* theme tuning */
html[data-theme="light"] .dashboard-home-hero,
html[data-theme="light"] .dashboard-server-section,
html[data-theme="light"] .dashboard-server-summary .summary-card{
  background:#fff;
  border-color:#dfe5ef;
  box-shadow:0 18px 45px rgba(44,62,100,.08);
}
html[data-theme="light"] .dashboard-home-badge{
  color:#5865f2;
}
html[data-theme="light"] .summary-icon{
  background:#eef1ff;
  color:#5865f2;
  border-color:#d8defd;
}
html[data-theme="light"] .dashboard-toolbar,
html[data-theme="light"] .guild-mini-stats>div,
html[data-theme="light"] .dashboard-online-pill,
html[data-theme="light"] .managed-server-count{
  background:#f7f9fd;
}
html[data-theme="light"] .guild-status{
  color:#0b9f61;
}
html[data-theme="dark"] .dashboard-server-section{
  background:linear-gradient(180deg,#171c27,#131720);
}
html[data-theme="dark"] .friendly-guild-card{
  background:linear-gradient(180deg,#1c2230,#171b24);
}

/* dashboard responsive layout */
@media(max-width:1180px){
  .dashboard-server-summary{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:900px){
  .dashboard-home-hero{
    align-items:flex-start;
    flex-direction:column;
  }
  .dashboard-hero-actions{
    width:100%;
    flex-wrap:wrap;
  }
  .friendly-guild-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:720px){
  .dashboard-home-hero,
  .dashboard-server-section{
    padding:16px;
    border-radius:16px;
  }
  .dashboard-server-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .dashboard-server-summary .summary-card{
    min-height:76px;
    padding:12px;
  }
  .summary-icon{
    width:34px;
    height:34px;
    flex:0 0 34px;
    border-radius:10px;
  }
  .summary-icon svg{
    width:16px;
    height:16px;
  }
  .dashboard-server-summary strong{
    font-size:19px;
  }
  .dashboard-server-section-head{
    align-items:flex-start;
    flex-direction:column;
  }
  .dashboard-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .dashboard-toolbar .server-search{
    width:100%;
    max-width:none;
  }
  .dashboard-toolbar-hint{
    white-space:normal;
  }
  .guild-mini-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:480px){
  .dashboard-server-summary{
    grid-template-columns:1fr;
  }
  .dashboard-hero-actions{
    align-items:stretch;
    flex-direction:column;
  }
  .dashboard-hero-actions .btn,
  .dashboard-online-pill{
    width:100%;
    justify-content:center;
  }
  .guild-title-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .guild-card-actions{
    align-items:stretch;
    flex-direction:column;
  }
}


/* === Complete light-mode module cleanup ===
   Make every dashboard module use white/light surfaces with dark readable text.
*/
html[data-theme="light"] body{
  background:
    radial-gradient(circle at top left,rgba(88,101,242,.07),transparent 34%),
    linear-gradient(180deg,#f5f7fb 0,#f8faff 100%);
  color:#172033;
}

html[data-theme="light"] main{
  color:#172033;
}

/* Primary dashboard surfaces */
html[data-theme="light"] .panel,
html[data-theme="light"] .dashboard-home-hero,
html[data-theme="light"] .dashboard-server-section,
html[data-theme="light"] .statistics-panel,
html[data-theme="light"] .server-config-hero,
html[data-theme="light"] .settings-panel,
html[data-theme="light"] .feature-center-panel,
html[data-theme="light"] .ticket-system-panel,
html[data-theme="light"] .twitch-panel,
html[data-theme="light"] .command-center-panel,
html[data-theme="light"] .friendly-guild-card,
html[data-theme="light"] .guild-card,
html[data-theme="light"] .summary-card{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#dfe5ef !important;
  box-shadow:0 14px 34px rgba(31,51,89,.08) !important;
}

/* Nested module cards */
html[data-theme="light"] .feature-card,
html[data-theme="light"] .command-card,
html[data-theme="light"] .ticket-module-card,
html[data-theme="light"] .automation-rule-card,
html[data-theme="light"] .twitch-card,
html[data-theme="light"] .settings-group,
html[data-theme="light"] .settings-toggle-section,
html[data-theme="light"] .automation-builder,
html[data-theme="light"] .automation-form,
html[data-theme="light"] .ticket-behavior-form,
html[data-theme="light"] .ticket-behavior-grid,
html[data-theme="light"] .ticket-behavior-switches,
html[data-theme="light"] .twitch-config-form,
html[data-theme="light"] .twitch-card-grid>div,
html[data-theme="light"] .twitch-message-preview,
html[data-theme="light"] .feature-fields,
html[data-theme="light"] .feature-check,
html[data-theme="light"] .checks label,
html[data-theme="light"] .guild-mini-stats>div,
html[data-theme="light"] .dashboard-toolbar,
html[data-theme="light"] .stats-toolbar,
html[data-theme="light"] .managed-server-count,
html[data-theme="light"] .dashboard-online-pill,
html[data-theme="light"] .dashboard-jump,
html[data-theme="light"] .settings-footer{
  background:#f8fafc !important;
  color:#172033 !important;
  border-color:#dfe5ef !important;
  box-shadow:none !important;
}

/* Cards that should stay pure white even when nested */
html[data-theme="light"] .feature-card,
html[data-theme="light"] .command-card,
html[data-theme="light"] .ticket-module-card,
html[data-theme="light"] .automation-rule-card,
html[data-theme="light"] .twitch-card,
html[data-theme="light"] .settings-group{
  background:#ffffff !important;
}

/* Text hierarchy */
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] strong,
html[data-theme="light"] .brand,
html[data-theme="light"] .feature-label-row h3,
html[data-theme="light"] .ticket-module-head h3,
html[data-theme="light"] .twitch-name,
html[data-theme="light"] .guild-title-row>strong,
html[data-theme="light"] .command-card code{
  color:#172033 !important;
}

html[data-theme="light"] p,
html[data-theme="light"] small,
html[data-theme="light"] .muted,
html[data-theme="light"] .feature-description,
html[data-theme="light"] .settings-group-heading p,
html[data-theme="light"] .panel-heading-row p,
html[data-theme="light"] .guild-card-copy>small,
html[data-theme="light"] .dashboard-toolbar-hint{
  color:#667085 !important;
}

html[data-theme="light"] .eyebrow,
html[data-theme="light"] .mini-label{
  color:#5967d9 !important;
}

/* Form controls */
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .server-search{
  background:#ffffff !important;
  color:#172033 !important;
  border-color:#d6deea !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color:#98a2b3 !important;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus{
  border-color:#7c87f5 !important;
  box-shadow:0 0 0 3px rgba(88,101,242,.12) !important;
}

html[data-theme="light"] label{
  color:#475467;
}

/* Tables */
html[data-theme="light"] table,
html[data-theme="light"] .server-statistics-table{
  background:#ffffff !important;
  color:#172033 !important;
}

html[data-theme="light"] th{
  background:#f8fafc !important;
  color:#667085 !important;
  border-color:#e4e9f1 !important;
}

html[data-theme="light"] td{
  background:#ffffff !important;
  color:#344054 !important;
  border-color:#e4e9f1 !important;
}

html[data-theme="light"] tbody tr:hover td{
  background:#f8faff !important;
}

/* Navigation */
html[data-theme="light"] .site-header,
html[data-theme="light"] header{
  background:rgba(255,255,255,.94) !important;
  border-color:#dfe5ef !important;
  box-shadow:0 6px 24px rgba(31,51,89,.06);
}

html[data-theme="light"] .site-nav a,
html[data-theme="light"] .dashboard-jump a{
  color:#475467 !important;
}

html[data-theme="light"] .site-nav a:hover,
html[data-theme="light"] .dashboard-jump a:hover{
  background:#eef2f7 !important;
  color:#172033 !important;
}

/* Buttons */
html[data-theme="light"] .btn{
  background:#5865f2;
  color:#ffffff !important;
  border-color:#5865f2;
}

html[data-theme="light"] .btn:hover{
  background:#4752d8;
}

html[data-theme="light"] .btn.secondary,
html[data-theme="light"] .btn.compact.secondary{
  background:#ffffff !important;
  color:#344054 !important;
  border-color:#d6deea !important;
}

html[data-theme="light"] .btn.secondary:hover{
  background:#f4f6f9 !important;
  color:#172033 !important;
}

html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .nav-toggle{
  background:#ffffff !important;
  color:#344054 !important;
  border-color:#d6deea !important;
}

/* Status / utility pills */
html[data-theme="light"] .dashboard-home-badge,
html[data-theme="light"] .summary-icon{
  background:#eef1ff !important;
  color:#5865f2 !important;
  border-color:#d8defd !important;
}

html[data-theme="light"] .guild-status{
  background:#ecfdf3 !important;
  color:#067647 !important;
  border-color:#abefc6 !important;
}

/* Code/chips/badges */
html[data-theme="light"] code,
html[data-theme="light"] .command-card code{
  background:#f2f4f7 !important;
  color:#344054 !important;
  border-color:#e4e7ec !important;
}

html[data-theme="light"] .chip,
html[data-theme="light"] .badge,
html[data-theme="light"] .priority-badge,
html[data-theme="light"] .feature-priority,
html[data-theme="light"] .status-pill{
  background:#f2f4f7 !important;
  color:#475467 !important;
  border-color:#e4e7ec !important;
}

/* Light-mode shadows should be subtle */
html[data-theme="light"] .friendly-guild-card:hover,
html[data-theme="light"] .feature-card:hover,
html[data-theme="light"] .command-card:hover{
  border-color:#b8c1ff !important;
  box-shadow:0 16px 36px rgba(88,101,242,.10) !important;
}

/* Make scrollbars visually compatible with light mode */
html[data-theme="light"] *{
  scrollbar-color:#cbd3df #f5f7fa;
}

@media(max-width:720px){
  html[data-theme="light"] .settings-footer{
    background:rgba(255,255,255,.97) !important;
    box-shadow:0 12px 28px rgba(31,51,89,.10) !important;
  }
}


/* === Light-mode navigation/button cleanup ===
   Remove legacy dark pill/button backgrounds from dashboard controls.
*/
html[data-theme="light"] .dashboard-jump{
  background:rgba(255,255,255,.96) !important;
  border-color:#dfe5ef !important;
  box-shadow:0 8px 24px rgba(31,51,89,.06) !important;
}

html[data-theme="light"] .dashboard-jump a,
html[data-theme="light"] .dashboard-jump button,
html[data-theme="light"] .section-tabs a,
html[data-theme="light"] .section-tabs button,
html[data-theme="light"] .tab-list a,
html[data-theme="light"] .tab-list button,
html[data-theme="light"] .settings-nav a,
html[data-theme="light"] .settings-nav button,
html[data-theme="light"] .module-nav a,
html[data-theme="light"] .module-nav button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:9px 14px;
  border:1px solid #d6deea !important;
  border-radius:10px;
  background:#ffffff !important;
  color:#344054 !important;
  box-shadow:0 1px 2px rgba(16,24,40,.04) !important;
  font-weight:700;
  text-decoration:none;
  transition:
    background .16s ease,
    border-color .16s ease,
    color .16s ease,
    box-shadow .16s ease,
    transform .16s ease;
}

html[data-theme="light"] .dashboard-jump a:hover,
html[data-theme="light"] .dashboard-jump button:hover,
html[data-theme="light"] .section-tabs a:hover,
html[data-theme="light"] .section-tabs button:hover,
html[data-theme="light"] .tab-list a:hover,
html[data-theme="light"] .tab-list button:hover,
html[data-theme="light"] .settings-nav a:hover,
html[data-theme="light"] .settings-nav button:hover,
html[data-theme="light"] .module-nav a:hover,
html[data-theme="light"] .module-nav button:hover{
  background:#f3f5ff !important;
  border-color:#b8c1ff !important;
  color:#3843c7 !important;
  box-shadow:0 5px 14px rgba(88,101,242,.10) !important;
  transform:translateY(-1px);
}

html[data-theme="light"] .dashboard-jump a:focus-visible,
html[data-theme="light"] .dashboard-jump button:focus-visible,
html[data-theme="light"] .section-tabs a:focus-visible,
html[data-theme="light"] .section-tabs button:focus-visible,
html[data-theme="light"] .tab-list a:focus-visible,
html[data-theme="light"] .tab-list button:focus-visible,
html[data-theme="light"] .settings-nav a:focus-visible,
html[data-theme="light"] .settings-nav button:focus-visible,
html[data-theme="light"] .module-nav a:focus-visible,
html[data-theme="light"] .module-nav button:focus-visible{
  outline:0;
  border-color:#7c87f5 !important;
  box-shadow:0 0 0 3px rgba(88,101,242,.14) !important;
}

html[data-theme="light"] .dashboard-jump a:active,
html[data-theme="light"] .dashboard-jump button:active,
html[data-theme="light"] .section-tabs a:active,
html[data-theme="light"] .section-tabs button:active,
html[data-theme="light"] .tab-list a:active,
html[data-theme="light"] .tab-list button:active,
html[data-theme="light"] .settings-nav a:active,
html[data-theme="light"] .settings-nav button:active,
html[data-theme="light"] .module-nav a:active,
html[data-theme="light"] .module-nav button:active{
  background:#e9edff !important;
  border-color:#9ea9fb !important;
  color:#303bb8 !important;
  transform:none;
}

/* Legacy text-chip controls should not remain charcoal in light mode. */
html[data-theme="light"] .token-row span,
html[data-theme="light"] .command-subcommands span{
  background:#f2f4f7 !important;
  color:#475467 !important;
  border-color:#e4e7ec !important;
}

/* Generic non-primary native buttons inside dashboard panels. */
html[data-theme="light"] main button:not(.btn):not(.theme-toggle):not(.nav-toggle){
  background:#ffffff;
  color:#344054;
  border-color:#d6deea;
}

html[data-theme="light"] main button:not(.btn):not(.theme-toggle):not(.nav-toggle):hover{
  background:#f4f6f9;
  color:#172033;
  border-color:#c6cfdd;
}

@media(max-width:720px){
  html[data-theme="light"] .dashboard-jump{
    gap:7px;
    padding:8px;
  }

  html[data-theme="light"] .dashboard-jump a{
    min-height:38px;
    padding:8px 11px;
    font-size:12px;
  }
}


/* === Bot owner dashboard === */
.owner-dashboard-shell{
  display:grid;
  gap:18px;
}
.owner-dashboard-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:26px;
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(145deg,rgba(88,101,242,.16),rgba(18,20,27,.96) 48%);
  box-shadow:0 18px 44px rgba(0,0,0,.14);
}
.owner-dashboard-hero h1{
  margin:6px 0 8px;
  font-size:clamp(30px,5vw,46px);
  letter-spacing:-.035em;
}
.owner-dashboard-hero p{
  max-width:700px;
  margin:0;
  color:var(--muted);
}
.owner-access-badge{
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin-bottom:10px;
  padding:7px 10px;
  border:1px solid rgba(255,178,36,.28);
  border-radius:999px;
  background:rgba(255,178,36,.08);
  color:#ffc76a;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
}
.owner-access-badge i{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#ffb224;
  box-shadow:0 0 0 4px rgba(255,178,36,.10);
}
.owner-dashboard-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(130px,1fr));
  gap:9px;
  min-width:min(360px,100%);
}
.owner-dashboard-meta span{
  padding:13px 14px;
  border:1px solid var(--line);
  border-radius:13px;
  background:rgba(0,0,0,.12);
  color:var(--muted);
  font-size:10px;
  font-weight:700;
}
.owner-dashboard-meta strong{
  display:block;
  margin-bottom:3px;
  color:var(--text);
  font-size:20px;
}
.owner-section{
  padding:20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--panel);
  box-shadow:0 14px 34px rgba(0,0,0,.10);
}
.owner-section-heading{
  margin-bottom:14px;
}
.owner-section-heading h2{
  margin:3px 0 5px;
}
.owner-section-heading p{
  margin:0;
  color:var(--muted);
}
.site-nav a[href="/dashboard/owner"]{
  color:#ffc76a;
}
.site-nav a[href="/dashboard/owner"]:hover{
  background:rgba(255,178,36,.08);
  color:#ffd896;
}

html[data-theme="light"] .owner-dashboard-hero,
html[data-theme="light"] .owner-section{
  background:#ffffff !important;
  border-color:#dfe5ef !important;
  color:#172033 !important;
  box-shadow:0 14px 34px rgba(31,51,89,.08) !important;
}
html[data-theme="light"] .owner-dashboard-hero{
  background:
    radial-gradient(circle at top right,rgba(88,101,242,.10),transparent 38%),
    #ffffff !important;
}
html[data-theme="light"] .owner-dashboard-meta span{
  background:#f8fafc !important;
  border-color:#dfe5ef !important;
  color:#667085 !important;
}
html[data-theme="light"] .owner-dashboard-meta strong{
  color:#172033 !important;
}
html[data-theme="light"] .owner-access-badge{
  background:#fff8eb !important;
  border-color:#fedf89 !important;
  color:#b54708 !important;
}
html[data-theme="light"] .site-nav a[href="/dashboard/owner"]{
  color:#b54708 !important;
}
html[data-theme="light"] .site-nav a[href="/dashboard/owner"]:hover{
  background:#fff8eb !important;
  color:#93370d !important;
}

@media(max-width:760px){
  .owner-dashboard-hero{
    flex-direction:column;
    padding:20px;
  }
  .owner-dashboard-meta{
    width:100%;
    min-width:0;
  }
}


/* === Kryndexa navigation avatar === */
.brand{
  display:inline-flex;
  align-items:center;
  gap:9px;
}
.brand-avatar{
  width:30px;
  height:30px;
  flex:0 0 30px;
  display:block;
  object-fit:cover;
  border-radius:50%;
  border:1px solid rgba(88,101,242,.28);
  background:rgba(88,101,242,.10);
  box-shadow:0 5px 14px rgba(0,0,0,.12);
}
.brand>span{
  display:block;
  min-width:0;
}

/* Keep every Your Servers stat glyph optically centered inside its bubble. */
.dashboard-server-summary .summary-icon{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:0 !important;
  line-height:0 !important;
  text-align:center;
}
.dashboard-server-summary .summary-icon svg{
  position:static !important;
  display:block !important;
  flex:0 0 auto;
  margin:0 !important;
  inset:auto !important;
  vertical-align:middle;
  transform:none !important;
  overflow:visible;
}


/* === Polished light-mode legal pages === */
html[data-theme="light"] .privacy-page{
  color:#172033;
}

html[data-theme="light"] .privacy-hero{
  position:relative;
  padding:24px 0 34px;
}

html[data-theme="light"] .privacy-hero>a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#5865f2;
  font-weight:750;
  text-decoration:none;
  transition:color .16s ease, transform .16s ease;
}

html[data-theme="light"] .privacy-hero>a:hover{
  color:#3f4bd8;
  transform:translateX(-2px);
}

html[data-theme="light"] .privacy-hero .eyebrow{
  color:#5865f2;
}

html[data-theme="light"] .privacy-hero h1{
  color:#172033;
  text-shadow:0 1px 0 rgba(255,255,255,.75);
}

html[data-theme="light"] .privacy-hero p{
  color:#63708a;
}

html[data-theme="light"] .privacy-updated{
  border:1px solid #d6dcfb;
  background:linear-gradient(180deg,#f4f6ff,#eef1ff);
  color:#4b56c9;
  box-shadow:0 5px 14px rgba(88,101,242,.08);
}

html[data-theme="light"] .privacy-summary,
html[data-theme="light"] .privacy-content,
html[data-theme="light"] .legal-crosslink{
  background:#ffffff !important;
  border:1px solid #dde4f0 !important;
  box-shadow:0 18px 44px rgba(37,51,84,.08) !important;
}

html[data-theme="light"] .privacy-summary{
  padding:24px;
  border-radius:20px;
}

html[data-theme="light"] .privacy-summary>strong{
  color:#172033;
  font-size:20px;
  letter-spacing:-.015em;
}

html[data-theme="light"] .privacy-summary-grid{
  gap:11px;
}

html[data-theme="light"] .privacy-summary-grid span{
  position:relative;
  display:flex;
  align-items:center;
  min-height:58px;
  padding:15px 16px 15px 20px;
  overflow:hidden;
  border:1px solid #dce3ff;
  border-radius:14px;
  background:
    linear-gradient(180deg,#ffffff 0%,#f7f9ff 100%);
  color:#26324a;
  font-weight:650;
  line-height:1.35;
  box-shadow:
    0 7px 18px rgba(38,50,74,.055),
    inset 0 1px 0 rgba(255,255,255,.95);
  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease,
    background .16s ease;
}

html[data-theme="light"] .privacy-summary-grid span::before{
  content:"";
  position:absolute;
  left:0;
  top:10px;
  bottom:10px;
  width:4px;
  border-radius:0 999px 999px 0;
  background:linear-gradient(180deg,#5865f2,#8f98ff);
}

html[data-theme="light"] .privacy-summary-grid span:hover{
  transform:translateY(-2px);
  border-color:#c7cffb;
  background:linear-gradient(180deg,#ffffff 0%,#f2f5ff 100%);
  box-shadow:
    0 12px 26px rgba(52,67,120,.09),
    inset 0 1px 0 rgba(255,255,255,1);
}

html[data-theme="light"] .privacy-content{
  padding:30px 32px;
  border-radius:20px;
}

html[data-theme="light"] .privacy-section{
  border-bottom:1px solid #e5eaf2;
}

html[data-theme="light"] .privacy-section h2{
  color:#172033;
  letter-spacing:-.015em;
}

html[data-theme="light"] .privacy-section h3,
html[data-theme="light"] .privacy-section strong{
  color:#25304a;
}

html[data-theme="light"] .privacy-section p,
html[data-theme="light"] .privacy-section li{
  color:#5d687c;
}

html[data-theme="light"] .privacy-section a{
  color:#5260e6;
  text-decoration-color:rgba(82,96,230,.28);
  text-underline-offset:3px;
}

html[data-theme="light"] .privacy-section a:hover{
  color:#3744ca;
  text-decoration-color:currentColor;
}

html[data-theme="light"] .privacy-section code{
  background:#f3f5fb;
  color:#4653ca;
  border:1px solid #dfe4f4;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}

html[data-theme="light"] .privacy-section blockquote{
  margin:14px 0;
  padding:13px 16px;
  border-left:4px solid #7581f4;
  border-radius:0 12px 12px 0;
  background:#f7f8ff;
  color:#566179;
}

html[data-theme="light"] .privacy-section hr{
  border:0;
  border-top:1px solid #e5eaf2;
}

html[data-theme="light"] .legal-crosslink{
  margin-top:18px;
  padding:20px 22px;
  border-radius:18px;
}

html[data-theme="light"] .legal-crosslink strong{
  color:#172033;
  font-size:18px;
}

html[data-theme="light"] .legal-crosslink p{
  color:#68748a;
}

html[data-theme="light"] .legal-crosslink .btn.secondary{
  border-color:#d8defa;
  background:#f4f6ff;
  color:#4d59d4;
  box-shadow:0 6px 15px rgba(88,101,242,.07);
}

html[data-theme="light"] .legal-crosslink .btn.secondary:hover{
  border-color:#c4cdf8;
  background:#ecefff;
  color:#3945c6;
}

html[data-theme="light"] .cookie-notice{
  border-color:#dde4f0;
  background:rgba(255,255,255,.96);
  box-shadow:0 20px 55px rgba(31,44,74,.16);
  color:#172033;
}

html[data-theme="light"] .cookie-copy p{
  color:#68748a;
}

@media(max-width:720px){
  html[data-theme="light"] .privacy-summary{
    padding:18px;
  }

  html[data-theme="light"] .privacy-content{
    padding:22px 19px;
  }

  html[data-theme="light"] .privacy-summary-grid span{
    min-height:54px;
    padding:14px 15px 14px 19px;
  }

  html[data-theme="light"] .legal-crosslink{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* === Multi-provider Stream Alerts + owner broadcast === */
.stream-alert-panel{
  border-color:#34405a;
  background:linear-gradient(180deg,#1d2230 0%,#1b1e25 34%);
}
.stream-alert-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}
.stream-alert-hero h2{margin:4px 0 6px}
.stream-alert-hero p{margin:0;color:var(--muted);max-width:760px}
.stream-provider-badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.provider-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 9px;
  border-radius:999px;
  font-size:10px;
  line-height:1;
  font-weight:900;
  letter-spacing:.03em;
  border:1px solid transparent;
}
.provider-chip.twitch{background:#2b1b3d;color:#d8c2ff;border-color:#6843a1}
.provider-chip.youtube{background:#3a1719;color:#ffb4b4;border-color:#7b3035}
.provider-chip.kick{background:#15311b;color:#9cffad;border-color:#31683b}
.stream-plan-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:0 0 16px;
}
.stream-plan-summary>div{
  padding:12px;
  border:1px solid #343b49;
  border-radius:12px;
  background:#141820;
}
.stream-plan-summary strong{display:block;font-size:18px;color:#eef1f6}
.stream-config-form{
  padding:18px;
  margin-bottom:18px;
  border:1px solid #3a4354;
  border-radius:15px;
  background:#141820;
}
.stream-config-form small{display:block;margin-top:5px;color:var(--muted);font-size:11px}
.stream-form-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.stream-form-footer>span{color:var(--muted);font-size:12px}
.stream-card{
  background:#171a21;
  border:1px solid #313744;
  border-radius:14px;
  padding:16px;
  box-shadow:0 10px 30px #00000018;
}
.stream-card.is-live{border-color:#ef4444;box-shadow:0 0 0 1px #ef444420,0 12px 34px #ef444410}
.stream-card.provider-twitch{border-top:2px solid #9146ff}
.stream-card.provider-youtube{border-top:2px solid #ff0033}
.stream-card.provider-kick{border-top:2px solid #53fc18}
.stream-avatar{
  width:42px;
  height:42px;
  border-radius:11px;
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:900;
  font-size:15px;
}
.stream-avatar.twitch{background:#9146ff}
.stream-avatar.youtube{background:#ff0033}
.stream-avatar.kick{background:#2dbd19;color:#08140a}
.stream-embed-section{margin-top:24px;padding-top:22px;border-top:1px solid #343b49}
.stream-embed-grid{display:grid;gap:16px}
.stream-embed-editor{
  padding:17px;
  border:1px solid #343b49;
  border-radius:15px;
  background:#141820;
}
.stream-embed-editor-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:15px;
}
.stream-embed-editor-head h3{margin:3px 0 0}
.embed-editor-layout{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);
  gap:18px;
  align-items:start;
}
.embed-editor-controls{display:grid;gap:12px}
.embed-editor-controls label{font-weight:700}
.embed-editor-controls input,
.embed-editor-controls textarea,
.embed-editor-controls select{
  width:100%;
  margin-top:6px;
}
.embed-fields-editor{display:grid;gap:8px}
.embed-field-row{
  display:grid;
  grid-template-columns:minmax(0,.8fr) minmax(0,1.3fr) auto;
  gap:8px;
  align-items:center;
}
.embed-field-row label{
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
  font-size:12px;
}
.embed-field-row label input{width:auto;margin:0}
.embed-preview-card{
  position:sticky;
  top:150px;
  overflow:hidden;
  border:1px solid #303744;
  border-left:5px solid var(--embed-color,#5865f2);
  border-radius:12px;
  background:#20242c;
  box-shadow:0 12px 32px #00000022;
}
.embed-preview-body{padding:16px}
.embed-preview-body>strong{display:block;color:#fff;font-size:16px;margin:4px 0 9px}
.embed-preview-body>p{margin:0 0 12px;color:#d3d8e0;white-space:pre-wrap;overflow-wrap:anywhere}
.embed-preview-body>small{display:block;margin-top:12px;color:#9da6b5}
.embed-preview-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.embed-preview-field{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:8px;
  border-radius:8px;
  background:#191d24;
}
.embed-preview-field.inline{min-width:0}
.embed-preview-field strong{font-size:11px;color:#eef1f6}
.embed-preview-field span{font-size:11px;color:#b7bfcc;overflow-wrap:anywhere}
.owner-broadcast-editor,
.paid-access-form{
  padding:18px;
  border:1px solid var(--line);
  border-radius:15px;
  background:rgba(0,0,0,.10);
}
.owner-broadcast-checks{grid-template-columns:repeat(2,minmax(0,1fr));margin:0}
.owner-broadcast-preview{top:110px}
.owner-broadcast-result{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#11151d;
  color:#dce3ef;
}
.paid-access-form{
  display:grid;
  grid-template-columns:minmax(220px,1.3fr) minmax(180px,.7fr) minmax(220px,1.2fr) auto;
  gap:12px;
  align-items:end;
  margin-bottom:14px;
}
.paid-access-form label{font-weight:700}
.paid-access-form select,
.paid-access-form input{width:100%;margin-top:6px}
.paid-access-list{display:grid;gap:8px}
.paid-access-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(0,0,0,.08);
}
.paid-access-card>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.paid-access-card strong{color:var(--text)}
.paid-access-card span,.paid-access-card small{color:var(--muted);font-size:11px}

html[data-theme="light"] .stream-alert-panel,
html[data-theme="light"] .stream-config-form,
html[data-theme="light"] .stream-embed-editor,
html[data-theme="light"] .stream-plan-summary>div,
html[data-theme="light"] .stream-card,
html[data-theme="light"] .owner-broadcast-editor,
html[data-theme="light"] .paid-access-form,
html[data-theme="light"] .paid-access-card{
  background:#fff !important;
  border-color:#dfe5ef !important;
  color:#172033 !important;
  box-shadow:0 10px 28px rgba(31,51,89,.06);
}
html[data-theme="light"] .embed-preview-card{
  background:#f8fafc;
  border-color:#dfe5ef;
  color:#172033;
}
html[data-theme="light"] .embed-preview-body>strong{color:#172033}
html[data-theme="light"] .embed-preview-body>p{color:#536079}
html[data-theme="light"] .embed-preview-body>small{color:#758198}
html[data-theme="light"] .embed-preview-field{background:#eef2f7}
html[data-theme="light"] .embed-preview-field strong{color:#27324a}
html[data-theme="light"] .embed-preview-field span{color:#5f6b80}
html[data-theme="light"] .stream-plan-summary strong{color:#172033}
html[data-theme="light"] .owner-broadcast-result{background:#f8fafc;color:#334155;border-color:#dfe5ef}

@media(max-width:900px){
  .embed-editor-layout{grid-template-columns:1fr}
  .embed-preview-card{position:static}
  .stream-plan-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .paid-access-form{grid-template-columns:1fr 1fr}
}
@media(max-width:620px){
  .stream-alert-hero,.stream-form-footer,.paid-access-card{align-items:stretch;flex-direction:column}
  .stream-provider-badges{justify-content:flex-start}
  .stream-plan-summary,.paid-access-form,.owner-broadcast-checks{grid-template-columns:1fr}
  .embed-field-row{grid-template-columns:1fr}
}


/* Clickable broadcast embed-title preview */
.embed-preview-title-link{
  display:block;
  margin:4px 0 9px;
  color:#fff;
  font-size:16px;
  font-weight:800;
  line-height:1.3;
  text-decoration:none;
  overflow-wrap:anywhere;
  cursor:default;
}
.embed-preview-title-link.has-link{
  color:#7c8cff;
  text-decoration:underline;
  text-decoration-color:rgba(124,140,255,.45);
  text-underline-offset:2px;
  cursor:pointer;
}
.embed-preview-title-link.has-link:hover{
  color:#a8b2ff;
}
html[data-theme="light"] .embed-preview-title-link{
  color:#172033;
}
html[data-theme="light"] .embed-preview-title-link.has-link{
  color:#4f5ddd;
}
html[data-theme="light"] .embed-preview-title-link.has-link:hover{
  color:#3544c7;
}


/* === Cookie panel + fixed paragraph fields === */
.cookie-notice{
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:17px 18px;
  border-radius:16px;
}
.cookie-notice.is-visible{
  display:flex;
  animation:cookieNoticeIn .18s ease-out;
}
.cookie-notice.is-hidden{
  display:none !important;
}
.cookie-copy{
  min-width:0;
  flex:1;
}
.cookie-copy strong{
  display:block;
  font-size:15px;
  line-height:1.25;
}
.cookie-copy p{
  max-width:610px;
  margin:5px 0 0;
  line-height:1.5;
}
.cookie-actions{
  align-items:center;
}
.cookie-actions .btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}
@keyframes cookieNoticeIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

/* Text/paragraph inputs keep a clean, fixed layout and cannot be dragged. */
textarea{
  box-sizing:border-box;
  resize:none !important;
  line-height:1.5;
  overflow-y:auto;
  scrollbar-gutter:stable;
}
.ticket-module-fields textarea{
  height:112px;
  min-height:112px;
  max-height:112px;
}
.stream-config-form textarea{
  height:100px;
  min-height:100px;
  max-height:100px;
}
.stream-embed-editor textarea{
  height:128px;
  min-height:128px;
  max-height:128px;
}
.owner-broadcast-editor textarea{
  height:190px;
  min-height:190px;
  max-height:190px;
}
.embed-editor-controls textarea{
  border-radius:10px;
}
html[data-theme="light"] textarea{
  box-shadow:inset 0 1px 2px rgba(31,51,89,.035);
}

@media(max-width:720px){
  .cookie-notice.is-visible{
    display:flex;
    align-items:stretch;
  }
  .cookie-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .cookie-actions>a{
    grid-column:1/-1;
  }
  .owner-broadcast-editor textarea{
    height:160px;
    min-height:160px;
    max-height:160px;
  }
}


/* === Unified Stream Alerts panel === */
.stream-alert-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}
.stream-alert-heading h2{margin:4px 0 6px}
.stream-alert-heading p{margin:0;max-width:780px;color:var(--muted)}
.stream-access-pill{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  padding:8px 11px;
  border:1px solid #3b4659;
  border-radius:999px;
  background:#141820;
  color:#dfe6f2;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
.unified-stream-form{margin-bottom:16px}
.stream-message-field{grid-column:1/-1}
.stream-unified-block{
  padding-top:18px;
  margin-top:18px;
  border-top:1px solid #343b49;
}
.stream-subheading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.stream-subheading h3{margin:3px 0 0}
.stream-subheading p{margin:5px 0 0;color:var(--muted)}
.stream-list{
  display:grid;
  gap:8px;
}
.stream-list-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 13px;
  border:1px solid #313744;
  border-radius:12px;
  background:#171a21;
}
.stream-list-row.provider-twitch{border-left:3px solid #9146ff}
.stream-list-row.provider-youtube{border-left:3px solid #ff0033}
.stream-list-row.provider-kick{border-left:3px solid #53fc18}
.stream-list-main{
  min-width:0;
  display:flex;
  align-items:center;
  gap:11px;
}
.stream-list-title{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}
.stream-list-title>a{
  color:#eef1f6;
  font-weight:850;
  text-decoration:none;
}
.stream-list-title>a:hover{text-decoration:underline}
.stream-list-meta{
  display:flex;
  gap:13px;
  flex-wrap:wrap;
  margin-top:5px;
  color:var(--muted);
  font-size:11px;
}
.stream-list-meta strong{color:#cfd6e2}
.stream-single-editor>.stream-provider-editor[hidden]{display:none !important}
.stream-single-editor .stream-embed-editor{
  margin:0;
}
.stream-single-editor .stream-embed-editor-head{
  display:none;
}

html[data-theme="light"] .stream-access-pill,
html[data-theme="light"] .stream-list-row{
  background:#fff;
  border-color:#dfe5ef;
  color:#172033;
}
html[data-theme="light"] .stream-list-title>a{color:#172033}
html[data-theme="light"] .stream-list-meta strong{color:#3b475d}

@media(max-width:720px){
  .stream-alert-heading,
  .stream-list-row{
    align-items:stretch;
    flex-direction:column;
  }
  .stream-access-pill{
    align-self:flex-start;
  }
}


/* === Discord login + reliable theme control === */
.discord-login-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:#5865f2;
  color:#fff !important;
  border-color:#5865f2;
  box-shadow:0 7px 18px rgba(88,101,242,.18);
}
.discord-login-button:hover{
  background:#4752c4;
  border-color:#4752c4;
  color:#fff !important;
  transform:translateY(-1px);
}
.discord-login-mark{
  display:grid;
  place-items:center;
  width:19px;
  height:19px;
  flex:0 0 19px;
  border-radius:6px;
  background:rgba(255,255,255,.16);
  font-size:11px;
  line-height:1;
}
.login-consent-shell{
  min-height:calc(100vh - 230px);
  display:grid;
  place-items:center;
  padding:48px 0;
}
.login-consent-card{
  width:min(100%,620px);
  padding:34px;
  text-align:center;
}
.discord-login-logo{
  width:58px;
  height:58px;
  margin:0 auto 15px;
  display:grid;
  place-items:center;
  border-radius:18px;
  background:#5865f2;
  color:#fff;
  font-size:25px;
  box-shadow:0 14px 30px rgba(88,101,242,.22);
}
.login-consent-card h1{
  margin:7px 0 10px;
}
.login-consent-card>p{
  max-width:520px;
  margin:0 auto;
  color:var(--muted);
  line-height:1.65;
}
.login-consent-points{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin:22px 0;
}
.login-consent-points span{
  padding:10px 9px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel2);
  color:var(--muted);
  font-size:11px;
  font-weight:750;
}
.login-consent-submit{
  width:100%;
  min-height:46px;
}
.login-consent-links{
  display:flex;
  justify-content:center;
  gap:16px;
  margin-top:16px;
  font-size:12px;
}

/* Explicit theme switch with readable label instead of an icon-only control. */
.theme-toggle{
  width:auto !important;
  min-width:112px;
  height:42px;
  padding:0 11px !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:7px;
  white-space:nowrap;
}
.theme-toggle-icon{
  width:18px;
  flex:0 0 18px;
  font-size:15px;
  line-height:1;
}
.theme-toggle-label{
  font-size:11px;
  font-weight:800;
}

/* Final light-mode normalization for dashboard surfaces added after older rules. */
html[data-theme="light"] main{
  color:#1b2559;
}
html[data-theme="light"] .dashboard-control-shell,
html[data-theme="light"] .owner-dashboard-shell,
html[data-theme="light"] .privacy-page{
  color:#1b2559;
}
html[data-theme="light"] .dashboard-home-hero,
html[data-theme="light"] .owner-dashboard-hero,
html[data-theme="light"] .owner-section,
html[data-theme="light"] .command-panel,
html[data-theme="light"] .stream-alert-panel,
html[data-theme="light"] .stream-config-form,
html[data-theme="light"] .stream-embed-editor,
html[data-theme="light"] .stream-list-row,
html[data-theme="light"] .settings-group,
html[data-theme="light"] .settings-toggle-section,
html[data-theme="light"] .automation-rule-card,
html[data-theme="light"] .ticket-module-card,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .command-card,
html[data-theme="light"] .paid-access-form,
html[data-theme="light"] .paid-access-card{
  background:#fff !important;
  border-color:#dfe5ef !important;
  color:#1b2559 !important;
}
html[data-theme="light"] .dashboard-home-hero,
html[data-theme="light"] .owner-dashboard-hero{
  background:
    radial-gradient(circle at top right,rgba(88,101,242,.10),transparent 38%),
    #fff !important;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{
  background:#fff !important;
  color:#1b2559 !important;
  border-color:#d7deea !important;
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
  color:#8a95a8;
}
html[data-theme="light"] .stream-access-pill,
html[data-theme="light"] .dashboard-online-pill,
html[data-theme="light"] .pill.subtle{
  background:#f3f5fb !important;
  border-color:#dfe5ef !important;
  color:#536079 !important;
}
html[data-theme="light"] .mini-label,
html[data-theme="light"] .command-meta,
html[data-theme="light"] .stream-list-meta,
html[data-theme="light"] .owner-section p{
  color:#707eae;
}
html[data-theme="light"] .site-nav.open{
  background:#fff;
  border-color:#dfe5ef;
}
html[data-theme="light"] .theme-toggle{
  background:#fff;
  color:#29344a;
  border-color:#d8e0ea;
  box-shadow:0 4px 12px rgba(31,51,89,.06);
}
html[data-theme="dark"] .theme-toggle{
  background:#242832;
  color:#f5f7fb;
  border-color:#303644;
}

@media(max-width:1080px){
  .theme-toggle{
    min-width:42px;
  }
  .theme-toggle-label{
    display:none;
  }
}
@media(max-width:620px){
  .login-consent-card{padding:25px 18px}
  .login-consent-points{grid-template-columns:1fr}
}


/* Primary navigation dropdown groups */
.nav-dropdown{
  position:relative;
  flex:0 0 auto;
}
.nav-dropdown>summary{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:38px;
  padding:8px 10px;
  border-radius:9px;
  color:var(--muted);
  font-size:13px;
  font-weight:750;
  white-space:nowrap;
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.nav-dropdown>summary::-webkit-details-marker{display:none}
.nav-dropdown>summary:hover,
.nav-dropdown[open]>summary{
  background:var(--panel2);
  color:var(--text);
}
.nav-dropdown-chevron{
  font-size:10px;
  transition:transform .16s ease;
}
.nav-dropdown[open] .nav-dropdown-chevron{transform:rotate(180deg)}
.nav-dropdown-menu{
  position:absolute;
  z-index:100;
  top:calc(100% + 8px);
  left:0;
  min-width:190px;
  padding:7px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
  box-shadow:0 16px 40px rgba(0,0,0,.24);
}
.nav-dropdown-menu a{
  display:flex;
  width:100%;
  min-height:38px;
  padding:9px 10px;
}
@media(max-width:900px){
  .site-nav.open .nav-dropdown{width:100%}
  .site-nav.open .nav-dropdown>summary{
    display:flex;
    width:100%;
    justify-content:space-between;
  }
  .site-nav.open .nav-dropdown-menu{
    position:static;
    min-width:0;
    margin:4px 0 6px;
    box-shadow:none;
    background:var(--panel2);
  }
  .site-nav.open .nav-dropdown-menu a{padding-left:18px}
}


/* === Compact bot invite + account dropdown theme controls === */
.add-bot-button.compact{
  min-height:34px;
  padding:6px 9px;
  border-radius:9px;
  font-size:11px;
  line-height:1;
  white-space:nowrap;
}
.account-dropdown{
  position:relative;
}
.account-dropdown>summary{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel2);
  color:var(--text);
  cursor:pointer;
  list-style:none;
  font-size:12px;
  font-weight:800;
  user-select:none;
}
.account-dropdown>summary::-webkit-details-marker{display:none}
.account-dropdown[open]>summary,
.account-dropdown>summary:hover{
  border-color:#5865f2;
}
.account-dropdown[open] .nav-dropdown-chevron{transform:rotate(180deg)}
.account-dropdown-menu{
  position:absolute;
  z-index:120;
  top:calc(100% + 8px);
  right:0;
  min-width:190px;
  padding:7px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
  box-shadow:0 16px 40px rgba(0,0,0,.24);
}
.account-menu-item{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  padding:9px 10px !important;
  border:0;
  border-radius:8px;
  background:transparent !important;
  color:var(--text) !important;
  box-shadow:none !important;
  font:inherit;
  font-size:12px;
  font-weight:750;
  text-decoration:none;
  cursor:pointer;
}
.account-menu-item:hover{
  background:var(--panel2) !important;
  transform:none;
}
.account-menu-item.theme-toggle{
  min-width:0;
  height:auto;
}
.account-menu-item .theme-toggle-label{
  display:inline !important;
}
.account-logout{
  color:#f87171 !important;
}
html[data-theme="light"] .account-dropdown>summary,
html[data-theme="light"] .account-dropdown-menu{
  background:#fff;
  border-color:#dfe5ef;
  color:#1b2559;
}
html[data-theme="light"] .account-menu-item{
  color:#1b2559 !important;
}
html[data-theme="light"] .account-menu-item:hover{
  background:#f3f5fb !important;
}
html[data-theme="light"] .account-logout{
  color:#dc2626 !important;
}
@media(max-width:900px){
  .add-bot-button.compact{
    padding:6px 8px;
    font-size:10px;
  }
}
@media(max-width:620px){
  .account-name{
    max-width:110px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .account-dropdown-menu{
    right:0;
    min-width:175px;
  }
}


/* === Neater columnized public Features page === */
.features-page{
  width:min(1180px,100%);
  margin:0 auto;
}
.features-hero{
  padding:38px 0 28px;
}
.features-hero h1{
  max-width:780px;
  margin:8px 0 12px;
  font-size:clamp(34px,5vw,54px);
  line-height:1.04;
  letter-spacing:-.035em;
}
.features-hero>p{
  max-width:760px;
  margin:0;
  color:var(--muted);
  font-size:16px;
  line-height:1.65;
}
.features-hero .actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:20px;
}
.public-feature-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:0 0 28px;
}
.public-feature-summary>div{
  min-width:0;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
}
.public-feature-summary strong{
  display:block;
  margin-bottom:4px;
  color:var(--text);
  font-size:22px;
  line-height:1;
}
.public-feature-summary span{
  color:var(--muted);
  font-size:11px;
  font-weight:750;
}
.public-feature-categories{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  align-items:start;
}
.public-feature-section{
  min-width:0;
  padding:18px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--panel);
}
.public-feature-section .category-heading{
  margin:0 0 14px;
  padding-bottom:11px;
  border-bottom:1px solid var(--line);
}
.public-feature-section .category-heading h2{
  margin:0;
  color:var(--text);
  font-size:18px;
}
.public-feature-section .category-heading span{
  padding:4px 7px;
  border-radius:999px;
  background:var(--panel2);
  font-size:10px;
  font-weight:800;
}
.public-feature-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.public-feature-card{
  min-width:0;
  display:flex;
  flex-direction:column;
  min-height:190px;
  padding:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel2);
  transition:border-color .15s ease,transform .15s ease;
}
.public-feature-card:hover{
  border-color:#5865f2;
  transform:translateY(-1px);
}
.public-feature-top{
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.public-feature-top .feature-icon{
  flex:0 0 36px;
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--panel);
  font-size:17px;
}
.public-feature-top>div:last-child{
  min-width:0;
}
.public-feature-card h3{
  margin:3px 0 0;
  color:var(--text);
  font-size:14px;
  line-height:1.25;
}
.public-feature-card>p{
  margin:11px 0 14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}
.public-feature-meta{
  display:grid;
  gap:5px;
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid var(--line);
}
.public-feature-meta span{
  color:var(--text);
  font-size:10px;
  font-weight:800;
}
.public-feature-meta small{
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}
html[data-theme="light"] .public-feature-summary>div,
html[data-theme="light"] .public-feature-section,
html[data-theme="light"] .public-feature-top .feature-icon{
  background:#fff;
  border-color:#dfe5ef;
}
html[data-theme="light"] .public-feature-card,
html[data-theme="light"] .public-feature-section .category-heading span{
  background:#f7f9fc;
  border-color:#dfe5ef;
}
@media(max-width:1050px){
  .public-feature-categories{grid-template-columns:1fr}
  .public-feature-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:820px){
  .public-feature-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .public-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  .features-hero{padding-top:24px}
  .public-feature-summary,
  .public-feature-grid{grid-template-columns:1fr}
  .public-feature-section{padding:14px}
  .public-feature-card{min-height:0}
}


/* Discord brand mark inside OAuth login buttons */
.discord-login-icon{
  display:block;
  width:16px;
  height:13px;
  color:#fff;
}
.discord-login-mark{
  background:transparent;
  border-radius:0;
}


/* === Complete dashboard light mode === */
html[data-theme="light"] body{
  background:#f4f7fb;
  color:#172033;
}
html[data-theme="light"] .site-header{
  background:rgba(255,255,255,.94);
  border-color:#dfe5ef;
}
html[data-theme="light"] .panel,
html[data-theme="light"] .dashboard-server-section,
html[data-theme="light"] .settings-panel,
html[data-theme="light"] .ticket-config-panel,
html[data-theme="light"] .ticket-panel-publisher,
html[data-theme="light"] .ticket-system-panel,
html[data-theme="light"] .command-center-panel,
html[data-theme="light"] .automation-builder,
html[data-theme="light"] .automation-form,
html[data-theme="light"] .guild-card{
  background:#fff !important;
  border-color:#dfe5ef !important;
  color:#172033 !important;
  box-shadow:0 10px 28px rgba(31,51,89,.055);
}
html[data-theme="light"] .dashboard-home-stats>div,
html[data-theme="light"] .dashboard-server-summary>div,
html[data-theme="light"] .ticket-stat-grid>div,
html[data-theme="light"] .guild-mini-stats>div{
  background:#f7f9fc !important;
  border-color:#e0e6ef !important;
  color:#172033 !important;
}
html[data-theme="light"] .dashboard-toolbar,
html[data-theme="light"] .settings-footer,
html[data-theme="light"] .ticket-module-footer,
html[data-theme="light"] .dashboard-server-section-head,
html[data-theme="light"] .settings-group-heading{
  border-color:#e0e6ef !important;
}
html[data-theme="light"] .settings-nav,
html[data-theme="light"] .dashboard-jump{
  background:#fff !important;
  border-color:#dfe5ef !important;
  box-shadow:0 8px 24px rgba(31,51,89,.06);
}
html[data-theme="light"] .settings-nav a,
html[data-theme="light"] .dashboard-jump a{
  color:#59667c !important;
}
html[data-theme="light"] .settings-nav a:hover,
html[data-theme="light"] .dashboard-jump a:hover{
  background:#f0f3ff !important;
  color:#3544c7 !important;
}
html[data-theme="light"] .ticket-module-icon,
html[data-theme="light"] .guild-icon,
html[data-theme="light"] .command-card code,
html[data-theme="light"] .command-subcommands span{
  background:#f0f3f8 !important;
  border-color:#dce3ed !important;
  color:#4452c7 !important;
}
html[data-theme="light"] .table-wrap{
  border-color:#dfe5ef !important;
  background:#fff !important;
}
html[data-theme="light"] table{
  color:#263248;
}
html[data-theme="light"] th{
  background:#f3f6fa !important;
  color:#536079 !important;
  border-color:#dfe5ef !important;
}
html[data-theme="light"] td{
  background:#fff !important;
  color:#263248 !important;
  border-color:#e6ebf2 !important;
}
html[data-theme="light"] tr:hover td{
  background:#f8faff !important;
}
html[data-theme="light"] .btn.secondary{
  background:#f5f7fb;
  border-color:#d8e0ea;
  color:#334155;
}
html[data-theme="light"] .btn.secondary:hover{
  background:#edf1f7;
  border-color:#cbd5e1;
  color:#172033;
}
html[data-theme="light"] .command-total,
html[data-theme="light"] .guild-status,
html[data-theme="light"] .dashboard-home-badge{
  background:#eef1ff !important;
  border-color:#d9defd !important;
  color:#4b58d0 !important;
}
html[data-theme="light"] .toggle,
html[data-theme="light"] .switch{
  border-color:#d5dce7;
}
html[data-theme="light"] .mini-label,
html[data-theme="light"] .dashboard-toolbar-hint,
html[data-theme="light"] .dashboard-hero-copy p,
html[data-theme="light"] .dashboard-server-section p,
html[data-theme="light"] .settings-group p,
html[data-theme="light"] .ticket-module-card p,
html[data-theme="light"] .command-card p,
html[data-theme="light"] .automation-rule-detail,
html[data-theme="light"] .guild-card-copy p{
  color:#68758b !important;
}
html[data-theme="light"] .dashboard-home-hero,
html[data-theme="light"] .owner-dashboard-hero{
  background:
    radial-gradient(circle at top right,rgba(88,101,242,.10),transparent 38%),
    linear-gradient(180deg,#fff,#fafbff) !important;
  border-color:#dfe5ef !important;
}
html[data-theme="light"] .stream-alert-panel,
html[data-theme="light"] .command-panel{
  background:#fff !important;
}
html[data-theme="light"] footer{
  border-color:#dfe5ef;
  background:#fff;
  color:#68758b;
}
