/*
Theme Name: ChemData Pro
Theme URI: https://ChemComply.org
Author: ChemComply
Description: Premium scientific directory theme with modern card layouts, live search, sidebars, and professional data presentation.
Version: 2.7.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: chemdata
*/

:root {
  /* -- Palette -- */
  --primary: #0f4c5c;
  --primary-dark: #09313d;
  --primary-light: #e0f2f1;
  --accent: #fb8b24;
  --accent-hover: #e07a1c;
  --secondary: #5f6c7b;
  
  /* -- Backgrounds -- */
  --bg-body: #f4f6f8;
  --bg-panel: #ffffff;
  --bg-input: #f1f3f5;
  
  /* -- Text -- */
  --text-main: #1d2d35;
  --text-muted: #6c757d;
  
  /* -- UI Tokens -- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 8px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.1);
  --container: 1280px;
  --header-height: 70px;
  --mobile-nav-height: 65px;

  /* -- Typography -- */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;

  /* -- Surfaces -- */
  --surface-1: #ffffff;
  --surface-2: #f7f9fc;
  --border-soft: rgba(15, 76, 92, 0.08);
  --ring: rgba(15, 76, 92, 0.18);
}

/* ------------------------------------------
   1. BASE STYLES
   ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background:
    radial-gradient(900px 500px at 10% -5%, rgba(15, 76, 92, 0.08), transparent 60%),
    radial-gradient(700px 400px at 90% 0%, rgba(251, 139, 36, 0.08), transparent 60%),
    var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 0;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; transition: all 0.2s ease; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; padding: 0; margin: 0; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

body.overflow-hidden { overflow: hidden; }

/* ------------------------------------------
   2. BUTTONS (PREMIUM UPGRADE)
   ------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: none;
    min-height: 44px;
    gap: 8px;
}

/* ------------------------------------------
   AUTH FORMS (PRO LOOK)
   ------------------------------------------ */
.cc-auth .portal-sidebar {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}
.cc-auth .portal-form-side h2 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.cc-auth .portal-form-side .form-floating-group input,
.cc-auth .portal-form-side .form-floating-group select,
.cc-auth .portal-form-side .form-floating-group textarea,
.cc-auth .portal-sidebar .login input[type="text"],
.cc-auth .portal-sidebar .login input[type="password"] {
  border-radius: 12px;
  border-color: rgba(15, 76, 92, 0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.cc-auth .portal-sidebar .login input[type="text"]:focus,
.cc-auth .portal-sidebar .login input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
  outline: none;
}
.cc-auth .portal-sidebar .login .button {
  width: 100%;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
}
.cc-auth .portal-sidebar .login .button:hover { opacity: 0.95; }
.cc-auth .cc-subtext { color: var(--text-muted); font-size: 13px; }

/* Login Portal Enhancements */
.cc-auth.portal-container {
  border: 1px solid var(--border-soft);
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.cc-auth .portal-sidebar {
  border-right: 1px solid var(--border-soft);
}
.cc-auth .portal-form-side {
  background: #ffffff;
}
.cc-auth .portal-sidebar .login p {
  margin: 0 0 12px;
}
.cc-auth .portal-sidebar .login label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.cc-auth .portal-sidebar .login input[type="text"],
.cc-auth .portal-sidebar .login input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  background: #ffffff;
}
.cc-auth .portal-sidebar .login .button {
  min-height: 46px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cc-auth .portal-sidebar a,
.cc-auth .portal-form-side a {
  color: var(--primary);
  font-weight: 600;
}
.cc-auth .portal-sidebar a:hover,
.cc-auth .portal-form-side a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
.cc-auth .portal-form-side .btn {
  width: 100%;
}

@media (max-width: 992px) {
  .cc-auth.portal-container {
    border-radius: 0;
    box-shadow: none;
  }
  .cc-auth .portal-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }
}

/* Primary Button - Gradient & Shadow */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(15, 76, 92, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 76, 92, 0.35);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 76, 92, 0.2);
}

/* ------------------------------------------
   ADMIN PORTAL: ENQUIRY SUMMARY
   ------------------------------------------ */
.cc-admin-header-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.cc-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #eef2f7;
  color: #1f2937;
  border: 1px solid #e5e7eb;
}

.cc-admin-badge.unassigned {
  background: #fff3cd;
  border-color: #ffe69c;
  color: #8a5a00;
}

.cc-admin-badge.awaiting {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #075985;
}

.cc-enquiry-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.cc-enquiry-summary-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.cc-enquiry-summary-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.cc-enquiry-summary-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f4c5c;
  margin-top: 6px;
}

.cc-enquiry-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.cc-enquiry-quick-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.cc-enquiry-quick-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #0f4c5c;
}

.cc-enquiry-quick-table {
  margin-top: 0;
  font-size: 13px;
}

.cc-enquiry-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.cc-enquiry-filter-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #cbd5f5;
  color: #1f2937;
  background: #f8fafc;
}

.cc-enquiry-filter-link.active {
  background: #0f4c5c;
  border-color: #0f4c5c;
  color: #ffffff;
}

/* ------------------------------------------
   3. HEADER
   ------------------------------------------ */
.main-header { 
    position: sticky; top: 0; z-index: 1000; 
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease; 
}
.main-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.topbar { background: var(--primary-dark); color: rgba(255,255,255,0.8); font-size: 12px; padding: 6px 0; }
.topbar-flex { display: flex; justify-content: space-between; align-items: center; }

.header-main { padding: 16px 0; }
.header-flex { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand img { height: 52px; width: auto; }
.brand-text { font-size: 22px; font-weight: 800; color: var(--primary); }

.search-wrap { flex: 1; max-width: 600px; position: relative; }
.search-input { 
    width: 100%; padding: 14px 50px 14px 20px; 
    border-radius: 99px; border: 2px solid transparent; 
    background: var(--bg-input); 
    font-size: 15px; 
    transition: all 0.3s;
}
.search-input:focus,
.search-wrap.is-focused .search-input {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 76, 92, 0.1);
    outline: none;
}
.search-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: #6c757d; pointer-events: none; }

