/* =====================================================
  DESIGN TOKENS
===================================================== */
:root {
  --bg-main: #f6f9ff;
  --bg-dark: #000;
  --primary: #da251d;
  --primary-dark: #b91d16;
  --text-dark: #333;
  --text-light: #fff;
  --border-light: #e6e9f4;
  --shadow-soft: 0 4px 20px rgba(0,0,0,.08);
  --radius: 6px;
}

/* =====================================================
  BASE
===================================================== */
html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Open Sans", sans-serif;
  background: var(--bg-main);
  color: var(--text-dark);
}
a {
  color: var(--primary);
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

h1,h2,h3,h4,h5 {
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  color: var(--primary);
}

/* =====================================================
  HEADER
===================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  height: 70px;
  width: 100%;
  background: linear-gradient(90deg, #041e4c, #020f27);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(30,60,114,0.4);
}

.header button {
  border: none;
  border-radius: 0px;
}


/* =====================================================
  SIDEBAR
===================================================== */
/* ================= SIDEBAR ================= */
.sidebar {
  position: fixed;
  top: 70px;
  left: 0;
  width: 220px;
  height: calc(100vh - 70px);
  background: linear-gradient(180deg, #041e4c, #020f27);
  padding: 12px 10px;
  transition: width .3s ease, background .3s ease;
  box-shadow: 2px 0 18px rgba(30,60,114,0.35);

  overflow-y: auto;
  scroll-behavior: smooth; /* 👈 submenu auto scroll */
}

/* ================= THIN SCROLLBAR ================= */

/* Firefox */
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
}

/* Chrome / Edge / Safari */
.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.35);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.55);
}

/* ================= NAV ITEMS ================= */
.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 13.5px;
  color: #cfd8ff;
  border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
.sidebar-nav .nav-content {
  list-style: disc;
}

.sidebar-nav .nav-content li::marker {
  color: #9fc3ff;
}



.sidebar-nav .nav-content .nav-link{padding: 5px 0px;font-size: 11px;}
/* Dropdown arrow */
.dropdown-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
  opacity: 0.85;
}

.dropdown-icon.rotate {
  transform: rotate(180deg);
}

.nav-link:hover .dropdown-icon {
  opacity: 1;
}



/* ================= SUBMENU ================= */
.nav-content {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px dashed rgba(255,255,255,0.15);
}

.nav-content .nav-link {
  font-size: 12.5px;
  padding: 5px 8px;
  opacity: 0.9;
}

/* Highlight active submenu */
.nav-content .nav-link.active {
  opacity: 1;
}

/* ================= SIDEBAR COLLAPSED ================= */
.sidebar.closed {
  width: 60px;
}

.sidebar.closed .nav-link span {
  display: none;
}

.sidebar.closed .nav-content {
  display: none;
}
.nav-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease;
}

.nav-content.open {
  max-height: 500px;
  opacity: 1;
}


.sidebar.closed {
  width: 0;
  padding: 0;
  overflow: hidden;
}

/* NAV */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 10px;
  margin-bottom: 4px;
  color: #eaf0ff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.sidebar-nav .nav-link i {
  margin-right: 12px;
  font-size: 16px;
  color: #9fc3ff;
  transition: color .25s ease;
}

/* HOVER + ACTIVE */
.sidebar-nav .nav-link:hover {
  text-decoration: none;
  color: #fff;
}

.sidebar-nav .nav-link:hover i {
  color: #ffffff;
}

.sidebar-nav .nav-link.active {
  color: #d81c21;
  font-weight: 600;
}

.sidebar-nav .nav-link.active i {
  color: #ffffff;
}


/* =====================================================
  MAIN
===================================================== */
.main {
  margin-top: 20px;
  margin-left: 100px;
  padding: 20px;
  transition: margin .3s ease;
}

.main.expanded {
  margin-left: -100px;
}

/* =====================================================
  PAGE TITLE
===================================================== */
.pagetitle h1 {
  font-size: 24px;
  margin-bottom: 15px;
}

/* =====================================================
  CARDS
===================================================== */
.card {
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow-soft);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
}

/* =====================================================
  TABLE
===================================================== */
table {
  background: #fff;
}

table thead th {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
}

table tbody tr:hover {
  background: #f1f4ff;
}

table td a {
  color: var(--primary);
  font-weight: 600;
  font-size: 12px;
}

table td span {
  font-size: 13px;
}

/* =====================================================
  DASHBOARD TILES
===================================================== */
.dashdesn li {
  background: #000;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform .2s, box-shadow .2s;
}

.dashdesn li:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0,0,0,.2);
}

.dashdesn li a {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =====================================================
  FORMS
===================================================== */
input, textarea, select {
  border-radius: var(--radius);
  border: 1px solid #ccc;
}

input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .15rem rgba(218,37,29,.25);
}

/* =====================================================
  BACK TO TOP
===================================================== */
.back-to-top {
  background: var(--primary);
  border-radius: 50%;
}

/* =====================================================
  RESPONSIVE
===================================================== */
@media (max-width: 991px) {
  .sidebar {
    left: -240px;
  }
  .sidebar.closed {
    left: 0;
    width: 220px;
  }
  .main {
    margin-left: 0;
  }
}
.hello-admin {
  color: #eaf0ff;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
}

.hello-admin span {
  font-weight: 700;
  color: #ffffff;
}


/* WALLET MODULE — HIDE EDIT ACTION SAFELY */
:host ::ng-deep .table-actions .btn-edit,
:host ::ng-deep .table-actions .fa-edit,
:host ::ng-deep .table-actions .bi-pencil {
  display: none !important;
}
/* Wallet – hide modal footer buttons */
.wallet-delete-modal .modal-footer,
.wallet-view-modal .modal-footer {
  display: none !important;
}

.card.stat {
  padding: 20px;
  border-radius: 14px;
  border: none;
}

.card.stat h4 {
  font-weight: 700;
  margin-top: 6px;
}

.blue  { background:#dbe9ff; color:#0d47a1; }
.red   { background:#fde0e0; color:#b71c1c; }
.green { background:#dff1e8; color:#1b5e20; }
.cyan  { background:#d9f7ff; color:#006064; }
/* ================================
   DASHBOARD CHART FIX (GOLD)
   ================================ */

.chart-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px 50px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  height: 380px;              /* 🔒 FIXED HEIGHT */
  display: flex;
  flex-direction: column;
}

.chart-title {
  font-weight: 600;
  font-size: 14px;
  color: #495057;
  margin-bottom: 10px;
}

/* Canvas wrapper behavior */
/* ===== KPI CARDS UPGRADE ===== */
.kpi-card {
  position: relative;
  border-radius: 16px;
  padding: 18px 20px;
  height: 100%;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.10);
}

.kpi-icon {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 26px;
  opacity: .25;
}

.kpi-label {
  font-size: 13px;
  color: #6c757d;
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
}

/* Context colors */
.kpi-primary { background: linear-gradient(135deg,#eef4ff,#ffffff); }
.kpi-success { background: linear-gradient(135deg,#eafaf1,#ffffff); }
.kpi-danger  { background: linear-gradient(135deg,#fdecec,#ffffff); }
.kpi-info    { background: linear-gradient(135deg,#e8f6ff,#ffffff); }
