/* =============================================================
   State of the Sector — Dashboard
   ============================================================= */

:root {
  --primary:     #1e3a8a;
  --primary-mid: #2563eb;
  --green:       #059669;
  --green-mid:   #10b981;
  --green-light: #d1fae5;
  --text:        #0f172a;
  --text-body:   #334155;
  --text-muted:  #64748b;
  --bg:          #f1f5f9;
  --bg-white:    #ffffff;
  --border:      #e2e8f0;
  --sidebar-bg:  #0f172a;
  --sidebar-w:   240px;
  --nav-h:       60px;
  --r:           12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; line-height: 1.2; }

/* ── Top Nav ──────────────────────────────────────────────── */
.d-nav {
  background: var(--sidebar-bg); height: var(--nav-h); padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.d-brand { display: flex; align-items: center; gap: .65rem; }
.d-brand-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  color: white; font-size: .8rem;
}
.d-brand-name { font-family: 'Space Grotesk', sans-serif; font-size: .9rem; font-weight: 700; color: white; line-height: 1; }
.d-brand-sub  { font-size: .64rem; color: #475569; line-height: 1; margin-top: 2px; }
.d-nav-right  { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.d-nav-links {
  display: flex; align-items: center; gap: .25rem;
  flex: 1; justify-content: center;
}
.d-nav-a {
  font-size: .83rem; color: #64748b; font-weight: 500;
  padding: .4rem .75rem; border-radius: 8px; transition: color .15s, background .15s;
}
.d-nav-a:hover { color: white; background: rgba(255,255,255,.06); }
.d-nav-a.active { color: white; background: rgba(5,150,105,.25); font-weight: 600; }
.d-tag {
  font-size: .72rem; font-weight: 700; color: #d1fae5;
  background: rgba(5,150,105,.22); border: 1px solid rgba(16,185,129,.3);
  padding: .3rem .75rem; border-radius: 100px;
  display: flex; align-items: center; gap: .4rem;
}
.d-back {
  font-size: .83rem; color: #64748b; font-weight: 500;
  display: flex; align-items: center; gap: .4rem; transition: color .15s;
}
.d-back:hover { color: white; }

/* ── App Shell ────────────────────────────────────────────── */
.d-shell {
  display: flex; flex: 1;
  min-height: calc(100vh - var(--nav-h) - 48px);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.d-sidebar {
  width: var(--sidebar-w); background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 1.5rem 0;
  flex-shrink: 0;
}
.d-sidebar-section { padding: 0 1rem; margin-bottom: .5rem; }
.d-sidebar-label {
  font-size: .66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: var(--text-muted);
  padding: .5rem .5rem .3rem; margin-bottom: .2rem;
}
.d-nav-item {
  display: flex; align-items: center; gap: .65rem;
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  padding: .6rem .75rem; border-radius: 9px; margin: .1rem 0;
  transition: background .15s, color .15s;
  cursor: not-allowed; opacity: .55;
}
.d-nav-item i { width: 16px; text-align: center; font-size: .85rem; }
.d-nav-item.active {
  background: var(--green-light); color: var(--green);
  font-weight: 600; cursor: default; opacity: 1;
}
.d-nav-item.active i { color: var(--green); }

/* ── Main Content ─────────────────────────────────────────── */
.d-content {
  flex: 1; padding: 2.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

/* ── Coming Soon Card ─────────────────────────────────────── */
.d-cs-card {
  background: var(--bg-white); border-radius: 20px;
  border: 1px solid var(--border); padding: 3rem;
  max-width: 500px; width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,.07); text-align: center;
}
.d-icon-wrap {
  width: 72px; height: 72px; border-radius: 18px;
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; color: white; margin: 0 auto 1.5rem;
}
.d-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  padding: .35rem .9rem; border-radius: 100px; margin-bottom: 1.5rem;
  background: var(--green-light); color: #065f46; border: 1px solid #6ee7b7;
}
.d-cs-card h1 { font-size: 1.8rem; margin-bottom: .75rem; }
.d-divider {
  width: 40px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--green), var(--green-mid));
  margin: 1.25rem auto;
}
.d-lead { font-size: .95rem; color: var(--text-muted); line-height: 1.75; }

/* Bar chart preview */
.d-preview { display: flex; align-items: flex-end; gap: .5rem; height: 70px; margin: 2rem auto; max-width: 200px; }
.d-bar {
  flex: 1; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--green-mid), var(--green)); opacity: .25;
}

/* Features */
.d-features { list-style: none; text-align: left; display: flex; flex-direction: column; gap: .7rem; margin: 1.5rem 0; }
.d-features li { display: flex; align-items: flex-start; gap: .7rem; font-size: .9rem; color: var(--text-body); }
.d-features li i { color: var(--green); margin-top: .15rem; flex-shrink: 0; }

/* Error state */
.d-error-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: #fef2f2; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #ef4444; margin: 0 auto 1.5rem;
}
code {
  background: #f8fafc; border: 1px solid var(--border);
  padding: .15rem .45rem; border-radius: 5px; font-size: .85rem; font-family: monospace;
}

/* ── Footer ───────────────────────────────────────────────── */
.d-footer {
  border-top: 1px solid var(--border); padding: .85rem 1.5rem;
  font-size: .78rem; color: var(--text-muted); background: var(--bg-white);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.d-footer a { color: var(--green); font-weight: 500; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .d-sidebar  { display: none; }
  .d-content  { padding: 1.5rem; }
  .d-cs-card  { padding: 2rem 1.5rem; }
  .d-nav-right .d-tag { display: none; }
  .d-nav-links { display: none; }
}
