/* ========================================================================
   QCO-WTO-Order Hero Section
   Mirrors the Feedback-Concerns hero pattern
   ======================================================================== */

:root {
  --qco-font-heading: var(--font-primary, "Poppins", sans-serif);
  --qco-font-body: var(--font-secondary, "Plus Jakarta Sans", sans-serif);
  --qco-accent: var(--secondary, #46aefd);
}

/* ===================== Hero wrapper ===================== */

.qco-hero {
  padding: 1.5rem 0 2rem 0;
  background-color: #ffffff;
  width: 100%;
}

/* ===================== Banner container ===================== */

.qco-hero__banner {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  min-height: 450px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(0, 46, 132, 0.1);
  box-shadow: 0 10px 30px rgba(0, 46, 132, 0.05);
}

/* ===================== Background image ===================== */

.qco-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* ===================== Content overlay ===================== */

.qco-hero__content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 2rem 4.5rem 4rem;
  max-width: 540px;
  font-family: var(--qco-font-body);
}

/* ===================== Breadcrumbs ===================== */

.qco-hero__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #2563eb;
  margin-bottom: 1.5rem;
}

.qco-hero__breadcrumbs-link {
  color: #2563eb;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}

.qco-hero__breadcrumbs-link:hover {
  opacity: 0.8;
}

.qco-hero__breadcrumbs-sep {
  color: #94a3b8;
  font-weight: 400;
}

.qco-hero__breadcrumbs-current {
  color: #2563eb;
}

/* ===================== Heading ===================== */

.qco-hero__heading {
  font-family: var(--qco-font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0b192c;
  margin: 0 0 1rem 0;
}

.qco-hero__heading-accent {
  color: #2563eb;
}

/* ===================== Description text ===================== */

.qco-hero__text {
  font-family: var(--qco-font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: #475569;
  max-width: 480px;
  margin: 0;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

/* --- 1024px : Large tablets / small laptops --- */

@media (max-width: 1024px) {
  .qco-hero__content {
    max-width: 55%;
  }

  .qco-hero__heading {
    font-size: 30px;
  }
}

/* --- 900px : Tablets --- */

@media (max-width: 900px) {
  .qco-hero__content {
    max-width: 60%;
  }

  .qco-hero__heading {
    font-size: 28px;
  }

  .qco-hero__text {
    max-width: 100%;
  }
}

/* --- 768px : Portrait tablets / large phones --- */

@media (max-width: 768px) {
  .qco-hero {
    padding: 28px 16px;
  }

  .qco-hero__banner {
    min-height: 300px;
    border-radius: 14px;
  }

  .qco-hero__content {
    max-width: 65%;
    padding: 36px 28px;
  }

  .qco-hero__heading {
    font-size: 26px;
  }

  .qco-hero__text {
    font-size: 13px;
  }

  .qco-hero__bg {
    object-position: left center;
  }
}

/* --- 576px : Phones (landscape & large portrait) --- */

@media (max-width: 576px) {
  .qco-hero {
    padding: 20px 12px;
  }

  .qco-hero__banner {
    min-height: 280px;
    border-radius: 12px;
  }

  /* Semi-transparent overlay so text stays readable over illustrations */
  .qco-hero__banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to right,
        rgba(246, 248, 252, 0.95) 0%,
        rgba(246, 248, 252, 0.85) 60%,
        rgba(246, 248, 252, 0.5) 100%);
  }

  .qco-hero__content {
    max-width: 100%;
    padding: 32px 22px;
    z-index: 2;
  }

  .qco-hero__heading {
    font-size: 24px;
  }

  .qco-hero__breadcrumbs {
    font-size: 12px;
    margin-bottom: 16px;
  }

  .qco-hero__text {
    font-size: 13px;
    margin-bottom: 10px;
  }
}

/* --- 480px : Standard mobile phones --- */

@media (max-width: 480px) {
  .qco-hero {
    padding: 16px 10px;
  }

  .qco-hero__banner {
    min-height: 260px;
  }

  .qco-hero__content {
    padding: 28px 20px;
  }

  .qco-hero__heading {
    font-size: 22px;
  }

  .qco-hero__text {
    font-size: 12.5px;
    line-height: 1.55;
  }
}

/* --- 360px : Small mobile phones --- */

@media (max-width: 360px) {
  .qco-hero {
    padding: 12px 8px;
  }

  .qco-hero__banner {
    min-height: 240px;
    border-radius: 10px;
  }

  .qco-hero__content {
    padding: 24px 16px;
  }

  .qco-hero__heading {
    font-size: 20px;
  }

  .qco-hero__breadcrumbs {
    font-size: 11px;
    gap: 6px;
    margin-bottom: 14px;
  }

  .qco-hero__text {
    font-size: 12px;
  }
}

/* ========================================================================
   QCO TABLE & DASHBOARD SECTION
   ======================================================================== */

/* ========================================================================
   QCO TABLE & DASHBOARD SECTION
   ======================================================================== */

.qco-table-section {
  padding: 32px 0 60px;
  background: #f8fafc;
}

/* --- Top Bar: Dropdown + Search + Action buttons --- */
.qco-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(4, 12, 40, 0.04);
  border: 1px solid #eef2f6;
  flex-wrap: wrap;
}

/* Category Dropdown */
.qco-category-dropdown {
  position: relative;
  min-width: 220px;
}

.qco-category-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 16px;
  background: #ffffff;
  border: 1.5px solid #2563eb;
  border-radius: 12px;
  color: #1e293b;
  font-family: var(--qco-font-heading);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  gap: 10px;
  transition: all 0.2s ease;
}

.qco-category-btn-icon {
  color: #2563eb;
  display: flex;
  align-items: center;
}

.qco-chevron {
  transition: transform 0.2s ease;
  color: #64748b;
}

