

/************** Common CTBTO QMS Portal CSS ***************/

.static-top.navbar-dark {
  background-color: #071d49 !important;
 }


.btn.btn-primary {
  background-color: #0078D4 !important;
  border-color: #0078D4 !important;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 6px;
  padding: 8px 16px;
  transition: background-color 0.2s ease;
}

.container,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
  max-width: 1600px !important;
}

.wrapper-page {
  min-height: 750px;
  background-color: #F7FAFB;
  padding-bottom: 2rem;
  margin-bottom: 20px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 3px 5px rgb(57 63 72 / 30%);
  -webkit-box-shadow: 0 3px 5px rgb(57 63 72 / 30%);
  -moz-box-shadow: 0 3px 5px rgb(57 63 72 / 30%);
}


.custom-wrapper {
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

/* Header container */
.table-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  margin-top: 20px;
}

/* Dropdown filter */
.filter-dropdown {
  border-radius: 8px !important;
  padding: 6px 12px !important;
  border: 1px solid #d1d5db;
  color: #374151;
  width: 180px;
  background: #fff;
}

/* Search bar container */
.table-search-container {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  padding-left: 35px;
  border: 1px solid #cbd5e1;
  font-size: 15px;
  box-shadow: none;
}

.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .2);
  outline: none;
}

/* MOBILE & TABLET RESPONSIVE STYLING */
@media (max-width: 768px) {
  .table-header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .filter-dropdown {
    width: 100%;
  }
}

.table-custom-container {
  width: 100%;
  /* overflow-x: hidden;
  default desktop view */
}

/* Base Table Style */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-family: 'Segoe UI', sans-serif;
  table-layout: fixed;
}

.custom-table th {
  padding: 12px 16px;
  background: #f8f9fb;
  color: #333;
  border-bottom: 2px solid #e5e7eb;
  text-align: left;
  min-width: 150px;
}

.custom-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  color: #444;
}

/* base */
th {
  cursor: pointer;
  position: relative;
  user-select: none;
}

/* Default (unsorted) */
th::after {
  content: "\f229";
  /* bi-chevron-expand */
  font-family: "bootstrap-icons";
  position: absolute;
  right: 8px;
  font-size: 0.8rem;
  color: #adb5bd;
}

/* Ascending */
th.sort-asc::after {
  content: "\f286";
  /* bi-chevron-up */
  color: #0078D4;
}

/* Descending */
th.sort-desc::after {
  content: "\f282";
  /* bi-chevron-down */
  color: #0078D4;
}

th::after {
  content: "\f0dc";
  /* fa-sort */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.customtable-actions::after {
    content: none !important;
}

th.sort-asc::after {
  content: "\f0de";
}

th.sort-desc::after {
  content: "\f0dd";
}

/* Hover */
.custom-table tbody tr:hover {
  background-color: #f5faff;
}

/*  TABLET RESPONSIVE (<=1024px) */
@media only screen and (max-width: 1024px) {
  .table-custom-container {
    overflow-x: auto;
    /* Enable horizontal scroll */
  }

  .custom-table {
    min-width: 900px;
    /* Prevent collapse */
  }
}

/*  MOBILE RESPONSIVE (<=768px) */
@media only screen and (max-width: 768px) {
  .table-custom-container {
    overflow-x: auto;
    /* Enable scroll on mobile */
  }

  .custom-table {
    min-width: 850px;
    /* Ensures readability */
  }
}

/* Table Pagination CSS */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 18px 0;
  flex-wrap: wrap;
  gap: 12px;
}

/* Pagination block */
.pagination {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pagination button {
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #333;
  font-size: 14px;
  height: 40px;
  width: 40px;
  font-weight: 700;
}

.pagination button:hover {
  background: #f3f4f6;
}

.pagination button.active {
  background: #0078D4;
  color: #fff;
  border-color: #066c9b;
  text-align: center;
  font-weight: bold;
  height: 40px;
  width: 40px;
}

.pagination button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .dots {
  padding: 0 4px;
  color: #555;
}

/* View All Section */
.viewall-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
}

.total-records-text {
  font-size: 14px;
  color: #444;
}

.view-all-link {
  font-size: 14px;
  color: #0078D4;
  text-decoration: underline;
  cursor: pointer;
}

/* TABLET RESPONSIVE (<=1024px)*/
@media only screen and (max-width: 1024px) {
  .pagination-wrapper {
    justify-content: center;
    text-align: center;
  }
}

