:root {
  --setup-footer-height: 58px;
  /* Bootstrap 5 Color Palette */
  --bs-blue: #096bef;
  --bs-indigo: #6610f2;
  --bs-purple: #6f42c1;
  --bs-pink: #d63384;
  --bs-red: #ff5647;
  --bs-orange: #fd7e14;
  --bs-yellow: #f4be0e;
  --bs-green: #22C55E;
  --bs-teal: #20c997;
  --bs-cyan: #00c3d9;
  --bs-black: #000;
  --bs-white: #fff;
  --bs-gray: #b7c2d0;
  --bs-gray-dark: #1f2b3a;
  --bs-grey-50: #F6F8FB;
  --bs-gray-100: #ebeef2;
  --bs-gray-200: #e5e9f2;
  --bs-gray-300: #dbdfea;
  --bs-gray-400: #b7c2d0;
  --bs-gray-500: #8091a7;
  --bs-gray-600: #3c4d62;
  --bs-gray-700: #344357;
  --bs-gray-800: #2b3748;
  --bs-gray-900: #1f2b3a;
  --bluegrey-100: #F2FBFC;
  --bluegrey-200: #E5F5FA;
  --bluegrey-300: #D2E9F1;
  --bluegrey-400: #C0D8E4;
  --bluegrey-500: #a6c1d3;
  --bluegrey-600: #7999B5;
  --bluegrey-700: #537497;
  --bluegrey-800: #34527A;
  --bluegrey-900: #1F3965;
  --bs-primary: #096bef;
  --primary-50: #e1edfd;
  --primary-100: #b5d3fa;
  --primary-200: #84b5f7;
  --primary-300: #5397f4;
  --primary-400: #2e81f1;
  --primary-500: #096bef;
  --primary-600: #0863ed;
  --primary-700: #0658eb;
  --primary-800: #054ee8;
  --primary-900: #023ce4;
  --secondary: #5d738f;
  --secondary-50: #e8eef9;
  --secondary-100: #c9d5e4;
  --secondary-200: #abb9cb;
  --secondary-300: #8c9cb3;
  --secondary-400: #7487a0;
  --secondary-500: #5d738f;
  --secondary-600: #50657e;
  --secondary-700: #405267;
  --secondary-800: #313f51;
  --secondary-900: #1f2b3a;
  --bs-success: #22C55E;
  --success-50: #E4F8EC;
  --success-100: #BDEECF;
  --success-200: #91E2AF;
  --success-300: #64D68E;
  --success-400: #43CE76;
  --success-500: #22C55E;
  --success-600: #1EBF56;
  --success-700: #19B84C;
  --success-800: #14B042;
  --success-900: #0CA331;
  --bs-info: #00c3d9;
  --info-50: #e0f8fa;
  --info-100: #b3edf4;
  --info-200: #80e1ec;
  --info-300: #4dd5e4;
  --info-400: #26ccdf;
  --info-500: #00c3d9;
  --info-600: #00bdd5;
  --info-700: #00b5cf;
  --info-800: #00aeca;
  --info-900: #00a1c0;
  --bs-warning: #f4be0e;
  --warning-50: #fdf8e1;
  --warning-100: #fbebb3;
  --warning-200: #f9de82;
  --warning-300: #f6d350;
  --warning-400: #f5c82a;
  --warning-500: #f4be0e;
  --warning-600: #f4b104;
  --warning-700: #f49e00;
  --warning-800: #f48e00;
  --warning-900: #f47000;
  --bs-danger: #ff5647;
  --danger-50: #ffedf0;
  --danger-100: #ffd2d7;
  --danger-200: #f3a2a3;
  --danger-300: #ec7f7f;
  --danger-400: #f8625e;
  --danger-500: #ff5647;
  --danger-600: #ef4d45;
  --danger-700: #dd433e;
  --danger-800: #d03d37;
  --danger-900: #c0342c;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
  --bs-primary-rgb: 9, 107, 239;
  --bs-secondary-rgb: #1f2b3a;
  --bs-success-rgb: 34, 197, 94;
  --bs-info-rgb: 13, 202, 240;
  --bs-warning-rgb: 255, 193, 7;
  --bs-danger-rgb: 220, 53, 69;
  --bs-light-rgb: 248, 249, 250;
  --bs-dark-rgb: 33, 37, 41;
  --bs-primary-text-emphasis: #052c65;
  --bs-secondary-text-emphasis: #2b2f32;
  --bs-success-text-emphasis: #0a3622;
  --bs-info-text-emphasis: #055160;
  --bs-warning-text-emphasis: #664d03;
  --bs-danger-text-emphasis: #ff5647;
  --bs-light-text-emphasis: #495057;
  --bs-dark-text-emphasis: #495057;
  --bs-primary-bg-subtle: #cfe2ff;
  --bs-secondary-bg-subtle: #e2e3e5;
  --bs-success-bg-subtle: #BDEECF;
  --bs-info-bg-subtle: #cff4fc;
  --bs-warning-bg-subtle: #fff3cd;
  --bs-danger-bg-subtle: #f8d7da;
  --bs-light-bg-subtle: #fcfcfd;
  --bs-dark-bg-subtle: #ced4da;
  --bs-primary-border-subtle: #9ec5fe;
  --bs-secondary-border-subtle: #c4c8cb;
  --bs-success-border-subtle: #a3cfbb;
  --bs-info-border-subtle: #9eeaf9;
  --bs-warning-border-subtle: #ffe69c;
  --bs-danger-border-subtle: #f1aeb5;
  --bs-light-border-subtle: #e9ecef;
  --bs-dark-border-subtle: #adb5bd;
  --bs-white-rgb: 255, 255, 255;
  --bs-black-rgb: 0, 0, 0;
  --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --bs-font-roboto: "Roboto", serif;
  --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
  --bs-body-font-family: var(--bs-font-roboto);
  /* --bs-body-font-size: 1rem; */
  --bs-body-font-size: 0.875rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.5;
  --bs-body-color: var(--secondary-800);
  --bs-body-color-rgb: #50657E;
  --bs-body-bg: #fff;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-emphasis-color: #000;
  --bs-emphasis-color-rgb: 0, 0, 0;
  --bs-secondary-color: rgba(33, 37, 41, 0.75);
  --bs-secondary-color-rgb: 33, 37, 41;
  --bs-secondary-bg: #e9ecef;
  --bs-secondary-bg-rgb: 233, 236, 239;
  --bs-tertiary-color: rgba(33, 37, 41, 0.5);
  --bs-tertiary-color-rgb: 33, 37, 41;
  --bs-tertiary-bg: #f8f9fa;
  --bs-tertiary-bg-rgb: 248, 249, 250;
  --bs-heading-color: inherit;
  --bs-link-color: #096bef;
  --bs-link-color-rgb: 13, 110, 253;
  --bs-link-decoration: underline;
  --bs-link-hover-color: #0a58ca;
  --bs-link-hover-color-rgb: 10, 88, 202;
  --bs-code-color: #d63384;
  --bs-highlight-color: #212529;
  --bs-highlight-bg: #fff3cd;
  --bs-border-width: 1px;
  --bs-border-style: solid;
  --bs-border-color: #A6C1D3;
  --bs-border-color-translucent: rgba(0, 0, 0, 0.175);
  --bs-border-radius: 0.375rem;
  --bs-border-radius-sm: 0.25rem;
  --bs-border-radius-lg: 0.5rem;
  --bs-border-radius-xl: 1rem;
  --bs-border-radius-xxl: 2rem;
  --bs-border-radius-2xl: var(--bs-border-radius-xxl);
  --bs-border-radius-pill: 50rem;
  --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  --bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
  --bs-focus-ring-width: 0.25rem;
  --bs-focus-ring-opacity: 0.25;
  --bs-focus-ring-color: rgba(13, 110, 253, 0.25);
  --bs-form-valid-color: #198754;
  --bs-form-valid-border-color: #198754;
  --bs-form-invalid-color: var(--bs-danger);
  --bs-form-invalid-border-color: var(--bs-danger);
  --header-height: 50px;
  --page-header: 45px;
  --footer-height: 30px;

  /* Backward Compatibility Aliases - Map old custom variables to new Bootstrap variables */
  --color-bg: var(--bs-grey-50);
  --color-surface: var(--bs-white);
  --color-border: var(--bluegrey-500);
  --color-border-subtle: var(--bs-gray-300);
  --color-primary: var(--bs-primary);
  --color-primary-soft: var(--primary-50);
  --color-text: var(--secondary-900);
  --color-text-secondary: var(--secondary-600);
  --color-muted: var(--bs-gray-500);
  --color-chip-bg: var(--primary-50);
  --color-success: var(--success-200);
}

.bg-primary-100{ background-color: var(--primary-100) !important;}
.bg-primary-200{ background-color: var(--primary-200) !important;}
.bg-primary-300{ background-color: var(--primary-300) !important;}
.bg-primary-400{ background-color: var(--primary-400) !important;}
.bg-primary-500{ background-color: var(--primary-500) !important;}
.bg-primary-600{ background-color: var(--primary-600) !important;}
.bg-primary-700{ background-color: var(--primary-700) !important;}
.bg-primary-800{ background-color: var(--primary-800) !important;}
.bg-primary-900{ background-color: var(--primary-900) !important;}

.bg-success-100{ background-color: var(--success-100) !important; }
.bg-success-200{ background-color: var(--success-200) !important; }
.bg-success-300{ background-color: var(--success-300) !important; }
.bg-success-400{ background-color: var(--success-400) !important; }
.bg-success-500{ background-color: var(--success-500) !important; }
.bg-success-600{ background-color: var(--success-600) !important; }
.bg-success-700{ background-color: var(--success-700) !important; }
.bg-success-800{ background-color: var(--success-800) !important; }
.bg-success-900{ background-color: var(--success-900) !important; }

.bg-info-100{ background-color: var(--info-100) !important;}
.bg-info-200{ background-color: var(--info-200) !important;}
.bg-info-300{ background-color: var(--info-300) !important;}
.bg-info-400{ background-color: var(--info-400) !important;}
.bg-info-500{ background-color: var(--info-500) !important;}
.bg-info-600{ background-color: var(--info-600) !important;}
.bg-info-700{ background-color: var(--info-700) !important;}
.bg-info-800{ background-color: var(--info-800) !important;}
.bg-info-900{ background-color: var(--info-900) !important;}

.bg-warning-100{ background-color: var(--warning-100) !important;}
.bg-warning-200{ background-color: var(--warning-200) !important;}
.bg-warning-300{ background-color: var(--warning-300) !important;}
.bg-warning-400{ background-color: var(--warning-400) !important;}
.bg-warning-500{ background-color: var(--warning-500) !important;}
.bg-warning-600{ background-color: var(--warning-600) !important;}
.bg-warning-700{ background-color: var(--warning-700) !important;}
.bg-warning-800{ background-color: var(--warning-800) !important;}
.bg-warning-900{ background-color: var(--warning-900) !important;}

.bg-danger-100{ background-color: var(--danger-100) !important;}
.bg-danger-200{ background-color: var(--danger-200) !important;}
.bg-danger-300{ background-color: var(--danger-300) !important;}
.bg-danger-400{ background-color: var(--danger-400) !important;}
.bg-danger-500{ background-color: var(--danger-500) !important;}
.bg-danger-600{ background-color: var(--danger-600) !important;}
.bg-danger-700{ background-color: var(--danger-700) !important;}
.bg-danger-800{ background-color: var(--danger-800) !important;}
.bg-danger-900{ background-color: var(--danger-900) !important;}

.setup-table-container{
  border: 1px solid var(--bluegrey-500);
  border-radius: 4px;
  background-color: var(--bs-white);
}

/* * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
} */

/* body {
  font-family: "Roboto", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
} */

.main-layout {
  display: flex;
  height: 100vh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.main-content-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 24px;
}

.setup-auction-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  padding-bottom: var(--setup-footer-height);
  overflow: hidden;
  box-sizing: border-box;
  /* height: calc(100vh - 134px); */
}

.main-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border); 
  position: sticky;
  top: 0;
  z-index: 99;
}

.header-top {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

/* Header Statistics Container */
.header-stats-container {
  max-height: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 12px;
  background: #F9FAFB;
  border: 1px solid var(--bs-gray-300);
  border-radius: 8px;
}

.header-stats-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-stats-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--bs-gray-500);
  text-transform: uppercase;  
}

.header-stats-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--bs-primary);
}

.header-stats-total {
  font-size: 12px;
  font-weight: 400;
  color: var(--bs-gray-500);
}

.header-stats-divider {
  width: 1px;
  height: 20px;
  background: var(--color-border-subtle);
}

@media (max-width: 768px) {
  .header-top .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
@media (max-width: 576px) {
  .header-stats-container {
    width: 100%;
    justify-content: space-between;
  }
}

.header-search-box {
  position: relative;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
}

.header-search-input {
  width: 100%;
  padding: 8px 12px 8px 38px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.header-search-input:focus {
  border-color: var(--color-primary);
}

/* Category Search Container */
.category-search-container {
  position: relative;
  width: 100%;
}

/* Category Chip Container */
.category-chip-container {
  display: flex;
  align-items: center;
  width: 100%;
}

.category-chip {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bs-gray-100);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 14px;
  transition: all 0.2s ease;
}
/* 
.category-chip:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(9, 107, 239, 0.1);
} */

.category-chip-name {
  font-weight: 500;
  color: var(--color-text);
}

.category-chip-code {
  font-size: 12px;
  color: var(--color-text-secondary);
  background: rgba(9, 107, 239, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.category-chip-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 4px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: absolute;
  right: 15px;
}

.category-chip-clear:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text);
}

.category-chip-clear:active {
  background: rgba(0, 0, 0, 0.1);
}

.category-chip-clear svg {
  width: 14px;
  height: 14px;
}

.header-add-category-btn {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.header-add-category-btn:hover {
  background: #0757c0;
}

.header-dropdown-btn {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.header-dropdown-btn:hover {
  background: #0757c0;
}

.header-bottom {
  padding: 8px 16px;
}

.new-stepper {
  gap: 12px;
}

.new-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-muted);
}

.new-step[aria-disabled="true"] {
  cursor: default;
}

.new-step.active {
  color: var(--color-primary);
  font-weight: 500;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.new-step.active .step-num {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.step-divider {
  width: 40px;
  height: 1px;
  background: var(--color-border-subtle);
}

.step-txt {
  white-space: nowrap;
}

/* New Stepper Mobile Responsive */
@media (max-width: 768px) {
  .new-stepper {
    flex-wrap: wrap;
    gap: 8px;    
  }

  .new-step {
    font-size: 11px;
    gap: 6px;
    flex: 0 0 auto;
  }

  .step-num {
    width: 20px;
    height: 20px;
    font-size: 10px;
    flex-shrink: 0;
  }

  .step-divider {
    width: 20px;
    flex-shrink: 0;
  }

  .step-txt {
    white-space: normal;
    /* font-size: 10px;
    line-height: 1.2; */
  }
}

@media (max-width: 576px) {
  .new-stepper {
    /* flex-direction: column; */
    align-items: center;
    gap: 12px;
    padding: 0;
  }

  .new-step {
    width: 100%;
    justify-content: center;
    /* max-width: 280px; */
    max-width: max-content;
  }

  .step-divider {
    width: 1px;
    height: 20px;
    transform: rotate(90deg);
  }

  .step-txt {
    font-size: 11px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  /*.new-stepper {
    gap: 10px;
  }*/

  .new-step {
    font-size: 10px;
    gap: 4px;
  }

  .step-num {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .step-txt {
    font-size: 9px;
  }

  .step-divider {
    height: 15px;
  }
}

/* ================================================
   CARD STYLES
   ================================================ */
.custom-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 9px;
  padding: 16px;
}
.card-header {
  min-height: 40px;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding:0;
  /* margin-bottom: 16px; */
}
.card-elevated {
  box-shadow: 0 2px 3px rgba(166, 193, 211, 0.25);
}
.card-heading {
  font-size: 16px;
  font-weight: 500;   
}

/* Category Search Section */
.category-search-section {
  margin-top: 0;
}

.section-subheading {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 12px;
}

.category-search-wrapper {
  max-width: 780px;
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.category-search-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon-input {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
  pointer-events: none;
  z-index: 1;
}

.category-search-input {
  width: 100%;
  padding: 10px 100px 10px 38px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 6px;
  font-size: 14px;
  color: var(--color-text);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-search-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(9, 107, 239, 0.1);
}

.category-search-input::placeholder {
  color: var(--bs-gray-400);
}

.btn-add-new {
  padding: 4px 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 6px;
  background-color: var(--bs-gray-200);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  position: absolute;
  right: 6px;
}

.btn-add-new:hover {
  background-color: var(--bs-gray-300);
  border-color: var(--bs-gray-400);
}

.btn-add-new:active {
  background-color: var(--bs-gray-400);
}

/* Category Suggestions Section */
.category-suggestions-section {
  margin-top: 24px;
  margin-bottom: 24px;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background-color: var(--primary-50);
  /* border: 1px solid var(--primary-300); */
  border: none;
  border-radius: 20px;
  color: var(--secondary-600);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.suggestion-chip:hover {
  background-color: var(--primary-100);
  border-color: var(--primary-400);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(9, 107, 239, 0.15);
}

.suggestion-chip:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(9, 107, 239, 0.1);
}

.chip-icon {
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chip-text {
  line-height: 1.5;
}

@media (max-width: 768px) {
  .category-search-wrapper {
    flex-direction: column;
  }

  /* .btn-add-new {
    width: 100%;
    justify-content: center;
  } */

  .suggestion-chips {
    gap: 6px;
  }

  .suggestion-chip {
    font-size: 13px;
    padding: 5px 12px;
  }
}

@media (max-width: 576px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;    
    justify-content: center;
    padding-bottom: 12px;
  }
}

.segment-shell {
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: #f1f5fb;
  padding: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.auction-type-option {
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--color-text);
  font-size: 14px;
  padding: 6px 18px;
  min-height: 28px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.auction-type-option.active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
}

.category-label {
  font-size: 14px;
  margin-bottom: 8px;
}

.category-toggle {
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: #f1f5fb;
  padding: 5px;
  display: inline-flex;
  gap: 2px;
  flex-wrap: wrap;
}

.category-toggle-button {
  border: none;
  border-radius: 5px;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 14px;
  min-width: 140px;
  padding: 6px 18px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.category-toggle-button.selected {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
}

.search-category-container {
  margin-top: 16px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 5px;
  padding: 5px 5px 5px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
}

.search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  color: var(--color-text);
  background: transparent;
}

.search-input::placeholder {
  color: var(--color-muted);
}

.add-new-button {
  background: #dbdfea;
  border: none;
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #344357;
  letter-spacing: 0.46px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.add-new-button:hover {
  background: #cbd5e1;
}

.suggestions-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 18px;
  margin-bottom: 8px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: none;
  border-radius: 100px;
  background: var(--color-chip-bg);
  color: var(--color-text-secondary);
  font-size: 13px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.chip-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-600);
}

.status-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  width: 100%;
  min-height: var(--setup-footer-height);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
}

.status-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
  font-size: 14px;
  letter-spacing: 0.4px;
}

.status-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.info-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--color-text-secondary);
  color: var(--color-text-secondary);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-left: auto;
  max-width: 100%;
  overflow-x: auto;
  flex-wrap: nowrap;
  padding: 2px 0;
  scrollbar-width: thin;
}

.status-actions .btn,
.status-actions .btn-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

.btn-action {
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline {
  border-color: rgba(9, 107, 239, 0.5);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-soft);
}

.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: #0757c0;
}

@media (max-width: 992px) {

  .auction-type-option,
  .category-toggle-button {
    flex: 1 1 calc(50% - 4px);
    min-width: 48%;
    text-align: center;
  }

  .category-toggle {
    width: 100%;
  }
}

@media (max-width: 768px) {

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-bar {
    padding: 8px 10px;
  }

  .status-message {
    display: none;
  }

  .status-actions {
    width: 100%;
    gap: 8px;
    justify-content: flex-start;
  }

  .progress-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .search-category-container {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-action {
    text-align: center;
  }

  .status-actions .btn,
  .status-actions .btn-action {
    width: auto;
  }
}

@media (max-width: 576px) {
  /* .status-actions {
    width: 100%;
    flex-direction: column;
  } */
}


/* Selected Category View Components */
.auction-setup-col {
  display: flex;
  gap: 12px;
  align-items: center;
}
.form-label-custom {
  font-size: 14px;
  color: var(--secondary-800);
  margin-bottom: 5px;
  display: block;
  font-weight: 500;
}

/* Search Suggestions */
.search-suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-suggestions-list.active {
  display: block;
}

.suggestion-item {
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #f1f5fb;
  transition: background 0.2s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f8fafc;
}

.suggestion-item.selected {
  background: #e3f2fd;
  border-left: 3px solid var(--color-primary);
}

.suggestion-item.selected:hover {
  background: #e3f2fd;
}

.suggestion-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}

.suggestion-code {
  font-size: 12px;
  color: var(--color-muted);
}

/* Step 1 Workspace Layout */
.step-workspace-container {
  min-height: 350px;
}


/* Offcanvas Custom Styles */
.offcanvas-custom {
  width: 650px !important;
  border-left: 1px solid var(--color-border);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
}

.offcanvas-header {
  padding: 16px 20px;
}

.offcanvas-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
}

.offcanvas-search-wrap {
  background-color: #f8fafc;
  border-bottom: 1px solid var(--color-border-subtle);
}

.configure-weightage {
  width: 100%;
  max-width: 100% !important;
}

/* Custom Table Styles */
.table-custom {
  font-size: 14px;
}

.table-custom thead th {
  background-color: #f1f5fb;
  color: var(--color-text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-custom tbody td {
  padding: 12px 20px;
  vertical-align: middle;
  color: var(--color-text);
  border-bottom: 1px solid #f1f5fb;
}

.table-custom tbody tr:hover {
  background-color: #f8fafc;
}

.search-weightage-item span{
  color: var(--bs-gray-500);
}
.search-weightage-item .form-control{
  padding-left: 35px !important;
  border-radius: 0;
  border-left: 0;
  border-right: 0;  
  color: var(--bs-gray-500);
}

.search-weightage-item .form-control::placeholder{
  color: var(--bs-gray-500);
}

/* Custom Checkbox */
.custom-checkbox .form-check-input {
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.custom-checkbox .form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Offcanvas Footer */
.offcanvas-footer {
  background-color: #ffffff;
}

@media (max-width: 768px) {
  .offcanvas-custom {
    width: 100% !important;
  }
}

/* jqGrid Styling Overrides */
/* .ui-jqgrid {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border-subtle) !important;
  font-family: inherit !important;
}

.ui-jqgrid .ui-jqgrid-hdiv {
  background-color: #f8fafc !important;
  border-bottom: 1px solid var(--color-border-subtle) !important;
}

.ui-jqgrid .ui-jqgrid-htable th {
  padding: 12px 10px !important;
  color: var(--color-text-secondary) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
}

.ui-jqgrid .ui-jqgrid-btable td {
  padding: 10px 10px !important;
  border-bottom: 1px solid #f1f5fb !important;
  font-size: 14px !important;
}

.ui-jqgrid .ui-jqgrid-pager {
  background-color: #ffffff !important;
  border-top: 1px solid var(--color-border-subtle) !important;
  height: auto !important;
  padding: 10px !important;
}

.ui-jqgrid .ui-state-highlight {
  background-color: var(--color-primary-soft) !important;
  color: var(--color-primary) !important;
} */

/* jqGrid Filter Toolbar Styling */
/* .ui-jqgrid .ui-search-toolbar th {
  padding: 5px 10px !important;
  background-color: #ffffff !important;
}

.ui-jqgrid .ui-search-toolbar input {
  height: 32px !important;
  font-size: 13px !important;
  padding: 5px 10px !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: 4px !important;
  width: 100% !important;
  outline: none !important;
  transition: border-color 0.2s ease !important;
}

.ui-jqgrid .ui-search-toolbar input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 2px var(--color-primary-soft) !important;
} */

/* --- Item Selection UI Revisions --- */
.offcanvas-custom {
  width: 900px !important;
}

/* .ui-jqgrid {
  border: none !important;
  font-family: "Roboto", sans-serif !important;
}

.ui-jqgrid .ui-jqgrid-hdiv {
  background-color: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.vendor-grid .ui-jqgrid .ui-jqgrid-htable th {
  padding: 8px 8px !important;
  color: #64748b !important;
  font-weight: 500 !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.025em !important;
  text-transform: uppercase !important;
  border-right: 1px solid #e2e8f0 !important;
}

.ui-jqgrid .ui-jqgrid-htable th:last-child {
  border-right: none !important;
}

.ui-jqgrid .ui-search-toolbar input {
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 0.875rem !important;
  color: #475569 !important;
  height: 34px !important;
  background-color: #ffffff !important;
  transition: border-color 0.2s;
}

.ui-jqgrid .ui-search-toolbar input:focus {
  border-color: #3b82f6 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.ui-jqgrid tr.ui-row-ltr td {
  padding: 12px 8px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 0.9rem !important;
  color: #475569 !important;
}

.ui-jqgrid .ui-jqgrid-btable tr.ui-state-hover td {
  background-color: #f1f7ff !important;
  color: #096bef !important;
}

.ui-jqgrid tr.ui-state-highlight td {
  background-color: #fdfdfd !important;
  color: #096bef !important;
}

.ui-jqgrid .ui-jqgrid-pager {
  border-top: 1px solid #e2e8f0 !important;
  background-color: #ffffff !important;
  padding: 8px !important;
}

.cbox {
  width: 18px !important;
  height: 18px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
}

#jqgh_jqGrid_rn {
  text-align: left !important;
} */

/* Items and Vendor Selection View */

/* ================================================
   NEW ITEM & VENDOR SELECT PANELS
   ================================================ */
   #vendorSelectTablePager .table tr td {
    background: var(--bs-grey-50);
  }

  #vendorSelectTablePager .ui-pg-table .form-control,
  #vendorSelectTablePager select.ui-pg-selbox.form-control {
    background: var(--bs-grey-50);
  }

  /* Ensure Records per Page select is visible (same as Ongoing Auction grid) */
  #vendorSelectTablePager select.ui-pg-selbox {
    display: block !important;
    min-width: 45px;
    visibility: visible;
  }

  #vendorSelectTable .checkbox {
    width: 16px;
    height: 16px;
    border: 1px solid var(--secondary-600);
    border-radius: 4px;    
  }

  #pg_vendorSelectTablePager .table tbody tr td {
    height: 36px;
  }

