/* ============================================================
   ALX India — Main Stylesheet
   Dark Industrial SaaS Aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  --bg:        #080b0f;
  --bg2:       #0d1117;
  --bg3:       #141b24;
  --surface:   #1a2332;
  --border:    #1f2d3d;
  --accent:    #00d4ff;
  --accent2:   #ff6b35;
  --accent3:   #39ff14;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --danger:    #ef4444;
  --success:   #22c55e;
  --warning:   #f59e0b;
  --radius:    6px;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-ui:   'Space Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Grid noise background ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(0,212,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 80%, rgba(255,107,53,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Typography ─── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

p { color: var(--muted); }

code, pre {
  font-family: var(--font-mono);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px 6px;
  font-size: 13px;
  color: var(--accent3);
}

pre { padding: 16px; overflow-x: auto; }

/* ─── Layout ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.wrapper   { max-width: 800px;  margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ─── Header ─── */
.site-header {
  background: rgba(8,11,15,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }

.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: var(--muted); font-size: 13px; transition: color .2s; }
.nav a:hover { color: var(--text); }

/* ─── Hero ─── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p { font-size: 16px; max-width: 560px; margin: 0 auto 32px; }

.badge {
  display: inline-block;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--accent);
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover { background: #fff; color: #000; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,212,255,0.3); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #c53030; }

.btn-success {
  background: var(--success);
  color: #000;
}
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ─── Cards ─── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding: 40px 0;
}

.card-tag {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.card-title { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.card-desc  { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ─── Status dot ─── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-active  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-inactive{ background: var(--danger); }

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
textarea,
select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: border-color .2s;
  outline: none;
  appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

textarea { min-height: 120px; resize: vertical; }

select option { background: var(--bg3); }

/* ─── Alerts ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid;
}
.alert-error   { background: rgba(239,68,68,0.1);  border-color: var(--danger);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.1);  border-color: var(--success); color: #86efac; }
.alert-info    { background: rgba(0,212,255,0.1);  border-color: var(--accent);  color: var(--accent); }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; }

thead tr { background: var(--bg3); border-bottom: 1px solid var(--border); }

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg3); }

/* ─── Sidebar layout ─── */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  color: var(--text);
}
.sidebar-logo span { color: var(--accent); }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 13px;
  transition: all .2s;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--text);
  background: var(--bg3);
  border-left-color: var(--accent);
}

.sidebar-section {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 16px 20px 6px;
}

.main-content { padding: 32px; overflow-y: auto; }

.page-title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Stats row ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .stat-num  { font-size: 32px; font-weight: 800; font-family: var(--font-head); color: var(--accent); }
.stat-card .stat-label{ font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ─── Key display ─── */
.key-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent3);
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy-btn {
  cursor: pointer;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  flex-shrink: 0;
  transition: all .2s;
  font-family: var(--font-ui);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Docs ─── */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 40px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.docs-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.docs-sidebar ul { list-style: none; }
.docs-sidebar li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.docs-sidebar a { color: var(--muted); font-size: 13px; }
.docs-sidebar a:hover { color: var(--accent); }

.docs-content h1 { font-size: 2rem; margin-bottom: 8px; }
.docs-content .subtitle { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.endpoint-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}

.method {
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
}
.method.post { background: var(--accent2); }
.method.put  { background: var(--warning); color: #000; }
.method.del  { background: var(--danger); }

.endpoint-url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 60px;
  position: relative;
  z-index: 1;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .docs-layout { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease forwards; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.pulse { animation: pulse 2s infinite; }

/* ─── Razorpay overlay ─── */
.pay-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pay-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}
.pay-card h2 { margin-bottom: 8px; }
.pay-card p  { margin-bottom: 24px; }
.pay-price {
  font-size: 40px;
  font-weight: 800;
  font-family: var(--font-head);
  color: var(--accent);
  margin-bottom: 24px;
}
