/* ========================================
   GLOBAL THEME & FONT
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0d6efd;
  --success: #198754;
  --danger: #dc3545;
  --warning: #ffc107;
  --dark: #212529;
  --light: #f8f9fa;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-hover: #334155;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}



/* ===========================
   LOGIN PAGE STYLES
   =========================== */

   body {
    background: #f5f7fb;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont;
  }
  
  /* Main container */
  .login-wrapper {
    width: 100%;
    max-width: 1000px;
    min-height: 540px;
    background: #ffffff;
    border-radius: 24px;
    display: flex;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  }
  
  /* LEFT PANEL */
  .login-left {
    width: 45%;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .login-left .logo {
    height: auto;
    margin-bottom: 30px;
  }
  
  .login-left h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
  }
  
  .login-left p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 30px;
  }
  
  /* Form */
  .form-label {
    font-weight: 500;
  }
  
  .form-control {
    height: 48px;
    border-radius: 8px;
  }
  
  /* Button */
  .btn-login {
    height: 48px;
    border-radius: 8px;
    background: #ff7a00;
    border: none;
    color: #ffffff;
    font-weight: 600;
  }
  
  .btn-login:hover {
    background: #e66f00;
  }
  
  /* RIGHT PANEL */
  .login-right {
    width: 55%;
    background: #f1f3f7;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .login-right img {
    max-width: 80%;
    height: auto;
  }
  
  /* Alerts */
  .alert {
    font-size: 14px;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .login-wrapper {
      flex-direction: column;
    }
  
    .login-left {
      width: 100%;
      padding: 40px;
    }
  
    .login-right {
      display: none;
    }
  }


* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: #2d3748;
  background: #f1f5f9;
  margin: 0;
  overflow-x: hidden;
}


/* ========================================
      LAYOUT
   ======================================== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1025; /* Below sidebar (1030), above topbar (1020) */
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: white;
  color: var(--sidebar-text);
  z-index: 1030;
  padding: 1rem 0.75rem;
  overflow-y: auto;
  border-right: 1px solid rgba(0, 0, 0, 0.085);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.main {
  min-height: 100vh;
  padding: 1rem;
  transition: var(--transition);
  background: #f8fafc;
}

body.sidebar-collapsed .main {
  margin-left: 0;
}

/* ========================================
      TOPBAR
   ======================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: white;
  border-bottom: 1px solid #e2e8f0;

  backdrop-filter: blur(10px);
  /*box-shadow: 0 2px 10px rgba(0,0,0,0.08)*/
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .btn {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
}


.main  .avatar{
  width:50px;
  height:40px;
  border-radius:50%;
  background:#359E7B;
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:400;
  font-size: 1rem;
}

.rm-headers .avatar{
  width:40px;
  height:40px;
  border-radius:50%;
  background:#359E7B;
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:400;
  font-size: 1rem;
}
/* ========================================
      SIDEBAR HEADER
      ======================================== */
.sidebar-header {
  padding: 0 1rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-header .card{
  background-color: #F8F5FF;
  box-shadow: none;
  border: 1px solid #e2e8f0b9;
  padding: 10px;
}

.sidebar-header .card .avatar{
  width:60px;
  height:40px;
  border-radius:50%;
  background:#359E7B;
  color:white;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:400;
  font-size: 1rem;
}

.sidebar-header img {
  width: 70%;
  height: 60%;
  object-fit: contain;
  border-radius: 0px;
}

.sidebar-header .fw-bold {
  font-size: 0.8rem;
  color: black;
  margin-top: 0.5rem;
  text-align: center;
}

/* ========================================
      SIDEBAR NAV
   ======================================== */
.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.25rem 0rem;
  color: black;
  text-decoration: none;
  border-radius: 8px;
  margin: 0rem 0.5rem;
  font-weight: 400;
  transition: var(--transition);
}

.sidebar-nav .nav-link i {
  width: 20px;
  font-size: 1.1rem;
  text-align: center;
}

.sidebar-nav .nav-link:hover {
  color: black;
  transform: translateX(4px);
  padding-left: 5px;
}

.sidebar-nav .nav-link.active {
  color: black;
  font-weight:600;

}

.sidebar-nav .nav-link.text-danger:hover {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
}

.sidebar-nav .nav-link .bi.bi-speedometer2 {
  color: #6366f1;
}

.sidebar-nav .nav-link .bi.bi-list-ul {
  color: #A755F7;
}

.sidebar-nav .nav-link .bi.bi-person-badge{
  color: #A755F7;
}

.sidebar-nav .nav-link .bi.bi-bullseye{
  color: #D95829;
}

