/* ================================================================
   NEON CYBER DEVOPS — Kloud Pilot Hub
   Stylesheet principal v1.0
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Share+Tech+Mono&family=Inter:wght@300;400;500;600&display=swap');

/* --- Variables ------------------------------------------------- */
:root {
  --bg-void:        #040810;
  --bg-primary:     #080c18;
  --bg-secondary:   #0d1526;
  --bg-card:        rgba(8, 18, 40, 0.92);
  --bg-card-hover:  rgba(12, 26, 56, 0.96);

  --neon-cyan:   #00f5ff;
  --neon-purple: #b400ff;
  --neon-green:  #00ff41;
  --neon-orange: #ff6b00;
  --neon-pink:   #ff0080;
  --neon-blue:   #0066ff;
  --accent-cyan: #00f5ff;

  --text-primary:   #d0dce8;
  --text-secondary: #7a8ba0;
  --text-muted:     #3a4a5a;

  --border-dim:  rgba(0, 245, 255, 0.12);
  --border-glow: rgba(0, 245, 255, 0.45);

  --font-display: 'Orbitron', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;
  --font-body:    'Inter', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* --- Background grid + ambient glow --------------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 245, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 255, 0.022) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 15%, rgba(0, 102, 255, 0.07) 0%, transparent 100%),
    radial-gradient(ellipse 60% 50% at 85% 85%, rgba(180, 0, 255, 0.07) 0%, transparent 100%),
    radial-gradient(ellipse 40% 40% at 50% 50%, rgba(0, 245, 255, 0.03) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

/* ================================================================
   LOGIN PAGE
   ================================================================ */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 1.5rem;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 14px;
  padding: 3rem 2.5rem 2.5rem;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.04),
    0 0 40px rgba(0, 245, 255, 0.06),
    0 0 100px rgba(0, 245, 255, 0.03),
    0 40px 80px rgba(0, 0, 0, 0.6);
  animation: cardAppear 0.55s var(--ease-out) both;
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo */
.logo-section {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-hex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(0, 245, 255, 0.07);
  border: 1px solid rgba(0, 245, 255, 0.25);
  margin-bottom: 1.25rem;
  animation: hexPulse 3s ease-in-out infinite;
}

.logo-hex svg {
  width: 36px;
  height: 36px;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 8px var(--neon-cyan));
}

.logo-ico {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 0 10px rgba(0, 245, 255, 0.45));
}

@keyframes hexPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.15), inset 0 0 15px rgba(0, 245, 255, 0.05);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.3), inset 0 0 20px rgba(0, 245, 255, 0.08);
  }
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--neon-cyan);
  text-shadow:
    0 0 8px rgba(0, 245, 255, 0.9),
    0 0 20px rgba(0, 245, 255, 0.5),
    0 0 40px rgba(0, 245, 255, 0.25);
  margin-bottom: 0.4rem;
}

.logo-subtitle {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 255, 65, 0.04);
  border: 1px solid rgba(0, 255, 65, 0.12);
  border-radius: 5px;
  padding: 0.45rem 0.8rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  flex-shrink: 0;
  animation: blinkDot 2.5s ease-in-out infinite;
}

@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* Error */
.alert-error {
  background: rgba(255, 40, 60, 0.08);
  border: 1px solid rgba(255, 40, 60, 0.3);
  border-radius: 7px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  color: #ff4060;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Google SSO button */
.btn-google-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: rgba(0, 245, 255, 0.06);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 9px;
  color: var(--neon-cyan);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: all 280ms var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-google-sso::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 280ms ease;
}

.btn-google-sso:hover {
  background: rgba(0, 245, 255, 0.1);
  border-color: var(--neon-cyan);
  box-shadow:
    0 0 18px rgba(0, 245, 255, 0.22),
    0 0 50px rgba(0, 245, 255, 0.08),
    inset 0 0 18px rgba(0, 245, 255, 0.04);
  transform: translateY(-2px);
}

.btn-google-sso:hover::after { opacity: 1; }
.btn-google-sso:active { transform: translateY(0); }

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Primary sign-in button (username/password) */
.btn-signin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.15) 0%, rgba(0, 180, 220, 0.1) 100%);
  border: 1px solid rgba(0, 245, 255, 0.55);
  border-radius: 9px;
  color: var(--neon-cyan);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: all 280ms var(--ease-out);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 12px rgba(0, 245, 255, 0.15),
    inset 0 0 12px rgba(0, 245, 255, 0.05);
}

.btn-signin::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 280ms ease;
}

.btn-signin:hover {
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.22) 0%, rgba(0, 180, 220, 0.16) 100%);
  border-color: var(--neon-cyan);
  box-shadow:
    0 0 24px rgba(0, 245, 255, 0.32),
    0 0 60px rgba(0, 245, 255, 0.12),
    inset 0 0 22px rgba(0, 245, 255, 0.06);
  transform: translateY(-2px);
}

.btn-signin:hover::after { opacity: 1; }
.btn-signin:active { transform: translateY(0); }

.signin-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Divider between sign-in options */
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: rgba(0, 245, 255, 0.15);
}

