:root {
  color-scheme: dark;
  --bg: #090b12;
  --bg-soft: #0d1019;
  --panel: #111521;
  --panel-raised: #151a28;
  --panel-hover: #191f30;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f7ff;
  --muted: #9299ad;
  --muted-2: #686f83;
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, 0.15);
  --blue: #5b7cfa;
  --blue-soft: rgba(91, 124, 250, 0.15);
  --green: #35d49a;
  --green-soft: rgba(53, 212, 154, 0.14);
  --cyan: #3dcad3;
  --cyan-soft: rgba(61, 202, 211, 0.14);
  --yellow: #f2b94b;
  --yellow-soft: rgba(242, 185, 75, 0.14);
  --danger: #fa6275;
  --danger-soft: rgba(250, 98, 117, 0.13);
  --radius: 16px;
  --radius-small: 11px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.eyebrow {
  margin: 0 0 12px;
  color: #9f85ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(169, 139, 255, 0.35);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.24), rgba(91, 124, 250, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 9px 28px rgba(86, 51, 190, 0.2);
  color: white;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.08em;
}

.brand-mark span {
  color: #a78bfa;
}

/* Login */
.login-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 17% 22%, rgba(105, 65, 220, 0.18), transparent 30%),
    radial-gradient(circle at 84% 75%, rgba(49, 101, 202, 0.11), transparent 32%),
    #090b12;
}

.login-page::before,
.login-page::after {
  position: fixed;
  z-index: 0;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  content: "";
}

.login-page::before {
  top: -180px;
  left: -100px;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.012), 0 0 0 140px rgba(255, 255, 255, 0.008);
}

.login-page::after {
  right: -220px;
  bottom: -200px;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.012), 0 0 0 140px rgba(255, 255, 255, 0.008);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1040px, calc(100% - 40px));
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(13, 16, 25, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.login-brand {
  position: relative;
  display: flex;
  min-height: 610px;
  flex-direction: column;
  justify-content: space-between;
  padding: 54px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(139, 92, 246, 0.14), transparent 48%),
    linear-gradient(330deg, rgba(91, 124, 250, 0.08), transparent 50%);
}

.login-brand::after {
  position: absolute;
  right: -55px;
  bottom: 45px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(165, 133, 255, 0.12);
  border-radius: 55px;
  box-shadow: inset 0 0 70px rgba(111, 76, 204, 0.05);
  content: "";
  transform: rotate(25deg);
}

.brand-mark-large {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  font-size: 25px;
}

.login-brand h1 {
  max-width: 470px;
  margin: 0;
  font-size: clamp(36px, 4.6vw, 55px);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.login-lead {
  max-width: 430px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.login-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-features span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 11, 18, 0.42);
  color: #b9bfd0;
  font-size: 11px;
  font-weight: 650;
}

.feature-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 12px currentColor;
}

.feature-dot-green { background: var(--green); }
.feature-dot-purple { background: var(--purple); }
.feature-dot-blue { background: var(--blue); }

.login-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 64px 58px;
  background: rgba(14, 17, 27, 0.72);
}

.login-card-heading h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.login-card-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-error {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid rgba(250, 98, 117, 0.22);
  border-radius: 10px;
  background: var(--danger-soft);
  color: #ff9dab;
  font-size: 12px;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 32px;
}

.login-form label {
  margin-top: 8px;
  color: #c4c9d7;
  font-size: 12px;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  height: 52px;
  align-items: center;
  gap: 11px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(6, 8, 14, 0.64);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap:focus-within {
  border-color: rgba(139, 92, 246, 0.62);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.input-wrap > span {
  width: 18px;
  color: #777f94;
  font-size: 12px;
  text-align: center;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.input-wrap input::placeholder {
  color: #555c6d;
}

.password-toggle {
  flex: 0 0 auto;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  white-space: nowrap;
}

.primary-button {
  display: flex;
  height: 52px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(120deg, #7654e6, #5d70e8);
  box-shadow: 0 15px 30px rgba(87, 70, 210, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: white;
  cursor: pointer;
  font-weight: 750;
  transition: transform 150ms ease, filter 150ms ease;
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.login-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 27px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.5;
}

/* App shell */
.dashboard-page {
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% -15%, rgba(113, 79, 212, 0.11), transparent 30%),
    var(--bg);
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 30;
  display: flex;
  width: 248px;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  padding: 24px 15px 18px;
  border-right: 1px solid var(--line);
  background: rgba(10, 12, 20, 0.94);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 23px;
  color: var(--text);
  text-decoration: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-copy small {
  color: #777e92;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.side-nav {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
}

.nav-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 11px 9px;
  color: #52596b;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.nav-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.nav-item {
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin: 3px 0;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #8c93a5;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: 150ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.035);
  color: #c9cedb;
}

.nav-item.is-active {
  border-color: rgba(139, 92, 246, 0.14);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.17), rgba(139, 92, 246, 0.055));
  color: #d7ccff;
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #858da1;
  font-size: 14px;
}

.nav-item.is-active .nav-icon {
  color: #a98cff;
}

.nav-item b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #6f7689;
  font-size: 9px;
  font-weight: 750;
  text-align: center;
}

.nav-item.is-active b {
  background: rgba(139, 92, 246, 0.15);
  color: #b69cff;
}

.sidebar-footer {
  display: grid;
  gap: 9px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.connection-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(53, 212, 154, 0.045);
}

.connection-card > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.connection-card strong {
  color: #b7c7c2;
  font-size: 10px;
}

.connection-card small {
  color: #576761;
  font-size: 9px;
}

.status-pulse {
  width: 8px;
  height: 8px;
  border: 2px solid rgba(53, 212, 154, 0.23);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(53, 212, 154, 0.75);
}

.logout-button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6f7689;
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.035);
  color: #aeb4c4;
}