.select-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.select-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:4px 12px;
  border-bottom: 1px solid var(--color-border-subtle);
  background: var(--bs-grey-50);
}

.select-panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  text-transform: uppercase;  
}

.select-panel-actions {
  display: flex;
  align-items: center;
  gap:0;
}

.panel-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.panel-action-btn:hover {
  background: var(--bs-gray-200);
  color: var(--color-text);
}

.panel-action-btn .material-symbols-outlined {
  font-size: 20px;
}

.action-badge {
  position: absolute;
  top: 0;
  right:0;
  /* top: -4px;
  right: -4px; */
  background-color: var(--bs-danger);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4; 
}

/* .ui-jqgrid .select-vendor-table td{
  white-space: inherit;
} */

.select-panel-search {
  position: relative;
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.search-icon-panel {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
  pointer-events: none;
  z-index: 1;
}

.select-panel-search-input {
  width: 100%;
  padding: 4px 12px 4px 38px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 6px;
  font-size: 14px;
  color: var(--color-text);
  background-color: var(--bs-gray-100);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select-panel-search-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(9, 107, 239, 0.1);
}

.select-panel-search-input::placeholder {
  color: var(--bs-gray-400);
}

/* Column Filters for Vendor Panel */
.select-panel-filters {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-border-subtle);
  background: var(--bs-grey-50);
}

.filter-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 4px;
  font-size: 12px;
  color: var(--color-text);
  background-color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease;
}

.filter-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 2px rgba(9, 107, 239, 0.1);
}

.filter-input::placeholder {
  color: var(--bs-gray-400);
  font-size: 12px;
}

/* Table Container */
.select-panel-table-container {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
}

.vendor-panel-table-container {
  flex: 1;
  min-height: 330px;
  max-height: 420px;
  overflow: auto;
}

.select-panel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.select-panel-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bs-gray-100);
}

.select-panel-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--color-border-subtle);
  white-space: nowrap;
}

.select-panel-table tbody td {
  padding: 6px;
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--color-text);
  vertical-align: middle;
}

.select-panel-table tbody tr:hover {
  background-color: var(--bs-grey-50);
}

/* .select-panel-table tbody tr:last-child td {
  border-bottom: none;
} */

/* Table Column Widths */
.select-panel-table .col-sr {
  width: 50px;
  text-align: center;
}

.select-panel-table .col-checkbox {
  width: 40px;
  text-align: center;
}

.select-panel-table .col-checkbox [type="checkbox"]{
  width: 16px;
  height: 16px;
  border: 1px solid var(--secondary-600);
  border-radius: 4px;
  cursor: pointer;  
}
.select-panel-table .col-item-name {
  width: auto;
}

.select-panel-table .col-vendor-name {
  width: 200px;
  min-width: 200px;
}

.select-panel-table .col-vendor-status {
  width: 150px;
  min-width: 150px;
}

.select-panel-table .col-country {
  width: 120px;
  min-width: 120px;
}

.select-panel-table .col-industry {
  width: 120px;
  min-width: 120px;
}

/* Item Row Styles */
.item-row-info {
  display: flex;
  flex-direction: column;
  width: calc(100% - 52px);  
  flex: 1;
}

.item-name {
  font-weight: 500;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.4;
}

.item-code {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.item-unit-tag {
  display: inline-block;
  padding: 3px 10px;
  background-color: var(--bs-grey-50);
  border: 1px solid var(--bs-gray-300);
  color: var(--bs-gray-700);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

/* Editable quantity next to each item in the selection table */
.item-qty-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px 2px 10px;
  background-color: var(--bs-grey-50);
  border: 1px solid var(--bs-gray-300);
  border-radius: 4px;
  margin-left: auto;
  margin-bottom: 0;
  flex-shrink: 0;
  cursor: text;
}

.item-qty-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--bs-gray-700);
  white-space: nowrap;
}

.item-qty-input {
  width: 72px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--bs-gray-900, #212529);
  outline: none;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}

.item-qty-input::-webkit-outer-spin-button,
.item-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.item-qty-field:focus-within {
  border-color: var(--bs-primary, #0d6efd);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.12);
}

/* Vendor Row Styles */
.vendor-row-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vendor-avatar-new {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-400);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 12px;
  flex-shrink: 0;
}

.vendor-info-new {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.vendor-name-new {
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary-600);
  line-height: 1.4;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vendor-code-new {
  font-size: 12px;
  color: var(--secondary-500);
  line-height: 1.4;
}

.vendor-action-btn {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(26, 110, 120, .16);
  border-radius: 10px;
  background: rgba(240, 253, 250, .86);
  color: #0f766e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}

.vendor-action-btn:hover {
  background: rgba(204, 251, 241, .95);
  color: #0f766e;
}

.vendor-action-btn .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.status-tags-container-new {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.status-tag-new {
  display: inline-block;
  padding: 3px 8px;
  background-color: var(--bs-gray-200);
  color: var(--bs-gray-700);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  min-width: 20px;
  text-align: center;
}

/* Pagination Footer */
.select-panel-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--bs-grey-50);
}

.pagination-info {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.pagination-info span {
  font-weight: 600;
  color: var(--color-text);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .items-vendor-container {
    flex-direction: column;
  }

  .select-panel {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .select-panel-header {
    padding: 10px 12px;
  }

  .select-panel-title {
    font-size: 12px;
  }

  .panel-action-btn {
    width: 28px;
    height: 28px;
  }

  .panel-action-btn .material-symbols-outlined {
    font-size: 18px;
  }

  .select-panel-search {
    padding: 10px 12px;
  }

  .select-panel-filters {
    flex-direction: column;
    padding: 8px 12px;
  }

  .filter-input {
    width: 100%;
  }

  .select-panel-table-container {
    max-height: 400px;
  }

  .select-panel-table thead th,
  .select-panel-table tbody td {
    padding: 8px 10px;
    font-size: 13px;
  }

  .select-panel-table .col-vendor-name,
  .select-panel-table .col-vendor-status,
  .select-panel-table .col-country,
  .select-panel-table .col-industry {
    min-width: 120px;
  }
}

.vendor-search-wrap {
  position: relative;
  width: 100%;
}

#vendorSearchSection {
  display: flex;
  align-items: center;
}

#vendorSearchSection.d-none {
  display: none !important;
}

.vendor-header-actions {
  flex-shrink: 0;
}

.vendor-badge-container {
  position: relative;
  cursor: pointer;
}

.vendor-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--bs-danger);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

#vendorBadgeCount {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}

#vendorBadgeCount[style*="display: none"] {
  display: none !important;
}

#showSelectedVendorsBtn.active .material-symbols-outlined,
#vendorListBtn.active .material-symbols-outlined,
#itemListBtn.active .material-symbols-outlined {
  color: var(--bs-primary) !important;
}

.btn-menu-icon {
  background: transparent;
  border: none;
  color: var(--bs-gray-600);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-menu-icon:hover {
  color: var(--bs-primary);
}

.btn-menu-icon.dropdown-toggle::after {
  display: none;
}

.items-panel-actions .dropdown-menu {
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--color-border-subtle);
  border-radius: 6px;
  padding: 4px 0;
  margin-top: 4px;
}

.items-panel-actions .dropdown-item {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--color-text);
  transition: background-color 0.2s ease;
}

.items-panel-actions .dropdown-item:hover {
  background-color: var(--color-primary-soft);
  color: var(--bs-primary);
}

.items-vendor-container {
  min-height: 400px;
}

/* Selected Items Panel */
.selected-items-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 0;
  padding: 0;
  /* max-height: 600px;
  overflow-y: auto; */
}

.items-panel-header {
  background: var(--bs-gray-200);
  height: 40px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border-subtle);
}

.items-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.selected-items-list {
  padding: 0;
  overflow-y: auto;
  max-height: calc(600px - 40px);
}

.selected-item-row {
  padding: 12px;
  border-bottom: 1px solid #f1f5fb;
  transition: background-color 0.2s ease;
}

.selected-item-row:last-child {
  border-bottom: none;
}

.selected-item-row:hover {
  background-color: #f8fafc;
}

.selected-item-row .form-check {
  margin: 0;
}

.selected-item-row .form-check-input {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  margin-top: 2px;
}

.selected-item-row .form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.selected-item-row .form-check-label {
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  margin-left: 8px;
  line-height: 1.5;
}

/* Vendor Selection Panel */
.vendor-selection-panel {
  background: var(--color-surface);
}

.vendor-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bs-gray-200);
  height: 40px;
  padding: 0 15px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border-subtle);
}

.search-icon-sm {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #50657e;
}


.vendor-grid-container {
  width: 100%;
}


/* Vendor Grid Custom Styles */
#vendorGrid {
  width: 100% !important;
  border: none !important;
}

.ui-jqgrid-btable #vendorGrid tr td {
  padding: 12px 8px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f1f5fb !important;
}

.ui-jqgrid #vendorGrid .ui-jqgrid-hdiv {
  background-color: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.ui-jqgrid #vendorGrid .ui-jqgrid-htable th {
  padding: 12px 8px !important;
  color: #64748b !important;
  font-weight: 500 !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.025em !important;
  text-transform: uppercase !important;
  border-right: 1px solid #e2e8f0 !important;
  background-color: #f8fafc !important;
}

.ui-jqgrid #vendorGrid .ui-jqgrid-htable th:last-child {
  border-right: none !important;
}

.ui-jqgrid #vendorGrid tr.ui-row-ltr td {
  padding: 4px 8px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 0.9rem !important;
  color: #475569 !important;
  white-space: normal;
  vertical-align: middle !important;
}

.ui-jqgrid #vendorGrid .ui-jqgrid-btable tr.ui-state-hover td {
  background-color: #f1f7ff !important;
  color: #096bef !important;
}

.ui-jqgrid #vendorGrid tr.ui-state-highlight td {
  background-color: #fdfdfd !important;
  color: #096bef !important;
}

.ui-jqgrid #vendorGrid .ui-jqgrid-pager {
  border-top: 1px solid #e2e8f0 !important;
  background-color: #ffffff !important;
  padding: 8px !important;
}

.vendor-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bs-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 12px;
  flex-shrink: 0;
}

.vendor-info {
  display: flex;
  flex-direction: column;
}

.vendor-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
}

.vendor-code {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.4;
}

.status-tags-container {
  display: flex;
  flex-direction: row;
  gap: 4px;
  align-items: flex-start;
}

.status-tag {
  display: inline-block;
  padding: 4px 10px;
  background-color: var(--bs-gray-200);
  color: var(--bs-gray-700);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  min-width: 28px;
  text-align: center;
}

/* Vendor Grid Header Filter Inputs */
#vendorGrid .ui-search-toolbar input {
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
  font-size: 0.875rem !important;
  color: #475569 !important;
  height: 34px !important;
  background-color: #ffffff !important;
}

#vendorGrid .ui-search-toolbar input:focus {
  border-color: #3b82f6 !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

/* Vendor Grid Checkbox Styling */
#vendorGrid .cbox {
  width: 18px !important;
  height: 18px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
}

#vendorGrid .cbox:checked {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

/* Vendor Grid Row Numbers */
#vendorGrid .ui-jqgrid-rownum {
  text-align: left !important;
  padding-left: 8px !important;
  color: var(--bs-gray-600) !important;
  font-size: 0.875rem !important;
}

/* =========================
   Icon Button – Improved
   ========================= */

.icon-button {
  --icon-btn-size: 40px;
  --icon-btn-radius: 8px;
  --icon-btn-bg: transparent;
  --icon-btn-bg-hover: var(--secondary-50);
  --icon-btn-color: var(--secondary-600);
  --icon-btn-color-hover: var(--secondary-700);

  appearance: none;
  border: none;
  background: var(--icon-btn-bg);
  color: var(--icon-btn-color);
  font: inherit;
  text-decoration: none;

  width: var(--icon-btn-size);
  height: var(--icon-btn-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  border-radius: var(--icon-btn-radius);
  cursor: pointer;

  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.12s ease,
    box-shadow 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
} */

/* Icon sizing */
/* .icon-button i,
.icon-button .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
} */

/* Hover & focus */
/* .icon-button:hover {
  background-color: var(--icon-btn-bg-hover);
  color: var(--icon-btn-color-hover);
}

.icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 107, 239, 0.25);
} */

/* Active feedback */
/* .icon-button:active {
  transform: scale(0.96);
} */

/* Disabled */
/* .icon-button:disabled,
.icon-button.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* =========================
   Shape Variants
   ========================= */

.icon-button-circle {
  border-radius: 50%;
}

/* =========================
   Size Variants
   ========================= */

.icon-btn-xs {
  --icon-btn-size: 24px;
}

.icon-btn-sm {
  --icon-btn-size: 28px;
}

.icon-btn-md {
  --icon-btn-size: 36px;
}

.icon-btn-lg {
  --icon-btn-size: 44px;
}

/* =========================
   Color Variants
   ========================= */

.icon-btn-primary {
  --icon-btn-color: var(--primary-600);
  --icon-btn-color-hover: var(--primary-700);
  --icon-btn-bg-hover: var(--primary-50);
}

.icon-btn-danger {
  --icon-btn-color: var(--danger-600);
  --icon-btn-color-hover: var(--danger-700);
  --icon-btn-bg-hover: var(--danger-50);
}

.icon-btn-success {
  --icon-btn-color: var(--success-600);
  --icon-btn-color-hover: var(--success-700);
  --icon-btn-bg-hover: var(--success-50);
}

.icon-btn-white {
  --icon-btn-color: var(--bs-white);
  --icon-btn-color-hover: var(--bs-white);
  --icon-btn-bg-hover: rgba(255, 255, 255, 0.12);
}

/* =========================
   Icon + Text Button
   ========================= */

/* .icon-text-button {
  padding: 0 12px;
  width: auto;
  min-width: unset;
  gap: 8px;
} */


/* Responsive adjustments */
@media (max-width: 992px) {
  .items-vendor-container {
    flex-direction: column;
  }

  .selected-items-panel,
  .vendor-selection-panel {
    width: 100%;
    margin-bottom: 15px;
  }

  .items-vendor-header {
    flex-wrap: wrap;
  }

  .vendor-search-wrap {
    max-width: 100%;
    width: 100%;
    margin-top: 12px;
  }
}

/* Item Selection Workspace Mobile Responsive */
@media (max-width: 768px) {


  .items-vendor-container {
    flex-direction: column;
    gap: 16px;
  }

  .selected-items-panel,
  .vendor-selection-panel {
    width: 100%;
  }

  .items-panel-header {
    padding: 0 12px;
    height: auto;
    min-height: 40px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .items-panel-icon {
    flex: 1;
    min-width: 0;
  }

  .items-count {
    font-size: 12px;
  }

  .items-panel-icon .material-symbols-outlined {
    font-size: 20px !important;
  }

  .vendor-selection-header {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 12px;
    height: auto;
    min-height: 40px;
    gap: 8px;
  }

  .vendor-search-wrap {
    max-width: 100%;
    width: 100%;
    margin-top: 0;
  }

  #vendorSearchSection {
    width: 100%;
  }

  .vendor-selection-actions {
    justify-content: flex-end;
    width: 100%;
  }

  .selected-items-list {
    max-height: 300px;
  }

  .empty-cart-state {
    padding: 30px 15px !important;
  }

  .empty-cart-icon svg {
    width: 50px;
    height: 50px;
  }

  .empty-state-text {
    font-size: 14px;
  }

  .empty-state-cta {
    font-size: 11px;
  }
}

@media (max-width: 576px) {


  .items-panel-header {
    padding: 8px 10px;
  }

  .items-count {
    font-size: 11px;
  }

  .items-panel-icon .material-symbols-outlined {
    font-size: 18px !important;
  }

  .vendor-selection-header {
    padding: 8px 10px;
  }

  .selected-item-row {
    padding: 10px;
  }

  .selected-item-row .form-check-label {
    font-size: 13px;
  }


  .empty-state-text {
    font-size: 13px;
  }

  .empty-state-cta {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .item-selection-workspace {
    padding: 8px !important;
  }

  .items-panel-header,
  .vendor-selection-header {
    padding: 6px 8px;
  }

  .items-count {
    font-size: 10px;
  }

  .selected-item-row {
    padding: 8px;
  }

  .selected-item-row .form-check-label {
    font-size: 12px;
  }
}

/* ================================================
   STEP 2: Setup Template Fields Styles
   ================================================ */

/* Form Input Custom */
.form-input-custom {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-text);
  border: 1px solid var(--bluegrey-500);
  border-radius: 6px;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input-custom:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(9, 107, 239, 0.1);
}

.form-input-custom::placeholder {
  color: var(--bs-gray-400);
}

/* Form Textarea Custom */
.form-textarea-custom {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-text);
  border: 1px solid var(--bluegrey-500);
  border-radius: 6px;
  background-color: #ffffff;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea-custom:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(9, 107, 239, 0.1);
}

.form-textarea-custom::placeholder {
  color: var(--bs-gray-400);
}

/* Attachment Fieldset */
.attachment-fieldset {
  border: 1px solid var(--bluegrey-500);
  border-radius: 6px;
  padding: 5px 14px;
  margin: 0;
  background-color: #ffffff;
}

.attachment-fieldset legend {
  font-size: 12px;
  color: var(--bs-gray-500);
  padding: 0 6px;
  margin-left: -6px;
  width: auto;
  float: none;
  line-height: 1;
}

.attachment-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--bs-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-upload:hover {
  background-color: #0757c0;
}

.btn-upload .material-symbols-outlined {
  font-size: 18px;
}

.file-count {
  font-size: 13px;
  color: var(--bs-gray-500);
}

/* Template Table Styles */
.template-table-container {
  overflow-x: auto;
  border: 1px solid var(--bluegrey-400);
  border-radius: 8px;
}

.template-table {
  width: 100%;
  /* border-collapse: collapse;
  min-width: 1100px; */
}

.template-table thead {
  /* background-color: var(--bs-grey-50);
  border-bottom: 2px solid var(--bluegrey-400); */
}

.template-table thead th {
  padding: 12px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bs-gray-600);
  text-transform: uppercase;
  /* letter-spacing: 0.5px; */
  text-align: left;
  white-space: nowrap;
  /* border-right: 1px solid var(--bluegrey-300); */
}

.template-table thead th:last-child {
  border-right: none;
}

.template-table .th-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-table .th-content .form-check-input {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

/* .template-table tbody tr {
  border-bottom: 1px solid var(--bs-gray-200);
  transition: background-color 0.15s ease;
}

.template-table tbody tr:hover {
  background-color: var(--bs-grey-50);
} */

/* .template-table tbody tr:last-child {
  border-bottom: none;
} */

/* .template-table tbody td {
  padding: 10px;
  font-size: 14px;
  color: var(--color-text);
  vertical-align: middle;
  border-right: 1px solid var(--bs-gray-200);
} */

.template-table tbody td:last-child {
  border-right: none;
}

/* Table Column Widths */
.template-table .col-item {  
  width: 380px;
}

.template-table .col-code {
  width: 200px;
}

/* Sticky Columns for ITEM and ITEM CODE */
.template-table thead th.col-item,
.template-table thead th:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 15;
  background-color: var(--bs-grey-50);
}

.template-table thead th.col-code,
.template-table thead th:nth-child(2) {
  position: sticky;
  left: 380px;
  z-index: 15;
  background-color: var(--bs-grey-50);
}

.template-table tbody td.col-item,
.template-table tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: #ffffff;
}

.template-table tbody td.col-code,
.template-table tbody td:nth-child(2) {
  position: sticky;
  left: 380px;
  z-index: 5;
  background-color: #ffffff;
}

/* Ensure sticky columns maintain background on hover */
/* .template-table tbody tr:hover td.col-item,
.template-table tbody tr:hover td.col-code,
.template-table tbody tr:hover td:nth-child(1),
.template-table tbody tr:hover td:nth-child(2) {
  background-color: var(--bs-grey-50) !important;
} */

/* Ensure sticky columns maintain background when row is selected or active */
/* .template-table tbody tr.active td.col-item,
.template-table tbody tr.active td.col-code,
.template-table tbody tr.active td:nth-child(1),
.template-table tbody tr.active td:nth-child(2),
.template-table tbody tr.selected td.col-item,
.template-table tbody tr.selected td.col-code,
.template-table tbody tr.selected td:nth-child(1),
.template-table tbody tr.selected td:nth-child(2) {
  background-color: var(--bs-grey-50) !important;
} */

.template-table .col-gst {  
  width: 150px;
}

.template-table .col-gst {  
  width: 150px;
}

.template-table .col-transition {  
  width: 175px;
}

.template-table .col-hsn {  
  width: 100px;
}

.template-table .col-cess {  
  width: 215px;
}

.template-table .col-requ {  
  width: 150px;
}

/* Item Cell with Expand Icon */
.template-table .item-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}

.item-expand-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--bs-gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.item-expand-btn:hover {
  color: var(--bs-primary);
}

.item-expand-btn .material-symbols-outlined {
  font-size: 18px;
}

.template-table .item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  padding: 0 6px;
  background-color: var(--bs-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 500;
  border-radius: 10px;
  left: 65%;
  position: absolute;
  top: 0;
}

.template-table .item-name {
  color: var(--secondary-600);
  font-weight: 500;
  flex: 1;
}

/* Table Cell Inputs */
.table-select {
  width: 100%;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
  color: var(--color-text);
  border: 1px solid var(--bluegrey-400);
  border-radius: 5px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23344357' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
  appearance: none;
  cursor: pointer;
}

.table-select:focus {
  outline: none;
  border-color: var(--bs-primary);
}

.table-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--color-text);
  border: 1px solid var(--bluegrey-400);
  border-radius: 5px;
  background-color: #ffffff;
}

.table-input:focus {
  outline: none;
  border-color: var(--bs-primary);
}

.btn-hsn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--bs-gray-600);
  background-color: #ffffff;
  border: 1px solid var(--bluegrey-400);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-hsn:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

/* Currency Cell */
.currency-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--color-text);
  font-weight: 500;
}

.currency-symbol {
  color: var(--bs-gray-500);
}

/* Stepper Completed State */
.new-step.completed .step-num {
  background: var(--bs-success);
  color: #ffffff;
  border-color: var(--bs-success);
}

.new-step.completed {
  color: var(--bs-success);
}

/* Step 2 Responsive */
@media (max-width: 992px) {
  .template-table-container {
    margin: 0 -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .attachment-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .template-table .col-item {
    min-width: 200px;
  }
  
  /* Update sticky left position for mobile */
  .template-table thead th.col-code,
  .template-table thead th:nth-child(2),
  .template-table tbody td.col-code,
  .template-table tbody td:nth-child(2) {
    left: 200px;
  }
}

/* ================================================
   STEP 3: Setup Auction Dates & Rules Styles
   ================================================ */

/* Auction Info Row */
.auction-info-row {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--bs-gray-300);
  margin-bottom: 16px;
}

.auction-info-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 300px;
}

.auction-info-label {
  font-size: 14px;
  color: var(--bs-gray-500);
  font-weight: 400;
}

.auction-info-value {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 400;
}

.text-input-field .form-control, .text-input-field .form-select {
  max-width: 300px;
}

/* Form Rows */
.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.form-field-label {
  /* width: 300px; */
  display: flex;
  align-items: center;
  min-height: 35px;
}

.form-field-label .form-label-custom {
  margin-bottom: 0;
  font-weight: 500;
}

.required-asterisk {
  color: var(--bs-danger);
  margin-left: 2px;
}

/* Radio Group */
.radio-group-container {
  flex: 1;
}

.radio-group {
  display: flex;
  gap: 24px;
  align-items: center;
  min-height: 42px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-radio {
  width: 20px;
  height: 20px;
  border: 2px solid var(--bs-gray-400);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  appearance: none;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.form-radio:checked {
  border-color: var(--bs-primary);
  background-color: #ffffff;
}

.form-radio:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--bs-primary);
}

.form-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--bs-gray-400);
  border-radius: 4px;
  cursor: pointer;
  appearance: none;
  background-color: #ffffff;
  transition: all 0.2s ease;
  position: relative;
}

.form-checkbox:checked {
  border-color: var(--bs-primary);
  background-color: var(--bs-primary);
}

.form-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
}

.radio-label,
.checkbox-label {
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}
/* DateTime Fields */
.datetime-group {
  display: flex;
  gap: 16px;
  flex: 1;
}

.datetime-group.single {
  max-width: 300px;
}

.datetime-field {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.form-datetime-input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  font-size: 16px;
  color: var(--color-text);
  border: 1px solid var(--bluegrey-500);
  border-radius: 8px;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
}

.form-datetime-input[readonly] {
  background-color: #ffffff;
  cursor: pointer;
}

.form-datetime-input:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(9, 107, 239, 0.1);
}

.form-datetime-input::placeholder {
  color: rgba(0, 0, 0, 0.38);
  font-size: 16px;
}

.datetime-group .datetime-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-secondary);
  pointer-events: none;
  display: flex;
}

/* .datetime-icon .material-symbols-outlined {
  font-size: 20px;
} */

/* .datetime-field .form-control[readonly] {
  height: 42px;
  border: 1px solid #c9d3df;
  border-radius: 10px;
  padding: 10px 40px 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.datetime-field .form-control[readonly]:hover {
  border-color: #8aa5c4;
  background-color: #f8fbff;
}

.datetime-field .form-control[readonly]:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(9, 107, 239, 0.14);
  background-color: #ffffff;
} */

/* Daterangepicker popup UI refinements */
.daterangepicker {
  border: 1px solid #d7e1ec;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  padding: 10px;
  font-family: 'Roboto', sans-serif;
}

.daterangepicker .drp-calendar.left {
  padding: 0;
}

.daterangepicker .calendar-table {
  border: none;
  background: transparent;
}

.daterangepicker .calendar-table table {
  border-collapse: separate;
  border-spacing: 4px;
}