/* MOBILE RESPONSIVE (<=768px) */
@media only screen and (max-width: 768px) {
  .pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
  }

  .pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .viewall-container {
    justify-content: flex-start;
  }
}

/* Dropdown Button Style */
.dropdownButton {
  border: 2px solid #066c9b;
  background-color: white;
  color: #0078D4;
  cursor: pointer;
  font-size: 23px;
  padding: 5px 10px;
  border: none;
}

.dropdowndiv {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 120px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  /* right: 0; */
  border-radius: 5px;
}

.dropdownButton:hover {
  background-color: #91b8d6;
}

.dropdownButton:hover {
  background-color: #f3f4f6;
  border: 1px solid #0078D4;
  border-radius: 0;
  /* 👈 makes it square */
  color: #111827;
  border-radius: 6px;
}


.dropdown-item {
  color: #333;
  padding: 8px 12px !important;
  text-decoration: none;
  display: block;
  font-size: 14px;
}

.show {
  display: block;
}

.custom-table .action-dropdown {
  position: static !important;
}

/* Compact overall popup */
.swal2-popup {
  width: 30em !important;
  padding: 0.6em 1.2em !important;
  /* less vertical padding */
  font-size: 0.8rem !important;
  border-radius: 8px !important;
  min-height: auto !important;
  line-height: 1.2 !important;
}

/* Title — bigger but closer */
.swal2-title {
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  margin: 0.2em 0 !important;
  /* tighten above & below title */
}

/* Text — compact spacing */
.swal2-text {
  font-size: 0.85rem !important;
  margin: 0.2em 0 !important;
  /* reduced margin */
}

/* Icon — smaller & closer */
.swal2-icon {
  transform-origin: center center;
  margin: 0.1em auto !important;
  /* less space around icon */
}

/* Buttons — compact */
.swal2-button {
  font-size: 0.75rem !important;
  padding: 0.25em 0.8em !important;
  min-width: 4.5em !important;
  margin: 0 0.2em !important;
  /* reduce gap between buttons */
}

/* Action buttons wrapper */
.sw-compact .swal2-actions {
  margin-top: 0.4em !important;
  /* bring buttons closer to text */
}

.swal2-popup {
  height: auto !important;
  font-size: 14px !important;
  padding: 15px !important;
  transform: scale(0.9);
  max-width: 100% !important;
}

.swal2-title,
.swal2-content,
.swal2-actions {
  font-size: 14px !important;
}

.swal2-button {
  font-size: 10px !important;
  padding: 8px 16px !important;
}

.swal2-icon {
  font-size: 10px !important;
}

h3, .h3 {
  margin-top: 2px !important; 
}

.link-primary {
    color: #0078D4 !important; /* Match the primary button color */
}

/* Reusable sticky header for tables */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fb;
}

/* Reusable custom checkbox style */
.custom-checkbox {
  transform: scale(1.4);
  cursor: pointer;
  accent-color: #0078D4;
}


/*********** End of Common CTBTO QMS Portal CSS ***********/

/*** QMS Workflow Request List Page CSS ***/

.qms_menu-subtitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

/* Workflow title block */
.workflow-card h3 {
  margin: 0;
}

.workflow-card .status {
  font-size: 14px;
  color: #6b7280;
}

/* ===== Base Status Pill ===== */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}

/* ===== ACTIVE WORKFLOW STATUSES ===== */
.status-approval {
  background-color: #ff7a00;
  color: #ffffff;
}

.status-qms-check {
  background-color: #f5b301;
  color: #ffffff;
}

.status-review {
  background-color: #0078D4;
  color: #ffffff;
}

.status-manage {
  background-color: #0dcaf0;
  color: #ffffff;
}

.status-publish {
  background-color: #2bb238;
  color: #ffffff;
}

.status-repository {
  background-color: #a855f7;
  color: #ffffff;
}

.status-draft {
  background-color: #64748b;
  color: #ffffff;
}

/*** End of QMS Workflow Request List Page CSS ***/

/*** QMS Workflow Request Details CSS ***/

