:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f4f0ed;
  background: #171313;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #a79c98;
  --accent: #d9a06b;
  --line: rgba(255, 255, 255, .09);
  --surface: rgba(32, 27, 26, .88);
}
* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(ellipse at 13% 14%, rgba(137, 73, 58, .18), transparent 35rem),
    radial-gradient(ellipse at 90% 70%, rgba(111, 75, 119, .12), transparent 32rem), #171313;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
.topbar { min-height: 75px; padding: 0 clamp(20px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #f5efec; font-size: 13px; font-weight: 850; letter-spacing: .14em; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(217,160,107,.55); border-radius: 11px; color: var(--accent); font-size: 20px; letter-spacing: -.08em; }
.brand .accent { color: var(--accent); }
.brand small { display: block; margin-top: 3px; color: #827874; font-size: 8px; letter-spacing: .2em; }
.secure-label { display: flex; align-items: center; gap: 8px; color: #928783; font-size: 9px; font-weight: 750; letter-spacing: .15em; }
.live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #83c89b; box-shadow: 0 0 0 4px rgba(131,200,155,.11); }
main { width: min(100% - 40px, 1160px); min-height: calc(100vh - 130px); margin: auto; padding: clamp(45px, 7vh, 78px) 0 65px; }
.login-panel { width: min(100%, 610px); margin: 0 auto; padding: clamp(28px, 6vw, 58px); border: 1px solid var(--line); border-radius: 25px; background: linear-gradient(145deg, rgba(39,32,30,.95), rgba(25,21,21,.95)); box-shadow: 0 30px 100px rgba(0,0,0,.25); animation: rise-in .6s ease both; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .2em; }
h1 { margin: 0; font-size: clamp(38px, 6.2vw, 61px); font-weight: 730; letter-spacing: -.065em; line-height: 1.02; }
h1 span { color: var(--accent); }
.intro { max-width: 650px; margin: 15px 0 27px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.fine-print { color: #8d8380; font-size: 10px; line-height: 1.6; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin-bottom: 22px; animation: rise-in .5s ease both; }
.heading h1 { font-size: clamp(35px, 5vw, 48px); }
.heading .intro { margin-bottom: 0; }
.heading-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.guild-picker { display: grid; gap: 5px; color: #9e928d; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.guild-picker select { min-width: 190px; }
.primary-button, .secondary-button, .icon-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 730; text-decoration: none; transition: transform .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease; }
.primary-button { color: #201612; background: var(--accent); }
.primary-button:hover { transform: translateY(-2px); background: #e7b27e; }
.primary-button:disabled { cursor: wait; opacity: .55; transform: none; }
.secondary-button, .icon-button { color: #e7deda; border-color: var(--line); background: rgba(255,255,255,.035); }
.secondary-button:hover, .icon-button:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
.icon-button { min-width: 40px; padding: 0; font-size: 20px; }
.status { min-height: 17px; margin: 3px 0 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.status.is-error { color: #ff9a91; }
.status.is-success { color: #91d8a8; }
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 17px 0; }
.status-card { min-height: 126px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); animation: rise-in .5s ease both; }
.status-card:nth-child(2) { animation-delay: .05s; }
.status-card:nth-child(3) { animation-delay: .1s; }
.status-card:nth-child(4) { animation-delay: .15s; }
.card-label { display: flex; min-height: 17px; align-items: center; gap: 9px; color: #9f938f; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.status-card strong { display: block; margin: 14px 0 3px; overflow: hidden; font-size: clamp(21px, 3vw, 29px); letter-spacing: -.05em; text-overflow: ellipsis; white-space: nowrap; }
.status-card strong small { color: #a99c97; font-size: 12px; letter-spacing: 0; }
.card-subtitle { color: #8d8380; font-size: 10px; }
.bot-status-card strong { font-size: 18px; letter-spacing: -.025em; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px; align-items: start; }
.surface { min-width: 0; padding: clamp(19px, 3vw, 27px); border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 20px 65px rgba(0,0,0,.13); animation: rise-in .55s .1s ease both; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.section-icon { color: var(--accent); font-size: 27px; }
.permission-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.permission-chip { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: #8e8480; font-size: 9px; }
.permission-chip.allowed { color: #b5e5c4; border-color: rgba(131,200,155,.27); background: rgba(131,200,155,.07); }
form { display: grid; gap: 9px; }
form > label, .field-group > label { color: #d8cfcb; font-size: 10px; font-weight: 680; }
input, select, textarea { width: 100%; min-height: 41px; padding: 9px 11px; color: #f4f0ed; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; outline: none; background: #171414; transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, select:focus, textarea:focus { border-color: rgba(217,160,107,.72); box-shadow: 0 0 0 3px rgba(217,160,107,.1); }
input::placeholder, textarea::placeholder { color: #706764; }
textarea { min-height: 65px; resize: vertical; }
.field-group { display: grid; gap: 7px; margin-top: 5px; }
.subtle { color: #827975; font-weight: 400; }
form .primary-button { width: 100%; }
.logs-list { display: grid; gap: 7px; max-height: 400px; overflow: auto; }
.log-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; padding: 11px 12px; border: 1px solid rgba(255,255,255,.055); border-radius: 10px; background: rgba(0,0,0,.12); }
.log-main { min-width: 0; }
.log-title { display: block; overflow: hidden; color: #e9e0dc; font-size: 11px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.log-meta { display: block; margin-top: 5px; color: #8b817d; font-size: 9px; line-height: 1.5; }
.log-state { padding: 4px 7px; border-radius: 999px; color: #a9a09d; background: rgba(255,255,255,.06); font-size: 8px; }
.log-state.success { color: #b5e5c4; background: rgba(131,200,155,.09); }
.log-state.error { color: #ffada5; background: rgba(255,120,108,.09); }
.logs-surface > .fine-print { margin: 13px 0 0; }
.empty-state { padding: 22px 14px; border: 1px dashed var(--line); border-radius: 10px; color: #8d8380; font-size: 11px; text-align: center; }
.footer { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px 22px; color: #766d69; font-size: 10px; }
.footer .live-dot { width: 6px; height: 6px; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 850px) { .heading { align-items: flex-start; flex-direction: column; } .heading-actions { justify-content: flex-start; } }
@media (max-width: 680px) { .topbar { min-height: 65px; padding: 0 18px; } .secure-label { font-size: 0; } .status-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .content-grid { grid-template-columns: 1fr; } .guild-picker { flex: 1 1 100%; } .guild-picker select { width: 100%; } .heading-actions { width: 100%; } .heading-actions .secondary-button { flex: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

:root {
  --accent: #b99cff;
  --line: rgba(210, 196, 255, .12);
  --surface: rgba(24, 23, 38, .84);
  background: #0c0d17;
}
body {
  background:
    radial-gradient(ellipse at 8% 4%, rgba(108, 83, 201, .24), transparent 34rem),
    radial-gradient(ellipse at 96% 38%, rgba(44, 132, 167, .12), transparent 32rem),
    linear-gradient(145deg, #0c0d17, #11111d 55%, #0b1019);
}
.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  min-height: 70px;
  border-bottom-color: rgba(194, 176, 255, .14);
  background: rgba(12, 13, 23, .82);
  backdrop-filter: blur(18px);
}
.brand-mark {
  border-color: rgba(185, 156, 255, .45);
  background: rgba(185, 156, 255, .09);
  box-shadow: inset 0 0 18px rgba(185, 156, 255, .08);
}
main { width: min(100% - 40px, 1240px); padding-top: clamp(32px, 5vh, 58px); }
.heading { align-items: center; }
.heading h1 { font-size: clamp(34px, 4.7vw, 48px); }
.heading .intro { max-width: 560px; }
.status-grid { gap: 14px; margin: 20px 0 16px; }
.status-card, .surface {
  border-color: rgba(205, 192, 255, .12);
  background: linear-gradient(145deg, rgba(27, 27, 44, .94), rgba(19, 20, 33, .9));
  box-shadow: 0 22px 65px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .025);
}
.status-card { min-height: 116px; }
.status-card strong { margin-top: 18px; }
.dashboard-nav {
  position: sticky;
  z-index: 4;
  top: 70px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 -1px 17px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(15, 16, 28, .88);
  backdrop-filter: blur(16px);
}
.dashboard-nav a {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 9px;
  color: #a9a4bd;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: color .18s ease, background .18s ease;
}
.dashboard-nav a:hover, .dashboard-nav a:focus-visible {
  color: #f1ebff;
  outline: none;
  background: rgba(185, 156, 255, .13);
}
.surface { scroll-margin-top: 145px; }
.anti-raid-surface { margin-bottom: 14px; }
.section-description { max-width: 720px; margin: -3px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.feature-state { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: #c9c4d8; background: rgba(255,255,255,.04); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.feature-state.is-enabled { color: #a7e7c0; border-color: rgba(110, 210, 152, .25); background: rgba(73, 173, 118, .1); }
.feature-state.is-disabled { color: #f0a6a2; border-color: rgba(238, 117, 110, .25); background: rgba(191, 77, 72, .1); }
#anti-raid-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(9, 10, 19, .28);
  cursor: pointer;
}
.toggle-row span { display: grid; gap: 4px; }
.toggle-row strong { color: #eee9fa; font-size: 11px; }
.toggle-row small { color: #9994ad; font-size: 10px; line-height: 1.45; }
.toggle-row input { width: 18px; min-height: 18px; height: 18px; accent-color: #a988fa; cursor: pointer; }
.raid-profile-row { display: grid; grid-template-columns: minmax(180px, .45fr) 1fr; gap: 8px 14px; align-items: center; margin: 14px 0; }
.raid-profile-row > label { color: #d8d1e8; font-size: 10px; font-weight: 700; }
.raid-profile-row select { grid-column: 2; }
.raid-profile-row .fine-print { grid-column: 2; margin: 0; }
.raid-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.raid-rule { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(9, 10, 19, .24); }
.rule-toggle { padding: 0 0 12px; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: transparent; }
.rule-fields { display: grid; grid-template-columns: minmax(0, 1fr) 90px; align-items: center; gap: 9px; padding-top: 12px; }
.rule-fields label { color: #a9a4b8; font-size: 10px; }
.rule-fields input { min-height: 36px; padding: 7px 9px; }
.raid-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 12px; }
.raid-form-footer .status { margin: 0; }
.raid-form-footer .primary-button { flex: 0 0 auto; }
#anti-raid-fields:disabled { opacity: .5; }
#anti-raid-fields:disabled .primary-button { cursor: not-allowed; }
.primary-button { color: #151321; background: linear-gradient(120deg, #c8b2ff, #a98af6); }
.primary-button:hover { background: linear-gradient(120deg, #d9caff, #b89eff); }
.secondary-button, .icon-button { border-color: rgba(205, 192, 255, .15); background: rgba(255,255,255,.035); }
input:focus, select:focus, textarea:focus { border-color: rgba(185,156,255,.75); box-shadow: 0 0 0 3px rgba(185,156,255,.12); }
.permission-chip.allowed { color: #cbbcff; border-color: rgba(185,156,255,.28); background: rgba(185,156,255,.08); }
.log-row { background: rgba(9, 10, 19, .3); }
.footer .live-dot { background: #a98af6; box-shadow: 0 0 0 4px rgba(169,138,246,.12); }
@media (max-width: 850px) {
  .dashboard-nav { top: 65px; }
  .raid-rules { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  main { width: min(100% - 28px, 1240px); }
  .dashboard-nav { top: 65px; margin-inline: 0; }
  .raid-profile-row { grid-template-columns: 1fr; }
  .raid-profile-row select, .raid-profile-row .fine-print { grid-column: 1; }
  .raid-form-footer { align-items: stretch; flex-direction: column; }
  .raid-form-footer .primary-button { width: 100%; }
  .rule-fields { grid-template-columns: minmax(0, 1fr) 82px; }
}
