/* ================================================================
   Shared CSS — OTP API Service
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:       #1E64D4;
  --blue-dark:  #1550ae;
  --blue-light: #3d7fe0;
  --blue-muted: rgba(30,100,212,0.10);
  --blue-border: rgba(30,100,212,0.20);
  --bg:         #ffffff;
  --bg-soft:    #F1F3F4;
  --bg-mid:     #e8eaed;
  --text:       #0d1117;
  --text-mid:   #3c4043;
  --text-muted: #6b7280;
  --border:     #e0e0e0;
  --border-mid: #d0d0d0;
  --red:        #dc2626;
  --green:      #16a34a;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ─────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 60px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.nav-brand a img {
  height: 55px; /* Increased from 40px */
  width: auto;
  display: block;
}
.nav-brand-dot {
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%; display: inline-block;
}
.nav-links { display: flex; gap: 28px; flex: 1; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color .18s; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.nav-auth { display: flex; gap: 10px; align-items: center; }
.btn-nav-outline {
  color: var(--text-mid); text-decoration: none;
  font-size: 13px; font-weight: 600;
  padding: 8px 18px; border-radius: 7px;
  border: 1.5px solid var(--border-mid);
  transition: border-color .18s, color .18s;
  white-space: nowrap;
}
.btn-nav-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-nav-solid:hover { background: var(--blue-dark); }

/* ── Mobile Menu Toggle ── */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--text-mid);
}
.nav-toggle svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 900px) {
  nav { padding: 0 20px; height: 72px; }
  .nav-toggle { display: block; order: 3; }
  .nav-auth { display: none; } /* Hide auth btns on mobile nav, will put in menu */
  
  .nav-links {
    position: fixed; top: 72px; left: 0; width: 100%; height: 0;
    background: #fff; flex-direction: column; gap: 0;
    overflow: hidden; transition: height 0.3s ease;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .nav-links.open { height: auto; padding: 20px 0; }
  .nav-links a {
    padding: 15px 30px; font-size: 16px; border-bottom: none;
    display: block; width: 100%;
  }
  .nav-links a:hover, .nav-links a.active { background: var(--bg-soft); border-bottom: none; }
  
  .nav-brand { flex: 1; }
  .nav-brand a img { height: 48px; }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-blue {
  display: inline-block;
  background: var(--blue); color: #fff;
  padding: 13px 26px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer;
  transition: background .18s, box-shadow .18s;
  box-shadow: 0 2px 12px rgba(30,100,212,0.3);
}
.btn-blue:hover { background: var(--blue-dark); box-shadow: 0 4px 20px rgba(30,100,212,0.4); }
.btn-ghost {
  display: inline-block;
  background: transparent; color: var(--text-mid);
  padding: 13px 26px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--border-mid);
  transition: border-color .18s, color .18s;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ── Sections ───────────────────────────────────────────────── */
.page-wrap { max-width: 1160px; margin: 0 auto; padding: 80px 60px; }
.section-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--blue); margin-bottom: 12px;
}
.section-title {
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
  color: var(--text); margin-bottom: 12px;
}
.section-sub {
  font-size: 16px; color: var(--text-muted); margin-bottom: 52px;
}

/* ── Flash messages ─────────────────────────────────────────── */
.flash {
  padding: 14px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 500; margin-bottom: 24px;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Auth Forms ─────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background: var(--bg-soft);
}
.auth-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 44px 40px;
  width: 100%; max-width: 440px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.auth-logo {
  font-size: 15px; font-weight: 800;
  color: var(--blue); margin-bottom: 28px;
  display: flex; align-items: center; gap: 7px;
}
.auth-card h1 {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 6px;
}
.auth-card .subtitle {
  font-size: 14px; color: var(--text-muted); margin-bottom: 32px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-mid); margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text); background: var(--bg);
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-muted);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-submit {
  width: 100%; padding: 13px;
  background: var(--blue); color: #fff;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; margin-top: 8px;
  transition: background .18s;
}
.form-submit:hover { background: var(--blue-dark); }
.auth-foot {
  text-align: center; margin-top: 22px;
  font-size: 13px; color: var(--text-muted);
}
.auth-foot a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--text);
  padding: 52px 60px 36px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}
