/* ============================================================
   PayPlus REST API — Developer Documentation Stylesheet
   Audience: Integration Developers, Core Banking Engineers
   Style: Developer API reference (Stripe/Plaid-inspired structure)
   ============================================================ */

:root {
  --primary:       #1a3a5c;
  --primary-dark:  #0f2540;
  --accent:        #2e6da4;
  --accent-light:  #e8f0f8;
  --green:         #16a34a;
  --green-bg:      #f0fdf4;
  --warning:       #b45309;
  --warning-bg:    #fffbeb;
  --warning-border:#f59e0b;
  --danger:        #991b1b;
  --danger-bg:     #fef2f2;
  --text:          #1e293b;
  --text-secondary:#475569;
  --text-muted:    #94a3b8;
  --border:        #cbd5e1;
  --border-light:  #e2e8f0;
  --bg:            #f8fafc;
  --bg-card:       #ffffff;
  --code-bg:       #0f172a;
  --nav-width:     260px;
  --header-h:      56px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

/* ── HEADER ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--primary-dark);
  color: #fff;
  display: flex; align-items: center;
  padding: 0 1.5rem; gap: 1.5rem;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.header-brand { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.03em; color: #e2e8f0; text-decoration: none; white-space: nowrap; }
.header-brand span { color: #7dd3fc; }
.header-breadcrumb { font-size: 0.8rem; color: #94a3b8; display: flex; align-items: center; gap: 0.4rem; }
.header-breadcrumb a { color: #93c5fd; text-decoration: none; }
.header-breadcrumb a:hover { text-decoration: underline; }
.header-rail-badge { margin-left: auto; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(255,255,255,0.1); color: #bfdbfe; padding: 0.2rem 0.6rem; border-radius: 4px; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: var(--header-h); left: 0; bottom: 0;
  width: var(--nav-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem 0 2rem;
  z-index: 90;
}
.nav-section { padding: 0.25rem 1rem 0.5rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-top: 1rem; }
.nav-section:first-child { margin-top: 0; }
.sidebar a { display: block; padding: 0.4rem 1.25rem; font-size: 0.83rem; color: var(--text-secondary); text-decoration: none; border-left: 3px solid transparent; transition: all 0.15s; }
.sidebar a:hover  { color: var(--accent); background: var(--accent-light); border-left-color: var(--accent); }
.sidebar a.active { color: var(--accent); background: var(--accent-light); border-left-color: var(--accent); font-weight: 600; }

/* ── MAIN ── */
.main { margin-left: var(--nav-width); margin-top: var(--header-h); padding: 2.5rem 3rem 4rem; max-width: 960px; }

/* ── TYPOGRAPHY ── */
h1 { font-size: 1.9rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; line-height: 1.2; }
h2 { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin: 2.5rem 0 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--border-light); }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--primary); margin: 1.75rem 0 0.5rem; }
h4 { font-size: 0.92rem; font-weight: 600; color: var(--text); margin: 1.25rem 0 0.35rem; }
p { margin-bottom: 1rem; color: var(--text); font-size: 0.925rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; font-size: 0.925rem; color: var(--text); }
a { color: var(--accent); }

/* ── TOPIC META ── */
.topic-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-light); display: flex; flex-wrap: wrap; gap: 1rem; }

/* ── ADMONITIONS ── */
.note, .warning, .important, .tip {
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  border-radius: 6px; margin: 1.25rem 0;
  font-size: 0.875rem; border-left: 4px solid;
}
.note      { background: #eff6ff; border-color: #3b82f6; color: #1e3a5f; }
.warning   { background: var(--warning-bg); border-color: var(--warning-border); color: #78350f; }
.important { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }
.tip       { background: var(--green-bg); border-color: #22c55e; color: #14532d; }
.note strong, .warning strong, .important strong, .tip strong { display: block; margin-bottom: 0.25rem; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; border-radius: 8px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead tr { background: var(--primary); color: #fff; }
thead th { padding: 0.65rem 1rem; text-align: left; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.03em; }
tbody tr { border-bottom: 1px solid var(--border-light); }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--bg); }
tbody td { padding: 0.6rem 1rem; vertical-align: top; }
tbody tr:hover { background: var(--accent-light); }

/* ── CODE ── */
code {
  font-family: 'Consolas', 'Cascadia Code', 'Courier New', monospace;
  font-size: 0.82em;
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #be123c;
}
pre {
  background: var(--code-bg);
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
  font-size: 0.85rem;
  line-height: 1.7;
  font-family: 'Consolas', 'Cascadia Code', 'Courier New', monospace;
}
pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.json-key   { color: #7dd3fc; }
.json-str   { color: #86efac; }
.json-num   { color: #fdba74; }
.json-bool  { color: #c4b5fd; }
.json-null  { color: #94a3b8; }
.json-comment { color: #64748b; font-style: italic; }

/* ── ENDPOINT BLOCK ── */
.endpoint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  margin: 1.5rem 0 0.75rem;
  font-family: 'Consolas', 'Courier New', monospace;
}
.method { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 4px; letter-spacing: 0.05em; white-space: nowrap; }
.method-post   { background: #dbeafe; color: #1d4ed8; }
.method-get    { background: #dcfce7; color: #15803d; }
.method-delete { background: #fee2e2; color: #b91c1c; }
.method-put    { background: #fef9c3; color: #a16207; }
.endpoint-url  { font-size: 0.9rem; color: var(--text); }

/* ── PARAM TABLES ── */
.required-badge { background: #fee2e2; color: #991b1b; font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.4rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; }
.optional-badge { background: #f1f5f9; color: #64748b; font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.4rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: middle; }

/* ── BADGES ── */
.badge { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-gray   { background: #f1f5f9; color: #475569; }

/* ── HTTP STATUS CODES ── */
.status-2xx { color: var(--green); font-weight: 700; }
.status-4xx { color: #d97706; font-weight: 700; }
.status-5xx { color: var(--danger); font-weight: 700; }

/* ── SECTION NAV ── */
.doc-nav { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.doc-nav a { font-size: 0.85rem; font-weight: 600; color: var(--accent); text-decoration: none; padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; transition: all 0.15s; }
.doc-nav a:hover { background: var(--accent-light); border-color: var(--accent); }

/* ── INDEX GRID ── */
.section-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0; }
.section-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; text-decoration: none; display: block; transition: all 0.2s; }
.section-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(46,109,164,0.12); transform: translateY(-2px); }
.section-card-title { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 0.25rem; font-family: 'Consolas', monospace; }
.section-card-desc  { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin-top: 0.35rem; }

/* ── FOOTER ── */
.site-footer { margin-left: var(--nav-width); padding: 1rem 3rem; font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem; }
.site-footer .copyright { width: 100%; border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; font-style: italic; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main, .site-footer { margin-left: 0; padding: 1.5rem; }
  .section-grid { grid-template-columns: 1fr; }
}
