* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  color: #f5f5f5;
  background:
    radial-gradient(1200px 700px at 14% -10%, rgba(37, 99, 235, 0.16), transparent 62%),
    radial-gradient(900px 600px at 110% 20%, rgba(255, 255, 255, 0.07), transparent 55%),
    #0b0b0b;
  position: relative;
  overflow-x: hidden;
}

/* Keep main UI above the logo */
.top,
.wrap {
  position: relative;
  z-index: 1;
}

/* FR corner logo (small + subtle) */
.frCornerLogo {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 118px;
  height: auto;
  opacity: 0.28;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.55));
  z-index: 0;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
}

.title {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub {
  opacity: 0.75;
  font-size: 13px;
  margin-top: 4px;
}

.wrap {
  max-width: 1040px;
  margin: 18px auto 28px;
  padding: 0 14px;
  display: grid;
  gap: 14px;
}

@media (min-width: 980px) {
  .wrap {
    grid-template-columns: 420px 1fr;
    align-items: start;
  }
}

.card {
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.rowBetween {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

label {
  display: block;
  margin: 10px 0 6px;
  opacity: 0.85;
  font-size: 13px;
}

input,
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0d0d0d;
  color: #f5f5f5;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1b1b1b;
  color: #eee;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  margin-top: 14px;
}

.btn.blue {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.btn.danger {
  background: #2a1414;
  border-color: rgba(239, 68, 68, 0.55);
  color: #fff;
}

.btn.ok {
  background: #0f2a22;
  border-color: rgba(20, 184, 166, 0.55);
  color: #fff;
}

.btn.sm {
  padding: 7px 12px;
  font-size: 13px;
}

.msg {
  margin-top: 12px;
  font-size: 13px;
  white-space: pre-wrap;
  opacity: 0.9;
}

.users {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.userRow {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.25);
}

.userRow:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.userTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.userEmail {
  font-weight: 700;
}

.userMeta {
  opacity: 0.70;
  font-size: 12px;
  margin-top: 3px;
}

.userControls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.ctrl {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ctrlLabel {
  font-size: 12px;
  opacity: 0.75;
}

.dnInput {
  width: 240px;
  max-width: 320px;
}

.roleSelect {
  width: 130px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  min-height: 32px;
}

.badge.off {
  border-color: rgba(239, 68, 68, 0.45);
  color: rgba(239, 68, 68, 0.95);
}

.badge.on {
  border-color: rgba(20, 184, 166, 0.55);
  color: rgba(20, 184, 166, 0.95);
}

.isDisabled {
  opacity: 0.85;
}

@media (max-width: 560px) {
  .dnInput {
    width: 100%;
    max-width: none;
  }
  .roleSelect {
    width: 100%;
  }
}