@import url("https://fonts.googleapis.com/css2?family=Catamaran:wght@100..900&family=Livvic:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap");

body {
  font-family: "Source Sans 3", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
}
.brand-link .brand-image {
  float: left;
  line-height: 0.8;
  margin-left: 0.8rem;
  margin-right: 0.5rem;
  margin-top: -3px;
  max-height: 33px;
  width: auto;
  font-weight: 700;
  opacity: 1;
  color: #ffffff;
}
.main-sidebar {
  background-color: #152551 !important;
}
/* Override AdminLTE sidebar width — seg-sidebar takes over */
.seg-sidebar.main-sidebar { background: none !important; }
/* Global CSS */
body {
  font-family: "Source Sans 3", sans-serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  background-color: #ffffff;
  color: #212529;
}
.brand-link .brand-image {
  float: left;
  line-height: 0.8;
  margin-left: 0.8rem;
  margin-right: 0.5rem;
  margin-top: -3px;
  max-height: 44px;
  width: auto;
  padding-bottom: 4px;
}

.brand-sub-text {
  font-size: 12px !important;
  color: #121212 !important;
}
.imgalignment {
  width: 110px;
}
.logo-brand-image {
  width: 105px;
  margin-top: 1px;
}
.navbar {
  padding: 4px !important;
}

/* ── Top navbar — navy brand bar ── */
.main-header.navbar {
  background-color: #1e2d5f !important;
  border-bottom: 3px solid #f5a81c !important;
  min-height: 64px !important;
  height: 64px !important;
}
.main-header .seg-navbar-logo {
  height: 38px;
  object-fit: contain;
  margin-right: 4px;
}
/* Top-level navbar links — white on navy */
.main-header .navbar-nav > .nav-item > .nav-link,
.main-header .navbar-nav > .nav-item > .nav-link i,
.main-header.navbar-light .navbar-nav > .nav-item > .nav-link,
.main-header.navbar-white .navbar-nav > .nav-item > .nav-link,
.main-header .topbar-clock,
.main-header [data-widget="pushmenu"] i {
  color: rgba(255,255,255,0.85) !important;
}
.main-header .navbar-nav > .nav-item > .nav-link:hover,
.main-header .navbar-nav > .nav-item > .nav-link:hover i {
  color: #fff !important;
}
/* Dropdown menu — white bg, navy text */
.main-header .dropdown-menu {
  background: #fff;
  border: 1px solid #d0d8ee;
  border-radius: 8px;
  min-width: 220px;
  padding: 8px 0;
  box-shadow: 0 4px 16px rgba(30,45,95,0.12);
}
.main-header .dropdown-menu .seg-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: #1e2d5f;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.main-header .dropdown-menu .seg-dd-item:hover {
  background: #eef1f8;
  color: #1e2d5f;
  text-decoration: none;
}
.main-header .dropdown-menu .seg-dd-item.seg-dd-logout {
  color: #b91c1c;
}
.main-header .dropdown-menu .seg-dd-item.seg-dd-logout:hover {
  background: #fef2f2;
}
.main-header .dropdown-menu .seg-dd-divider {
  height: 1px;
  background: #e8ecf5;
  margin: 6px 0;
}
.main-header .dropdown-menu .seg-dd-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 10px;
}
.main-header .dropdown-menu .seg-dd-header .seg-dd-name {
  font-weight: 600;
  font-size: 14px;
  color: #1e2d5f;
  line-height: 1.2;
}
.main-header .dropdown-menu .seg-dd-header .seg-dd-role {
  font-size: 12px;
  color: #64748b;
}
.topbarheading,
.main-header .topbarheading,
.main-header h3#pageTitle {
  font-size: 16px;
  font-weight: 600;
  padding: 8px 0px 0px;
  color: #fff !important;
}
.suppliertopbarheading {
  font-size: 20px;
  padding: 2px 0px 0px;
}
.brand-img {
  width: 200px;
}

.formalign {
  display: flex;
  height: auto;
  min-height: 70%;
}

.form-signin {
  width: 100%;
  max-width: 330px;
  padding: 15px;
  margin: auto;
}

.fixedbottom {
  font-size: 13px;
  text-align: center;
  position: absolute;
  bottom: 8px;
}

/* Button */
.btn-primary {
  box-shadow: 0 0px 0px #152551 !important;
  background-color: #152551 !important;
  font-size: 16px !important;
  border-color: #152551 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  box-shadow: 0 0px 0px #152551 !important;
  background-color: #152551 !important;
  border-color: #152551 !important;
}

/* Card */
.card-header {
  font-size: 16px;
  color: #152551;
  font-weight: 600;
  padding: 10px;
}
.cardheader {
  font-size: 16px;
  color: #152551;
  font-weight: 600;
}
label {
  font-weight: 400 !important;
  color: #555555 !important;
  margin-bottom: 2px !important;
}
.nav-pills {
  justify-content: space-between;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 40px;
}
.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
  background-color: #ffffff;
  border-radius: 40px;
  padding: 0.5rem 1rem;
  color: #ffffff !important;
}
.btn-secondary {
  box-shadow: 0 0px 0px #6c757d !important;
  background-color: #ffffff !important;
  border-color: #152551 !important;
  color: #152551 !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  box-shadow: 0 0px 0px #6c757d !important;
  background-color: #ffffff !important;
  color: #152551 !important;
  border-color: #152551 !important;
}
.btn-primary {
  box-shadow: 0 0px 0px #152551 !important;
  background-color: #152551 !important;
  font-size: 16px !important;
  border-color: #152551 !important;
}
.nav-tabs .nav-link {
  background-color: transparent;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
  background-color: #152551 !important;
  color: #ffffff !important;
}
/* .dx-link-icon {
  font-size: 14px !important;
  color: #152551 !important;
} */
/* .dx-link {
  font-size: 12px !important;
  color: #152551 !important;
} */
.text-link {
  color: #152551 !important;
  font-size: 14px !important;
}
.modal-header {
  padding: 8px 16px !important;
}
.modal-title {
  font-size: 18px !important;
}
.labelvalue {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 0px;
}
.custom-file-input {
  position: absolute;
  width: 40px;
}