.card {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

/* Stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 20px;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  height: 3px;
  background: #e5e7eb;
}

.step {
  text-align: center;
  width: 100%;
  z-index: 1;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e9edf3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  font-size: 20px;
  color: #6b7280;
}

.step.done .step-icon {
  background: #22c55e;
  color: #fff;
}

.step.active .step-icon {
  background: #06b6d4;
  color: #fff;
}

.status-badge {
  font-size: 12px;
  border-radius: 12px;
  padding: 2px 10px;
  margin-top: 4px;
  display: inline-block;
}

/* stageline colors */

/* Progress fill line on top of base line */
.stepper::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 0;
  height: 3px;
  width: var(--progress-width, 0%);
  background: linear-gradient(
    90deg,
    #22c55e 0%,    /* Draft */
    #22c55e 20%,

    #06b6d4 35%,   /* Manage */
    #06b6d4 50%,

    #3b82f6 65%,   /* Review */
    #3b82f6 75%,

    #f97316 90%,   /* Approval/Publish */
    #f97316 100%
  );
  transition: width 0.4s ease;
  z-index: 0;
}


/* Cursor behavior */
.step.done,
.step.active {
  cursor: pointer;
}

.step:not(.done):not(.active) {
  cursor: not-allowed;
  opacity: 0.75;
}
/* stageline colors */

.badge-done {
  background: #dcfce7;
  color: #166534;
}

.badge-active {
  background: #cffafe;
  color: #155e75;
}

.badge-pending {
  border: 1px solid #cbd5e1;
  color: #475569;
}

/* Stage content */
.stage-content {
  display: none;
}

.stage-content.active {
  display: block;
}

/* Apply to add users table in workflow request */
.request-table {
  table-layout: fixed;
  width: 100%;
}

.addrequestuser-table thead {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.addrequestuser-table tbody {
  display: block;
  max-height: 160px;
  overflow-y: auto;
  width: 100%;
}

.addrequestuser-table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

/****** End of QMS Workflow Request Details CSS ***/

/****** Dashboard CSS ***/

/* KPI gradients */
.bg-gradient-primary {
  background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
}

.bg-gradient-info {
  background: linear-gradient(135deg, #e6faff 0%, #ffffff 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #eafaf1 0%, #ffffff 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #fff4e5 0%, #ffffff 100%);
}

/* Hover lift */
/* .hover-transform {
  transition: transform .2s ease, box-shadow .2s ease;
}

.hover-transform:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .1);
} */

/* Division scroll area */
.division-scroll {
  max-height: 370px;
  /* keeps 3 rows */
  overflow-y: auto;
  /* vertical scroll */
  overflow-x: hidden;
  /* ✅ removes bottom scroll */
  padding-right: 4px;
}

.division-scroll::-webkit-scrollbar {
  width: 6px;
}

.division-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

/* Ensure only the dashboard chart card prints, not the whole page */
@media print {
  body * {
    visibility: hidden !important;
  }
  .card-print, .card-print * {
    visibility: visible !important;
  }
  .card-print {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 100vw !important;
    background: #fff !important;
    z-index: 9999;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* Hide the Export button when printing */
  #exportChartBtn {
    display: none !important;
  }
}

/****** End of Dashboard CSS *******/



/****** My Activities List *******/
.highlight-row { 
    background-color: #d9eafc !important; 
    transition: background 0.5s; 
}

/* My Activities List Styles - No inline styles */
.search-input-container {
    max-width: 400px;
}

.search-input-field {
    min-width: 200px;
    width: 100%;
}

.summary-card-icon {
    width: 46px;
    height: 46px;
}

.sort-arrow {
    margin-left: 5px;
    opacity: 0.7;
}

/****** End of Activities List *******/

/****** Home Page Styles *******/
/* Browse All Documents hover effect */

.browse-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 6px 10px;
    transition: all 0.3s ease;
    text-shadow: 
        0 0 12px #86b7fe,
        0 0 20px #86b7fe;
}

/* Keep white on all states */
.browse-link:hover,
.browse-link:focus,
.browse-link:active {
    color: #ffffff !important;
}

/* Hover effect */
.browse-link:hover {
    transform: translateY(-2px);
}

.browse-link:hover i {
    transform: scale(1.15);
    transition: transform 0.3s ease;
}
/****** End of Home Page *******/

/****** Bookmark Icon ******/
  .bookmark-icon-btn {
		background: none;
		border: none;
		cursor: pointer;
		font-size: 23px;
    margin-top: 10%;
    color:#0078D4;
	}
  /****** End of Bookmark Icon ******/

  /****** Download Icon ******/
  .download-icon-btn {
		background: none;
		border: none;
		cursor: pointer;
		font-size: 23px;
    margin-top: 10%;
    color:#0078D4;
	}
  /****** End of Download Icon ******/