/* ─── LedgerBridge Design System (StatementBridge style) ──────────── */

:root {
  --navy: #1b2a4a;
  --navy-light: #243454;
  --navy-dark: #142038;
  --accent: #e8511a;
  --accent-hover: #d14510;
  --accent-light: rgba(232, 81, 26, 0.1);
  --bg: #f0f2f5;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-light: #cbd5e1;
  --border: #e2e8f0;
  --success: #16a34a;
  --error: #dc2626;
  --warning: #f59e0b;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-lg: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* ─── Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Navbar ───────────────────────────────────────────────────────── */
.navbar { padding: 0.75rem 0; position: sticky; top: 0; background: var(--bg-white); z-index: 100; box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); }
.nav-content { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: baseline; gap: 0.4rem; text-decoration: none; }
.logo-brand { font-weight: 800; font-size: 1.3rem; color: var(--navy); letter-spacing: 0.5px; }
.logo-product { font-weight: 400; font-size: 0.85rem; color: var(--text-secondary); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--text); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active { color: var(--accent); font-weight: 600; }
.user-label { color: var(--text-secondary); font-size: 0.85rem; }

/* ─── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 1.25rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all 0.15s;
  text-decoration: none !important; text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: white; }
.btn-outline-white { background: transparent; border-color: white; color: white; }
.btn-outline-white:hover { background: white; color: var(--navy); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ─── Hero ─────────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  background: var(--navy);
  color: white;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; right: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232, 81, 26, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  font-size: 2.75rem; font-weight: 800; margin-bottom: 1.25rem;
  letter-spacing: -0.02em; line-height: 1.15; text-transform: uppercase;
  border-left: 4px solid var(--accent); padding-left: 1.25rem;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-light); max-width: 550px;
  margin: 0 0 2.5rem; padding-left: 1.25rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; padding-left: 1.25rem; margin-bottom: 3rem; }
.hero-demo { max-width: 600px; }
.hero-demo pre {
  background: var(--navy-dark); color: #e2e8f0; padding: 1.5rem; border-radius: var(--radius-lg);
  text-align: left; font-family: var(--mono); font-size: 0.85rem; overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-demo .comment { color: #64748b; }
.hero-demo .prompt { color: var(--accent); font-weight: 700; }
.hero-demo .response { color: #4ade80; }

/* ─── Features ─────────────────────────────────────────────────────── */
.features { padding: 4rem 0; background: var(--bg); }
.features h2 { text-align: center; font-size: 2rem; margin-bottom: 2.5rem; color: var(--navy); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--navy); color: white; padding: 2rem; border-radius: var(--radius-lg);
  border-top: 3px solid var(--accent); position: relative;
}
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: var(--accent); color: white;
  border-radius: var(--radius); font-size: 1.5rem; margin-bottom: 1rem;
}
.feature-card h3 { margin-bottom: 0.5rem; font-size: 1rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.feature-card p { color: var(--text-light); font-size: 0.9rem; line-height: 1.6; }
.feature-card .btn { margin-top: 1.25rem; }

/* ─── Trust Bar ────────────────────────────────────────────────────── */
.trust-bar { padding: 1.5rem 0; background: var(--bg-white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-items { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 0.5rem; color: var(--text-secondary); font-size: 0.85rem; }
.trust-icon { font-size: 1.1rem; }

/* ─── Capabilities ─────────────────────────────────────────────────── */
.capabilities { padding: 4rem 0; }
.capabilities h2 { text-align: center; font-size: 2rem; margin-bottom: 2rem; color: var(--navy); }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.cap-item {
  display: flex; flex-direction: column; padding: 1.25rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-white); border-left: 3px solid var(--accent);
}
.cap-item strong { color: var(--accent); margin-bottom: 0.25rem; }
.cap-item span { color: var(--text-secondary); font-size: 0.9rem; }

/* ─── CTA ──────────────────────────────────────────────────────────── */
.cta { padding: 4rem 0; text-align: center; background: var(--navy); color: white; }
.cta h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.cta p { color: var(--text-light); margin-bottom: 1.5rem; }

/* ─── Pricing ──────────────────────────────────────────────────────── */
.pricing-hero { padding: 3rem 0; text-align: center; background: var(--navy); color: white; }
.pricing-hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.pricing-hero p { color: var(--text-light); }
.pricing-cards { padding: 3rem 0 4rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.pricing-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; position: relative; background: var(--bg-white);
}
.pricing-card-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: white; padding: 0.2rem 1rem;
  border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
}
.pricing-header { text-align: center; margin-bottom: 1.5rem; }
.pricing-header h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--navy); }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: var(--navy); }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-secondary); }
.pricing-yearly { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }
.pricing-features { list-style: none; margin-bottom: 2rem; }
.pricing-features li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.pricing-features li:last-child { border-bottom: none; }

