/*
 * UWA CRM SaaS Theme
 * Version: 4.3.0
 * Last Updated: 2025-07-16
 * Author: Ben Ihesiaba
 * Mobile-first, Production-ready
 */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* === Color Variables === */
:root {
  --primary-50:  #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;
  --accent-600:  #7c3aed;
  --neutral-50:  #f8fafc;
  --neutral-200: #e2e8f0;
  --neutral-600: #475569;
  --neutral-800: #1e293b;
}

/* === Reset & Base === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: var(--neutral-50);
  color: var(--neutral-800);
  padding-top: 100px;
  padding-bottom: 80px;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  line-height: 1.2;
}
.container {
  width: 100%;
  padding: 0 0.75rem;
  margin: 0 auto;
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--primary-700);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.navbar-brand {
  font-weight: 600;
  font-size: 1rem;
  color: white;
  text-decoration: none;
}
.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
}
.navbar-nav {
  display: none;
  flex-direction: column;
  width: 100%;
}
.navbar-nav.open {
  display: flex;
}
.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 0;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-200);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* === Sidebar === */
.sidebar {
  position: fixed;
  top: 100px;
  left: 0;
  width: 100%;
  height: calc(100vh - 100px);
  background: #006666;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
  overflow-y: auto;
  color: white;
}
.sidebar.open {
  transform: translateX(0);
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.15);
}
.sidebar-section h6 {
  font-size: 0.9rem;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  color: #cceeee;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.collapsible-content {
  padding-left: 1rem;
  transition: all 0.3s ease;
}
.collapsible-content.collapsed {
  display: none;
}

/* === Footer === */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to right, var(--primary-800), var(--primary-900));
  color: white;
  padding: 0.75rem;
  text-align: center;
  z-index: 100;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.75rem;
}
.footer-link {
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: var(--primary-200);
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255,255,255,0.1);
  border-radius: 4px;
  color: white;
  width: 28px;
  height: 28px;
  transition: background 0.2s ease;
}
.footer-icon:hover {
  background-color: rgba(255,255,255,0.2);
}
.copyright {
  font-size: 0.7rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

/* === KPI Cards === */
.kpi-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.kpi-card-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kpi-card-body {
  padding: 1rem;
  text-align: center;
}
.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #333;
}

/* === Responsive Card Grid === */
@media (min-width: 576px) {
  #task-kpis > .row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }
  #task-kpis .col {
    flex: 1 0 calc(50% - 1rem);
    min-width: 160px;
  }
}
@media (min-width: 768px) {
  body {
    font-size: 16px;
  }
  #task-kpis .col {
    flex: 1 0 calc(33.333% - 1rem);
  }
  .navbar {
    padding: 1rem;
  }
  .menu-toggle {
    display: none;
  }
  .navbar-nav {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }
}
@media (min-width: 992px) {
  #task-kpis .col {
    flex: 1 0 calc(20% - 1rem);
  }
  .container {
    max-width: 960px;
  }
}
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}