.footer-brand { font-size: 18px; font-weight: 800; color: #fff; }
.footer-brand img { height: 50px; width: auto; }
.footer-desc  { font-size: 13px; color: rgba(255,255,255,0.45); margin-top: 8px; max-width: 280px; line-height: 1.6; }
.footer-col h4 { font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-col a  { display: block; font-size: 13px; color: rgba(255,255,255,0.7); text-decoration: none; margin-bottom: 8px; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: 1160px; margin: 24px auto 0;
  font-size: 12px; color: rgba(255,255,255,0.3);
}

/* ── Code blocks ────────────────────────────────────────────── */
.code-card {
  background: #0d1117; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15); border: 1px solid #21262d;
}
.code-card-header {
  background: #161b22; padding: 12px 18px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid #21262d;
}
.dot  { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.code-card-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #8b949e; margin-left: 6px; }
.code-card pre   { padding: 22px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.8; color: #c9d1d9; }
.c-key   { color: #79c0ff; } .c-str { color: #a5d6ff; } .c-val { color: #7ee787; }
.c-punct { color: #8b949e; } .c-num { color: #f2cc60; }
.response-tag {
  display: inline-block; background: rgba(30,100,212,0.15); color: #1E64D4;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 3px; margin-bottom: 10px;
}
.cblock { background: #0d1117; border-radius: 10px; overflow: hidden; margin-top: 4px; margin-bottom: 16px; border: 1px solid #21262d; }
.cblock-head { background: #161b22; padding: 9px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #21262d; }
.cblock-lang { font-size: 11px; color: #8b949e; font-weight: 600; }
.cblock pre  { padding: 18px; overflow-x: auto; }
.cblock code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: #c9d1d9; white-space: pre; line-height: 1.7; }

/* ── Endpoint/Param tables ──────────────────────────────────── */
.endpoint { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 24px; background: var(--bg); }
.endpoint-head { padding: 20px 28px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.method { background: var(--blue); color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 5px; }
.endpoint-url  { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; color: var(--blue); }
.endpoint-desc { font-size: 13px; color: var(--text-muted); margin-left: auto; }
.endpoint-body { padding: 24px 28px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 24px; }
.ptable th { text-align: left; padding: 0 14px 11px 0; color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.ptable td { padding: 11px 14px 11px 0; border-bottom: 1px solid var(--bg-soft); color: var(--text-mid); }
.ptable tr:last-child td { border-bottom: none; }
.pname { font-family: 'JetBrains Mono', monospace; color: var(--blue); font-size: 13px; font-weight: 500; }
.req   { background: #fee2e2; color: #c0392b; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── Plans table ────────────────────────────────────────────── */
.plans-wrap { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.ptbl { width: 100%; border-collapse: collapse; }
.ptbl thead tr { background: var(--text); }
.ptbl thead th { padding: 16px 24px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.6); text-align: left; }
.ptbl tbody td { padding: 16px 24px; font-size: 15px; color: var(--text-mid); border-top: 1px solid var(--border); background: var(--bg); }
.ptbl tbody tr:hover td { background: var(--bg-soft); }
.plan-name { font-weight: 700; color: var(--text); }
.plan-popular { background: var(--blue); color: #fff; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 10px; margin-left: 8px; vertical-align: middle; }
.price-col { font-weight: 700; color: var(--blue); }

/* ── Dashboard ──────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 40px; }
.dash-card { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.dash-card .label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px; }
.dash-card .value { font-size: 28px; font-weight: 800; color: var(--blue); }
.dash-card .sub   { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.api-key-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--text); }
.copy-btn { background: var(--blue); color: #fff; border: none; padding: 7px 16px; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .18s; }
.copy-btn:hover { background: var(--blue-dark); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .page-wrap { padding: 40px 20px; }
  .section-title { font-size: 28px; }
  .section-sub { font-size: 15px; margin-bottom: 30px; }
  .two-col { grid-template-columns: 1fr; }
  footer { padding: 40px 20px; text-align: center; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-desc { margin: 10px auto; }
}
