:root {
  --admin-bg: #0d0405;
  --admin-panel: rgba(20, 7, 9, 0.94);
  --admin-panel-soft: rgba(29, 10, 13, 0.82);
  --admin-border: rgba(248, 113, 113, 0.18);
  --admin-purple: #ef4444;
  --admin-purple-bright: #ff4d4f;
  --admin-gold: #c8ad7f;
  --admin-text: #f8f6fb;
  --admin-muted: #8d8794;
  --admin-green: #52d39b;
}

[hidden] {
  display: none !important;
}

.admin-page {
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--admin-bg);
  color: var(--admin-text);
}

.admin-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(22, 6, 8, .88) 0%, rgba(7, 3, 4, .96) 52%, rgba(18, 5, 7, .94) 100%),
    url("/assets/hdt-banner.png") center / cover fixed no-repeat;
}

.admin-grid {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 45%, #000, transparent 72%);
}

.admin-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: aurora-float 11s ease-in-out infinite alternate;
}

.admin-aurora-one {
  top: 8%;
  left: 5%;
  width: 28rem;
  height: 28rem;
  background: #b91c1c;
}

.admin-aurora-two {
  right: 2%;
  bottom: -5%;
  width: 34rem;
  height: 34rem;
  background: #6b4e2e;
  animation-delay: -5s;
}

/* Connexion */
.auth-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 3rem 1.25rem;
}

.login-card {
  position: relative;
  width: min(100%, 28rem);
  overflow: hidden;
  padding: 2.5rem;
  border: 1px solid rgba(239, 68, 68, 0.34);
  border-radius: 1.3rem;
  background:
    linear-gradient(150deg, rgba(46, 7, 11, 0.78), rgba(6, 5, 8, 0.96) 64%),
    var(--admin-panel);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.56),
    inset 0 1px rgba(255, 255, 255, 0.05);
  animation: login-arrive 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(216, 180, 254, 0.48), transparent 25%, transparent 75%, rgba(200, 173, 127, 0.25));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.login-card-glow {
  position: absolute;
  top: -9rem;
  left: -5rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: rgba(185, 28, 28, 0.17);
  filter: blur(38px);
  pointer-events: none;
  animation: card-glow 6s ease-in-out infinite alternate;
}

.login-brand {
  position: relative;
  display: block;
  width: fit-content;
  margin: -0.6rem auto 0.2rem;
}

