/*!
 * Bambe Portal theme — Sendit colors + DashLite shell, Bambe logo kept
 * Reference: https://app.sendit.ma + docs.dashlite.net/html (theming)
 * Primary: Sendit cyan #209CD5
 */
:root {
  --brand: #209CD5;
  --brand-rgb: 32, 156, 213;
  --brand-dark: #1b87b8;
  --brand-soft: #e8f6fc;
  --brand-active: #2AA6DF;
  --primary: #209CD5;
  --primary-rgb: 32, 156, 213;
  --bs-primary: #209CD5;
  --bs-primary-rgb: 32, 156, 213;
  --accent: #364a63;
  --page-bg: #f5f6fa;
  --text-soft: #8094ae;
  --text-base: #526484;
  --border-light: #e5e9f2;
}

body.nk-body {
  font-family: "DM Sans", sans-serif, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 14px;
  color: var(--text-base);
  background-color: var(--page-bg) !important;
}

/* Primary buttons / badges (override DashLite purple default) */
.btn-primary,
.badge-primary,
.bg-primary {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: var(--brand-dark) !important;
  border-color: var(--brand-dark) !important;
  color: #fff !important;
}
.btn-outline-primary {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.btn-outline-primary:hover {
  background-color: var(--brand) !important;
  color: #fff !important;
}
.text-primary,
a.link-primary {
  color: var(--brand) !important;
}

/* Light sidebar — same pattern as Sendit (.nk-sidebar.is-light) */
.nk-sidebar.is-light {
  background: #ffffff !important;
  border-right: 1px solid var(--border-light);
}
.nk-sidebar.is-light .nk-sidebar-head {
  border-bottom: 1px solid var(--border-light);
}
.nk-sidebar.is-light .nk-menu-heading .overline-title {
  color: var(--text-soft) !important;
  letter-spacing: 0.08em;
}
.nk-sidebar.is-light .nk-menu-link {
  color: var(--text-base) !important;
  border-radius: 6px;
  margin: 2px 12px;
  padding: 10px 12px;
}
.nk-sidebar.is-light .nk-menu-link .nk-menu-icon {
  color: var(--text-soft);
  width: 1.75rem;
}
.nk-sidebar.is-light .nk-menu-link:hover {
  background: #ebeef2 !important;
  color: var(--brand) !important;
}
.nk-sidebar.is-light .nk-menu-link:hover .nk-menu-icon,
.nk-sidebar.is-light .nk-menu-item.active > .nk-menu-link .nk-menu-icon,
.nk-sidebar.is-light .nk-menu-link.active .nk-menu-icon {
  color: var(--brand) !important;
}
.nk-sidebar.is-light .nk-menu-item.active > .nk-menu-link,
.nk-sidebar.is-light .nk-menu-link.active {
  background: #ebeef2 !important;
  color: var(--brand-active) !important;
  font-weight: 500;
}
.nk-sidebar-logo .logo-img {
  max-height: 36px;
  width: auto;
}

/*
 * Sidebar compact (desktop xl+)
 * DashLite only shrinks with :not(:hover), so clicking the menu icon
 * (while the pointer is still on the sidebar) looks like a no-op.
 * We shrink immediately on .is-compact, lock hover-expand until mouseleave
 * (.has-compact-nohover), then allow DashLite-style hover peek.
 */
@media (min-width: 1200px) {
  .nk-sidebar.is-compact,
  .nk-sidebar.is-compact.has-compact-nohover:hover {
    width: 76px !important;
  }
  .nk-sidebar.is-compact + .nk-wrap {
    padding-left: 76px !important;
  }
  .nk-sidebar.is-compact + .nk-wrap > .nk-header-fixed {
    left: 76px !important;
  }
  .nk-sidebar.is-compact .nk-menu-text,
  .nk-sidebar.is-compact .nk-menu-heading .overline-title,
  .nk-sidebar.is-compact.has-compact-nohover:hover .nk-menu-text,
  .nk-sidebar.is-compact.has-compact-nohover:hover .nk-menu-heading .overline-title {
    opacity: 0 !important;
    pointer-events: none;
  }
  .nk-sidebar.is-compact .nk-menu-link {
    margin-left: 8px;
    margin-right: 8px;
    justify-content: center;
  }
  .nk-sidebar.is-compact .nk-sidebar-logo .logo-img {
    max-height: 28px;
    opacity: 1 !important;
  }
  /* After mouse leaves once, hover may expand again (DashLite peek) */
  .nk-sidebar.is-compact:hover:not(.has-compact-nohover) {
    width: 290px !important;
  }
  .nk-sidebar.is-compact:hover:not(.has-compact-nohover) .nk-menu-text,
  .nk-sidebar.is-compact:hover:not(.has-compact-nohover) .nk-menu-heading .overline-title {
    opacity: 1 !important;
    pointer-events: auto;
  }
  .nk-sidebar.is-compact:hover:not(.has-compact-nohover) .nk-menu-link {
    justify-content: flex-start;
  }
}

/* Header — white bar + soft shadow (Sendit) */
.nk-header.is-light {
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(54, 74, 99, 0.05);
  border-bottom: 1px solid var(--border-light);
}
.nk-header .user-toggle .user-info .user-name {
  color: #364a63;
  font-weight: 600;
}
.nk-header .user-toggle .user-info .user-status {
  color: var(--text-soft);
  font-size: 12px;
}
.user-avatar.bg-brand {
  background: var(--brand) !important;
  color: #fff !important;
}

/* Content spacing like Sendit */
.nk-content {
  padding: 32px 22px !important;
}
.nk-block-title.page-title {
  font-weight: 700;
  color: #364a63;
}
.nk-block-title.page-title .icon {
  margin-right: 0.35rem;
  color: var(--brand);
}

/* Cards */
.card {
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(54, 74, 99, 0.05);
}
.card-bordered {
  border: 1px solid var(--border-light) !important;
}
.card .title {
  color: var(--text-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card .amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #364a63;
}

/* Tabs — Sendit cyan active */
.nav-tabs .nav-link.active {
  color: var(--brand) !important;
  border-bottom-color: var(--brand) !important;
}
.nav-tabs .nav-link {
  color: var(--text-base);
}

/* Badges soft outline */
.badge.bg-outline-primary {
  color: var(--brand);
  border: 1px solid var(--brand);
  background: transparent;
}

/* Auth / login */
.pg-auth .nk-auth-body {
  padding-top: 2.5rem;
}
.login-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: #364a63;
  letter-spacing: 0.02em;
}
.login-brand span {
  color: var(--brand);
}
.nk-auth-footer {
  color: var(--text-soft);
  font-size: 12px;
}

/* Footer */
.nk-footer {
  background: transparent;
  border-top: 1px solid var(--border-light);
  color: var(--text-soft);
  font-size: 12px;
}

/* Forms */
.form-control:focus,
.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(var(--brand-rgb), 0.2);
}

/* Compact table list (Sendit nk-tb-list feel) */
.nk-tb-list {
  width: 100%;
}
.nk-tb-list .nk-tb-item {
  border-bottom: 1px solid var(--border-light);
}
.nk-tb-list .nk-tb-head {
  background: #fff;
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.table thead th {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom-color: var(--border-light) !important;
}
.table-hover tbody tr:hover {
  background-color: rgba(var(--brand-rgb), 0.06);
}

/* Removable tag pills — Sendit cyan pill, soft red × in corner */
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
  padding-top: 4px;
}
.tag-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(var(--brand-rgb), 0.35);
  background: var(--brand-soft);
  color: #1b87b8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}
.tag-pill.has-remove {
  padding-right: 18px;
  margin-right: 4px;
  margin-top: 4px;
}
.tag-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}
.tag-pill-remove-form {
  position: absolute;
  top: -7px;
  right: -7px;
  margin: 0;
  line-height: 0;
}
.tag-pill-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #fde2e1;
  color: #e85347;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(232, 83, 71, 0.25);
}
.tag-pill-x:hover {
  background: #e85347;
  color: #fff;
}