.dx-datagrid-text-content.dx-text-content-alignment-left,
.dx-datagrid-text-content.dx-text-content-alignment-right,
.dx-datagrid-text-content.dx-text-content-alignment-centers {
  background: #f4f6f9 !important;
  color: #121212 !important;
  font-weight: 400 !important;
}
/* .dx-datagrid-scrollable-simulated.dx-datagrid-content.dx-datagrid-scroll-container {
  background: #f4f6f9;
  color: #121212;
  font-weight: 400;
} */
.responsive-container {
  width: 100%;
  overflow-x: auto;
}

.btn-link {
  color: #152551 !important;
}

.card-default {
  box-shadow: none;
  border: 1px solid rgba(0, 0, 0, 0.125);
}
.card-default .card-header {
  background: #fbfbfb !important;
}
.card-default .card-header h3 {
  font-size: 16px !important;
  font-weight: 400 !important;
}

/* Status Color */

.bg-brand {
  background-color: #22407a !important;
}

.bg-quote {
  background-color: #69a189 !important;
}
.bg-contracted {
  background-color: #27ae60 !important;
}

.dx-pager .dx-page-sizes .dx-selection,
.dx-pager .dx-page-sizes .dx-selection,
.dx-pager .dx-pages .dx-selection {
  border-radius: 40px !important;
  background-color: #152551 !important;
  color: #ffffff !important;
}

.wizard-progress {
  list-style: none;
  list-style-image: none;
  padding: 0;
  white-space: nowrap;
}

.wizard-progress li {
  float: left;
  text-align: center;
  position: relative;
}

.wizard-progress .step-name {
  display: block;
  height: 32px;
  vertical-align: bottom;
  text-align: center;
  width: 100%;
}

.wizard-progress .step-num {
  font-size: 10px;
  font-weight: bold;
  border: 3px solid darkgray;
  background-color: darkgray;
  border-radius: 50%;
  width: 20px;
  display: inline-block;
  margin-top: 10px;
  color: #fff;
}

.wizard-progress .step-num:after {
  content: "";
  display: block;
  background: darkgray;
  height: 1px;
  width: 130%;
  /* 130px; */
  position: absolute;
  bottom: 45px;
}

.wizard-progress li:last-of-type .step-num:after {
  display: none;
}
.step-done .step-num::after {
  background-color: #000;
  text-align: center;
}

.wizard-progress .step-done .step-num,
.wizard-progress .step-active .step-num {
  border-color: #009a27;
  background-color: #009a27;
  text-align: center;
}

.wizard-progress .step-active .step-name {
  font-weight: bold;
}
.dx-toolbar {
  background-color: transparent !important;
}
/* Hide the built-in DataGrid toolbar — we use our own cn-grid-toolbar above */
.cn-content-card .dx-datagrid-header-panel {
  display: none !important;
}
.datagridheadpos {
  position: absolute;
  left: 0;
  z-index: 111;

  padding: 18px 20px;
  border-bottom: 0;
}
.dx-toolbar-after {
  z-index: 111;
  display: flex;
  align-items: center;
  gap: 4px;
}
/* wizard with 5 steps */

.wizard-5-steps {
  width: 100%;
}

.wizard-5-steps li {
  margin-right: 6.9%;
  /* 6.6687%; 50px */
  width: 13%;
}

.wizard-5-steps .step-num:after {
  left: 62%;
}

/* wizard with 6 steps */

.wizard-6-steps {
  width: 100%;
  margin: 0;
}

.wizard-6-steps li {
  float: left;
  margin-right: 2%;
  /* 6.6687%; 50px */
  width: 12.1%;
}

.wizard-6-steps .step-num:after {
  left: 64%;
}
.nav-sidebar .nav-item > .nav-link {
  font-size: 16px;
  color: #ffffff !important;
}
.nav-sidebar > .nav-item .nav-icon {
  color: #ffffff !important;
}

.dragdropfile {
  border: 2px dashed #152551;
  padding: 10px;
  background-color: #ecf0fa;
  border-radius: 10px;
}

.fileimageicon {
  font-size: 52px;
  color: #152551;
}
.form-group {
  margin-bottom: 0.35rem !important;
}

.SEGRate {
  background-color: #fff7e2 !important;
}

.SEGRateSub {
  background-color: #f2f2f2 !important;
}

.navbar-light .navbar-nav .nav-link {
  color: #152551 !important;
  font-size: 16px !important;
}
.btngrouptheme {
  position: absolute;
  /* right: 0;
  top: 0; */
  z-index: 111;
}
.supplierLogo {
  width: 120px;
}
.btngrouptheme1 {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 111;
}

.leadstatus {
  font-size: 12px !important;
}

.leadhead {
  font-size: 44px;
  font-weight: bolder;
  margin: 0;
  color: #121212;
}
.leadsubtext {
  color: #444444;
  font-size: 12px;
  margin: 0;
}
.leadicon {
  font-size: 64px;
  color: #152551;
}
.bidshead {
  font-size: 22px;
  font-weight: bolder;
  margin: 0;
}

.leadiconsm {
  font-size: 26px;
  color: #152551;
}
.list-group-item .heading {
  color: #000000;
  font-weight: 500;
}
.list-group-item .fas,
.list-group-item .far {
  color: #152551;
}

.list-group-item {
  border-bottom: 1px solid #cccccc !important;
  padding: 14px;
}
.dxc-title {
  display: none !important;
}

.card-body {
  padding: 10px;
}

/*Page Loading*/

.page-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 100%;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 99999;
}

.page-loading .content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.flipimg {
  display: inline-block;
  animation: mirrorflip 2s 0s linear infinite;
}

.flexcontainer {
  display: flex;
  text-align: center;
  justify-content: space-around;
}

.flexcontainer > div {
  margin: 10px;
}