.divider-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Login footer */
.login-footer {
  margin-top: 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  line-height: 2;
}

/* ================================================================
   HUB PAGE
   ================================================================ */

.hub-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.hub-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(4, 8, 16, 0.93);
  border-bottom: 1px solid var(--border-dim);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(0, 245, 255, 0.04);
}

.hub-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  gap: 1rem;
}

.hub-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex-shrink: 0;
}

.hub-logo-icon {
  font-size: 1.3rem;
  filter: drop-shadow(0 0 8px var(--neon-cyan));
}

.hub-logo-ico {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 6px;
  filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.55));
}

.hub-logo-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.55);
}

/* User info */
.hub-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hub-user-detail {
  text-align: right;
  line-height: 1.3;
}

.hub-user-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-user-email {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(0, 245, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.3);
  object-fit: cover;
  flex-shrink: 0;
}

.hub-avatar-placeholder {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid rgba(0, 245, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.3);
  background: rgba(0, 245, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--neon-cyan);
  flex-shrink: 0;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.9rem;
  background: rgba(255, 107, 0, 0.07);
  border: 1px solid rgba(255, 107, 0, 0.28);
  border-radius: 6px;
  color: var(--neon-orange);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.btn-logout:hover {
  background: rgba(255, 107, 0, 0.13);
  border-color: var(--neon-orange);
  box-shadow: 0 0 14px rgba(255, 107, 0, 0.18);
}

/* Main content */
.hub-main {
  flex: 1;
  position: relative;
  z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
  width: 100%;
}

/* Welcome section */
.welcome-section {
  margin-bottom: 3rem;
  animation: fadeInUp 0.5s var(--ease-out) both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.welcome-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.welcome-title .highlight {
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.5);
}

.welcome-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
}

/* Stats row */
.stats-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: rgba(0, 245, 255, 0.04);
  border: 1px solid rgba(0, 245, 255, 0.1);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

.stat-chip .stat-value {
  color: var(--neon-cyan);
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-admin-quick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 245, 255, 0.35);
  color: var(--neon-cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  background: rgba(0, 245, 255, 0.07);
  transition: all 0.2s ease;
}

.btn-admin-quick:hover {
  background: rgba(0, 245, 255, 0.14);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.2);
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 245, 255, 0.18), transparent);
}

/* Platforms grid */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.15rem;
}

/* ----------------------------------------------------------------
   Platform Card
   ---------------------------------------------------------------- */
.platform-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out), border-color 280ms ease;
  animation: cardFadeIn 0.4s var(--ease-out) both;
  text-decoration: none;
  display: block;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Top color bar */
.card-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  opacity: 0.8;
}

/* --- Active card --- */
.platform-card.is-active {
  cursor: pointer;
  border-color: rgba(255, 255, 255, 0.1);
}

.platform-card.is-active:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}

.platform-card.is-active:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

/* --- Inactive card --- */
.platform-card.is-locked {
  cursor: not-allowed;
  filter: grayscale(80%) brightness(0.55);
  pointer-events: none;
}

/* Card layout */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.card-icon {
  font-size: 2.1rem;
  line-height: 1;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  border: 1px solid currentColor;
}

.is-active .card-tag {
  color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.08);
  border-color: rgba(0, 245, 255, 0.3);
}

.is-locked .card-tag {
  color: #555;
  background: rgba(80, 80, 80, 0.08);
  border-color: rgba(80, 80, 80, 0.25);
}

.card-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.35rem;
}

/* Card footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.access-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.is-active .access-badge { color: var(--neon-green); }
.is-locked .access-badge { color: #555; }

.access-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.is-active .access-led {
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: blinkDot 2.5s ease-in-out infinite;
}

.is-locked .access-led { background: #444; }

.card-arrow {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 200ms ease, color 200ms ease;
}

.is-active:hover .card-arrow {
  transform: translateX(4px);
  color: var(--text-secondary);
}

.card-lock {
  font-size: 1rem;
  color: #444;
}

/* ================================================================
   FOOTER
   ================================================================ */
.hub-footer {
  border-top: 1px solid rgba(0, 245, 255, 0.07);
  padding: 1rem 2rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  position: relative;
  z-index: 1;
}

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar              { width: 7px; }
::-webkit-scrollbar-track        { background: var(--bg-primary); }
::-webkit-scrollbar-thumb        { background: rgba(0, 245, 255, 0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(0, 245, 255, 0.35); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .hub-user-detail { display: none; }
  .hub-logo-text   { display: none; }
  .hub-header-inner { padding: 0 1rem; }
  .hub-main         { padding: 1.5rem 1rem 2rem; }
}

@media (max-width: 520px) {
  .login-card       { padding: 2rem 1.25rem; }
  .logo-title       { font-size: 1.4rem; }
  .platforms-grid   { grid-template-columns: 1fr; }
}

/* ================================================================
   LOGIN FORM — Local (username + password)
   ================================================================ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-input {
  background: rgba(0, 245, 255, 0.04);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.12);
}

.form-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #0d1117 inset;
  -webkit-text-fill-color: var(--text-primary);
}

/* ================================================================
   ADMIN PANEL
   ================================================================ */

.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-dim);
}

