/* Mindrative Institutional Developer Portal Stylesheet */
:root {
  --bg-primary: #060913;
  --bg-secondary: #0b1120;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #152238;
  --border-subtle: #1e293b;
  --border-prominent: #334155;
  --border-accent: rgba(56, 189, 248, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --brand-cyan: #38bdf8;
  --brand-emerald: #10b981;
  --brand-orange: #fb923c;
  --brand-rose: #fb7185;
  --brand-violet: #a855f7;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Header & Top Bar */
.dev-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.dev-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.dev-logo {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #38bdf8, #10b981);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #060913;
}

.dev-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dev-title span {
  color: var(--brand-cyan);
  font-weight: 500;
  margin-left: 4px;
}

.dev-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.35);
  color: var(--brand-orange);
}

.dev-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dev-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-emerald);
  box-shadow: 0 0 8px var(--brand-emerald);
}

.dev-btn-terminal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid var(--border-accent);
  color: var(--brand-cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}

.dev-btn-terminal:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--brand-cyan);
}

/* Layout */
.dev-container {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
}

/* Sidebar */
.dev-sidebar {
  width: 270px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 1rem 2rem 1.25rem;
}

.sidebar-search {
  margin-bottom: 1.25rem;
}

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 7px 10px 7px 30px;
  color: var(--text-main);
  font-size: 12.5px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 9px center;
}

.search-input:focus {
  border-color: var(--brand-cyan);
}

.nav-group {
  margin-bottom: 1.5rem;
}

.nav-group-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.15s ease;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  color: var(--brand-cyan);
  background: rgba(56, 189, 248, 0.08);
  font-weight: 600;
}

.method-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

.method-badge.post {
  background: rgba(16, 185, 129, 0.15);
  color: var(--brand-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Main Content */
.dev-content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 3rem 4rem;
}

.doc-section {
  margin-bottom: 4rem;
  scroll-margin-top: 80px;
}

.doc-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.doc-hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.doc-hero p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 780px;
  line-height: 1.6;
}

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 1.5rem;
}

.hero-meta-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 14px;
}

.meta-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-cyan);
}

/* Section Headings */
.doc-section h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: #e2e8f0;
}

.doc-section p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Alerts / Callouts */
.callout {
  margin: 1.25rem 0;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.6;
}

.callout.info {
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-left: 4px solid var(--brand-cyan);
}

.callout.security {
  background: rgba(251, 146, 60, 0.08);
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-left: 4px solid var(--brand-orange);
}

.callout-title {
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.callout.security .callout-title {
  color: var(--brand-orange);
}

.callout.info .callout-title {
  color: var(--brand-cyan);
}

/* Tables */
.param-table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-secondary);
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.param-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.param-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
  color: var(--text-muted);
}

.param-table tr:last-child td {
  border-bottom: none;
}

.param-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #e2e8f0;
}

.param-type {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--brand-violet);
  margin-left: 6px;
}

.param-req {
  font-size: 10px;
  color: var(--brand-rose);
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 6px;
}

.param-opt {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-left: 6px;
}

/* Endpoint Banner */
.endpoint-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.endpoint-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.endpoint-uri {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.endpoint-auth-tag {
  font-size: 11px;
  color: var(--brand-orange);
  background: rgba(251, 146, 60, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(251, 146, 60, 0.25);
}

/* Code Snippet Blocks */
.code-box {
  background: #040711;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  margin: 1.25rem 0;
}

.code-header {
  background: var(--bg-surface);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.code-tabs {
  display: flex;
  gap: 4px;
}

.code-tab-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.code-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.code-tab-btn.active {
  color: var(--brand-cyan);
  background: rgba(56, 189, 248, 0.12);
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 3px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #e2e8f0;
}

code {
  font-family: var(--font-mono);
}

.inline-code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
  color: #e2e8f0;
}

/* Toast Notification */
.dev-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--brand-cyan);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.dev-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Interactive Sandbox Tester */
.sandbox-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.sandbox-form-row {
  margin-bottom: 1rem;
}

.sandbox-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.sandbox-input, .sandbox-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 12px;
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.sandbox-input:focus, .sandbox-textarea:focus {
  border-color: var(--brand-cyan);
}

.sandbox-textarea {
  height: 120px;
  resize: vertical;
}

.btn-sandbox-run {
  background: linear-gradient(135deg, #0284c7, #0d9488);
  border: none;
  color: #fff;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.btn-sandbox-run:hover {
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 900px) {
  .dev-sidebar {
    display: none;
  }
  .dev-content {
    padding: 1.5rem 1rem 3rem;
  }
  .dev-header {
    padding: 0 1rem;
  }
}
