/* OpenRectangle — Dark Theme */
:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #111638;
  --bg-card: #161b4a;
  --bg-card-hover: #1c2258;
  --border: #2a2f6e;
  --text-primary: #e8eaf6;
  --text-secondary: #9fa4c4;
  --text-muted: #6b70a0;
  --accent: #635bff;
  --accent-hover: #7c75ff;
  --accent-glow: rgba(99, 91, 255, 0.3);
  --green: #3ecf8e;
  --green-bg: rgba(62, 207, 142, 0.15);
  --red: #ff5b5b;
  --red-bg: rgba(255, 91, 91, 0.15);
  --yellow: #f5a623;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Utility */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius-sm); font-size: 15px;
  font-weight: 600; border: none; cursor: pointer; transition: all 0.2s;
  font-family: var(--font);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 20px var(--accent-glow); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.85; }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 12px; font-weight: 500; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select {
  width: 100%; padding: 10px 14px; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 15px; font-family: var(--font);
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.form-error { color: var(--red); font-size: 13px; margin-top: 6px; }

/* Navbar */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 39, 0.9); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
.navbar .logo { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.navbar .logo span { color: var(--accent); }
.navbar nav { display: flex; gap: 24px; align-items: center; }
.navbar nav a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.navbar nav a:hover { color: var(--text-primary); }

/* Hero */
.hero {
  text-align: center; padding: 100px 24px 60px;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,91,255,0.12) 0%, transparent 70%);
}
.hero h1 { font-size: 52px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; }
.hero h1 .accent { color: var(--accent); }
.hero p { font-size: 20px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 80px 24px; }
.section-title { font-size: 36px; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-sub { font-size: 18px; color: var(--text-secondary); text-align: center; margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Steps Grid */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.step-card { text-align: center; padding: 32px; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; margin-bottom: 16px;
}
.step-card h3 { font-size: 20px; margin-bottom: 8px; color: var(--text-primary); }
.step-card p { color: var(--text-secondary); font-size: 15px; }

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.feature-card { padding: 32px; }
.feature-card .icon { font-size: 32px; margin-bottom: 12px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-primary); }
.feature-card p { color: var(--text-secondary); font-size: 14px; }

/* Pricing */
.pricing-card {
  max-width: 400px; margin: 0 auto; text-align: center; padding: 40px;
  border-color: var(--accent);
}
.pricing-card .price { font-size: 48px; font-weight: 800; color: var(--accent); }
.pricing-card .price-sub { color: var(--text-secondary); font-size: 16px; margin-bottom: 24px; }
.pricing-card ul { list-style: none; text-align: left; margin-bottom: 24px; }
.pricing-card ul li { padding: 8px 0; color: var(--text-secondary); font-size: 15px; }
.pricing-card ul li::before { content: '✓'; color: var(--green); margin-right: 10px; font-weight: 700; }

/* Footer */
.footer {
  border-top: 1px solid var(--border); padding: 40px 24px;
  text-align: center; color: var(--text-muted); font-size: 14px;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }

/* Dashboard Layout */
.dash-layout { display: flex; min-height: calc(100vh - 65px); }
.dash-sidebar {
  width: 240px; background: var(--bg-secondary); border-right: 1px solid var(--border);
  padding: 24px 16px; flex-shrink: 0;
}
.dash-sidebar a {
  display: block; padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 14px; margin-bottom: 4px;
}
.dash-sidebar a:hover, .dash-sidebar a.active { background: var(--bg-card); color: var(--text-primary); }
.dash-main { flex: 1; padding: 32px; overflow-y: auto; }
.dash-main h2 { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

/* Balance Card */
.balance-card {
  display: flex; gap: 32px; flex-wrap: wrap; align-items: center;
}
.balance-amount { font-size: 42px; font-weight: 800; }
.balance-amount small { font-size: 16px; color: var(--text-muted); font-weight: 400; }

/* Progress Bar */
.progress-bar { background: var(--bg-secondary); border-radius: 6px; height: 10px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; border-radius: 6px; background: var(--accent); transition: width 0.3s; }
.progress-fill.warning { background: var(--yellow); }
.progress-fill.danger { background: var(--red); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
td { color: var(--text-secondary); }

/* Status badges */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.badge-approved { background: var(--green-bg); color: var(--green); }
.badge-denied { background: var(--red-bg); color: var(--red); }
.badge-pending { background: rgba(245, 166, 35, 0.15); color: var(--yellow); }

/* Code block */
.code-block {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px; overflow-x: auto; position: relative; color: var(--text-secondary);
  white-space: pre; line-height: 1.5;
}
.code-block .copy-btn {
  position: absolute; top: 8px; right: 8px; background: var(--accent);
  color: #fff; border: none; padding: 4px 12px; border-radius: 4px;
  font-size: 11px; cursor: pointer;
}

/* Auth pages */
.auth-page {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 65px); padding: 24px;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 28px; margin-bottom: 8px; }
.auth-card .subtitle { color: var(--text-secondary); margin-bottom: 24px; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 20px; font-size: 14px; z-index: 1000; animation: slideUp 0.3s;
}
.toast.success { border-color: var(--green); }
.toast.error { border-color: var(--red); }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Trust signals */
.trust-signal {
  text-align: center; color: var(--text-muted); font-size: 14px;
}
.trust-signal-small {
  text-align: center; color: var(--text-muted); font-size: 12px;
}

/* Checkbox */
.checkbox-group { margin-bottom: 16px; }
.checkbox-label {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent);
  flex-shrink: 0;
}

/* Form success */
.form-success { color: var(--green); font-size: 13px; margin-top: 6px; }

/* Legal content */
.legal-content h3 { font-size: 16px; color: var(--text-primary); margin-top: 24px; margin-bottom: 8px; }
.legal-content p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* Next steps list */
.next-steps { padding-left: 20px; margin-top: 12px; }
.next-steps li { padding: 6px 0; color: var(--text-secondary); font-size: 14px; }

/* Footer powered */
.footer-powered { color: var(--text-muted); font-size: 12px; margin-bottom: 8px; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .dash-sidebar { display: none; }
  .dash-main { padding: 20px; }
  .balance-amount { font-size: 32px; }
  .navbar nav { gap: 12px; }
  .navbar nav a { font-size: 13px; }
}