.qco-category-btn.open .qco-chevron {
  transform: rotate(180deg);
}

.qco-category-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 310px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  z-index: 100;
  display: none;
  max-height: 380px;
  overflow-y: auto;
}

.qco-category-menu.open {
  display: block;
  animation: notifFadeIn 0.2s ease;
}

.qco-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.qco-category-item:hover {
  background: #f1f5f9;
}

.qco-category-item.active {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}

.qco-category-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #334155;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qco-category-item-left i {
  color: #2563eb;
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.qco-category-badge {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 2px 8px;
  border-radius: 12px;
}

.qco-category-item.active .qco-category-badge {
  background: #2563eb;
  color: #ffffff;
}

/* Search Bar */
.qco-search-bar {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.qco-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #2563eb;
  font-size: 15px;
}

#qco-search-input {
  width: 100%;
  padding: 11px 16px 11px 44px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--qco-font-body);
}

#qco-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.qco-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.qco-icon-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.qco-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: #0066ff;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.qco-clear-btn:hover {
  background: #0052cc;
}

/* --- Secondary Filter Toolbar --- */
.qco-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.qco-filter-left,
.qco-filter-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.qco-sub-search {
  padding: 9px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  width: 260px;
  background: #ffffff;
}

.qco-std-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
}

.qco-icon-btn-sm {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.qco-export-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #0066ff;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Table Styles --- */
.qco-table-wrap {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eef2f6;
  box-shadow: 0 4px 20px rgba(4, 12, 40, 0.03);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Custom Sleek Scrollbar for Mobile Touch Overflow */
.qco-table-wrap::-webkit-scrollbar {
  height: 5px;
}

.qco-table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.qco-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.qco-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.qco-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

/* Desktop default: 100% width fit with no horizontal scrollbar */
@media (min-width: 992px) {
  .qco-table-wrap {
    overflow-x: visible;
  }

  .qco-table {
    min-width: 0;
    table-layout: fixed;
  }

  .qco-table th.qco-th-product {
    width: 30%;
  }

  .qco-table th:nth-child(2) {
    width: 14%;
  }

  .qco-table th:nth-child(3) {
    width: 18%;
  }

  .qco-table th:nth-child(4) {
    width: 11%;
  }

  .qco-table th:nth-child(5) {
    width: 12%;
  }

  .qco-table th:nth-child(6) {
    width: 15%;
  }
}

/* Mobile & Tablet: allow touch scroll when screen is narrow */
@media (max-width: 991px) {
  .qco-table {
    min-width: 850px;
    table-layout: auto;
  }

  .qco-table th.qco-th-product {
    min-width: 260px;
  }

  .qco-table th:nth-child(2) {
    min-width: 130px;
  }

  .qco-table th:nth-child(3) {
    min-width: 170px;
  }

  .qco-table th:nth-child(4) {
    min-width: 110px;
  }

  .qco-table th:nth-child(5) {
    min-width: 130px;
  }

  .qco-table th:nth-child(6) {
    min-width: 180px;
  }
}

.qco-table th {
  padding: 16px 16px;
  font-family: var(--qco-font-heading);
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  word-wrap: break-word;
}

.qco-table th .qco-sort-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  margin-left: 4px;
}

.qco-table td {
  padding: 16px 18px;
  font-size: 13px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  line-height: 1.5;
}

.qco-table tr:last-child td {
  border-bottom: none;
}

.qco-product-cell {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #2563eb;
  font-weight: 600;
}

.qco-product-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 2px;
}

.qco-product-link {
  color: inherit;
  text-decoration: none;
}

.qco-product-link:hover {
  text-decoration: underline;
}

.qco-link {
  color: #2563eb;
  text-decoration: underline;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
  margin-top: 2px;
}

/* Table Footer & Pagination */
.qco-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 8px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.qco-results-count {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.qco-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qco-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qco-page-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.qco-page-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.qco-rows-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
}

.qco-rows-per-page select {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  background: #ffffff;
  color: #334155;
}

/* Empty state */
.qco-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
}

.qco-empty-state i {
  font-size: 32px;
  margin-bottom: 8px;
}

/* ========================================================================
   RESPONSIVE LAYOUT ADJUSTMENTS FOR TABLE DASHBOARD
   ======================================================================== */

@media (max-width: 768px) {
  .qco-table-section {
    padding: 24px 0 40px;
  }

  .qco-topbar {
    padding: 14px;
    gap: 12px;
    border-radius: 14px;
  }

  .qco-category-dropdown {
    width: 100%;
    min-width: 100%;
  }

  .qco-category-menu {
    width: 100%;
    max-width: 100%;
  }

  .qco-search-bar {
    width: 100%;
    min-width: 100%;
  }

  /* Keep filter button and clear button cleanly inline on mobile */
  .qco-icon-btn {
    width: 44px;
    height: 44px;
  }

  .qco-clear-btn {
    flex: 1;
    padding: 11px 16px;
  }

  .qco-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .qco-filter-left,
  .qco-filter-right {
    width: 100%;
    justify-content: flex-start;
  }

  .qco-sub-search {
    display: none;
  }

  .qco-std-filter-btn {
    flex: 1;
    justify-content: center;
  }

  .qco-export-btn {
    flex: 1;
    justify-content: center;
  }

  .qco-table-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .qco-topbar {
    padding: 12px;
    gap: 10px;
  }

  #qco-search-input {
    font-size: 13px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .qco-category-btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .qco-table th {
    padding: 12px 14px;
    font-size: 11px;
  }

  .qco-table td {
    padding: 12px 14px;
    font-size: 12.5px;
  }

  .qco-product-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .qco-page-btn {
    min-width: 30px;
    height: 30px;
    font-size: 12px;
  }
}