.login-logo {
  width: 7.6rem;
  filter: drop-shadow(0 0 22px rgba(200, 173, 127, 0.28));
  animation: login-logo-arrive 1s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.login-eyebrow {
  position: relative;
  margin-top: 0.2rem;
  color: #cab8e7;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-align: center;
  text-transform: uppercase;
}

.login-title {
  position: relative;
  margin-top: 1.45rem;
  font-size: clamp(2.25rem, 8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.login-subtitle {
  position: relative;
  margin-top: 0.65rem;
  color: var(--admin-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.login-form {
  position: relative;
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.7rem;
  color: #655e6b;
}

.auth-divider span {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.auth-divider small {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field > label {
  color: #b9b2c0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3.25rem;
  border: 1px solid rgba(248, 113, 113, 0.14);
  border-radius: 0.64rem;
  background: rgba(3, 3, 5, 0.5);
  color: #8f8797;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-wrap:focus-within {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(11, 6, 16, 0.86);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.09), 0 12px 36px rgba(153, 27, 27, 0.12);
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 0.8rem 3.3rem 0.8rem 2.8rem;
  outline: none;
  background: transparent;
  color: #f3eff6;
  font: inherit;
  font-size: 0.87rem;
}

.input-wrap input::placeholder {
  color: #5f5864;
}

.input-symbol {
  position: absolute;
  left: 1rem;
  display: grid;
  width: 1rem;
  place-items: center;
  color: #7f7787;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.input-lock {
  width: 0.75rem;
  height: 0.68rem;
  border: 1px solid currentColor;
  border-radius: 0.14rem;
}

.input-lock::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  bottom: 0.58rem;
  width: 0.43rem;
  height: 0.42rem;
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 0.35rem 0.35rem 0 0;
}

.password-toggle {
  position: absolute;
  right: 0.85rem;
  padding: 0.35rem;
  background: none;
  color: #8d8494;
  cursor: pointer;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.password-toggle:hover {
  color: #d8b4fe;
}

.form-error {
  min-height: 1rem;
  margin-top: -0.3rem;
  color: #ff8ba0;
  font-size: 0.72rem;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.remember-control {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  color: #9d96a3;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.remember-control input {
  width: 0.85rem;
  height: 0.85rem;
  accent-color: var(--admin-purple);
}

.login-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.05rem;
  margin-top: 0.1rem;
  overflow: hidden;
  border-radius: 0.55rem;
  background: linear-gradient(100deg, #dc2626, #b91c1c 68%, #ef4444);
  box-shadow: 0 14px 38px rgba(185, 28, 28, 0.25);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.24) 46%, transparent 68%);
  transform: translateX(-130%);
}

.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(185, 28, 28, 0.4);
}

.login-submit:hover::after {
  animation: button-shine 0.75s ease;
}

.login-submit.is-loading {
  pointer-events: none;
  opacity: 0.82;
}

.login-submit.is-loading .submit-arrow {
  animation: loading-arrow 0.7s ease-in-out infinite alternate;
}

.submit-arrow {
  margin-left: -0.2rem;
  font-size: 1.2rem;
  line-height: 0;
}

.demo-note,
.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.2rem;
  color: #6f6875;
  font-size: 0.64rem;
  line-height: 1.5;
}

.auth-note {
  color: #77707e;
}

/* Sécurité du compte */
.security-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 2rem 1.25rem;
  background: rgba(3, 2, 5, 0.82);
  backdrop-filter: blur(18px);
}

.security-card {
  position: relative;
  width: min(100%, 34rem);
  padding: 2rem;
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 0% 0%, rgba(185, 28, 28, 0.16), transparent 38%),
    rgba(11, 8, 14, 0.98);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
  animation: security-arrive 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.security-card h2 {
  margin-top: 0.35rem;
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.security-copy {
  margin-top: 0.55rem;
  color: var(--admin-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.security-fields {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.security-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: #8d8494;
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
}

.security-close:hover {
  border-color: rgba(200, 173, 127, 0.28);
  color: #f6eddf;
}

.security-card .login-submit {
  width: 100%;
  margin-top: 0.4rem;
  letter-spacing: 0.15em;
  text-indent: 0.15em;
}

.demo-dot {
  flex: 0 0 auto;
  width: 0.38rem;
  height: 0.38rem;
  margin-top: 0.27rem;
  border-radius: 50%;
  background: var(--admin-gold);
  box-shadow: 0 0 10px rgba(200, 173, 127, 0.7);
}

.back-link {
  display: block;
  width: fit-content;
  margin: 1.25rem auto -0.3rem;
  color: #706978;
  font-size: 0.7rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #d7cedd;
}

/* Tableau de bord */
.dashboard {
  min-height: 100dvh;
  animation: dashboard-arrive 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.8rem;
  padding: 0.7rem 2rem;
  border-bottom: 1px solid rgba(200, 173, 127, 0.1);
  background: rgba(7, 5, 10, 0.82);
  backdrop-filter: blur(24px);
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-logo {
  width: 3.6rem;
  height: 3.6rem;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(200, 173, 127, 0.18));
}

.dashboard-brand span {
  display: grid;
}

.dashboard-brand strong {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-brand small {
  margin-top: 0.1rem;
  color: var(--admin-muted);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.preview-link,
.logout-button,
.reset-button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.025);
  color: #afa8b5;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.preview-link {
  padding: 0.65rem 0.85rem;
}

.logout-button {
  padding: 0.65rem 0.8rem;
}

.preview-link:hover,
.logout-button:hover,
.reset-button:hover {
  border-color: rgba(200, 173, 127, 0.3);
  background: rgba(200, 173, 127, 0.05);
  color: #f6eddf;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.25rem 0.7rem 0.25rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.profile-avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-copy {
  display: grid;
  max-width: 9.5rem;
}

.profile-copy strong {
  overflow: hidden;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  color: var(--admin-muted);
  font-size: 0.55rem;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  min-height: calc(100dvh - 4.8rem);
}

.dashboard-sidebar {
  position: sticky;
  top: 4.8rem;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 4.8rem);
  padding: 2rem 1.15rem 1.4rem;
  border-right: 1px solid rgba(200, 173, 127, 0.08);
  background: rgba(8, 6, 11, 0.55);
}

.sidebar-label {
  padding-inline: 0.8rem;
  color: #625c68;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 0.34rem;
  margin-top: 0.7rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.78rem 0.82rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: #77707e;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sidebar-item span {
  display: grid;
  width: 1.1rem;
  place-items: center;
  font-size: 1rem;
}

.sidebar-item:hover {
  color: #cec7d3;
}

.sidebar-item.is-active {
  border-color: rgba(239, 68, 68, 0.2);
  background: linear-gradient(90deg, rgba(185, 28, 28, 0.17), rgba(185, 28, 28, 0.04));
  color: #eadcf7;
}

.sidebar-footer {
  display: grid;
  gap: 0.65rem;
  margin-top: auto;
}

.sidebar-logs-access {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(185, 28, 28, 0.08);
  color: #cdb2ea;
}

.sidebar-logs-access:hover {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(185, 28, 28, 0.15);
  color: #f0e5fb;
}

.sidebar-status {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem;
  border: 1px solid rgba(82, 211, 155, 0.1);
  border-radius: 0.65rem;
  background: rgba(82, 211, 155, 0.03);
}

.status-pulse {
  width: 0.46rem;
  height: 0.46rem;
  margin-top: 0.18rem;
  border-radius: 50%;
  background: var(--admin-green);
  box-shadow: 0 0 0 rgba(82, 211, 155, 0.35);
  animation: status-pulse 1.8s ease-out infinite;
}

.sidebar-status div {
  display: grid;
  gap: 0.18rem;
}

.sidebar-status strong {
  color: #bcdcca;
  font-size: 0.66rem;
  font-weight: 600;
}

.sidebar-status small {
  color: #5e7467;
  font-size: 0.55rem;
}

.dashboard-main {
  width: min(100%, 89rem);
  margin-inline: auto;
  padding: 3rem clamp(1.5rem, 4vw, 4rem) 2rem;
}

.member-home {
  max-width: 42rem;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(24, 18, 29, 0.82), rgba(10, 8, 12, 0.9));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.member-home h1 {
  margin-top: 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.045em;
}

.member-home > p:last-of-type {
  max-width: 35rem;
  margin-top: 0.7rem;
  color: var(--admin-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.member-home .primary-action {
  margin-top: 1.4rem;
}

.dashboard-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.dashboard-eyebrow {
  color: var(--admin-gold);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.dashboard-intro h1 {
  margin-top: 0.45rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.dashboard-intro > div > p:last-child {
  margin-top: 0.55rem;
  color: var(--admin-muted);
  font-size: 0.86rem;
}

.primary-action {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.55rem;
  background: linear-gradient(105deg, #dc2626, #b91c1c);
  box-shadow: 0 12px 30px rgba(185, 28, 28, 0.2);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(185, 28, 28, 0.34);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  min-height: 7.6rem;
  overflow: hidden;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0.8rem;
  background: linear-gradient(145deg, rgba(24, 18, 29, 0.72), rgba(10, 8, 12, 0.78));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: -4rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.06);
  filter: blur(10px);
}

.stat-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 0.65rem;
  font-size: 1.05rem;
}

.stat-icon-gold { color: #cfb98d; background: rgba(200, 173, 127, 0.06); }
.stat-icon-green { color: #52d39b; background: rgba(82, 211, 155, 0.06); }
.stat-icon-purple { color: #fca5a5; background: rgba(239, 68, 68, 0.06); }

.stat-card > div {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.stat-card strong {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 600;
}

.stat-card span {
  color: #958e9b;
  font-size: 0.72rem;
}

.stat-card small {
  grid-column: 2;
  margin-top: -1.55rem;
  color: #5f5964;
  font-size: 0.58rem;
}

.stat-card small.positive {
  color: #5da782;
}

.editor-card {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0.85rem;
  background: rgba(11, 8, 14, 0.78);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.users-card {
  margin-top: 1rem;
}

.users-list {
  display: grid;
  padding: 0 1.25rem 0.75rem;
}

.users-empty {
  padding: 1.5rem 0.25rem;
  color: var(--admin-muted);
  font-size: 0.74rem;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) minmax(12rem, 1.2fr) auto auto;
  align-items: center;
  gap: 1rem;
  min-height: 4.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.user-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.user-identity span:last-child {
  display: grid;
  min-width: 0;
}

.user-identity strong,
.user-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-identity strong {
  color: #d8d1dd;
  font-size: 0.75rem;
}

.user-identity small,
.user-email {
  color: var(--admin-muted);
  font-size: 0.65rem;
}

.user-badge {
  width: fit-content;
  padding: 0.36rem 0.55rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.08);
  color: #c4a2e9;
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
}

.user-badge.is-owner {
  background: rgba(200, 173, 127, 0.09);
  color: #cfb98d;
}

.user-state {
  color: #73b898;
  font-size: 0.62rem;
}

.user-create-fields {
  max-height: min(56dvh, 31rem);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.badge-editor-form {
  display: grid;
  grid-template-columns: 5rem minmax(9rem, 0.75fr) minmax(9rem, 0.8fr) 5rem minmax(12rem, 1.2fr) auto;
  align-items: end;
  gap: 0.8rem;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.012);
}

.badge-editor-form label {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.badge-png-field { display: grid; gap: 0.42rem; min-width: 0; }
.badge-png-field > span { color: #8e8794; font-size: 0.61rem; font-weight: 650; }
.badge-file-picker { display: flex!important; align-items: center; justify-content: center; height: 2.65rem; padding: 0 0.65rem; overflow: hidden; border: 1px dashed rgba(200, 173, 127, 0.3); border-radius: 0.52rem; background: #0d0910; color: #b4a8b8; cursor: pointer; font-size: 0.65rem; text-overflow: ellipsis; white-space: nowrap; }
.badge-file-picker:hover { border-color: rgba(200, 173, 127, 0.58); color: #fff; }
.badge-file-picker input { position: absolute; width: 1px!important; height: 1px!important; opacity: 0; pointer-events: none; }
.badge-png-preview { display:flex; align-items:center; gap:0.35rem; }
.badge-png-preview[hidden] { display:none; }
.badge-png-preview img { width:1.7rem; height:1.7rem; border:1px solid rgba(255,255,255,.12); border-radius:.38rem; background:#17121b; object-fit:contain; }
.badge-png-preview button { padding:.25rem .38rem; border:1px solid rgba(255,255,255,.08); border-radius:.35rem; background:#171019; color:#9a8290; cursor:pointer; font:inherit; font-size:.52rem; }

.badge-editor-form label > span {
  color: #8e8794;
  font-size: 0.61rem;
  font-weight: 650;
}

.badge-editor-form input:not([type="hidden"]) {
  width: 100%;
  height: 2.65rem;
  min-width: 0;
  padding: 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0.52rem;
  outline: 0;
  background: #09070c;
  color: #f2edf4;
  font: inherit;
  font-size: 0.72rem;
}

.badge-editor-form input[type="color"] { padding: 0.26rem; cursor: pointer; }
.badge-editor-form input:focus { border-color: rgba(200, 173, 127, 0.48); }
.badge-form-actions { display: flex; align-items: center; gap: 0.45rem; }
.badge-form-actions .primary-action { min-height: 2.65rem; white-space: nowrap; }
.badge-owner-permission { grid-column: 1 / -2; display: flex!important; align-items: center; gap: 0.7rem!important; width: fit-content; padding: 0.7rem 0.8rem; border: 1px solid rgba(200,173,127,.16); border-radius: .55rem; background: rgba(200,173,127,.035); cursor: pointer; }
.badge-owner-permission input { width: 1rem!important; height: 1rem!important; padding: 0!important; accent-color: #a967ea; }
.badge-owner-permission > span { display: grid; gap: .16rem; color: #ded6e1!important; }
.badge-owner-permission strong { font-size: .65rem; }
.badge-owner-permission small { color: #807785; font-size: .57rem; font-weight: 500; }
.badge-form-error { grid-column: 1 / -1; min-height: 0.8rem; color: #ef8ca0; font-size: 0.65rem; }
.badge-admin-list { display: grid; padding: 0 1.5rem 0.7rem; }
.badge-admin-row { display: grid; grid-template-columns: minmax(10rem, 0.65fr) minmax(12rem, 1fr) auto; align-items: center; gap: 1rem; min-height: 4.3rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.admin-badge-preview { display: inline-flex; align-items: center; gap: 0.55rem; width: fit-content; max-width: 100%; padding: 0.4rem 0.65rem; border: 1px solid color-mix(in srgb, var(--badge-color) 65%, white 8%); border-radius: 999px; background: color-mix(in srgb, var(--badge-color) 20%, #100c13); color: #f5f0f6; }
.admin-badge-preview b { font-size: 1rem; line-height: 1; }
.admin-badge-preview img { width: 1.2rem; height: 1.2rem; border-radius: 0.25rem; object-fit: contain; }
.admin-badge-preview span { overflow: hidden; font-size: 0.58rem; font-weight: 750; letter-spacing: 0.08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.badge-admin-row > p { overflow: hidden; color: var(--admin-muted); font-size: 0.67rem; text-overflow: ellipsis; white-space: nowrap; }
.badge-admin-row > div { display: flex; gap: 0.45rem; }
.badge-admin-row button,.badge-save-assignment { padding: 0.46rem 0.62rem; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 0.45rem; background: #151019; color: #aaa2ae; cursor: pointer; font: inherit; font-size: 0.6rem; }
.badge-admin-row button:hover,.badge-save-assignment:hover { border-color: rgba(200, 173, 127, 0.38); color: white; }
.badge-admin-row button.is-danger { color: #d88091; }
.badge-members-heading { padding: 1.35rem 1.5rem 0.8rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.badge-members-heading h3 { font-size: 0.88rem; }
.badge-members-heading p { margin-top: 0.35rem; color: var(--admin-muted); font-size: 0.65rem; }
.badge-member-list { display: grid; padding: 0 1.5rem 1rem; }
.badge-member-row { display: grid; grid-template-columns: minmax(12rem, 0.75fr) minmax(16rem, 1.35fr) auto; align-items: center; gap: 1rem; min-height: 5.3rem; padding: 0.7rem 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.badge-member-identity { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.badge-member-identity img { flex: 0 0 auto; width: 2.35rem; height: 2.35rem; border-radius: 0.6rem; background: #1c1720; object-fit: cover; }
.badge-member-identity span { display: grid; min-width: 0; }
.badge-member-identity strong,.badge-member-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-member-identity strong { color: #d9d2de; font-size: 0.72rem; }
.badge-member-identity small { margin-top: 0.18rem; color: var(--admin-muted); font-size: 0.58rem; }
.badge-assignment-options { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.badge-assignment-option { position: relative; cursor: pointer; }
.badge-assignment-option input { position: absolute; opacity: 0; pointer-events: none; }
.badge-assignment-option span { display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0.28rem 0.52rem; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0.45rem; background: #0e0a11; color: #746d79; font-size: 0.58rem; }
.badge-assignment-option span img { width: 1rem; height: 1rem; border-radius: 0.2rem; object-fit: contain; }
.badge-assignment-option input:checked + span { border-color: color-mix(in srgb, var(--badge-color) 68%, white 8%); background: color-mix(in srgb, var(--badge-color) 22%, #100c13); color: #eee8f0; }
.badge-no-option { color: var(--admin-muted); font-size: 0.63rem; }
.badge-save-assignment:disabled { cursor: not-allowed; opacity: 0.45; }

.logs-card {
  overflow: hidden;
  scroll-margin-top: 5.5rem;
}

.logs-card-header {
  align-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.webhook-config {
  margin: 0 1.5rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(239, 68, 68, 0.16);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.055), rgba(8, 6, 10, 0.62) 48%);
}

.webhook-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.webhook-config-header h3 { margin-top: 0.18rem; color: #eee8f0; font-size: 1rem; }
.webhook-config-header p:last-child { margin-top: 0.35rem; color: #8d8592; font-size: 0.78rem; line-height: 1.55; }
.webhook-config-count {
  flex: 0 0 auto;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #a69eaa;
  font-size: 0.75rem;
}

.webhook-config-list { display: grid; }
.webhook-config-empty { padding: 1.25rem; color: #827a87; font-size: 0.8rem; text-align: center; }
.webhook-config-empty.is-error { color: #d28a99; }
.webhook-row {
  display: grid;
  grid-template-columns: minmax(10rem, 0.8fr) minmax(18rem, 2fr) auto auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.webhook-row:first-child { border-top: 0; }
.webhook-row-name { display: grid; gap: 0.15rem; min-width: 0; }
.webhook-row-name strong { overflow: hidden; color: #ddd7e1; font-size: 0.82rem; text-overflow: ellipsis; white-space: nowrap; }
.webhook-row-name small { color: #706875; font-size: 0.72rem; }
.webhook-url-field input {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.62rem 0.72rem;
  outline: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: rgba(5, 4, 7, 0.7);
  color: #eee8f0;
  font: 0.78rem/1.2 var(--font-mono);
}
.webhook-url-field input:focus { border-color: rgba(239, 68, 68, 0.55); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08); }
.webhook-url-field input::placeholder { color: #655e69; }
.webhook-row-status {
  min-width: 6.7rem;
  color: #746d78;
  font-size: 0.72rem;
  text-align: center;
}
.webhook-row-status::before { content: ""; display: inline-block; width: 0.42rem; height: 0.42rem; margin-right: 0.38rem; border-radius: 50%; background: #665f69; vertical-align: 0.06rem; }
.webhook-row-status.is-configured { color: #75c6a1; }
.webhook-row-status.is-configured::before { background: #52d39b; box-shadow: 0 0 0 3px rgba(82, 211, 155, 0.08); }
.webhook-row-actions { display: flex; align-items: center; gap: 0.42rem; }
.webhook-row-actions .reset-button { min-height: 2.35rem; }
.webhook-delete {
  min-height: 2.35rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 0.45rem;
  background: rgba(239, 68, 68, 0.055);
  color: #c6808d;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}
.webhook-row-actions button:disabled { cursor: wait; opacity: 0.45; }
.webhook-row-message { grid-column: 2 / -1; min-height: 0.8rem; color: #c9909a; font-size: 0.7rem; }

.logs-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logs-search {
  display: flex;
  align-items: center;
  width: min(22rem, 42vw);
  min-height: 2.45rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(200, 173, 127, 0.13);
  border-radius: 0.55rem;
  background: rgba(5, 4, 7, 0.48);
  color: #6f6877;
}

.logs-search:focus-within {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.logs-search input {
  width: 100%;
  min-width: 0;
  padding: 0.65rem;
  outline: 0;
  background: transparent;
  color: #e9e3ec;
  font: inherit;
  font-size: 0.7rem;
}

.logs-search input::placeholder { color: #696270; }

.logs-summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: #8d8592;
  font-size: 0.62rem;
}

.logs-summary span {
  padding: 0.38rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.018);
}

.logs-summary strong { color: #d8d0dd; }
.logs-summary small { margin-left: auto; color: #5f5864; }

.logs-table {
  overflow-x: auto;
  padding: 0 1rem 0.75rem;
}

.logs-table-head,
.log-row {
  display: grid;
  gap: 0.75rem;
  align-items: center;
  min-width: 58rem;
}

.access-log-grid { grid-template-columns: 8.2rem 5.2rem minmax(9rem, 1fr) 8.4rem minmax(11rem, 1.2fr) minmax(10rem, 1fr); }
.fivem-log-grid { grid-template-columns: 8.2rem 8rem minmax(10rem, 1fr) minmax(18rem, 2fr) 6rem; }

.logs-table-head {
  padding: 0.8rem 0.65rem 0.55rem;
  color: #615a67;
  font-size: 0.52rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.log-row {
  min-height: 3.9rem;
  padding: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  color: #aaa2af;
  font-size: 0.66rem;
  transition: background 0.2s ease;
}

.log-row:hover { background: rgba(239, 68, 68, 0.025); }
.log-row time, .log-row code { color: #918a97; font-family: var(--font-mono); font-size: 0.61rem; }
.log-row code { overflow: hidden; text-overflow: ellipsis; }
.log-actor { display: grid; gap: 0.16rem; min-width: 0; }
.log-actor strong { overflow: hidden; color: #ddd6e1; text-overflow: ellipsis; white-space: nowrap; }
.log-actor small { overflow: hidden; color: #69616d; font-size: 0.56rem; text-overflow: ellipsis; white-space: nowrap; }

.log-source,
.log-severity {
  display: inline-flex;
  width: fit-content;
  padding: 0.32rem 0.5rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.07);
  color: #c9a4eb;
  font-size: 0.53rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.log-source.is-discord { border-color: rgba(88, 101, 242, 0.28); background: rgba(88, 101, 242, 0.09); color: #9ea8ff; }
.log-severity.is-info { border-color: rgba(82, 211, 155, 0.2); background: rgba(82, 211, 155, 0.07); color: #79c6a4; }
.log-severity.is-warning { border-color: rgba(232, 183, 84, 0.25); background: rgba(232, 183, 84, 0.07); color: #d9b66f; }
.log-severity.is-critical { border-color: rgba(255, 91, 122, 0.28); background: rgba(255, 91, 122, 0.08); color: #ff8fa5; }

.logs-empty {
  min-width: 40rem;
  padding: 2rem 1rem;
  color: #716a77;
  font-size: 0.7rem;
  text-align: center;
}
.logs-empty.is-error { color: #c97b8d; }

.fivem-connection-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.045), transparent 50%);
}

.fivem-connection-panel > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.18rem 0.55rem; }
.fivem-connection-panel strong { color: #d9d2dd; font-size: 0.7rem; }
.fivem-connection-panel small { grid-column: 2; color: #69616f; font-size: 0.58rem; }
.fivem-connection-panel code { color: #9f91aa; font-family: var(--font-mono); }
.integration-dot { width: 0.52rem; height: 0.52rem; grid-row: 1 / 3; border-radius: 50%; background: #6d6671; box-shadow: 0 0 0 4px rgba(109, 102, 113, 0.08); }
.integration-dot.is-online { background: var(--admin-green); box-shadow: 0 0 0 4px rgba(82, 211, 155, 0.09), 0 0 16px rgba(82, 211, 155, 0.26); }

.fivem-token-reveal {
  margin: 1rem 1.5rem 0;
  padding: 0.9rem;
  border: 1px solid rgba(200, 173, 127, 0.18);
  border-radius: 0.6rem;
  background: rgba(200, 173, 127, 0.045);
}
.fivem-token-reveal p { color: #a89c8b; font-size: 0.63rem; }
.fivem-token-reveal > div { display: flex; gap: 0.55rem; margin-top: 0.6rem; }
.fivem-token-reveal input { width: 100%; min-width: 0; padding: 0.65rem; outline: 0; border: 1px solid rgba(255,255,255,.08); border-radius: .4rem; background: #070609; color: #dcd5e0; font-family: var(--font-mono); font-size: .63rem; }

.fivem-integration-guide {
  margin: 0.85rem 1.5rem 0;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: .55rem;
  background: rgba(255,255,255,.012);
}
.fivem-integration-guide summary { padding: .7rem .8rem; color: #8f8795; cursor: pointer; font-size: .62rem; }
.fivem-integration-guide summary code { color: #b8a9c2; font-family: var(--font-mono); }
.fivem-integration-guide pre { max-height: 22rem; overflow: auto; padding: .9rem; border-top: 1px solid rgba(255,255,255,.045); background: #060507; color: #bdb5c3; font-family: var(--font-mono); font-size: .58rem; line-height: 1.65; white-space: pre; }

.fivem-category-filters {
  display: flex;
  gap: 0.42rem;
  overflow-x: auto;
  padding: 1rem 1.5rem 0.35rem;
}
.fivem-category-filters button { display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; padding: .45rem .6rem; border: 1px solid rgba(255,255,255,.06); border-radius: .45rem; background: rgba(255,255,255,.018); color: #817986; cursor: pointer; font: inherit; font-size: .58rem; }
.fivem-category-filters button:hover,.fivem-category-filters button.is-active { border-color: rgba(200,173,127,.26); background: rgba(200,173,127,.075); color: #d3c6af; }
.fivem-category-filters span { display: grid; min-width: 1.2rem; height: 1.2rem; place-items: center; border-radius: 999px; background: rgba(255,255,255,.05); font-size: .5rem; }
.fivem-action { display: inline-flex; align-items: center; gap: .42rem; color: #d8c79f; font-weight: 650; }
.fivem-action i { width: .38rem; height: .38rem; border-radius: 50%; background: #d2b978; box-shadow: 0 0 10px rgba(210,185,120,.26); }
.fivem-details { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.editor-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.editor-card-header h2 {
  margin-top: 0.28rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.editor-card-header > div > p:last-child {
  margin-top: 0.4rem;
  color: var(--admin-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.reset-button {
  flex: 0 0 auto;
  padding: 0.6rem 0.75rem;
}

.tile-editor {
  padding: 0 1rem 0.5rem;
}

.editor-table-head,
.editor-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(9rem, 1fr) minmax(13rem, 1.6fr) 6rem;
  gap: 0.8rem;
  align-items: center;
}

.editor-table-head {
  padding: 0.85rem 0.6rem 0.55rem;
  color: #5e5864;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.editor-row {
  min-height: 4.4rem;
  padding: 0.7rem 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}

.editor-section {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.editor-section-icon {
  display: grid;
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid rgba(200, 173, 127, 0.18);
  border-radius: 0.45rem;
  background: rgba(200, 173, 127, 0.05);
  color: #bda77d;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.editor-section span:last-child {
  overflow: hidden;
  color: #b8b1bd;
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-row input {
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0.42rem;
  background: rgba(255, 255, 255, 0.022);
  color: #d8d1dd;
  font: inherit;
  font-size: 0.7rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.editor-row input:focus {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(185, 28, 28, 0.04);
}

.editor-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: fit-content;
  padding: 0.38rem 0.52rem;
  border-radius: 999px;
  background: rgba(82, 211, 155, 0.06);
  color: #73b898;
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
}

.editor-status::before {
  content: "";
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: currentColor;
}

.editor-status.is-soon {
  background: rgba(200, 173, 127, 0.07);
  color: #ae986f;
}

.dashboard-footnote {
  margin-top: 1.25rem;
  color: #4d4851;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-align: center;
}

.admin-toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 100;
  max-width: min(24rem, calc(100vw - 3rem));
  padding: 0.8rem 1rem;
  border: 1px solid rgba(200, 173, 127, 0.24);
  border-radius: 0.6rem;
  background: rgba(18, 13, 22, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  color: #d7d0dc;
  font-size: 0.72rem;
  opacity: 0;
  transform: translateY(0.6rem);
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: none;
  visibility: visible;
}

@keyframes aurora-float {
  from { transform: translate3d(-3%, -2%, 0) scale(0.92); }
  to { transform: translate3d(5%, 4%, 0) scale(1.08); }
}

@keyframes login-arrive {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes login-logo-arrive {
  from { opacity: 0; transform: translateY(-12px) scale(0.76); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: drop-shadow(0 0 22px rgba(200, 173, 127, 0.28)); }
}

@keyframes card-glow {
  to { transform: translate(3rem, 2rem) scale(1.12); opacity: 0.8; }
}

@keyframes button-shine {
  to { transform: translateX(130%); }
}

@keyframes loading-arrow {
  to { transform: translateX(0.3rem); opacity: 0.5; }
}

@keyframes security-arrive {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes dashboard-arrive {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(82, 211, 155, 0.35); }
  70% { box-shadow: 0 0 0 7px rgba(82, 211, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(82, 211, 155, 0); }
}

@media (max-width: 64rem) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    display: block;
    height: auto;
    padding: 0.7rem 1rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(200, 173, 127, 0.08);
  }

  .sidebar-label,
  .sidebar-status {
    display: none;
  }

  .sidebar-footer {
    display: contents;
  }

  .sidebar-logs-access {
    width: auto;
    margin-top: 0.65rem;
  }

  .sidebar-nav {
    display: flex;
    width: max-content;
    margin: 0;
  }

  .sidebar-item {
    width: auto;
    white-space: nowrap;
  }

  .dashboard-main {
    padding-top: 2rem;
  }

  .badge-editor-form { grid-template-columns: 5rem 1fr 1fr 5rem; }
  .badge-description-field { grid-column: 1 / 4; }
  .badge-form-actions { grid-column: 4; }
  .badge-member-row { grid-template-columns: 1fr auto; }
  .badge-assignment-options { grid-column: 1 / -1; grid-row: 2; }
  .logs-card-header { align-items: flex-start; flex-direction: column; }
  .logs-toolbar { width: 100%; }
  .logs-search { width: 100%; }
  .webhook-row { grid-template-columns: minmax(9rem, 0.75fr) minmax(16rem, 1.6fr) auto; }
  .webhook-row-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .webhook-row-message { grid-column: 2 / -1; }
}

@media (max-width: 48rem) {
  .dashboard-header {
    padding-inline: 1rem;
  }

  .profile-chip,
  .preview-link {
    display: none;
  }

  .dashboard-intro {
    align-items: stretch;
    flex-direction: column;
    gap: 1.2rem;
  }

  .primary-action {
    width: 100%;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .editor-card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .editor-table-head {
    display: none;
  }

  .editor-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding-block: 1rem;
  }

  .user-row {
    grid-template-columns: 1fr auto;
    gap: 0.55rem 1rem;
    padding-block: 0.9rem;
  }

  .user-email {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .badge-admin-row { grid-template-columns: 1fr auto; padding: 0.8rem 0; }
  .badge-admin-row > p { grid-column: 1 / -1; grid-row: 2; }
  .badge-editor-form { grid-template-columns: 1fr 1fr; }
  .badge-description-field,.badge-owner-permission,.badge-form-actions { grid-column: 1 / -1; }

  .logs-toolbar { align-items: stretch; flex-direction: column; }
  .logs-summary { align-items: flex-start; flex-wrap: wrap; }
  .logs-summary small { width: 100%; margin-left: 0; }
  .webhook-config { margin-inline: 1rem; }
  .webhook-config-header { align-items: flex-start; flex-direction: column; }
  .webhook-row { grid-template-columns: 1fr; gap: 0.55rem; }
  .webhook-row-status { min-width: 0; text-align: left; }
  .webhook-row-actions { grid-column: 1; justify-content: stretch; }
  .webhook-row-actions button { flex: 1; }
  .webhook-row-message { grid-column: 1; }
  .fivem-connection-panel { align-items: stretch; flex-direction: column; }
  .fivem-connection-panel .primary-action { width: 100%; }
  .fivem-token-reveal > div { flex-direction: column; }

  .editor-row input {
    font-size: 0.8rem;
  }
}

@media (max-width: 30rem) {
  .login-card {
    padding: 2rem 1.3rem;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
  }

  .dashboard-brand span {
    display: none;
  }

  .security-card {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-aurora,
  .login-card-glow,
  .status-pulse {
    animation: none !important;
  }
}