/* ─── Auth ─────────────────────────────────────────────────────────── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 60px); }
.auth-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); }
.auth-card h2 { margin-bottom: 1.5rem; text-align: center; color: var(--navy); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; font-weight: 500; }
.form-group input, .form-group select {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9rem; font-family: var(--font);
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-error { background: #fef2f2; color: var(--error); padding: 0.75rem; border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 1rem; }
.auth-switch { text-align: center; margin-top: 1rem; font-size: 0.85rem; color: var(--text-secondary); }

/* ─── Dashboard ────────────────────────────────────────────────────── */
.dashboard { padding: 2rem 0 4rem; }
.dashboard h1 { margin-bottom: 2rem; color: var(--navy); }
.dash-section { margin-bottom: 2.5rem; }
.dash-section h2 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--navy); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-header h2 { margin-bottom: 0; }
.config-block {
  background: var(--navy-dark); color: #e2e8f0; padding: 1rem; border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.8rem; overflow-x: auto; margin-bottom: 0.75rem;
  white-space: pre;
}
.connectors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.connector-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem;
  background: var(--bg-white); border-top: 3px solid var(--accent);
}
.connector-card h4 { margin-bottom: 0.5rem; color: var(--navy); }
.connector-meta { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.connector-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.status-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.75rem; font-weight: 500; padding: 0.15rem 0.5rem;
  border-radius: 20px;
}
.status-badge.connected { background: #dcfce7; color: #166534; }
.status-badge.disconnected { background: #fef2f2; color: #991b1b; }
.connector-url { margin-bottom: 0.75rem; }
.connector-url label { font-size: 0.75rem; color: var(--text-secondary); display: block; margin-bottom: 0.25rem; }
.url-row { display: flex; align-items: center; gap: 0.5rem; }
.url-row code {
  flex: 1; padding: 0.4rem 0.6rem; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--mono); font-size: 0.75rem; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.search-input {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.85rem; margin-bottom: 0.75rem;
  font-family: var(--font);
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.empty-state { color: var(--text-secondary); text-align: center; padding: 2rem; }

/* ─── Modal ────────────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgb(0 0 0 / 0.5);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.modal-content {
  background: var(--bg-white); border-radius: var(--radius-lg); padding: 2rem;
  max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--text-secondary); line-height: 1; padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
}
.modal-close:hover { color: var(--text); background: var(--bg); }
.modal-content h3 { margin-bottom: 1.5rem; color: var(--navy); }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Division & Endpoint lists */
.division-list { display: flex; flex-direction: column; gap: 0.5rem; }
.division-item {
  display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-white);
  cursor: pointer; text-align: left; width: 100%; font: inherit; color: var(--text);
}
.division-item:hover { border-color: var(--accent); background: var(--accent-light); }
.division-item.active { border-color: var(--accent); background: var(--accent-light); }
.division-item .badge {
  margin-left: auto; font-size: 0.75rem; padding: 0.15rem 0.5rem;
  background: var(--accent); color: white; border-radius: 999px;
}

.endpoint-list { max-height: 400px; overflow-y: auto; }
.endpoint-toggle { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; cursor: pointer; }
.endpoint-toggle input { margin: 0; accent-color: var(--accent); }
.endpoint-path { color: var(--text-secondary); font-size: 0.8rem; font-family: var(--mono); }
.endpoint-category { margin-bottom: 1rem; }
.endpoint-category h4 { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.25rem; border-bottom: 1px solid var(--border); padding-bottom: 0.25rem; }

/* ─── Docs ─────────────────────────────────────────────────────────── */
.docs-page { padding: 2rem 0 4rem; }
.docs-page h1 { font-size: 2rem; margin-bottom: 2rem; color: var(--navy); }
.docs-section { margin-bottom: 2.5rem; background: var(--bg-white); padding: 2rem; border-radius: var(--radius-lg); }
.docs-section h2 { font-size: 1.5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--accent); padding-bottom: 0.5rem; color: var(--navy); }
.docs-section ol, .docs-section ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.docs-section li { margin-bottom: 0.5rem; }
.docs-section pre {
  background: var(--navy-dark); color: #e2e8f0; padding: 1rem; border-radius: var(--radius);
  font-family: var(--mono); font-size: 0.8rem; overflow-x: auto; margin: 1rem 0;
}
.docs-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.docs-table th, .docs-table td { padding: 0.6rem 0.75rem; border: 1px solid var(--border); text-align: left; font-size: 0.85rem; }
.docs-table th { background: var(--navy); color: white; font-weight: 600; }
.docs-table code { background: var(--bg); padding: 0.1rem 0.35rem; border-radius: 3px; font-size: 0.8rem; }

/* ─── Footer ───────────────────────────────────────────────────────── */
.footer { padding: 2rem 0; background: var(--navy); color: var(--text-light); text-align: center; font-size: 0.85rem; }
.footer a { color: white; }

/* ─── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .nav-links { gap: 0.75rem; }
  .pricing-grid { grid-template-columns: 1fr; }
  .trust-items { gap: 1.5rem; }
  .feature-grid { grid-template-columns: 1fr; }
}