.content {
  min-width: 0;
  grid-column: 2;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 15px;
  padding: 13px clamp(22px, 3.5vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 18, 0.8);
  backdrop-filter: blur(22px);
}

.breadcrumb {
  margin: 0 0 3px;
  color: #5d6476;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.breadcrumb span {
  padding: 0 4px;
  color: #393f4e;
}

.topbar-title h1 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

.activity-state {
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 999px;
  background: var(--purple-soft);
  color: #bca8ff;
  font-size: 9px;
  font-weight: 750;
}

.activity-state:not([hidden]) { display: flex; }

.activity-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 9px var(--purple);
}

.sync-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.sync-copy small {
  color: #5c6374;
  font-size: 8px;
}

.sync-copy strong {
  color: #9299aa;
  font-size: 10px;
  font-weight: 650;
}

.secondary-button,
.icon-button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: #a3a9b9;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: 150ms ease;
}

.secondary-button {
  padding: 0 12px;
}

.secondary-button:hover,
.icon-button:hover {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.1);
  color: #d5cbf8;
}

.secondary-button.is-loading span:first-child {
  animation: spin 650ms linear infinite;
}

.menu-button {
  display: none;
  width: 36px;
}

.content-inner {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 38px clamp(22px, 3.5vw, 48px) 30px;
}

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
}

.hero-row h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.045em;
}

.hero-row > div:first-child > p:last-child {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.guild-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.guild-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #9da4b5;
  font-size: 10px;
  white-space: nowrap;
}

.guild-avatar {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  font-size: 9px;
  font-weight: 800;
}

.guild-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.summary-card {
  position: relative;
  display: grid;
  min-height: 119px;
  grid-template-columns: auto 1fr;
  align-content: start;
  align-items: center;
  gap: 13px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012));
}

.summary-card::after {
  position: absolute;
  top: -60px;
  right: -50px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  filter: blur(55px);
  opacity: 0.13;
}

.summary-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 16px;
  opacity: 0.9;
}

.summary-card div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.summary-card strong {
  color: var(--text);
  font-size: 26px;
  letter-spacing: -0.03em;
}

.summary-card small {
  color: #8a91a3;
  font-size: 10px;
  font-weight: 650;
}

.summary-foot {
  grid-column: 1 / -1;
  color: #565d6e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accent-purple { color: #a98dff; }
.accent-blue { color: #6689ff; }
.accent-green { color: #43d9a2; }
.accent-cyan { color: #45cbd4; }

.settings-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

.search-box {
  display: flex;
  width: min(500px, 100%);
  height: 43px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  transition: 150ms ease;
}

.search-box:focus-within {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.045);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.07);
}

.search-box > span {
  color: #697184;
  font-size: 19px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.search-box input::placeholder { color: #596071; }

.search-box kbd {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.03);
  color: #5e6575;
  font-family: inherit;
  font-size: 8px;
}

.filter-chip {
  padding: 8px 10px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 999px;
  background: var(--purple-soft);
  color: #b7a1fb;
  cursor: pointer;
  font-size: 9px;
}

.result-count {
  margin-left: auto;
  color: #5e6576;
  font-size: 9px;
}

.warning-area {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(242, 185, 75, 0.2);
  border-radius: 10px;
  background: var(--yellow-soft);
  color: #d9bd7a;
  font-size: 10px;
}

.settings-root {
  display: grid;
  gap: 28px;
  min-height: 290px;
  margin-top: 27px;
}

.section-block {
  scroll-margin-top: 100px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.section-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 9px;
  background: rgba(139, 92, 246, 0.08);
  color: #9f83f8;
  font-size: 13px;
}

.section-heading h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.section-heading p {
  margin: 3px 0 0;
  color: #656c7e;
  font-size: 9px;
}

.section-count {
  margin-left: auto;
  color: #5c6374;
  font-size: 9px;
  font-weight: 650;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.setting-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(19, 23, 36, 0.88), rgba(14, 17, 27, 0.88));
  transition: 150ms ease;
}

.setting-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(23, 28, 43, 0.92), rgba(16, 20, 31, 0.92));
  transform: translateY(-1px);
}