.admin-tab {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.admin-tab:hover { color: var(--neon-cyan); }
.admin-tab.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
}

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-section-collapsible {
  padding: 1rem 1.15rem;
}

.admin-collapsible {
  width: 100%;
}

.admin-collapsible-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  user-select: none;
}

.admin-collapsible-summary::-webkit-details-marker {
  display: none;
}

.admin-collapsible-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.admin-collapsible-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 245, 255, 0.18), transparent);
}

.admin-collapsible-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-dim);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.admin-collapsible-summary::after {
  content: '▾';
  font-size: 0.72rem;
  color: var(--neon-cyan);
  transition: transform 0.2s ease;
}

.admin-collapsible[open] .admin-collapsible-summary::after {
  transform: rotate(180deg);
}

.admin-collapsible[open] .admin-collapsible-meta {
  color: var(--neon-cyan);
  border-color: rgba(0, 245, 255, 0.35);
  background: rgba(0, 245, 255, 0.08);
}

.admin-collapsible-body {
  padding-top: 0.9rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-help {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.btn-admin {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.6rem 1.4rem;
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-admin:hover {
  background: rgba(0, 245, 255, 0.1);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.3);
}

/* Admin table */
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.admin-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border-dim);
}
.admin-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.admin-table tbody tr:hover { background: rgba(0, 245, 255, 0.03); }

.td-email { font-family: var(--font-mono); font-size: 0.78rem; }
.td-mono  { font-family: var(--font-mono); font-size: 0.78rem; color: var(--neon-cyan); }
.td-date  { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary); }
.td-muted { font-size: 0.72rem; color: var(--text-muted); }

.row-inactive { opacity: 0.45; }

.inline-form { display: inline-flex; align-items: center; gap: 0.3rem; }

.inline-form-wrap {
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.inline-picker {
  min-width: 200px;
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.25rem 0.4rem;
}

.inline-picker > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.inline-picker > summary::-webkit-details-marker {
  display: none;
}

.checks-grid {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.4rem;
}

.checks-grid-compact {
  grid-template-columns: 1fr;
  max-height: 190px;
  overflow: auto;
  padding-right: 0.2rem;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-dim);
  background: rgba(0, 245, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.check-chip input {
  accent-color: var(--neon-cyan);
}

.check-chip-sm {
  font-size: 0.68rem;
  padding: 0.3rem 0.45rem;
}

.form-input-sm {
  padding: 0.3rem 0.5rem !important;
  font-size: 0.75rem !important;
  min-width: 180px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}
.badge-local  { background: rgba(0, 245, 255, 0.12); color: var(--neon-cyan); }
.badge-google { background: rgba(66, 133, 244, 0.15); color: #4285f4; }
.badge-perm {
  background: rgba(180, 0, 255, 0.12);
  color: var(--neon-purple);
  margin: 0.1rem;
}

/* Small buttons */
.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.72rem;
  border: 1px solid var(--border-dim);
  background: transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-save:hover { border-color: var(--neon-green); box-shadow: 0 0 8px rgba(0, 255, 65, 0.2); }
.btn-active {
  color: var(--neon-green);
  border-color: rgba(0, 255, 65, 0.3);
}
.btn-inactive {
  color: var(--text-muted);
  border-color: var(--text-muted);
}
.btn-danger:hover { border-color: #ff4444; color: #ff4444; box-shadow: 0 0 8px rgba(255, 68, 68, 0.2); }

/* Permissions chips grid */
.perms-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.perm-chip {
  background: rgba(0, 245, 255, 0.06);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  padding: 0.4rem 0.8rem;
  display: flex;
  flex-direction: column;
}
.perm-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan);
}
.perm-name {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Admin alerts */
.admin-alert {
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}
.admin-alert-error {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #ff6b6b;
}
.admin-alert-success {
  background: rgba(0, 255, 65, 0.08);
  border: 1px solid rgba(0, 255, 65, 0.3);
  color: var(--neon-green);
}

@media (max-width: 980px) {
  .admin-tabs {
    flex-wrap: wrap;
    gap: 0.35rem;
    border-bottom: 0;
  }

  .admin-tab {
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    padding: 0.6rem 0.9rem;
  }

  .admin-tab.active {
    border-bottom-color: var(--neon-cyan);
  }
}

@media (max-width: 768px) {
  .admin-section {
    padding: 1rem;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .checks-grid {
    grid-template-columns: 1fr;
  }

  .inline-picker {
    min-width: 150px;
  }
}

/* ── Integration Token styles ─────────────────────────────────── */
.token-new-banner {
  border-color: rgba(0, 255, 65, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.08);
}

.token-value-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 255, 65, 0.05);
  border: 1px solid rgba(0, 255, 65, 0.25);
  border-radius: 6px;
  padding: 12px 16px;
}

.token-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--neon-green);
  word-break: break-all;
  flex: 1;
}

.token-masked {
  color: var(--text-secondary);
}

.btn-copy-token {
  flex-shrink: 0;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid rgba(0, 255, 65, 0.5);
  border-radius: 4px;
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-copy-token:hover {
  background: rgba(0, 255, 65, 0.12);
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}
