/* SingleComm Central Menu — dark technical UI */
:root {
  --bg: #07090d;
  --bg-2: #0c1118;
  --panel: rgba(18, 24, 34, 0.72);
  --panel-strong: rgba(22, 30, 42, 0.92);
  --border: rgba(120, 160, 220, 0.14);
  --border-strong: rgba(120, 180, 255, 0.32);
  --text: #e6ecf5;
  --muted: #8a96aa;
  --accent: #4ea1ff;
  --accent-2: #7c5cff;
  --accent-glow: rgba(78, 161, 255, 0.45);
  --danger: #ff5d6c;
  --success: #2ecc71;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: radial-gradient(1200px 700px at 80% -10%, #11203a 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 110%, #1a1240 0%, transparent 55%),
              var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* Background grid + glow */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(120, 160, 220, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 160, 220, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 40%, transparent 80%);
}
.bg-glow {
  position: fixed; z-index: 0; pointer-events: none;
  width: 720px; height: 720px;
  top: -200px; right: -200px;
  background: radial-gradient(closest-side, rgba(78, 161, 255, 0.18), transparent 70%);
  filter: blur(20px);
}

/* Topbar */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(7,9,13,0.6), rgba(7,9,13,0.2));
}
.topbar-brand { display: flex; align-items: center; gap: 14px; }
.topbar-brand img { width: 36px; height: 36px; }
.topbar-title { font-weight: 700; letter-spacing: 0.02em; }
.topbar-sub { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.2em; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); }
.user-meta { line-height: 1.15; text-align: right; }
.user-name { font-size: 13px; font-weight: 600; }
.user-email { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.logout {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.15s ease;
}
.logout:hover { color: var(--danger); border-color: rgba(255, 93, 108, 0.4); background: rgba(255, 93, 108, 0.08); }

/* Container + hero */
.container { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 56px 28px 80px; }
.hero { margin-bottom: 36px; }
.hero h1 {
  margin: 0 0 8px; font-size: 34px; font-weight: 700;
  background: linear-gradient(90deg, #fff 0%, #cdd9ff 60%, #8aa6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0; color: var(--muted); font-size: 14px; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

/* Tile */
.tile {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  overflow: hidden;
}
.tile::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(78,161,255,0.08), transparent 40%);
  opacity: 0; transition: opacity 0.2s ease;
}
.tile:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--panel-strong); }
.tile:hover::before { opacity: 1; }
.tile:hover .tile-arrow { color: var(--accent); transform: translate(2px, -2px); }

.tile-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(78,161,255,0.12), rgba(124,92,255,0.10));
  border: 1px solid var(--border);
}
.tile-icon img { width: 36px; height: 36px; object-fit: contain; }
.tile-fallback {
  font-family: var(--mono); font-weight: 700; font-size: 22px; color: var(--accent);
}

.tile-body { min-width: 0; }
.tile-title { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.tile-desc { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-host { font-family: var(--mono); font-size: 11px; color: var(--muted); opacity: 0.85; letter-spacing: 0.02em; }

.tile-arrow { color: var(--muted); transition: color 0.18s ease, transform 0.18s ease; }

.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--muted);
  background: var(--panel);
}
.empty code { font-family: var(--mono); color: var(--accent); }

/* Login */
.login-body { display: grid; grid-template-rows: 1fr auto; min-height: 100vh; }
.login-card {
  position: relative; z-index: 1;
  align-self: center; justify-self: center;
  width: min(420px, 92vw);
  padding: 40px 36px 32px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(78,161,255,0.05) inset;
  text-align: center;
  margin-top: 8vh;
}
.login-brand { margin-bottom: 28px; }
.login-logo { width: 72px; height: 72px; margin: 0 auto 14px; filter: drop-shadow(0 0 24px var(--accent-glow)); }
.login-card h1 { margin: 0; font-size: 26px; letter-spacing: 0.01em; }
.tagline { margin: 6px 0 0; color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.25em; }

.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  background: #fff; color: #1f2937;
  font-weight: 600; font-size: 14px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow: 0 6px 20px rgba(78,161,255,0.18);
}
.google-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(78,161,255,0.28); }

.alert {
  background: rgba(255,93,108,0.10);
  border: 1px solid rgba(255,93,108,0.4);
  color: #ffd0d4;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}
.login-footer { color: var(--muted); font-size: 11px; margin-top: 22px; font-family: var(--mono); letter-spacing: 0.05em; }

/* Page footer */
.page-footer {
  position: relative; z-index: 1;
  text-align: center; padding: 18px;
  color: var(--muted); font-size: 11px; font-family: var(--mono);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.page-footer .dot { margin: 0 8px; opacity: 0.5; }

@media (max-width: 640px) {
  .topbar { padding: 14px 16px; }
  .user-meta { display: none; }
  .container { padding: 32px 16px 60px; }
  .hero h1 { font-size: 26px; }
}
