:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(15, 15, 15, 0.9);
  --panel-strong: #111;
  --line: #262626;
  --text: #ededed;
  --muted: #969696;
  --dim: #656565;
  --green: #00bd00;
  --green-light: #32e132;
  --green-dark: #087908;
  --red: #e06868;
  font-family: Roboto, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--bg);
}
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 90% -10%, rgba(0, 189, 0, 0.13), transparent 30%), var(--bg);
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
}
[hidden] {
  display: none !important;
}
.background {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background: url('/background.jpg') center/cover;
  filter: saturate(0.45) brightness(0.24);
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.muted {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 9px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: 0.16s ease;
}
.primary-button {
  border: 0;
  background: linear-gradient(180deg, var(--green-light), var(--green-dark));
  color: #021002;
}
.secondary-button {
  border: 1px solid var(--line);
  background: #171717;
  color: #eee;
}
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
button:disabled,
input:disabled,
select:disabled {
  cursor: wait;
  opacity: 0.52;
}
.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}
.login-card {
  width: min(500px, 100%);
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 7, 7, 0.94);
  box-shadow: 0 35px 100px #000;
  text-align: center;
}
.login-card > img {
  width: 108px;
  filter: drop-shadow(0 14px 28px rgba(0, 189, 0, 0.17));
}
.login-card h1 {
  margin: 18px 0;
  color: #fff;
  font:
    700 42px/1.04 'Space Grotesk',
    sans-serif;
  letter-spacing: -0.045em;
}
.login-card h1 span {
  color: var(--green);
}
.login-card > p:not(.eyebrow) {
  max-width: 390px;
  margin: 0 auto 28px;
  color: var(--muted);
  line-height: 1.65;
}
.login-card > small {
  display: block;
  min-height: 20px;
  margin-top: 15px;
  color: var(--red);
}
.login-card footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 15px;
}
.login-card footer a,
.site-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.dashboard-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 260px;
  flex-direction: column;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.96);
  backdrop-filter: blur(15px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: white;
  font:
    600 16px 'Space Grotesk',
    sans-serif;
  text-decoration: none;
}
.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.brand > span {
  display: flex;
  flex-direction: column;
}
.brand small {
  margin-top: 2px;
  color: var(--dim);
  font:
    500 9px Roboto,
    sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 44px;
}
.sidebar nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
.sidebar nav button:hover {
  background: #111;
  color: #fff;
}
.sidebar nav button[aria-current='page'] {
  background: rgba(0, 189, 0, 0.11);
  color: #fff;
}
.nav-icon {
  width: 22px;
  color: var(--green);
  font-size: 18px;
  text-align: center;
}
.sidebar-spacer {
  flex: 1;
}
.site-link {
  margin: 12px 10px;
}
.site-link:hover {
  color: var(--green);
}
.user-card {
  display: grid;
  grid-template-columns: 38px 1fr 32px;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0d0d0d;
}
.avatar,
.guild-avatar {
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: #202020;
  color: var(--green);
  font-weight: 700;
}
.avatar {
  width: 38px;
  height: 38px;
}
.avatar img,
.guild-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.user-copy {
  min-width: 0;
}
.user-copy strong,
.user-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-copy small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 11px;
}
.icon-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.main {
  min-height: 100vh;
  margin-left: 260px;
  padding: 48px clamp(24px, 4vw, 66px) 80px;
}
.mobile-header {
  display: none;
}
.view {
  width: min(1220px, 100%);
  margin: 0 auto;
}
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.view-header h1 {
  margin: 0;
  color: #fff;
  font:
    700 clamp(32px, 4vw, 46px)/1 'Space Grotesk',
    sans-serif;
  letter-spacing: -0.045em;
}
.language-button {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.feedback {
  position: sticky;
  top: 18px;
  z-index: 15;
  width: min(1220px, 100%);
  margin: 0 auto 18px;
  padding: 12px 16px;
  border: 1px solid #225b22;
  border-radius: 9px;
  background: #0c270c;
  color: #b9f4b9;
}
.feedback[data-error='true'] {
  border-color: #683535;
  background: #2a1111;
  color: #f5bcbc;
}
.panel,
.install-card,
.loading-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}
.loading-card {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}
.loading-card > span:first-child {
  width: 18px;
  height: 18px;
  border: 2px solid #333;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.install-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 18px;
  padding: 28px;
  border-color: #285128;
  background: linear-gradient(110deg, rgba(0, 189, 0, 0.1), rgba(13, 13, 13, 0.95));
}
.install-card > div {
  position: relative;
  padding-left: 62px;
}
.install-card h2,
.panel h2 {
  margin: 0;
  color: #fff;
  font:
    600 22px 'Space Grotesk',
    sans-serif;
}
.install-card p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.card-icon {
  position: absolute;
  top: 4px;
  left: 0;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #326c32;
  border-radius: 12px;
  background: #102410;
  color: var(--green-light);
  font-size: 22px;
}
.status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 25px 28px;
}
.panel {
  padding: 26px;
}
.panel + .panel {
  margin-top: 18px;
}
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}
.count,
.lock-badge {
  display: inline-flex;
  min-width: 28px;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid #304730;
  border-radius: 999px;
  background: #102010;
  color: var(--green-light);
  font-size: 12px;
  font-weight: 700;
}
label > span:first-child {
  display: block;
  margin-bottom: 8px;
  color: #bdbdbd;
  font-size: 12px;
  font-weight: 600;
}
select,
input {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid #303030;
  border-radius: 8px;
  outline: 0;
  background: #0b0b0b;
  color: #eee;
}
select:focus,
input:focus {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(0, 189, 0, 0.08);
}
.subscription-form {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(300px, 1.7fr) auto;
  align-items: end;
  gap: 18px;
  padding: 19px;
  border: 1px solid #222;
  border-radius: 11px;
  background: #0b0b0b;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 12px;
}
.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 43px;
  align-items: center;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bbb;
  font-size: 13px;
  cursor: pointer;
}
.check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--green);
}
.check span {
  margin: 0 !important;
  font-size: inherit !important;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.switch input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  opacity: 0;
}
.switch > span {
  position: relative;
  width: 45px;
  height: 25px;
  margin: 0 !important;
  border: 1px solid #393939;
  border-radius: 999px;
  background: #202020;
  transition: 0.16s;
}
.switch > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8b8b8b;
  content: '';
  transition: 0.16s;
}
.switch input:checked + span {
  border-color: #247724;
  background: #104010;
}
.switch input:checked + span::after {
  transform: translateX(20px);
  background: var(--green-light);
}
.switch em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.item-list,
.delegate-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid #242424;
  border-radius: 9px;
  background: #0c0c0c;
}
.list-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.list-main strong {
  display: block;
  color: #eee;
}
.list-main small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tag {
  padding: 3px 7px;
  border-radius: 5px;
  background: #1b271b;
  color: #a8dca8;
  font-size: 10px;
}
.remove-button {
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
}
.empty {
  padding: 34px 20px;
  color: var(--muted);
  text-align: center;
}
.empty strong {
  display: block;
  color: #ddd;
  font:
    600 17px 'Space Grotesk',
    sans-serif;
}
.empty p {
  margin: 8px auto 0;
  max-width: 360px;
  line-height: 1.5;
}
.large-icon {
  display: block;
  margin-bottom: 14px;
  color: var(--green);
  font-size: 34px;
}
.guild-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}
.guild-picker {
  position: sticky;
  top: 24px;
  padding: 12px;
}
.picker-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 14px;
}
.guild-list {
  display: grid;
  gap: 5px;
}
.guild-button {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  text-align: left;
}
.guild-button:hover {
  background: #151515;
}
.guild-button[aria-current='true'] {
  border-color: #285128;
  background: rgba(0, 189, 0, 0.09);
  color: #fff;
}
.guild-button .guild-avatar {
  width: 38px;
  height: 38px;
}
.guild-button small {
  display: block;
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guild-button > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guild-state {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #545454;
}
.guild-state[data-configured='true'] {
  background: var(--green);
  box-shadow: 0 0 8px rgba(0, 189, 0, 0.6);
}
.guild-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.guild-header .guild-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 20px;
}
.guild-header .lock-badge {
  margin-left: auto;
}
.form-panel {
  padding: 24px;
}
.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}
.event-form {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(190px, auto) auto;
  align-items: end;
  gap: 16px;
}
.event-form > .switch {
  min-height: 43px;
}
.event-form > .check {
  min-height: 43px;
}
.delegate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.delegate-grid section {
  padding: 17px;
  border: 1px solid #242424;
  border-radius: 11px;
  background: #0b0b0b;
}
.delegate-grid h3 {
  margin: 0 0 14px;
  font:
    600 15px 'Space Grotesk',
    sans-serif;
}
.delegate-grid .list-item {
  padding: 10px 12px;
}
.hint {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.45;
}
@media (max-width: 1050px) {
  .subscription-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .event-form {
    grid-template-columns: 1fr 1fr;
  }
  .delegate-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  body[data-menu-open='true'] .sidebar {
    transform: translateX(0);
    box-shadow: 20px 0 80px #000;
  }
  .main {
    margin-left: 0;
    padding: 20px 18px 60px;
  }
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 34px;
  }
  .mobile-header .brand img {
    width: 34px;
    height: 34px;
  }
  .guild-layout {
    grid-template-columns: 1fr;
  }
  .guild-picker {
    position: static;
  }
  .guild-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
@media (max-width: 560px) {
  .login-card {
    padding: 34px 22px;
  }
  .login-card h1 {
    font-size: 34px;
  }
  .view-header {
    margin-bottom: 22px;
  }
  .install-card,
  .status-panel,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }
  .install-card {
    padding: 22px;
  }
  .install-card > div {
    padding: 58px 0 0;
  }
  .panel {
    padding: 20px;
  }
  .form-grid,
  .event-form {
    grid-template-columns: 1fr;
  }
  .inline-form {
    grid-template-columns: 1fr;
  }
  .guild-list {
    grid-template-columns: 1fr;
  }
}