.sidebar-nav .nav-link .bi.bi-cloud-upload{
  color: #11B981;
}
.sidebar-nav .nav-link .bi.bi-gear{
  color: #A755F7;
}
.sidebar-nav .nav-link .bi.bi-person-fill-gear{
  color: #11B981
}
.sidebar-nav .nav-link .bi.bi-shield-lock{
  color: #D95829;
}
.sidebar-nav .nav-link .bi.bi-box-arrow-right{
  color: #EF4444;
}

/* ========================================
      SIDEBAR FOOTER
   ======================================== */
.sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  opacity: 0.8;
}



/* ========================================
      CARDS
      ======================================== */
.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-4px);
}

.card-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  border: none;
  padding: 1rem;
}

.card-kpi .card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}

.kpi-icon {
  font-size: 1rem;
  opacity: 0.9;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.card-kpi.kpi-acquisition {
  background-color: #e9f5ff;
  border-left: 2px solid #007bff;
  border-radius: 0px;

}

.card-kpi.kpi-acquisition .card-title,
.card-kpi.kpi-acquisition .kpi-value,
.card-kpi.kpi-acquisition .small {
  color: #333;
}


.card-kpi.kpi-running-sip {
  background-color: rgba(255, 255, 255, 0.168);
  border-left: 2px solid #afd6d9;
  border-radius: 0px;
}

.card-kpi.kpi-running-sip .card-title,
.card-kpi.kpi-running-sip .kpi-value,
.card-kpi.kpi-running-sip .small {
  color: #333;
}

.card-kpi.kpi-sip-trend {
  background-color: #f0fff4;
  border-left: 2px solid #28a745;
  border-radius: 0px;
}

.card-kpi.kpi-sip-trend .card-title,
.card-kpi.kpi-sip-trend .kpi-value,
.card-kpi.kpi-sip-trend .small {
color: #333;
}

.card-kpi.kpi-net-sales {
  background-color: rgba(237, 117, 109, 0.053);
  border-left: 2px solid rgb(237, 118, 109);
  border-radius: 0px;

}

.card-kpi.kpi-net-sales .card-title,
.card-kpi.kpi-net-sales .kpi-value,
.card-kpi.kpi-net-sales .small {
color: #333;
  /* Dark text for contrast */
}

/* ========================================
      TABLES
      ======================================== */
.table {
  font-size: 0.70rem;
  margin-bottom: 0;
}

.table-sm th,
.table-sm td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}

.table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  border-top: none;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(248, 250, 252, 0.7);
}

.text-end {
  text-align: right !important;
}



/* ========================================
      BUTTONS & BADGES
      ======================================== */
.btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-weight: 500;
}

.badge {
  font-weight: 500;
  padding: 0.4em 0.8em;
}

/* ========================================
      UTILITIES
      ======================================== */
.shadow-sm {
  box-shadow: var(--shadow);
}

.rounded {
  border-radius: var(--radius);
}

.gap-3 {
  gap: 1rem;
}

.fw-semibold {
  font-weight: 600;
}

/* ========================================
      MOBILE RESPONSIVE
      ======================================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  body.sidebar-collapsed .sidebar {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  body.sidebar-collapsed .main {
    margin-left: 260px;
  }

  .topbar .d-none.d-md-flex {
    display: none !important;
  }
  
  body.sidebar-collapsed .sidebar-overlay {
    display: block;
    opacity: 1;
  }
}

#sidebarToggle {
  display: inline-flex;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}

/* ========================================
      DARK MODE (Optional)
      ======================================== */
body.dark-mode {
  --sidebar-bg: #0f172a;
  --sidebar-text: #e2e8f0;
  --sidebar-hover: #1e293b;
  background: #0f172a;
  color: #e2e8f0;
}

body.dark-mode .main,
body.dark-mode .card,
body.dark-mode .topbar {
  background: #1e293b;
  color: #e2e8f0;
}

body.dark-mode .table thead th {
  background: #334155;
  color: #cbd5e1;
}

.relationship-manager .card{
border-radius: 0px;
}

.relationship-manager .innercard{
  background-color: #f3f4f699;
  }

  .relationship-manager .card .card-header-custom {
    background-color:#fdfeff4e !important;
    padding: 12px 15px;
    border-radius: 0px
}

.relationship-manager .card .custom-text{
 color: #0047AB; 
 font-weight: 600;
 font-size: 1rem;
}



.rm-box {
  padding: 14px 14px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  min-width: 160px;
  flex: 1;
}

.rm-box .label {
  font-weight: 600;
  font-size: 14px;
}

.rm-box .value {
  font-size: 14px;
  font-weight: 500;
}

.rm-legend-item {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.rm-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

#rmClientChart {
  max-width: 180px !important;
  max-height: 180px !important;
}

.hover-shadow {
  transition: all 0.3s ease;
}
.hover-shadow:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}
#rmLegend {
  max-width: 280px;
}


.rm-header .card{
border-radius: 0px;
}
