:root {
  --bg: #0f1724;
  --card: #0b1220;
  --accent: #10b981;
  --danger: #ef4444;
  --muted: #9ca3af;
}

* {
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #071024 0%, #081428 100%);
  color: #e6eef8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- MAIN CARD ---------- */

.container {
  width: min(560px, 94vw);
  background: rgba(255, 255, 255, 0.02);
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 6px 30px rgba(2, 6, 23, 0.6);
  text-align: center;

  display: flex;
  flex-direction: column;
  min-height: 360px;
}

h1 {
  margin: 0 0 18px;
  font-size: 20px;
}

/* ---------- BUTTONS (ON / OFF) ---------- */

.denied-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;   /* 👈 controls the space */
  margin-top: 12px;
}

.buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.btn {
  width: 220px;
  padding: 18px 24px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.btn-on {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #02120a;
}

.btn-off {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
}

/* ---------- STATUS ---------- */

.status {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- ESP INDICATOR ---------- */

.indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #555;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.indicator.online {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16,185,129,0.8);
}

.indicator.offline {
  background: #555;
}

/* ---------- LOGOUT + ADMIN ---------- */

.action-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.action-row .btn {
  min-width: 160px;
}

/* ---------- ADMIN PANEL TABLE LAYOUT ---------- */

.admin-row {
  display: grid;
  grid-template-columns: 2.5fr 1.5fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}

.admin-cell {
  font-size: 14px;
}

.admin-email {
  font-size: 14px;
  overflow-wrap: anywhere;   /* allows wrapping safely */
  word-break: break-word;
}


.admin-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
}

.admin-actions .btn {
  padding: 10px 14px;
  font-size: 14px;
  width: auto;
  white-space: nowrap;
}

/* Mobile friendly */
@media (max-width: 520px) {
  .admin-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-actions .btn {
    width: 100%;
  }
}


/* ---------- FOOTER ---------- */

.appName {
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(8px);
  animation: footerFadeUp 0.6s ease-out forwards;
  animation-delay: 0.4s;
}

@keyframes footerFadeUp {
  to {
    opacity: 0.8;
    transform: translateY(0);
  }
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 480px) {
  .container {
    padding: 20px;
  }

  .btn {
    width: 100%;
  }
}

.flex-spacer {
  flex: 1;
}

.admin-row {
  background: rgba(91, 108, 163, 0.15) !important;
}

/* FIX ADMIN LAYOUT */
#approved-users,
#access-requests {
  width: 100%;
  text-align: left;   /* ⬅️ THIS IS THE KEY FIX */
}