/* ============================================
   CBPP Platform – Professional Styles
   ============================================ */

:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #0f172a;
    background-image:
    linear-gradient(rgba(15, 23, 42, 0.70), rgba(15, 23, 42, 0.70)),
    url("../assets/Bg.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 36px;
    padding: 0 8px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.logo-text h2 {
    font-size: 15px;
    font-weight: 600;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-muted);
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    transform: translateX(3px);
}

.nav-link.active {
    background-color: rgba(59, 130, 246, 0.18);
    color: var(--primary);
    font-weight: 500;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 12px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.4;
}

/* ========== Main Content ========== */
.main-content {
    margin-left: 260px;
    padding: 32px 40px;
    width: calc(100% - 260px);
    min-height: 100vh;
    background: transparent;
}

.page-header {
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== Cards ========== */
.card {
    background: rgba(30, 41, 59, 0.28);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease;
}

.card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

/* ========== Metrics ========== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.metric-card {
    background: rgba(30, 41, 59, 0.28);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease;
}

.metric-card:hover {
    border-color: rgba(59, 130, 246, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    background: rgba(30, 41, 59, 0.72);
}

.metric-card .label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.metric-card .value {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.metric-card .subtext {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
    background-color: #334155;
}

.btn-secondary:hover {
    background-color: #475569;
}

/* ========== Form ========== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    max-width: 280px;
    padding: 10px 14px;
    background-color: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== Table ========== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

tr {
    transition: background-color 0.15s ease;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ========== Badges ========== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-high {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-low {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

/* ========== Insights ========== */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.insight-card {
    background: rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s ease;
}

.insight-card:hover {
    border-color: rgba(71, 85, 105, 0.9);
    background: rgba(30, 41, 59, 0.65);
}

.insight-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
}

.insight-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ========== Charts ========== */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.chart-card {
    background: rgba(30, 41, 59, 0.28);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease;
}

.chart-card:hover {
    border-color: rgba(71, 85, 105, 0.9);
    background: rgba(30, 41, 59, 0.72);
}

.chart-card h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.chart-card .subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

/* ========== Filter Badge ========== */
.window-badge {
    display: inline-block;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insights-grid,
    .charts-row {
        grid-template-columns: 1fr;
    }
}

/* ===== About page adjustments ===== */
.about-card {
    background: rgba(15, 23, 42, 0.62) !important;
}

.about-card h3 {
    font-size: 16px;
    font-weight: 600;
}

.capability-card {
    background: rgba(15, 23, 42, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
}
.dark-card {
    background: rgba(15, 23, 42, 0.70) !important;
}
/* ============================================
   MOBILE HEADER + HAMBURGER
   ============================================ */

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.95);
  color: #f1f5f9;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.sidebar-top {
  display: block;
}

@media (max-width: 900px) {
  body {
    display: block;
    background-attachment: scroll;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 14px;
  }

  .sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }

  .sidebar-top .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    padding: 0;
    min-width: 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-menu {
    display: none;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.96);
  }

  .sidebar.open .nav-menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .nav-link {
    padding: 10px 12px;
    justify-content: flex-start;
  }

  .sidebar-footer {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 16px !important;
  }

  .metrics-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .insights-grid,
  .charts-row {
    grid-template-columns: 1fr !important;
  }

  .page-header h1 {
    font-size: 22px;
  }
}
/* Light glow for all page boxes – minimal, non-breaking */
.card,
.metric-card,
.insight-card,
.chart-card,
.about-card,
.capability-card,
.dark-card {
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.18),
        0 0 22px rgba(91, 141, 239, 0.08);
}

.card:hover,
.metric-card:hover,
.insight-card:hover,
.chart-card:hover,
.about-card:hover,
.capability-card:hover,
.dark-card:hover {
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.22),
        0 0 28px rgba(91, 141, 239, 0.12);
}