/* RCI Command Centre — Shared Styles */

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

:root {
  --navy: #0f2044;
  --blue: #1d6fa4;
  --accent: #3b9edd;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --bg: #f0f4f8;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --sidebar-w: 230px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
#sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand .logo {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.sidebar-brand .tagline {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.nav-section {
  padding: 12px 20px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.nav-link.active {
  background: rgba(61,158,221,0.15);
  color: var(--accent);
  border-left-color: var(--accent);
}

.nav-link .icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ── MAIN CONTENT ── */
#main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar h1 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.topbar .meta {
  font-size: 13px;
  color: var(--muted);
}

.content {
  padding: 32px;
  flex: 1;
}

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.card-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── STAT BOXES ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-box .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-box .stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.badge-green  { background: #d1fae5; color: #065f46; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-amber  { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-navy   { background: #e0e7ff; color: #1e40af; }

/* ── TABLES ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }

/* ── VENTURE CARDS ── */
.venture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.venture-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  border-top: 3px solid var(--border);
}

.venture-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.venture-card.active   { border-top-color: var(--green); }
.venture-card.soon     { border-top-color: var(--amber); }
.venture-card.planned  { border-top-color: var(--blue); }
.venture-card.hold     { border-top-color: #cbd5e1; }

.venture-card .vc-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.venture-card .vc-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.venture-card .vc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── PROGRESS BAR ── */
.progress-wrap { margin: 8px 0; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--muted);
}

.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.4s ease;
}

/* ── ACTIVITY FEED ── */
.activity-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex-shrink: 0;
}

.activity-dot.green { background: var(--green); }
.activity-dot.amber { background: var(--amber); }

.activity-text { font-size: 14px; line-height: 1.5; }
.activity-date { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── CHECKLIST ── */
.checklist { list-style: none; }
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.checklist li:last-child { border-bottom: none; }

.check-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.check-done  { color: var(--green); }
.check-todo  { color: #cbd5e1; }
.check-wip   { color: var(--amber); }

.check-text.done { color: var(--muted); text-decoration: line-through; }

/* ── FILE LINKS ── */
.file-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  transition: all 0.15s;
  margin-bottom: 8px;
}

.file-link:hover {
  background: #f0f7ff;
  border-color: var(--accent);
  color: var(--blue);
}

.file-link .file-icon { font-size: 20px; }
.file-link .file-name { font-weight: 500; flex: 1; }
.file-link .file-meta { font-size: 12px; color: var(--muted); }

/* ── GRID HELPERS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

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

/* ── SECTION HEADING ── */
.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* ── PAGE HERO ── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1d4080 100%);
  color: white;
  border-radius: 14px;
  padding: 30px 32px;
  margin-bottom: 28px;
}

.page-hero h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.page-hero p  { font-size: 14px; opacity: 0.75; }