.flexcontainer div p {
  margin: 0;
  font-size: 13px;
}

.flexcontainer div h3 {
  font-size: 28px;
  font-weight: 700;
}

.labelschme {
  font-size: 11px !important;
}

@keyframes mirrorflip {
  0% {
    transform: scale(1, 1);
    -webkit-transform: scale(1, 1);
    -moz-transform: scale(1, 1);
    -o-transform: scale(1, 1);
    -ms-transform: scale(1, 1);
  }

  50% {
    transform: scale(-1, 1);
    -webkit-transform: scale(-1, 1);
    -moz-transform: scale(-1, 1);
    -o-transform: scale(-1, 1);
    -ms-transform: scale(-1, 1);
  }

  100% {
    transform: scale(1, 1);
    -webkit-transform: scale(1, 1);
    -moz-transform: scale(1, 1);
    -o-transform: scale(1, 1);
    -ms-transform: scale(1, 1);
  }
}

/* width */
::-webkit-scrollbar {
  width: 8px;
}

/* Track */
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px grey;
  border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #152551;
  border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #152551;
}

/* sidebar menu css starts */

#main {
  margin-top: 0px;
  margin-bottom: 0px;
}

#main #faq .card {
  margin: 0px 0px;
  border: 0;
  background-color: transparent;
  border-radius: 0;
  cursor: pointer;
  box-shadow: none !important;
  line-height: normal;
}

/* #main #faq .card:hover {
  background-color:#152551 ;
} */

#main #faq .card a:hover {
  color: #ffffff;
}

#main #faq .card .card-header {
  border: 0;
  /* -webkit-box-shadow: 0 0 20px 0 rgba(213, 213, 213, 0.5);
          box-shadow: 0 0 20px 0 rgba(213, 213, 213, 0.5); */
  /* border-radius: 2px; */
  padding: 0;
}

#main #faq .card .card-header .nav-link {
  display: block;
  text-align: left;
  /* background: #262626; */
  color: #c2c7d0;
}

#main #faq .card .card-header .nav-link:after {
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  float: right;
  position: absolute;
  right: 1rem;
  top: 0.7rem;
}

#main #faq .card .card-header .nav-link.collapsed {
  color: #b7bbd5;
}

#main #faq .card:hover p {
  color: #ffffff;
}

#main #faq .card .card-header .nav-link.collapsed:after {
  content: "\f106";
  position: absolute;
  right: 1rem;
  top: 0.7rem;
}

#main #faq .card .collapsing {
  background-color: transparent !important;
  line-height: 30px;
}

#main #faq .card .collapse {
  border: 0;
}

#main #faq .card .collapse.show {
  /* background-color: #403a3a; */
  background-color: transparent !important;
  line-height: normal;
  color: #222;
}

#main #faq .card .collapse .card-body {
  padding: 0 !important;
}

#main #faq .card .collapse.show .card-body {
  padding: 0 !important;
}

#main #faq .card .card-body .nav a {
  padding-left: 37px;
}

#main #faq .card .collapse.show .card-body .nav a {
  padding-left: 37px;
  color: #b7bbd5;
}

#main #faq .card .collapse.show .card-body .nav a:hover {
  color: rgb(255, 255, 255);
}

#main #faq .card .collapse.show .card-body p,
#main #faq .card .card-header p,
#main #faq .card p {
  display: inline;
  margin: 0;
  white-space: normal;
  font-size: 14px;
}

#main #faq .card .nav-icon {
  display: inline-block;
  margin-right: 10px;
  margin-left: 0.05rem;
  font-size: 1.2rem;
  margin-right: 0.4rem;
  text-align: center;
  width: 1.2rem;
}

#main #faq .card .fa-chevron-right.nav-icon {
  font-size: 0.5rem;
  vertical-align: middle;
  margin: 0px 14px 0px 0px;
  width: 0;
}

.bg-greenlight {
  background: #e2ffda;
  border: 1px solid #d9d9d9;
  box-shadow: none;
}
.allinonerateslabel {
  font-size: 14px;
}
.allinonerates {
  font-size: 18px;
  font-weight: bold;
  color: #282c7d;
}

.yellow-card .dx-button-mode-contained {
  /* background-color: #727272;
  border-color: #727272;
  color: #ffffff; */
  /* width: 230px; */
  padding: 0px;
  font-size: 12px;
  text-align: left;
}

.sidebar-mini .main-sidebar .nav-link {
  width: 250px !important;
  border-radius: 0px !important;
  padding: 0.5rem;
}
.sidebar-collapse a.nav-link {
  padding: 10px 20px !important;
}

.dx-dropdownbutton-popup-wrapper
  .dx-list:not(.dx-list-select-decorator-enabled)
  .dx-list-item-content {
}

.dx-searchbox .dx-placeholder::before {
  padding-left: 8px !important;
}

