:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(16, 185, 129, 0.25);
  
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --violet-500: #8b5cf6;
  --amber-500: #f59e0b;
  --rose-500: #f43f5e;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.15);
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 10% 10%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 90%, rgba(16, 185, 129, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(139, 92, 246, 0.04) 0px, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Glass Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
  color: #fff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-text h1 span {
  color: var(--cyan-400);
}

.version-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.compliance-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-400);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald-400);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-400);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

.budget-stat-chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.budget-stat-chip .label {
  color: var(--text-muted);
  margin-right: 6px;
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(16, 185, 129, 0.15));
  border-color: var(--cyan-500);
  color: var(--text-primary);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

/* Tab Panes */
.tab-pane {
  display: none;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.25s ease-out;
}

.tab-pane.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.kpi-card {
  padding: 20px;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.kpi-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.kpi-subtext {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Color Helpers */
.text-emerald { color: var(--emerald-400); }
.text-cyan { color: var(--cyan-400); }
.text-violet { color: var(--violet-500); }
.text-amber { color: var(--amber-500); }
.text-rose { color: var(--rose-500); }

/* Pillars Grid */
.section-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.pillar-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pillar-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  align-self: flex-start;
}

.pillar-1 { background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); }
.pillar-2 { background: rgba(6, 182, 212, 0.15); color: var(--cyan-400); }
.pillar-3 { background: rgba(139, 92, 246, 0.15); color: var(--violet-500); }

.pillar-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.pillar-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pillar-feats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald-500), var(--cyan-500));
  color: #fff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-cyan {
  background: var(--cyan-500);
  color: #0f172a;
  font-weight: 700;
}

.btn-cyan:hover {
  background: var(--cyan-400);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Assets Grid */
.assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.asset-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.asset-icon {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.05);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.asset-details h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.asset-details p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.asset-meta {
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: var(--emerald-400); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--amber-500); }
.badge-info { background: rgba(6, 182, 212, 0.2); color: var(--cyan-400); }

/* Radar Feed */
.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.pane-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.pane-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.radar-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.radar-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition-smooth);
}

.radar-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: var(--shadow-glow);
}

.radar-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.radar-title-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.radar-badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radar-budget-box {
  text-align: right;
  min-width: 140px;
}

.radar-budget {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--emerald-400);
}

.radar-net {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.radar-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.radar-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* Auditor Section */
.auditor-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audit-input-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.input-wrap {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 14px;
}

.input-wrap .prefix {
  color: var(--text-muted);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
}

.input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 8px;
}

.quick-targets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  color: var(--cyan-400);
  border-color: var(--cyan-500);
}

/* Audit Results */
.audit-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.audit-header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.audit-score-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid var(--amber-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--amber-500);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

.audit-summary-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.audit-summary-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.metric-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-chips .chip {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.audit-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .audit-details-grid {
    grid-template-columns: 1fr;
  }
}

.issues-col h4, .pitch-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.issue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.issue-item {
  background: rgba(30, 41, 59, 0.5);
  border-left: 3px solid var(--rose-500);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.issue-item.medium { border-left-color: var(--amber-500); }
.issue-item.low { border-left-color: var(--cyan-500); }

.issue-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.issue-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pitch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pitch-output {
  width: 100%;
  height: 240px;
  background: rgba(10, 15, 29, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: none;
  outline: none;
}

/* Landing Preview Frame */
.landing-preview-container {
  padding: 0;
  overflow: hidden;
}

.preview-browser-bar {
  background: rgba(30, 41, 59, 0.95);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.browser-url {
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.8);
  padding: 3px 14px;
  border-radius: var(--radius-full);
  margin-left: 8px;
}

.landing-hero {
  text-align: center;
  padding: 48px 24px 32px;
  max-width: 780px;
  margin: 0 auto;
}

.hero-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--cyan-400);
  letter-spacing: 0.08em;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.guarantee-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Pricing Grid */
.pricing-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding: 24px;
  background: rgba(10, 15, 29, 0.4);
}

.pricing-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--cyan-500);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.08), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.2);
}

.popular-ribbon {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--cyan-500), var(--emerald-500));
  color: #0f172a;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.plan-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.plan-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.plan-price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.plan-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 12px 0;
  flex: 1;
}

/* Ledger & Simulator */
.ledger-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .ledger-grid {
    grid-template-columns: 1fr;
  }
}

.ledger-table-card h3, .sim-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.table-responsive {
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.ledger-table th, .ledger-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.ledger-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.ledger-table tfoot th {
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.slider {
  width: 100%;
  accent-color: var(--cyan-400);
}

.sim-summary {
  background: rgba(10, 15, 29, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
}

.sim-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.sim-row.highlight {
  font-size: 1.05rem;
}

/* Modal */
.glass-modal {
  border: none;
  background: transparent;
  margin: auto;
  max-width: 650px;
  width: 90%;
  outline: none;
}

.glass-modal::backdrop {
  background: rgba(10, 15, 29, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-body pre {
  background: rgba(10, 15, 29, 0.9);
  padding: 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #e2e8f0;
  white-space: pre-wrap;
}

/* Footer */
.app-footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
}