.daterangepicker th.month {
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.daterangepicker th,
.daterangepicker td {
  min-width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 8px;
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
  background: #e8f1ff;
  color: #0b5ed7;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background: var(--bs-primary);
  color: #ffffff;
}

.daterangepicker td.in-range {
  background: #eef5ff;
  color: #1f2937;
}

.daterangepicker .drp-buttons {
  border-top: 1px solid #e6edf5;
  padding-top: 10px;
  padding-bottom: 0;
  /* margin-top: 8px; */
}

.daterangepicker .drp-buttons .btn {
  font-size: 14px;
  font-weight: 500;
  /* border-radius: 8px;  
  font-weight: 600;
  padding: 6px 14px; */
}

.daterangepicker .drp-selected {
  color: #475569;
  font-size: 12px;
}

.daterangepicker select.monthselect,
.daterangepicker select.yearselect,
.daterangepicker select.hourselect,
.daterangepicker select.minuteselect,
.daterangepicker select.secondselect,
.daterangepicker select.ampmselect {
  border: 1px solid #d4dde8;
  border-radius: 6px;
  padding: 3px 6px;
  color: #1f2937;
  background-color: #fff;
}

/* Better readability for hour/minute selectors inside datepicker */
.daterangepicker .calendar-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fbff;
}

.daterangepicker .calendar-time select.hourselect,
.daterangepicker .calendar-time select.minuteselect,
.daterangepicker .calendar-time select.secondselect,
.daterangepicker .calendar-time select.ampmselect {
  width: 100%;
  height: 34px;
  padding: 4px 28px 4px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #0f172a;
  background-color: #ffffff;
}

/* Custom time dropdown: keep input view same, render menu in separate div */
.daterangepicker .calendar-time select.drp-native-time-select {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none !important;
}

.daterangepicker .calendar-time .drp-time-select-wrap {
  position: relative;
  width: 100%;
}