#search-suggestions { 
    position: absolute; top: 110%; left: 0; right: 0; 
    background: #fff; border: 1px solid #e9ecef; 
    border-radius: 12px; box-shadow: var(--shadow-lg); 
    z-index: 1100; overflow: hidden; display: none; 
}
.suggestion-item { padding: 12px 20px; border-bottom: 1px solid #f1f3f5; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-main); }
.suggestion-item:hover { background: var(--primary-light); color: var(--primary-dark); }

.header-nav-bar { border-top: 1px solid #e9ecef; background: rgba(255,255,255,0.8); }
.header-nav-list { display: flex; gap: 8px; overflow-x: auto; }
.header-nav-list::-webkit-scrollbar { height: 6px; }
.header-nav-list::-webkit-scrollbar-thumb { background: rgba(15, 76, 92, 0.15); border-radius: 10px; }
.header-nav-list li a { display: inline-block; padding: 12px 18px; font-size: 14px; font-weight: 600; color: var(--text-main); border-bottom: 3px solid transparent; transition: all 0.2s; }
.header-nav-list li a:hover { color: var(--primary); border-bottom-color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-btn { background: transparent; border: none; cursor: pointer; color: var(--primary); padding: 8px; position: relative; }
.cart-count { position: absolute; top: 0; right: -4px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 5px; border-radius: 10px; min-width: 16px; text-align: center; }

.header-quick-links { display: inline-flex; align-items: center; gap: 6px; }

.header-logout {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

#header-hover-zone {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 1001;
    pointer-events: auto;
    background: transparent;
}

/* Keep sticky header/ribbon below the WordPress admin bar */
body.admin-bar .main-header { top: 32px; }
body.admin-bar #header-hover-zone { top: 32px; }
body.admin-bar .portal-role-strip { top: 32px; }
body.admin-bar .header-mini-actions { top: calc(14px + 32px); }

@media (max-width: 782px) {
  body.admin-bar .main-header { top: 46px; }
  body.admin-bar #header-hover-zone { top: 46px; }
  body.admin-bar .portal-role-strip { top: 46px; }
  body.admin-bar .header-mini-actions { top: calc(14px + 46px); }
}

body.header-hidden .main-header {
    transform: translateY(-110%);
    opacity: 0;
}

body.header-hover .main-header,
body.header-pinned .main-header {
    transform: translateY(0);
    opacity: 1;
}

body.header-hidden .header-nav-bar {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    border-top: 0;
}

body.header-hover .header-nav-bar,
body.header-pinned .header-nav-bar {
    opacity: 1;
    pointer-events: auto;
    height: auto;
    border-top: 1px solid #e9ecef;
}

.header-mini-actions {
    position: fixed;
    top: 14px;
    right: 20px;
    z-index: 1102;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

body.header-hidden .header-mini-actions {
    opacity: 1;
    pointer-events: auto;
}

.portal-role-strip {
    display: none;
    position: sticky;
    top: 0;
    z-index: 1098;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(15, 76, 92, 0.14);
    box-shadow: 0 8px 20px rgba(15, 76, 92, 0.08);
}

.portal-role-strip-nav {
    width: 100%;
}

.portal-role-strip-list {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 8px 0;
    overflow-x: auto;
    white-space: nowrap;
}

.portal-role-strip-list::-webkit-scrollbar {
    height: 4px;
}

.portal-role-strip-list li {
    flex: 0 0 auto;
}

.portal-role-strip-list li a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 76, 92, 0.14);
    background: #fff;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.portal-role-strip-list li a:hover,
.portal-role-strip-list li.current-menu-item > a,
.portal-role-strip-list li.current_page_item > a,
.portal-role-strip-list li.current-menu-parent > a {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

body.logged-in.header-hidden .portal-role-strip {
    display: block;
}

body.logged-in.header-hover .portal-role-strip,
body.logged-in.header-pinned .portal-role-strip {
    display: none;
}

.cc-scroll-shortcuts {
    position: fixed;
    right: 18px;
    bottom: 90px;
    z-index: 1103;
    display: none;
    flex-direction: column;
    gap: 8px;
}

body.header-hidden .cc-scroll-shortcuts {
    display: flex;
}

.cc-scroll-shortcut-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.cc-scroll-shortcut-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.cc-enq-summary-row td {
    background: #f8fafc;
}

.cc-enq-summary-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
}

.cc-client-enq-summary-row td,
.cc-vendor-summary-row td {
    background: #f8fafc;
}

.cc-client-enq-tools,
.cc-vendor-fold-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
}

.cc-client-enq-tools input,
.cc-vendor-fold-tools input {
    min-width: 260px;
    max-width: 100%;
    width: clamp(220px, 40vw, 420px);
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.cc-vendor-manager-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.cc-vendor-manager-table {
    min-width: 1040px;
}

body .cc-client-dashboard-layout {
    overflow: visible !important;
}

.cc-live-chat-layout {
    width: 100%;
}

.cc-chat-thread-tools {
    display: flex;
    justify-content: flex-end;
}

.cc-chat-thread-row-meta {
    margin-top: 2px;
}

body .btn,
body .button,
body a.btn,
body button,
body input[type="submit"],
body input[type="button"] {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
    vertical-align: middle;
}

body .btn,
body .button,
body a.btn,
body button.btn,
body .cc-admin-header-row .btn,
body .tab-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3em;
}

body .entry-content img,
body .entry-content video,
body .entry-content iframe,
body .entry-content embed,
body .entry-content object,
body .post img,
body .post video,
body .post iframe {
    max-width: 100%;
}

.header-mini-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: var(--shadow-sm);
}

.header-mini-logout {
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

/* ------------------------------------------
   4. HERO SLIDER
   ------------------------------------------ */
.hero-slider { 
    position: relative; height: 480px; 
    border-radius: var(--radius-lg); 
    overflow: hidden; background: var(--primary); 
    box-shadow: var(--shadow-lg); 
    margin-bottom: 40px; 
}
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.8s ease; }
.slide.active { opacity: 1; }
.hero-content { 
    position: absolute; inset: 0; 
    background: linear-gradient(90deg, rgba(9, 49, 61, 0.85) 0%, rgba(9, 49, 61, 0.4) 60%, transparent 100%); 
    display: flex; flex-direction: column; justify-content: center; padding: 0 60px; 
}
.hero-title { font-size: 3.5rem; margin-bottom: 16px; line-height: 1.1; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.hero-desc { font-size: 1.125rem; opacity: 0.95; max-width: 600px; margin-bottom: 24px; color: #fff; }

/* ------------------------------------------
   5. SECTIONS & GRIDS
   ------------------------------------------ */
.section-wrap { padding: 40px 0; margin-bottom: 20px; clear: both; }
.section-wrap { content-visibility: auto; contain-intrinsic-size: 1000px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; border-bottom: 2px solid #e9ecef; padding-bottom: 12px; }
.section-title { font-size: 1.5rem; position: relative; margin: 0; }
.section-title::after { content: ''; position: absolute; bottom: -14px; left: 0; width: 60px; height: 2px; background: var(--primary); }
.section-link { font-size: 13px; font-weight: 600; color: var(--primary); }

.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; width: 100%; }
.chem-cat-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 12px; margin-bottom: 30px; }

.cc-custom-block {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* Ad Slots (future monetization ready) */
.cc-ad-slot{
  max-width: var(--container);
  margin: 20px auto;
  padding: 12px;
  background: #fff;
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.cc-ad-slot img,
.cc-ad-slot iframe,
.cc-ad-slot embed,
.cc-ad-slot video{
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Emergency Banner (All Pages) */
.cc-emergency-banner{
  position: relative;
  z-index: 1200;
  background: linear-gradient(90deg, #0f4c5c, #1f7a8c);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.cc-emergency-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
}
.cc-emergency-title{
  font-weight: 800;
  letter-spacing: 0.3px;
}
.cc-emergency-message{
  font-size: 14px;
  opacity: 0.95;
}
@media (max-width: 768px){
  .cc-emergency-inner{ padding: 10px 16px; }
  .cc-emergency-message{ font-size: 13px; }
}

.msds-search-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0 20px;
}
.msds-search-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
}
.msds-search-input:focus {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
  outline: none;
}
.msds-search-clear {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  display: none;
}
.msds-results {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 6px;
}
.msds-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.msds-result-item {
  border-bottom: 1px solid #f1f3f5;
}
.msds-result-item:last-child {
  border-bottom: 0;
}
.msds-result-item a {
  display: block;
  padding: 12px 14px;
  color: var(--text-main);
  font-weight: 600;
}
.msds-result-item a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.msds-empty {
  padding: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ------------------------------------------
   6. CARDS (MODERN)
   ------------------------------------------ */
.cat-card, .chem-card, .woocommerce ul.products li.product { 
    background: #fff; 
    border: 1px solid rgba(0,0,0,0.05); 
    border-radius: var(--radius-md); 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: flex; flex-direction: column; 
    overflow: hidden; position: relative; 
    box-shadow: var(--shadow-sm);
}

.cat-card:hover, .chem-card:hover, .woocommerce ul.products li.product:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-lg); 
    border-color: rgba(15, 76, 92, 0.2); 
}

.cat-card { padding: 12px 8px; align-items: center; justify-content: center; text-align: center; min-height: 100px; }
.cat-icon { font-size: 24px; margin-bottom: 8px; transition: transform 0.3s; }
.cat-card:hover .cat-icon { transform: scale(1.1); }
.cat-title { font-size: 12px; font-weight: 700; color: var(--text-main); line-height: 1.2; width: 100%; }

.chem-img { height: 180px; background: #f8fafc; display: flex; align-items: center; justify-content: center; width: 100%; position: relative; }
.chem-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.chem-card:hover .chem-img img { transform: scale(1.05); }

.chem-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.chem-title { font-size: 16px; margin-bottom: 8px; line-height: 1.4; font-weight: 700; }
.chem-title a { color: var(--text-main); }
.chem-title a:hover { color: var(--primary); }
.chem-meta { font-size: 13px; color: #6c757d; margin-bottom: 16px; background: #f1f3f5; align-self: flex-start; padding: 2px 8px; border-radius: 4px; }
.chem-action { margin-top: auto; width: 100%; }

/* ------------------------------------------
   6B. PRICING SEARCH (PRO UI)
   ------------------------------------------ */
.cc-pricing-wrap{
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.cc-pricing-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.cc-pricing-title{ margin:0; font-size: 1.4rem; font-weight: 800; }
.cc-pricing-sub{ color: var(--text-muted); font-weight: 600; font-size: 13px; margin-top: 4px; }

.cc-pricing-search{
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}
.cc-pricing-search::before{
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%236b7280' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-size: 18px 18px;
  background-repeat: no-repeat;
  opacity: 0.8;
  pointer-events: none;
}
.cc-pricing-search input{
  width: 100%;
  padding: 12px 44px 12px 44px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
}
.cc-pricing-search input:focus{
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
  outline: none;
}
.cc-price-clear{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 76, 92, 0.08);
  color: var(--primary);
  cursor: pointer;
  display: none;
}
.cc-price-clear:hover{ background: rgba(15, 76, 92, 0.15); }

.cc-pricing-meta{
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.cc-price-count{
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
}

.cc-price-row.is-match td{
  background: #f6f9fc;
}

.cc-price-table thead th{
  background: #f8fafc;
  font-weight: 800;
  color: var(--primary-dark);
}

.cc-price-empty .cc-empty{
  padding: 16px;
  text-align: center;
}
.cc-empty-title{ font-weight: 800; margin-bottom: 4px; }
.cc-empty-text{ color: var(--text-muted); font-size: 13px; }

/* Primary Button - Gradient & Shadow */
.chem-card .btn, 
.chemical-card .btn {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.chem-card .btn:hover,
.chemical-card .btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* ------------------------------------------
   7. WOOCOMMERCE
   ------------------------------------------ */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 24px !important; padding: 0 !important; margin: 0 !important; float: none !important; width: 100% !important; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { float: none !important; width: 100% !important; margin: 0 !important; min-height: 380px; }
.woocommerce ul.products li.product a img { height: 220px !important; width: 100% !important; object-fit: cover; margin: 0 !important; display: block; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 15px 15px 5px; font-size: 16px; color: var(--primary-dark); font-family: 'Montserrat', sans-serif; font-weight: 700; line-height: 1.4; margin: 0; }
.woocommerce ul.products li.product .price { padding: 0 15px; color: var(--accent); font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; display: block; }
.woocommerce ul.products li.product .button { 
    margin: auto 15px 15px; text-align: center; 
    background: var(--primary); color: #fff !important; 
    border-radius: 50px; padding: 10px; font-weight: 600; 
    font-size: 14px; display: block; text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.woocommerce ul.products li.product .button:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* Checkout Buttons - Ensuring Theme Color */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important; 
  color: #fff !important; 
  font-size: 1.1rem; 
  font-weight: 700; 
  padding: 16px 32px; 
  border-radius: 50px; 
  border: none; 
  box-shadow: 0 4px 15px rgba(15, 76, 92, 0.3); 
  transition: all 0.3s ease; 
  display: block; 
  width: 100%; 
  text-align: center; 
  text-transform: uppercase; 
  letter-spacing: 0.5px;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #place_order:hover { 
  transform: translateY(-3px); 
  box-shadow: 0 8px 25px rgba(15, 76, 92, 0.4); 
  background: var(--primary-dark) !important;
}

/* ------------------------------------------
   8. FOOTER
   ------------------------------------------ */
.site-footer { background: #111827; color: #d1d5db; padding: 60px 0 20px; margin-top: 60px; clear: both; position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-title { color: #fff; font-size: 16px; margin-bottom: 20px; font-weight: 700; }
.footer-links li a { display: block; padding: 4px 0; transition: color 0.2s; font-size: 14px; opacity: 0.8; }
.footer-links li a:hover { color: var(--accent); opacity: 1; padding-left: 5px; }
.footer-btm { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; opacity: 0.6; }

/* ------------------------------------------
   9. MOBILE / RESPONSIVE (GLASSMORPHISM NAV)
   ------------------------------------------ */
@media (max-width: 992px) {
  .main-header { display: none !important; }
  #header-hover-zone,
  .header-mini-actions,
  .cc-scroll-shortcuts { display: none !important; }
  .mobile-app-top { 
      display: block; height: 56px; 
      background: rgba(255,255,255,0.95); 
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border-bottom: 1px solid rgba(0,0,0,0.05); 
      position: sticky; top: 0; z-index: 999; 
  }
  body.admin-bar .mobile-app-top { top: 32px; }
  .mobile-top-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      height: 100%;
  }
  .mobile-top-brand {
      display: inline-flex;
      align-items: center;
      min-width: 0;
  }
  .mobile-top-actions {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
  }
  .mobile-top-cart-btn {
      position: relative;
      width: 42px;
      height: 42px;
      border-radius: 999px;
      border: 1px solid rgba(15, 76, 92, 0.18);
      background: #fff;
      color: var(--primary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 10px rgba(15, 76, 92, 0.12);
      flex: 0 0 auto;
  }
  .mobile-top-cart-count {
      position: absolute;
      top: -4px;
      right: -4px;
      min-width: 16px;
      height: 16px;
      padding: 0 4px;
      border-radius: 999px;
      border: 1px solid #fff;
      background: var(--accent);
      color: #fff;
      font-size: 9px;
      font-weight: 800;
      line-height: 14px;
      text-align: center;
  }
  .mobile-top-menu-btn {
      width: 42px;
      height: 42px;
      border-radius: 999px;
      border: 1px solid rgba(15, 76, 92, 0.18);
      background: #fff;
      color: var(--primary);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 10px rgba(15, 76, 92, 0.12);
      flex: 0 0 auto;
  }
  .mobile-top-menu-btn svg {
      width: 20px;
      height: 20px;
  }
  .portal-role-strip {
      display: block;
      position: sticky;
      top: 56px;
      z-index: 998;
      box-shadow: none;
  }
  body.admin-bar .portal-role-strip { top: calc(56px + 32px); }
  .portal-role-strip .container {
      padding-left: 12px;
      padding-right: 12px;
  }
  .portal-role-strip-list {
      padding: 6px 0;
      gap: 5px;
  }
  .portal-role-strip-list li a {
      padding: 7px 11px;
      font-size: 11px;
  }
  
  /* Glassmorphism Bottom Nav */
  .mobile-bottom-nav { 
      display: flex; position: fixed; bottom: 0; left: 0; width: 100%; 
      height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); 
      background: rgba(255, 255, 255, 0.85); /* Semi-transparent */
      backdrop-filter: blur(16px); /* Strong Blur */
      -webkit-backdrop-filter: blur(16px);
      border-top: 1px solid rgba(255,255,255,0.3); 
      box-shadow: 0 -4px 20px rgba(0,0,0,0.05); 
      z-index: 2000; justify-content: space-around; align-items: center; 
      padding-bottom: calc(env(safe-area-inset-bottom) + 4px); 
  }
  
  .mob-nav-item { 
      flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; 
      color: #94a3b8; font-size: 10px; font-weight: 600; text-decoration: none; 
      height: 100%; background: none; border: none; padding-top: 4px;
      transition: color 0.3s;
      min-width: 64px;
  }
  
  .mob-nav-item svg { margin-bottom: 4px; transition: transform 0.2s; }
  .mob-nav-item.active, .mob-nav-item:hover { color: var(--primary); }
  .mob-nav-item.active svg { transform: translateY(-2px); stroke-width: 2.5px; }

  /* Body padding for bottom nav */
  body { padding-bottom: calc(var(--mobile-nav-height) + 20px); }
  
  /* 1 Column Grids on Mobile */
  .grid-cols-4 { grid-template-columns: 1fr; gap: 16px; }
  .woocommerce ul.products { grid-template-columns: 1fr !important; gap: 16px !important; }
  
  .chem-cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  
  .hero-slider { 
      height: 360px; border-radius: 0; 
      margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); 
  }
  .hero-content { padding: 0 24px; align-items: flex-start; text-align: left; }
  .hero-title { font-size: 2rem; }
  .hero-desc { font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  
  /* --- Mobile Single Page Layout Improvements (CRITICAL FIX) --- */
  /* Ensures Main Content is ABOVE Sidebar on Mobile */
  .pro-layout-grid { 
      display: flex; 
      flex-direction: column; 
      gap: 30px; 
  }
  
  .content-wrapper { 
      order: 1; /* Content First */
      width: 100%;
  }
  
  .sidebar-wrapper {
      order: 2; /* Sidebar Second */
      margin-top: 20px;
      width: 100%;
  }
  
  .pro-detail-grid { 
      display: flex; 
      flex-direction: column; 
      gap: 20px; 
  }
  
  .pro-image-stage { 
      margin-left: -20px; 
      margin-right: -20px; 
      border-radius: 0; 
      border: none; 
      border-bottom: 1px solid #eee; 
  }
  
  /* Mobile Sidebar Style */
  .pro-sidebar {
      position: static; 
      box-shadow: none; 
      border: none; 
      background: transparent; 
      padding: 0;
  }
  
  .sidebar-widget {
      background: #fff; 
      padding: 20px; 
      border-radius: 12px; 
      border: 1px solid #e9ecef; 
      box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  }
}

@media (max-width: 782px) {
  body.admin-bar .mobile-app-top { top: 46px; }
  body.admin-bar .portal-role-strip { top: calc(56px + 46px); }
}

@media (min-width: 992px) {
  .container {
    max-width: 100%;
    padding-left: 40px;
    padding-right: 40px;
  }
  .hero-slider {
    border-radius: 0;
  }
}

/* Full-Width Hero Slider (Desktop) */
@media (min-width: 992px) {
  .hero-slider {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-header,
  .header-mini-actions {
    transition: none !important;
  }
}

/* ------------------------------------------
   10. PRO FEATURES (INSTRUMENTS & DETAILS)
   ------------------------------------------ */

/* Instruments Hero */
.instr-hero {
    background: linear-gradient(120deg, var(--primary-dark), #0f4c5c, #2a9d8f);
    padding: 80px 0 100px;
    color: #fff;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    margin-bottom: 20px;
}
.instr-title { font-size: 3.5rem; color: #fff; margin: 10px 0; letter-spacing: -1px; }
.pro-badge { background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 20px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(5px); }

/* Instrument Grid/Cards */
.instr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media(max-width:992px){ .instr-grid { grid-template-columns: 1fr; } }

.instr-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column;
}
.instr-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(15, 76, 92, 0.15); border-color: rgba(15, 76, 92, 0.2); }

.instr-img-wrap {
    height: 240px; background: #f8f9fa; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.instr-card:hover .instr-img-wrap img { transform: scale(1.05); }

.brand-tag {
    position: absolute; top: 15px; left: 15px; background: rgba(255,255,255,0.95);
    padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 800;
    color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 2;
}

.instr-body { padding: 25px; flex: 1; display: flex; flex-direction: column; }
.model-no { font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 5px; }
.instr-name { font-size: 18px; margin-bottom: 10px; line-height: 1.3; font-weight: 700; }
.instr-excerpt { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; flex: 1; }

.btn-pro {
    display: block; width: 100%; text-align: center;
    padding: 12px; border-radius: 50px; background: var(--primary-light);
    color: var(--primary); font-weight: 700; font-size: 13px;
    transition: all 0.2s; margin-top: auto;
}
.btn-pro:hover { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(15, 76, 92, 0.2); }

/* ------------------------------------------
   11. SIDEBAR & SINGLE LAYOUT
   ------------------------------------------ */
.pro-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.pro-sidebar {
    background: #fff;
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid #e9ecef;
    position: sticky;
    top: 90px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget { margin-bottom: 30px; }
.sidebar-widget:last-child { margin-bottom: 0; }

.sidebar-title {
    font-size: 15px; font-weight: 700; color: var(--primary-dark);
    border-bottom: 2px solid #f1f3f5; padding-bottom: 10px; margin-bottom: 15px;
    text-transform: uppercase; letter-spacing: 0.5px;
}

.sidebar-list li { margin-bottom: 8px; border-bottom: 1px solid #f9fafb; padding-bottom: 8px; }
.sidebar-list li:last-child { border: none; }
.sidebar-list li a { font-size: 14px; color: #4b5563; display: flex; justify-content: space-between; align-items: center; transition: all 0.2s; }
.sidebar-list li a:hover { color: var(--primary); transform: translateX(5px); }

.btn-sidebar-all {
    display: block; text-align: center;
    font-size: 12px; font-weight: 600; color: var(--primary);
    background: var(--primary-light); padding: 8px;
    border-radius: 6px; margin-top: 10px; transition: all 0.2s;
}
.btn-sidebar-all:hover { background: var(--primary); color: #fff; }

/* Related Items (Sidebar) */
.related-item {
    display: flex; gap: 12px; align-items: center;
    margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f1f3f5;
}
.related-item:last-child { border: none; margin: 0; padding: 0; }
.rel-img {
    width: 50px; height: 50px; background: #f3f4f6; border-radius: 6px;
    overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.rel-img img { width: 100%; height: 100%; object-fit: cover; }
.rel-info { flex: 1; min-width: 0; }
.rel-title { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--text-main); margin-bottom: 2px; }
.rel-date { font-size: 11px; color: #9ca3af; }

/* Single Detail Layout */
.pro-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.pro-image-stage { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; position: relative; }
.cc-resource-gallery {
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}
.cc-resource-gallery-track {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
    touch-action: pan-y;
}
.cc-resource-gallery-slide {
    min-width: 100%;
    margin: 0;
}
.cc-resource-gallery-slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.cc-resource-gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 1px solid rgba(15, 76, 92, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
}
.cc-resource-gallery-prev { left: 10px; }
.cc-resource-gallery-next { right: 10px; }
.cc-resource-gallery-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}
.cc-resource-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(15, 76, 92, 0.32);
    cursor: pointer;
    padding: 0;
}
.cc-resource-gallery-dot.is-active {
    background: var(--primary);
}
.cc-resource-gallery-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    color: #94a3b8;
    background: #f8fafc;
}
@media (max-width: 768px) {
    .cc-resource-gallery-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}
.pro-meta-pills { display: flex; gap: 20px; margin-bottom: 25px; padding: 15px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
.pro-meta-pills div { display: flex; flex-direction: column; }
.pro-meta-pills small { font-size: 10px; text-transform: uppercase; color: #64748b; font-weight: 700; }
.pro-meta-pills strong { font-size: 14px; color: #0f172a; }

/* Specs Table */
.specs-box { background: #f8f9fa; padding: 25px; border-radius: 12px; margin-top: 30px; border: 1px solid #e5e7eb; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table th { text-align: left; padding: 12px 0; color: var(--primary); width: 40%; font-weight: 600; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
.specs-table td { text-align: right; padding: 12px 0; color: #374151; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
.specs-table tr:last-child th, .specs-table tr:last-child td { border-bottom: none; }

/* --- Mobile Search Improvements --- */
.mobile-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    z-index: 3000;
    padding: 20px;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    overflow-y: auto; 
}

.mobile-search-overlay.open {
    display: flex;
}

.mob-search-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.mob-search-input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.mob-search-close {
    position: absolute;
    top: -60px;
    right: 0;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

.mob-search-title {
    color: var(--primary);
    margin: 0 0 20px;
}

.mob-search-submit {
    width: 100%;
    margin-top: 15px;
    justify-content: center;
}

/* Mobile Live Search Suggestions */
#mob-search-suggestions {
    text-align: left;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-height: 250px;
    overflow-y: auto;
}

#mob-search-suggestions .suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f5;
    color: var(--text-main);
    font-size: 14px;
}

#mob-search-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

/* Mobile Bottom Nav Fixes */
.mob-nav-item svg {
    width: 22px; 
    height: 22px;
}

/* Cart Badge Fix */
.mob-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #fff;
}

/* ------------------------------------------
   12. WOOCOMMERCE MOBILE OPTIMIZATION
   ------------------------------------------ */

@media (max-width: 992px) {
    /* Stack Product Gallery and Summary */
    .woocommerce #content div.product div.images, 
    .woocommerce div.product div.images, 
    .woocommerce-page #content div.product div.images, 
    .woocommerce-page div.product div.images {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important;
        display: block !important;
    }

    .woocommerce #content div.product div.summary, 
    .woocommerce div.product div.summary, 
    .woocommerce-page #content div.product div.summary, 
    .woocommerce-page div.product div.summary {
        width: 100% !important;
        float: none !important;
        clear: both;
        display: block !important;
    }

    /* Tabs Layout */
    .woocommerce div.product .woocommerce-tabs ul.tabs {
        padding: 0;
        margin: 0 0 10px;
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .woocommerce div.product .woocommerce-tabs ul.tabs li {
        border: 1px solid #eee;
        background-color: #f9f9f9;
        display: inline-block;
        position: relative;
        z-index: 0;
        border-radius: 4px;
        margin: 0 5px 5px 0;
        padding: 0 1em;
    }

    /* Related Products Grid on Mobile */
    .woocommerce .related ul.products li.product, 
    .woocommerce .up-sells ul.products li.product {
        width: 100% !important;
        margin-right: 0 !important;
    }
    
    /* Cart Table Responsive */
    .woocommerce table.shop_table_responsive tr td, 
    .woocommerce-page table.shop_table_responsive tr td {
        display: block;
        text-align: right;
        clear: both;
    }
    
    .woocommerce table.shop_table_responsive tr td::before, 
    .woocommerce-page table.shop_table_responsive tr td::before {
        content: attr(data-title) ": ";
        float: left;
        font-weight: 700;
    }
}
/* ... (Existing content remains unchanged) ... */

/* ------------------------------------------
   12. WOOCOMMERCE MOBILE OPTIMIZATION
   ------------------------------------------ */

@media (max-width: 992px) {
    /* ... (Existing mobile styles remain unchanged) ... */

    /* Fix for Long Titles & Text Overflow */
    .woocommerce div.product .product_title,
    .woocommerce-loop-product__title,
    .chem-title,
    .instr-name,
    .pro-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        font-size: 1.5rem; /* Slightly smaller on mobile for better fit */
        line-height: 1.3;
    }

    /* Ensure content has breathing room on edges */
    .container, 
    .pro-detail-grid,
    .woocommerce div.product {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Prevent horizontal scroll on descriptions */
    .woocommerce-product-details__short-description,
    .woocommerce-Tabs-panel,
    .pro-desc,
    .entry-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
  
    /* Ensure images don't overflow */
    .woocommerce div.product div.images img,
    .pro-image-stage img {
        max-width: 100%;
        height: auto;
    }
}


/* ---------------------------------------------------------------------------
   ChemComply App-Like UI + Mobile Speed Enhancements
--------------------------------------------------------------------------- */
:root{
  --cc-bg: #0b1220;
  --cc-surface: #0f1b33;
  --cc-card: #0f172a;
  --cc-text: #e5e7eb;
  --cc-muted: rgba(229,231,235,.75);
  --cc-border: rgba(255,255,255,.10);
  --cc-primary: #3b82f6;
  --cc-accent: #fb8b24;
}

body{
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cc-app-hero{
  background: radial-gradient(1000px 500px at 20% 10%, rgba(59,130,246,.35), transparent 60%),
              radial-gradient(900px 450px at 80% 40%, rgba(251,139,36,.25), transparent 60%),
              linear-gradient(180deg, var(--cc-bg), #050914);
  padding: 34px 0 24px;
  border-bottom: 1px solid var(--cc-border);
}

.cc-app-hero-inner{
  display:grid;
  grid-template-columns: 1.6fr .9fr;
  gap: 24px;
  align-items: stretch;
}

.cc-app-title{
  color: var(--cc-text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin:0 0 10px;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.cc-app-subtitle{
  color: var(--cc-muted);
  margin:0 0 18px;
  font-size: 15px;
  max-width: 56ch;
}

.cc-app-search{
  position: relative;
  max-width: 640px;
}

.cc-search-input{
  width:100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--cc-border);
  background: rgba(255,255,255,.06);
  color: var(--cc-text);
  outline: none;
}

.cc-search-input::placeholder{ color: rgba(229,231,235,.55); }

.cc-suggest{
  position:absolute;
  top: calc(100% + 8px);
  left:0;
  right:0;
  z-index: 2000;
  background: rgba(15,23,42,.98);
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  overflow:hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.chem-suggest{ list-style:none; margin:0; padding:8px; }
.chem-suggest li a{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 10px;
  color: var(--cc-text);
  text-decoration:none;
  font-size: 14px;
}
.chem-suggest li a:hover{ background: rgba(59,130,246,.12); }
.chem-suggest li a span{ color: rgba(229,231,235,.55); font-size: 12px; }
.chem-suggest-empty{
  padding: 12px 14px;
  color: rgba(229,231,235,.65);
  font-size: 13px;
}

.cc-quick-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top: 14px;
}

.cc-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--cc-border);
  background: rgba(255,255,255,.06);
  color: var(--cc-text);
  text-decoration:none;
  font-weight: 700;
  font-size: 13px;
  transition: transform .15s ease, background .15s ease;
}
.cc-pill:hover{
  transform: translateY(-1px);
  background: rgba(59,130,246,.16);
}

.cc-app-hero-card{
  border: 1px solid var(--cc-border);
  background: rgba(255,255,255,.04);
  border-radius: 18px;
  padding: 16px;
  display:grid;
  gap: 10px;
}

.cc-stat{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(15,23,42,.65);
  border: 1px solid rgba(255,255,255,.08);
}
.cc-stat-num{
  color: var(--cc-text);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cc-stat-label{
  color: rgba(229,231,235,.65);
  font-size: 12px;
  font-weight: 700;
}

.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.section-link{
  text-decoration:none;
  font-weight: 700;
  color: var(--portal-primary, #0056b3);
}

@media (max-width: 900px){
  .cc-app-hero-inner{ grid-template-columns: 1fr; }
  .cc-app-hero-card{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px){
  .cc-app-hero{ padding: 22px 0 16px; }
  .cc-app-hero-card{ grid-template-columns: 1fr; }
}

/* Respect reduced motion for better perceived performance */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}
/* Rating Badge */
.cc-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #374151;
    margin: 6px 0 8px;
}
.cc-rating-stars {
    position: relative;
    display: inline-block;
    width: 72px;
    height: 14px;
}
.cc-rating-stars::before,
.cc-rating-stars::after {
    content: "★★★★★";
    position: absolute;
    inset: 0;
    font-size: 14px;
    letter-spacing: 1px;
    line-height: 1;
}
.cc-rating-stars::before {
    color: #e5e7eb;
}
.cc-rating-stars::after {
    color: #f59e0b;
    width: var(--cc-rating, 0%);
    overflow: hidden;
    white-space: nowrap;
}
.cc-rating-value {
    font-weight: 700;
    color: #111827;
}
.cc-rating-count {
    color: #6b7280;
    font-size: 11px;
}




/* ========================================================================
   Vendor Directory + Status Badges + Admin Publish Panel + Verification UI
   ======================================================================== */

.cc-vstatus{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 1px solid rgba(15, 76, 92, 0.15);
  background: #f8fafc;
  color: #0f4c5c;
}
.cc-vstatus-not_verified{ background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.cc-vstatus-verified{ background:#ecfeff; border-color:#a5f3fc; color:#155e75; }
.cc-vstatus-premium{ background:#eff6ff; border-color:#bfdbfe; color:#1d4ed8; }
.cc-vstatus-premium_plus{ background:#f5f3ff; border-color:#ddd6fe; color:#5b21b6; }
.cc-vstatus-business_plus{ background:#f5f3ff; border-color:#ddd6fe; color:#5b21b6; }

.cc-vendors-page{
  max-width: 100%;
  padding: 24px clamp(16px, 2vw, 32px);
}
.cc-vendors-head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.cc-vendors-title{
  margin:0;
  font-size: clamp(22px, 2.4vw, 34px);
}
.cc-vendors-search{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
}
.cc-vendors-search input{
  min-width: 280px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15,76,92,.18);
  background: #fff;
  font-weight: 600;
}
.cc-vendors-table-wrap{
  overflow:auto;
  border: 1px solid rgba(15,76,92,.10);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}
.cc-vendors-table{
  width:100%;
  border-collapse: collapse;
  min-width: 900px;
}
.cc-vendors-table thead th{
  text-align:left;
  padding: 14px 14px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #0f4c5c;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}
.cc-vendors-table td{
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  vertical-align: top;
}
.cc-vendors-empty{
  text-align:center;
  color:#6b7280;
  padding: 18px !important;
}

.cc-vendor-chat-btn{
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cc-vendor-chat-unavailable{
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.cc-vendor-trust{
  margin-top: 16px;
  border: 1px solid rgba(251, 139, 36, 0.25);
  background: #fff7ed;
  border-radius: 16px;
  padding: 16px 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}
.cc-vendor-trust-title{
  font-weight: 900;
  letter-spacing: -.01em;
  margin-bottom: 8px;
  color: #9a3412;
}
.cc-vendor-trust-body{
  color: #7c2d12;
  font-weight: 600;
  font-size: 14px;
}
.cc-vendor-trust-body p{ margin: 0 0 10px; }
.cc-vendor-trust-body p:last-child{ margin-bottom: 0; }

.cc-vendor-direct-chat-card .cc-empty{
  margin-bottom: 10px;
}

.cc-vendor-direct-chat-layout{
  align-items: start;
}

.cc-vendor-chat-thread-btn.is-active{
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

@media (max-width: 768px) {
  .cc-vendors-search{
    width: 100%;
  }

  .cc-vendors-search input{
    width: 100%;
    min-width: 0;
  }

  .cc-vendors-table{
    min-width: 0;
  }

  .cc-vendors-table thead{
    display: none;
  }

  .cc-vendors-table,
  .cc-vendors-table tbody,
  .cc-vendors-table tr,
  .cc-vendors-table td{
    display: block;
    width: 100%;
  }

  .cc-vendors-table tr{
    margin: 0 0 12px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
  }

  .cc-vendors-table td{
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .cc-vendors-table td:last-child{
    border-bottom: 0;
    padding-bottom: 0;
  }

  .cc-vendors-table td::before{
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
  }

  .cc-vendor-direct-chat-layout{
    grid-template-columns: 1fr !important;
  }
}

.cc-admin-card{
  background:#fff;
  border: 1px solid rgba(15,76,92,.12);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}
.cc-admin-card-title{ margin:0; font-size: 16px; font-weight: 900; color:#0f4c5c; }
.cc-admin-card-sub{ color:#6b7280; font-weight: 700; font-size: 12px; margin-top: 4px; }
.cc-admin-table-wrap{ overflow:auto; margin-top: 12px; }
.cc-admin-table{ width:100%; border-collapse: collapse; min-width: 980px; }
.cc-admin-table th, .cc-admin-table td{ padding: 12px; border-bottom: 1px solid #f1f5f9; text-align:left; font-size: 13px; }
.cc-inline-form{ display:flex; flex-wrap:wrap; gap: 8px; align-items:center; }
.cc-select{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,76,92,.18);
  background: #fff;
  font-weight: 700;
}

.cc-verify-panel{
  border: 1px solid rgba(15,76,92,.12);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}
.cc-verify-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
}
.cc-verify-title{ font-weight: 900; color:#0f4c5c; }
.cc-verify-sub{ color:#6b7280; font-weight: 700; font-size: 12px; margin-top: 4px; }
.cc-verify-pill{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 1px solid rgba(15,76,92,.15);
}
.cc-verify-pill-warn{ background:#fff7ed; border-color:#fed7aa; color:#9a3412; }
.cc-verify-pill-ok{ background:#ecfeff; border-color:#a5f3fc; color:#155e75; }
.cc-verify-missing{ margin-top: 10px; color:#7c2d12; font-weight: 800; }
.cc-verify-actions{ margin-top: 12px; display:flex; gap: 10px; flex-wrap:wrap; align-items:center; }
.cc-verify-hint{ color:#6b7280; font-weight: 700; font-size: 12px; }
.cc-verify-hint code{ background:#fff; padding: 2px 6px; border-radius: 8px; border: 1px solid #e5e7eb; }



/* CC FULLWIDTH PORTAL V3 */
/* Fix: avoid 100vw + negative margins that can cause left/right clipping on pages with overflow-x hidden or scrollbars.
   Use width:100% and remove the 50vw trick. Keep comfortable gutters like Amazon. */

body.cc-fullwidth-portal{
  overflow-x: visible; /* prevent accidental clipping */
}

/* Make portal/dashboard wrappers full width inside the theme layout */
body.cc-fullwidth-portal .cc-vendors-page,
body.cc-fullwidth-portal .chem-admin-portal,
body.cc-fullwidth-portal .portal-container{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: clamp(16px, 3vw, 44px) !important;
  padding-right: clamp(16px, 3vw, 44px) !important;
  box-sizing: border-box !important;
}

/* If a theme .container is wrapping the portal, unbox it */
body.cc-fullwidth-portal .container{
  max-width: none !important;
}

/* Keep inner grids stable */
body.cc-fullwidth-portal .chem-admin-layout{
  grid-template-columns: 280px minmax(0, 1fr);
}

/* Sidebar stays readable */
body.cc-fullwidth-portal .chem-admin-sidebar{
  top: 90px;
}

/* Tables/cards stay inside view with scroll when needed */
body.cc-fullwidth-portal .cc-vendors-table-wrap,
body.cc-fullwidth-portal .cc-admin-table-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile: stack nicely */
@media (max-width: 768px){
  body.cc-fullwidth-portal .chem-admin-layout{
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CC STANDARD SITE VIEW (All Sections: Public + Client + Vendor + Admin Portals)
   Goal:
   - One consistent layout everywhere (no random full-width / shrink)
   - Professional spacing + readable tables/forms
   Controls:
   - Change --cc-max-width to your preferred standard (e.g. 1200px / 1320px / 1440px)
========================================================= */

:root{
  --cc-max-width: 1320px;
  --cc-pad-mobile: 14px;
  --cc-pad-tablet: 22px;
  --cc-pad-desktop: 36px;
}

/* ----- Standard content container (apply to common wrappers) ----- */
.cc-standard-wrap,
.site,
.site-content,
#page,
#content,
.content-area,
.woocommerce,
.woocommerce-MyAccount-content,
.cc-portal-wrap,
.portal-wrap,
.vendor-dashboard,
.client-dashboard,
.admin-portal,
.dashboard,
.container,
.wrapper {
  width: 100%;
}

/* Keep inner content aligned the same everywhere */
.cc-standard-inner,
.site-content,
#content,
.woocommerce-MyAccount-content,
.cc-portal-wrap,
.portal-wrap,
.vendor-dashboard,
.client-dashboard,
.admin-portal,
.dashboard {
  max-width: var(--cc-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--cc-pad-mobile);
  padding-right: var(--cc-pad-mobile);
}

/* Tablet padding */
@media (min-width: 768px){
  .cc-standard-inner,
  .site-content,
  #content,
  .woocommerce-MyAccount-content,
  .cc-portal-wrap,
  .portal-wrap,
  .vendor-dashboard,
  .client-dashboard,
  .admin-portal,
  .dashboard{
    padding-left: var(--cc-pad-tablet);
    padding-right: var(--cc-pad-tablet);
  }
}

/* Desktop padding */
@media (min-width: 1200px){
  .cc-standard-inner,
  .site-content,
  #content,
  .woocommerce-MyAccount-content,
  .cc-portal-wrap,
  .portal-wrap,
  .vendor-dashboard,
  .client-dashboard,
  .admin-portal,
  .dashboard{
    padding-left: var(--cc-pad-desktop);
    padding-right: var(--cc-pad-desktop);
  }
}

/* Prevent any leftover forced full-width */
body .site-content,
body #content,
body .woocommerce-MyAccount-content,
body .cc-portal-wrap,
body .portal-wrap{
  width: 100%;
  max-width: var(--cc-max-width);
}

/* Stop accidental horizontal scroll */
body{ overflow-x: hidden; }
img, video, iframe{ max-width: 100%; height: auto; }
*{ box-sizing: border-box; }

/* ----- Professional cards/sections ----- */
.cc-card,
.portal-card,
.dashboard-card,
.cc-panel,
.cc-box,
.woocommerce-MyAccount-content section,
.woocommerce-MyAccount-content .woocommerce-Message,
.woocommerce-MyAccount-content .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-error{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fff;
}

/* ----- Tables (readable + mobile safe) ----- */
table{
  width: 100%;
  border-collapse: collapse;
}
table th, table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  vertical-align: top;
}
table thead th{
  background: rgba(0,0,0,0.03);
  font-weight: 700;
}
table tr:hover td{ background: rgba(0,0,0,0.02); }

/* Mobile: allow table scroll */
@media (max-width: 768px){
  table{ display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table th, table td{ white-space: nowrap; }
}

/* ----- Forms (consistent inputs) ----- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="url"],
input[type="number"],
select,
textarea,
.woocommerce form .input-text{
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  background: #fff;
}

input:focus, select:focus, textarea:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.35);
}

/* Buttons: cleaner + touch friendly */
a.button, button, .button,
input[type="submit"], input[type="button"], input[type="reset"],
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button{
  border-radius: 12px;
  padding: 10px 14px;
}

/* Action groups wrap nicely on small screens */
@media (max-width: 768px){
  .cc-actions, .actions, .button-group, .btn-group{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .cc-actions a, .actions a, .button-group a, .btn-group a,
  .cc-actions button, .actions button, .button-group button, .btn-group button{
    flex: 1 1 auto;
  }
}

/* ----- Status badges (optional) ----- */
.cc-status-badge{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.cc-badge--pending, .cc-badge--unpaid, .cc-badge--due{ background:#ffe7e7; border-color:#ffbcbc; color:#8a1f1f; }
.cc-badge--quoted, .cc-badge--fulfilled, .cc-badge--completed, .cc-badge--paid, .cc-badge--approved, .cc-badge--delivered{ background:#e7ffe9; border-color:#b7f3bf; color:#1f6b2a; }
.cc-badge--processing, .cc-badge--in-progress, .cc-badge--partial, .cc-badge--partially-paid{ background:#fff7db; border-color:#ffe39a; color:#7a5b00; }
.cc-badge--cancelled, .cc-badge--rejected, .cc-badge--failed{ background:#f1f1f1; border-color:#d9d9d9; color:#444; }

/* Vendor registration form wrapper (generic + common plugins) */
.cc-vendor-register,
.vendor-registration,
.vendor-register,
.vendor-registration-wrap,
#wcfm_membership_container,
.wcfm-membership-wrapper,
.dokan-vendor-register,
.mvx-vendor-registration,
.wcmp-vendor-registration,
.yith-wpv-vendor-registration{
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;
  border-radius: 14px;
  padding: 18px;
}

/* =========================================================
   CC DASHBOARD OVERLAP FIXES
   هدف: dashboard/portal areas overlap نہ کریں، professional spacing
   - Force wrapping for nav/action bars
   - Clear floats
   - Fix columns on mobile
   - Prevent absolute-position widgets from covering content
========================================================= */

/* Clear floats in common portal containers */
.cc-portal-wrap::after,
.portal-wrap::after,
.vendor-dashboard::after,
.client-dashboard::after,
.dashboard::after,
.cc-panel::after,
.cc-box::after,
.cc-card::after {
  content: "";
  display: table;
  clear: both;
}

/* Prevent tab/nav links from overlapping */
.cc-portal-nav,
.portal-nav,
.dashboard-nav,
.vendor-nav,
.client-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px 0;
}

.cc-portal-nav a,
.portal-nav a,
.dashboard-nav a,
.vendor-nav a,
.client-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

/* Active tab look (works if .active exists) */
.cc-portal-nav a.active,
.portal-nav a.active,
.dashboard-nav a.active,
.vendor-nav a.active,
.client-nav a.active {
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.10);
}

/* Action bars wrap nicely */
.cc-actions,
.actions,
.button-group,
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Prevent buttons from pushing out */
.cc-actions a,
.cc-actions button,
.actions a,
.actions button,
.button-group a,
.button-group button,
.btn-group a,
.btn-group button {
  max-width: 100%;
}

/* If your dashboard uses column classes */
.cc-row,
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}

.cc-col,
.col,
[class*="col-"] {
  min-width: 0; /* stops overflow */
}

/* Make sidebars not overlap content */
.cc-sidebar,
.portal-sidebar,
.dashboard-sidebar,
.vendor-sidebar,
.client-sidebar {
  position: relative;
  z-index: 1;
}

/* Ensure main content is above backgrounds */
.cc-main,
.portal-main,
.dashboard-main,
.vendor-main,
.client-main {
  position: relative;
  z-index: 2;
}

/* Fix any accidental absolute elements inside dashboards */
.cc-portal-wrap .sticky,
.portal-wrap .sticky,
.vendor-dashboard .sticky,
.client-dashboard .sticky,
.dashboard .sticky {
  position: relative !important;
  top: auto !important;
}

/* Common: widgets/boxes with negative margins cause overlap */
.cc-portal-wrap *[style*="margin-left:-"],
.portal-wrap *[style*="margin-left:-"],
.vendor-dashboard *[style*="margin-left:-"],
.client-dashboard *[style*="margin-left:-"],
.dashboard *[style*="margin-left:-"]{
  margin-left: 0 !important;
}
.cc-portal-wrap *[style*="margin-right:-"],
.portal-wrap *[style*="margin-right:-"],
.vendor-dashboard *[style*="margin-right:-"],
.client-dashboard *[style*="margin-right:-"],
.dashboard *[style*="margin-right:-"]{
  margin-right: 0 !important;
}

/* Mobile: force single column so nothing overlaps */
@media (max-width: 768px) {
  .cc-row, .row { flex-direction: column; }
  .cc-portal-nav a,
  .portal-nav a,
  .dashboard-nav a,
  .vendor-nav a,
  .client-nav a {
    flex: 1 1 calc(50% - 10px);
  }
  .cc-actions a, .cc-actions button,
  .actions a, .actions button,
  .button-group a, .button-group button,
  .btn-group a, .btn-group button {
    flex: 1 1 auto;
  }
}

/* Very small screens: full width buttons/tabs */
@media (max-width: 420px) {
  .cc-portal-nav a,
  .portal-nav a,
  .dashboard-nav a,
  .vendor-nav a,
  .client-nav a {
    flex: 1 1 100%;
  }
}

/* Tables inside cards: prevent overflow causing overlap */
.cc-card table,
.cc-panel table,
.cc-box table {
  max-width: 100%;
}

/* Make long text wrap (order IDs, emails) */
.cc-card, .cc-panel, .cc-box,
.vendor-dashboard, .client-dashboard, .dashboard {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Fix z-index for dropdown menus if present */
.cc-portal-wrap .dropdown-menu,
.portal-wrap .dropdown-menu,
.vendor-dashboard .dropdown-menu,
.client-dashboard .dropdown-menu,
.dashboard .dropdown-menu {
  position: absolute;
  z-index: 9999;
}

/* =========================================================
   CC PAGE WIDTH + VENDOR HISTORY POLISH
   - Reduce over-wide view on selected portal pages
   - Keep vendor verification history as the last block
========================================================= */
body.cc-fullwidth-portal.page-client-dashboard .container.section-wrap,
body.cc-fullwidth-portal.page-vendor-registration .container.section-wrap,
body.cc-fullwidth-portal.page-vendors .container {
  max-width: 1240px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(14px, 2.4vw, 28px) !important;
  padding-right: clamp(14px, 2.4vw, 28px) !important;
}

body.cc-fullwidth-portal.page-vendors .cc-vendors-page {
  max-width: 1240px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.page-vendor-dashboard .portal-container {
  display: flex !important;
  flex-direction: column !important;
}

body.page-vendor-dashboard .cc-vendor-verification-history {
  order: 999 !important;
  margin-top: 24px !important;
}

/* =========================================================
   CC VENDOR AREA LAYOUT HARDENING
   - Better width control for vendor registration/dashboard
   - Clear spacing and no overlap
   - Mobile-first behavior for forms/tables/actions
========================================================= */
body.cc-fullwidth-portal.page-vendor-registration .container.section-wrap,
body.cc-fullwidth-portal.page-vendor-dashboard .container.section-wrap {
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(12px, 2vw, 24px) !important;
  padding-right: clamp(12px, 2vw, 24px) !important;
}

body.page-vendor-registration .cc-vendor-register-layout {
  max-width: 1120px !important;
  margin: 18px auto 28px !important;
  display: grid !important;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
}

body.page-vendor-registration .cc-vendor-register-layout .portal-sidebar {
  padding: clamp(18px, 2.2vw, 30px) !important;
  border-right: 1px solid rgba(15, 76, 92, 0.12) !important;
}

body.page-vendor-registration .cc-vendor-register-layout .portal-form-side {
  padding: clamp(18px, 2.2vw, 30px) !important;
}

body.page-vendor-registration .cc-vendor-register-layout .form-floating-group {
  margin-bottom: 14px !important;
}

body.page-vendor-registration .cc-vendor-register-layout .chem-grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

body.page-vendor-registration .cc-vendor-register-layout select[multiple] {
  min-height: 170px;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout {
  max-width: 1140px !important;
  margin: 18px auto 28px !important;
  padding: clamp(14px, 1.8vw, 26px) !important;
  border: 1px solid rgba(15, 76, 92, 0.12) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow: visible !important;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-grid-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout .tab-nav {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding-bottom: 10px !important;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout .tab-nav a {
  border-radius: 10px !important;
  border: 1px solid #e5e7eb !important;
  background: #f8fafc !important;
  margin: 0 !important;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout .tab-nav a.active {
  background: #ffffff !important;
  border-color: #bfdbfe !important;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-pro-table {
  width: 100% !important;
  table-layout: auto !important;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-pro-table th,
body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-pro-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout [style*="display:flex"][style*="gap:5px"] {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body.page-vendor-dashboard .cc-vendor-dashboard-layout [style*="display:flex"][style*="gap:5px"] > input {
  width: calc(50% - 4px) !important;
  min-width: 0 !important;
}

@media (max-width: 992px) {
  body.page-vendor-registration .cc-vendor-register-layout {
    grid-template-columns: 1fr !important;
    margin: 10px 0 16px !important;
    border-radius: 12px !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout .portal-sidebar {
    border-right: none !important;
    border-bottom: 1px solid rgba(15, 76, 92, 0.12) !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout .chem-grid-2,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.page-vendor-dashboard .cc-vendor-dashboard-layout {
    max-width: 100% !important;
    margin: 10px 0 16px !important;
    padding: 12px !important;
    border-radius: 12px !important;
  }

  body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-pro-table {
    min-width: 0;
  }

  body.page-vendor-dashboard .cc-vendor-dashboard-layout [style*="display:flex"][style*="gap:5px"] > input {
    width: 100% !important;
  }

  body .portal-container,
  body .chem-admin-portal,
  body .cc-client-dashboard-layout,
  body .cc-vendor-dashboard-layout {
    padding: 12px !important;
  }

  body .cc-admin-header-row,
  body .cc-admin-nav,
  body .tab-nav {
    gap: 6px !important;
  }

  body .cc-admin-header-row .btn,
  body .tab-nav a,
  body .cc-client-enq-tools .btn,
  body .cc-vendor-fold-tools .btn {
    font-size: 12px !important;
  }

  body .cc-live-chat-layout {
    grid-template-columns: 1fr !important;
  }

  body .cc-live-chat-left {
    max-height: 280px !important;
  }
}

@media (max-width: 768px) {
  body.page-vendor-dashboard .cc-vendor-dashboard-layout .tab-nav {
    flex-wrap: wrap !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto !important;
    white-space: normal !important;
    gap: 6px !important;
  }

  body.page-vendor-dashboard .cc-vendor-dashboard-layout .tab-nav a {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 140px;
    padding: 10px 12px !important;
    text-align: center;
    justify-content: center;
  }

  body .hero-slider {
    height: 300px !important;
  }

  body .hero-title {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
  }

  body .section-wrap {
    padding: 36px 0 !important;
  }

  body .cc-client-enq-tools input,
  body .cc-vendor-fold-tools input {
    width: 100%;
    min-width: 0 !important;
  }

  body .cc-vendor-manager-table {
    min-width: 860px;
  }

  body .post-type-archive-chemical .type-chemical,
  body .post-type-archive-msds .type-msds,
  body .chem-card,
  body .instr-card,
  body .cat-card {
    margin-bottom: 12px;
  }

  body .entry-content table,
  body .post table,
  body .portal-container table,
  body .chem-admin-portal table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  body .cc-admin-header-row .btn,
  body .cc-client-enq-tools .btn,
  body .cc-vendor-fold-tools .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
    padding: 10px 12px !important;
  }

  body.single .entry-content,
  body.single-post .entry-content,
  body.post-type-archive .site-main,
  body.archive .site-main {
    font-size: 14px;
    line-height: 1.6;
  }

  body.post-type-archive .grid-cols-4,
  body.post-type-archive .instr-grid {
    grid-template-columns: 1fr !important;
  }

  body.post-type-archive .chem-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* =========================================================
   CC GLOBAL STANDARD WIDTH (FULL SITE)
   - One consistent content width for pages, portals, dashboards, login
   - Keeps desktop aligned and mobile optimized
========================================================= */
:root{
  --cc-site-standard-width: 1240px;
  --cc-site-pad-mobile: 12px;
  --cc-site-pad-desktop: 24px;
}

body .site,
body #page,
body .container,
body .site-content,
body #content,
body .content-area,
body .wrapper,
body .woocommerce,
body .woocommerce-MyAccount-content,
body .cc-portal-wrap,
body .portal-wrap,
body .dashboard,
body .vendor-dashboard,
body .client-dashboard,
body .admin-portal {
  width: 100%;
  max-width: var(--cc-site-standard-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--cc-site-pad-mobile) !important;
  padding-right: var(--cc-site-pad-mobile) !important;
  box-sizing: border-box !important;
}

/* Override legacy full-width portal rules to keep a standard site width */
body.cc-fullwidth-portal .container,
body.cc-fullwidth-portal .portal-container,
body.cc-fullwidth-portal .chem-admin-portal,
body.cc-fullwidth-portal .cc-vendors-page {
  width: 100% !important;
  max-width: var(--cc-site-standard-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--cc-site-pad-mobile) !important;
  padding-right: var(--cc-site-pad-mobile) !important;
  box-sizing: border-box !important;
}

/* Standardize portal/login/dashboard blocks */
body .portal-container,
body .chem-admin-portal,
body .cc-vendors-page,
body .cc-vendor-register-layout,
body .cc-vendor-dashboard-layout {
  max-width: var(--cc-site-standard-width) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* Safety: avoid child overflow overlap in dense dashboard areas */
body .portal-container *,
body .chem-admin-portal *,
body .cc-vendors-page * {
  min-width: 0;
}

@media (min-width: 992px){
  body .site,
  body #page,
  body .container,
  body .site-content,
  body #content,
  body .content-area,
  body .wrapper,
  body .woocommerce,
  body .woocommerce-MyAccount-content,
  body .cc-portal-wrap,
  body .portal-wrap,
  body .dashboard,
  body .vendor-dashboard,
  body .client-dashboard,
  body .admin-portal,
  body.cc-fullwidth-portal .container,
  body.cc-fullwidth-portal .portal-container,
  body.cc-fullwidth-portal .chem-admin-portal,
  body.cc-fullwidth-portal .cc-vendors-page {
    padding-left: var(--cc-site-pad-desktop) !important;
    padding-right: var(--cc-site-pad-desktop) !important;
  }
}

@media (max-width: 992px){
  body .portal-container,
  body .chem-admin-portal,
  body .cc-vendors-page,
  body .cc-vendor-register-layout,
  body .cc-vendor-dashboard-layout,
  body.cc-fullwidth-portal .container,
  body.cc-fullwidth-portal .portal-container,
  body.cc-fullwidth-portal .chem-admin-portal,
  body.cc-fullwidth-portal .cc-vendors-page {
    max-width: 100% !important;
  }
}

/* ------------------------------------------
   17. RESOURCE SINGLE + PRICING MOBILE FIXES
   ------------------------------------------ */

/* Safe wrapping for long chemical/instrument/service content */
.single-chemical .pro-col-right,
.single-instrument .pro-col-right,
.single-service .pro-col-right,
.single-chemical .pro-desc,
.single-instrument .pro-desc,
.single-service .pro-desc,
.single-chemical .pro-title,
.single-instrument .pro-title,
.single-service .pro-title,
.single-chemical .specs-box,
.single-instrument .specs-box,
.single-service .specs-box,
.single-product .entry-summary,
.single-product .product_meta,
.single-chemical .specs-table th,
.single-chemical .specs-table td,
.single-instrument .specs-table th,
.single-instrument .specs-table td,
.single-service .specs-table th,
.single-service .specs-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.single-chemical .pro-image-stage img,
.single-instrument .pro-image-stage img,
.single-service .pro-image-stage img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .single-chemical .pro-detail-grid,
  .single-instrument .pro-detail-grid,
  .single-service .pro-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .single-service .pro-col-right > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Quote fold/unfold in quoted enquiries */
.cc-quote-fold-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
}
.cc-quote-fold-item > summary {
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  list-style: none;
}
.cc-quote-fold-item > summary::-webkit-details-marker { display: none; }
.cc-quote-fold-item > summary::after {
  content: "+";
  float: right;
  color: #334155;
}
.cc-quote-fold-item[open] > summary::after { content: "-"; }
.cc-quote-fold-body {
  padding: 0 10px 10px;
  border-top: 1px solid #e5e7eb;
}

/* Pricing table - chemical card style and mobile card conversion */
.cc-price-chem-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cc-price-chem-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}
.cc-price-chem-meta { min-width: 0; }
.cc-price-chem-name {
  display: block;
  line-height: 1.35;
}
.cc-price-table th,
.cc-price-table td {
  white-space: normal !important;
}

@media (max-width: 768px) {
  .cc-price-table thead {
    display: none;
  }

  .cc-price-table,
  .cc-price-table tbody,
  .cc-price-table tr,
  .cc-price-table td {
    display: block;
    width: 100%;
  }

  .cc-price-table .cc-price-row {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  }

  .cc-price-table .cc-price-row td {
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    padding: 9px 0 !important;
  }

  .cc-price-table .cc-price-row td:last-child {
    border-bottom: 0;
  }

  .cc-price-table .cc-price-row td:before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 700;
  }

  .cc-price-table .price-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cc-price-table .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cc-price-table .price-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   PROFESSIONAL DASHBOARD COLOR REFRESH
   Scope: Admin Portal + Vendor Dashboard + Client Dashboard
========================================================= */
:root {
  --cc-dash-deep: #123f57;
  --cc-dash-mid: #1a5e79;
  --cc-dash-soft: #f5f9fc;
  --cc-dash-border: #d5e2ec;
  --cc-dash-text: #27485f;
}

body .chem-admin-portal,
body .cc-vendor-dashboard-layout,
body .cc-client-dashboard-layout {
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 52%, #f1f8fb 100%) !important;
  border: 1px solid var(--cc-dash-border) !important;
  box-shadow: 0 16px 36px rgba(15, 42, 62, 0.08) !important;
}

body .chem-admin-sidebar {
  background: linear-gradient(180deg, var(--cc-dash-deep) 0%, var(--cc-dash-mid) 60%, #1f6b7e 100%) !important;
  border: 1px solid #0f3d57 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 24px rgba(7, 29, 45, 0.24) !important;
}

body .chem-admin-sidebar-title {
  color: #d9edf7 !important;
}

body .chem-admin-nav a {
  background: rgba(255,255,255,0.1) !important;
  color: #ebf6fb !important;
  border-color: rgba(210, 234, 246, 0.24) !important;
}

body .chem-admin-nav a:hover {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.42) !important;
  transform: translateX(2px);
}

body .chem-admin-nav a.active {
  background: #f4fbff !important;
  color: #0f4c5c !important;
  border-color: #c6e4f2 !important;
  box-shadow: 0 8px 18px rgba(5, 26, 40, 0.2);
}

body .chem-admin-content {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%) !important;
  border-color: #d4e2eb !important;
  box-shadow: 0 14px 30px rgba(15, 38, 56, 0.08) !important;
}

body .tab-nav {
  border-bottom: 1px solid #cad9e4 !important;
}

body .tab-nav a {
  background: linear-gradient(180deg, #f4f8fb 0%, #e9f0f5 100%) !important;
  color: #355163 !important;
  border: 1px solid #d2dee7 !important;
}

body .tab-nav a:hover {
  background: #e1ebf2 !important;
  color: #123d56 !important;
  border-color: #b9cfde !important;
}

body .tab-nav a.active {
  background: #ffffff !important;
  color: #0f4c5c !important;
  border-color: #b8d4e6 !important;
  box-shadow: 0 8px 14px rgba(15, 45, 65, 0.08) !important;
}

body .chem-pro-table {
  border: 1px solid #d3dee8 !important;
  box-shadow: 0 8px 20px rgba(15, 42, 61, 0.06) !important;
}

body .chem-pro-table th {
  background: linear-gradient(180deg, #edf3f8 0%, #e3ecf3 100%) !important;
  color: var(--cc-dash-text) !important;
  border-bottom: 1px solid #ccd9e4 !important;
}

body .chem-pro-table td {
  border-bottom: 1px solid #e4edf4 !important;
}

body .chem-pro-table tr:hover td {
  background: var(--cc-dash-soft) !important;
}

body .cc-empty {
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%) !important;
  border: 1px solid #d7e5f0 !important;
  box-shadow: 0 8px 18px rgba(15, 43, 62, 0.05) !important;
}

body .cc-empty-title {
  color: #123d56 !important;
}

body .cc-empty-text {
  color: #486376 !important;
}

body .status-badge {
  box-shadow: 0 4px 10px rgba(15, 42, 61, 0.14) !important;
}

body .status-badge.new { background: #1f6fa8 !important; }
body .status-badge.assigned { background: #0e7490 !important; }
body .status-badge.quoted { background: #b45309 !important; }
body .status-badge.closed { background: #475569 !important; }
body .status-badge.rejected { background: #b91c1c !important; }
body .status-badge.premium { background: linear-gradient(45deg, #0f766e, #166534) !important; }
body .status-badge.holiday { background: #c2410c !important; }
body .status-badge.available { background: #15803d !important; }
body .status-badge.not_in_stock { background: #be123c !important; }
body .status-badge.delayed { background: #c2410c !important; }
body .status-badge.under_review { background: #2563eb !important; }
body .status-badge.custom { background: #334155 !important; }

body .chem-admin-portal .btn-primary,
body .cc-vendor-dashboard-layout .btn-primary,
body .cc-client-dashboard-layout .btn-primary {
  background: linear-gradient(135deg, #0f4c5c 0%, #1a6a7f 100%) !important;
  border: 1px solid #114a61 !important;
  box-shadow: 0 8px 18px rgba(15, 76, 92, 0.24) !important;
}

body .chem-admin-portal .btn-outline,
body .cc-vendor-dashboard-layout .btn-outline,
body .cc-client-dashboard-layout .btn-outline {
  color: #154b63 !important;
  border-color: #8fb5c9 !important;
  background: #f8fbfe !important;
}

body .chem-admin-portal .btn-outline:hover,
body .cc-vendor-dashboard-layout .btn-outline:hover,
body .cc-client-dashboard-layout .btn-outline:hover {
  background: #e8f2f8 !important;
  border-color: #6d9fbc !important;
  color: #0f3f57 !important;
}

body.logged-in .portal-role-strip {
  background: linear-gradient(90deg, #11394f 0%, #19566f 100%) !important;
  border-bottom: 1px solid #0f4158 !important;
  box-shadow: 0 10px 24px rgba(9, 33, 49, 0.22) !important;
}

body.logged-in .portal-role-strip-list li a {
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(214, 234, 244, 0.28) !important;
  color: #eff8fd !important;
}

body.logged-in .portal-role-strip-list li a:hover,
body.logged-in .portal-role-strip-list li.current-menu-item > a,
body.logged-in .portal-role-strip-list li.current_page_item > a,
body.logged-in .portal-role-strip-list li.current-menu-parent > a {
  background: #ffffff !important;
  color: #0f4c5c !important;
  border-color: #ffffff !important;
}

/* =========================================================
   INVENTORY PORTAL (ADMIN + MANAGER)
========================================================= */
.cc-inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.cc-inventory-panel {
  background: #ffffff;
  border: 1px solid #dbe7ef;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 18px rgba(15, 42, 61, 0.06);
}

.cc-inventory-table td {
  vertical-align: top;
}

@media (max-width: 992px) {
  .cc-inventory-grid {
    grid-template-columns: 1fr;
  }
}

/* Client Dashboard: One-click quick access panel */
.cc-client-anchor-panel {
  scroll-margin-top: 92px;
}

.cc-client-quick-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.cc-client-quick-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #cfe0ea;
  background: linear-gradient(160deg, #ffffff 0%, #f4faff 100%);
  box-shadow: 0 8px 16px rgba(15, 42, 62, 0.07);
  color: #123f57;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cc-client-quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(15, 42, 62, 0.12);
  border-color: #9fc3d8;
}

.cc-client-quick-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #32576d;
}

.cc-client-quick-count {
  font-size: 18px;
  font-weight: 900;
  color: #0f4c5c;
  line-height: 1.1;
}

.cc-client-quick-sub {
  font-size: 11px;
  color: #56768a;
  font-weight: 600;
}

@media (max-width: 992px) {
  .cc-client-quick-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .cc-client-quick-panel {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE HARDENING: CHAT + INVENTORY + ADMIN PANELS
========================================================= */
.cc-chat-entry.is-search-hidden {
  display: none !important;
}

@media (max-width: 992px) {
  body .chem-admin-content {
    min-width: 0;
    padding: 12px !important;
  }

  body .chem-admin-layout {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body .chem-admin-sidebar {
    position: static !important;
    top: auto !important;
  }

  body .chem-admin-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body .chem-admin-nav a {
    margin: 0 !important;
    text-align: center;
    justify-content: center;
  }

  body .tab-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    white-space: normal !important;
    gap: 6px !important;
  }

  body .tab-nav a {
    flex: 1 1 calc(50% - 6px) !important;
    min-width: 140px !important;
    text-align: center;
    justify-content: center;
  }

  body .cc-inventory-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body .cc-inventory-panel {
    padding: 12px !important;
    border-radius: 12px !important;
  }

  body .cc-inventory-panel .chem-grid-2,
  body .cc-inventory-panel .chem-grid-3,
  body .cc-inventory-panel .chem-grid-4 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body .cc-inventory-panel input,
  body .cc-inventory-panel select,
  body .cc-inventory-panel textarea {
    font-size: 16px;
  }

  body .cc-inventory-panel .btn {
    width: 100%;
    justify-content: center;
  }

  body .cc-inventory-table thead {
    display: none;
  }

  body .cc-inventory-table,
  body .cc-inventory-table tbody,
  body .cc-inventory-table tr,
  body .cc-inventory-table td {
    display: block;
    width: 100%;
  }

  body .cc-inventory-table tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
  }

  body .cc-inventory-table td {
    border: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 8px 0 !important;
  }

  body .cc-inventory-table td:last-child {
    border-bottom: 0 !important;
  }

  body .cc-inventory-table td:before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
  }

  body .cc-live-chat-layout {
    grid-template-columns: 1fr !important;
  }

  body .cc-live-chat-left {
    max-height: 320px !important;
  }

  body .cc-live-chat-right {
    min-width: 0;
    padding: 10px !important;
  }
}

@media (max-width: 576px) {
  body .tab-nav a {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }

  body .chem-admin-nav {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   MOBILE CANVAS CENTER ALIGN FIX
   - Keep full page centered
   - Remove left/right shift from negative-margin blocks
========================================================= */
@media (max-width: 992px) {
  html, body {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: hidden;
  }

  body #page,
  body .site,
  body .site-content,
  body #content,
  body .content-area,
  body .wrapper,
  body .container,
  body .portal-container,
  body .chem-admin-portal,
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  /* Prevent full-bleed mobile offsets that visually shift canvas */
  body .hero-slider,
  body .pro-image-stage {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  /* Safe-area aware horizontal padding for top mobile bar */
  body .mobile-app-top .container {
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
  }
}

/* =========================================================
   PORTAL + PRICING CENTER ALIGN (DESKTOP + MOBILE)
   - Fix right-dragging layouts on login/portal/dashboard pages
   - Keep equal left/right spacing and slightly wider clean canvas
========================================================= */
:root {
  --cc-center-max-width: 1320px;
  --cc-center-pad: clamp(14px, 2.4vw, 32px);
}

body .container.section-wrap,
body .section-wrap > .container {
  max-width: var(--cc-center-max-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--cc-center-pad) !important;
  padding-right: var(--cc-center-pad) !important;
  box-sizing: border-box !important;
}

body .portal-container,
body .chem-admin-portal,
body .cc-vendor-dashboard-layout,
body .cc-client-dashboard-layout,
body .cc-pricing-wrap {
  width: 100% !important;
  max-width: var(--cc-center-max-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body .portal-container,
body .chem-admin-portal,
body .cc-vendor-dashboard-layout,
body .cc-client-dashboard-layout {
  padding-left: var(--cc-center-pad) !important;
  padding-right: var(--cc-center-pad) !important;
}

body .cc-pricing-wrap {
  padding: clamp(16px, 2.2vw, 28px) !important;
}

body.cc-fullwidth-portal .portal-container,
body.cc-fullwidth-portal .chem-admin-portal,
body.cc-fullwidth-portal .cc-vendor-dashboard-layout,
body.cc-fullwidth-portal .cc-client-dashboard-layout,
body.cc-fullwidth-portal .cc-pricing-wrap {
  max-width: var(--cc-center-max-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 992px) {
  :root {
    --cc-center-pad: 12px;
  }

  body .portal-container,
  body .chem-admin-portal,
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout,
  body .cc-pricing-wrap {
    max-width: 100% !important;
    padding-left: max(var(--cc-center-pad), env(safe-area-inset-left)) !important;
    padding-right: max(var(--cc-center-pad), env(safe-area-inset-right)) !important;
  }
}

/* =========================================================
   FINAL APP-SHELL HARDENING
   - Enforce centered visibility across desktop/tablet/mobile
   - Keep header/portal ribbon below WP admin bar when logged in
========================================================= */
:root {
  --cc-app-shell-max: 1320px;
  --cc-app-shell-pad: clamp(12px, 2.2vw, 30px);
  --cc-adminbar-offset: 0px;
}

body.admin-bar {
  --cc-adminbar-offset: 32px;
}

@media (max-width: 782px) {
  body.admin-bar {
    --cc-adminbar-offset: 46px;
  }
}

body.admin-bar .main-header,
body.admin-bar #header-hover-zone,
body.admin-bar .portal-role-strip {
  top: var(--cc-adminbar-offset) !important;
}

body.admin-bar .header-mini-actions {
  top: calc(14px + var(--cc-adminbar-offset)) !important;
}

@media (max-width: 992px) {
  body.admin-bar .portal-role-strip {
    top: calc(56px + var(--cc-adminbar-offset)) !important;
  }
}

body .container,
body .cc-vendors-page,
body .portal-container,
body .chem-admin-portal,
body .cc-vendor-dashboard-layout,
body .cc-client-dashboard-layout,
body .cc-pricing-wrap {
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body .container,
body .cc-vendors-page {
  width: 100%;
  max-width: var(--cc-app-shell-max) !important;
  padding-left: var(--cc-app-shell-pad) !important;
  padding-right: var(--cc-app-shell-pad) !important;
}

@media (max-width: 992px) {
  body .container,
  body .cc-vendors-page,
  body .portal-container,
  body .chem-admin-portal,
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout,
  body .cc-pricing-wrap {
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
  }
}

/* =========================================================
   MOBILE PORTAL WIDTH HOTFIX
   - Remove excessive left/right gutters on login + dashboards
   - Keep portal screens comfortably full-width on phones
========================================================= */
@media (max-width: 992px) {
  body.cc-fullwidth-portal .container.section-wrap,
  body.cc-fullwidth-portal .section-wrap > .container,
  body.cc-fullwidth-portal .container,
  body.cc-fullwidth-portal .section-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: max(15px, env(safe-area-inset-left)) !important;
    padding-right: max(15px, env(safe-area-inset-right)) !important;
    box-sizing: border-box !important;
  }

  body.cc-fullwidth-portal .portal-container,
  body.cc-fullwidth-portal .chem-admin-portal,
  body.cc-fullwidth-portal .cc-vendor-dashboard-layout,
  body.cc-fullwidth-portal .cc-client-dashboard-layout,
  body.cc-fullwidth-portal .cc-pricing-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: max(15px, env(safe-area-inset-left)) !important;
    padding-right: max(15px, env(safe-area-inset-right)) !important;
    box-sizing: border-box !important;
  }

  body.cc-fullwidth-portal .cc-auth .portal-sidebar,
  body.cc-fullwidth-portal .cc-auth .portal-form-side {
    padding: 16px 12px !important;
  }

  body.cc-fullwidth-portal .chem-admin-content {
    padding: 10px !important;
  }

  body.cc-fullwidth-portal .chem-pro-table,
  body.cc-fullwidth-portal .cc-vendors-table,
  body.cc-fullwidth-portal .cc-admin-table,
  body.cc-fullwidth-portal .cc-vendor-manager-table {
    min-width: 0 !important;
  }

  body.cc-fullwidth-portal .chem-pro-table th,
  body.cc-fullwidth-portal .chem-pro-table td {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 576px) {
  body.cc-fullwidth-portal .container.section-wrap,
  body.cc-fullwidth-portal .section-wrap > .container,
  body.cc-fullwidth-portal .portal-container,
  body.cc-fullwidth-portal .chem-admin-portal,
  body.cc-fullwidth-portal .cc-vendor-dashboard-layout,
  body.cc-fullwidth-portal .cc-client-dashboard-layout {
    padding-left: max(15px, env(safe-area-inset-left)) !important;
    padding-right: max(15px, env(safe-area-inset-right)) !important;
  }

  body.cc-fullwidth-portal .cc-auth .portal-sidebar,
  body.cc-fullwidth-portal .cc-auth .portal-form-side {
    padding: 14px 10px !important;
  }
}

/* =========================================================
   RIBBON VISIBILITY RULES
   - Mobile: hide post-login ribbon
   - Tablet/Desktop: keep ribbon visible and sticky on top
========================================================= */
@media (max-width: 992px) {
  body.logged-in .portal-role-strip {
    display: none !important;
  }
}

@media (min-width: 993px) {
  body.logged-in .portal-role-strip {
    display: block !important;
    position: sticky !important;
    top: var(--cc-adminbar-offset, 0px) !important;
    z-index: 1098 !important;
  }
}

/* =========================================================
   INVENTORY STOCK PAGE + MOBILE FOLD OPTIMIZATION
========================================================= */
.cc-stock-view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.cc-stock-view-note {
  font-size: 12px;
  color: #425466;
  font-weight: 700;
}

.cc-stock-view-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
}

.cc-stock-view-filter input,
.cc-stock-view-filter select {
  min-height: 40px;
}

.cc-stock-view-filter input {
  min-width: 260px;
  flex: 1 1 300px;
}

.cc-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.cc-stock-card {
  border: 1px solid #d7e4ee;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 18px rgba(15, 42, 62, 0.06);
}

.cc-stock-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cc-stock-name {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  color: #123f57;
}

.cc-stock-meta {
  font-size: 11px;
  color: #5f7284;
  overflow-wrap: anywhere;
}

.cc-stock-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 8px;
}

.cc-stock-stat {
  border: 1px solid #dde7ef;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

.cc-stock-stat span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}

.cc-stock-stat strong {
  display: block;
  font-size: 13px;
  color: #0f4c5c;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.cc-stock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cc-stock-actions .btn {
  flex: 1 1 auto;
  min-width: 140px;
}

@media (max-width: 992px) {
  body.cc-fullwidth-portal .portal-container.cc-auth {
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
  }

  body.cc-fullwidth-portal .cc-auth .portal-sidebar,
  body.cc-fullwidth-portal .cc-auth .portal-form-side {
    padding: 12px !important;
  }

  body.cc-fullwidth-portal .cc-enq-fold-tools,
  body.cc-fullwidth-portal .cc-client-enq-tools,
  body.cc-fullwidth-portal .cc-vendor-fold-tools {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  body.cc-fullwidth-portal .cc-enq-fold-tools > div,
  body.cc-fullwidth-portal .cc-client-enq-tools > div,
  body.cc-fullwidth-portal .cc-vendor-fold-tools > div {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.cc-fullwidth-portal .cc-client-enq-tools input,
  body.cc-fullwidth-portal .cc-vendor-fold-tools input {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.cc-fullwidth-portal .cc-enq-fold-tools .btn,
  body.cc-fullwidth-portal .cc-client-enq-tools .btn,
  body.cc-fullwidth-portal .cc-vendor-fold-tools .btn {
    flex: 1 1 calc(50% - 8px);
    min-width: 130px;
    justify-content: center;
  }

  body.cc-fullwidth-portal .cc-enquiry-main-table,
  body.cc-fullwidth-portal .cc-client-enquiry-table,
  body.cc-fullwidth-portal .cc-vendor-manager-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
  }

  body.cc-fullwidth-portal .cc-enquiry-main-table td,
  body.cc-fullwidth-portal .cc-client-enquiry-table td,
  body.cc-fullwidth-portal .cc-vendor-manager-table td {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .cc-stock-view-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .cc-stock-view-filter input,
  .cc-stock-view-filter select,
  .cc-stock-view-filter .btn {
    width: 100%;
    min-width: 0 !important;
  }

  .cc-stock-actions .btn {
    min-width: 0;
  }
}

@media (max-width: 576px) {
  body.cc-fullwidth-portal .cc-auth .portal-sidebar,
  body.cc-fullwidth-portal .cc-auth .portal-form-side {
    padding: 10px !important;
  }

  body.cc-fullwidth-portal .cc-enq-fold-tools .btn,
  body.cc-fullwidth-portal .cc-client-enq-tools .btn,
  body.cc-fullwidth-portal .cc-vendor-fold-tools .btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  .cc-stock-stats {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   MOBILE OFFCANVAS ROLE MENU
   - Left-side drawer with role-based links
   - Keeps bottom nav unchanged after login
========================================================= */
.cc-mobile-panel {
  position: fixed;
  top: 0;
  left: -100%;
  right: auto;
  width: 300px;
  max-width: 86vw;
  height: 100vh;
  background: #fff;
  z-index: 2200;
  transition: left 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
}

.cc-mobile-panel.is-open {
  left: 0 !important;
}

.cc-mobile-panel-head {
  padding: 20px;
  border-bottom: 1px solid #f1f3f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.cc-mobile-panel-title {
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
}

.cc-mobile-panel-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #334155;
}

.cc-mobile-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cc-mobile-panel-label {
  margin: 0 0 10px;
  color: #999;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cc-mobile-panel-label-spaced {
  margin-top: 20px;
}

.cc-mobile-panel-logout-wrap {
  margin-top: 18px;
}

.cc-mobile-panel-logout {
  width: 100%;
  justify-content: center;
}

.cc-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2150;
  display: none;
}

.cc-mobile-overlay.is-active {
  display: block !important;
}

@media (max-width: 992px) {
  .cc-mobile-panel {
    display: flex;
  }

  #mobile-panel.cc-mobile-panel-left {
    left: -100%;
    right: auto !important;
  }

  body.logged-in .mobile-top-menu-btn {
    display: inline-flex !important;
  }

  #mobile-panel .mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #mobile-panel .mobile-menu-list li {
    margin: 0;
  }

  #mobile-panel .mobile-menu-list li a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
  }

  #mobile-panel .mobile-menu-list li:last-child a {
    border-bottom: 0;
  }
}

/* =========================================================
   ADMIN MOBILE DRAWER (LEFT SLIDE PANEL)
   - Admin Control Panel opens from left on mobile
   - Supports tap + swipe open/close
========================================================= */
body .chem-admin-mobile-toggle,
body .chem-admin-drawer-overlay,
body .chem-admin-drawer-edge,
body .chem-admin-sidebar-close {
  display: none;
}

@media (max-width: 992px) {
  body .cc-admin-mobile-tools {
    display: flex;
    margin: 0 0 10px;
  }

  body .chem-admin-mobile-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 7px 12px !important;
  }

  body .chem-admin-layout {
    position: relative;
  }

  body .chem-admin-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  body .chem-admin-sidebar-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }

  body .chem-admin-drawer-overlay {
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(2, 8, 23, 0.42);
    z-index: 9998;
  }

  body .chem-admin-drawer-edge {
    display: block !important;
    position: fixed;
    left: 0;
    top: 42vh;
    width: 18px;
    height: 96px;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: rgba(15, 76, 92, 0.45);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    z-index: 9997;
    padding: 0;
  }

  body .chem-admin-portal.is-sidebar-open .chem-admin-drawer-edge {
    display: none !important;
  }

  body .chem-admin-sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: min(84vw, 320px) !important;
    max-width: 320px !important;
    overflow-y: auto;
    border-radius: 0 12px 12px 0 !important;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 9999;
    padding: 14px !important;
    margin: 0 !important;
  }

  body .chem-admin-portal.is-sidebar-open .chem-admin-sidebar {
    transform: translateX(0);
  }

  body .chem-admin-nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px;
  }

  body .chem-admin-nav a {
    text-align: left !important;
    justify-content: flex-start !important;
  }

  body.cc-admin-drawer-open {
    overflow: hidden;
    touch-action: none;
  }
}

@media (max-width: 992px) and (min-width: 783px) {
  body.admin-bar .chem-admin-sidebar {
    top: 32px !important;
  }
}

@media (max-width: 782px) {
  body.admin-bar .chem-admin-sidebar {
    top: 46px !important;
  }
}

/* =========================================================
   MOBILE FOLD/UNFOLD: NOTIFICATION + STATUS PANELS
========================================================= */
body .cc-fold-toggle {
  display: none;
}

@media (max-width: 992px) {
  body .cc-fold-wrap {
    margin-bottom: 10px;
  }

  body .cc-fold-toggle {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #d6e2ec;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9fc 100%);
    color: #123f57;
    font-size: 12px;
    font-weight: 800;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    margin: 0 0 8px;
  }

  body .cc-fold-toggle-label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  body .cc-fold-toggle-state {
    margin-left: auto;
    font-size: 11px;
    color: #486376;
    font-weight: 700;
  }

  body .cc-fold-toggle-icon {
    font-size: 11px;
    transition: transform 0.18s ease;
  }

  body .cc-fold-wrap.is-collapsed .cc-fold-toggle-icon {
    transform: rotate(-90deg);
  }

  body .cc-fold-content.cc-fold-content-hidden {
    display: none !important;
  }
}

/* =========================================================
   LIVE NOTICE COUNT BADGES
========================================================= */
body .cc-admin-live-notice-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

body .cc-admin-live-notice-count.is-zero {
  background: #94a3b8;
  box-shadow: none;
}

body .cc-admin-live-task-count {
  font-weight: 800;
}

@media (max-width: 992px) {
  body .chem-admin-mobile-toggle {
    position: relative;
  }

  body .chem-admin-drawer-edge {
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }

  body .chem-admin-drawer-edge-arrow {
    line-height: 1;
    font-size: 13px;
    font-weight: 800;
  }

  body .cc-admin-live-notice-count-edge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    padding: 0 5px;
    margin-left: 0;
    z-index: 2;
  }
}

/* =========================================================
   RESOURCE SHARE BUTTONS
========================================================= */
body .cc-resource-share-wrap {
  margin-top: 14px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

body .cc-resource-share-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
  margin: 0 0 8px;
}

body .cc-resource-share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body .cc-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

body .cc-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.08);
}

body .cc-share-btn .cc-share-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  background: #e2e8f0;
}

body .cc-share-btn.is-facebook { border-color: #bfdbfe; color: #1d4ed8; }
body .cc-share-btn.is-facebook .cc-share-ico { background: #dbeafe; color: #1d4ed8; }
body .cc-share-btn.is-instagram { border-color: #fbcfe8; color: #be185d; }
body .cc-share-btn.is-instagram .cc-share-ico { background: #fce7f3; color: #be185d; }
body .cc-share-btn.is-instagram.is-copied { box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.15); }
body .cc-share-btn.is-linkedin { border-color: #bae6fd; color: #0369a1; }
body .cc-share-btn.is-linkedin .cc-share-ico { background: #e0f2fe; color: #0369a1; }
body .cc-share-btn.is-whatsapp { border-color: #bbf7d0; color: #15803d; }
body .cc-share-btn.is-whatsapp .cc-share-ico { background: #dcfce7; color: #15803d; }

/* =========================================================
   VENDOR PLAN PRICING PAGE
========================================================= */
body .cc-plan-pricing-wrap {
  max-width: 1180px;
  margin: 20px auto;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

body .cc-plan-pricing-head {
  margin-bottom: 16px;
}

body .cc-plan-pricing-title {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 32px);
  color: #0f172a;
}

body .cc-plan-pricing-sub {
  margin: 8px 0 0;
  color: #475569;
  font-size: 14px;
}

body .cc-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body .cc-plan-card {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

body .cc-plan-card.is-featured {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
}

body .cc-plan-top {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
}

body .cc-plan-tag {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body .cc-plan-name {
  margin: 8px 0 2px;
  font-size: 22px;
  color: #0f172a;
}

body .cc-plan-price {
  font-size: 13px;
  font-weight: 800;
  color: #1d4ed8;
}

body .cc-plan-summary {
  margin: 7px 0 0;
  font-size: 13px;
  color: #334155;
}

body .cc-plan-points {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
}

body .cc-plan-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 2px;
}

body .cc-plan-pricing-foot {
  margin-top: 14px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  font-size: 12px;
  color: #475569;
}

@media (max-width: 992px) {
  body .cc-plan-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   LOGIN PORTAL/DASHBOARD
   - Hide logged-in ribbon on mobile
========================================================= */
@media (max-width: 992px) {
  body.logged-in .portal-role-strip {
    display: none !important;
  }
}

/* =========================================================
   PHASE 2: MOBILE DASHBOARD CANONICAL LAYER
   - One final override for vendor/client/admin portal UX
   - Keeps storefront pages untouched
========================================================= */
:root {
  --cc-phase2-mobile-gutter-left: max(10px, env(safe-area-inset-left));
  --cc-phase2-mobile-gutter-right: max(10px, env(safe-area-inset-right));
  --cc-phase2-mobile-card-pad: 10px;
  --cc-phase2-mobile-radius: 12px;
}

@media (max-width: 992px) {
  body.cc-fullwidth-portal .container.section-wrap,
  body.cc-fullwidth-portal .section-wrap > .container,
  body.cc-fullwidth-portal .container,
  body.cc-fullwidth-portal .section-wrap {
    padding-left: var(--cc-phase2-mobile-gutter-left) !important;
    padding-right: var(--cc-phase2-mobile-gutter-right) !important;
  }

  body.cc-fullwidth-portal .portal-container,
  body.cc-fullwidth-portal .chem-admin-portal,
  body.cc-fullwidth-portal .cc-vendor-dashboard-layout,
  body.cc-fullwidth-portal .cc-client-dashboard-layout,
  body.cc-fullwidth-portal .cc-vendors-page,
  body.cc-fullwidth-portal .cc-pricing-wrap,
  body.cc-fullwidth-portal .cc-live-chat-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--cc-phase2-mobile-gutter-left) !important;
    padding-right: var(--cc-phase2-mobile-gutter-right) !important;
    border-radius: var(--cc-phase2-mobile-radius) !important;
  }

  body.cc-fullwidth-portal .portal-sidebar,
  body.cc-fullwidth-portal .portal-form-side,
  body.cc-fullwidth-portal .chem-admin-content,
  body.cc-fullwidth-portal .cc-chat-sidebar,
  body.cc-fullwidth-portal .cc-chat-main {
    padding: var(--cc-phase2-mobile-card-pad) !important;
  }

  body.cc-fullwidth-portal .chem-admin-layout,
  body.cc-fullwidth-portal .cc-live-chat-layout {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.cc-fullwidth-portal .chem-admin-sidebar {
    position: static !important;
    top: auto !important;
  }

  body.cc-fullwidth-portal .tab-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 6px !important;
    padding: 2px 2px 8px !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    white-space: nowrap !important;
  }

  body.cc-fullwidth-portal .tab-nav a {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px !important;
    border-radius: 999px !important;
  }

  body.cc-fullwidth-portal .chem-pro-table {
    border: 0 !important;
    background: transparent !important;
  }

  body.cc-fullwidth-portal .chem-pro-table tr {
    margin-bottom: 10px !important;
    padding: 10px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--cc-phase2-mobile-radius) !important;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  }

  body.cc-fullwidth-portal .chem-pro-table td {
    padding: 8px 0 !important;
  }

  body.cc-fullwidth-portal .chem-pro-table td::before {
    color: #64748b !important;
    font-size: 10px !important;
    letter-spacing: 0.05em !important;
  }

  body.cc-fullwidth-portal .chem-pro-table td [style*="float:right"] {
    float: none !important;
    display: inline-block;
    margin-top: 4px;
  }

  body.cc-fullwidth-portal .cc-enq-fold-tools,
  body.cc-fullwidth-portal .cc-client-enq-tools,
  body.cc-fullwidth-portal .cc-vendor-fold-tools {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.cc-fullwidth-portal .cc-client-enq-tools input,
  body.cc-fullwidth-portal .cc-vendor-fold-tools input,
  body.cc-fullwidth-portal .cc-enq-fold-tools input,
  body.cc-fullwidth-portal .cc-enq-fold-tools select,
  body.cc-fullwidth-portal .cc-client-enq-tools select,
  body.cc-fullwidth-portal .cc-vendor-fold-tools select {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.cc-fullwidth-portal .btn,
  body.cc-fullwidth-portal button.btn,
  body.cc-fullwidth-portal input[type="submit"].btn,
  body.cc-fullwidth-portal .chem-pro-table .btn {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  body.cc-fullwidth-portal .form-floating-group input,
  body.cc-fullwidth-portal .form-floating-group select,
  body.cc-fullwidth-portal .form-floating-group textarea {
    min-height: 44px;
  }

  body.cc-fullwidth-portal .cc-vendor-dashboard-layout form [style*="width:50%"] {
    width: 100% !important;
  }
}

@media (max-width: 576px) {
  body.cc-fullwidth-portal .portal-container,
  body.cc-fullwidth-portal .chem-admin-portal,
  body.cc-fullwidth-portal .cc-vendor-dashboard-layout,
  body.cc-fullwidth-portal .cc-client-dashboard-layout,
  body.cc-fullwidth-portal .cc-live-chat-layout {
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
  }

  body.cc-fullwidth-portal .portal-sidebar,
  body.cc-fullwidth-portal .portal-form-side,
  body.cc-fullwidth-portal .chem-admin-content {
    padding: 8px !important;
  }
}

/* =========================================================
   PHASE 4: MOBILE UX POLISH (AUTH + DASHBOARDS)
   - Better touch targets and legibility
   - Cleaner mobile auth panel spacing
   - Sticky tab rail for faster navigation
========================================================= */
@media (max-width: 992px) {
  body.cc-fullwidth-portal .portal-container.cc-auth,
  body.cc-fullwidth-portal .chem-admin-portal,
  body.cc-fullwidth-portal .cc-vendor-dashboard-layout,
  body.cc-fullwidth-portal .cc-client-dashboard-layout {
    border-radius: 14px !important;
    border: 1px solid #dbe5ee !important;
    background: #ffffff !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07) !important;
    overflow: hidden;
  }

  body.cc-fullwidth-portal .portal-container.cc-auth .portal-sidebar,
  body.cc-fullwidth-portal .portal-container.cc-auth .portal-form-side {
    padding: 12px !important;
  }

  body.cc-fullwidth-portal .portal-container.cc-auth .portal-sidebar {
    border-right: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9) !important;
  }

  body.cc-fullwidth-portal .portal-container.cc-auth h2,
  body.cc-fullwidth-portal .portal-container.cc-auth h3 {
    font-size: clamp(20px, 5.4vw, 26px);
    line-height: 1.2;
  }

  body.cc-fullwidth-portal .portal-container.cc-auth p {
    font-size: 14px;
    line-height: 1.5;
  }

  body.cc-fullwidth-portal input[type="text"],
  body.cc-fullwidth-portal input[type="email"],
  body.cc-fullwidth-portal input[type="tel"],
  body.cc-fullwidth-portal input[type="password"],
  body.cc-fullwidth-portal input[type="url"],
  body.cc-fullwidth-portal input[type="number"],
  body.cc-fullwidth-portal select,
  body.cc-fullwidth-portal textarea {
    font-size: 16px !important;
  }

  body.cc-fullwidth-portal .btn,
  body.cc-fullwidth-portal button.btn,
  body.cc-fullwidth-portal input[type="submit"].btn {
    min-height: 46px !important;
    font-size: 14px !important;
    font-weight: 700;
  }

  body.cc-fullwidth-portal .tab-nav {
    position: sticky;
    top: calc(56px + var(--cc-adminbar-offset, 0px));
    z-index: 45;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    margin: 0 0 12px !important;
    padding: 8px 2px 10px !important;
    scroll-snap-type: x mandatory;
  }

  body.cc-fullwidth-portal .tab-nav a {
    scroll-snap-align: start;
  }

  body.cc-fullwidth-portal .chem-pro-table tr {
    margin-bottom: 12px !important;
  }

  body.cc-fullwidth-portal .chem-pro-table td {
    line-height: 1.45;
  }

  body.cc-fullwidth-portal .chem-pro-table td form {
    gap: 8px;
  }
}

@media (max-width: 576px) {
  body.cc-fullwidth-portal .portal-container.cc-auth .portal-sidebar,
  body.cc-fullwidth-portal .portal-container.cc-auth .portal-form-side,
  body.cc-fullwidth-portal .chem-admin-content {
    padding: 10px !important;
  }

  body.cc-fullwidth-portal .tab-nav {
    top: calc(56px + var(--cc-adminbar-offset, 0px));
  }
}

/* =========================================================
   PHASE 5: MOBILE DASHBOARD TOOLBAR STANDARDIZATION
   - Remove inline-style dependency from JS-generated controls
   - Improve fold/search/action usability on mobile
========================================================= */
body .cc-fold-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

body .cc-fold-toolbar-right {
  justify-content: flex-end;
}

body .cc-fold-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body .cc-fold-search {
  min-width: 260px;
  max-width: 100%;
  width: clamp(220px, 40vw, 420px);
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--text-main);
}

body .cc-fold-btn {
  padding: 6px 10px !important;
  font-size: 12px !important;
  min-height: 36px !important;
}

body .mobile-search-overlay {
  min-height: 100dvh;
  overscroll-behavior: contain;
}

body .cc-mobile-panel {
  height: 100dvh;
  max-height: 100dvh;
  overscroll-behavior: contain;
}

@media (max-width: 992px) {
  body.cc-fullwidth-portal .cc-fold-toolbar,
  body.cc-fullwidth-portal .cc-fold-toolbar-right {
    justify-content: stretch;
  }

  body.cc-fullwidth-portal .cc-fold-toolbar-actions {
    width: 100%;
  }

  body.cc-fullwidth-portal .cc-fold-toolbar-actions .cc-fold-btn {
    flex: 1 1 calc(50% - 8px);
  }

  body.cc-fullwidth-portal .cc-fold-search {
    width: 100%;
    min-width: 0 !important;
  }
}

@media (max-width: 576px) {
  body.cc-fullwidth-portal .cc-fold-toolbar-actions .cc-fold-btn {
    flex: 1 1 100%;
  }
}

/* =========================================================
   PHASE 6: VIEWPORT MODE LOCK (AUTH-AGNOSTIC)
   - Prevent login/logout state from switching UI mode
   - Mobile viewport always gets mobile shell
   - Desktop viewport always gets desktop shell
========================================================= */
@media (max-width: 992px) {
  body .main-header,
  body #header-hover-zone,
  body .header-mini-actions,
  body .cc-scroll-shortcuts,
  body .portal-role-strip {
    display: none !important;
  }

  body .mobile-app-top {
    display: block !important;
  }

  body .mobile-bottom-nav {
    display: flex !important;
  }
}

@media (min-width: 993px) {
  body .main-header {
    display: block !important;
  }

  body .mobile-app-top,
  body .mobile-bottom-nav,
  body .mobile-search-overlay,
  body #mobile-search-overlay,
  body .cc-mobile-panel,
  body #mobile-panel,
  body .cc-mobile-overlay,
  body #mobile-overlay {
    display: none !important;
  }
}

/* =========================================================
   PHASE 7: LOGGED-IN MOBILE -> DESKTOP MODE
   - Logged-out users keep mobile shell
   - Logged-in users keep mobile shell, desktop-like panel body
========================================================= */
@media (max-width: 992px) {
  body.logged-in {
    padding-bottom: 0 !important;
  }

  /* Keep shell in mobile mode after login */
  body.logged-in #header-hover-zone,
  body.logged-in .main-header,
  body.logged-in .header-mini-actions,
  body.logged-in .cc-scroll-shortcuts,
  body.logged-in .portal-role-strip,
  body.logged-in .chem-admin-mobile-toggle,
  body.logged-in .chem-admin-drawer-overlay,
  body.logged-in .chem-admin-drawer-edge,
  body.logged-in .chem-admin-sidebar-close {
    display: none !important;
  }

  body.logged-in .mobile-app-top {
    display: block !important;
  }

  body.logged-in .mobile-bottom-nav {
    display: flex !important;
  }

  body.logged-in.cc-admin-drawer-open {
    overflow: visible !important;
    touch-action: auto !important;
  }

  body.logged-in .cc-fold-toggle {
    display: none !important;
  }

  body.logged-in .cc-fold-content.cc-fold-content-hidden {
    display: block !important;
  }

  body.logged-in .chem-admin-layout {
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  body.logged-in .tab-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 8px !important;
  }

  body.logged-in .tab-nav a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }

  body.logged-in .chem-admin-sidebar {
    position: sticky !important;
    top: calc(90px + var(--cc-adminbar-offset, 0px)) !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    border-radius: 12px !important;
    z-index: 2 !important;
  }

  body.logged-in .chem-admin-portal.is-sidebar-open .chem-admin-sidebar {
    transform: none !important;
  }

  body.logged-in .cc-vendors-table-wrap,
  body.logged-in .cc-admin-table-wrap,
  body.logged-in .cc-vendor-manager-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.logged-in .chem-pro-table,
  body.logged-in .cc-vendors-table,
  body.logged-in .cc-admin-table,
  body.logged-in .cc-enquiry-main-table,
  body.logged-in .cc-client-enquiry-table,
  body.logged-in .cc-vendor-manager-table {
    display: table !important;
    width: 100% !important;
  }

  body.logged-in .chem-pro-table thead,
  body.logged-in .cc-vendors-table thead,
  body.logged-in .cc-admin-table thead,
  body.logged-in .cc-enquiry-main-table thead,
  body.logged-in .cc-client-enquiry-table thead,
  body.logged-in .cc-vendor-manager-table thead {
    display: table-header-group !important;
  }

  body.logged-in .chem-pro-table tbody,
  body.logged-in .cc-vendors-table tbody,
  body.logged-in .cc-admin-table tbody,
  body.logged-in .cc-enquiry-main-table tbody,
  body.logged-in .cc-client-enquiry-table tbody,
  body.logged-in .cc-vendor-manager-table tbody {
    display: table-row-group !important;
  }

  body.logged-in .chem-pro-table tr,
  body.logged-in .cc-vendors-table tr,
  body.logged-in .cc-admin-table tr,
  body.logged-in .cc-enquiry-main-table tr,
  body.logged-in .cc-client-enquiry-table tr,
  body.logged-in .cc-vendor-manager-table tr {
    display: table-row !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.logged-in .chem-pro-table th,
  body.logged-in .chem-pro-table td,
  body.logged-in .cc-vendors-table th,
  body.logged-in .cc-vendors-table td,
  body.logged-in .cc-admin-table th,
  body.logged-in .cc-admin-table td,
  body.logged-in .cc-enquiry-main-table th,
  body.logged-in .cc-enquiry-main-table td,
  body.logged-in .cc-client-enquiry-table th,
  body.logged-in .cc-client-enquiry-table td,
  body.logged-in .cc-vendor-manager-table th,
  body.logged-in .cc-vendor-manager-table td {
    display: table-cell !important;
  }
}

/* =========================================================
   PHASE 8: PROFESSIONAL LAB DASHBOARD UI SYSTEM
   - Admin + Vendor + Client panels
   - Stronger status visibility
   - Enquiry, activity and audit areas upgraded
   - Mobile optimized without changing mobile shell
========================================================= */
:root {
  --cc-lab-surface: #ffffff;
  --cc-lab-surface-soft: #f4f9fd;
  --cc-lab-ink: #12384e;
  --cc-lab-muted: #4e6a7c;
  --cc-lab-line: #cfe0ea;
  --cc-lab-blue: #0f4c5c;
  --cc-lab-blue-2: #1c6d86;
  --cc-lab-cyan: #0e8aa6;
  --cc-lab-ok: #157347;
  --cc-lab-warn: #b96a06;
  --cc-lab-danger: #b4232f;
}

body .chem-admin-portal,
body .cc-vendor-dashboard-layout,
body .cc-client-dashboard-layout {
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%) !important;
  border: 1px solid var(--cc-lab-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 34px rgba(16, 52, 74, 0.09) !important;
}

body .chem-admin-content,
body .cc-vendor-dashboard-layout > .cc-custom-block,
body .cc-client-dashboard-layout > .cc-custom-block {
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%) !important;
  border: 1px solid #dbe8f1 !important;
  border-radius: 14px !important;
}

body .chem-admin-portal h2,
body .chem-admin-portal h3,
body .cc-vendor-dashboard-layout h2,
body .cc-vendor-dashboard-layout h3,
body .cc-client-dashboard-layout h2,
body .cc-client-dashboard-layout h3 {
  color: var(--cc-lab-ink) !important;
  letter-spacing: -0.015em;
}

body .chem-admin-portal .tab-nav,
body .cc-vendor-dashboard-layout .tab-nav,
body .cc-client-dashboard-layout .tab-nav {
  border-bottom: 1px solid #c7d9e5 !important;
  padding-bottom: 8px !important;
  gap: 8px !important;
}

body .chem-admin-portal .tab-nav a,
body .cc-vendor-dashboard-layout .tab-nav a,
body .cc-client-dashboard-layout .tab-nav a {
  border-radius: 10px !important;
  border: 1px solid #d4e2ec !important;
  background: linear-gradient(180deg, #f7fbff 0%, #ecf4fa 100%) !important;
  color: #2f5165 !important;
}

body .chem-admin-portal .tab-nav a:hover,
body .cc-vendor-dashboard-layout .tab-nav a:hover,
body .cc-client-dashboard-layout .tab-nav a:hover {
  border-color: #adc9da !important;
  background: #e8f3fa !important;
  color: #103d56 !important;
}

body .chem-admin-portal .tab-nav a.active,
body .cc-vendor-dashboard-layout .tab-nav a.active,
body .cc-client-dashboard-layout .tab-nav a.active {
  border-color: #88b3cb !important;
  background: #ffffff !important;
  color: #0f4c5c !important;
  box-shadow: 0 8px 16px rgba(14, 51, 73, 0.1) !important;
}

body .cc-enquiry-summary-card,
body .cc-enquiry-quick-card,
body .cc-admin-card,
body .cc-inventory-panel,
body .cc-empty,
body .cc-report-summary,
body .cc-admin-notice-panel,
body .cc-client-quick-card {
  border: 1px solid #d7e5ef !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 22px rgba(15, 42, 61, 0.07) !important;
}

body .cc-enquiry-summary-label,
body .cc-client-quick-label,
body .cc-admin-card-sub {
  color: var(--cc-lab-muted) !important;
  font-weight: 800 !important;
}

body .cc-enquiry-summary-value,
body .cc-client-quick-count,
body .cc-admin-card-title {
  color: var(--cc-lab-blue) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

body .cc-enquiry-quick-title,
body .cc-stock-view-note,
body .cc-resource-share-title {
  color: var(--cc-lab-ink) !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

body .cc-enquiry-quick-title::before,
body .cc-resource-share-title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cc-lab-blue) 0%, var(--cc-lab-cyan) 100%);
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.14);
}

body .cc-enquiry-filter-link {
  border-color: #c5d9e7 !important;
  background: #f5fbff !important;
  color: #27495d !important;
  box-shadow: 0 2px 6px rgba(15, 42, 61, 0.05);
}

body .cc-enquiry-filter-link.active {
  background: linear-gradient(135deg, var(--cc-lab-blue) 0%, var(--cc-lab-blue-2) 100%) !important;
  border-color: #0f4c5c !important;
  color: #ffffff !important;
  box-shadow: 0 10px 16px rgba(15, 76, 92, 0.22);
}

body .chem-pro-table,
body .cc-admin-table,
body .cc-enquiry-main-table,
body .cc-client-enquiry-table,
body .cc-vendor-manager-table,
body .cc-live-chat-thread-table {
  border: 1px solid #cedee9 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 8px 18px rgba(15, 42, 61, 0.06) !important;
}

body .chem-pro-table th,
body .cc-admin-table th,
body .cc-enquiry-main-table th,
body .cc-client-enquiry-table th,
body .cc-vendor-manager-table th,
body .cc-live-chat-thread-table th {
  background: linear-gradient(180deg, #eef5fb 0%, #e3eef6 100%) !important;
  color: #274b61 !important;
  border-bottom: 1px solid #cbdae6 !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
}

body .chem-pro-table td,
body .cc-admin-table td,
body .cc-enquiry-main-table td,
body .cc-client-enquiry-table td,
body .cc-vendor-manager-table td,
body .cc-live-chat-thread-table td {
  border-bottom: 1px solid #e6eef5 !important;
}

body .chem-pro-table tr:hover td,
body .cc-admin-table tr:hover td,
body .cc-enquiry-main-table tr:hover td,
body .cc-client-enquiry-table tr:hover td,
body .cc-vendor-manager-table tr:hover td,
body .cc-live-chat-thread-table tr:hover td {
  background: #f3f9ff !important;
}

body .status-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.1;
  box-shadow: 0 8px 16px rgba(15, 42, 61, 0.2) !important;
}

body .status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

body .status-badge.new { background: linear-gradient(135deg, #1f63d2 0%, #3b82f6 100%) !important; }
body .status-badge.assigned,
body .status-badge.processing { background: linear-gradient(135deg, #0f7da4 0%, #0891b2 100%) !important; }
body .status-badge.quoted,
body .status-badge.pending { background: linear-gradient(135deg, #a96508 0%, #d97706 100%) !important; }
body .status-badge.closed { background: linear-gradient(135deg, #4b5f73 0%, #64748b 100%) !important; }
body .status-badge.rejected,
body .status-badge.failed { background: linear-gradient(135deg, #a61f2a 0%, #dc2626 100%) !important; }
body .status-badge.premium { background: linear-gradient(135deg, #0d766e 0%, #1f9f88 100%) !important; }
body .status-badge.holiday,
body .status-badge.delayed { background: linear-gradient(135deg, #b85709 0%, #ea8a1a 100%) !important; }
body .status-badge.available,
body .status-badge.approved,
body .status-badge.fulfilled { background: linear-gradient(135deg, #17763f 0%, #16a34a 100%) !important; }
body .status-badge.not_in_stock,
body .status-badge.cancelled { background: linear-gradient(135deg, #a81b39 0%, #be123c 100%) !important; }
body .status-badge.under_review,
body .status-badge.partial { background: linear-gradient(135deg, #2b50c7 0%, #4f46e5 100%) !important; }
body .status-badge.custom { background: linear-gradient(135deg, #304357 0%, #475569 100%) !important; }

body .cc-admin-badge {
  border: 1px solid #c7d9e5 !important;
  background: #f5fbff !important;
  color: #20465f !important;
  box-shadow: 0 4px 10px rgba(15, 42, 61, 0.08);
}

body .cc-admin-badge.unassigned {
  background: #fff7eb !important;
  border-color: #ffd89e !important;
  color: #8f4c00 !important;
}

body .cc-admin-badge.awaiting {
  background: #edf8ff !important;
  border-color: #b7e0ff !important;
  color: #0d5e84 !important;
}

body .cc-vendor-status-strip {
  padding: 10px 12px;
  border: 1px dashed #c4dbea;
  border-radius: 12px;
  background: #f7fbff;
}

body .cc-admin-notice-panel > div:first-child strong {
  color: var(--cc-lab-ink);
  letter-spacing: -0.01em;
}

body .cc-admin-notice-panel .cc-admin-live-notice-count-main {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 14px rgba(185, 28, 28, 0.3);
}

body .cc-admin-notice-panel div[style*="border:1px solid #e2e8f0"] {
  border-color: #d5e4ee !important;
  background: #ffffff !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 14px rgba(15, 42, 61, 0.05);
}

body .cc-admin-notice-panel .btn.btn-outline {
  border-color: #95b7cb !important;
  color: #124560 !important;
  background: #f4fbff !important;
}

body .cc-admin-notice-panel .btn.btn-outline:hover {
  border-color: #6f9eb8 !important;
  background: #e6f3fb !important;
}

body .cc-timeline {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #d4e4ee !important;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%) !important;
  box-shadow: 0 8px 18px rgba(15, 42, 61, 0.06);
}

body .cc-timeline-head {
  margin-bottom: 8px;
  color: #355569 !important;
}

body .cc-timeline-head strong {
  color: #123f57;
  font-size: 12px;
  letter-spacing: 0.02em;
}

body .cc-timeline-audit {
  padding: 4px 9px !important;
  border-radius: 999px;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

body .cc-timeline-audit.ok {
  background: #e8faf0 !important;
  color: #13653f !important;
  border: 1px solid #9be2bc !important;
}

body .cc-timeline-audit.warn {
  background: #fff0f1 !important;
  color: #9e1f2c !important;
  border: 1px solid #f2b4bb !important;
}

body .cc-timeline-list {
  gap: 8px !important;
}

body .cc-timeline-item {
  position: relative;
  border-left: 2px solid #84b8d2 !important;
  padding-left: 12px !important;
}

body .cc-timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #1b6e88;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #84b8d2;
}

body .cc-timeline-msg {
  color: #163f56 !important;
  font-weight: 600;
}

body .cc-timeline-meta,
body .cc-timeline-empty {
  color: #5b788b !important;
}

body .cc-live-chat-left,
body .cc-live-chat-right {
  border: 1px solid #d6e5ef !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%) !important;
  border-radius: 12px !important;
}

body .chem-admin-portal .btn-primary,
body .cc-vendor-dashboard-layout .btn-primary,
body .cc-client-dashboard-layout .btn-primary {
  background: linear-gradient(135deg, var(--cc-lab-blue) 0%, var(--cc-lab-cyan) 100%) !important;
  border: 1px solid #0f5e75 !important;
  box-shadow: 0 10px 18px rgba(14, 71, 91, 0.24) !important;
}

body .chem-admin-portal .btn-primary:hover,
body .cc-vendor-dashboard-layout .btn-primary:hover,
body .cc-client-dashboard-layout .btn-primary:hover {
  background: linear-gradient(135deg, #0d4250 0%, #0b7392 100%) !important;
}

@media (max-width: 992px) {
  body .chem-admin-portal,
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout {
    border-radius: 12px !important;
    box-shadow: 0 10px 22px rgba(16, 52, 74, 0.09) !important;
  }

  body .cc-enquiry-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body .cc-enquiry-quick-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  body .status-badge {
    padding: 5px 9px !important;
    font-size: 9px !important;
  }

  body .cc-timeline {
    padding: 10px;
  }

  body .cc-timeline-msg {
    font-size: 11px !important;
    line-height: 1.45;
  }

  body .cc-timeline-meta {
    font-size: 10px !important;
  }

  body .cc-admin-notice-panel {
    padding: 10px !important;
  }

  body .chem-pro-table td,
  body .cc-enquiry-main-table td,
  body .cc-client-enquiry-table td,
  body .cc-vendor-manager-table td {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
}

@media (max-width: 576px) {
  body .cc-enquiry-summary {
    grid-template-columns: 1fr;
  }

  body .cc-admin-badge {
    width: 100%;
    justify-content: space-between;
  }

  body .cc-client-quick-panel {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   PHASE 9: STANDARDS HARDENING (A11Y + LAYOUT CONSISTENCY)
   - Production-safe quality layer
   - Keeps mobile header/footer shell after login
   - Gives panel body a desktop-canvas behavior on mobile
========================================================= */
:root {
  --cc-std-focus-ring: 0 0 0 3px rgba(15, 76, 92, 0.24);
  --cc-std-tap-min: 44px;
  --cc-std-content-min: 980px;
}

/* Interactive accessibility standards */
body .btn,
body button,
body input[type="submit"],
body input[type="button"],
body .tab-nav a,
body .cc-enquiry-filter-link,
body .cc-admin-badge,
body .status-badge {
  min-height: var(--cc-std-tap-min);
}

body .tab-nav a:focus-visible,
body .btn:focus-visible,
body button:focus-visible,
body input:focus-visible,
body select:focus-visible,
body textarea:focus-visible,
body .cc-enquiry-filter-link:focus-visible {
  outline: none;
  box-shadow: var(--cc-std-focus-ring) !important;
}

/* Improve data readability standards */
body .chem-pro-table td,
body .cc-admin-table td,
body .cc-enquiry-main-table td,
body .cc-client-enquiry-table td,
body .cc-vendor-manager-table td {
  line-height: 1.45;
  color: #1e3647;
}

body .chem-pro-table tr:nth-child(even) td,
body .cc-admin-table tr:nth-child(even) td,
body .cc-enquiry-main-table tr:nth-child(even) td,
body .cc-client-enquiry-table tr:nth-child(even) td,
body .cc-vendor-manager-table tr:nth-child(even) td {
  background: #fcfeff;
}

/* Standard notice/timeline spacing */
body .cc-admin-notice-panel,
body .cc-timeline,
body .cc-enquiry-summary-card,
body .cc-enquiry-quick-card,
body .cc-client-quick-card {
  padding: 12px !important;
}

/* Mobile logged-in: keep shell mobile, panel body behaves like desktop canvas */
@media (max-width: 992px) {
  body.logged-in.cc-fullwidth-portal .mobile-app-top {
    display: block !important;
  }

  body.logged-in.cc-fullwidth-portal .mobile-bottom-nav {
    display: flex !important;
  }

  body.logged-in.cc-fullwidth-portal .chem-admin-portal,
  body.logged-in.cc-fullwidth-portal .cc-vendor-dashboard-layout,
  body.logged-in.cc-fullwidth-portal .cc-client-dashboard-layout {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-left: max(10px, env(safe-area-inset-left)) !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
  }

  body.logged-in.cc-fullwidth-portal .chem-admin-portal > *,
  body.logged-in.cc-fullwidth-portal .cc-vendor-dashboard-layout > *,
  body.logged-in.cc-fullwidth-portal .cc-client-dashboard-layout > * {
    min-width: var(--cc-std-content-min);
  }

  body.logged-in.cc-fullwidth-portal .chem-admin-layout {
    min-width: var(--cc-std-content-min);
    grid-template-columns: 280px minmax(0, 1fr) !important;
  }

  body.logged-in.cc-fullwidth-portal .tab-nav {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }

  body.logged-in.cc-fullwidth-portal .tab-nav a {
    flex: 0 0 auto !important;
  }
}

/* Small phones: keep standards while reducing crowding */
@media (max-width: 576px) {
  body .btn,
  body button,
  body input[type="submit"],
  body input[type="button"] {
    min-height: 42px;
    font-size: 13px;
  }

  body .status-badge {
    letter-spacing: 0.04em;
  }
}

/* =========================================================
   PHASE 10: PANEL ACTIONS + STATUS READABILITY
   - Professional button polish for panel controls
   - High-contrast statuses/badges
   - Mobile horizontal slide rails for wide data blocks
========================================================= */
:root {
  --cc-panel-btn-bg: #0f4c5c;
  --cc-panel-btn-bg-hover: #0b3b49;
  --cc-panel-btn-fg: #ffffff;
  --cc-panel-btn-outline-bg: #ffffff;
  --cc-panel-btn-outline-fg: #0f4c5c;
  --cc-panel-btn-outline-border: #8db4c7;
}

body .cc-fold-btn,
body .cc-enq-fold-tools .btn,
body .cc-client-enq-tools .btn,
body .cc-vendor-fold-tools .btn {
  min-height: 42px !important;
  padding: 9px 14px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body .cc-enq-fold-tools .btn.btn-outline,
body .cc-client-enq-tools .btn.btn-outline,
body .cc-vendor-fold-tools .btn.btn-outline,
body .cc-fold-btn.btn-outline {
  background: var(--cc-panel-btn-outline-bg) !important;
  color: var(--cc-panel-btn-outline-fg) !important;
  border: 1px solid var(--cc-panel-btn-outline-border) !important;
  box-shadow: 0 6px 14px rgba(15, 42, 61, 0.08) !important;
}

body .cc-enq-fold-tools .btn.btn-outline:hover,
body .cc-client-enq-tools .btn.btn-outline:hover,
body .cc-vendor-fold-tools .btn.btn-outline:hover,
body .cc-fold-btn.btn-outline:hover {
  background: linear-gradient(135deg, var(--cc-panel-btn-bg) 0%, #1a6b81 100%) !important;
  color: var(--cc-panel-btn-fg) !important;
  border-color: #0f4c5c !important;
  box-shadow: 0 10px 20px rgba(15, 76, 92, 0.22) !important;
}

body .status-badge {
  color: #ffffff !important;
  text-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.42) !important;
}

body .status-badge.new,
body .status-badge.assigned,
body .status-badge.processing,
body .status-badge.quoted,
body .status-badge.pending,
body .status-badge.closed,
body .status-badge.rejected,
body .status-badge.failed,
body .status-badge.premium,
body .status-badge.holiday,
body .status-badge.delayed,
body .status-badge.available,
body .status-badge.approved,
body .status-badge.fulfilled,
body .status-badge.not_in_stock,
body .status-badge.cancelled,
body .status-badge.under_review,
body .status-badge.partial,
body .status-badge.custom {
  color: #ffffff !important;
}

body .cc-timeline,
body .cc-timeline-item,
body .cc-timeline-msg,
body .cc-timeline-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body .cc-hscroll-table-wrap,
body .cc-hscroll-target {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

body .cc-hscroll-target::-webkit-scrollbar,
body .cc-hscroll-table-wrap::-webkit-scrollbar {
  height: 8px;
}

body .cc-hscroll-target::-webkit-scrollbar-thumb,
body .cc-hscroll-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 76, 92, 0.28);
}

body .cc-hscroll-rail {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 2px;
}

body .cc-hscroll-rail.is-visible {
  display: flex;
}

body .cc-hscroll-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #0e4a5a;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cc-panel-btn-bg) 0%, #1a6b81 100%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 14px rgba(15, 76, 92, 0.24);
}

body .cc-hscroll-btn:hover {
  background: linear-gradient(135deg, var(--cc-panel-btn-bg-hover) 0%, #14566a 100%);
}

body .cc-hscroll-btn:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}

@media (max-width: 992px) {
  body .cc-timeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body .cc-hscroll-rail {
    margin-top: 6px;
  }
}

@media (max-width: 576px) {
  body .cc-hscroll-btn {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

/* =========================================================
   PHASE 11: LOGGED-IN DESKTOP MODE LOCK (PORTAL/PANELS)
   - Logged-in users get desktop panel UX on all viewports
   - Visitor-only pages keep mobile shell
========================================================= */
@media (max-width: 992px) {
  body.logged-in {
    padding-bottom: 0 !important;
  }

  /* Restore desktop header shell for logged-in users */
  body.logged-in .main-header {
    display: block !important;
  }

  body.logged-in #header-hover-zone {
    display: block !important;
  }

  body.logged-in .header-mini-actions {
    display: flex !important;
  }

  body.logged-in .portal-role-strip {
    display: block !important;
  }

  /* Disable mobile shell for logged-in users */
  body.logged-in .mobile-app-top,
  body.logged-in .mobile-bottom-nav,
  body.logged-in .mobile-search-overlay,
  body.logged-in #mobile-search-overlay,
  body.logged-in .cc-mobile-panel,
  body.logged-in #mobile-panel,
  body.logged-in .cc-mobile-overlay,
  body.logged-in #mobile-overlay {
    display: none !important;
  }

  /* Disable mobile fold/rail helpers after login */
  body.logged-in .cc-fold-toggle,
  body.logged-in .cc-hscroll-rail {
    display: none !important;
  }

  body.logged-in .cc-fold-content,
  body.logged-in .cc-fold-content.cc-fold-content-hidden {
    display: block !important;
  }

  /* Keep desktop data-grid rendering inside panels */
  body.logged-in .chem-pro-table,
  body.logged-in .cc-admin-table,
  body.logged-in .cc-vendors-table,
  body.logged-in .cc-enquiry-main-table,
  body.logged-in .cc-client-enquiry-table,
  body.logged-in .cc-vendor-manager-table {
    display: table !important;
    width: 100% !important;
    table-layout: auto !important;
  }

  body.logged-in .chem-pro-table thead,
  body.logged-in .cc-admin-table thead,
  body.logged-in .cc-vendors-table thead,
  body.logged-in .cc-enquiry-main-table thead,
  body.logged-in .cc-client-enquiry-table thead,
  body.logged-in .cc-vendor-manager-table thead {
    display: table-header-group !important;
  }

  body.logged-in .chem-pro-table tbody,
  body.logged-in .cc-admin-table tbody,
  body.logged-in .cc-vendors-table tbody,
  body.logged-in .cc-enquiry-main-table tbody,
  body.logged-in .cc-client-enquiry-table tbody,
  body.logged-in .cc-vendor-manager-table tbody {
    display: table-row-group !important;
  }

  body.logged-in .chem-pro-table tr,
  body.logged-in .cc-admin-table tr,
  body.logged-in .cc-vendors-table tr,
  body.logged-in .cc-enquiry-main-table tr,
  body.logged-in .cc-client-enquiry-table tr,
  body.logged-in .cc-vendor-manager-table tr {
    display: table-row !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.logged-in .chem-pro-table th,
  body.logged-in .chem-pro-table td,
  body.logged-in .cc-admin-table th,
  body.logged-in .cc-admin-table td,
  body.logged-in .cc-vendors-table th,
  body.logged-in .cc-vendors-table td,
  body.logged-in .cc-enquiry-main-table th,
  body.logged-in .cc-enquiry-main-table td,
  body.logged-in .cc-client-enquiry-table th,
  body.logged-in .cc-client-enquiry-table td,
  body.logged-in .cc-vendor-manager-table th,
  body.logged-in .cc-vendor-manager-table td {
    display: table-cell !important;
  }

  /* Keep panel sidebars/navs in desktop arrangement */
  body.logged-in .chem-admin-layout {
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  body.logged-in .chem-admin-sidebar {
    position: sticky !important;
    top: calc(90px + var(--cc-adminbar-offset, 0px)) !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    z-index: 2 !important;
  }

  body.logged-in .chem-admin-mobile-toggle,
  body.logged-in .chem-admin-drawer-overlay,
  body.logged-in .chem-admin-drawer-edge,
  body.logged-in .chem-admin-sidebar-close {
    display: none !important;
  }

  body.logged-in .tab-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }

  body.logged-in .tab-nav a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }
}

/* =========================================================
   PHASE 12: CANONICAL UX FOUNDATION
   - Final standards layer for consistency + mobile optimization
   - Visitors: mobile-first shell
   - Logged-in users: desktop-grade portal behavior on all viewports
========================================================= */
:root {
  --cc-ux-max: 1320px;
  --cc-ux-gutter: clamp(12px, 2.4vw, 30px);
  --cc-ux-mobile-gutter: max(12px, env(safe-area-inset-left));
  --cc-ux-mobile-gutter-r: max(12px, env(safe-area-inset-right));
}

html {
  -webkit-text-size-adjust: 100%;
}

body.cc-js {
  min-height: 100dvh;
}

body .portal-container,
body .chem-admin-portal,
body .cc-vendor-dashboard-layout,
body .cc-client-dashboard-layout,
body .cc-live-chat-layout,
body .chem-admin-layout,
body .chem-admin-content {
  min-width: 0;
}

body.cc-touch button,
body.cc-touch .btn,
body.cc-touch .tab-nav a {
  touch-action: manipulation;
}

@media (max-width: 992px) {
  /* Visitor mobile shell */
  body:not(.logged-in) .main-header,
  body:not(.logged-in) #header-hover-zone,
  body:not(.logged-in) .header-mini-actions,
  body:not(.logged-in) .cc-scroll-shortcuts,
  body:not(.logged-in) .portal-role-strip {
    display: none !important;
  }

  body:not(.logged-in) .mobile-app-top {
    display: block !important;
  }

  body:not(.logged-in) .mobile-bottom-nav {
    display: flex !important;
  }

  body:not(.logged-in) {
    padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 14px) !important;
  }

  body:not(.logged-in) .container,
  body:not(.logged-in) .portal-container,
  body:not(.logged-in) .chem-admin-portal,
  body:not(.logged-in) .cc-vendor-dashboard-layout,
  body:not(.logged-in) .cc-client-dashboard-layout {
    padding-left: var(--cc-ux-mobile-gutter) !important;
    padding-right: var(--cc-ux-mobile-gutter-r) !important;
  }

  body:not(.logged-in) .tab-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.logged-in) .tab-nav a {
    flex: 0 0 auto !important;
    min-height: 44px !important;
  }

  body:not(.logged-in) input[type="text"],
  body:not(.logged-in) input[type="email"],
  body:not(.logged-in) input[type="tel"],
  body:not(.logged-in) input[type="password"],
  body:not(.logged-in) input[type="number"],
  body:not(.logged-in) input[type="url"],
  body:not(.logged-in) select,
  body:not(.logged-in) textarea {
    font-size: 16px !important;
  }

  body:not(.logged-in) .cc-vendors-table-wrap,
  body:not(.logged-in) .cc-admin-table-wrap,
  body:not(.logged-in) .cc-vendor-manager-table-wrap,
  body:not(.logged-in) .cc-hscroll-target,
  body:not(.logged-in) .cc-hscroll-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Logged-in: keep desktop-grade portal behavior */
  body.logged-in .main-header,
  body.logged-in #header-hover-zone {
    display: block !important;
  }

  body.logged-in .header-mini-actions {
    display: flex !important;
  }

  body.logged-in .portal-role-strip {
    display: block !important;
    position: sticky !important;
    top: var(--cc-adminbar-offset, 0px) !important;
    z-index: 1098 !important;
  }

  body.logged-in .mobile-app-top,
  body.logged-in .mobile-bottom-nav,
  body.logged-in .mobile-search-overlay,
  body.logged-in #mobile-search-overlay,
  body.logged-in .cc-mobile-panel,
  body.logged-in #mobile-panel,
  body.logged-in .cc-mobile-overlay,
  body.logged-in #mobile-overlay {
    display: none !important;
  }

  body.logged-in .portal-container,
  body.logged-in .chem-admin-portal,
  body.logged-in .cc-vendor-dashboard-layout,
  body.logged-in .cc-client-dashboard-layout,
  body.logged-in .cc-live-chat-layout {
    max-width: var(--cc-ux-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--cc-ux-gutter) !important;
    padding-right: var(--cc-ux-gutter) !important;
  }

  body.logged-in .chem-admin-layout {
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  body.logged-in .chem-admin-sidebar {
    position: sticky !important;
    top: calc(90px + var(--cc-adminbar-offset, 0px)) !important;
    transform: none !important;
  }

  body.logged-in .cc-live-chat-layout {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  body.logged-in .cc-live-chat-left {
    max-height: min(72vh, 760px) !important;
  }

  body.logged-in .chem-pro-table,
  body.logged-in .cc-vendors-table,
  body.logged-in .cc-admin-table,
  body.logged-in .cc-enquiry-main-table,
  body.logged-in .cc-client-enquiry-table,
  body.logged-in .cc-vendor-manager-table {
    display: table !important;
    min-width: 960px !important;
    width: 100% !important;
  }

  body.logged-in .cc-vendors-table-wrap,
  body.logged-in .cc-admin-table-wrap,
  body.logged-in .cc-vendor-manager-table-wrap,
  body.logged-in .cc-hscroll-target,
  body.logged-in .cc-hscroll-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 576px) {
  body.logged-in .cc-live-chat-layout {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr) !important;
  }
}

/* =========================================================
   PHASE 13: MOBILE APP ENHANCEMENT
   - Unified mobile shell for all users
   - App-like panel UI across all sections
========================================================= */
:root {
  --cc-mobile-shell-gutter: max(12px, env(safe-area-inset-left));
  --cc-mobile-shell-gutter-r: max(12px, env(safe-area-inset-right));
  --cc-mobile-shell-bottom: calc(92px + env(safe-area-inset-bottom));
  --cc-mobile-panel-radius: 16px;
  --cc-mobile-panel-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
}

@media (max-width: 992px) {
  html body {
    background:
      radial-gradient(1300px 700px at 50% -120px, rgba(15, 76, 92, 0.08), transparent 60%),
      #f3f6fb !important;
    padding-bottom: var(--cc-mobile-shell-bottom) !important;
  }

  /* Force mobile shell for all users */
  html body .main-header,
  html body #header-hover-zone,
  html body .header-mini-actions,
  html body .cc-scroll-shortcuts,
  html body .portal-role-strip {
    display: none !important;
  }

  html body.logged-in .main-header,
  html body.logged-in #header-hover-zone,
  html body.logged-in .header-mini-actions,
  html body.logged-in .cc-scroll-shortcuts,
  html body.logged-in .portal-role-strip {
    display: none !important;
  }

  html body.logged-in .mobile-app-top {
    display: block !important;
  }

  html body.logged-in .mobile-bottom-nav {
    display: flex !important;
  }

  html body .mobile-app-top {
    display: block !important;
    position: sticky !important;
    top: var(--cc-adminbar-offset, 0px) !important;
    height: auto !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid rgba(15, 76, 92, 0.14) !important;
    background: rgba(244, 248, 252, 0.86) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1400 !important;
  }

  html body .mobile-top-inner {
    min-height: 52px;
    border-radius: 14px;
    padding: 6px 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 242, 248, 0.9));
    border: 1px solid rgba(15, 76, 92, 0.12);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  }

  html body .mobile-bottom-nav {
    display: flex !important;
    width: calc(100% - 18px) !important;
    max-width: 560px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    height: 74px !important;
    padding: 7px !important;
    border-radius: 22px;
    border: 1px solid rgba(15, 76, 92, 0.14);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 14px 34px rgba(2, 12, 27, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1500 !important;
  }

  html body .mob-nav-item {
    min-height: 58px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #597286;
    transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  }

  html body .mob-nav-item svg {
    margin-bottom: 2px;
  }

  html body .mob-nav-item.active {
    background: linear-gradient(145deg, #0f4c5c, #16657a);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  }

  html body .mob-nav-item:active {
    transform: scale(0.97);
  }

  /* Mobile sheets */
  html body .mobile-search-overlay {
    background: rgba(2, 12, 27, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  html body.logged-in .mobile-search-overlay.open,
  html body.logged-in #mobile-search-overlay.open {
    display: flex !important;
  }

  html body .mob-search-container {
    width: calc(100% - 22px);
    max-width: 640px;
    border-radius: 18px;
    border: 1px solid rgba(15, 76, 92, 0.14);
    box-shadow: 0 18px 38px rgba(2, 12, 27, 0.24);
  }

  html body .mob-search-input {
    min-height: 48px;
    border-radius: 12px;
    font-size: 16px;
  }

  html body .cc-mobile-panel {
    width: min(86vw, 360px) !important;
    border-right: 1px solid rgba(15, 76, 92, 0.12);
    background: linear-gradient(165deg, #ffffff 0%, #f2f7fb 100%);
    box-shadow: 16px 0 36px rgba(2, 12, 27, 0.22);
    transition: transform 0.32s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }

  html body.logged-in .cc-mobile-panel,
  html body.logged-in #mobile-panel {
    display: flex !important;
  }

  html body.logged-in .cc-mobile-overlay.is-active,
  html body.logged-in #mobile-overlay.is-active {
    display: block !important;
  }

  html body #mobile-panel.cc-mobile-panel-left {
    left: 0 !important;
    right: auto !important;
    transform: translateX(-105%);
  }

  html body #mobile-panel.cc-mobile-panel-left.is-open {
    transform: translateX(0);
  }

  html body #mobile-panel .mobile-menu-list li a {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 6px;
    border: 1px solid rgba(15, 76, 92, 0.12);
    background: rgba(255, 255, 255, 0.88);
    font-weight: 600;
  }

  /* App gutters */
  html body .container,
  html body .portal-container,
  html body .chem-admin-portal,
  html body .cc-vendor-dashboard-layout,
  html body .cc-client-dashboard-layout,
  html body .cc-live-chat-layout {
    padding-left: var(--cc-mobile-shell-gutter) !important;
    padding-right: var(--cc-mobile-shell-gutter-r) !important;
  }

  html body .section-wrap,
  html body .pro-layout-grid,
  html body .pro-detail-grid,
  html body .chem-admin-layout,
  html body .content-wrapper,
  html body .sidebar-wrapper {
    gap: 14px !important;
    margin-top: 0 !important;
  }

  /* App-like panel system */
  html body .panel,
  html body .cc-panel,
  html body .cc-card,
  html body .portal-card,
  html body .dashboard-card,
  html body .cc-box,
  html body .chem-card,
  html body .instr-card,
  html body .cat-card,
  html body .post-card,
  html body .product-card,
  html body .sidebar-widget,
  html body .pro-sidebar,
  html body .msds-result-item,
  html body .related-item,
  html body .cc-stock-card,
  html body .cc-admin-card,
  html body .cc-plan-card,
  html body .cc-client-quick-card,
  html body .cc-enquiry-summary-card,
  html body .cc-enquiry-quick-card,
  html body .cc-admin-notice-panel,
  html body .cc-inventory-panel,
  html body .woocommerce ul.products li.product {
    border-radius: var(--cc-mobile-panel-radius) !important;
    border: 1px solid rgba(15, 76, 92, 0.12) !important;
    background: linear-gradient(165deg, #ffffff 0%, #f7fbff 100%) !important;
    box-shadow: var(--cc-mobile-panel-shadow) !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    overflow: hidden !important;
  }

  html body .cat-card,
  html body .chem-card,
  html body .instr-card {
    min-height: 118px;
  }

  html body .sidebar-widget:last-child,
  html body .panel:last-child,
  html body .cc-card:last-child,
  html body .cc-panel:last-child {
    margin-bottom: 0 !important;
  }

  /* Single templates with legacy full-bleed offsets */
  html body .hero-slider,
  html body .pro-image-stage {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    border-radius: var(--cc-mobile-panel-radius) !important;
    border: 1px solid rgba(15, 76, 92, 0.12) !important;
    box-shadow: 0 10px 24px rgba(2, 12, 27, 0.09) !important;
  }

  /* Forms and controls */
  html body button,
  html body .btn,
  html body .button,
  html body input[type="submit"],
  html body input[type="button"],
  html body input[type="reset"] {
    min-height: 46px;
    border-radius: 12px;
    font-weight: 700;
  }

  html body input[type="text"],
  html body input[type="email"],
  html body input[type="tel"],
  html body input[type="password"],
  html body input[type="number"],
  html body input[type="url"],
  html body select,
  html body textarea {
    min-height: 46px;
    border-radius: 12px;
    font-size: 16px !important;
  }

  html body .tab-nav {
    display: flex !important;
    gap: 8px;
    padding: 2px 0;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }

  html body .tab-nav a {
    min-height: 42px !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
  }

  /* Better mobile table behavior in panels */
  html body .cc-vendors-table-wrap,
  html body .cc-admin-table-wrap,
  html body .cc-vendor-manager-table-wrap,
  html body .cc-hscroll-target,
  html body .cc-hscroll-table-wrap {
    border-radius: 12px;
    border: 1px solid rgba(15, 76, 92, 0.12);
    background: rgba(255, 255, 255, 0.86);
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  html body .chem-pro-table,
  html body .cc-vendors-table,
  html body .cc-admin-table,
  html body .cc-enquiry-main-table,
  html body .cc-client-enquiry-table,
  html body .cc-vendor-manager-table {
    min-width: 720px !important;
  }

  /* Keep portal sections stacked on mobile */
  html body.logged-in .chem-admin-layout,
  html body.logged-in .cc-live-chat-layout,
  html body.logged-in .cc-vendor-dashboard-layout,
  html body.logged-in .cc-client-dashboard-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  html body.logged-in .chem-admin-sidebar,
  html body.logged-in .cc-live-chat-left {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-height: none !important;
  }
}

@media (max-width: 576px) {
  html body .mobile-top-inner {
    min-height: 50px;
  }

  html body .mobile-bottom-nav {
    width: calc(100% - 14px) !important;
    border-radius: 20px;
    height: 70px !important;
  }

  html body .mob-nav-item {
    font-size: 10px;
    min-width: 58px;
  }
}

/* =========================================================
   PHASE 14: MOBILE PORTAL FRAME FIX
   - Stop right-side clipping on login/portal pages
   - Keep panels centered and fully readable
========================================================= */
:root {
  --cc-mobile-frame-pad-l: max(10px, env(safe-area-inset-left));
  --cc-mobile-frame-pad-r: max(10px, env(safe-area-inset-right));
}

@media (max-width: 992px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body .portal-container,
  body .chem-admin-portal,
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout,
  body .cc-live-chat-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--cc-mobile-frame-pad-l) !important;
    padding-right: var(--cc-mobile-frame-pad-r) !important;
    box-sizing: border-box !important;
  }

  /* Cancel old desktop-canvas min-width forcing right overflow */
  body.logged-in.cc-fullwidth-portal .chem-admin-portal > *,
  body.logged-in.cc-fullwidth-portal .cc-vendor-dashboard-layout > *,
  body.logged-in.cc-fullwidth-portal .cc-client-dashboard-layout > * {
    min-width: 0 !important;
  }

  body.logged-in.cc-fullwidth-portal .chem-admin-layout,
  body.logged-in.cc-fullwidth-portal .cc-live-chat-layout {
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }

  body.logged-in.cc-fullwidth-portal .chem-admin-sidebar,
  body.logged-in.cc-fullwidth-portal .cc-live-chat-left {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
  }

  /* Auth/login frame */
  body .portal-container.cc-auth {
    display: block !important;
    border-radius: 14px !important;
    overflow: hidden;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  body .portal-container.cc-auth .portal-sidebar,
  body .portal-container.cc-auth .portal-form-side {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  /* Force all portal form rows to wrap instead of pushing canvas right */
  body .portal-container form [style*="display:flex"],
  body .chem-admin-portal form [style*="display:flex"],
  body .cc-vendor-dashboard-layout form [style*="display:flex"],
  body .cc-client-dashboard-layout form [style*="display:flex"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  body .portal-container form [style*="width:50%"],
  body .chem-admin-portal form [style*="width:50%"],
  body .cc-vendor-dashboard-layout form [style*="width:50%"],
  body .cc-client-dashboard-layout form [style*="width:50%"] {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }

  body .portal-container [style*="min-width"],
  body .chem-admin-portal [style*="min-width"],
  body .cc-vendor-dashboard-layout [style*="min-width"],
  body .cc-client-dashboard-layout [style*="min-width"] {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .portal-container input,
  body .portal-container select,
  body .portal-container textarea,
  body .chem-admin-portal input,
  body .chem-admin-portal select,
  body .chem-admin-portal textarea,
  body .cc-vendor-dashboard-layout input,
  body .cc-vendor-dashboard-layout select,
  body .cc-vendor-dashboard-layout textarea,
  body .cc-client-dashboard-layout input,
  body .cc-client-dashboard-layout select,
  body .cc-client-dashboard-layout textarea {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .portal-container .chem-grid-2,
  body .portal-container .chem-grid-3,
  body .portal-container .price-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Keep tables inside panel frame */
  body .portal-container .chem-pro-table,
  body .portal-container .cc-admin-table,
  body .portal-container .cc-vendors-table,
  body .portal-container .cc-enquiry-main-table,
  body .portal-container .cc-client-enquiry-table,
  body .portal-container .cc-vendor-manager-table,
  body .chem-admin-portal .chem-pro-table,
  body .chem-admin-portal .cc-admin-table,
  body .chem-admin-portal .cc-vendors-table,
  body .chem-admin-portal .cc-enquiry-main-table,
  body .chem-admin-portal .cc-client-enquiry-table,
  body .chem-admin-portal .cc-vendor-manager-table,
  body .cc-vendor-dashboard-layout .chem-pro-table,
  body .cc-client-dashboard-layout .chem-pro-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: auto !important;
  }

  body .portal-container .cc-vendors-table-wrap,
  body .portal-container .cc-admin-table-wrap,
  body .portal-container .cc-vendor-manager-table-wrap,
  body .portal-container .cc-hscroll-target,
  body .portal-container .cc-hscroll-table-wrap,
  body .chem-admin-portal .cc-vendors-table-wrap,
  body .chem-admin-portal .cc-admin-table-wrap,
  body .chem-admin-portal .cc-vendor-manager-table-wrap,
  body .chem-admin-portal .cc-hscroll-target,
  body .chem-admin-portal .cc-hscroll-table-wrap,
  body .cc-vendor-dashboard-layout .cc-vendors-table-wrap,
  body .cc-vendor-dashboard-layout .cc-admin-table-wrap,
  body .cc-vendor-dashboard-layout .cc-vendor-manager-table-wrap,
  body .cc-client-dashboard-layout .cc-vendors-table-wrap,
  body .cc-client-dashboard-layout .cc-admin-table-wrap,
  body .cc-client-dashboard-layout .cc-vendor-manager-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body .portal-container td,
  body .portal-container th,
  body .chem-admin-portal td,
  body .chem-admin-portal th,
  body .cc-vendor-dashboard-layout td,
  body .cc-vendor-dashboard-layout th,
  body .cc-client-dashboard-layout td,
  body .cc-client-dashboard-layout th {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 576px) {
  body .portal-container,
  body .chem-admin-portal,
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout {
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
  }

  body .portal-container.cc-auth .portal-sidebar,
  body .portal-container.cc-auth .portal-form-side {
    padding: 10px !important;
  }
}

/* =========================================================
   PHASE 15: ADMIN TAB + SHORTCODE MOBILE STANDARD
   - Covers all Admin Control Panel sections and tab shortcodes
   - Keeps every panel centered, readable, and non-overflowing
========================================================= */
:root {
  --cc-admin-mobile-pad-l: max(10px, env(safe-area-inset-left));
  --cc-admin-mobile-pad-r: max(10px, env(safe-area-inset-right));
}

@media (max-width: 992px) {
  body .chem-admin-portal,
  body .portal-container,
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout,
  body .cc-live-chat-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--cc-admin-mobile-pad-l) !important;
    padding-right: var(--cc-admin-mobile-pad-r) !important;
    box-sizing: border-box !important;
  }

  body .chem-admin-portal,
  body .chem-admin-content,
  body .cc-admin-tab-panel,
  body .chem-admin-layout,
  body .cc-live-chat-layout,
  body .cc-live-chat-left,
  body .cc-live-chat-right {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .chem-admin-layout,
  body .cc-live-chat-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  body .chem-admin-sidebar,
  body .cc-live-chat-left {
    position: static !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body .chem-admin-nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px !important;
  }

  body .chem-admin-nav a {
    min-height: 44px !important;
    padding: 10px 8px !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  body .cc-admin-header-row,
  body .cc-enquiry-filter-bar,
  body .cc-stock-view-filter,
  body .cc-fold-toolbar,
  body .cc-fold-toolbar-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  body .cc-admin-header-row .btn,
  body .cc-enquiry-filter-bar .cc-enquiry-filter-link,
  body .cc-stock-view-filter .btn,
  body .cc-stock-view-filter select,
  body .cc-stock-view-filter input {
    flex: 1 1 calc(50% - 8px);
    min-width: 140px;
    justify-content: center;
  }

  body .chem-admin-content [style*="max-width"],
  body .cc-admin-tab-panel [style*="max-width"] {
    max-width: 100% !important;
  }

  body .chem-admin-content [style*="display:flex"],
  body .cc-admin-tab-panel [style*="display:flex"],
  body .portal-container [style*="display:flex"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: stretch !important;
    min-width: 0 !important;
  }

  body .chem-admin-content [style*="width:50%"],
  body .cc-admin-tab-panel [style*="width:50%"],
  body .portal-container [style*="width:50%"] {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }

  body .chem-admin-content [style*="min-width"],
  body .cc-admin-tab-panel [style*="min-width"],
  body .portal-container [style*="min-width"] {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .chem-admin-content input,
  body .chem-admin-content select,
  body .chem-admin-content textarea,
  body .cc-admin-tab-panel input,
  body .cc-admin-tab-panel select,
  body .cc-admin-tab-panel textarea,
  body .portal-container input,
  body .portal-container select,
  body .portal-container textarea {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .chem-admin-content .chem-grid-2,
  body .chem-admin-content .chem-grid-3,
  body .chem-admin-content .chem-grid-4,
  body .cc-admin-tab-panel .chem-grid-2,
  body .cc-admin-tab-panel .chem-grid-3,
  body .cc-admin-tab-panel .chem-grid-4,
  body .portal-container .chem-grid-2,
  body .portal-container .chem-grid-3,
  body .portal-container .chem-grid-4 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body .cc-live-chat-left {
    max-height: 320px !important;
    overflow: auto !important;
  }

  body #chem-admin-chat-messages {
    max-height: 340px !important;
  }

  body .cc-admin-table-wrap,
  body .cc-vendors-table-wrap,
  body .cc-vendor-manager-table-wrap,
  body .cc-hscroll-target,
  body .cc-hscroll-table-wrap,
  body .chem-admin-content > div[style*="overflow:auto"],
  body .cc-admin-tab-panel > div[style*="overflow:auto"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body .chem-pro-table,
  body .cc-admin-table,
  body .cc-vendors-table,
  body .cc-enquiry-main-table,
  body .cc-client-enquiry-table,
  body .cc-vendor-manager-table,
  body .cc-live-chat-thread-table {
    width: 100% !important;
    min-width: 700px !important;
    table-layout: auto !important;
  }

  body .chem-pro-table th,
  body .chem-pro-table td,
  body .cc-admin-table th,
  body .cc-admin-table td,
  body .cc-vendors-table th,
  body .cc-vendors-table td,
  body .cc-enquiry-main-table th,
  body .cc-enquiry-main-table td,
  body .cc-client-enquiry-table th,
  body .cc-client-enquiry-table td,
  body .cc-vendor-manager-table th,
  body .cc-vendor-manager-table td,
  body .cc-live-chat-thread-table th,
  body .cc-live-chat-thread-table td {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body .cc-stock-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 576px) {
  body .chem-admin-portal,
  body .portal-container,
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout,
  body .cc-live-chat-layout {
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
  }

  body .chem-admin-nav {
    grid-template-columns: 1fr !important;
  }

  body .cc-admin-header-row .btn,
  body .cc-enquiry-filter-bar .cc-enquiry-filter-link,
  body .cc-stock-view-filter .btn,
  body .cc-stock-view-filter select,
  body .cc-stock-view-filter input {
    flex: 1 1 100%;
    min-width: 0;
  }

  body .chem-pro-table,
  body .cc-admin-table,
  body .cc-vendors-table,
  body .cc-enquiry-main-table,
  body .cc-client-enquiry-table,
  body .cc-vendor-manager-table,
  body .cc-live-chat-thread-table {
    min-width: 620px !important;
  }
}

/* =========================================================
   PHASE 16: VENDOR + CLIENT MOBILE PARITY
   - Apply admin-grade mobile behavior to vendor/client dashboards
========================================================= */
@media (max-width: 992px) {
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: max(10px, env(safe-area-inset-left)) !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
    box-sizing: border-box !important;
  }

  body .cc-vendor-dashboard-layout > *,
  body .cc-client-dashboard-layout > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .cc-vendor-dashboard-layout .tab-nav,
  body .cc-client-dashboard-layout .tab-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
    padding: 2px 2px 8px !important;
  }

  body .cc-vendor-dashboard-layout .tab-nav a,
  body .cc-client-dashboard-layout .tab-nav a {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    justify-content: center !important;
  }

  body .cc-vendor-dashboard-layout [style*="display:flex"],
  body .cc-client-dashboard-layout [style*="display:flex"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    min-width: 0 !important;
    align-items: stretch !important;
  }

  body .cc-vendor-dashboard-layout [style*="width:50%"],
  body .cc-client-dashboard-layout [style*="width:50%"],
  body .cc-vendor-dashboard-layout [style*="min-width:240px"],
  body .cc-vendor-dashboard-layout [style*="min-width:260px"],
  body .cc-vendor-dashboard-layout [style*="min-width:280px"],
  body .cc-client-dashboard-layout [style*="min-width:220px"],
  body .cc-client-dashboard-layout [style*="min-width:240px"],
  body .cc-client-dashboard-layout [style*="min-width:260px"],
  body .cc-client-dashboard-layout [style*="min-width:280px"] {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .cc-vendor-dashboard-layout input,
  body .cc-vendor-dashboard-layout select,
  body .cc-vendor-dashboard-layout textarea,
  body .cc-client-dashboard-layout input,
  body .cc-client-dashboard-layout select,
  body .cc-client-dashboard-layout textarea {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body .cc-vendor-dashboard-layout .chem-grid-2,
  body .cc-vendor-dashboard-layout .chem-grid-3,
  body .cc-client-dashboard-layout .chem-grid-2,
  body .cc-client-dashboard-layout .chem-grid-3,
  body .cc-client-dashboard-layout .cc-client-quick-panel {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body .cc-vendor-dashboard-layout .chem-pro-table,
  body .cc-client-dashboard-layout .chem-pro-table,
  body .cc-client-dashboard-layout .cc-client-enquiry-table {
    width: 100% !important;
    min-width: 680px !important;
    table-layout: auto !important;
  }

  body .cc-vendor-dashboard-layout [style*="overflow:auto"],
  body .cc-vendor-dashboard-layout [style*="overflow: auto"],
  body .cc-client-dashboard-layout [style*="overflow:auto"],
  body .cc-client-dashboard-layout [style*="overflow: auto"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body .cc-client-enq-tools,
  body .cc-vendor-fold-tools {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body .cc-client-enq-tools .btn,
  body .cc-vendor-fold-tools .btn {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  body #client-support-panel,
  body #client-live-chat-panel,
  body #client-vendor-chat-panel {
    padding: 10px !important;
    border-radius: 12px !important;
  }

  body #chem-client-chat-messages {
    max-height: 340px !important;
  }

  body #chem-client-chat-send,
  body .cc-vendor-dashboard-layout button[name="submit_vendor_quote"],
  body .cc-vendor-dashboard-layout button[name="vendor_external_phase_submit"] {
    width: 100% !important;
    max-width: none !important;
  }
}

@media (max-width: 576px) {
  body .cc-vendor-dashboard-layout,
  body .cc-client-dashboard-layout {
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
  }

  body .cc-vendor-dashboard-layout .chem-pro-table,
  body .cc-client-dashboard-layout .chem-pro-table,
  body .cc-client-dashboard-layout .cc-client-enquiry-table {
    min-width: 620px !important;
  }
}

/* =========================================================
   PHASE 17: GLOBAL RESOURCE + PRODUCT MOBILE OPTIMIZATION
   - Pricing page + single/product templates + resource brand/category pages
========================================================= */
:root {
  --cc-mobile-content-pad-l: max(10px, env(safe-area-inset-left));
  --cc-mobile-content-pad-r: max(10px, env(safe-area-inset-right));
}

@media (max-width: 992px) {
  body.page .container,
  body.single .container,
  body.archive .container,
  body.tax .container,
  body.search .container,
  body.error404 .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: var(--cc-mobile-content-pad-l) !important;
    padding-right: var(--cc-mobile-content-pad-r) !important;
    box-sizing: border-box !important;
  }

  body.page .section-wrap,
  body.single .section-wrap,
  body.archive .section-wrap,
  body.tax .section-wrap {
    padding-top: 20px !important;
    padding-bottom: 24px !important;
  }

  body.post-type-archive .instr-hero {
    clip-path: none !important;
    padding: 52px 0 66px !important;
  }

  body.post-type-archive .instr-title {
    font-size: clamp(1.8rem, 6vw, 2.3rem) !important;
  }

  body .cc-pricing-wrap {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  body .cc-pricing-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  body .cc-pricing-search,
  body .cc-pricing-meta {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .cc-pricing-search input,
  body #cc-price-search {
    width: 100% !important;
    min-height: 46px !important;
    font-size: 16px !important;
  }

  body .cc-pricing-meta {
    justify-content: flex-start !important;
  }

  body .cc-price-table thead {
    display: none !important;
  }

  body .cc-price-table,
  body .cc-price-table tbody,
  body .cc-price-table tr,
  body .cc-price-table td {
    display: block !important;
    width: 100% !important;
  }

  body .cc-price-table .cc-price-row {
    margin: 0 0 12px !important;
    padding: 12px !important;
    border: 1px solid #dce8f1 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 6px 14px rgba(15, 42, 61, 0.06);
  }

  body .cc-price-table .cc-price-row td {
    border: 0 !important;
    border-bottom: 1px solid #edf2f7 !important;
    padding: 8px 0 !important;
  }

  body .cc-price-table .cc-price-row td:last-child {
    border-bottom: 0 !important;
  }

  body .cc-price-table .cc-price-row td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    font-weight: 800;
  }

  body .cc-price-chem-head {
    align-items: flex-start !important;
    gap: 10px !important;
  }

  body .cc-price-chem-thumb {
    width: 58px !important;
    height: 58px !important;
  }

  body .cc-price-table .price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body .cc-price-table .price-tag {
    width: 100%;
    overflow-wrap: anywhere;
  }

  body .cc-price-table .cc-price-input,
  body .cc-price-table input[type="date"],
  body .cc-price-table .cc-price-image-input {
    width: 100% !important;
    min-width: 0 !important;
  }

  body .cc-price-table .cc-save-price,
  body .cc-price-table .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  body.single-chemical .pro-layout-grid,
  body.single-instrument .pro-layout-grid,
  body.single-service .pro-layout-grid,
  body.single-product .pro-layout-grid,
  body.single .pro-layout-grid,
  body.single-post .grid-cols-4 {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  body.single-chemical .content-wrapper,
  body.single-instrument .content-wrapper,
  body.single-service .content-wrapper,
  body.single-product .content-wrapper,
  body.single .content-wrapper {
    order: 1;
    width: 100%;
    min-width: 0;
  }

  body.single-chemical .sidebar-wrapper,
  body.single-instrument .sidebar-wrapper,
  body.single-service .sidebar-wrapper,
  body.single-product .sidebar-wrapper,
  body.single .sidebar-wrapper {
    order: 2;
    width: 100%;
    margin-top: 8px !important;
  }

  body.single-chemical .pro-detail-grid,
  body.single-instrument .pro-detail-grid,
  body.single-service .pro-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  body.single-chemical .pro-meta-pills,
  body.single-instrument .pro-meta-pills {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }

  body.single-service .pro-col-right > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.single .pro-image-stage,
  body.single .cc-resource-gallery {
    border-radius: 12px !important;
    overflow: hidden;
  }

  body.single .specs-table th,
  body.single .specs-table td {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.single .entry-content,
  body.single .pro-desc,
  body.single .woocommerce-product-details__short-description {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body.single-product .woocommerce div.product div.images,
  body.single-product .woocommerce div.product div.summary {
    width: 100% !important;
    float: none !important;
    margin: 0 0 14px !important;
  }

  body.single-product .woocommerce div.product .cart,
  body.single-product .woocommerce div.product form.cart {
    display: grid !important;
    gap: 8px !important;
  }

  body.single-product .woocommerce div.product form.cart .button,
  body.single-product .woocommerce #respond input#submit,
  body.single-product .woocommerce a.button,
  body.single-product .woocommerce button.button,
  body.single-product .woocommerce input.button {
    width: 100% !important;
    min-height: 46px !important;
  }

  body.single-product .woocommerce .quantity input.qty {
    width: 100% !important;
    min-height: 44px;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li {
    flex: 0 0 auto;
  }

  body .instr-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  body .instr-toolbar .toolbar-actions,
  body .instr-toolbar .pro-select {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .instr-toolbar .pro-select {
    min-height: 44px;
  }

  body.post-type-archive-chemical .container.section-wrap[style*="margin-top:-60px"],
  body.post-type-archive-instrument .container.section-wrap[style*="margin-top:-60px"],
  body.post-type-archive-service .container.section-wrap[style*="margin-top:-60px"] {
    margin-top: -24px !important;
  }

  body .chem-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body .chem-cat-grid[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body .cat-card {
    min-height: 110px !important;
    padding: 10px !important;
  }

  body .cc-brand-logo-wrap {
    width: 76px !important;
    height: 76px !important;
    margin: 0 auto 8px !important;
    padding: 8px !important;
  }

  body .cc-brand-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
  }

  body.archive .chemical-grid,
  body.tax .chemical-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body.archive .chemical-card,
  body.tax .chemical-card {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center;
    border: 1px solid #dbe6ef;
    border-radius: 12px;
    background: #ffffff;
    padding: 10px;
    box-shadow: 0 6px 14px rgba(15, 42, 61, 0.06);
  }

  body.archive .chemical-card .card-image,
  body.tax .chemical-card .card-image {
    width: 96px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
  }

  body.archive .chemical-card .card-content,
  body.tax .chemical-card .card-content {
    min-width: 0;
  }

  body.archive .chemical-card .card-title,
  body.tax .chemical-card .card-title {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  body.archive .chemical-card .card-actions .btn,
  body.tax .chemical-card .card-actions .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  body .cc-price-table .price-grid {
    grid-template-columns: 1fr !important;
  }

  body .chem-cat-grid,
  body .chem-cat-grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  body.single-chemical .pro-meta-pills,
  body.single-instrument .pro-meta-pills {
    grid-template-columns: 1fr !important;
  }

  body.archive .chemical-card,
  body.tax .chemical-card {
    grid-template-columns: 1fr !important;
  }

  body.archive .chemical-card .card-image,
  body.tax .chemical-card .card-image {
    width: 100%;
    height: 160px;
  }

  body.post-type-archive-chemical .container.section-wrap[style*="margin-top:-60px"],
  body.post-type-archive-instrument .container.section-wrap[style*="margin-top:-60px"],
  body.post-type-archive-service .container.section-wrap[style*="margin-top:-60px"] {
    margin-top: -10px !important;
  }
}

/* =========================================================
   PHASE 18: VENDOR + PLANS MOBILE CANONICAL LAYER
   - Vendor dashboard/registration alignment
   - Vendor plan cards and panel forms easy to use on mobile
========================================================= */
@media (max-width: 992px) {
  body.page-vendor-registration .portal-container,
  body.page-vendor-dashboard .portal-container,
  body.page-vendors .cc-vendors-page,
  body .cc-vendor-register-layout,
  body .cc-vendor-dashboard-layout,
  body .cc-plan-pricing-wrap,
  body .cc-vendor-verification-history,
  body .cc-verify-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  body.page-vendor-registration .portal-container,
  body.page-vendor-dashboard .portal-container,
  body .cc-vendor-register-layout,
  body .cc-vendor-dashboard-layout,
  body .cc-plan-pricing-wrap {
    padding-left: max(10px, env(safe-area-inset-left)) !important;
    padding-right: max(10px, env(safe-area-inset-right)) !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout {
    display: block !important;
    border-radius: 14px !important;
    overflow: hidden;
  }

  body.page-vendor-registration .cc-vendor-register-layout .portal-sidebar,
  body.page-vendor-registration .cc-vendor-register-layout .portal-form-side {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout .portal-sidebar {
    border-right: 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout form,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout form,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout .cc-inline-form,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout .cc-verify-actions,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout [style*="display:flex"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: stretch !important;
    min-width: 0 !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout .chem-grid-2,
  body.page-vendor-registration .cc-vendor-register-layout .chem-grid-3,
  body.page-vendor-registration .cc-vendor-register-layout .chem-grid-4,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-grid-2,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-grid-3,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout .chem-grid-4 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout [style*="width:50%"],
  body.page-vendor-dashboard .cc-vendor-dashboard-layout [style*="width:50%"],
  body.page-vendor-registration .cc-vendor-register-layout [style*="min-width"],
  body.page-vendor-dashboard .cc-vendor-dashboard-layout [style*="min-width"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout input,
  body.page-vendor-registration .cc-vendor-register-layout select,
  body.page-vendor-registration .cc-vendor-register-layout textarea,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout input,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout select,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 46px;
    font-size: 16px !important;
  }

  body.page-vendor-registration .cc-vendor-register-layout input[type="file"],
  body.page-vendor-dashboard .cc-vendor-dashboard-layout input[type="file"] {
    padding: 10px 8px !important;
    min-height: 44px;
  }

  body.page-vendor-registration .cc-vendor-register-layout .btn,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout .btn,
  body.page-vendor-dashboard .cc-vendor-dashboard-layout button,
  body .cc-plan-pricing-wrap .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
  }

  body.page-vendor-dashboard .cc-vendor-status-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
  }

  body.page-vendor-dashboard .cc-vendor-dashboard-layout .tab-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap !important;
    gap: 8px !important;
    margin: 0 0 12px !important;
    padding: 2px 0 8px !important;
  }

  body.page-vendor-dashboard .cc-vendor-dashboard-layout .tab-nav a {
    flex: 0 0 auto !important;
    min-height: 42px !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 10px 12px !important;
    justify-content: center !important;
  }

  body.page-vendor-dashboard .cc-vendors-table-wrap,
  body.page-vendor-dashboard .cc-admin-table-wrap,
  body.page-vendor-dashboard .cc-vendor-manager-table-wrap,
  body.page-vendor-dashboard .cc-hscroll-target,
  body.page-vendor-dashboard .cc-hscroll-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.page-vendor-dashboard .cc-vendors-table,
  body.page-vendor-dashboard .cc-admin-table,
  body.page-vendor-dashboard .cc-vendor-manager-table,
  body.page-vendor-dashboard .chem-pro-table {
    width: 100% !important;
    min-width: 680px !important;
    table-layout: auto !important;
  }

  body.page-vendor-dashboard .cc-vendors-table th,
  body.page-vendor-dashboard .cc-vendors-table td,
  body.page-vendor-dashboard .cc-admin-table th,
  body.page-vendor-dashboard .cc-admin-table td,
  body.page-vendor-dashboard .cc-vendor-manager-table th,
  body.page-vendor-dashboard .cc-vendor-manager-table td,
  body.page-vendor-dashboard .chem-pro-table th,
  body.page-vendor-dashboard .chem-pro-table td {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  body .cc-plan-pricing-wrap {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  body .cc-plan-pricing-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  body .cc-plan-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body .cc-plan-card {
    padding: 12px !important;
    border-radius: 12px !important;
  }

  body .cc-plan-top {
    padding-bottom: 8px !important;
  }

  body .cc-plan-name {
    font-size: 20px !important;
    line-height: 1.2 !important;
  }

  body .cc-plan-price {
    font-size: 14px !important;
  }

  body .cc-plan-summary {
    font-size: 13px !important;
    line-height: 1.45;
  }

  body .cc-plan-points {
    padding-left: 18px !important;
    font-size: 13px !important;
    gap: 5px !important;
  }

  body .cc-plan-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body .cc-plan-actions .btn,
  body .cc-plan-actions a {
    width: 100% !important;
  }

  body .cc-vendors-search {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body .cc-vendors-search input,
  body .cc-vendors-search select,
  body .cc-vendors-search .btn {
    width: 100% !important;
    min-width: 0 !important;
  }

  body .cc-verify-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body .cc-verify-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  body .cc-verify-actions .btn,
  body .cc-verify-actions a {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 576px) {
  body.page-vendor-registration .portal-container,
  body.page-vendor-dashboard .portal-container,
  body .cc-vendor-register-layout,
  body .cc-vendor-dashboard-layout,
  body .cc-plan-pricing-wrap {
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
  }

  body.page-vendor-dashboard .cc-vendor-status-strip {
    grid-template-columns: 1fr !important;
  }

  body .cc-plan-name {
    font-size: 18px !important;
  }

  body.page-vendor-dashboard .cc-vendors-table,
  body.page-vendor-dashboard .cc-admin-table,
  body.page-vendor-dashboard .cc-vendor-manager-table,
  body.page-vendor-dashboard .chem-pro-table {
    min-width: 620px !important;
  }
}

/* =========================================================
   PHASE 19: CANONICAL MOBILE ALIGNMENT LAYER
   - Vendor/plan panels + related forms
   - Chemical pricing + all single/product pages
   - Resource category + brand sections
========================================================= */
@media (max-width: 992px) {
  html body .container,
  html body .section-wrap,
  html body .portal-container,
  html body .chem-admin-portal,
  html body .cc-vendors-page,
  html body .cc-vendor-register-layout,
  html body .cc-vendor-dashboard-layout,
  html body .cc-plan-pricing-wrap,
  html body .cc-pricing-wrap,
  html body .panel,
  html body .cc-panel,
  html body .woocommerce,
  html body .woocommerce-MyAccount-content,
  html body .dokan-dashboard-wrap,
  html body .dokan-dashboard-content,
  html body .mvx-vendor-dashboard,
  html body .wcmp_vendor_dashboard,
  html body .wcfm-page,
  html body .wcfm-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html body .cc-vendor-register-layout,
  html body .cc-vendor-dashboard-layout,
  html body .cc-vendors-page,
  html body .cc-plan-pricing-wrap,
  html body .cc-pricing-wrap,
  html body .cc-verify-panel,
  html body .panel,
  html body .cc-panel {
    padding: 12px !important;
    border-radius: 14px !important;
    overflow-x: hidden !important;
  }

  html body .portal-container form,
  html body .chem-admin-portal form,
  html body .cc-vendor-register-layout form,
  html body .cc-vendor-dashboard-layout form,
  html body .cc-client-dashboard-layout form,
  html body .cc-plan-pricing-wrap form,
  html body .cc-pricing-wrap form,
  html body .dokan-dashboard-wrap form,
  html body .mvx-vendor-dashboard form,
  html body .wcmp_vendor_dashboard form,
  html body .wcfm-container form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html body .portal-container form [style*="display:flex"],
  html body .chem-admin-portal form [style*="display:flex"],
  html body .cc-vendor-register-layout form [style*="display:flex"],
  html body .cc-vendor-dashboard-layout form [style*="display:flex"],
  html body .cc-client-dashboard-layout form [style*="display:flex"],
  html body .dokan-dashboard-wrap form [style*="display:flex"],
  html body .mvx-vendor-dashboard form [style*="display:flex"],
  html body .wcmp_vendor_dashboard form [style*="display:flex"],
  html body .wcfm-container form [style*="display:flex"],
  html body .cc-inline-form,
  html body .cc-vendor-fold-tools,
  html body .cc-verify-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 8px !important;
    min-width: 0 !important;
  }

  html body .portal-container form [style*="width:50%"],
  html body .chem-admin-portal form [style*="width:50%"],
  html body .cc-vendor-register-layout form [style*="width:50%"],
  html body .cc-vendor-dashboard-layout form [style*="width:50%"],
  html body .cc-client-dashboard-layout form [style*="width:50%"],
  html body .dokan-dashboard-wrap form [style*="width:50%"],
  html body .mvx-vendor-dashboard form [style*="width:50%"],
  html body .wcmp_vendor_dashboard form [style*="width:50%"],
  html body .wcfm-container form [style*="width:50%"],
  html body .portal-container form [style*="min-width"],
  html body .chem-admin-portal form [style*="min-width"],
  html body .cc-vendor-register-layout form [style*="min-width"],
  html body .cc-vendor-dashboard-layout form [style*="min-width"],
  html body .cc-client-dashboard-layout form [style*="min-width"],
  html body .dokan-dashboard-wrap form [style*="min-width"],
  html body .mvx-vendor-dashboard form [style*="min-width"],
  html body .wcmp_vendor_dashboard form [style*="min-width"],
  html body .wcfm-container form [style*="min-width"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
  }

  html body .portal-container input,
  html body .portal-container select,
  html body .portal-container textarea,
  html body .portal-container button,
  html body .chem-admin-portal input,
  html body .chem-admin-portal select,
  html body .chem-admin-portal textarea,
  html body .chem-admin-portal button,
  html body .cc-vendor-register-layout input,
  html body .cc-vendor-register-layout select,
  html body .cc-vendor-register-layout textarea,
  html body .cc-vendor-register-layout button,
  html body .cc-vendor-dashboard-layout input,
  html body .cc-vendor-dashboard-layout select,
  html body .cc-vendor-dashboard-layout textarea,
  html body .cc-vendor-dashboard-layout button,
  html body .cc-client-dashboard-layout input,
  html body .cc-client-dashboard-layout select,
  html body .cc-client-dashboard-layout textarea,
  html body .cc-client-dashboard-layout button,
  html body .dokan-dashboard-wrap input,
  html body .dokan-dashboard-wrap select,
  html body .dokan-dashboard-wrap textarea,
  html body .dokan-dashboard-wrap button,
  html body .mvx-vendor-dashboard input,
  html body .mvx-vendor-dashboard select,
  html body .mvx-vendor-dashboard textarea,
  html body .mvx-vendor-dashboard button,
  html body .wcmp_vendor_dashboard input,
  html body .wcmp_vendor_dashboard select,
  html body .wcmp_vendor_dashboard textarea,
  html body .wcmp_vendor_dashboard button,
  html body .wcfm-container input,
  html body .wcfm-container select,
  html body .wcfm-container textarea,
  html body .wcfm-container button,
  html body .cc-plan-actions .btn,
  html body .cc-pricing-wrap .btn,
  html body .cc-vendors-search .btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  html body .cc-vendors-table-wrap,
  html body .cc-vendor-manager-table-wrap,
  html body .cc-admin-table-wrap,
  html body .cc-hscroll-target,
  html body .cc-hscroll-table-wrap,
  html body .cc-pricing-wrap > div[style*="overflow-x:auto"],
  html body .cc-pricing-wrap > div[style*="overflow-x: auto"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  html body .cc-vendors-table,
  html body .cc-vendor-manager-table,
  html body .cc-admin-table,
  html body .chem-pro-table,
  html body .cc-price-table {
    width: 100% !important;
    min-width: 640px !important;
    table-layout: auto !important;
  }

  html body .cc-vendors-table th,
  html body .cc-vendors-table td,
  html body .cc-vendor-manager-table th,
  html body .cc-vendor-manager-table td,
  html body .cc-admin-table th,
  html body .cc-admin-table td,
  html body .chem-pro-table th,
  html body .chem-pro-table td,
  html body .cc-price-table th,
  html body .cc-price-table td {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  html body .cc-plan-pricing-head,
  html body .cc-pricing-head,
  html body .cc-vendors-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  html body .cc-plan-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  html body .cc-plan-card {
    min-height: 0 !important;
    padding: 12px !important;
  }

  html body .cc-plan-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  html body .cc-vendors-search {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  html body .cc-vendors-search input,
  html body .cc-vendors-search select,
  html body .cc-vendors-search button {
    width: 100% !important;
    min-width: 0 !important;
  }

  html body.single-chemical .pro-layout-grid,
  html body.single-instrument .pro-layout-grid,
  html body.single-service .pro-layout-grid,
  html body.single-product .pro-layout-grid,
  html body.single .pro-layout-grid,
  html body.page .pro-layout-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  html body.single-chemical .content-wrapper,
  html body.single-instrument .content-wrapper,
  html body.single-service .content-wrapper,
  html body.single-product .content-wrapper,
  html body.single .content-wrapper,
  html body.page .content-wrapper,
  html body.single-chemical .sidebar-wrapper,
  html body.single-instrument .sidebar-wrapper,
  html body.single-service .sidebar-wrapper,
  html body.single-product .sidebar-wrapper,
  html body.single .sidebar-wrapper,
  html body.page .sidebar-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    order: initial !important;
  }

  html body .pro-sidebar {
    position: static !important;
    top: auto !important;
  }

  html body .pro-sidebar .sidebar-list li a {
    gap: 8px !important;
    align-items: flex-start !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  html body .pro-sidebar .sidebar-list li a span {
    max-width: 100%;
  }

  html body.archive .grid-cols-4,
  html body.archive .instr-grid,
  html body.tax .grid-cols-4,
  html body.tax .instr-grid,
  html body.search .grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  html body .chem-cat-grid,
  html body .chem-cat-grid[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  html body .cat-card {
    min-height: 112px !important;
    padding: 10px !important;
  }

  html body .cat-card h4,
  html body .cat-card .cat-title {
    font-size: 13px !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
  }

  html body .cc-brand-logo-wrap {
    width: 74px !important;
    height: 74px !important;
    margin: 0 auto 8px !important;
    padding: 8px !important;
  }

  html body .cc-brand-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }
}

@media (max-width: 576px) {
  html body .cc-vendors-table,
  html body .cc-vendor-manager-table,
  html body .cc-admin-table,
  html body .chem-pro-table,
  html body .cc-price-table {
    min-width: 600px !important;
  }

  html body .chem-cat-grid,
  html body .chem-cat-grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  html body .cc-brand-logo-wrap {
    width: 68px !important;
    height: 68px !important;
  }

  html body .cat-card {
    min-height: 98px !important;
  }
}

/* =========================================================
   PHASE 20: ADMIN ENQUIRY EXPERIENCE REFINEMENT
   - Cleaner enquiry controls, cards, table readability
   - Better assign/quote/payment/facility panel structure
========================================================= */
:root {
  --cc-enq-panel-bg: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  --cc-enq-border: #d4e3ed;
  --cc-enq-border-strong: #c2d7e5;
  --cc-enq-ink: #123f57;
  --cc-enq-muted: #5b7283;
}

html body .chem-admin-portal .cc-enquiry-control-panel {
  border: 1px solid var(--cc-enq-border) !important;
  border-radius: 14px !important;
  background: var(--cc-enq-panel-bg) !important;
  box-shadow: 0 10px 22px rgba(15, 42, 61, 0.07);
  padding: 14px !important;
}

html body .chem-admin-portal .cc-enquiry-control-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

html body .chem-admin-portal .cc-enquiry-control-form label {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #355469 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

html body .chem-admin-portal .cc-enquiry-control-form input,
html body .chem-admin-portal .cc-enquiry-control-form select {
  min-height: 40px;
  border-radius: 10px !important;
  border: 1px solid var(--cc-enq-border-strong) !important;
  background: #fff;
}

html body .chem-admin-portal .cc-enquiry-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px !important;
  margin: 0 0 14px !important;
}

html body .chem-admin-portal .cc-enquiry-summary-card {
  border: 1px solid var(--cc-enq-border) !important;
  border-radius: 14px !important;
  background: var(--cc-enq-panel-bg) !important;
  box-shadow: 0 8px 18px rgba(15, 42, 61, 0.06) !important;
  padding: 14px !important;
}

html body .chem-admin-portal .cc-enquiry-summary-value {
  font-size: clamp(24px, 2.2vw, 30px) !important;
  line-height: 1.1 !important;
  color: var(--cc-enq-ink) !important;
}

html body .chem-admin-portal .cc-enquiry-quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px !important;
  margin-bottom: 14px !important;
}

html body .chem-admin-portal .cc-enquiry-quick-card {
  border: 1px solid var(--cc-enq-border) !important;
  border-radius: 14px !important;
  background: var(--cc-enq-panel-bg) !important;
  box-shadow: 0 8px 18px rgba(15, 42, 61, 0.06) !important;
  padding: 12px !important;
}

html body .chem-admin-portal .cc-enquiry-quick-title {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #194961 !important;
}

html body .chem-admin-portal .cc-enquiry-filter-bar {
  margin-bottom: 12px !important;
  gap: 8px !important;
}

html body .chem-admin-portal .cc-enquiry-main-table-wrap {
  border: 1px solid var(--cc-enq-border) !important;
  border-radius: 14px !important;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 42, 61, 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html body .chem-admin-portal .cc-enquiry-main-table {
  margin: 0 !important;
  min-width: 1140px !important;
  border-collapse: separate;
  border-spacing: 0;
}

html body .chem-admin-portal .cc-enquiry-main-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #eef5fb 0%, #e6f0f7 100%) !important;
  border-bottom: 1px solid #cadbe8 !important;
  color: #28506a !important;
  font-size: 12px;
  font-weight: 900;
}

html body .chem-admin-portal .cc-enquiry-main-row > td {
  vertical-align: top !important;
  padding: 12px !important;
}

html body .chem-admin-portal .cc-enquiry-main-row:hover > td {
  background: #f6fbff !important;
}

html body .chem-admin-portal .cc-enquiry-main-row > td[data-label="ID"] {
  width: 96px;
  font-weight: 800;
  color: var(--cc-enq-ink);
}

html body .chem-admin-portal .cc-enquiry-main-row > td[data-label="Client"] {
  min-width: 380px;
}

html body .chem-admin-portal .cc-enquiry-main-row > td[data-label="Assign"] {
  min-width: 260px;
}

html body .chem-admin-portal .cc-enquiry-main-row > td[data-label="Quotes"] {
  min-width: 380px;
}

html body .chem-admin-portal .cc-enquiry-status-wrap .status-badge {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
}

html body .chem-admin-portal .cc-enquiry-note-card {
  margin-top: 8px !important;
  padding: 10px 11px !important;
  border-radius: 10px !important;
  border: 1px solid var(--cc-enq-border) !important;
  background: #f8fbff !important;
  box-shadow: 0 5px 12px rgba(15, 42, 61, 0.05);
  font-size: 11.5px !important;
  line-height: 1.45;
  color: #23465a;
}

html body .chem-admin-portal .cc-enquiry-note-feedback { border-left: 4px solid #3b82f6 !important; }
html body .chem-admin-portal .cc-enquiry-note-decision { border-left: 4px solid #f59e0b !important; }
html body .chem-admin-portal .cc-enquiry-note-order { border-left: 4px solid #2563eb !important; }
html body .chem-admin-portal .cc-enquiry-note-payment { border-left: 4px solid #0ea5e9 !important; }
html body .chem-admin-portal .cc-enquiry-note-tracking { border-left: 4px solid #0891b2 !important; }
html body .chem-admin-portal .cc-enquiry-note-external { border-left: 4px solid #6366f1 !important; }

html body .chem-admin-portal .cc-enquiry-timeline-wrap {
  margin-top: 10px;
}

html body .chem-admin-portal .cc-enquiry-assign-form,
html body .chem-admin-portal .cc-enquiry-notice-form,
html body .chem-admin-portal .cc-enquiry-quickstatus-form,
html body .chem-admin-portal .cc-admin-quote-form,
html body .chem-admin-portal .cc-forward-quote-form,
html body .chem-admin-portal .cc-payment-setup-form,
html body .chem-admin-portal .cc-facility-setup-form {
  gap: 8px !important;
}

html body .chem-admin-portal .cc-enquiry-assign-form select,
html body .chem-admin-portal .cc-enquiry-assign-form input,
html body .chem-admin-portal .cc-enquiry-notice-form select,
html body .chem-admin-portal .cc-enquiry-notice-form input,
html body .chem-admin-portal .cc-enquiry-quickstatus-form select,
html body .chem-admin-portal .cc-enquiry-quickstatus-form input,
html body .chem-admin-portal .cc-admin-quote-form select,
html body .chem-admin-portal .cc-admin-quote-form input,
html body .chem-admin-portal .cc-admin-quote-form textarea,
html body .chem-admin-portal .cc-forward-quote-form input,
html body .chem-admin-portal .cc-forward-quote-form textarea,
html body .chem-admin-portal .cc-payment-setup-form select,
html body .chem-admin-portal .cc-payment-setup-form input,
html body .chem-admin-portal .cc-payment-setup-form textarea,
html body .chem-admin-portal .cc-facility-setup-form select,
html body .chem-admin-portal .cc-facility-setup-form input,
html body .chem-admin-portal .cc-facility-setup-form textarea {
  border-radius: 10px !important;
  border: 1px solid var(--cc-enq-border-strong) !important;
  background: #fff;
}

html body .chem-admin-portal .cc-enquiry-notice-form .btn,
html body .chem-admin-portal .cc-enquiry-quickstatus-form .btn,
html body .chem-admin-portal .cc-admin-quote-toggle,
html body .chem-admin-portal .cc-admin-quote-form .btn,
html body .chem-admin-portal .cc-forward-quote-form .btn,
html body .chem-admin-portal .cc-payment-setup-form .btn,
html body .chem-admin-portal .cc-facility-setup-form .btn {
  width: 100%;
  justify-content: center;
}

html body .chem-admin-portal .cc-admin-quote-form-wrap,
html body .chem-admin-portal .cc-forward-quote-wrap {
  border: 1px dashed var(--cc-enq-border-strong);
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}

html body .chem-admin-portal .cc-admin-quote-row {
  display: flex;
  gap: 8px !important;
}

html body .chem-admin-portal .cc-admin-quote-row > * {
  flex: 1 1 50%;
  min-width: 0;
}

html body .chem-admin-portal .cc-enquiry-quote-card {
  border: 1px solid #d7e4ed !important;
  border-radius: 10px !important;
  background: #f8fbff !important;
  padding: 9px !important;
  margin-bottom: 8px !important;
  box-shadow: 0 4px 10px rgba(15, 42, 61, 0.05);
}

html body .chem-admin-portal .cc-enquiry-quote-card .button.button-small {
  border: 1px solid #c7d8e5 !important;
  border-radius: 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
}

html body .chem-admin-portal .cc-payment-setup-panel,
html body .chem-admin-portal .cc-facility-setup-panel {
  border-radius: 12px !important;
  border-width: 1px !important;
  padding: 10px !important;
  box-shadow: 0 5px 12px rgba(15, 42, 61, 0.05);
}

html body .chem-admin-portal .cc-payment-setup-panel > div:first-child,
html body .chem-admin-portal .cc-facility-setup-panel > div:first-child {
  color: #184761;
  letter-spacing: 0.01em;
}

html body .chem-admin-portal .cc-quoted-enquiries-section {
  margin-top: 22px !important;
  border: 1px solid var(--cc-enq-border);
  border-radius: 14px;
  background: var(--cc-enq-panel-bg);
  box-shadow: 0 10px 20px rgba(15, 42, 61, 0.06);
  padding: 12px;
}

html body .chem-admin-portal .cc-quoted-enquiries-table-wrap {
  border: 1px solid var(--cc-enq-border);
  border-radius: 12px;
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html body .chem-admin-portal .cc-quoted-enquiries-table {
  margin: 0 !important;
}

html body .chem-admin-portal .cc-enq-fold-tools {
  margin: 0 0 10px;
}

@media (max-width: 992px) {
  html body .chem-admin-portal .cc-enquiry-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html body .chem-admin-portal .cc-enquiry-quick-grid {
    grid-template-columns: 1fr;
  }

  html body .chem-admin-portal .cc-enquiry-control-form {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  html body .chem-admin-portal .cc-enquiry-control-form input,
  html body .chem-admin-portal .cc-enquiry-control-form select,
  html body .chem-admin-portal .cc-enquiry-control-form .btn {
    width: 100% !important;
    min-width: 0 !important;
  }

  html body .chem-admin-portal .cc-enquiry-main-table {
    min-width: 760px !important;
  }

  html body .chem-admin-portal .cc-enquiry-main-row > td {
    padding: 10px !important;
  }

  html body .chem-admin-portal .cc-enquiry-assign-form,
  html body .chem-admin-portal .cc-admin-quote-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 576px) {
  html body .chem-admin-portal .cc-enquiry-summary {
    grid-template-columns: 1fr;
  }

  html body .chem-admin-portal .cc-enquiry-main-table {
    min-width: 640px !important;
  }

  html body .chem-admin-portal .cc-enquiry-note-card {
    font-size: 11px !important;
  }
}

/* =========================================================
   PHASE 21: LOGGED-IN DESKTOP 3-COLUMN APP SHELL
   - Hide header for authenticated desktop users
   - Left control panel, center content, right important links
========================================================= */
@media (min-width: 993px) {
  body.logged-in #header-hover-zone,
  body.logged-in .main-header,
  body.logged-in .header-mini-actions,
  body.logged-in .portal-role-strip,
  body.logged-in .mobile-app-top,
  body.logged-in .mobile-bottom-nav,
  body.logged-in .mobile-search-overlay,
  body.logged-in #mobile-search-overlay,
  body.logged-in .cc-mobile-panel,
  body.logged-in #mobile-panel,
  body.logged-in .cc-mobile-overlay,
  body.logged-in #mobile-overlay {
    display: none !important;
  }

  body.logged-in {
    padding-top: 0 !important;
  }

  body.logged-in .cc-desktop-shell {
    display: grid;
    grid-template-columns: minmax(230px, 0.95fr) minmax(0, 2.8fr) minmax(220px, 0.9fr);
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 14px 16px;
    align-items: start;
  }

  body.logged-in .cc-desktop-shell-center {
    min-width: 0;
    min-height: calc(100vh - 28px);
  }

  body.logged-in .cc-desktop-shell-left,
  body.logged-in .cc-desktop-shell-right {
    position: sticky;
    top: 14px;
    align-self: start;
  }

  body.logged-in .cc-desktop-shell-card {
    border: 1px solid rgba(15, 76, 92, 0.14);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 42, 61, 0.08);
    padding: 12px;
  }

  body.logged-in .cc-desktop-shell-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f4c5c;
    margin-bottom: 4px;
  }

  body.logged-in .cc-desktop-shell-subtitle {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 10px;
  }

  body.logged-in .cc-desktop-shell-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }

  body.logged-in .cc-desktop-shell-links li {
    margin: 0;
    padding: 0;
  }

  body.logged-in .cc-desktop-shell-links li a {
    display: block;
    border: 1px solid rgba(15, 76, 92, 0.12);
    border-radius: 10px;
    background: #f8fbfd;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #0f3a48;
    line-height: 1.3;
  }

  body.logged-in .cc-desktop-shell-links li a:hover {
    background: #0f4c5c;
    border-color: #0f4c5c;
    color: #ffffff;
  }

  body.logged-in .site-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.logged-in .site-main > *:first-child {
    margin-top: 0 !important;
  }

  body.logged-in .site-main > *:last-child {
    margin-bottom: 0 !important;
  }

  body.logged-in .site-main .container {
    max-width: 100% !important;
  }

  body.logged-in .site-footer {
    display: none !important;
  }
}

@media (max-width: 992px) {
  body.logged-in .cc-desktop-shell {
    display: block;
    padding: 0;
  }

  body.logged-in .cc-desktop-shell-left,
  body.logged-in .cc-desktop-shell-right {
    display: none;
  }

  body.logged-in .cc-desktop-shell-center {
    min-width: 0;
    min-height: 0;
  }
}