.setting-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.setting-title {
  min-width: 0;
  flex: 1;
}

.setting-title h4 {
  margin: 0;
  overflow: hidden;
  color: #e7e9f2;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-title p {
  margin: 5px 0 0;
  overflow: hidden;
  color: #777f91;
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: #7d8496;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-success { border-color: rgba(53,212,154,.17); background: var(--green-soft); color: #62dbb0; }
.badge-blue { border-color: rgba(91,124,250,.18); background: var(--blue-soft); color: #7f99fb; }
.badge-purple { border-color: rgba(139,92,246,.18); background: var(--purple-soft); color: #aa90f8; }
.badge-cyan { border-color: rgba(61,202,211,.18); background: var(--cyan-soft); color: #6ed4db; }
.badge-warning { border-color: rgba(242,185,75,.18); background: var(--yellow-soft); color: #d9b96f; }
.badge-danger { border-color: rgba(250,98,117,.18); background: var(--danger-soft); color: #fb8b99; }

.setting-fields {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.setting-field {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.setting-field dt {
  color: #555d6f;
  font-size: 8px;
  line-height: 1.5;
}

.setting-field dd {
  margin: 0;
  overflow: hidden;
  color: #969dad;
  font-size: 8px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: pre-line;
}

.setting-field dd.is-mono {
  color: #788196;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 7.5px;
}

.empty-section,
.empty-search,
.error-state,
.loading-state {
  display: flex;
  min-height: 240px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: #767e90;
  text-align: center;
}

.empty-section {
  min-height: 90px;
  font-size: 10px;
}

.loading-state strong,
.error-state strong {
  color: #a7adbc;
  font-size: 12px;
}

.loading-state small,
.error-state small,
.empty-search small {
  max-width: 330px;
  color: #5d6475;
  font-size: 9px;
  line-height: 1.6;
}

.spinner {
  width: 27px;
  height: 27px;
  margin-bottom: 7px;
  border: 2px solid rgba(139, 92, 246, 0.14);
  border-top-color: #9f83f8;
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #414757;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.sidebar-scrim {
  display: none;
}

@media (min-width: 1500px) {
  .settings-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .content { grid-column: auto; }
  .sidebar {
    width: min(285px, 84vw);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }
  .dashboard-page.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgba(1, 3, 8, 0.62);
    opacity: 0;
    transition: 200ms ease;
  }
  .dashboard-page.sidebar-open .sidebar-scrim { visibility: visible; opacity: 1; }
  .menu-button { display: inline-flex; }
  .topbar { padding-inline: 14px; }
  .content-inner { padding-inline: 16px; }
  .hero-row { align-items: flex-start; flex-direction: column; }
  .guild-list { justify-content: flex-start; }
  .activity-state { display: none !important; }
}

@media (max-width: 620px) {
  .login-page { overflow: auto; place-items: start center; }
  .login-shell {
    width: min(100% - 24px, 470px);
    grid-template-columns: 1fr;
    margin: 20px 0;
  }
  .login-brand {
    min-height: 265px;
    padding: 30px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .login-brand h1 { font-size: 32px; }
  .login-lead { margin-top: 14px; font-size: 12px; }
  .login-features { display: none; }
  .brand-mark-large { width: 48px; height: 48px; border-radius: 14px; font-size: 20px; }
  .login-card { padding: 36px 30px; }
  .topbar-title h1 { font-size: 14px; }
  .breadcrumb { display: none; }
  .sync-copy { display: none; }
  .secondary-button span:last-child { display: none; }
  .secondary-button { width: 36px; padding: 0; }
  .content-inner { padding-top: 28px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .summary-card { min-height: 108px; padding: 16px; }
  .summary-card strong { font-size: 23px; }
  .settings-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .search-box { width: 100%; }
  .search-box kbd { display: none; }
  .result-count { order: 3; width: 100%; margin: 0; }
  .settings-grid { grid-template-columns: 1fr; }
  .setting-card { padding: 15px; }
}

@media (max-width: 380px) {
  .summary-grid { grid-template-columns: 1fr; }
}

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