/* e.sg Link Manager — Shared Documentation Styles */

:root {
  --brand: #CD2027;
  --brand-light: #e05a5f;
  --brand-dark: #9b1820;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --success: #16a34a;
  --warning: #d97706;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--surface-2);
  line-height: 1.6;
}

/* ── Top nav ─────────────────────────────────────────────── */
.topnav {
  background: var(--brand);
  color: #fff;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.topnav .logo { font-weight: 700; font-size: 1.1rem; letter-spacing: -.5px; margin-right: .5rem; text-decoration: none; color: #fff; }
.topnav a { color: rgba(255,255,255,.85); text-decoration: none; font-size: .875rem; white-space: nowrap; }
.topnav a:hover, .topnav a.active { color: #fff; text-decoration: underline; }
.topnav-spacer { flex: 1; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 60%, var(--brand-light) 100%);
  color: #fff;
  padding: 3.5rem 2rem 4rem;
  text-align: center;
}
.hero h1 { font-size: 2.4rem; font-weight: 800; letter-spacing: -.5px; }
.hero p  { font-size: 1.1rem; opacity: .9; margin-top: .75rem; max-width: 540px; margin-left: auto; margin-right: auto; }
.hero .badge {
  display: inline-block; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3);
  border-radius: 99px; padding: .25rem .9rem; font-size: .8rem; font-weight: 600; margin-top: 1rem;
}

/* ── Layout ───────────────────────────────────────────────── */
.content { max-width: 1060px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

/* ── Section ──────────────────────────────────────────────── */
.section { margin-bottom: 3.5rem; }
.section h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--brand-dark);
  border-bottom: 2px solid var(--brand-light); padding-bottom: .4rem; margin-bottom: 1.25rem;
}
.section h3 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 .5rem; color: var(--text); }
.section p  { margin-bottom: .75rem; color: var(--text-muted); }
.section ul, .section ol { padding-left: 1.4rem; color: var(--text-muted); }
.section li { margin-bottom: .3rem; }

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-body { padding: 1.25rem 1.5rem; }
.card-title { font-weight: 700; font-size: 1rem; margin-bottom: .25rem; }
.card-meta  { font-size: .8rem; color: var(--text-muted); }

/* ── Two-column feature row ───────────────────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }
@media (max-width: 700px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.reverse { direction: ltr; }
  .topnav a:not(.logo) { display: none; }
}

/* ── Steps ────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .6rem 0; border-bottom: 1px dashed var(--border);
  color: var(--text-muted);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step);
  min-width: 26px; height: 26px;
  background: var(--brand); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0; margin-top: .1rem;
}

/* ── Tips / callout ───────────────────────────────────────── */
.tip {
  background: #fef2f2; border-left: 4px solid var(--brand-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .75rem 1rem; margin: 1rem 0;
  font-size: .875rem; color: #1e40af;
}
.tip strong { color: var(--brand-dark); }

/* ── Table ────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { background: var(--brand); color: #fff; padding: .6rem .9rem; text-align: left; }
td { padding: .55rem .9rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--surface-2); }

/* ── Badge ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--brand-light); color: #fff;
  border-radius: 99px; padding: .2rem .7rem; font-size: .75rem; font-weight: 600;
}
.badge.green { background: var(--success); }
.badge.amber { background: var(--warning); }

/* ── Mock phone frame ─────────────────────────────────────── */
.mockup-wrap { display: flex; justify-content: center; }
.mockup-wrap.left { justify-content: flex-start; }
.mockup-wrap.right { justify-content: flex-end; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center; padding: 2rem; font-size: .8rem; color: var(--text-muted);
  border-top: 1px solid var(--border); margin-top: 2rem;
}
footer a { color: var(--brand); text-decoration: none; }