.daterangepicker .calendar-time .drp-time-toggle {
  width: 100%;
  height: 34px;
  padding: 4px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.daterangepicker .drp-time-menu-portal {
  display: none;
  position: absolute;
  z-index: 60;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  padding: 4px;
}

.daterangepicker .drp-time-menu-portal.open {
  display: block;
}

.daterangepicker .drp-time-menu-portal .drp-time-item {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  padding: 4px 8px;
  cursor: pointer;
}

.daterangepicker .drp-time-menu-portal .drp-time-item:hover {
  background: #e8f1ff;
}

.daterangepicker .drp-time-menu-portal .drp-time-item.selected {
  background: #dbeafe;
  color: #1d4ed8;
}

.daterangepicker .drp-time-menu-portal .drp-time-item.disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.daterangepicker .calendar-time select.drp-native-time-select {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none !important;
}

.daterangepicker .calendar-time .drp-time-select-wrap {
  position: relative;
  width: 100%;
}

.daterangepicker .calendar-time .drp-time-toggle {
  width: 100%;
  height: 34px;
  padding: 4px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.daterangepicker .drp-time-menu-portal {
  display: none;
  position: absolute;
  z-index: 50;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  padding: 4px;
}

.daterangepicker .drp-time-menu-portal.open {
  display: block;
}

.daterangepicker .drp-time-menu-portal .drp-time-item {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  text-align: left;
  padding: 4px 8px;
  cursor: pointer;
}

.daterangepicker .drp-time-menu-portal .drp-time-item:hover {
  background: #e8f1ff;
}

.daterangepicker .drp-time-menu-portal .drp-time-item.selected {
  background: #dbeafe;
  color: #1d4ed8;
}

.daterangepicker .drp-time-menu-portal .drp-time-item.disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.daterangepicker .calendar-time select.hourselect:focus,
.daterangepicker .calendar-time select.minuteselect:focus,
.daterangepicker .calendar-time select.secondselect:focus,
.daterangepicker .calendar-time select.ampmselect:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.daterangepicker .calendar-time .drp-time-toggle .drp-time-caret.material-icons-outlined {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

/* Keep month/year style subtle while making time controls prominent */
.daterangepicker select.monthselect,
.daterangepicker select.yearselect {
  height: 30px;
  font-size: 12px;
  font-weight: 500;
}

/* File Upload Group */
.file-upload-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-upload-spec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--bs-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  /* letter-spacing: 0.46px; */
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-upload-spec:hover {
  background-color: #0757c0;
}

.btn-upload-spec .material-symbols-outlined {
  font-size: 20px;
}

/* Exchange Rates Group */
.exchange-rates-group {
  display: flex;
  align-items: center;
}

.btn-exchange-rates {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--bs-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  /* letter-spacing: 0.46px; */
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-exchange-rates:hover {
  background-color: #0757c0;
}

/* Step 3 Responsive */
@media (max-width: 992px) {
  .auction-info-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .auction-info-field {
    width: 100%;
  }
  
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-field-label {
    width: 100%;
    min-height: auto;
  }
  
  .datetime-group {
    flex-direction: column;
  }
  
  .datetime-field {
    max-width: 100%;
  }
  
  .radio-group {
    /* flex-direction: column;
    align-items: flex-start; */
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .datetime-group {
    gap: 12px;
  }

  .daterangepicker {
    width: min(96vw, 360px);
    left: 50% !important;
    transform: translateX(-50%);
  }
  
  .daterangepicker .calendar {
    max-width: 100%;
  }
  
  .file-upload-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ================================================
   AUCTION RULES STYLES
   ================================================ */

/* Weighted Bid Section */
.weighted-bid-section {
  background-color: #f1f5f9;
  border: 1px solid var(--bluegrey-500);
  border-radius: 5px;
  padding: 15px;
  margin-top: 10px;
}

/* Form Switch Sizes 
   Usage:
   - Small: <div class="form-check form-switch form-switch-sm">
   - Medium: <div class="form-check form-switch form-switch-md"> (or default)
   - Large: <div class="form-check form-switch form-switch-lg">
*/

/* Small Switch */
.form-switch.switch-sm .form-check-input {
  width: 32px;
  height: 18px;
  border-radius: 9px;
}

.form-switch.switch-sm {
  padding-left: 2.5rem;
  min-height: 1.25rem;
}

.form-switch.switch-sm .form-check-input {
  margin-left: -2.5rem;
}

/* Medium Switch (Default) */
.form-switch.switch-md .form-check-input {
  width: 42px;
  height: 24px;
  border-radius: 12px;
  margin: 0;
}

.form-switch.switch-md {
  padding-left: 0;
  min-height: 1.5rem;
}

/* .form-switch.switch-md .form-check-input {
  margin-left: -3rem;
} */

/* Large Switch */
.form-switch.switch-lg .form-check-input {
  width: 54px;
  height: 30px;
  border-radius: 15px;
}

.form-switch.switch-lg {
  padding-left: 3.75rem;
  min-height: 1.875rem;
}

.form-switch.switch-lg .form-check-input {
  margin-left: -3.75rem;
}

/* Switch Labels for Different Sizes */
.form-switch.switch-sm .form-check-label {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.form-switch.switch-md .form-check-label {
  font-size: 1rem;
  line-height: 1.5rem;
}

.form-switch.switch-lg .form-check-label {
  font-size: 1.125rem;
  line-height: 1.875rem;
}


/* Configure Weightage Button */
.btn-configure-weightage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background-color: #ffffff;
  color: var(--bs-primary);
  border: 1px solid rgba(9, 107, 239, 0.5);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.46px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
}

.btn-configure-weightage:hover {
  background-color: var(--primary-50);
  border-color: var(--bs-primary);
}

.btn-configure-weightage .material-symbols-outlined {
  font-size: 16px;
}

/* Auction Rules Responsive */
@media (max-width: 992px) {
  .toggle-button-group {
    width: 100%;
  }
  
  .weighted-bid-section .row {
    margin-bottom: 12px;
  }
}

/* ================================================
   DISPLAY & VISIBILITY STYLES
   ================================================ */

/* Rank Configuration Section */
.rank-config-section {
  background-color: #f8fafc;
  border: 1px solid var(--bluegrey-500);
  border-radius: 5px;
  padding: 15px;
  margin: 10px 0;
}

/* Chat Participants Select */
.chat-participants-select {
  width: 246px;
}


/* Disabled Switch Styling */
.form-switch .form-check-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-switch .form-check-input:disabled:not(:checked) {
  background-color: #6c757d;
  opacity: 0.5;
}

.form-switch .form-check-input:disabled:checked {
  background-color: var(--bs-primary);
  opacity: 0.5;
}

/* Lock Icon Styling */
.text-muted {
  color: var(--bs-gray-500) !important;
}

/* Display & Visibility Responsive */
@media (max-width: 992px) {
  .rank-config-section {
    margin: 10px -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .chat-participants-select {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 768px) {
  .rank-config-section .row {
    margin-bottom: 12px;
  }
}

@media (max-width: 768px) {
  .toggle-btn {
    font-size: 13px;
    padding: 8px 12px;
  }
  
  .btn-configure-weightage {
    font-size: 12px;
    padding: 6px 8px;
  }
}

/* ================================================
   TRAFFIC LIGHT BIDDING STYLES
   ================================================ */

/* Traffic Light Toggle Button Group */
.custom-toggle-btn {
  display: flex;
  background-color: #F1F5F9;
  border: 1px solid var(--bs-gray-300);
  border-radius: 5px;
  padding: 5px;
  gap: 10px;
}

.custom-toggle-btn .btn-check {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

.custom-toggle-btn .btn {
  flex: 1;
  border: none;
  background-color: transparent;
  color: #000;
  font-size: 14px;
  padding: 4px 16px;
  border-radius: 5px !important;
  transition: all 0.2s ease;
  min-width: 160px;
}

.custom-toggle-btn .btn-check:checked + .btn {
  background-color: var(--primary-500);
  box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.15);
  color: var(--bs-white);
}

.custom-toggle-btn .btn:hover {
  background-color:var(--primary-500);
  color: var(--bs-white);
}

@media (max-width: 576px) {
  .auction-type-toggle {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  } 

  .btn-group.custom-toggle-btn {
    width: 100%;
    gap: 8px;
  }

  .auction-type-toggle .btn, .btn-group.custom-toggle-btn .btn {
    min-width: 0;
    width: 100%;
  }
}

/* Traffic Light Table */
.traffic-light-table {
  /* border: 1px solid #a6c1d3; */
  border-radius: 4px;
  overflow: hidden;
}

.traffic-light-table thead th {
  background-color: #f6f8fb;
  border-color: #abb9cb;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: #50657e;
  padding: 10px;
  vertical-align: middle;
}

.traffic-light-table tbody td {
  border-color: #b7c2d0;
  padding: 10px;
  vertical-align: middle;
  font-size: 14px;
  color: #50657e;
}

.traffic-light-table tbody td:first-child {
  font-weight: 500;
}

.traffic-light-table tbody td:nth-child(2) {
  font-weight: 400;
}

/* Traffic Light Dots */
.traffic-light-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.traffic-light-green {
  background-color: #22c55e;
}

.traffic-light-yellow {
  background-color: #f4be0e;
}

.traffic-light-red {
  background-color: #ff5547;
}
.traffic-arrow-status{
  display: flex;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.20);
  font-size: 14px;
  font-weight: 400;
}

/* Traffic Light Table Select Dropdowns */
.traffic-light-table .form-select-sm {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #aaa;
  border-radius: 4px;
  min-width: 111px;
}

.traffic-light-table .form-select-sm:focus {
  border-color: #096bef;
  box-shadow: 0 0 0 0.2rem rgba(9, 107, 239, 0.25);
}

/* Supplier-rank traffic lights use the same checkbox multi-select pattern as
   the auction setup: assignments live in a small floating list per colour. */
.traffic-rank-dropdown {
  min-width: 120px;
  position: relative;
  z-index: 1;
}

/* The generic responsive-table wrapper clips absolutely positioned menus.
   Supplier-rank rows fit the setup form, so let this one view paint its menu
   above following rows/cards. */
[data-traffic-light-view="supplierRank"] {
  overflow: visible;
  position: relative;
  z-index: 20;
}

[data-traffic-light-view="supplierRank"] .traffic-light-table {
  overflow: visible;
}

[data-traffic-light-view="supplierRank"]:has(.traffic-rank-dropdown-menu.is-open) {
  z-index: 1100;
}

/* A table cell paints in its row's stacking order.  Promote the exact open
   cell/row too, otherwise the Green/Yellow/Red neighbour controls can sit on
   top of the menu despite the menu's own z-index. */
[data-traffic-light-view="supplierRank"] tbody tr:has(.traffic-rank-dropdown-menu.is-open) {
  position: relative;
  z-index: 1101;
}

[data-traffic-light-view="supplierRank"] td:has(.traffic-rank-dropdown-menu.is-open),
.traffic-rank-dropdown:has(.traffic-rank-dropdown-menu.is-open) {
  position: relative;
  z-index: 1102;
}

.traffic-rank-dropdown-button {
  background-color: #fff;
  cursor: pointer;
  min-width: 120px;
}

.traffic-rank-dropdown-menu {
  width: 100%;
  max-height: 155px;
  overflow-y: auto;
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  z-index: 1060;
  list-style: none;
  padding: 5px;
  margin: 0;
  background: #fff;
  border-radius: 5px;
  box-shadow: rgba(0, 0, 0, .2) 0 5px 5px -3px, rgba(0, 0, 0, .14) 0 8px 10px 1px;
}

.traffic-rank-dropdown-menu.is-open {
  display: block;
  z-index: 1100;
}

.traffic-rank-dropdown-menu li {
  display: flex;
  align-items: center;
  padding: 4px 5px;
}

.traffic-rank-dropdown-menu label {
  cursor: pointer;
  margin: 0;
  width: 100%;
}

.traffic-rank-dropdown-menu input[type="checkbox"] {
  margin-right: 8px;
}

/* Yellow's two values live inside an input group, so Bootstrap's usual
   `.is-invalid ~ .invalid-feedback` selector cannot reach this message. */
.traffic-light-table [data-traffic-range-error]:not(.d-none) {
  display: block;
  margin-top: 4px;
}

/* Apply to All Checkbox */
.traffic-light-table thead th .form-check-input {
  margin-top: 0;
}

.traffic-light-table thead th .form-check-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: #50657e;
}

/* Sequence Auction Styles */
.sequence-card {
  background: white;
  border: 1px solid #a6c1d3;
  border-radius: 5px;
  padding: 0;
}

.sequence-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  height: 40px;
  border-bottom: 1px solid #a6c1d3;
}

.sequence-card-body {
  padding: 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sequence-empty-state {
  border: 1px dashed #a6c1d3;
  border-radius: 5px;
  padding: 15px;
  background: white;  
}

.sequence-name-input {
  border: none;
  border-radius: 4px;
  padding: 6px 9px;
  font-size: 14px;
  color: #1f2b3a;
}

.sequence-name-input:focus {
  border-color: #096bef;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(9, 107, 239, 0.25);
}

.sequence-duration {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px;
  font-size: 14px;
  color: #818181;
}

.sequence-add-item-btn {
  border: 1px solid #a6c1d3;
  border-radius: 5px;
  padding: 10px 16px;
  background: white;
  color: #50657e;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sequence-add-item-btn:hover {
  background: #f8f9fa;
  border-color: #096bef;
  color: #096bef;
}

.drag-handle {
  display: flex;
  align-items: center;
  cursor: move;
  color: var(--secondary-600);
}

.drag-handle:hover {
  opacity: 0.7;
}

.sequence-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.sequence-delete-btn:hover {
  background-color: rgba(255, 85, 71, 0.1);
}

.interval-time-input {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px;
  font-size: 14px;
  color: #818181;
}

.interval-time-input.is-invalid {
  border-color: #FF5547;
  box-shadow: 0 0 0 0.2rem rgba(255, 85, 71, 0.25);
}

.interval-time-input.is-invalid:focus {
  border-color: #FF5547;
  box-shadow: 0 0 0 0.2rem rgba(255, 85, 71, 0.25);
}

/* Suppliers Qualifying Bid - accordion arrow + spacing */
#suppliersQbAccordion .accordion-item { margin-bottom: 0.75rem; }
#suppliersQbAccordion .accordion-item:last-child { margin-bottom: 0; }
#suppliersQbAccordion .accordion-arrow { flex-shrink: 0; margin-right: 0.5rem; min-width: 1.25rem; }
#suppliersQbAccordion .accordion-button .accordion-icon-expanded { display: none; }
#suppliersQbAccordion .accordion-button .accordion-icon-collapsed { display: inline; }
#suppliersQbAccordion .accordion-button:not(.collapsed) .accordion-icon-expanded { display: inline; }
#suppliersQbAccordion .accordion-button:not(.collapsed) .accordion-icon-collapsed { display: none; }
#suppliersQbAccordion .accordion-button::after { display: none; }
.accordion-button:not(.collapsed) .accordion-icon {
  transform: rotate(180deg);
}

/* Sequence Item Select Component */
.sequence-item-select-wrapper {
  width: 100%;
}

.sequence-item-select-btn {
  background: white;
  border: 1px solid #a6c1d3;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 14px;
  color: #50657e;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.sequence-item-select-btn:hover {
  border-color: #096bef;
  background: #f8f9fa;
}

.sequence-item-select-btn:focus {
  border-color: #096bef;
  box-shadow: 0 0 0 0.2rem rgba(9, 107, 239, 0.25);
  outline: none;
}

.sequence-item-select-text {
  flex: 1;
  text-align: left;
}

.sequence-item-select-arrow {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.sequence-item-select-btn[aria-expanded="true"] .sequence-item-select-arrow {
  transform: rotate(180deg);
}

.sequence-item-dropdown {
  border: 1px solid #a6c1d3;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0;
  margin-top: 5px;
  overflow: hidden;
}

.sequence-item-search {
  background: white;
  border-bottom: 1px solid #a6c1d3;
}

.sequence-item-search-input {
  font-size: 12px;
  color: #8091a7;
  padding: 10px;
}

.sequence-item-search-input:focus {
  box-shadow: none;
  border-color: transparent;
}

.sequence-item-search-input::placeholder {
  color: #8091a7;
}

.sequence-item-list {
  background: white;
}

.sequence-item-option {
  background: white;
  padding:6px 12px;
}

.sequence-item-option:hover {
  background: #f8f9fa;
}

.sequence-item-option label.form-check-label {
  font-size: 14px;
  color: var(--secondary-600);
}

.sequence-item-option .form-check {
  margin: 0;
}

.sequence-item-option .form-check-input[type=checkbox] {
  margin-top: 0;
}

/* .sequence-item-checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  border: 1px solid #000;
  border-radius: 2px;
} */

.sequence-item-checkbox:checked {
  background-color: #096bef;
  border-color: #096bef;
}

.sequence-item-checkbox:focus {
  box-shadow: 0 0 0 0.2rem rgba(9, 107, 239, 0.25);
}

.sequence-item-footer {
  background: #096bef;
  border-top: 1px solid #a6c1d3;
}

.sequence-add-selected-btn {
  background: #096bef;
  border: none;
  color: white;
  font-weight: 500;
  font-size: 12px;
  padding: 10px;
  border-radius: 0;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.sequence-add-selected-btn:hover {
  background: #0858d1;
  color: white;
}

.sequence-add-selected-btn:focus {
  background: #096bef;
  color: white;
  box-shadow: none;
}

.sequence-add-selected-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ================================================
   TOLERANCE CARD STYLES
   ================================================ */
.tolerance-form-container {
  padding-top: 0;
}

.tolerance-divider {
  height: 1px;
  background-color: #d9d9d9;
  width: 100%;
}

.tolerance-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #a6c1d3;
  border-radius: 4px;
  background-color: white;
}

.tolerance-table {
  margin-bottom: 0;
  width: 100%;
  min-width: 1271px;
  border-collapse: collapse;
  border-spacing: 0;
}

.tolerance-table thead th {
  background-color: #f6f8fb;
  border: 1px solid #abb9cb;
  padding: 10px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  color: #50657e;
  vertical-align: middle;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tolerance-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 15;
  background-color: #f6f8fb;
}

.tolerance-table thead th:nth-child(2) {
  position: sticky;
  left: 454px;
  z-index: 15;
  background-color: #f6f8fb;
}

.tolerance-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: white;
}

.tolerance-table tbody td:nth-child(2) {
  position: sticky;
  left: 454px;
  z-index: 5;
  background-color: white;
}

.tolerance-table thead th.tolerance-th-checkbox .form-check-input {
  margin-top: 0;
  margin-right: 8px;
}

.tolerance-table tbody td {
  border: 1px solid #b7c2d0;
  border-top: none;
  padding: 10px;
  font-size: 14px;
  color: #50657e;
  vertical-align: middle;
  height: 52px;
  background-color: white;
}

.tolerance-table tbody td.fw-medium {
  font-weight: 500;
  color: #50657e;
}

.tolerance-select {
  font-size: 16px;
  padding: 8.5px 14px;
  border: 1px solid #a6c1d3;
  border-radius: 8px;
  color: #50657e;
  height: 40px;
}

.tolerance-select:focus {
  border-color: #096bef;
  box-shadow: 0 0 0 0.2rem rgba(9, 107, 239, 0.25);
}

.tolerance-input {
  border: 1px solid #a6c1d3;
  border-radius: 5px;
  height: 35px;
  width: 141px;
  font-size: 14px;
  color: #50657e;
}

.tolerance-input:focus {
  border-color: #096bef;
  box-shadow: 0 0 0 0.2rem rgba(9, 107, 239, 0.25);
}

.tolerance-unit-label {
  font-size: 14px;
  color: #50657e;
  white-space: nowrap;
}

.tolerance-th-item {
  width: 455px;
  min-width: 455px;
}

.tolerance-th-code {
  width: 110px;
  min-width: 110px;
}

.tolerance-th-checkbox {
  min-width: 190px;
}

.tolerance-th-checkbox:nth-of-type(4) {
  min-width: 220px;
}

.tolerance-th-checkbox:nth-of-type(6) {
  min-width: 242px;
}

/* Ensure table rows align properly */
.tolerance-table tbody tr {
  height: 52px;
}

.tolerance-table tbody tr:first-child td {
  border-top: 1px solid #b7c2d0;
}

/* Synchronize table header heights */
.tolerance-table thead {
  height: 40px;
}

.tolerance-table thead th {
  height: 40px;
  line-height: 1.2;
}

/* Tolerance Lot View Styles */
.tolerance-lot-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.tolerance-lot-field {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tolerance-lot-select {
  width: 192px;
  min-width: 192px;
}

.tolerance-lot-value-field {
  flex: 1;
  gap: 5px;
}

.tolerance-lot-label {
  font-size: 14px;
  color: #50657e;
  white-space: nowrap;
}

.tolerance-lot-input {
  width: 141px;
  min-width: 141px;
}

.tolerance-lot-suffix {
  font-size: 14px;
  color: #50657e;
  white-space: nowrap;
}

/* ================================================
   AUCTION EXTENSION CARD STYLES
   ================================================ */
.auction-extension-helper-text {
  font-size: 12px;
  color: #8091a7;
  margin-left: 10px;
  white-space: nowrap;
}

.auction-extension-toggle {
  width: 330px;
}

.auction-extension-toggle .btn {
  width: 160px;
  font-size: 14px;
  padding: 4px 16px;
  min-height: 28px;
}

.auction-extension-toggle .btn-check:checked + .btn {
  color: #096bef;
}

.auction-extension-input-wrapper {
  width: 193px;
  flex-shrink: 0;
}

.auction-extension-input {
  border: 1px solid #a6c1d3;
  border-radius: 8px;
  padding: 8.5px 14px;
  font-size: 16px;
  color: #50657e;
  height: 40px;
  width: 100%;
}

.auction-extension-input:focus {
  border-color: #096bef;
  box-shadow: 0 0 0 0.2rem rgba(9, 107, 239, 0.25);
  outline: none;
}

.auction-extension-label {
  font-size: 14px;
  font-weight: 500;
  color: #50657e;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Ensure proper spacing for auction extension row */
.auction-extension-row .d-flex {
  gap: 10px;
}

/* ================================================
   CONFIGURE WEIGHTAGE CARD STYLES
   ================================================ */
.weightage-global-controls {
  background: #f6f8fb;
  padding: 16px;
  border-radius: 8px;
}

.weightage-vendor-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--bs-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.weightage-vendor-table {
  margin-bottom: 0;
}

.weightage-vendor-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #50657e;
  text-transform: uppercase;
  background: #f6f8fb;
}

.weightage-vendor-table tbody tr:hover {
  background-color: #f6f8fb;
}

.weightage-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weightage-accordion-item {
  border: 1px solid #a6c1d3;
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.weightage-accordion-header {
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: white;
  transition: background-color 0.2s;
  border: none;
  width: 100%;
}

.weightage-accordion-header:hover {
  background: #f6f8fb;
}
.weightage-count{
  font-size: 11px;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  color: var(--primary-700);
  padding: 2px 6px;
  border-radius: 100px;
  font-weight: 500;
}
.weightage-accordion-body {
  padding: 0;
  display: none;
  border-top: 1px solid #a6c1d3;
}

.weightage-accordion-item.expanded .weightage-accordion-body {
  display: block;
}

.weightage-accordion-arrow {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #50657e;
  transition: transform 0.2s;
  font-size: 12px;
}

.weightage-accordion-item.expanded .weightage-accordion-arrow {
  transform: rotate(180deg);
}

/* Bootstrap Accordion Styling for Weightage Item Value View */
#weightageItemAccordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#weightageItemAccordion .accordion-button::after {
  display: none;
}

/* #weightageItemAccordion .accordion-item {
  border: 1px solid #a6c1d3;
  border-radius: 8px;
  background: white;
  overflow: hidden;
  border-left: none;
  border-right: none;
} */

/* #weightageItemAccordion .accordion-header {
  border-bottom: none;
} */
/* 
#weightageItemAccordion .accordion-button {
  padding: 8px 16px;
  background: white;
  border: none;
  box-shadow: none;
  font-weight: normal;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

#weightageItemAccordion .accordion-button:not(.collapsed) {
  background: white;
  box-shadow: none;
  color: inherit;
}

#weightageItemAccordion .accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}

#weightageItemAccordion .accordion-button:hover {
  background: #f6f8fb;
}

#weightageItemAccordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2350657e'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  width: 20px;
  height: 20px;
  background-size: 20px;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 0;
}

#weightageItemAccordion .accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}

#weightageItemAccordion .accordion-collapse {
  border-top: 1px solid #a6c1d3;
}

#weightageItemAccordion .accordion-body {
  padding: 0;
} */

/* Responsive adjustments for tolerance table */
@media (max-width: 1400px) {
  .tolerance-table {
    min-width: 1000px;
  }
  
  .tolerance-th-item {
    width: 290px;
    min-width: 290px;
  }
  
  .tolerance-table thead th:nth-child(2),
  .tolerance-table tbody td:nth-child(2) {
    left: 290px;
  }
}

/* Pricing Rules Table */
.pricing-rules-table-container {
  overflow-x: auto;
  border: 1px solid var(--bluegrey-500);
  border-radius: 4px;
  margin-top: 16px;
}

.pricing-rules-table {
  width: 100%;
  min-width: 800px;
  margin-bottom: 0;
  border-collapse: collapse;
}

.pricing-rules-table thead {
  background-color: var(--bs-grey-50);
  border-bottom: 2px solid var(--bluegrey-500);
}

.pricing-rules-table thead th {
  padding: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  border-bottom: 1px solid var(--bluegrey-500);
  vertical-align: middle;
}

.pricing-rules-table tbody tr {
  border-bottom: 1px solid var(--bs-gray-200);
}

.pricing-rules-table tbody tr:hover {
  background-color: var(--bs-grey-50);
}

.pricing-rules-table tbody td {
  padding: 10px;
  font-size: 14px;
  color: var(--color-text);
  vertical-align: middle;
  border-bottom: 1px solid var(--bluegrey-400);
}

.pricing-rules-table thead th .form-check {
  margin-bottom: 0;
}

.pricing-rules-table thead th .form-check-input {
  margin-top: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.pricing-rules-table .pricing-input {
  height: 35px;
  border: 1px solid var(--bluegrey-500);
  border-radius: 5px;
  font-size: 14px;
  padding: 6px 10px;
}

.pricing-rules-table .pricing-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem var(--focus-blue);
}

/* Auction Success Modal Styles */
.auction-success-modal {
  border: none;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.auction-success-modal .modal-body {
  padding: 3rem 2.5rem;
}

.success-icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.success-icon-circle {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  border-radius: 50%;
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.auction-success-modal .modal-title {
  color: var(--bs-gray-900);
  font-size: 1.5rem;
  font-weight: 600;
}

.auction-success-modal #auctionSuccessMessage {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--bs-gray-600);
  max-width: 400px;
  margin: 0 auto;
}

.auction-success-modal .btn {
  min-width: 120px;
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.auction-success-modal .btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.auction-success-modal .btn-primary:hover {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(9, 107, 239, 0.3);
}

.auction-success-modal .btn-outline-secondary {
  border-color: var(--bs-gray-300);
  color: var(--bs-gray-700);
}

.auction-success-modal .btn-outline-secondary:hover {
  background-color: var(--bs-gray-100);
  border-color: var(--bs-gray-400);
  color: var(--bs-gray-900);
}

/* Modal backdrop */
#auctionSuccessModal.modal.show .modal-backdrop {
  background-color: rgba(31, 43, 58, 0.6);
  backdrop-filter: blur(2px);
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .auction-success-modal .modal-body {
    padding: 2rem 1.5rem;
  }
  
  .auction-success-modal .modal-title {
    font-size: 1.25rem;
  }
  
  .success-icon-circle {
    width: 64px;
    height: 64px;
  }
  
  .success-icon-circle svg {
    width: 36px;
    height: 36px;
  }
  
  .auction-success-modal .d-flex {
    flex-direction: column;
    width: 100%;
  }
  
  .auction-success-modal .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/*-- select2 styles --*/ 
.select2-container .select2-selection--single {
  height: 35px;
}

.select2-container--default .select2-selection--single {
  border: var(--bs-border-width) solid var(--bs-border-color);  
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 35px;  
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 35px;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
}

.ai-info-btn {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--bs-dark);
  color: var(--bs-white);
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Vendor profile and pricing history modals */
.vpp-compare-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  gap: 4px;
  display: inline-flex;
  align-items: center;
}

#vendorPreviewModal .vendor-preview-dialog {
  max-width: min(760px, calc(100vw - 32px));
}

#vendorPreviewModal .vendor-preview-content {
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

#vendorPreviewModal .modal-body {
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #f8fafc;
}

.vpp-preview-body {
  padding: 14px;
}

.vpp-preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vpp-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
  gap: 14px;
  align-items: start;
}

.vpp-profile-main,
.vpp-score-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.vpp-profile-main {
  padding: 12px;
}

.vpp-score-panel {
  padding: 12px;
}

.vpp-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8091a7;
  margin-bottom: 10px;
}

.vpp-modal-header {
  position: relative;
  padding: 16px 52px 14px 14px;
  color: #fff;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vpp-modal-header > .d-flex {
  width: 100%;
}

.vpp-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  padding: 0;
  transition: background .15s;
}

.vpp-modal-close:hover { background: rgba(255,255,255,.35); }
.vpp-modal-close .material-symbols-outlined { font-size: 17px; }

.vpp-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.vpp-identity { flex: 1; min-width: 0; }

.vpp-vendor-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.vpp-vendor-code {
  font-size: 11px;
  color: rgba(255,255,255,.75);
  margin-top: 1px;
}

.vpp-ovr-block {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  margin-left: auto;
}

.vpp-ovr-num {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.vpp-ovr-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  opacity: .85;
  text-transform: uppercase;
}

.vpp-scope-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.vpp-scope-category { background: rgba(219,234,254,.9); color: #1d4ed8; }
.vpp-scope-global   { background: rgba(255,255,255,.25); color: rgba(255,255,255,.95); }

.vpp-classification {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.vpp-radar-container {
  display: flex;
  justify-content: center;
  margin: 10px 0 0;
  overflow: hidden;
}

.vpp-radar-container canvas {
  max-width: 100%;
  height: auto;
}

.vpp-attrs {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vpp-attr-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vpp-attr-label {
  font-size: 9px;
  font-weight: 600;
  color: #50657e;
  letter-spacing: .04em;
  width: 112px;
  flex-shrink: 0;
  position: relative;
  cursor: default;
}

.vpp-attr-label[data-vpp-tip]:hover::after {
  content: attr(data-vpp-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  width: 200px;
  background: #1f2b3a;
  color: #fff;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  padding: 6px 9px;
  border-radius: 6px;
  pointer-events: none;
  z-index: 9999;
  white-space: normal;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.vpp-attr-label[data-vpp-tip]:hover::before {
  content: '';
  position: absolute;
  left: 12px;
  bottom: calc(100% + 1px);
  border: 5px solid transparent;
  border-top-color: #1f2b3a;
  pointer-events: none;
  z-index: 9999;
}

.vpp-attr-bar-wrap {
  flex: 1;
  height: 6px;
  background: #ebeef2;
  border-radius: 3px;
  overflow: hidden;
}

.vpp-attr-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .35s ease;
}

.vpp-attr-score {
  font-size: 11px;
  font-weight: 700;
  color: #1f2b3a;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.vpp-sample-note {
  font-size: 10px;
  color: #8091a7;
}

.vpp-description {
  margin-bottom: 0;
}

.vpp-desc-text {
  font-size: 12px;
  line-height: 1.55;
  color: #3a4e63;
  background: #f4f7fa;
  border-left: 3px solid #1d6fa4;
  border-radius: 0 6px 6px 0;
  padding: 8px 10px;
  margin: 0;
}

@media (max-width: 720px) {
  #vendorPreviewModal .vendor-preview-dialog {
    max-width: calc(100vw - 18px);
    margin: .5rem auto;
  }

  #vendorPreviewModal .modal-body {
    max-height: calc(100vh - 120px);
  }

  .vpp-preview-grid {
    grid-template-columns: 1fr;
  }

  .vpp-preview-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

.vpp-desc-loading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 6px;
}

.vpp-desc-shimmer {
  display: block;
  height: 11px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8edf2 25%, #d2dae4 50%, #e8edf2 75%);
  background-size: 200% 100%;
  animation: vppShimmer 1.4s infinite;
  width: 100%;
}

.vpp-desc-shimmer.short {
  width: 65%;
}

@keyframes vppShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.vpp-compare-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dee2e6;
  position: relative;
}

.vpp-compare-rank-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 18px;
  line-height: 1;
  z-index: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}

.vpp-compare-card-top {
  padding: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vpp-compare-card-body {
  padding: 10px 12px 12px;
  background: #fff;
}

.vpp-compare-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vpp-compare-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vpp-compare-summary-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8091a7;
}

.vpp-compare-summary-value {
  font-size: 14px;
  font-weight: 700;
  color: #1f2b3a;
}

.vpp-compare-select label {
  font-size: 11px;
  font-weight: 700;
  color: #50657e;
}

.vpp-compare-select .form-select {
  min-width: 170px;
}

.vpp-compare-radar-wrap {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.iph-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.iph-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d6dde6;
  background: #fff;
  color: #50657e;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.iph-refresh-btn:hover {
  border-color: #1d6fa4;
  color: #1d6fa4;
}

.iph-refresh-btn:disabled {
  opacity: .65;
  cursor: wait;
}

.iph-refresh-btn .material-symbols-outlined {
  font-size: 15px;
}

.iph-refresh-btn.is-loading .material-symbols-outlined {
  animation: iphSpin .9s linear infinite;
}

@keyframes iphSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.iph-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.iph-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
}

.iph-summary-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8091a7;
}

.iph-summary-value {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
  color: #1f2b3a;
  line-height: 1.2;
}

.iph-summary-value.iph-trend-up { color: #15803d; }
.iph-summary-value.iph-trend-down { color: #b91c1c; }
.iph-summary-value.iph-trend-flat { color: #1d6fa4; }

.iph-summary-meta {
  margin-top: 6px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
}

.iph-chart-wrap {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
}

.iph-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.iph-chart-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8091a7;
}

.iph-chart-canvas-wrap {
  position: relative;
  height: 160px;
}

.iph-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #8091a7;
  background: #f8fafc;
}

.iph-date-filters {
  display: flex;
  gap: 4px;
}

.iph-date-btn {
  border: 1px solid #d6dde6;
  background: #ffffff;
  color: #50657e;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.iph-date-btn:hover {
  border-color: #1d6fa4;
  color: #1d6fa4;
}

.iph-date-btn.is-active {
  background: #1f2b3a;
  border-color: #1f2b3a;
  color: #ffffff;
}

.iph-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.iph-history-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.iph-history-main {
  min-width: 0;
  flex: 1;
}

.iph-history-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.iph-source-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.iph-source-auction { background: rgba(29, 111, 164, .12); color: #1d6fa4; }
.iph-source-po { background: rgba(2, 132, 199, .12); color: #0369a1; }
.iph-source-contract { background: rgba(22, 163, 74, .12); color: #15803d; }
.iph-source-invoice { background: rgba(202, 138, 4, .15); color: #a16207; }
.iph-source-market { background: rgba(124, 58, 237, .12); color: #6d28d9; }

.iph-history-date {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.iph-history-context {
  font-size: 14px;
  font-weight: 600;
  color: #1f2b3a;
  line-height: 1.4;
}

.iph-history-meta {
  margin-top: 5px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.iph-history-price {
  min-width: 160px;
  text-align: right;
}

.iph-history-amount {
  font-size: 18px;
  font-weight: 700;
  color: #1f2b3a;
  line-height: 1.2;
}

.iph-history-basis {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.iph-empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  background: #f8fafc;
}

@media (max-width: 767px) {
  .vpp-compare-card-top {
    flex-wrap: wrap;
  }

  .iph-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .iph-history-card {
    flex-direction: column;
  }

  .iph-history-price {
    min-width: 0;
    text-align: left;
  }
}

/* ── Recommendation overhaul v2 (2026-04-21) ───────────────────────────── */

.ai-v2-review-link {
  font-size: 0.875rem;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
}


.ai-v2-section-panel {
  display: none;
}

.ai-v2-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  color: #334155;
  font-size: 0.85rem;
}

.ai-v2-summary strong {
  color: #0f172a;
}

.ai-v2-llm-status {
  margin-left: auto;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: help;
}

.ai-v2-llm-parse_failed,
.ai-v2-llm-fallback_used {
  background: #fff7ed;
  color: #9a3412;
}

.ai-v2-section-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.65rem;
}

.ai-v2-section-card {
  border: 1px solid #dbe3ea;
  border-left: 4px solid #64748b;
  background: #ffffff;
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.ai-v2-section-card header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.ai-v2-section-card h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #0f172a;
}

.ai-v2-section-card p {
  margin: 0;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.35;
}

.ai-v2-section-card.ai-v2-tl-green { border-left-color: #16a34a; }
.ai-v2-section-card.ai-v2-tl-amber { border-left-color: #f59e0b; }
.ai-v2-section-card.ai-v2-tl-red { border-left-color: #dc2626; }

.ai-v2-section-active {
  transform: translateY(-2px);
  border-color: #0f766e;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18);
  background: #f0fdfa;
}

.ai-v2-section-done {
  background: #f8fafc;
}

.ai-v2-section-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.55rem;
}

.ai-v2-section-changes span {
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.7rem;
}

.ai-v2-confidence,
.ai-v2-applied-marker {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.ai-v2-conf-high {
  background: #dcfce7;
  color: #166534;
}

.ai-v2-conf-medium {
  background: #fef3c7;
  color: #92400e;
}

.ai-v2-conf-low {
  background: #fee2e2;
  color: #991b1b;
}

.ai-v2-field-active {
  outline: 2px solid #14b8a6;
  outline-offset: 3px;
  background: #f0fdfa !important;
}

.ai-v2-field-applied {
  position: relative;
}

.ai-v2-marker-host {
  --ai-marker-lane-left: clamp(320px, 48%, 920px);
  --ai-marker-top: 50%;
  position: relative;
  padding-right: 56px;
}

.ai-v2-applied-marker {
  margin-left: 0.35rem;
  vertical-align: middle;
  cursor: help;
  transition: transform .12s ease, box-shadow .15s ease;
}

.ai-v2-marker-host > .ai-v2-applied-marker {
  position: absolute;
  top: var(--ai-marker-top);
  left: min(var(--ai-marker-lane-left), calc(100% - 48px));
  z-index: 2;
  margin-left: 0;
  transform: translateY(-50%);
}

.ai-v2-marker-host > .ai-v2-applied-marker:hover {
  transform: translateY(calc(-50% - 1px));
}

.custom-toggle-btn.ai-v2-marker-host,
.radio-group-container.ai-v2-marker-host,
.radio-group.ai-v2-marker-host,
.form-switch.ai-v2-marker-host {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  padding-right: 0;
}

.btn-group.custom-toggle-btn.ai-v2-marker-host {
  width: max-content;
}

.btn-group.custom-toggle-btn.ai-v2-marker-host .btn-check,
.custom-toggle-btn.ai-v2-marker-host .btn-check {
  flex: 0 0 auto;
}

.btn-group.custom-toggle-btn.ai-v2-marker-host .btn {
  flex: 0 0 160px;
  min-width: 130px;
}

.custom-toggle-btn.ai-v2-marker-host > .ai-v2-applied-marker,
.radio-group-container.ai-v2-marker-host > .ai-v2-applied-marker,
.radio-group.ai-v2-marker-host > .ai-v2-applied-marker,
.form-switch.ai-v2-marker-host > .ai-v2-applied-marker {
  position: static;
  margin-left: 0;
  flex: 0 0 auto;
  transform: none;
}

.custom-toggle-btn.ai-v2-marker-host > .ai-v2-applied-marker:hover,
.radio-group-container.ai-v2-marker-host > .ai-v2-applied-marker:hover,
.radio-group.ai-v2-marker-host > .ai-v2-applied-marker:hover,
.form-switch.ai-v2-marker-host > .ai-v2-applied-marker:hover {
  transform: translateY(-1px);
}

.tolerance-lot-row.ai-v2-marker-host,
.auction-extension-row.ai-v2-marker-host {
  --ai-marker-lane-left: auto;
  padding-right: 0;
}

.tolerance-lot-row.ai-v2-marker-host > .ai-v2-applied-marker,
.auction-extension-row.ai-v2-marker-host > .ai-v2-applied-marker {
  position: static;
  margin-left: 0;
  flex: 0 0 auto;
  transform: none;
}

.tolerance-lot-row.ai-v2-marker-host > .ai-v2-applied-marker:hover,
.auction-extension-row.ai-v2-marker-host > .ai-v2-applied-marker:hover {
  transform: translateY(-1px);
}

.custom-card > .card-header.ai-v2-marker-host,
.custom-card .card-header.ai-v2-marker-host {
  --ai-marker-lane-left: calc(100% - 72px);
  padding-right: 88px;
}

@media (max-width: 768px) {
  .ai-v2-marker-host {
    --ai-marker-lane-left: calc(100% - 42px);
    padding-right: 48px;
  }
}

.ai-v2-unmapped-marker {
  margin-top: 0.4rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.78rem;
}

.ai-v2-insight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 0.5rem;
  border: none;
  border-radius: 50%;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  color: #0369a1;
  cursor: pointer;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.ai-v2-insight-icon:hover { background: #bae6fd; transform: scale(1.15); }
/* Tier 1 (high-confidence): solid blue badge */
.ai-v2-tier-1.ai-v2-insight-icon { background: #2563eb; color: #ffffff; }
.ai-v2-tier-1.ai-v2-insight-icon:hover { background: #1d4ed8; }
/* Amber traffic-light override */
.ai-v2-tl-amber.ai-v2-insight-icon { background: #fef3c7; color: #92400e; }
.ai-v2-tl-amber.ai-v2-insight-icon:hover { background: #fde68a; }
/* Red traffic-light override */
.ai-v2-tl-red.ai-v2-insight-icon { background: #fee2e2; color: #991b1b; }
.ai-v2-tl-red.ai-v2-insight-icon:hover { background: #fecaca; }

/* Row accent — thin left border on rows that were changed by the engine */
.ai-v2-field-changed {
  border-left: 3px solid #2563eb;
  padding-left: 0.5rem;
  background: #f0f7ff;
  border-radius: 4px;
  transition: background 0.4s ease;
}
.ai-v2-field-changed.ai-v2-tl-amber { border-left-color: #f59e0b; background: #fffbeb; }
.ai-v2-field-changed.ai-v2-tl-red   { border-left-color: #dc2626; background: #fff5f5; }

/* Shimmer animation during fetch */
@keyframes ai-v2-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.ai-v2-fetching .row.mb-3 {
  background: linear-gradient(90deg, transparent 0%, #e0f2fe 50%, transparent 100%);
  background-size: 400px 100%;
  animation: ai-v2-shimmer 1.2s infinite linear;
  border-radius: 4px;
}

/* Field fade-in when value is written by engine */
@keyframes ai-v2-field-appear {
  from { opacity: 0.3; transform: translateY(-2px); }
  to   { opacity: 1;   transform: translateY(0); }
}
.ai-v2-field-written {
  animation: ai-v2-field-appear 0.25s ease forwards;
}

.ai-v2-insight-popover {
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  color: #1f2937;
}
.ai-v2-insight-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.ai-v2-insight-label { font-weight: 600; }
.ai-v2-insight-confidence {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.ai-v2-insight-headline {
  font-weight: 500;
  color: #0f172a;
  margin-bottom: 0.5rem;
}
.ai-v2-insight-para {
  margin: 0 0 0.6rem 0;
  line-height: 1.45;
  color: #334155;
}
.ai-v2-insight-para:last-of-type { margin-bottom: 0; }
.ai-v2-insight-close {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  background: transparent;
  border: 0;
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
}

/* ── FAB — AI Recommendations floating action button ────────────────────── */
.ai-fab {
  position: fixed;
  bottom: calc(var(--setup-footer-height) + 16px);
  right: 24px;
  z-index: 8000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 0 16px;
  height: 46px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.38), 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: background 180ms ease, box-shadow 180ms ease, transform 120ms ease;
  white-space: nowrap;
  user-select: none;
}
.ai-fab:hover {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.48), 0 2px 8px rgba(15, 23, 42, 0.2);
  transform: translateY(-1px);
}
.ai-fab:active { transform: translateY(0); }

.ai-fab-icon {
  font-size: 1rem;
  line-height: 1;
  transition: transform 200ms ease;
}
.ai-fab-label { line-height: 1; }

.ai-fab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Loading state */
.ai-fab.ai-fab-loading {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  box-shadow: none;
  cursor: wait;
}
.ai-fab.ai-fab-loading .ai-fab-icon {
  animation: ai-fab-spin 1s linear infinite;
}
@keyframes ai-fab-spin { to { transform: rotate(360deg); } }

/* Applied / success state */
.ai-fab.ai-fab-applied {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  box-shadow: 0 4px 20px rgba(21, 128, 61, 0.35), 0 2px 6px rgba(15, 23, 42, 0.14);
}
.ai-fab.ai-fab-applied:hover {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%);
}

/* ── Suggest Family footer button ───────────────────────────────────────── */
.ai-suggest-family-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 34px;
  border-radius: 6px;
  border: 1.5px solid #2563eb;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
  white-space: nowrap;
}
.ai-suggest-family-btn:hover {
  background: #eff6ff;
  border-color: #1d4ed8;
}
.ai-suggest-family-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: #94a3b8;
  color: #94a3b8;
}
.ai-suggest-family-icon {
  font-size: 0.9rem;
  line-height: 1;
  color: #2563eb;
}
.ai-suggest-family-btn:disabled .ai-suggest-family-icon { color: #94a3b8; }

/* ── Drawer overlay ─────────────────────────────────────────────────────── */
.ai-v2-drawer-overlay {
  position: fixed;
  right: 0;
  top: var(--ai-rail-top, 0px);
  bottom: var(--setup-footer-height);
  width: var(--ai-rail-w);
  max-width: 100%;
  background: transparent;
  z-index: 9990;
  pointer-events: none;
}
.ai-v2-drawer {
  width: 100%;
  height: 100%;
  background: #ffffff;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
  border-left: 1px solid #dbe3ea;
}
.ai-v2-drawer-header {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}
.ai-v2-drawer-header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}
.ai-v2-drawer-header-left { min-width: 0; flex: 1; }
.ai-v2-drawer-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 0.2rem;
}
.ai-v2-drawer-subtitle {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}
.ai-v2-savings-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
}
.ai-v2-savings-kicker {
  color: #0369a1;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.ai-v2-savings-badge {
  display: inline-flex;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #075985;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}
.ai-v2-savings-summary p {
  margin: 0;
  color: #475569;
  font-size: 0.76rem;
  line-height: 1.35;
}
.ai-v2-header-sep {
  margin: 0 0.35rem;
  color: #94a3b8;
  font-weight: 400;
}
.ai-v2-drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ai-v2-package-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}
/* Expected savings chip — shown only in the drawer header (top-right) */
.ai-v2-savings-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  white-space: nowrap;
  cursor: default;
}
.ai-v2-savings-chip-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0369a1;
}
.ai-v2-savings-chip-value {
  font-size: 0.78rem;
  font-weight: 800;
  color: #075985;
}
.ai-v2-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  flex-shrink: 0;
}
.ai-v2-drawer-close:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* LLM status pill */
.ai-v2-llm-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.ai-v2-llm-pill.ai-v2-llm-parse_failed,
.ai-v2-llm-pill.ai-v2-llm-fallback_used {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.ai-v2-llm-pill.ai-v2-llm-repaired {
  background: #fefce8;
  color: #854d0e;
  border-color: #fde68a;
}

/* Fill values icon button in header */
.ai-v2-fill-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.ai-v2-fill-icon-btn:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

.ai-v2-drawer-summary {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0 0 1rem;
}
.ai-v2-drawer-row {
  border-top: 1px solid #edf2f7;
  padding: 0.55rem 0;
  margin: 0;
  background: transparent;
}
.ai-v2-drawer-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.ai-v2-drawer-label { font-weight: 600; color: #0f172a; }
.ai-v2-drawer-values { font-size: 0.8rem; color: #475569; }
.ai-v2-drawer-arrow { margin: 0 0.25rem; color: #94a3b8; }
.ai-v2-drawer-recommended { color: #15803d; font-weight: 500; }
.ai-v2-drawer-headline {
  font-size: 0.82rem;
  color: #334155;
  margin: 0.4rem 0 0.5rem;
}
.ai-v2-drawer-actions {
  display: none;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.ai-v2-override-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}
.ai-v2-whatif-btn {
  background: #1e293b;
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  cursor: pointer;
}
.ai-v2-whatif-btn:hover { background: #334155; }
.ai-v2-whatif-result { margin-top: 0.5rem; font-size: 0.82rem; }
.ai-v2-verdict {
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
}
.ai-v2-verdict-support  { background: #dcfce7; color: #14532d; }
.ai-v2-verdict-reject   { background: #fee2e2; color: #7f1d1d; }
.ai-v2-verdict-neutral,
.ai-v2-verdict-insufficient_data { background: #f1f5f9; color: #334155; }
.ai-v2-tradeoff { font-style: italic; margin: 0.25rem 0 0; }

/* Drawer section card */
.ai-v2-drawer-section {
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Section header */
.ai-v2-section-head {
  padding: 0.8rem 0.9rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}
.ai-v2-section-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}
.ai-v2-section-head-top h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}
.ai-v2-section-summary {
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.45;
}

/* Section rule rows container */
.ai-v2-section-rows {
  padding: 0 0.9rem;
}

/* Individual rule row */
.ai-v2-drawer-row {
  border-top: 1px solid #f1f5f9;
  padding: 0.6rem 0;
}
.ai-v2-drawer-row:first-child { border-top: none; }

.ai-v2-drawer-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Label + insight stacked */
.ai-v2-row-label-stack {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.ai-v2-drawer-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
}
.ai-v2-rule-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.ai-v2-rule-help-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}
.ai-v2-row-insight {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
}

/* current → recommended pill value display */
.ai-v2-row-value-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ai-v2-pill-old {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  background: #f1f5f9;
  color: #94a3b8;
  font-weight: 500;
}
.ai-v2-pill-arrow {
  font-size: 0.7rem;
  color: #94a3b8;
}
.ai-v2-pill-new {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* Per-row auction effect */
.ai-v2-row-effect {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  color: #0369a1;
  font-style: italic;
  line-height: 1.35;
}

/* Review badge */
.ai-v2-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #fef9c3;
  color: #854d0e;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.ai-v2-review-row {
  background: #fffbeb;
  border-left: 3px solid #f59e0b !important;
}

/* Decision aid: resolve a review-required rule with one click */
.ai-v2-decision-aid {
  margin-top: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
}
.ai-v2-decision-why {
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #854d0e;
}
.ai-v2-decision-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ai-v2-decision-option {
  flex: 1 1 200px;
  min-width: 180px;
  padding: 0.5rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
}
.ai-v2-decision-option-recommended {
  border-color: #86efac;
  background: #f0fdf4;
}
.ai-v2-decision-option-chosen {
  border-color: #15803d;
  box-shadow: 0 0 0 2px #bbf7d0;
}
.ai-v2-decision-option-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #0f172a;
}
.ai-v2-decision-badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.64rem;
  font-weight: 700;
}
.ai-v2-decision-default-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.64rem;
  font-weight: 700;
}
.ai-v2-decision-rationale {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.35;
}
.ai-v2-decision-evidence {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #0369a1;
}
.ai-v2-decision-use-btn {
  margin-top: 0.4rem;
  padding: 0.22rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.ai-v2-decision-use-btn:hover:not(:disabled) {
  background: #e2e8f0;
}
.ai-v2-decision-use-btn:disabled {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
  cursor: default;
}
.ai-v2-decision-default {
  margin: 0.45rem 0 0;
  font-size: 0.68rem;
  color: #92400e;
}

/* ── Diff tab ────────────────────────────────────────────────────────────── */
.ai-v2-diff-list { padding: 0.25rem 0; }
.ai-v2-diff-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}
.ai-v2-diff-row:last-child { border-bottom: none; }
.ai-v2-diff-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  flex: 1;
  min-width: 0;
}
.ai-v2-diff-change {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.ai-v2-diff-old {
  font-size: 0.72rem;
  color: #94a3b8;
  text-decoration: line-through;
}
.ai-v2-diff-arrow { font-size: 0.7rem; color: #94a3b8; }
.ai-v2-diff-new {
  font-size: 0.72rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── Apply all values bar ────────────────────────────────────────────────── */
.ai-v2-apply-all-values {
  padding: 0.5rem 1rem;
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
}
.ai-v2-apply-all-values button {
  width: 100%;
  padding: 0.45rem;
  border-radius: 6px;
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}
.ai-v2-apply-all-values button:hover { background: #bbf7d0; }

/* ── What-if tab (card-style 3-column comparison) ───────────────────────── */
.ai-v2-whatif-intro {
  padding: 0.9rem 1rem 0;
}
.ai-v2-whatif-intro p {
  font-size: 0.8rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}
.ai-v2-whatif-rows { padding: 0.5rem 0.75rem; display: grid; gap: 0.5rem; }
.ai-v2-whatif-row {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.ai-v2-whatif-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem 0.4rem;
}
.ai-v2-whatif-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  flex: 1;
}
.ai-v2-whatif-tl-dot { font-size: 0.75rem; flex-shrink: 0; }
.ai-v2-whatif-compare-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid #f1f5f9;
}
.ai-v2-whatif-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0.55rem 0.5rem;
  border-right: 1px solid #f1f5f9;
  text-align: center;
}
.ai-v2-whatif-col:last-child { border-right: none; }
.ai-v2-whatif-col-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ai-v2-whatif-col-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}
.ai-v2-whatif-col-current { color: #94a3b8; }
.ai-v2-whatif-col-rec { color: #15803d; }
.ai-v2-whatif-input {
  width: 100%;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 0.76rem;
  color: #0f172a;
  background: #ffffff;
  text-align: center;
}
.ai-v2-whatif-context {
  padding: 0.75rem 1rem 0;
}
.ai-v2-whatif-context-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}
.ai-v2-whatif-context-hint {
  font-weight: 400;
  color: #94a3b8;
  font-size: 0.73rem;
}
.ai-v2-whatif-context-area {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  color: #334155;
  resize: vertical;
  min-height: 56px;
}
.ai-v2-whatif-footer {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem 1rem;
}
.ai-v2-simulate-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  border-radius: 7px;
  border: none;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 130ms ease;
}
.ai-v2-simulate-btn:hover { background: #1e40af; }
.ai-v2-simulate-btn:disabled { opacity: 0.55; cursor: wait; }
.ai-v2-apply-scenario-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 7px;
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.ai-v2-whatif-result-panel {
  margin: 0 0.75rem 1rem;
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.ai-v2-whatif-loading { color: #64748b; font-size: 0.8rem; text-align: center; padding: 0.5rem 0; }
.ai-v2-whatif-error { color: #dc2626; font-size: 0.8rem; }
.ai-v2-whatif-combined {
  font-size: 0.83rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 0.5rem;
}
.ai-v2-whatif-band {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.ai-v2-band-positive { background: #dcfce7; color: #15803d; }
.ai-v2-band-neutral   { background: #f1f5f9; color: #475569; }
.ai-v2-band-warn      { background: #fef9c3; color: #854d0e; }
.ai-v2-band-reject    { background: #fee2e2; color: #991b1b; }
.ai-v2-whatif-vendor-delta { font-size: 0.78rem; color: #475569; margin: 0.35rem 0; }
.ai-v2-whatif-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.55rem 0;
}
.ai-v2-whatif-impact-grid > div {
  padding: 0.45rem 0.5rem;
  border: 1px solid #dbe5f1;
  border-radius: 6px;
  background: #f8fafc;
}
.ai-v2-whatif-impact-grid span {
  display: block;
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ai-v2-whatif-impact-grid p { margin: 0.2rem 0 0; color: #334155; font-size: 0.73rem; line-height: 1.35; }
@media (max-width: 700px) { .ai-v2-whatif-impact-grid { grid-template-columns: 1fr; } }
.ai-v2-whatif-verdicts { display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.ai-v2-whatif-verdict {
  border-radius: 7px;
  padding: 0.5rem 0.65rem;
}
.ai-v2-whatif-verdict strong { display: block; font-size: 0.78rem; color: #0f172a; }
.ai-v2-whatif-verdict-action { font-size: 0.72rem; font-weight: 600; }
.ai-v2-whatif-verdict p { margin: 0.2rem 0 0; font-size: 0.76rem; }
.ai-v2-verdict-support       { background: #dcfce7; color: #14532d; }
.ai-v2-verdict-reject        { background: #fee2e2; color: #7f1d1d; }
.ai-v2-verdict-neutral,
.ai-v2-verdict-insufficient_data { background: #f1f5f9; color: #334155; }

/* ── Ask AI tab ──────────────────────────────────────────────────────────── */
.ai-v2-ask-panel {
  height: 100%;
  min-height: 0;
  padding: 0.75rem 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}
.ai-v2-ask-prompts { display: flex; flex-wrap: wrap; gap: 7px; animation: ai-chat-fade-up .18s ease both; }
.ai-v2-ask-prompts-initial { padding: 0.35rem 0; justify-content: center; }
.ai-v2-ask-prompts-followup { margin-left: 34px; padding-top: 2px; }
.ai-v2-ask-prompt-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,.9);
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.ai-v2-ask-prompt-chip:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(29,78,216,.10); }
.ai-v2-ask-thread {
  display: flex;
  flex: 1 1 auto;
  min-height: 260px;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--ai-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(99,102,241,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,250,252,.88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.ai-v2-chat-intro {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px 10px 8px;
  text-align: center;
  color: var(--ai-ink-soft);
}
.ai-v2-chat-intro-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ai-grad);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: var(--ai-shadow-glow);
}
.ai-v2-chat-intro strong { color: var(--ai-ink); font-size: .9rem; }
.ai-v2-chat-intro span { max-width: 330px; font-size: .78rem; line-height: 1.45; }
.ai-v2-chat-row { display: flex; align-items: flex-end; gap: 8px; animation: ai-chat-slide-in .18s ease both; }
.ai-v2-chat-row-user { justify-content: flex-end; }
.ai-v2-chat-row-ai { justify-content: flex-start; }
.ai-v2-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--ai-grad);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}
.ai-v2-chat-bubble {
  max-width: min(78%, 430px);
  padding: 10px 12px;
  border-radius: 15px;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  box-shadow: 0 5px 16px rgba(15,23,42,.08);
}
.ai-v2-chat-bubble-user { border-bottom-right-radius: 5px; background: var(--ai-grad); color: #ffffff; }
.ai-v2-chat-bubble-ai { border-bottom-left-radius: 5px; background: #ffffff; border: 1px solid var(--ai-border); color: var(--ai-ink); }
.ai-v2-chat-bubble.is-loading { display: inline-flex; align-items: center; gap: 4px; min-width: 48px; min-height: 34px; }
.ai-v2-typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ai-ink-faint); animation: ai-chat-typing 1s ease-in-out infinite; }
.ai-v2-typing-dot:nth-child(2) { animation-delay: .15s; }
.ai-v2-typing-dot:nth-child(3) { animation-delay: .3s; }
.ai-v2-ask-form {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--ai-border);
  background: var(--ai-canvas);
}
.ai-v2-ask-form textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: #0f172a;
  resize: vertical;
  min-height: 44px;
  max-height: 110px;
  font-family: inherit;
}
.ai-v2-ask-form textarea:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.25); }
.ai-v2-ask-submit {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  border: none;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}
.ai-v2-ask-submit:hover { background: #1e293b; }
.ai-v2-ask-submit:disabled { opacity: .7; cursor: wait; transform: none !important; box-shadow: none !important; }
.ai-v2-ask-answer { font-size: 0.83rem; color: #1f2937; line-height: 1.55; }
@keyframes ai-chat-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ai-chat-fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ai-chat-typing {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* ── Family drawer (suggestion) ─────────────────────────────────────────── */
.ai-v2-family-apply-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
  white-space: nowrap;
}
.ai-v2-family-apply-btn:hover { background: #1e40af; }
.ai-v2-family-overview { padding: 0.75rem 0.75rem 1.5rem; }
.ai-v2-family-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.ai-v2-family-hero-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.ai-v2-family-hero-badges { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.ai-v2-family-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}
.ai-v2-badge-fit { background: #dbeafe; color: #1e40af; }
.ai-v2-badge-quality { background: #f1f5f9; color: #475569; }
.ai-v2-family-headline { font-size: 0.9rem; font-weight: 600; color: #0f172a; margin: 0 0 0.4rem; }
.ai-v2-family-summary { font-size: 0.82rem; color: #475569; margin: 0 0 0.4rem; line-height: 1.5; }
.ai-v2-family-narrative { font-size: 0.82rem; color: #334155; margin: 0 0 0.75rem; line-height: 1.55; font-style: italic; }
.ai-v2-family-switch-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.75rem;
}
.ai-v2-family-switch-note span { font-size: 0.9rem; flex-shrink: 0; }
.ai-v2-family-switch-note p { margin: 0; font-size: 0.8rem; color: #854d0e; line-height: 1.45; }
.ai-v2-family-stats {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.65rem;
}
.ai-v2-family-stat { display: flex; flex-direction: column; align-items: center; flex: 1; }
.ai-v2-family-stat strong { font-size: 1rem; font-weight: 800; color: #0f172a; }
.ai-v2-family-stat span { font-size: 0.68rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.ai-v2-family-next-step { font-size: 0.8rem; color: #475569; margin: 0; font-style: italic; }
.ai-v2-family-evidence { padding: 0.75rem; display: grid; gap: 0.75rem; }
.ai-v2-evidence-section { display: grid; gap: 0.4rem; }
.ai-v2-evidence-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
}
.ai-v2-evidence-list { margin: 0; padding-left: 16px; display: grid; gap: 5px; }
.ai-v2-evidence-list li { font-size: 0.82rem; color: #334155; line-height: 1.45; }
.ai-v2-evidence-section p { font-size: 0.82rem; color: #475569; margin: 0; line-height: 1.5; }
.ai-v2-family-risk { color: #c2410c !important; font-size: 0.78rem !important; }
.ai-v2-alts-list { padding: 0.75rem; display: grid; gap: 0.5rem; }
.ai-v2-alt-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  background: #ffffff;
}
.ai-v2-alt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.3rem; }
.ai-v2-alt-name { font-size: 0.85rem; font-weight: 700; color: #0f172a; }
.ai-v2-alt-score { font-size: 0.75rem; font-weight: 600; color: #64748b; background: #f1f5f9; padding: 2px 8px; border-radius: 999px; }
.ai-v2-alt-why-not { font-size: 0.78rem; color: #64748b; margin: 0; line-height: 1.45; }
.ai-v2-family-no-alts { padding: 1rem; text-align: center; color: #94a3b8; font-size: 0.82rem; }

.ai-v2-unmapped-summary {
  margin-top: 0.85rem;
  padding: 0.7rem;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.8rem;
}

.ai-v2-unmapped-summary div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.ai-v2-unmapped-summary span {
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: #ffedd5;
}

.main-content-body {
  transition: margin-right 260ms ease;
}

@media (min-width: 901px) {
  body.ai-v2-drawer-open {
    overflow-y: auto;
  }

  body.ai-v2-drawer-open .main-layout {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* App-shell push: only the content body moves, so the sticky header and the
     fixed footer stay full-width top and bottom; the rail sits in the gap on
     the right. Margin keeps the body flush-left — never centred under the rail
     (the body's inner .container-fluid has margin:0 auto). */
  .ai-v2-drawer-open .main-content-body {
    margin-right: calc(var(--ai-rail-w) + 18px);
  }

  /* Rail open → window-scroll: hand the content's scroll to the window so its
     scrollbar sits at the window's far right, not floating at the rail's edge.
     The wrapper's fixed 100vh/overflow:hidden is what otherwise traps the
     scroll inside .main-content-body. Header stays sticky; footer + rail stay
     fixed. (Closed rail already scrolls full-width with an edge scrollbar.) */
  .ai-v2-drawer-open .setup-auction-wrapper {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .ai-v2-drawer-open .main-content-body {
    overflow: visible;
  }
}

@media (max-width: 900px) {
  /* Narrow screens: rail becomes a full-height overlay, content not pushed. */
  .ai-v2-drawer-open .main-content-body { margin-right: 0; }
  .ai-v2-drawer-overlay { top: 0; }
  .ai-v2-drawer {
    height: 100%;
    overflow: hidden;
  }
  .ai-v2-drawer-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}



/* Drawer section title */
.ai-v2-drawer-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin: 1rem 0 0.4rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e2e8f0;
}

/* Price row */
.ai-v2-price-row { background: #f8fafc; }
.ai-v2-price-anchor {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.4rem;
}
.ai-v2-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}
.ai-v2-price-table th {
  text-align: left;
  font-weight: 600;
  color: #475569;
  padding: 0.15rem 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}
.ai-v2-price-table td { padding: 0.2rem 0.4rem; }
.ai-v2-price-pct  { color: #2563eb; font-weight: 600; }
.ai-v2-price-inr  { color: #15803d; font-weight: 600; }
.ai-v2-price-label { color: #1f2937; }
.ai-v2-price-rationale { font-size: 0.8rem; color: #475569; margin: 0; font-style: italic; }
.ai-v2-price-confidence { font-size: 0.72rem; padding: 0.1rem 0.4rem; border-radius: 10px; font-weight: 600; }
.ai-v2-conf-high   { background: #dcfce7; color: #166534; }
.ai-v2-conf-medium { background: #fef3c7; color: #92400e; }
.ai-v2-conf-low    { background: #fee2e2; color: #991b1b; }

.ai-v2-apply-group-btn {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #ffffff;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.ai-v2-apply-group-btn:hover { background: #115e59; }

.ai-v2-value-panel {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ai-v2-anchor-form {
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #f8fafc;
  padding: 0.85rem;
}

.ai-v2-anchor-form h4 {
  margin: 0;
  font-size: 0.92rem;
  color: #0f172a;
}

.ai-v2-anchor-form p {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}

.ai-v2-anchor-items {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.ai-v2-anchor-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.7rem;
}

.ai-v2-anchor-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.ai-v2-anchor-item-head strong {
  color: #0f172a;
  font-size: 0.84rem;
}

.ai-v2-anchor-item-head span {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.68rem;
  font-weight: 700;
}

.ai-v2-anchor-item label {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 600;
}

.ai-v2-anchor-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  font-size: 0.9rem;
}

.ai-v2-anchor-trend {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.ai-v2-anchor-trend-empty {
  color: #94a3b8;
  font-size: 0.78rem;
}

.ai-v2-anchor-trend-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: #64748b;
}

.ai-v2-anchor-trend-row div {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.ai-v2-anchor-trend-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.ai-v2-anchor-trend-row strong {
  color: #334155;
  font-weight: 700;
}

.ai-v2-anchor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.ai-v2-anchor-actions button {
  border: 0;
  border-radius: 6px;
  background: #0f766e;
  color: #ffffff;
  padding: 0.42rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.ai-v2-anchor-actions button + button {
  background: #e2e8f0;
  color: #334155;
}

.ai-v2-anchor-instruction {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}
.ai-v2-anchor-instruction-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.3rem;
}
.ai-v2-anchor-instruction-hint {
  font-weight: 400;
  color: #94a3b8;
}
.ai-v2-anchor-instruction-area {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #0f172a;
  resize: vertical;
}
.ai-v2-anchor-instruction-area:focus { outline: 2px solid #2563eb; border-color: transparent; }

.ai-v2-value-card {
  border: 1px solid #dbe4ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.85rem;
}

.ai-v2-value-scope {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
  color: #334155;
}

.ai-v2-value-story {
  margin-top: 0.65rem;
  border-left: 3px solid #0f766e;
  background: #f0fdfa;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  color: #134e4a;
  font-size: 0.8rem;
  line-height: 1.45;
}

.ai-v2-value-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.ai-v2-value-card h4 {
  margin: 0;
  font-size: 0.92rem;
  color: #0f172a;
}

.ai-v2-value-card-head p,
.ai-v2-value-item p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #475569;
}

.ai-v2-value-vendor,
.ai-v2-value-vendor-reason {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #0f766e;
}

.ai-v2-value-items {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.ai-v2-value-item {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.45rem;
}

.ai-v2-value-line {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto;
  align-items: baseline;
  gap: 0.75rem;
}

.ai-v2-value-field {
  display: inline-block;
  min-width: 9rem;
  font-size: 0.78rem;
  color: #64748b;
}

.ai-v2-value-basis {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.72rem;
  color: #64748b;
}

.ai-v2-value-item strong {
  font-size: 0.86rem;
  color: #0f172a;
}

.ai-v2-value-refs,
.ai-v2-value-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.ai-v2-value-refs span,
.ai-v2-value-warnings span,
.ai-v2-value-marker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.08rem 0.38rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.ai-v2-value-refs span { background: #eef6ff; color: #1d4ed8; }
.ai-v2-value-warnings span { background: #fff7ed; color: #9a3412; }

.ai-v2-value-loading,
.ai-v2-value-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.8rem;
  color: #475569;
  font-size: 0.85rem;
}

.ai-v2-value-filled {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.14);
}

.ai-v2-value-marker {
  margin-left: 0.35rem;
  background: #ccfbf1;
  color: #115e59;
  vertical-align: middle;
}

/* §1.6 Floating skip animation button */
.ai-v2-skip-anim-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 0.45rem 1.2rem;
  border-radius: 20px;
  border: none;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  font-size: 0.82rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.ai-v2-skip-anim-btn:hover { background: rgba(15, 23, 42, 0.95); }

/* §1.6 Drawer tab bar */
.ai-v2-drawer-tabs {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}
.ai-v2-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.3rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: #64748b;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.ai-v2-tab:hover { background: #e2e8f0; color: #1e293b; }
.ai-v2-tab-active {
  background: #ffffff;
  color: #1d4ed8;
  border-color: #bfdbfe;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
}
.ai-v2-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 700;
}
.ai-v2-tab-active .ai-v2-tab-count {
  background: #1d4ed8;
  color: #ffffff;
}
.ai-v2-diff-empty,
.ai-v2-whatif-empty {
  margin: 1.5rem 1rem;
  color: #94a3b8;
  font-size: 0.82rem;
  text-align: center;
}

/* §1.4 Pool card — drawer header: auction overview + vendor pool summary */
.ai-v2-pool-card {
  margin: 0.75rem 1rem 0.25rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.ai-v2-pool-overview {
  margin: 0 0 0.4rem;
  font-size: 0.83rem;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.45;
}
.ai-v2-pool-vendors {
  margin: 0;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
}

/* §1.4 Per-rule insight sub-labels */
.ai-v2-info-headline {
  font-size: 0.8rem;
  color: #0f172a;
  font-weight: 500;
}
.ai-v2-info-mechanism {
  font-size: 0.77rem;
  color: #334155;
}
.ai-v2-info-effect {
  font-size: 0.77rem;
  color: #0369a1;
  font-style: italic;
}

/* §1.4 Anchored info popover */
.ai-v2-info-popover {
  position: absolute;
  z-index: 10000;
  max-width: 340px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
}
.ai-v2-popover-inner {
  padding: 0.9rem 1rem;
  display: grid;
  gap: 0.4rem;
}
.ai-v2-popover-headline {
  font-size: 0.85rem;
  color: #0f172a;
  font-weight: 600;
  display: block;
}
.ai-v2-popover-mechanism {
  margin: 0;
  font-size: 0.78rem;
  color: #334155;
}
.ai-v2-popover-effect {
  margin: 0;
  font-size: 0.78rem;
  color: #0369a1;
  font-style: italic;
}

/* §2.1 What-if sandbox panel */
.ai-v2-whatif-panel { padding: 0 0 1rem; }
.ai-v2-whatif-intro { padding: 0.75rem 1rem 0.25rem; font-size: 0.82rem; color: #475569; }
.ai-v2-whatif-intro p { margin: 0; }
.ai-v2-whatif-empty { margin: 1rem; color: #94a3b8; font-size: 0.8rem; }
.ai-v2-whatif-rows { padding: 0 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ai-v2-whatif-row {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  padding: 0.6rem 0.75rem;
  font-size: 0.83rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Anchor form — structured context block */
.ai-v2-anchor-context {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.ai-v2-anchor-context-field { display: flex; flex-direction: column; gap: 0.25rem; }
.ai-v2-anchor-description-input {
  width: 100%;
  padding: 0.42rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #0f172a;
}
.ai-v2-anchor-description-input:focus { outline: 2px solid #2563eb; border-color: transparent; }

/* Per-item price reason field */
.ai-v2-anchor-price-label { margin-bottom: 0.35rem; }
.ai-v2-anchor-reason-label {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.35rem;
  margin-bottom: 0;
}
.ai-v2-anchor-reason-hint { font-size: 0.74rem; color: #64748b; font-weight: 500; }
.ai-v2-anchor-reason-input {
  width: 100%;
  padding: 0.38rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #334155;
  background: #f8fafc;
}
.ai-v2-anchor-reason-input:focus { outline: 2px solid #2563eb; border-color: transparent; background: #fff; }

/* Confidence badge with text suffix */
.ai-v2-anchor-confidence {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.68rem;
  font-weight: 700;
}

/* ── Fill values dialog (modal) ── */
.ai-v2-fillvalues-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  padding: 1rem;
}

.ai-v2-fillvalues-dialog {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-v2-fillvalues-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem 0.8rem;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ai-v2-fillvalues-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ai-v2-fillvalues-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #64748b;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s;
}

.ai-v2-fillvalues-close:hover { background: #f1f5f9; color: #0f172a; }

.ai-v2-fillvalues-body {
  overflow-y: auto;
  padding: 1.25rem 1.4rem 1.5rem;
  flex: 1;
}

/* Inside the dialog, the anchor form needs no extra outer padding */
.ai-v2-fillvalues-body .ai-v2-anchor-form {
  border: none;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* Fill dialog header when showing results */
.ai-v2-fillvalues-header-text { flex: 1; min-width: 0; }

.ai-v2-fill-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

/* Fill dialog footer (results state) */
.ai-v2-fillvalues-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.4rem;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.ai-v2-fill-apply-all-btn {
  flex: 1;
  padding: 0 1.1rem;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: #0f766e;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
}
.ai-v2-fill-apply-all-btn:hover { background: #0d9488; }

.ai-v2-fill-done-btn {
  padding: 0 1.1rem;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.ai-v2-fill-done-btn:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Loading state inside the dialog */
.ai-v2-fill-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 0;
  color: #475569;
  font-size: 0.875rem;
}

.ai-v2-fill-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #e2e8f0;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: ai-fab-spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Value cards rendered inside the dialog */
.ai-v2-fillvalues-body .ai-v2-value-card {
  margin-bottom: 0.75rem;
}
.ai-v2-fillvalues-body .ai-v2-value-card:last-child { margin-bottom: 0; }

/* Compatibility styles for legacy recommendation workspace contracts still used by tests/fallback UI. */
.ai-evidence-info-button {
  cursor: pointer;
  color: #2563eb;
}

.ai-pricing-anchor-panel,
.ai-vi-comparison,
.ai-workspace-rule-row,
.ai-rule-group-collapse {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.ai-field-help {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.ai-field-help-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 220px;
  max-width: 320px;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.75rem;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  z-index: 30;
}

body.ai-v2-active.ai-v2-family-workspace #aiWorkspace {
  display: none !important;
}

/* ── Agent progress panel ──────────────────────────────────────────────── */

.agent-progress-panel {
  position: fixed;
  bottom: 88px;
  right: 20px;
  width: 420px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  z-index: 2100;
  overflow: hidden;
  font-size: 13px;
}

.agent-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #0f172a;
  color: #f8fafc;
  font-weight: 600;
  font-size: 13px;
}

.agent-progress-title {
  flex: 1;
}

.agent-progress-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.agent-progress-close:hover { color: #f8fafc; }

.agent-phase-list {
  padding: 8px 0;
}

.agent-phase-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  color: #64748b;
  transition: color 0.2s;
}

.agent-phase-row[data-status="in_progress"] {
  color: #0284c7;
  font-weight: 600;
}

.agent-phase-row[data-status="done"] {
  color: #16a34a;
}

.agent-phase-icon {
  font-size: 12px;
  width: 14px;
  flex-shrink: 0;
}

.agent-phase-label {
  flex: 1;
  font-size: 12px;
}

.agent-phase-count {
  font-size: 11px;
  color: #94a3b8;
  font-weight: normal;
}

.agent-tool-log {
  padding: 0 14px 4px 36px;
  min-height: 0;
  overflow: hidden;
}

.agent-tool-log-line,
.agent-rule-decided {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-rule-decided {
  color: #16a34a;
}

.agent-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-value-row__field {
  color: #64748b;
}

.agent-value-row__value {
  color: #2563eb;
  font-weight: 500;
}

@keyframes agent-pulse-in {
  from { opacity: 0; transform: translateX(-4px); }
  to   { opacity: 1; transform: translateX(0); }
}

.agent-pulse {
  animation: agent-pulse-in 0.25s ease-out forwards;
}

/* ── Vendor Participation Intelligence (VPI) ─────────────────────────── */
.vpi-widget { margin: 0 0 1rem; }
.vpi-card {
  border: 1px solid #e2e6ea;
  border-left-width: 4px;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}
.vpi-below_threshold { border-left-color: #d92d20; background: #fffbfa; }
.vpi-caution        { border-left-color: #f79009; background: #fffcf5; }
.vpi-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vpi-pill {
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 999px; color: #fff;
}
.vpi-pill-below_threshold { background: #d92d20; }
.vpi-pill-caution         { background: #f79009; }
.vpi-headline { font-weight: 600; color: #101828; font-size: 14px; }
.vpi-message { margin: 8px 0 10px; color: #475467; font-size: 13px; line-height: 1.5; }
.vpi-expand-title { font-size: 12px; font-weight: 600; color: #344054; margin-bottom: 6px; }
.vpi-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vpi-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #d0d5dd; background: #f9fafb; color: #101828;
  border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 12px;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.vpi-chip:hover { background: #eef2ff; border-color: #6172f3; }
.vpi-chip-static { cursor: default; }
.vpi-chip-static:hover { background: #f9fafb; border-color: #d0d5dd; }
.vpi-chip-ovr {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: #101828; color: #fff; font-weight: 700; font-size: 11px;
}
.vpi-chip-name { font-weight: 500; }
.vpi-chip-add { color: #3538cd; font-weight: 600; }
.vpi-chip-added { opacity: .55; }
.vpi-chip-added .vpi-chip-add { color: #12b76a; }
.vpi-action { margin-top: 10px; font-size: 12.5px; color: #475467; }
.vpi-action strong { display: block; color: #344054; margin-bottom: 2px; }
.agent-vendor-alert { margin: 10px 12px 0; }

/* ── Agentic sequence plan (which items go where) ────────────────────── */
.agent-seq-host { margin: 10px 12px 0; }
.agent-seq-card { border-left-color: #3538cd; }
.agent-seq-pill { background: #3538cd; }
.agent-seq-slots { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.agent-seq-slot { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.agent-seq-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto;
  background: #3538cd; color: #fff; font-weight: 700; font-size: 12px;
}
.agent-seq-items { flex: 1 1 auto; color: #101828; }
.agent-seq-dur { color: #475467; font-size: 12px; white-space: nowrap; }

/* VPI + sequence plan persistent block inside the recommendation drawer */
.ai-v2-drawer-insights { padding: 0 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.ai-v2-drawer-insights .vpi-card { margin: 0; }

/* VPI healthy / unknown states (banner always shows during AI recommendation) */
.vpi-healthy { border-left-color: #12b76a; background: #f6fef9; }
.vpi-pill-healthy { background: #12b76a; }
.vpi-unknown { border-left-color: #98a2b3; background: #fcfcfd; }
.vpi-pill-unknown { background: #98a2b3; }

/* VPI status colours (always-on informational model: competitive / moderate / limited / unknown) */
.vpi-competitive { border-left-color: #12b76a; background: #f6fef9; }
.vpi-pill-competitive { background: #12b76a; }
.vpi-moderate { border-left-color: #2e90fa; background: #f5faff; }
.vpi-pill-moderate { background: #2e90fa; }
.vpi-limited { border-left-color: #f79009; background: #fffcf5; }
.vpi-pill-limited { background: #f79009; }

/* VPI per-vendor participation tags on the selection list — bands computed
   server-side with the same cuts as the pool banner. */
.vpi-vtag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  cursor: default;
}
.vpi-vtag-reliable    { background: #ecfdf3; color: #027a48; border: 1px solid #abefc6; }
.vpi-vtag-occasional  { background: #f5faff; color: #175cd3; border: 1px solid #b2ddff; }
.vpi-vtag-rarely_bids { background: #fffaeb; color: #b54708; border: 1px solid #fedf89; }
.vpi-vtag-no_history  { background: #f9fafb; color: #667085; border: 1px solid #eaecf0; }

/* FIFA profile modal — raw participation fact + rank explainer */
.vpp-attr-fact {
  font-size: 11px;
  color: #475467;
  margin: -2px 0 6px 2px;
}
.vpp-score-note {
  font-size: 10.5px;
  color: #98a2b3;
  margin-top: 8px;
  font-style: italic;
}

/* Family suggestion drawer — "your history in this category" panel */
.ai-v2-family-history { padding: 14px 20px 4px; }
.ai-v2-history-summary { font-size: 13px; color: #475467; margin: 6px 0 10px; }
.ai-v2-history-rows { display: flex; flex-direction: column; gap: 6px; }
.ai-v2-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  background: #fcfcfd;
  font-size: 12.5px;
}
.ai-v2-history-row-rec { border-color: #b2ddff; background: #f5faff; }
.ai-v2-history-name { font-weight: 600; color: #344054; min-width: 84px; }
.ai-v2-history-detail { color: #667085; flex: 1; }
.ai-v2-history-tags { display: inline-flex; gap: 6px; }
.ai-v2-history-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.ai-v2-history-tag-used { background: #f2f4f7; color: #475467; border: 1px solid #d0d5dd; }
.ai-v2-history-tag-rec  { background: #eff8ff; color: #175cd3; border: 1px solid #b2ddff; }

/* ════════════════════════════════════════════════════════════════════════
   AI EXPERIENCE OVERHAUL v3 — 2026-06-09
   A cohesive "Aurora Intelligence" identity for every AI surface:
   the FAB, Suggest-Family button, the docked recommendation rail (8/4 split),
   family suggestion rail, agentic progress panel, info popovers and modals.
   This layer reskins existing markup — no selector renamed, no JS contract
   touched. Source order lets it win over the legacy single-class rules above.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  /* Signature accent — indigo→violet (used saturated, never as a wash on white) */
  --ai-accent:        #6366f1;
  --ai-accent-strong: #4f46e5;
  --ai-accent-deep:   #4338ca;
  --ai-violet:        #8b5cf6;
  --ai-cyan:          #22d3ee;
  --ai-grad:        linear-gradient(135deg, #4f46e5 0%, #6d5dfb 50%, #8b5cf6 100%);
  --ai-grad-vivid:  linear-gradient(135deg, #4338ca 0%, #6366f1 52%, #22d3ee 130%);
  --ai-grad-soft:   linear-gradient(160deg, #f3f2ff 0%, #fbfaff 60%, #ffffff 100%);

  /* Ink + surfaces (faintly indigo-tinted neutrals, not flat grey) */
  --ai-ink:         #131a2b;
  --ai-ink-soft:    #515b71;
  --ai-ink-faint:   #8b93a7;
  --ai-surface:     #ffffff;
  --ai-canvas:      #f6f7fc;
  --ai-canvas-2:    #eef0fa;
  --ai-border:      #e7e9f4;
  --ai-border-strong:#d6d9ea;

  /* Semantic — recommendation = emerald, caution = amber, deviation = rose */
  --ai-pos:        #0e9f6e;
  --ai-pos-deep:   #047857;
  --ai-pos-bg:     #e7f8f1;
  --ai-pos-border: #b5e7d3;
  --ai-warn:       #d97706;
  --ai-warn-deep:  #b45309;
  --ai-warn-bg:    #fdf6e7;
  --ai-warn-border:#f3d8a6;
  --ai-neg:        #e11d48;
  --ai-neg-deep:   #be123c;
  --ai-neg-bg:     #fdecef;
  --ai-neg-border: #f5c0cc;

  --ai-radius:     14px;
  --ai-radius-sm:  9px;
  --ai-radius-xs:  6px;
  --ai-pill:       999px;
  --ai-shadow-sm:  0 1px 2px rgba(19,26,43,.05), 0 1px 3px rgba(19,26,43,.04);
  --ai-shadow-md:  0 6px 18px rgba(19,26,43,.07), 0 1px 3px rgba(19,26,43,.05);
  --ai-shadow-lg:  0 20px 52px rgba(49,46,129,.18), 0 4px 14px rgba(19,26,43,.08);
  --ai-shadow-glow:0 10px 30px rgba(79,70,229,.35), 0 2px 8px rgba(19,26,43,.18);
  --ai-rail-w:     clamp(404px, 34vw, 600px);
  --ai-font:       'Sora', 'Roboto', system-ui, -apple-system, sans-serif;
}

/* ── Keyframes ───────────────────────────────────────────────────────────── */
@keyframes ai-rail-in   { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: translateX(0); } }
@keyframes ai-fade-up   { from { opacity: 0; transform: translateY(8px);  } to { opacity: 1; transform: translateY(0); } }
@keyframes ai-pop-in    { from { opacity: 0; transform: scale(.94) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes ai-fab-glow  { 0%,100% { box-shadow: 0 10px 30px rgba(79,70,229,.34), 0 2px 8px rgba(19,26,43,.18); } 50% { box-shadow: 0 12px 40px rgba(99,102,241,.52), 0 2px 10px rgba(19,26,43,.2); } }
@keyframes ai-sheen     { 0% { background-position: -150% 0; } 60%,100% { background-position: 250% 0; } }
@keyframes ai-twinkle   { 0%,100% { opacity: 1; transform: rotate(0) scale(1); } 50% { opacity: .7; transform: rotate(90deg) scale(1.18); } }

/* ════════ FAB — primary "AI Recommendations" trigger ════════════════════ */
.ai-fab {
  height: 50px;
  padding: 0 22px 0 18px;
  gap: 10px;
  background: var(--ai-grad-vivid);
  background-size: 160% 160%;
  font-family: var(--ai-font);
  font-weight: 600;
  letter-spacing: .015em;
  border-radius: var(--ai-pill);
  box-shadow: var(--ai-shadow-glow);
  animation: ai-fab-glow 4.5s ease-in-out infinite;
  transition: transform .16s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease, opacity .25s ease;
  overflow: hidden;
}
.ai-fab::after {            /* moving sheen */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: ai-sheen 6s ease-in-out infinite;
  pointer-events: none;
}
.ai-fab:hover {
  background: var(--ai-grad-vivid);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 44px rgba(99,102,241,.5), 0 4px 12px rgba(19,26,43,.22);
}
.ai-fab:active { transform: translateY(0) scale(.99); }
.ai-fab-icon { font-size: 1.15rem; animation: ai-twinkle 3.5s ease-in-out infinite; }
.ai-fab-label { font-weight: 600; position: relative; z-index: 1; }
.ai-fab-badge { background: rgba(255,255,255,.28); backdrop-filter: blur(4px); font-weight: 700; }
.ai-fab.ai-fab-loading {
  background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
  animation: none; box-shadow: var(--ai-shadow-md);
}
.ai-fab.ai-fab-loading::after { display: none; }
.ai-fab.ai-fab-applied {
  background: linear-gradient(135deg, var(--ai-pos-deep) 0%, var(--ai-pos) 100%);
  box-shadow: 0 10px 30px rgba(14,159,110,.36), 0 2px 8px rgba(19,26,43,.16);
  animation: none;
}
.ai-fab.ai-fab-applied::after { display: none; }
.ai-fab.ai-fab-applied:hover { background: linear-gradient(135deg, #036045 0%, var(--ai-pos-deep) 100%); }
/* Hide the FAB while the rail is open — the rail is the active surface */
body.ai-v2-drawer-open .ai-fab { opacity: 0; pointer-events: none; transform: scale(.85); }

/* ════════ Suggest Family button (footer) ═══════════════════════════════ */
.ai-suggest-family-btn {
  height: 36px;
  padding: 0 16px;
  gap: 7px;
  border-radius: var(--ai-radius-xs);
  border: 1px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--ai-grad) border-box;
  color: var(--ai-accent-strong);
  font-family: var(--ai-font);
  font-weight: 600;
  box-shadow: var(--ai-shadow-sm);
  transition: transform .14s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.ai-suggest-family-btn:hover:not(:disabled) {
  background: var(--ai-grad) border-box, var(--ai-grad) border-box;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--ai-shadow-glow);
}
.ai-suggest-family-btn:hover:not(:disabled) .ai-suggest-family-icon { color: #fff; }
.ai-suggest-family-btn:disabled {
  background: #f4f5fa; border-color: var(--ai-border-strong);
  color: var(--ai-ink-faint); opacity: 1; box-shadow: none;
}
.ai-suggest-family-icon { color: var(--ai-accent); animation: ai-twinkle 4s ease-in-out infinite; }
.ai-suggest-family-btn:disabled .ai-suggest-family-icon { color: var(--ai-ink-faint); animation: none; }

/* ════════ Docked rail shell (the 8/4 side panel) ═══════════════════════ */
.ai-v2-drawer-overlay, .ai-v2-drawer, .ai-v2-drawer * { box-sizing: border-box; }
.ai-v2-drawer {
  display: flex;
  flex-direction: column;
  background: var(--ai-canvas);
  padding: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--ai-border);
  box-shadow: var(--ai-shadow-lg);
  animation: ai-rail-in .34s cubic-bezier(.22,1,.36,1) both;
}
/* Scrolling body — only this region moves; header and tabs stay pinned */
.ai-v2-drawer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: .25rem 1.25rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ai-border-strong) transparent;
}
.ai-v2-drawer-scroll::-webkit-scrollbar { width: 9px; }
.ai-v2-drawer-scroll::-webkit-scrollbar-thumb { background: var(--ai-border-strong); border-radius: 99px; border: 2px solid var(--ai-canvas); }

.ai-v2-drawer.ai-v2-ask-active .ai-v2-drawer-scroll {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ai-v2-drawer.ai-v2-ask-active .ai-v2-ask-panel:not(.d-none) {
  flex: 1 1 auto;
}

/* Header — a soft aurora band with a gradient kicker */
.ai-v2-drawer-header {
  flex: 0 0 auto;                   /* frozen */
  gap: .55rem;
  margin: 0;
  padding: 1rem 1.25rem .9rem;
  background: var(--ai-grad-soft);
  border-bottom: 1px solid var(--ai-border);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset;
}
.ai-v2-drawer-header::before {     /* top accent hairline */
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--ai-grad);
}
.ai-v2-drawer-header-main { flex-direction: row; align-items: flex-start; gap: .65rem; }
.ai-v2-drawer-header-left { min-width: 0; }
.ai-v2-drawer-header-actions { justify-content: flex-end; flex-wrap: wrap; row-gap: .4rem; }

/* Keep the compact savings chip in the header's top-right. */
.ai-v2-savings-chip {
  margin-left: auto;
  align-self: flex-start;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border-color: var(--ai-pos-border);
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  box-shadow: 0 6px 16px rgba(14, 159, 110, .16), inset 0 1px 0 rgba(255,255,255,.85);
  cursor: help;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.ai-v2-savings-chip:hover {
  transform: translateY(-1px);
  border-color: var(--ai-pos);
  box-shadow: 0 9px 20px rgba(14, 159, 110, .22), inset 0 1px 0 rgba(255,255,255,.9);
}
.ai-v2-savings-chip-label { font-size: .62rem; color: var(--ai-pos-deep); }
.ai-v2-savings-chip-value { font-size: .98rem; color: var(--ai-pos-deep); letter-spacing: -.01em; }
.ai-v2-drawer-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ai-font);
  font-size: .66rem;
  letter-spacing: .09em;
  white-space: nowrap;
  color: var(--ai-accent-strong);
  background: var(--ai-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ai-v2-drawer-kicker::before {
  content: '✦';
  -webkit-text-fill-color: var(--ai-violet);
  animation: ai-twinkle 3.5s ease-in-out infinite;
}
.ai-v2-drawer-subtitle {
  font-family: var(--ai-font);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ai-ink);
  letter-spacing: -.01em;
}
.ai-v2-header-sep { color: var(--ai-border-strong); }
.ai-v2-drawer-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--ai-border);
  background: rgba(255,255,255,.7);
  color: var(--ai-ink-soft);
  backdrop-filter: blur(4px);
}
.ai-v2-drawer-close:hover { background: var(--ai-neg-bg); color: var(--ai-neg); border-color: var(--ai-neg-border); }
.ai-v2-fill-icon-btn {
  border-radius: 8px;
  border: 1px solid var(--ai-border-strong);
  background: rgba(255,255,255,.75);
  color: var(--ai-accent-strong);
  font-family: var(--ai-font);
  font-weight: 600;
  backdrop-filter: blur(4px);
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.ai-v2-fill-icon-btn:hover { background: #fff; border-color: var(--ai-accent); color: var(--ai-accent-deep); transform: translateY(-1px); }
.ai-v2-package-confidence {
  border-radius: var(--ai-pill);
  border: 1px solid var(--ai-border-strong);
  background: rgba(255,255,255,.7);
  color: var(--ai-ink-soft);
  font-weight: 700;
}
.ai-v2-llm-pill {
  border-radius: var(--ai-pill);
  background: var(--ai-pos-bg);
  color: var(--ai-pos-deep);
  border: 1px solid var(--ai-pos-border);
  font-weight: 600;
  cursor: help;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.ai-v2-llm-pill:hover {
  transform: translateY(-1px);
  border-color: var(--ai-pos);
  box-shadow: 0 5px 14px rgba(14, 159, 110, .14);
}
.ai-v2-llm-pill.ai-v2-llm-repaired {
  background: var(--ai-warn-bg);
  color: var(--ai-warn-deep);
  border-color: var(--ai-warn-border);
}
.ai-v2-llm-pill.ai-v2-llm-repaired:hover {
  border-color: var(--ai-warn);
  box-shadow: 0 5px 14px rgba(245, 158, 11, .14);
}
.ai-v2-llm-pill.ai-v2-llm-parse_failed,
.ai-v2-llm-pill.ai-v2-llm-fallback_used {
  background: var(--ai-neg-bg);
  color: var(--ai-neg-deep);
  border-color: var(--ai-neg-border);
}
.ai-v2-llm-pill.ai-v2-llm-parse_failed:hover,
.ai-v2-llm-pill.ai-v2-llm-fallback_used:hover {
  border-color: var(--ai-neg);
  box-shadow: 0 5px 14px rgba(220, 38, 38, .14);
}

/* Tabs — segmented control (frozen below the header) */
.ai-v2-drawer-tabs {
  flex: 0 0 auto;
  margin: .85rem 1.25rem .25rem;
  padding: 5px;
  gap: 3px;
  background: var(--ai-canvas-2);
  border: 1px solid var(--ai-border);
  border-radius: 11px;
}
.ai-v2-tab {
  flex: 1;
  justify-content: center;
  padding: .42rem .5rem;
  border-radius: 8px;
  font-family: var(--ai-font);
  font-size: .76rem;
  font-weight: 600;
  color: var(--ai-ink-soft);
  border: none;
}
.ai-v2-tab:hover { background: rgba(255,255,255,.6); color: var(--ai-ink); }
.ai-v2-tab-active,
.ai-v2-tab-active:hover {
  background: #fff;
  color: var(--ai-accent-deep);
  border: none;
  box-shadow: 0 2px 8px rgba(49,46,129,.12), 0 0 0 1px rgba(99,102,241,.18);
}
.ai-v2-tab-count { background: var(--ai-canvas-2); color: var(--ai-accent-strong); }
.ai-v2-tab-active .ai-v2-tab-count { background: var(--ai-grad); color: #fff; }

/* Pool / overview card */
.ai-v2-pool-card {
  margin: 0 0 .75rem;
  padding: .85rem 1rem;
  background: var(--ai-surface);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-sm);
  box-shadow: var(--ai-shadow-sm);
  animation: ai-fade-up .35s ease both;
}
.ai-v2-pool-card { display: grid; gap: .5rem; }
.ai-v2-pool-overview { color: var(--ai-ink); font-weight: 500; line-height: 1.55; margin: 0; }
.ai-v2-pool-vendors { color: var(--ai-ink-soft); line-height: 1.5; margin: 0; }
.ai-v2-duration-advisory {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  margin: 0;
  padding-top: .5rem;
  border-top: 1px dashed var(--bs-gray-300, #dee2e6);
  color: var(--ai-ink-soft);
  line-height: 1.5;
  font-size: .9em;
}
.ai-v2-duration-advisory svg { flex-shrink: 0; margin-top: .15rem; opacity: .8; }
.ai-v2-duration-advisory em { color: var(--ai-ink-soft); opacity: .8; font-style: italic; }

/* Expected-savings banner */
.ai-v2-savings-summary {
  margin: 0 0 .75rem;
  width: auto;
  padding: .85rem 1rem;
  border: 1px solid var(--ai-pos-border);
  border-radius: var(--ai-radius-sm);
  background: linear-gradient(135deg, var(--ai-pos-bg) 0%, #fff 90%);
  box-shadow: var(--ai-shadow-sm);
}
.ai-v2-savings-kicker { color: var(--ai-pos-deep); font-family: var(--ai-font); letter-spacing: .08em; }
.ai-v2-savings-badge { color: var(--ai-pos-deep); font-size: .92rem; }
.ai-v2-savings-summary p { color: var(--ai-ink-soft); }

/* ════════ Recommendation rows / section cards ═════════════════════════ */
.ai-v2-drawer-section {
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  background: var(--ai-surface);
  margin-bottom: .8rem;
  box-shadow: var(--ai-shadow-sm);
  animation: ai-fade-up .35s ease both;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.ai-v2-drawer-section:hover { box-shadow: var(--ai-shadow-md); border-color: var(--ai-border-strong); }
.ai-v2-section-head {
  padding: .85rem 1rem .7rem;
  border-bottom: 1px solid var(--ai-border);
  background: linear-gradient(180deg, var(--ai-canvas) 0%, #fff 100%);
}
.ai-v2-section-head-top h4 { font-family: var(--ai-font); font-size: .92rem; font-weight: 700; color: var(--ai-ink); }
.ai-v2-section-summary { color: var(--ai-ink-soft); }
.ai-v2-section-rows { padding: 0 1rem; }
.ai-v2-drawer-row { border-top: 1px solid var(--ai-border); padding: .7rem 0; }
.ai-v2-drawer-label { font-family: var(--ai-font); font-weight: 600; color: var(--ai-ink); }
.ai-v2-row-insight { color: var(--ai-ink-soft); }
.ai-v2-rule-help-btn {
  border: 1px solid var(--ai-border-strong);
  color: var(--ai-ink-faint);
}
.ai-v2-rule-help-btn:hover { border-color: var(--ai-accent); color: var(--ai-accent); background: var(--ai-canvas-2); }
.ai-v2-row-effect { color: var(--ai-accent-strong); }

/* current → recommended pills */
.ai-v2-pill-old { background: var(--ai-canvas-2); color: var(--ai-ink-faint); border-radius: var(--ai-radius-xs); }
.ai-v2-pill-arrow { color: var(--ai-accent); font-weight: 700; }
.ai-v2-pill-new {
  background: var(--ai-pos-bg);
  color: var(--ai-pos-deep);
  border: 1px solid var(--ai-pos-border);
  border-radius: var(--ai-radius-xs);
}
.ai-v2-review-badge { background: var(--ai-warn-bg); color: var(--ai-warn-deep); border: 1px solid var(--ai-warn-border); }
.ai-v2-deferred-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--ai-radius-xs);
  background: #eef0fe;
  color: var(--ai-accent-deep);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}
.ai-v2-review-row { background: var(--ai-warn-bg); border-left: 3px solid var(--ai-warn) !important; }

/* Confidence chips */
.ai-v2-conf-high   { background: var(--ai-pos-bg);  color: var(--ai-pos-deep); }
.ai-v2-conf-medium { background: var(--ai-warn-bg); color: var(--ai-warn-deep); }
.ai-v2-conf-low    { background: var(--ai-neg-bg);  color: var(--ai-neg-deep); }

/* Field highlight while AI writes into the form */
.ai-v2-field-active {
  outline: 2px solid var(--ai-accent);
  outline-offset: 3px;
  background: var(--ai-canvas-2) !important;
  border-radius: var(--ai-radius-xs);
}
.ai-v2-field-changed { border-left: 3px solid var(--ai-accent); background: var(--ai-canvas); border-radius: var(--ai-radius-xs); }
.ai-v2-applied-marker { background: var(--ai-pos-bg); color: var(--ai-pos-deep); }

/* ════════ Diff tab ════════════════════════════════════════════════════ */
.ai-v2-diff-row { border-bottom: 1px solid var(--ai-border); }
.ai-v2-diff-label { font-family: var(--ai-font); color: var(--ai-ink); }
.ai-v2-diff-old { color: var(--ai-ink-faint); }
.ai-v2-diff-arrow { color: var(--ai-accent); }
.ai-v2-diff-new { color: var(--ai-pos-deep); background: var(--ai-pos-bg); border-radius: var(--ai-radius-xs); }

/* ════════ What-if tab ═════════════════════════════════════════════════ */
.ai-v2-whatif-intro p { color: var(--ai-ink-soft); }
.ai-v2-whatif-row {
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-sm);
  background: var(--ai-surface);
  box-shadow: var(--ai-shadow-sm);
}
.ai-v2-whatif-label { font-family: var(--ai-font); color: var(--ai-ink); }
.ai-v2-whatif-compare-strip { border-top: 1px solid var(--ai-border); }
.ai-v2-whatif-col { border-right: 1px solid var(--ai-border); }
.ai-v2-whatif-col-label { color: var(--ai-ink-faint); }
.ai-v2-whatif-col-current { color: var(--ai-ink-faint); }
.ai-v2-whatif-col-rec { color: var(--ai-pos-deep); }
.ai-v2-whatif-input {
  border: 1px solid var(--ai-border-strong);
  border-radius: var(--ai-radius-xs);
  color: var(--ai-ink);
}
.ai-v2-whatif-input:focus { outline: none; border-color: var(--ai-accent); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.ai-v2-whatif-context-area:focus { outline: none; border-color: var(--ai-accent); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.ai-v2-simulate-btn {
  background: var(--ai-grad);
  background-size: 150% 150%;
  font-family: var(--ai-font);
  border-radius: 9px;
  box-shadow: var(--ai-shadow-sm);
  transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
}
.ai-v2-simulate-btn:hover { background: var(--ai-grad); transform: translateY(-1px); box-shadow: var(--ai-shadow-glow); filter: saturate(1.05); }
.ai-v2-apply-scenario-btn {
  border-radius: 9px;
  border: 1px solid var(--ai-pos-border);
  background: var(--ai-pos-bg);
  color: var(--ai-pos-deep);
  font-family: var(--ai-font);
}
.ai-v2-apply-scenario-btn:hover { background: #d4f3e6; }
.ai-v2-whatif-result-panel { border: 1px solid var(--ai-border); background: var(--ai-canvas); border-radius: var(--ai-radius-sm); }
.ai-v2-whatif-combined { font-family: var(--ai-font); color: var(--ai-ink); }
.ai-v2-band-positive { background: var(--ai-pos-bg); color: var(--ai-pos-deep); }
.ai-v2-band-neutral  { background: var(--ai-canvas-2); color: var(--ai-ink-soft); }
.ai-v2-band-warn     { background: var(--ai-warn-bg); color: var(--ai-warn-deep); }
.ai-v2-band-reject   { background: var(--ai-neg-bg); color: var(--ai-neg-deep); }
.ai-v2-verdict-support, .ai-v2-whatif-verdict.ai-v2-verdict-support { background: var(--ai-pos-bg); color: var(--ai-pos-deep); }
.ai-v2-verdict-reject,  .ai-v2-whatif-verdict.ai-v2-verdict-reject  { background: var(--ai-neg-bg); color: var(--ai-neg-deep); }
.ai-v2-verdict-neutral, .ai-v2-verdict-insufficient_data { background: var(--ai-canvas-2); color: var(--ai-ink-soft); }

/* ════════ Ask AI tab ══════════════════════════════════════════════════ */
.ai-v2-ask-prompt-chip {
  border: 1px solid var(--ai-border);
  background: var(--ai-surface);
  color: var(--ai-ink-soft);
  border-radius: var(--ai-pill);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.ai-v2-ask-prompt-chip:hover { background: var(--ai-canvas-2); border-color: var(--ai-accent); color: var(--ai-accent-deep); transform: translateY(-1px); }
.ai-v2-ask-form textarea { border: 1px solid var(--ai-border); border-radius: var(--ai-radius-sm); }
.ai-v2-ask-form textarea:focus { outline: none; border-color: var(--ai-accent); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.ai-v2-ask-submit {
  background: var(--ai-grad);
  background-size: 150% 150%;
  font-family: var(--ai-font);
  border-radius: 8px;
  transition: transform .14s ease, box-shadow .18s ease;
}
.ai-v2-ask-submit:hover { background: var(--ai-grad); transform: translateY(-1px); box-shadow: var(--ai-shadow-glow); }

/* ════════ Family suggestion rail ══════════════════════════════════════ */
.ai-v2-family-apply-btn {
  background: var(--ai-grad);
  background-size: 150% 150%;
  font-family: var(--ai-font);
  border-radius: 8px;
  padding: 7px 16px;
  box-shadow: var(--ai-shadow-sm);
  transition: transform .14s ease, box-shadow .18s ease;
}
.ai-v2-family-apply-btn:hover { background: var(--ai-grad); transform: translateY(-1px); box-shadow: var(--ai-shadow-glow); }
.ai-v2-family-drawer .ai-v2-drawer-header { flex-direction: row; align-items: center; justify-content: space-between; }
.ai-v2-family-hero {
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
  border-radius: var(--ai-radius);
  background: var(--ai-grad-soft);
  border: 1px solid var(--ai-border);
}
.ai-v2-family-hero-name { font-family: var(--ai-font); font-size: 1.4rem; letter-spacing: -.02em; color: var(--ai-ink); }
.ai-v2-badge-fit { background: var(--ai-grad); color: #fff; }
.ai-v2-badge-quality { background: var(--ai-canvas-2); color: var(--ai-ink-soft); }
.ai-v2-family-headline { font-family: var(--ai-font); color: var(--ai-ink); }
.ai-v2-family-narrative { color: var(--ai-ink-soft); }
.ai-v2-family-switch-note { background: var(--ai-warn-bg); border: 1px solid var(--ai-warn-border); border-radius: var(--ai-radius-sm); }
.ai-v2-family-switch-note p { color: var(--ai-warn-deep); }
.ai-v2-family-stats {
  background: var(--ai-surface);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-sm);
  box-shadow: var(--ai-shadow-sm);
}
.ai-v2-family-stat strong { font-family: var(--ai-font); font-size: 1.2rem; color: var(--ai-accent-deep); }
.ai-v2-family-stat + .ai-v2-family-stat { border-left: 1px solid var(--ai-border); }
.ai-v2-evidence-label { color: var(--ai-accent-strong); font-family: var(--ai-font); }
.ai-v2-evidence-list li { color: var(--ai-ink-soft); }
.ai-v2-alt-card {
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius-sm);
  background: var(--ai-surface);
  box-shadow: var(--ai-shadow-sm);
  transition: box-shadow .18s ease, transform .14s ease;
}
.ai-v2-alt-card:hover { box-shadow: var(--ai-shadow-md); transform: translateY(-1px); }
.ai-v2-alt-name { font-family: var(--ai-font); color: var(--ai-ink); }
.ai-v2-alt-score { background: var(--ai-canvas-2); color: var(--ai-accent-strong); }
/* Alternatives merged into the Overview tab */
.ai-v2-family-alts-section { border-top: 1px solid var(--ai-border); margin-top: .25rem; }
.ai-v2-family-alts-heading {
  font-family: var(--ai-font);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ai-accent-strong);
  padding: .9rem .75rem .1rem;
}

/* ════════ Info popovers ═══════════════════════════════════════════════ */
.ai-v2-applied-marker:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(14,159,110,.16);
}
.ai-v2-info-popover {
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  box-shadow: var(--ai-shadow-lg);
  animation: ai-pop-in .16s ease both;
  overflow: hidden;
}
.ai-v2-info-popover::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ai-grad); }
.ai-v2-popover-headline { font-family: var(--ai-font); color: var(--ai-ink); }
.ai-v2-popover-effect, .ai-v2-info-effect { color: var(--ai-accent-strong); }
.ai-v2-insight-popover { border: 1px solid var(--ai-border); border-radius: var(--ai-radius); box-shadow: var(--ai-shadow-lg); animation: ai-pop-in .16s ease both; }

/* ════════ Skip-animation pill ═════════════════════════════════════════ */
.ai-v2-skip-anim-btn {
  background: rgba(19,26,43,.86);
  border-radius: var(--ai-pill);
  font-family: var(--ai-font);
  font-weight: 600;
  box-shadow: var(--ai-shadow-lg);
  backdrop-filter: blur(8px);
}
.ai-v2-skip-anim-btn:hover { background: rgba(19,26,43,.96); }

/* ════════ Fill-values modal ═══════════════════════════════════════════ */
.ai-v2-fillvalues-overlay { background: rgba(19,26,43,.5); backdrop-filter: blur(3px); }
.ai-v2-fillvalues-dialog {
  border-radius: var(--ai-radius);
  box-shadow: var(--ai-shadow-lg);
  animation: ai-pop-in .2s cubic-bezier(.22,1,.36,1) both;
  border: 1px solid var(--ai-border);
}
.ai-v2-fillvalues-header {
  background: var(--ai-grad-soft);
  border-bottom: 1px solid var(--ai-border);
  position: relative;
}
.ai-v2-fillvalues-header::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ai-grad); }
.ai-v2-fillvalues-header h3 { font-family: var(--ai-font); color: var(--ai-ink); }
.ai-v2-fill-apply-all-btn {
  background: var(--ai-grad);
  background-size: 150% 150%;
  font-family: var(--ai-font);
  border-radius: 9px;
  transition: transform .14s ease, box-shadow .18s ease;
}
.ai-v2-fill-apply-all-btn:hover { background: var(--ai-grad); transform: translateY(-1px); box-shadow: var(--ai-shadow-glow); }
.ai-v2-fill-done-btn { border: 1.5px solid var(--ai-border-strong); border-radius: 9px; color: var(--ai-ink-soft); }
.ai-v2-fill-spinner { border-top-color: var(--ai-accent); }

/* Value / anchor cards inside the modal & rail */
.ai-v2-value-card, .ai-v2-anchor-item { border: 1px solid var(--ai-border); border-radius: var(--ai-radius-sm); box-shadow: var(--ai-shadow-sm); }
.ai-v2-value-card h4, .ai-v2-anchor-form h4 { font-family: var(--ai-font); color: var(--ai-ink); }
.ai-v2-value-story { border-left: 3px solid var(--ai-accent); background: var(--ai-canvas-2); color: var(--ai-accent-deep); border-radius: var(--ai-radius-xs); }
.ai-v2-value-vendor, .ai-v2-value-vendor-reason { color: var(--ai-accent-strong); }
.ai-v2-value-filled { border-color: var(--ai-pos) !important; box-shadow: 0 0 0 2px rgba(14,159,110,.16); }
.ai-v2-value-marker { background: var(--ai-pos-bg); color: var(--ai-pos-deep); }
.ai-v2-anchor-input:focus, .ai-v2-anchor-instruction-area:focus,
.ai-v2-anchor-description-input:focus, .ai-v2-anchor-reason-input:focus {
  outline: none; border-color: var(--ai-accent); box-shadow: 0 0 0 3px rgba(99,102,241,.18);
}
.ai-v2-anchor-actions button, .ai-v2-apply-group-btn {
  background: var(--ai-grad); border: none; font-family: var(--ai-font); border-radius: 8px;
}
.ai-v2-anchor-actions button + button { background: var(--ai-canvas-2); color: var(--ai-ink-soft); }
.ai-v2-anchor-trend-row i { background: var(--ai-accent); }

/* ════════ Agentic progress panel ══════════════════════════════════════ */
.agent-progress-panel {
  width: clamp(380px, 30vw, 460px);
  border: 1px solid var(--ai-border);
  border-radius: var(--ai-radius);
  box-shadow: var(--ai-shadow-lg);
  overflow: hidden;
  animation: ai-pop-in .26s cubic-bezier(.22,1,.36,1) both;
}
.agent-progress-header {
  background: var(--ai-grad-vivid);
  background-size: 160% 160%;
  font-family: var(--ai-font);
  font-weight: 700;
  letter-spacing: .01em;
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
}
.agent-progress-header::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%);
  background-size: 220% 100%;
  animation: ai-sheen 5s ease-in-out infinite;
}
.agent-progress-title { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.agent-progress-title::before { content: '✦'; animation: ai-twinkle 2.8s ease-in-out infinite; }
.agent-progress-close { position: relative; z-index: 1; color: rgba(255,255,255,.8); }
.agent-progress-close:hover { color: #fff; }
.agent-phase-row { padding: 7px 16px; }
.agent-phase-row[data-status="in_progress"] { color: var(--ai-accent-strong); }
.agent-phase-row[data-status="in_progress"] .agent-phase-icon { animation: ai-twinkle 1.4s ease-in-out infinite; }
.agent-phase-row[data-status="done"] { color: var(--ai-pos-deep); }
.agent-phase-label { font-family: var(--ai-font); font-weight: 500; }
.agent-value-row__value { color: var(--ai-accent-strong); font-weight: 600; }
.agent-rule-decided { color: var(--ai-pos-deep); }

/* ════════ VPI + sequence cards ════════════════════════════════════════ */
.vpi-card { border-radius: var(--ai-radius); box-shadow: var(--ai-shadow-sm); }
.vpi-headline { font-family: var(--ai-font); color: var(--ai-ink); }
.vpi-pill { font-family: var(--ai-font); }
.ai-v2-drawer-insights { padding: 0; }
.agent-seq-card { border-left-color: var(--ai-accent) !important; }
.agent-seq-pill { background: var(--ai-grad) !important; }
.agent-seq-no { background: var(--ai-grad); border-radius: 7px; }

/* ════════ Vendor "Compare" header button + compare-modal scope note ════ */
.vendor-compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--ai-border-strong);
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--ai-grad) border-box;
  border-color: transparent;
  color: var(--ai-accent-strong);
  font-family: var(--ai-font);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.vendor-compare-btn .material-symbols-outlined { font-size: 18px; line-height: 1; }
.vendor-compare-btn:hover {
  background: var(--ai-grad) border-box, var(--ai-grad) border-box;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--ai-shadow-glow);
}
.vendor-compare-btn:active { transform: translateY(0); }
.vpp-compare-scope-note {
  font-size: .76rem;
  color: var(--ai-ink-soft);
  margin-top: 2px;
}
body.vendor-compare-modal-open .modal-backdrop {
  z-index: 10000;
}
#vendorCompareModal {
  z-index: 10010;
}
@media (max-width: 640px) { .vendor-compare-btn-label { display: none; } }

/* ════════ Responsive — below 1024px the rail becomes a full overlay ════ */
@media (max-width: 1024px) {
  :root { --ai-rail-w: min(440px, 100vw); }
}
@media (max-width: 720px) {
  .ai-v2-drawer-overlay { width: 100%; }
  .ai-v2-drawer { box-shadow: none; }
}

/* Respect reduced-motion: drop the always-on ambient animations */
@media (prefers-reduced-motion: reduce) {
  .ai-fab, .ai-fab-icon, .ai-suggest-family-icon,
  .ai-v2-drawer-kicker::before, .agent-progress-header::after,
  .agent-progress-title::before, .ai-fab::after,
  .agent-phase-row[data-status="in_progress"] .agent-phase-icon {
    animation: none !important;
  }
  .ai-v2-drawer, .ai-v2-info-popover, .ai-v2-insight-popover,
  .ai-v2-fillvalues-dialog, .agent-progress-panel,
  .ai-v2-pool-card, .ai-v2-drawer-section { animation-duration: .001ms !important; }
}

/* Ask AI sidebar refresh */
.ai-v2-drawer {
  --ask-accent: #635bff;
  --ask-accent-strong: #4338ca;
  --ask-ink: #111827;
  --ask-muted: #667085;
  --ask-border: #dfe5f2;
  --ask-soft: #f6f7fb;
  background: #f7f8fc;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

.ai-v2-drawer-header {
  position: relative;
  padding: 1.05rem 1.25rem 1rem;
  background:
    radial-gradient(circle at 92% 0%, rgba(99, 91, 255, .12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
  border-bottom: 1px solid var(--ask-border);
}

.ai-v2-drawer-header::before {
  height: 3px;
  background: linear-gradient(90deg, #6d5dfc 0%, #8b5cf6 48%, #22c55e 100%);
}

.ai-v2-drawer-kicker {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ai-v2-drawer-subtitle {
  margin-top: .2rem;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ask-ink);
}

.ai-v2-savings-chip {
  min-height: 38px;
  padding: .45rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, .32);
  background: linear-gradient(135deg, #ecfdf5 0%, #dffcf0 52%, #f8fffb 100%);
  box-shadow: 0 12px 30px rgba(16, 185, 129, .16), inset 0 1px 0 rgba(255,255,255,.9);
}

.ai-v2-savings-chip-label {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #047857;
}

.ai-v2-savings-chip-value {
  font-size: 1.05rem;
  font-weight: 900;
  color: #047857;
}

.ai-v2-package-confidence,
.ai-v2-llm-pill {
  padding: .32rem .62rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  box-shadow: none;
}

.ai-v2-package-confidence {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.ai-v2-llm-pill {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.ai-v2-drawer-tabs {
  margin: .85rem 1.25rem .45rem;
  padding: .28rem;
  border: 1px solid #e5e7f0;
  border-radius: 14px;
  background: #eceffa;
  box-shadow: inset 0 1px 1px rgba(17, 24, 39, .04);
}

.ai-v2-tab {
  position: relative;
  min-height: 34px;
  border-radius: 10px;
  color: #5d667a;
  transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .12s ease;
}

.ai-v2-tab:hover {
  background: rgba(255,255,255,.58);
  color: var(--ask-ink);
}

.ai-v2-tab-active,
.ai-v2-tab-active:hover {
  background: #ffffff;
  color: var(--ask-accent-strong);
  box-shadow: 0 7px 18px rgba(67, 56, 202, .12), 0 0 0 1px rgba(99, 91, 255, .16);
}

.ai-v2-tab-active::after {
  content: none;
}

.ai-v2-drawer.ai-v2-ask-active .ai-v2-drawer-scroll {
  padding: .55rem 1.25rem 1.05rem;
  background: linear-gradient(180deg, #f7f8fc 0%, #f3f5fb 100%);
}

.ai-v2-ask-panel {
  padding: 0;
  gap: .8rem;
}

.ai-v2-ask-thread {
  min-height: 320px;
  padding: 1.1rem 1rem 1rem;
  gap: .78rem;
  border: 1px solid #e2e7f3;
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(99, 91, 255, .08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f9faff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 32px rgba(17, 24, 39, .06);
}

.ai-v2-chat-row {
  gap: .65rem;
  align-items: flex-end;
}

.ai-v2-chat-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #6d5dfc, #8b5cf6);
  box-shadow: 0 7px 18px rgba(99, 91, 255, .22);
}

.ai-v2-chat-bubble {
  width: fit-content;
  max-width: min(78%, 430px);
  padding: .38rem .55rem;
  border-radius: 12px;
  font-size: .84rem;
  line-height: 1.5;
  white-space: normal;
  box-shadow: 0 4px 12px rgba(17, 24, 39, .06);
}

.ai-v2-chat-bubble-user {
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
}

.ai-v2-chat-bubble-ai {
  border-bottom-left-radius: 4px;
  border: 1px solid #e4e8f2;
  background: #ffffff;
  color: #1f2937;
}

.ai-v2-ask-answer p {
  margin: 0;
}

.ai-v2-ask-answer strong {
  color: #111827;
  font-weight: 800;
}

.ai-v2-ask-prompts {
  gap: .5rem;
}

.ai-v2-ask-prompts-followup {
  margin-left: 40px;
  padding-top: .1rem;
}

.ai-v2-ask-prompt-chip {
  padding: .45rem .72rem;
  border-radius: 999px;
  border: 1px solid #dde4f1;
  background: rgba(255,255,255,.92);
  color: #536078;
  font-size: .74rem;
  font-weight: 700;
  box-shadow: 0 2px 7px rgba(17, 24, 39, .04);
  transition: transform .14s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, background .16s ease;
}

.ai-v2-ask-prompt-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 91, 255, .42);
  background: #ffffff;
  color: var(--ask-accent-strong);
  box-shadow: 0 9px 20px rgba(67, 56, 202, .12);
}

.ai-v2-ask-form {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: .55rem;
  padding: .72rem;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, .07);
}

.ai-v2-ask-form textarea {
  min-height: 46px;
  max-height: 120px;
  padding: .72rem .8rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--ask-ink);
  resize: none;
}

.ai-v2-ask-form textarea::placeholder {
  color: #8b95a7;
}

.ai-v2-ask-form:focus-within {
  border-color: rgba(99, 91, 255, .55);
  box-shadow: 0 0 0 4px rgba(99, 91, 255, .13), 0 16px 36px rgba(17, 24, 39, .08);
}

.ai-v2-ask-form textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.ai-v2-ask-submit {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 .85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 10px 22px rgba(79, 70, 229, .24);
}

.ai-v2-ask-submit svg {
  width: 15px;
  height: 15px;
}

.ai-v2-ask-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(79, 70, 229, .3);
}

/* ════════ Pre-recommendation evidence brief ═══════════════════════════
   A dense procurement worksheet: warm paper, ink rules, and one safety-green
   action. It deliberately looks different from the AI result rail because
   this is buyer-owned evidence, not model output. */
.recommendation-context-inline {
  --rc-ink: #17231f;
  --rc-muted: #64736d;
  --rc-paper: #fbfaf5;
  --rc-rule: #d9ddd3;
  --rc-green: #0a7257;
  --rc-green-dark: #07533f;
  --rc-amber: #d99b28;
  overflow: hidden;
  border: 1px solid #ccd7d0;
  border-radius: 14px;
  color: var(--rc-ink);
  background: linear-gradient(110deg, #f6f8f3 0%, #fffaf0 100%);
  box-shadow: 0 8px 24px rgba(30, 53, 43, .07);
}

.recommendation-context-inline-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 13px;
  align-items: center;
  min-height: 76px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
}
.recommendation-context-inline-summary::-webkit-details-marker { display: none; }
.recommendation-context-inline-summary::after {
  content: "+";
  grid-column: 4;
  color: var(--rc-green);
  font: 400 24px/1 "Sora", sans-serif;
}
.recommendation-context-inline[open] .recommendation-context-inline-summary::after { content: "−"; }
.rc-inline-mark { color: var(--rc-green); font-size: 13px; }
.rc-inline-copy strong { display: block; font: 700 14px/1.3 "Sora", sans-serif; }
.rc-inline-copy strong em {
  margin-left: 7px;
  color: var(--rc-muted);
  font: 700 8px/1 "Sora", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rc-inline-copy small { display: block; margin-top: 4px; color: var(--rc-muted); font-size: 11px; }
.rc-inline-state {
  padding: 6px 9px;
  border: 1px solid #c9d5cd;
  border-radius: 999px;
  color: #476157;
  background: rgba(255,255,255,.75);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.recommendation-context-inline.has-context .rc-inline-state { color: #fff; background: var(--rc-green); border-color: var(--rc-green); }
.recommendation-context-inline.has-conflict .rc-inline-state { color: #6b4510; background: #fff0c4; border-color: #e4c26c; }
.recommendation-context-inline > .recommendation-context-shell {
  width: 100%;
  max-height: none;
  height: auto;
  display: block;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--rc-rule);
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.recommendation-context-inline .recommendation-context-header { padding: 0 22px; }
.recommendation-context-inline .recommendation-context-body { max-height: 680px; padding: 20px 22px 24px; }
.recommendation-context-inline .rc-evidence-strip { margin-top: 14px; }

/* Compact auction brief: quiet, decision-led and intentionally free of pricing forms. */
.recommendation-context-inline .recommendation-context-body { max-height: none; }
.rc-brief { display: grid; gap: 16px; }
.rc-upload-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px; border: 1px solid var(--rc-green); border-radius: 999px;
  color: #fff; background: var(--rc-green); font: 700 11px/1 "Sora", sans-serif; cursor: pointer;
  box-shadow: 0 6px 16px rgba(10, 114, 87, .16);
}
.rc-upload-action:hover { background: var(--rc-green-dark); }
/* ---- Compact auction brief -------------------------------------------
   One verdict line, one document strip, one dense item table. The card-per-item
   layout this replaces cost roughly six times the height for the same content,
   and at fifty items no two rows were ever comparable on screen. */
.rc-verdict { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 10px 14px; border: 1px solid #cfe0d7; border-radius: 11px; background: #edf7f2; }
.rc-verdict.is-caution { border-color: #ead7a8; background: #fff8e8; }
.rc-verdict.is-improve { border-color: #e6c3b8; background: #fdf1ed; }
.rc-verdict.is-unknown { border-color: #d9ddd3; background: #f5f6f2; }
.rc-verdict-chip { padding: 4px 9px; border-radius: 999px; color: #fff; background: #0b8563; font: 700 8px/1.2 "Sora", sans-serif; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.rc-verdict.is-caution .rc-verdict-chip { background: #d79a20; }
.rc-verdict.is-improve .rc-verdict-chip { background: #bf573e; }
.rc-verdict.is-unknown .rc-verdict-chip { background: #93a39c; }
.rc-verdict > strong { min-width: 0; font: 700 12px/1.3 "Sora", sans-serif; }
.rc-verdict-metrics { display: flex; flex-wrap: wrap; gap: 14px; }
.rc-verdict-metrics > span { display: grid; gap: 1px; }
.rc-verdict-metrics small { color: var(--rc-muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.rc-verdict-metrics strong { color: #173d30; font: 700 13px/1.1 "Sora", sans-serif; }
.rc-verdict-why { grid-column: 1 / -1; }
.rc-verdict-why > summary { color: #3c5f52; font-size: 9px; font-weight: 700; cursor: pointer; }
.rc-verdict-why ul { display: grid; gap: 4px; margin: 6px 0 0; padding-left: 16px; color: #40554d; font-size: 10px; }

.rc-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px solid #d3ddd7; border-radius: 999px; color: #3c5f52; background: #fff; font-size: 9px; font-weight: 700; cursor: pointer; }
.rc-chip:hover { border-color: #a9c6b9; }
.rc-chip.is-active { border-color: var(--rc-green); color: #fff; background: var(--rc-green); }
.rc-chip span { padding: 1px 5px; border-radius: 999px; background: rgba(0,0,0,.09); font-size: 8px; }
.rc-chip.is-active span { background: rgba(255,255,255,.24); }

.rc-items-workspace { display: grid; gap: 9px; }
.rc-items-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rc-items-search input { width: min(260px, 45vw); height: 30px; padding: 0 10px; border: 1px solid #ced8d2; border-radius: 8px; background: #fff; font-size: 10px; }
.rc-bulk-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-bulk-controls > span { color: var(--rc-muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.rc-bulk-controls select { height: 28px; padding: 0 6px; border: 1px solid #ccd7d1; border-radius: 7px; background: #fff; font-size: 9px; }

.rc-item-table-wrap { overflow-x: auto; border: 1px solid #dce4de; border-radius: 10px; }
.rc-item-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.rc-item-table thead th { position: sticky; top: 0; z-index: 1; padding: 7px 9px; border-bottom: 1px solid #dce4de; color: var(--rc-muted); background: #f4f8f5; text-align: left; font: 700 8px/1.2 "Sora", sans-serif; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.rc-item-table tbody th, .rc-item-table tbody td { padding: 6px 9px; border-bottom: 1px solid #eef2ef; vertical-align: middle; text-align: left; }
.rc-item-table tbody tr:last-child th, .rc-item-table tbody tr:last-child td { border-bottom: 0; }
.rc-item-table tbody tr:hover { background: #fafcfa; }
.rc-item-table tbody tr.is-open { background: #f1f7f3; }
.rc-item-table tbody th { min-width: 190px; font-weight: 400; }
.rc-item-table tbody th strong { display: block; font: 700 11px/1.3 "Sora", sans-serif; }
.rc-item-table tbody th small { display: block; color: var(--rc-muted); font-size: 9px; }
.rc-row-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.rc-row-flags em { padding: 1px 5px; border-radius: 4px; color: #8a5a20; background: #fdf3e0; font-size: 8px; font-style: normal; font-weight: 700; }
.rc-item-table select { width: 100%; min-width: 96px; height: 28px; padding: 0 6px; border: 1px solid #d5ded8; border-radius: 6px; background: #fff; font-size: 9px; }
.rc-cell-qty { width: 96px; }
.rc-cell-history { width: 118px; }
.rc-cell-actions { width: 118px; white-space: nowrap; }
.rc-history-line { display: grid; gap: 1px; color: #445c52; font-size: 10px; font-weight: 600; }
.rc-history-line small { color: var(--rc-muted); font-size: 8px; font-weight: 500; }
.rc-history-line.is-muted { color: var(--rc-muted); font-weight: 500; }

/* Quantity against observed history, as a position rather than four numbers. */
.rc-qty { display: grid; gap: 3px; }
.rc-qty-track { position: relative; height: 4px; border-radius: 2px; background: #dfe8e3; }
.rc-qty-track i { position: absolute; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--rc-green); transform: translate(-50%, -50%); }
.rc-qty small { color: #445c52; font-size: 9px; font-weight: 600; }
.rc-qty.is-below_range .rc-qty-track i, .rc-qty.is-above_range .rc-qty-track i { background: #d79a20; }
.rc-qty.is-unknown { color: var(--rc-muted); }

.rc-row-btn { height: 24px; padding: 0 8px; border: 1px solid #d3ddd7; border-radius: 6px; color: #3c5f52; background: #fff; font-size: 8px; font-weight: 700; cursor: pointer; }
.rc-row-btn:hover { border-color: #a9c6b9; }
.rc-row-btn.is-set { border-color: var(--rc-green); color: var(--rc-green); }
.rc-note-row td { background: #f7faf8; }
.rc-note-row label { display: grid; gap: 4px; color: var(--rc-muted); font-size: 9px; font-weight: 700; }
.rc-note-row textarea { width: 100%; padding: 7px 9px; border: 1px solid #d5ded8; border-radius: 7px; background: #fff; font-size: 10px; resize: vertical; }

.rc-item-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; }
.rc-item-pagination button { min-width: 72px; height: 27px; border: 1px solid #cbd7d1; border-radius: 7px; color: #24483b; background: #fff; font-size: 9px; font-weight: 700; }
.rc-item-pagination button:disabled { opacity: .42; cursor: not-allowed; }
.rc-item-pagination span { color: var(--rc-muted); font-size: 9px; }
.rc-items-empty { margin: 0; padding: 22px; border: 1px dashed #cfd9d3; border-radius: 10px; color: var(--rc-muted); text-align: center; font-size: 11px; }

/* One shared detail region, so page height does not grow with the selection. */
.rc-item-detail:empty { display: none; }
.rc-item-evidence { padding: 12px; border: 1px solid #dce4de; border-radius: 10px; background: #f7faf8; }
.rc-item-evidence-head { display: flex; align-items: center; gap: 10px; }
.rc-item-evidence-head > strong { flex: 1; font: 700 11px/1.3 "Sora", sans-serif; }
.rc-item-evidence-head > span { padding: 3px 7px; border-radius: 999px; color: #466258; background: #e6eee9; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.rc-item-evidence-head button { width: 22px; height: 22px; border: 0; border-radius: 6px; color: var(--rc-muted); background: transparent; font-size: 14px; cursor: pointer; }
.rc-evidence-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 7px; margin-top: 9px; }
.rc-evidence-stats > span { display: grid; gap: 2px; padding: 7px 8px; border: 1px solid #e1e7e2; border-radius: 7px; background: #fff; }
.rc-evidence-stats small { color: var(--rc-muted); font-size: 8px; text-transform: uppercase; }
.rc-evidence-stats strong { color: #243c33; font-size: 10px; text-transform: capitalize; }
.rc-evidence-note { margin: 8px 0 0; color: #735f3b; font-size: 10px; }
.rc-price-bands { margin-top: 11px; overflow-x: auto; }
.rc-price-bands > strong { font-size: 10px; }
.rc-price-bands table { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 9px; }
.rc-price-bands th, .rc-price-bands td { padding: 5px 8px; border-bottom: 1px solid #e1e7e2; text-align: left; }
.rc-price-bands th { color: var(--rc-muted); font-weight: 700; text-transform: uppercase; }

.rc-auction-characteristics { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(150px, .45fr) minmax(320px, 1.4fr); gap: 12px; padding: 13px 14px; border: 1px solid var(--rc-rule); border-radius: 11px; background: rgba(255,255,255,.64); }
.rc-conditions-field textarea { min-height: 56px; resize: vertical; }

/* Documents: staged handles, never uploads. A chip is removable until read. */
.rc-documents-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rc-document-empty { flex: 1; margin: 0; color: var(--rc-muted); font-size: 10px; }
.rc-document { display: inline-grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 7px; align-items: center; padding: 5px 8px; border: 1px solid #cad8d0; border-radius: 8px; background: #fff; }
.rc-document-icon { grid-row: span 2; color: var(--rc-green); font-weight: 800; }
.rc-document strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.rc-document small { grid-column: 2; color: var(--rc-muted); font-size: 8px; }
.rc-document button { grid-row: span 2; width: 18px; height: 18px; border: 0; border-radius: 5px; color: var(--rc-muted); background: transparent; font-size: 13px; cursor: pointer; }
.rc-document button:hover { color: #b74732; background: #fdeeea; }
.rc-document.is-staged { border-style: dashed; }
.rc-document.is-processing .rc-document-icon { display: inline-block; animation: rcDocumentSpin 1s linear infinite; }
.rc-document.is-partial .rc-document-icon { color: #d79a20; }
.rc-document.is-failed { border-color: #e4b8ad; background: #fff4f1; }
.rc-document.is-failed .rc-document-icon { color: #b74732; }
.rc-documents .rc-import-message { flex-basis: 100%; margin: 0; }
@keyframes rcDocumentSpin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .rc-verdict { grid-template-columns: auto 1fr; }
  .rc-verdict-metrics { grid-column: 1 / -1; }
  .rc-auction-characteristics { grid-template-columns: 1fr; }
  .rc-items-toolbar { align-items: stretch; flex-direction: column; }
  .rc-items-search input { width: 100%; }
}

@media (max-width: 620px) {
  .rc-upload-action { justify-self: start; }
  .rc-bulk-controls { width: 100%; }
  .rc-bulk-controls select { flex: 1; }
}

.recommendation-context-modal {
  --rc-ink: #17231f;
  --rc-muted: #64736d;
  --rc-paper: #fbfaf5;
  --rc-rule: #d9ddd3;
  --rc-green: #0a7257;
  --rc-green-dark: #07533f;
  --rc-amber: #d99b28;
  position: fixed;
  inset: 0;
  z-index: 1085;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 8%, rgba(217, 155, 40, .12), transparent 30%),
    rgba(13, 24, 20, .72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.recommendation-context-modal.is-open {
  opacity: 1;
  visibility: visible;
}

body.recommendation-context-open { overflow: hidden; }

.recommendation-context-shell {
  width: min(1240px, 96vw);
  max-height: min(900px, 94vh);
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
  overflow: hidden;
  color: var(--rc-ink);
  background-color: var(--rc-paper);
  background-image: linear-gradient(rgba(23, 35, 31, .025) 1px, transparent 1px);
  background-size: 100% 32px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 18px;
  box-shadow: 0 34px 90px rgba(3, 12, 8, .38);
  transform: translateY(14px) scale(.992);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}

.recommendation-context-modal.is-open .recommendation-context-shell {
  transform: translateY(0) scale(1);
}

.recommendation-context-header {
  padding: 22px 28px 0;
  background: rgba(251, 250, 245, .96);
  border-bottom: 1px solid var(--rc-rule);
}

.rc-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--rc-green);
  font: 700 10px/1.2 "Sora", sans-serif;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.rc-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.rc-heading-row h2 { margin: 0; font: 700 clamp(22px, 2.5vw, 32px)/1.12 "Sora", sans-serif; letter-spacing: -.035em; }
.rc-title-optional { display: inline-block; margin-left: 7px; padding: 4px 7px; vertical-align: middle; border: 1px solid var(--rc-rule); border-radius: 999px; color: var(--rc-muted); font: 700 8px/1 "Sora", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.rc-heading-row p { max-width: 720px; margin: 8px 0 0; color: var(--rc-muted); font-size: 13px; }

.rc-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--rc-rule);
  border-radius: 50%;
  color: var(--rc-ink);
  background: transparent;
  font-size: 26px;
  line-height: 1;
}
.rc-close:hover { border-color: #9ca8a2; background: #fff; }

.rc-evidence-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  margin-top: 16px;
  padding: 7px 11px;
  color: #40534b;
  background: #eef2eb;
  border: 1px solid #dce3d9;
  border-radius: 8px;
  font-size: 11px;
}
.rc-evidence-strip.is-error { color: #8a392f; background: #fff0ed; border-color: #f1c9c2; }
.rc-evidence-strip.is-ready { color: #175c49; background: #e8f4ee; border-color: #c9e2d6; }
.rc-evidence-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--rc-amber); box-shadow: 0 0 0 0 rgba(217, 155, 40, .45); animation: rcPulse 1.7s infinite; }
.rc-evidence-strip.is-ready .rc-evidence-pulse { background: var(--rc-green); animation: none; }
.rc-evidence-strip.is-error .rc-evidence-pulse { background: #bd4a3d; animation: none; }
@keyframes rcPulse { 70% { box-shadow: 0 0 0 7px rgba(217, 155, 40, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 155, 40, 0); } }

.rc-tabs { display: flex; gap: 4px; margin-top: 15px; }
.rc-tab {
  position: relative;
  padding: 12px 15px 13px;
  border: 0;
  color: #708078;
  background: transparent;
  font: 600 11px/1 "Sora", sans-serif;
  letter-spacing: .02em;
}
.rc-tab::after { content: ""; position: absolute; inset: auto 12px -1px; height: 3px; background: transparent; border-radius: 3px 3px 0 0; }
.rc-tab.is-active { color: var(--rc-ink); }
.rc-tab.is-active::after { background: var(--rc-green); }

.recommendation-context-body { overflow: auto; padding: 24px 28px 30px; scrollbar-color: #aab5af transparent; }
.rc-panel { display: none; animation: rcPanelIn .2s ease; }
.rc-panel.is-active { display: block; }
@keyframes rcPanelIn { from { opacity: 0; transform: translateY(4px); } }
.rc-section-intro { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.rc-section-intro h3 { margin: 0 0 5px; font: 700 15px/1.3 "Sora", sans-serif; }
.rc-section-intro p { margin: 0; color: var(--rc-muted); font-size: 12px; }
.rc-count-mark { align-self: flex-start; padding: 6px 9px; border: 1px solid var(--rc-rule); border-radius: 999px; color: var(--rc-muted); background: rgba(255,255,255,.65); font-size: 10px; white-space: nowrap; }

.rc-item-list { display: grid; gap: 12px; }
.rc-item-card { overflow: hidden; border: 1px solid var(--rc-rule); border-radius: 12px; background: rgba(255,255,255,.8); }
.rc-item-card-head { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.4fr); align-items: stretch; border-bottom: 1px solid #e5e8e0; }
.rc-item-identity { padding: 14px 16px; }
.rc-item-code { color: var(--rc-green); font: 700 9px/1.2 "Sora", sans-serif; letter-spacing: .11em; text-transform: uppercase; }
.rc-item-name { margin-top: 5px; font-weight: 700; font-size: 13px; }
.rc-item-meta { margin-top: 5px; color: var(--rc-muted); font-size: 10px; }
.rc-system-fact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #dde4dc; }
.rc-system-stat { padding: 10px 12px; background: #f0f4ed; }
.rc-system-stat span { display: block; color: #6a786f; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.rc-system-stat strong { display: block; margin-top: 4px; color: #26382f; font-size: 11px; }
.rc-item-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px 16px 16px; }
.rc-event-priority {
  display: grid;
  grid-template-columns: minmax(210px, 1.15fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #c9d5cd;
  border-radius: 12px;
  background: linear-gradient(120deg, #edf4ef 0%, #faf8ef 100%);
}
.rc-event-priority-copy { align-self: center; }
.rc-event-priority-copy span { display: block; color: var(--rc-green); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rc-event-priority-copy strong { display: block; margin-top: 5px; font-size: 12px; }
.rc-item-card-compact .rc-item-card-head { border-bottom: 0; }
.rc-item-quick-fields {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(260px, 1.4fr);
  gap: 12px;
  align-items: end;
  padding: 13px 16px 16px;
  border-top: 1px solid #e5e8e0;
}
.rc-item-more { min-width: 0; }
.rc-item-more > summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border: 1px dashed #bfcac3;
  border-radius: 8px;
  color: #376052;
  background: #fafcf9;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  list-style: none;
}
.rc-item-more > summary::-webkit-details-marker { display: none; }
.rc-item-more > summary::after { content: "+"; font-size: 17px; font-weight: 400; }
.rc-item-more[open] { grid-column: 1 / -1; }
.rc-item-more[open] > summary::after { content: "−"; }
.rc-item-more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 13px; }
.rc-field { min-width: 0; }
.rc-field.rc-span-2 { grid-column: span 2; }
.rc-field.rc-span-4 { grid-column: 1 / -1; }
.rc-field label { display: block; margin-bottom: 5px; color: #4f5e57; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.rc-field input, .rc-field select, .rc-field textarea,
.rc-cell input, .rc-cell select {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #cfd6ce;
  border-radius: 7px;
  color: var(--rc-ink);
  background: #fff;
  font-size: 11px;
  outline: none;
}
.rc-field textarea { min-height: 64px; resize: vertical; }
.rc-field input:focus, .rc-field select:focus, .rc-field textarea:focus,
.rc-cell input:focus, .rc-cell select:focus { border-color: var(--rc-green); box-shadow: 0 0 0 3px rgba(10, 114, 87, .1); }
.rc-field-hint { margin-top: 4px; color: #7c8882; font-size: 9px; }

.rc-matrix-wrap { overflow: auto; border: 1px solid var(--rc-rule); border-radius: 12px; background: #fff; }
.rc-matrix { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.rc-matrix th { position: sticky; top: 0; z-index: 3; min-width: 190px; padding: 11px; color: #eef6f2; background: #21372e; border-right: 1px solid rgba(255,255,255,.12); font: 600 10px/1.3 "Sora", sans-serif; text-align: left; }
.rc-matrix th:first-child { left: 0; z-index: 5; min-width: 210px; }
.rc-matrix td { min-width: 190px; vertical-align: top; padding: 10px; border-right: 1px solid #e4e8e1; border-bottom: 1px solid #e4e8e1; background: #fff; }
.rc-matrix td:first-child { position: sticky; left: 0; z-index: 2; background: #f6f6f0; }
.rc-matrix-item strong { display: block; max-width: 185px; font-size: 11px; }
.rc-matrix-item span { display: block; margin-top: 5px; color: var(--rc-muted); font-size: 9px; }
.rc-cell { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rc-cell .rc-cell-wide { grid-column: 1 / -1; }
.rc-cell label { display: block; margin-bottom: 3px; color: #78847e; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.rc-cell input, .rc-cell select { min-height: 30px; padding: 5px 6px; font-size: 10px; }
.rc-matrix-note { display: flex; gap: 8px; margin-top: 12px; padding: 10px 12px; color: #65542e; background: #fff7df; border: 1px solid #eddaa5; border-radius: 8px; font-size: 10px; }
.rc-review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.rc-review-grid article { padding: 13px 14px; border: 1px solid #d8ddd7; border-radius: 10px; background: rgba(255,255,255,.8); }
.rc-review-grid span, .rc-review-grid small { display: block; color: var(--rc-muted); font-size: 9px; }
.rc-review-grid span { font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.rc-review-grid strong { display: block; margin: 5px 0 2px; color: var(--rc-ink); font: 700 21px/1 "Sora", sans-serif; }
.rc-review-details { margin-top: 10px; border: 1px solid #d5dbd5; border-radius: 11px; background: rgba(255,255,255,.72); }
.rc-review-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 15px; cursor: pointer; list-style: none; }
.rc-review-details > summary::-webkit-details-marker { display: none; }
.rc-review-details > summary span { color: var(--rc-ink); font-size: 11px; font-weight: 700; }
.rc-review-details > summary small { color: var(--rc-muted); font-size: 9px; }
.rc-review-details > summary::after { content: "+"; color: var(--rc-green); font-size: 18px; }
.rc-review-details[open] > summary::after { content: "−"; }
.rc-review-details .rc-matrix-wrap { margin: 0 12px 12px; }
.rc-review-details .rc-commercial-compact { padding: 2px 15px 15px; }
.rc-review-advanced { border-style: dashed; }
.rc-file-status-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 2px; }
.rc-file-status-list > span { display: flex; gap: 7px; align-items: baseline; padding: 6px 9px; border: 1px solid #d7ddd7; border-radius: 999px; background: #fff; }
.rc-file-status-list strong { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.rc-file-status-list small { color: var(--rc-muted); font-size: 8px; text-transform: uppercase; }
.rc-file-status-list .is-unsupported { border-color: #e5c9bd; background: #fff5f0; }

.rc-auction-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rc-auction-card { grid-column: 1 / -1; padding: 16px; border: 1px solid var(--rc-rule); border-radius: 12px; background: rgba(255,255,255,.78); }
.rc-auction-card h4 { margin: 0 0 12px; font: 700 12px/1.2 "Sora", sans-serif; }
.rc-auction-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rc-decrement-row { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 8px; align-items: end; margin-top: 8px; }
.rc-tier-remove { width: 32px; height: 34px; border: 1px solid #d5d9d2; border-radius: 7px; background: #fff; color: #9a4439; }
.rc-add-tier { margin-top: 9px; border: 0; color: var(--rc-green); background: transparent; font-size: 10px; font-weight: 700; }

.rc-validation { display: none; padding: 9px 28px; color: #873b32; background: #fff0ed; border-top: 1px solid #f0c8c2; font-size: 11px; }
.rc-validation.is-visible { display: block; }
.recommendation-context-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 28px; background: #f1f1ea; border-top: 1px solid var(--rc-rule); }
.recommendation-context-footer p { max-width: 430px; margin: 0; color: var(--rc-muted); font-size: 10px; }
.recommendation-context-footer p strong { color: var(--rc-ink); }
.rc-footer-actions { display: flex; align-items: center; gap: 8px; }
.rc-btn { min-height: 38px; padding: 9px 14px; border: 1px solid transparent; border-radius: 8px; font: 600 10px/1 "Sora", sans-serif; }
.rc-btn-ghost { color: #6b766f; background: transparent; }
.rc-btn-secondary { color: #35443d; background: #fff; border-color: #cfd6ce; }
.rc-btn-primary { display: inline-flex; align-items: center; gap: 22px; color: #fff; background: var(--rc-green); box-shadow: 0 8px 18px rgba(10, 114, 87, .18); }
.rc-btn-primary:hover { background: var(--rc-green-dark); transform: translateY(-1px); }
.rc-btn:disabled { opacity: .55; cursor: wait; transform: none; }

.ai-v2-owner-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #516159;
  background: #eef1ed;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ai-v2-owner-badge.is-buyer_ui,
.ai-v2-owner-badge.is-buyer_upload { color: #07533f; background: #e5f3ec; }
.ai-v2-owner-badge.is-ai_suggested { color: #725416; background: #fff3d2; }
input.is-buyer-owned { border-color: #7ba995 !important; box-shadow: inset 3px 0 0 #0a7257; }

@media (max-width: 900px) {
  .recommendation-context-modal { padding: 0; }
  .recommendation-context-shell { width: 100vw; max-height: 100vh; height: 100vh; border: 0; border-radius: 0; }
  .recommendation-context-header, .recommendation-context-body, .recommendation-context-footer { padding-left: 18px; padding-right: 18px; }
  .rc-item-card-head { grid-template-columns: 1fr; }
  .rc-item-fields, .rc-auction-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-event-priority { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-event-priority-copy { grid-column: 1 / -1; }
  .rc-item-quick-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-item-more { grid-column: 1 / -1; }
  .rc-item-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-field.rc-span-4 { grid-column: 1 / -1; }
  .recommendation-context-footer { align-items: stretch; flex-direction: column; }
  .rc-footer-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .rc-btn-primary { grid-column: 1 / -1; justify-content: space-between; }
}

@media (max-width: 560px) {
  .recommendation-context-inline-summary { grid-template-columns: auto minmax(0, 1fr) auto; }
  .recommendation-context-inline-summary::after { grid-column: 3; }
  .rc-inline-state { display: none; }
  .rc-heading-row p, .recommendation-context-footer p { display: none; }
  .rc-tabs { overflow-x: auto; }
  .rc-tab { white-space: nowrap; }
  .rc-item-fields, .rc-auction-card-grid { grid-template-columns: 1fr; }
  .rc-event-priority, .rc-item-quick-fields, .rc-item-more-grid, .rc-review-grid { grid-template-columns: 1fr; }
  .rc-field.rc-span-2 { grid-column: auto; }
  .rc-system-fact { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .recommendation-context-modal, .recommendation-context-shell, .rc-panel,
  .rc-evidence-pulse { transition: none; animation: none; }
}

.rc-import-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #b9c9c0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3f7f2 0%, #fffaf0 100%);
}

.rc-import-card strong,
.rc-import-card p { display: block; }
.rc-import-card p { margin: 5px 0 0; color: #5f6a64; font-size: 12px; }
.rc-import-card code { color: #245746; }
.rc-import-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #287258;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rc-import-controls { display: flex; gap: 10px; align-items: center; }
.rc-import-controls input[type="file"] {
  max-width: 300px;
  padding: 8px;
  border: 1px solid #cbd4cf;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
}
.rc-import-message {
  margin: -4px 0 14px;
  color: #365a4b;
  font-size: 12px;
}
.rc-confirmed-files { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: -3px 0 14px; }
.rc-confirmed-files > span { color: var(--rc-muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.rc-confirmed-files > strong { max-width: 260px; overflow: hidden; padding: 5px 8px; border: 1px solid #c9d9cf; border-radius: 999px; color: #285c49; background: #eef7f1; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.rc-import-preview {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-left: 4px solid #b57b18;
  border-radius: 8px;
  background: #fff8e8;
}
.rc-import-preview.has-errors { border-left-color: #aa3d32; background: #fff1ef; }
.rc-import-preview > div:first-child { display: flex; gap: 10px; justify-content: space-between; }
.rc-import-preview > div:first-child span { color: #6d6556; font-size: 12px; }
.rc-import-preview ul { margin: 10px 0; padding-left: 20px; color: #5f5547; font-size: 12px; }
.rc-import-preview p { margin: 8px 0; font-size: 12px; }
.rc-import-preview-actions { display: flex; justify-content: flex-end; gap: 8px; }
.rc-imported-parameters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 14px;
}
.rc-imported-parameters span {
  display: flex;
  gap: 7px;
  align-items: baseline;
  padding: 6px 9px;
  border: 1px solid #d8c69e;
  border-radius: 999px;
  background: #fff9e9;
}
.rc-imported-parameters small { color: #756844; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.rc-imported-parameters strong { color: #3e493f; font-size: 12px; }

@media (max-width: 850px) {
  .rc-import-card { grid-template-columns: 1fr; }
  .rc-import-controls { align-items: stretch; flex-direction: column; }
  .rc-import-controls input[type="file"] { max-width: none; width: 100%; }
  .rc-import-preview > div:first-child { align-items: flex-start; flex-direction: column; }
}

/* ════════ Apply bar + kept-rule disclosure ═══════════════════════════════
   Nothing the agent recommends reaches the setup form until the buyer presses
   Apply, so the drawer needs a permanent, unmissable place for that action and
   a clear statement of what has and has not been written yet. */
.ai-v2-drawer-apply-bar {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-top: 1px solid rgba(120, 132, 150, .22);
  background: var(--ai-v2-surface, #fff);
  box-shadow: 0 -8px 22px rgba(16, 24, 40, .08);
}
.ai-v2-apply-note { color: #64748b; font-size: 11px; line-height: 1.45; }
.ai-v2-apply-recommendations-btn {
  flex: 0 0 auto;
  padding: 10px 20px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  font: 700 12px/1 "Sora", system-ui, sans-serif;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ai-v2-apply-recommendations-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(79, 70, 229, .32);
}
.ai-v2-apply-recommendations-btn:disabled { cursor: default; }
.ai-v2-apply-recommendations-btn.is-applied {
  color: #0a7257;
  background: #e7f5ef;
  box-shadow: none;
}

/* Rules already set to the recommended value: present, countable, and out of
   the way of the handful the buyer actually has to decide. */
.ai-v2-kept-rows { margin-top: 4px; border-top: 1px dashed rgba(120, 132, 150, .3); }
.ai-v2-kept-rows > summary {
  padding: 9px 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.ai-v2-kept-rows > summary::-webkit-details-marker { display: none; }
.ai-v2-kept-rows > summary::before { content: "▸ "; color: #94a3b8; }
.ai-v2-kept-rows[open] > summary::before { content: "▾ "; }
.ai-v2-drawer-row.is-unchanged { opacity: .82; }
.ai-v2-pill-kept {
  padding: 4px 10px;
  border: 1px solid rgba(120, 132, 150, .3);
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 600;
}

/* A rule the apply pass will not write. It has to look different from one it
   will, or the drawer states a value the form then contradicts. */
.ai-v2-drawer-row.is-withheld { border-left: 3px solid #d99b28; padding-left: 11px; }
.ai-v2-withheld-badge {
  padding: 3px 8px;
  border: 1px solid #e4c26c;
  border-radius: 999px;
  color: #6b4510;
  background: #fff0c4;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ai-v2-row-withheld {
  margin: 6px 0 0;
  color: #8a6420;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

/* A settled value the model has a specific objection to. It is applied — the
   scorer decided it and 20 rules cascade off it — but the model reads the
   buyer's notes and the scorer does not, so the objection is worth showing. */
.ai-v2-row-reconsider {
  margin: 7px 0 0;
  padding: 8px 11px;
  border-left: 3px solid #4f46e5;
  border-radius: 0 6px 6px 0;
  color: #3730a3;
  background: #eef2ff;
  font-size: 11px;
  line-height: 1.55;
}
.ai-v2-row-reconsider strong { font-weight: 700; }

/* ════════ Editable sequence plan ═════════════════════════════════════════
   Which items share a slot is the engine's analysis of supplier overlap. The
   running order and the timings are the buyer's operational call, so they are
   controls rather than a printed summary. */
.agent-seq-slot.is-editable {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(120, 132, 150, .16);
}
.agent-seq-slot.is-editable:last-child { border-bottom: 0; }
.agent-seq-slot.is-editable .agent-seq-items { flex: 1 1 140px; min-width: 0; }
.agent-seq-field {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}
.agent-seq-input {
  width: 54px;
  padding: 4px 6px;
  border: 1px solid rgba(120, 132, 150, .35);
  border-radius: 6px;
  color: inherit;
  background: #fff;
  font: inherit;
  font-size: 11px;
  text-align: right;
}
.agent-seq-move { display: inline-flex; gap: 3px; }
.agent-seq-move button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(120, 132, 150, .3);
  border-radius: 5px;
  color: #475569;
  background: #fff;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}
.agent-seq-move button:hover:not(:disabled) { border-color: #4f46e5; color: #4f46e5; }
.agent-seq-move button:disabled { opacity: .35; cursor: default; }
.agent-seq-replaces {
  margin: 9px 0 0;
  color: #8a6420;
  font-size: 10px;
  font-weight: 600;
}
