/* LinkedIn Hunter — Admin Panel
   Dark theme matching the desktop app aesthetic.
   Single CSS file, no preprocessor, no framework. */

:root {
  --bg:         #0a0a0f;
  --bg-card:    #13131f;
  --bg-input:   #1a1a2e;
  --bg-surface: rgba(255, 255, 255, 0.04);
  --border:     #2a2a3e;
  --border-strong: #3a3a52;

  --text:       #e0e0f0;
  --text-2:     #a0a0c0;
  --text-3:     #666688;

  --accent:     #0077B5;
  --accent-hi:  #2a93cf;
  --accent-soft: rgba(0,119,181,0.12);

  --success:    #00d4aa;
  --warning:    #ff9500;
  --danger:     #ff3b30;

  --radius:     10px;
  --radius-lg:  14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: radial-gradient(ellipse at top, #1a1a2e, #05050a 70%);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ────── Login screen ────── */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.login-card .logo {
  width: 48px; height: 48px; margin: 0 auto 12px;
  background: var(--accent);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: 18px;
  box-shadow: 0 0 30px var(--accent-soft);
}
.login-card h1 {
  text-align: center;
  font-size: 18px; font-weight: 700;
}
.login-card .subtitle {
  text-align: center; color: var(--text-2); font-size: 12px; margin-bottom: 24px;
}
.login-card label {
  display: block; margin-bottom: 12px;
}
.login-card label > span {
  display: block; font-size: 11px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.login-card input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-size: 14px;
  transition: border-color 0.15s;
}
.login-card input:focus {
  outline: none; border-color: var(--accent);
}
.login-card button {
  width: 100%; margin-top: 8px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff; border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.login-card button:hover { background: var(--accent-hi); }
.login-card button:disabled { opacity: 0.5; cursor: wait; }
.error {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: var(--danger);
  border-radius: var(--radius);
  font-size: 13px;
}

/* ────── Main app shell ────── */
.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  display: flex; flex-direction: column;
  padding: 16px 12px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.brand-logo {
  width: 30px; height: 30px;
  background: var(--accent); color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.brand span { font-weight: 700; font-size: 14px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text-2); text-decoration: none;
  font-size: 13px;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-input); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-hi); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; }

.sidebar-spacer { flex: 1; }

.killswitch-panel {
  padding: 10px 12px;
  background: rgba(255, 59, 48, 0.04);
  border: 1px solid rgba(255, 59, 48, 0.15);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.killswitch-panel.active {
  background: rgba(255, 59, 48, 0.18);
  border-color: var(--danger);
}

.logout-row {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.admin-email { font-size: 11px; color: var(--text-3); }
.ghost-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); padding: 6px 10px;
  border-radius: var(--radius); font-size: 12px;
  cursor: pointer;
}
.ghost-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* Content area */
.content {
  padding: 24px 28px;
  overflow-y: auto;
  max-height: 100vh;
}
.route { animation: fadein 0.15s ease; }
@keyframes fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 22px; font-weight: 700; }
.page-subtitle { color: var(--text-2); font-size: 13px; margin-top: 2px; }

/* Stat cards */
.stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.stat-card .stat-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-3); margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 24px; font-weight: 800; color: var(--text);
}
.stat-card.warn .stat-value { color: var(--warning); }
.stat-card.danger .stat-value { color: var(--danger); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
}
.card-title {
  font-size: 13px; font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 14px;
}

/* Tables */
table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left; padding: 10px 12px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-surface); }
td.muted { color: var(--text-2); }
.row-clickable { cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff; border: none;
  border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.btn:hover { background: var(--accent-hi); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-secondary {
  background: var(--bg-input); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #ff5040; }
.btn-warn { background: var(--warning); color: #000; }

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge-active   { background: rgba(0,212,170,0.15); color: var(--success); }
.badge-revoked  { background: rgba(255,59,48,0.15); color: var(--danger); }
.badge-booted   { background: rgba(255,149,0,0.15); color: var(--warning); }

/* Forms */
.form-row {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
}
.form-row > label {
  font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-row input, .form-row textarea, .form-row select {
  padding: 9px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-size: 13px;
  font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--accent);
}

/* Modal */
.modal-root {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
}
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(2px);
}
.modal-card {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%; max-width: 480px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: modalin 0.18s ease;
}
@keyframes modalin {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.modal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Code blocks (for showing raw license keys) */
.codeblock {
  background: var(--bg-input);
  border: 1px solid var(--accent);
  padding: 14px;
  border-radius: var(--radius);
  font-family: 'Cascadia Code', Consolas, monospace;
  font-size: 16px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent-hi);
  text-align: center;
  user-select: all;
  margin: 14px 0;
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 1000;
  animation: toastin 0.2s ease;
  max-width: 380px;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
@keyframes toastin {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Empty state */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--text-3);
}
.empty .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty .empty-title { font-size: 16px; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* Utility */
.flex { display: flex; }
.space-between { justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warning); }
.text-success { color: var(--success); }
.mono { font-family: 'Cascadia Code', Consolas, monospace; font-size: 12px; }
