/* ClawXO Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --bg: #0a0a0a;
  --card: #111;
  --card-hover: #161616;
  --border: #222;
  --border-hover: #333;
  --text: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.15);
  --red: #ef4444;
  --red-dim: rgba(239,68,68,0.15);
  --yellow: #f59e0b;
  --yellow-dim: rgba(245,158,11,0.15);
  --radius: 10px;
  --radius-sm: 8px;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.page { position: relative; z-index: 1; min-height: 100vh; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

/* ── Logo ── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.logo .xo { color: var(--blue); }
.logo-sm { font-size: 20px; gap: 8px; }

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-user { color: var(--text-secondary); font-size: 14px; font-weight: 500; }

/* ── Typography ── */
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
.subtitle { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--border-hover); }
.card-header { margin-bottom: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.form-group input::placeholder { color: var(--text-muted); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 8px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); box-shadow: 0 8px 24px rgba(59,130,246,0.3); }

.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); background: var(--card-hover); }

.btn-danger { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-ghost { background: none; border: none; color: var(--text-muted); padding: 8px; }
.btn-ghost:hover { color: var(--text); }

/* ── Status Indicators ── */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-online .status-dot { background: var(--green); box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.status-offline .status-dot { background: var(--text-muted); }
.status-pending .status-dot { background: var(--yellow); animation: pulse 2s infinite; }
.status-error .status-dot { background: var(--red); }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-blue { background: rgba(59,130,246,0.1); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }
.badge-green { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); border: 1px solid rgba(245,158,11,0.2); }
.badge-red { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Pricing ── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.pricing-card { text-align: center; padding: 32px; position: relative; }
.pricing-card.featured { border-color: var(--blue); box-shadow: 0 0 40px rgba(59,130,246,0.1); }
.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.price { font-size: 48px; font-weight: 900; letter-spacing: -2px; margin: 16px 0 4px; }
.price-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.pricing-features { text-align: left; margin-bottom: 32px; }
.pricing-features li { padding: 8px 0; color: var(--text-secondary); font-size: 14px; list-style: none; display: flex; align-items: center; gap: 8px; }
.pricing-features li::before { content: '✓'; color: var(--green); font-weight: 700; }

/* ── Messages ── */
.msg { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; display: none; }
.msg.show { display: block; }
.msg-error { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.msg-success { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }

/* ── Links ── */
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ── Stat Cards ── */
.stat-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px; }
  h1 { font-size: 22px; }
  .nav { flex-wrap: wrap; gap: 12px; }
}