@media screen and (max-width: 768px) {
  .wizard-6-steps {
    display: none !important;
  }
  .btngrouptheme {
    position: relative !important;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .btngrouptheme button {
    margin-top: 4px !important;
  }
  .fixedbottom {
    position: relative;
    padding-top: 30px;
  }

  .dx-row-lines .dx-layout-manager .dx-label-h-align.dx-flex-layout {
    display: initial !important;
    padding: 5px 0px !important;
  }
  .dx-field-item-optional > div,
  .dx-field-item-optional > label {
    display: inline-block !important;
  }
  .dx-field-item-label-location-left {
    width: 160px !important;
  }

  .dx-field-item-label-location-left,
  .dx-field-item-content-location-right {
    font-size: 0.7rem !important;
  }
}

@media screen and (max-width: 600px) {
  .nav-link .topbar-clock,
  .nav-link .fa-clock {
    font-size: 12px;
    display: none;
  }
  .topbarheading {
    font-size: 14px;
  }
  .form-check-inline {
    display: inline-block;
  }
}

/* .dx-texteditor-input {
  padding: 0px 9px 8px !important;
} */

.dx-widget {
  font-size: 13px !important;
}

.dx-widget input,
.dx-widget textarea {
  line-height: 1.7715 !important;
}

.dx-fileuploader-wrapper {
  padding: 0 !important;
}

.dx-fileuploader-input-wrapper {
  padding: 0 !important;
  border: 0 !important;
}

.dx-fileuploader-show-file-list .dx-fileuploader-files-container {
  padding-top: 0 !important;
}

.dx-fileuploader-files-container {
  width: 100% !important;
  padding: 0 !important;
}

.dx-fileuploader-file-size,
.dx-fileuploader-file-status-message {
  color: #333 !important;
}

.displayNone {
  display: none;
}

.dx-datagrid
  .dx-datagrid-content
  .dx-datagrid-table
  .dx-row
  .dx-command-edit-with-icons
  .dx-link {
  width: 14px !important;
  height: 14px !important;
  margin: 0 2px !important;
}

.dx-datagrid-content .dx-datagrid-table .dx-row .dx-command-select {
  padding: 0 !important;
  width: 30px !important;
  min-width: 40px !important;
  max-width: 0px !important;
}

.swal2-container {
  z-index: 2000 !important;
}

.button-box-shadow {
  box-shadow:
    rgb(110 109 109 / 80%) 0px 5px 13px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
  font-size: 14px;
  border-bottom: 3px solid #152551 !important;
}

.form-control-sm {
  line-height: 0.6rem !important;
}

.dx-texteditor-input {
  min-height: 30px !important;
  padding: 5px 8px !important;
}
.dx-texteditor-input-container {
  align-items: center !important;
}

.modal-lg {
  max-width: 1000px !important;
}

.imageZoom {
  transition: transform 0.2s; /* Animation */
  margin: 0 auto;
  width: 35px;
}

.imageZoom:hover {
  transform: scale(
    2.5
  ); /* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */
}

.dx-fileuploader-input-label {
  display: none !important;
}

.yellow-card {
  background-color: #fff9db;
  padding: 8px 12px;
  border: 1px dashed #d6c16b;
  border-radius: 8px;
  /* width: fit-content;
  min-height: auto; */
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dx-datagrid-rowsview .dx-master-detail-row > .dx-master-detail-cell {
  padding: 8px !important;
}
.dx-widget .dx-field-item {
  font-size: 0.8rem;
}
/* .dx-field-item-label-location-left, .dx-field-item-content-location-right{text-wrap: auto;} */

.dx-datagrid-rowsview .dx-adaptive-detail-row .dx-adaptive-item-text {
  padding: 6px !important;
  width: 50% !important;
  white-space: initial !important;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: #fff !important;
  background-color: #007bff !important;
}

.nav-pills .nav-link:hover {
  background-color: #ffffff;
  border-radius: 40px;
  padding: 0.5rem 1rem;
  color: blue !important;
}
.disabled-edit-cell {
  pointer-events: none;
  opacity: 0.6;
}
.disabled-edit-cell .dx-link {
  pointer-events: none;
}

/* ══════════════════════════════════════════
   Dashboard — Modern Redesign
   ══════════════════════════════════════════ */

.db-container {
  background: #f1f5f9;
  padding: 16px 20px;
  min-height: calc(100vh - 64px);
}

/* ── Date Filter Tabs ── */
.db-tabs-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0 8px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.db-tabs { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; flex-wrap: wrap; }
.db-tab {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  user-select: none;
}
.db-tab:hover { color: #3b82f6; }
.db-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; font-weight: 600; }
.db-custom-range { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 8px; border-top: 1px solid #f1f5f9; }
.db-custom-field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.db-custom-field label { font-size: 12px; font-weight: 500; color: #64748b; margin: 0; }
.db-custom-btn { justify-content: flex-end; }

/* ── KPI Cards ── */
.db-kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid transparent;
  border-radius: 12px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s;
  height: 100%;
}
.db-kpi-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.db-kpi-card-blue   { border-top-color: #3b82f6; }
.db-kpi-card-orange { border-top-color: #f97316; }
.db-kpi-card-green  { border-top-color: #22c55e; }
.db-kpi-card-purple { border-top-color: #8b5cf6; }
.db-kpi-card-teal   { border-top-color: #0d9488; }
.db-kpi-value { font-size: 32px; font-weight: 800; color: #0f172a; line-height: 1; margin: 0; }
.db-kpi-label { font-size: 12px; color: #64748b; font-weight: 500; line-height: 1.3; }
.db-kpi-badge {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.db-kpi-badge-blue   { background: #dbeafe; color: #2563eb; }
.db-kpi-badge-orange { background: #ffedd5; color: #ea580c; }
.db-kpi-badge-green  { background: #dcfce7; color: #16a34a; }
.db-kpi-badge-purple { background: #ede9fe; color: #7c3aed; }
.db-kpi-badge-teal   { background: #ccfbf1; color: #0d9488; }
.db-kpi-badge-amber  { background: #fef9c3; color: #ca8a04; }
.db-kpi-badge-rose   { background: #ffe4e6; color: #e11d48; }

/* ── Quick Actions ── */
.db-quick-actions {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.db-qa-title {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding-right: 6px;
  border-right: 1px solid #e2e8f0;
}
.db-qa-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.db-qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.db-qa-btn:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.1); }

/* ── Section Cards ── */
.db-section-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.db-section-header {
  padding: 13px 18px;
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
  display: flex;
  align-items: center;
}
.db-section-header-blue   { border-left: 3px solid #3b82f6; }
.db-section-header-orange { border-left: 3px solid #f97316; }
.db-section-header-green  { border-left: 3px solid #22c55e; }
.db-section-header-purple { border-left: 3px solid #8b5cf6; }
.db-section-body { padding: 14px 16px; }

/* ── Stat Items ── */
.db-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s, box-shadow 0.12s;
  border: 1px solid #f1f5f9;
  background: #fff;
}
.db-stat-item:hover { background: #f8fafc; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.db-stat-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.db-stat-count { font-size: 20px; font-weight: 800; color: #0f172a; margin: 0; line-height: 1.1; }
.db-stat-label { font-size: 11px; color: #94a3b8; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Lead Performance List ── */
.db-perf-list { list-style: none; padding: 0; margin: 0; }
.db-perf-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
  transition: background 0.1s;
}
.db-perf-item:last-child { border-bottom: none; }
.db-perf-item:hover .db-perf-label { color: #3b82f6; }
.db-perf-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: #eff6ff; color: #3b82f6; font-size: 13px; flex-shrink: 0;
}
.db-perf-icon-red { background: #fef2f2 !important; color: #ef4444 !important; }
.db-perf-label { flex: 1; font-size: 13px; color: #374151; font-weight: 500; transition: color 0.12s; }
.db-perf-count { font-size: 16px; font-weight: 700; color: #0f172a; }
.db-perf-chevron { color: #cbd5e1; font-size: 11px; }

/* ── Conversion Funnel ── */
.db-funnel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 12px 0 8px;
  flex-wrap: nowrap;
}
.db-funnel-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; flex: 1; min-width: 0;
}
.db-funnel-step-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.db-funnel-step-count { font-size: 22px; font-weight: 800; color: #0f172a; line-height: 1; }
.db-funnel-step-label { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; }
.db-funnel-arrow {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; color: #cbd5e1; font-size: 14px; flex-shrink: 0; padding: 0 2px;
}
.db-funnel-rate {
  font-size: 10px; font-weight: 700; color: #16a34a;
  background: #f0fdf4; border-radius: 10px; padding: 2px 6px;
  white-space: nowrap;
}
.db-funnel-summary {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.db-funnel-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
}
.db-funnel-summary-item span { color: #64748b; }
.db-funnel-summary-item strong { font-weight: 700; color: #0f172a; font-size: 13px; }

/* ══════════════════════════════════════
   Contracts Page — Filter Bar Theme
   ══════════════════════════════════════ */

/* Status filter pill buttons */
.cn-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  background: #f1f5f9;
  color: #475569;
}
.cn-filter-btn:hover { opacity: 0.85; }
.cn-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.35);
}

/* Color variants */
.cn-btn-inprogress         { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.cn-btn-inprogress .cn-filter-count { background: #1d4ed8; color: #fff; }

.cn-btn-active             { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.cn-btn-active .cn-filter-count { background: #15803d; color: #fff; }

.cn-btn-expiring           { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.cn-btn-expiring .cn-filter-count { background: #92400e; color: #fff; }

.cn-btn-expired            { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.cn-btn-expired .cn-filter-count { background: #b91c1c; color: #fff; }

.cn-btn-reset              { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

/* Active/selected state — darker solid version */
.cn-filter-btn-active.cn-btn-inprogress { background: #1d4ed8; color: #fff; }
.cn-filter-btn-active.cn-btn-active     { background: #15803d; color: #fff; }
.cn-filter-btn-active.cn-btn-expiring   { background: #92400e; color: #fff; }
.cn-filter-btn-active.cn-btn-expired    { background: #b91c1c; color: #fff; }
.cn-filter-btn-active.cn-btn-reset      { background: #475569; color: #fff; }
.cn-filter-btn-active .cn-filter-count  { background: rgba(255,255,255,0.25); color: #fff; }

/* New Contracts button */
.cn-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  background: #152551;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}
.cn-new-btn:hover {
  background: #1e3a6e;
  box-shadow: 0 3px 10px rgba(21,37,81,0.25);
}

/* ════════════════════════════════════════
   CONTRACTS PAGE v2 — Professional Design
   ════════════════════════════════════════ */

/* Page wrapper */
.cnv2-page {
  background: #eef1f8;
  min-height: calc(100vh - 64px);
  padding: 0;
  font-family: "Source Sans 3", sans-serif;
}

/* ── Header ── */
.cnv2-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 28px 14px;
  background: #fff;
  border-bottom: 2px solid #f5a81c;
}
.cnv2-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cnv2-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cnv2-header-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #1e2d5f;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  flex-shrink: 0;
}
.cnv2-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e2d5f;
  margin: 0;
  line-height: 1.2;
}
.cnv2-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 3px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cnv2-subtitle-badge {
  background: #eef1f8;
  color: #1e2d5f;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 20px;
  border: 1px solid #c2cce8;
}
.cnv2-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Segmented priority control */
.cnv2-seg-control {
  display: flex;
  background: #eef1f8;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  border: 1px solid #d0d8ee;
}
.cnv2-seg-btn {
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #4b5a7e;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.cnv2-seg-btn:hover { color: #1e2d5f; background: #dce3f4; }
.cnv2-seg-active {
  background: #1e2d5f !important;
  color: #fff !important;
  font-weight: 600;
}

/* New record button */
.cnv2-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f5a81c;
  color: #1e2d5f;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.cnv2-new-btn:hover { background: #d4900f; color: #1e2d5f; text-decoration: none; }

/* ── Stat Chips (header-integrated compact stats) ── */
.cnv2-stat-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-left: 56px;
}
.cnv2-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 20px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-size: 12px;
  user-select: none;
}
.cnv2-stat-chip:hover { border-color: #c2cce8; background: #f4f6fb; }
.cnv2-stat-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cnv2-stat-chip.cnv2-stat-blue  .cnv2-stat-chip-dot { background: #3b82f6; }
.cnv2-stat-chip.cnv2-stat-green .cnv2-stat-chip-dot { background: #22c55e; }
.cnv2-stat-chip.cnv2-stat-amber .cnv2-stat-chip-dot { background: #f59e0b; }
.cnv2-stat-chip.cnv2-stat-red   .cnv2-stat-chip-dot { background: #ef4444; }
.cnv2-stat-chip-count { font-weight: 700; color: #111827; font-size: 13px; }
.cnv2-stat-chip-label { color: #6b7280; font-weight: 500; }
.cnv2-stat-chip.cnv2-stat-active.cnv2-stat-blue  { border-color: #3b82f6; background: #eff6ff; }
.cnv2-stat-chip.cnv2-stat-active.cnv2-stat-green { border-color: #22c55e; background: #f0fdf4; }
.cnv2-stat-chip.cnv2-stat-active.cnv2-stat-amber { border-color: #f59e0b; background: #fffbeb; }
.cnv2-stat-chip.cnv2-stat-active.cnv2-stat-red   { border-color: #ef4444; background: #fef2f2; }

/* Keep old strip classes for backwards-compat (now unused) */
.cnv2-stats-strip { display: none; }
.cnv2-stat-card   { display: none; }

.cnv2-stat-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #e5e7eb;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s, border-color 0.15s;
  user-select: none;
}
.cnv2-stat-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.09); transform: translateY(-1px); }
.cnv2-stat-blue  { border-left-color: #3b82f6; }
.cnv2-stat-green { border-left-color: #22c55e; }
.cnv2-stat-amber { border-left-color: #f59e0b; }
.cnv2-stat-red   { border-left-color: #ef4444; }
.cnv2-stat-active { box-shadow: 0 0 0 2px currentColor; transform: translateY(-1px); }
.cnv2-stat-active.cnv2-stat-blue  { box-shadow: 0 0 0 2px #3b82f6; background: #eff6ff; }
.cnv2-stat-active.cnv2-stat-green { box-shadow: 0 0 0 2px #22c55e; background: #f0fdf4; }
.cnv2-stat-active.cnv2-stat-amber { box-shadow: 0 0 0 2px #f59e0b; background: #fffbeb; }
.cnv2-stat-active.cnv2-stat-red   { box-shadow: 0 0 0 2px #ef4444; background: #fef2f2; }

.cnv2-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.cnv2-stat-blue  .cnv2-stat-icon { background: #eff6ff; color: #3b82f6; }
.cnv2-stat-green .cnv2-stat-icon { background: #f0fdf4; color: #22c55e; }
.cnv2-stat-amber .cnv2-stat-icon { background: #fffbeb; color: #f59e0b; }
.cnv2-stat-red   .cnv2-stat-icon { background: #fef2f2; color: #ef4444; }

.cnv2-stat-body { display: flex; flex-direction: column; gap: 2px; }
.cnv2-stat-count { font-size: 26px; font-weight: 800; color: #111827; line-height: 1; }
.cnv2-stat-label { font-size: 12px; color: #6b7280; font-weight: 500; }

/* ── Main Card ── */
.cnv2-card {
  margin: 20px;
  background: #fff;
  border: 1px solid #d0d8ee;
  border-radius: 12px;
  overflow: hidden;
}

/* Active filter notice */
.cnv2-filter-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: #eef1f8;
  border-bottom: 1px solid #c2cce8;
  font-size: 13px;
}
.cnv2-filter-notice-text {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1e2d5f;
}
.cnv2-filter-notice-text i { font-size: 11px; }
.cnv2-filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid #c2cce8;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  color: #1e2d5f;
  cursor: pointer;
  transition: all 0.15s;
}
.cnv2-filter-clear:hover { background: #dce3f4; border-color: #1e2d5f; }

/* ── Toolbar ── */
.cnv2-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  gap: 10px;
  flex-wrap: wrap;
}
.cnv2-toolbar-left,
.cnv2-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cnv2-toolbar-sep {
  width: 1px;
  height: 20px;
  background: #e5e7eb;
  flex-shrink: 0;
}

/* Input group (prefix + input + optional button) */
.cnv2-input-group {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cnv2-input-group:focus-within {
  border-color: #f5a81c;
}
.cnv2-input-prefix {
  padding: 0 8px 0 10px;
  color: #9ca3af;
  font-size: 12px;
  display: flex;
  align-items: center;
}
.cnv2-input {
  height: 32px;
  border: none;
  outline: none;
  font-size: 13px;
  color: #111827;
  background: transparent;
  padding: 0 8px 0 0;
  min-width: 0;
}
.cnv2-input::placeholder { color: #9ca3af; }
.cnv2-input-btn {
  height: 32px;
  width: 34px;
  border: none;
  border-left: 1px solid #d0d8ee;
  background: #1e2d5f;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.cnv2-input-btn:hover:not(:disabled) { background: #162348; }
.cnv2-input-btn:disabled { background: #9ca3af; cursor: not-allowed; }
.cnv2-input-clear {
  height: 32px;
  width: 28px;
  border: none;
  background: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cnv2-input-clear:hover { color: #374151; }
.cnv2-search-input { width: 170px; }

/* Export link buttons */
.cnv2-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cnv2-export-btn:hover:not(:disabled) { background: #f9fafb; border-color: #9ca3af; color: #111827; }
.cnv2-export-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cnv2-export-btn i { font-size: 15px; color: #16a34a; }

/* xlsx icon-only button */
.cnv2-xlsx-btn {
  height: 32px;
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  color: #374151;
  transition: all 0.15s;
}
.cnv2-xlsx-btn:hover { background: #f0fdf4; border-color: #86efac; color: #16a34a; }

/* Hide DevExtreme's built-in toolbar inside cnv2-card */
.cnv2-card .dx-datagrid-header-panel { display: none !important; }

/* ── Grid column headers ── */
.cnv2-card .dx-datagrid-headers .dx-header-row td {
  background: #f4f6fb !important;
  color: #1e2d5f !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #d0d8ee !important;
  padding: 10px 8px !important;
}
.cnv2-card .dx-datagrid-headers {
  border-bottom: none !important;
}
.cnv2-card .dx-header-filter {
  font-size: 10px !important;
  color: #b0bac5 !important;
  opacity: 0.75;
  transform: scale(0.85);
}
.cnv2-card .dx-header-filter-empty {
  font-size: 10px !important;
  color: #cdd3da !important;
  opacity: 0.65;
  transform: scale(0.85);
}
.cnv2-card .dx-header-filter:not(.dx-header-filter-empty) {
  opacity: 1;
  color: #f5a81c !important;
}
/* Data rows */
.cnv2-card .dx-datagrid-rowsview .dx-row > td {
  padding: 5px 8px !important;
  font-size: 13px !important;
  color: #1e293b;
  vertical-align: middle !important;
}
/* Action column — no side padding so buttons sit flush */
.cnv2-card .dx-datagrid-rowsview .dx-row > td:first-child {
  padding: 4px 4px !important;
  vertical-align: middle !important;
}

/* ── Contracts Page Layout ── */
.cn-page {
  background: #f1f5f9;
  min-height: calc(100vh - 64px);
  padding: 20px 24px;
}
.cn-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.cn-page-title {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.cn-page-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0;
}
.cn-subtitle-filter { color: #2563eb; font-weight: 600; }

/* ── Summary Cards Strip ── */
.cn-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) { .cn-summary-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cn-summary-strip { grid-template-columns: 1fr 1fr; } }

.cn-summary-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 20px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.12s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  user-select: none;
}
.cn-summary-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.1); transform: translateY(-2px); }
.cn-sc-blue  { border-top-color: #3b82f6; }
.cn-sc-green { border-top-color: #22c55e; }
.cn-sc-amber { border-top-color: #f59e0b; }
.cn-sc-red   { border-top-color: #ef4444; }
.cn-sc-active.cn-sc-blue  { background: #eff6ff; box-shadow: 0 0 0 2px #3b82f6; transform: translateY(-2px); }
.cn-sc-active.cn-sc-green { background: #f0fdf4; box-shadow: 0 0 0 2px #22c55e; transform: translateY(-2px); }
.cn-sc-active.cn-sc-amber { background: #fffbeb; box-shadow: 0 0 0 2px #f59e0b; transform: translateY(-2px); }
.cn-sc-active.cn-sc-red   { background: #fef2f2; box-shadow: 0 0 0 2px #ef4444; transform: translateY(-2px); }
.cn-summary-count { font-size: 32px; font-weight: 800; color: #0f172a; line-height: 1; }
.cn-summary-label { font-size: 12px; color: #64748b; font-weight: 500; }

/* ── Content Card ── */
.cn-content-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* ── Custom Grid Toolbar (above grid) ── */
.cn-grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  gap: 12px;
  flex-wrap: wrap;
}
.cn-grid-toolbar-left,
.cn-grid-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Shared input style */
.cn-toolbar-input {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: #1e293b;
  transition: border-color 0.15s;
}
.cn-toolbar-input:focus { border-color: #3b82f6; }

/* Entity number + search button group */
.cn-entity-search-group {
  display: flex;
  align-items: center;
}
.cn-entity-search-group .cn-toolbar-input {
  width: 190px;
  border-right: none;
  border-radius: 4px 0 0 4px;
}
.cn-toolbar-icon-btn {
  height: 30px;
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-left: none;
  border-radius: 0 4px 4px 0;
  background: #1d6fb8;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}
.cn-toolbar-icon-btn:hover:not(:disabled) { background: #1558a0; }
.cn-toolbar-icon-btn:disabled { background: #94a3b8; cursor: not-allowed; }

/* Raw Data / Group Data link buttons */
.cn-export-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 500;
  color: #1d6fb8;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.cn-export-link-btn:hover:not(:disabled) {
  background: #e8f0fe;
  color: #0f4a82;
}
.cn-export-link-btn:disabled { color: #94a3b8; cursor: not-allowed; text-decoration: none; }
.cn-export-icon { font-size: 15px; }

/* xlsx icon button */
.cn-toolbar-xlsx-btn {
  height: 30px;
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  color: #374151;
  transition: background 0.15s, border-color 0.15s;
}
.cn-toolbar-xlsx-btn:hover { background: #f1f5f9; border-color: #94a3b8; }

/* Grid search input with icon */
.cn-grid-search-group {
  display: flex;
  align-items: center;
  position: relative;
}
.cn-grid-search-group .cn-toolbar-input {
  width: 180px;
  padding-left: 28px;
  padding-right: 28px;
}
.cn-grid-search-icon {
  position: absolute;
  left: 8px;
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
}
.cn-grid-search-clear {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 11px;
  padding: 2px;
  display: flex;
  align-items: center;
}
.cn-grid-search-clear:hover { color: #374151; }

/* Active filter bar (shows when a filter is selected) */
.cn-active-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}
.cn-active-filter-label { color: #374151; }
.cn-active-filter-label strong { color: #1d4ed8; }
.cn-clear-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}
.cn-clear-filter:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* ── Status / Sub-status Pill Badges ── */
.cn-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.cn-status-inprogress { background: #e8ecf5; color: #1e2d5f; }
.cn-status-active     { background: #dcfce7; color: #15803d; }
.cn-status-expiring   { background: #fef3c7; color: #92400e; }
.cn-status-expired    { background: #fee2e2; color: #b91c1c; }
.cn-status-pending    { background: #ffedd5; color: #c2410c; }
.cn-status-default    { background: #f1f5f9; color: #475569; }

/* ── Export Link Buttons (Raw Data / Group Data) ── */
.cn-export-link.dx-button {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 4px !important;
}
.cn-export-link .dx-button-content {
  padding: 4px 6px !important;
}
.cn-export-link .dx-button-text {
  color: #1d6fb8;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cn-export-link .dx-icon {
  color: #1d6fb8 !important;
  font-size: 14px !important;
}
.cn-export-link.dx-button:hover .dx-button-text,
.cn-export-link.dx-button:hover .dx-icon {
  color: #0f4a82 !important;
}
.cn-export-link.dx-button.dx-state-hover {
  background: #e8f0fe !important;
  border-radius: 4px !important;
}

/* ── Grid Action Icon Buttons ── */
.cn-action-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.cn-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.cn-action-edit    { background: #eef1f8; color: #1e2d5f; }
.cn-action-edit:hover    { background: #1e2d5f; color: #fff; }
.cn-action-view    { background: #f0fdf4; color: #16a34a; }
.cn-action-view:hover    { background: #16a34a; color: #fff; }
.cn-action-history { background: #faf5ff; color: #7c3aed; }
.cn-action-history:hover { background: #7c3aed; color: #fff; }
.cn-action-delete  { background: #fef2f2; color: #dc2626; }
.cn-action-delete:hover  { background: #dc2626; color: #fff; }

/* ═══════════════════════════════════════════════════════════
   SEG SIDEBAR  (B + C mix: white collapsible icon rail)
   ═══════════════════════════════════════════════════════════ */

/* ── Layout adjustments ── */
.main-header,
.content-wrapper,
.main-footer {
  margin-left: 240px !important;
  transition: margin-left 0.22s ease !important;
}
body.seg-collapsed .main-header,
body.seg-collapsed .content-wrapper,
body.seg-collapsed .main-footer {
  margin-left: 64px !important;
}

/* Hide footer to remove bottom white strip */
.main-footer {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  border-top: 0 !important;
}

/* Keep header fixed; only content scrolls */
html,
body {
  height: 100%;
}
body {
  overflow: hidden;
}
.main-header {
  position: fixed !important;
  top: 0;
  left: 240px;
  right: 0;
  width: calc(100% - 240px);
  margin-left: 0 !important;
  z-index: 1101;
}
body.seg-collapsed .main-header {
  left: 64px;
  width: calc(100% - 64px);
  margin-left: 0 !important;
}
.content-wrapper {
  height: 100vh;
  overflow-y: auto;
  padding-top: 64px;
}

/* ── Sidebar shell ── */
.seg-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 240px;
  background: #fff;
  border-right: 1px solid #1e2d5f;
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease;
  z-index: 1050;
  overflow: hidden;
  /* cancel AdminLTE elevation */
  box-shadow: none !important;
}
.seg-sidebar--collapsed {
  width: 64px;
}

/* ── Brand / logo area ── */
.seg-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 64px;
  background: #1e2d5f;
  border-bottom: 3px solid #f5a81c;
  border-right: 1px solid #1e2d5f;
  flex-shrink: 0;
  gap: 8px;
  overflow: hidden;
}
.seg-brand-logo {
  display: flex;
  align-items: center;
  overflow: hidden;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

/* Expanded: lion icon + text side by side (full logo) */
.seg-brand-icon {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}
.seg-brand-name {
  height: 36px;
  max-width: 148px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

/* Collapsed: icon only, hide text */
.seg-sidebar--collapsed .seg-brand-icon {
  width: 38px;
  height: 38px;
}
.seg-sidebar--collapsed .seg-brand-name {
  display: none;
}
.seg-sidebar--collapsed .seg-brand {
  justify-content: center;
  padding: 0;
  flex-direction: column;
  height: auto;
  min-height: 64px;
  gap: 4px;
}
.seg-sidebar--collapsed .seg-brand-logo {
  justify-content: center;
  flex: none;
  padding-top: 10px;
}

/* ── Toggle button ── */
.seg-toggle-btn {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  font-size: 11px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.seg-toggle-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* Collapsed: show toggle below the icon */
.seg-sidebar--collapsed .seg-toggle-btn {
  display: flex;
  width: 22px;
  height: 22px;
  font-size: 10px;
  margin-bottom: 8px;
}

/* ── Nav scroll area ── */
.seg-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0;
}
.seg-sidebar-nav::-webkit-scrollbar { width: 3px; }
.seg-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.seg-sidebar-nav::-webkit-scrollbar-thumb { background: #d0d8ee; border-radius: 4px; }

/* ── Nav item wrapper ── */
.seg-nav-item {
  position: relative;
}

/* ── Nav link (all states) ── */
.seg-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  height: 40px;
  color: #4b5a7e;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.13s, color 0.13s, border-color 0.13s;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.seg-nav-link:hover {
  background: #eef1f8;
  color: #1e2d5f;
  text-decoration: none;
}
.seg-nav-link.seg-active {
  border-left-color: #f5a81c;
  background: #eef1f8;
  color: #1e2d5f;
  font-weight: 600;
}

/* ── Icon inside nav link ── */
.seg-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

/* ── Text label ── */
.seg-nav-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s;
}
.seg-sidebar--collapsed .seg-nav-text { opacity: 0; width: 0; }

/* ── Chevron for expandable groups ── */
.seg-chevron {
  font-size: 10px;
  margin-left: auto;
  color: #9ca3af;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.seg-chevron-open { transform: rotate(180deg); }
.seg-sidebar--collapsed .seg-chevron { display: none; }

/* ── Collapsed: center icons + tooltip ── */
.seg-sidebar--collapsed .seg-nav-link {
  justify-content: center;
  padding: 0;
  border-left-width: 0;
  border-bottom: 3px solid transparent;
}
.seg-sidebar--collapsed .seg-nav-link.seg-active {
  border-bottom-color: #f5a81c;
  border-left-color: transparent;
}

/* Tooltip — data-tooltip lives on .seg-nav-link itself */
.seg-sidebar--collapsed .seg-nav-link[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #1e2d5f;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
}
.seg-sidebar--collapsed .seg-nav-link[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  left: 63px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: #1e2d5f;
  z-index: 9999;
  pointer-events: none;
}

/* ── Submenu ── */
.seg-submenu {
  border-left: 2px solid #f5a81c;
  margin: 0 0 2px 32px;
  background: #f8fafd;
}
.seg-submenu .seg-nav-link {
  height: 36px;
  font-size: 13px;
  border-left: none;
  padding: 0 12px;
  color: #4b5a7e;
}
.seg-submenu .seg-nav-link:hover { background: #eef1f8; color: #1e2d5f; }
.seg-submenu .seg-nav-link.seg-active { color: #1e2d5f; font-weight: 600; background: #eef1f8; }

/* ── Divider ── */
.seg-nav-divider {
  height: 1px;
  background: #e8ecf5;
  margin: 6px 12px;
}

/* ── Logout item ── */
.seg-nav-logout { color: #b91c1c; }
.seg-nav-logout:hover { background: #fef2f2; color: #b91c1c; }
