/* Purchase Order Section */
.po-section {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  animation: fadeIn var(--transition-normal);
  background: #f4f6f9; /* Slight background for contrast */
}

/* Inline Loading - shows inside containers instead of blocking the whole page */
.po-inline-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 120px;
}

.po-inline-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: po-spin 0.7s linear infinite;
}

@keyframes po-spin {
  to { transform: rotate(360deg); }
}

/* Common Layout Utilities (scoped or reused) */
.po-flex-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.po-flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.po-mb-12 { margin-bottom: 12px; }
.po-mb-20 { margin-bottom: 20px; }
.po-mb-24 { margin-bottom: 24px; }
.po-mt-8 { margin-top: 8px; }
.po-mt-24 { margin-top: 24px; }

/* Hub Styles */
.po-hub-view {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 20px;
}

.hub-header {
  text-align: center;
  margin-bottom: 16px;
}

.hub-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.hub-header p {
  color: var(--secondary-color);
  font-size: 16px;
}

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

.hub-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: var(--shadow-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hub-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: #e0e0e0;
}

.hub-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.hub-icon-blue { background: #e0f2ff; color: var(--primary-color); }
.hub-icon-cyan { background: #e0f7fa; color: #00acc1; }
.hub-icon-orange { background: #fff7ed; color: #f59e0b; }
.hub-icon-purple { background: #f3e8ff; color: #9333ea; }
.hub-icon-green { background: #dcfce7; color: var(--success-color); }

.hub-info h3 {
  font-size: 20px;
  margin: 0 0 8px;
  color: #333;
}

.hub-info p {
  font-size: 14px;
  color: #777;
  line-height: 1.5;
}

/* Dashboard Styles */
.po-dashboard-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.po-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.po-dash-panel {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid #eef0f2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  height: 600px; /* Fixed height for scroll areas */
  overflow: hidden;
}


.panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fcfcfc;
}

.panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #333;
}

.count-badge {
  background: var(--warning-color);
  color: #333;
  padding: 2px 8px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 700;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Request Item Card */
.req-item-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-fast);
  cursor: default;
  position: relative;
}

.req-partial-badge {
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 6px;
  text-transform: uppercase;
}

.req-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-color: var(--primary-color);
}

.req-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.req-card-id {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 14px;
}

.req-card-date {
  font-size: 12px;
  color: #888;
}

.req-card-meta {
  font-size: 12px;
  color: #555;
  margin-bottom: 12px;
}

.convert-po-btn {
  width: 100%;
  padding: 8px;
  background: #eef2ff;
  color: #4f46e5;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.convert-po-btn:hover {
  background: #4f46e5;
  color: #fff;
}

/* PO List Item */
.po-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #eee;
  padding: 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.po-list-item:hover {
  background: #fafbfc;
  border-color: #ddd;
}

.po-info-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.po-id-text {
  font-weight: 700;
  color: #333;
  font-size: 15px;
}

.po-vendor-text {
  font-size: 13px;
  color: var(--secondary-color);
}

.po-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  margin-left: 12px;
}

.status-draft { background: #e2e8f0; color: #4a5568; }
.status-issued { background: #d1fae5; color: #065f46; }
.status-completed { background: #dbeafe; color: #1e40af; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.po-item-actions {
  display: flex;
  gap: 8px;
}

.icon-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid #eee;
  background: #fff;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-action-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

@media (max-width: 900px) {
  .po-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.po-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.po-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.po-header-actions h1 {
  font-size: 28px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0;
}

.po-controls {
  display: flex;
  gap: 12px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,123,255,0.25);
  transition: all var(--transition-fast);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,123,255,0.35);
}

.secondary-btn {
  background: #fff;
  color: var(--secondary-color);
  border: 1px solid #ddd;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.secondary-btn:hover {
  background: #f8f9fa;
  border-color: #ccc;
}

.po-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.po-card {
  background: var(--card-bg);
  backdrop-filter: var(--blur-main);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-main);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.po-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(255,255,255,0.9);
}

.po-card.full-width {
  grid-column: 1 / -1;
}

.po-card h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #333;
  font-weight: 700;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.input-group.full {
  flex: 100%;
}

.input-group label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
}

.input-group input, .input-group select, .input-group textarea {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.1);
  font-size: 14px;
  background: rgba(255,255,255,0.9);
  transition: all var(--transition-fast);
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0,123,255,0.15);
  background: #fff;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.card-header-row h3 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.add-item-btn {
  background: #e6f9ec;
  color: var(--success-color);
  border: 1px solid #c3e6cb;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.add-item-btn:hover {
  background: var(--success-color);
  color: #fff;
}

/* Table Styles */
.po-table-wrapper {
  overflow-x: auto;
  border: 1px solid #eee;
  border-radius: var(--radius-sm);
}

.po-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.po-table th {
  background: var(--primary-light);
  padding: 12px;
  text-align: left;
  font-weight: 700;
  color: var(--primary-color);
  border-bottom: 2px solid rgba(0, 123, 255, 0.1);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.po-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  vertical-align: middle;
}

.po-table td input {
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.po-table td input:hover, .po-table td input:focus {
  background: #fff;
  border-color: #ddd;
}

.po-table td input.readonly {
  background: #fafafa;
  color: #555;
  text-align: right;
  font-weight: 600;
  pointer-events: none;
}

.po-table td input[type="number"] {
  text-align: center;
}

.del-row-btn {
  background: none;
  border: none;
  color: var(--danger-color);
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  padding: 4px;
}

.del-row-btn:hover {
  opacity: 1;
}

/* Footer Section */
.po-summary-container {
  display: flex;
  gap: 32px;
  margin-top: 16px;
  align-items: flex-start;
}

/* Vendor Dropdown Styling (Reused/Scoped) */
.relative {
  position: relative;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}

.dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f9f9f9;
  font-size: 14px;
  color: #333;
}

.dropdown-item:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.dropdown-item small {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.po-notes-section {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.po-notes-section label {
  font-size: 12px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
}

.po-notes-section textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  resize: vertical;
  background: #fbfbfb;
}

.po-summary {
  flex: 1;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #555;
}

.summary-row.total {
  border-top: 1px dashed #ccc;
  padding-top: 16px;
  margin-top: 8px;
  font-size: 18px;
  color: var(--primary-color);
}

/* PO History Page Enhancements */
.po-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.header-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-controls {
  display: flex;
  gap: 12px;
}

.control-input {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid #ddd;
  font-size: 14px;
  background: #fff;
  transition: all var(--transition-fast);
}

.control-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.control-input.search {
  width: 280px;
}

.po-history-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: transform var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card label {
  font-size: 11px;
  text-transform: uppercase;
  color: #888;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.stat-card span {
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.stat-card span.money {
  color: var(--primary-color);
}

.po-list-header-row {
  display: grid;
  grid-template-columns: 100px 1.5fr 1fr 1fr 100px 120px;
  gap: 16px;
  padding: 0 24px 12px 24px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
}

.po-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.po-history-item {
  display: grid;
  grid-template-columns: 100px 1.5fr 1fr 1fr 100px 120px;
  align-items: center;
  gap: 16px;
  background: #fff;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid #f0f0f0;
  transition: all var(--transition-fast) cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.po-history-item:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  border-color: #e0e0e0;
  z-index: 1;
}

.ph-po-num {
  font-weight: 700;
  color: var(--primary-color);
  font-family: 'Monaco', monospace;
  font-size: 13px;
  background: var(--primary-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  text-align: center;
}

.ph-vendor {
  display: flex;
  flex-direction: column;
}

.ph-vendor strong {
  color: #333;
  font-size: 14px;
}

.ph-vendor span {
  font-size: 12px;
  color: #777;
}

.ph-context {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-date {
  font-size: 12px;
  color: #666;
}

.ph-amount {
  text-align: right;
  font-weight: 700;
  color: #333;
  font-size: 14px;
}

.ph-status {
  text-align: center;
}

.ph-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-xl);
  text-transform: uppercase;
}

.ph-badge.draft { background: #f3f4f6; color: #4b5563; }
.ph-badge.pending-approval { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ph-badge.issued { background: #ecfdf5; color: #047857; border: 1px solid #d1fae5; }
.ph-badge.partial { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.ph-badge.completed { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.ph-badge.cancelled { background: #fef2f2; color: #b91c1c; }

@media (max-width: 900px) {
  .po-list-header-row { display: none; }
  .po-history-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ph-po-num { display: inline-block; width: fit-content; }
  .ph-amount { text-align: left; }
  .ph-status { text-align: left; }
}

/* ========== RFQ Manager Styles ========== */
.rfq-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  background: #fff;
  border-radius: var(--radius-md);
  width: fit-content;
  border: 1px solid #e2e8f0;
}

.rfq-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.rfq-tab:hover {
  color: #334155;
  background: #f1f5f9;
}

.rfq-tab.active {
  background: var(--primary-color);
  color: #fff;
}

.rfq-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.rfq-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid #e2e8f0;
  transition: all var(--transition-fast);
}

.rfq-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.rfq-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.rfq-ref {
  font-family: 'Monaco', monospace;
  font-size: 12px;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.rfq-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  text-transform: uppercase;
}

.rfq-status.open {
  background: #dcfce7;
  color: var(--success-color);
}

.rfq-status.closed {
  background: #f1f5f9;
  color: var(--secondary-color);
}

.rfq-status.awarded {
  background: #dbeafe;
  color: #2563eb;
}

.rfq-title {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 16px;
  line-height: 1.4;
}

.rfq-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.rfq-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--secondary-color);
}

.rfq-items-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.item-tag {
  font-size: 11px;
  padding: 4px 10px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
}

.item-tag.more {
  background: var(--primary-light);
  color: var(--primary-color);
}

.rfq-view-btn {
  width: 100%;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.rfq-view-btn:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.rfq-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 2px dashed #e2e8f0;
}

.rfq-empty-state svg {
  margin-bottom: 16px;
}

.rfq-empty-state h3 {
  font-size: 18px;
  color: #475569;
  margin: 0 0 8px;
}

.rfq-empty-state p {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 20px;
}

/* RFQ Detail View */
.header-subtitle {
  font-size: 14px;
  color: var(--secondary-color);
  font-weight: 400;
}

.rfq-detail-content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 24px;
}

.rfq-detail-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rfq-info-card, .rfq-comparison-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid #e2e8f0;
}

.rfq-info-card h3, .rfq-comparison-card h3 {
  font-size: 14px;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.rfq-quotes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.rfq-comparison-card .rfq-quotes-header h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.rfq-quotes-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rfq-quotes-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--secondary-color);
  user-select: none;
}

.rfq-quotes-select-all input {
  width: 16px;
  height: 16px;
}

.rfq-quotes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rfq-quote-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all var(--transition-fast);
}

.rfq-quote-card:hover {
  border-color: rgba(0, 123, 255, 0.35);
}

.rfq-quote-card.lowest {
  border-color: var(--success-color);
  background: #f0fdf4;
}

.rfq-quote-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 800;
  color: var(--success-color);
  background: #dcfce7;
  border: 1px solid rgba(22, 163, 74, 0.2);
  padding: 4px 8px;
  border-radius: var(--radius-xl);
}

.rfq-quote-top {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
}

.rfq-quote-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rfq-quote-check input {
  width: 16px;
  height: 16px;
}

.rfq-quote-vendor {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rfq-quote-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid rgba(0, 123, 255, 0.16);
}

.rfq-quote-vendor-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rfq-quote-vendor-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rfq-quote-vendor-meta {
  font-size: 12px;
  color: var(--secondary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rfq-quote-total {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}

.rfq-quote-preview {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rfq-quote-preview-item {
  font-size: 12px;
  color: #475569;
}

.rfq-quote-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.rfq-compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin-top: 14px;
  margin-bottom: 10px;
}

.rfq-compare-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--secondary-color);
}

.rfq-compare-subtitle {
  font-size: 12px;
  color: var(--secondary-color);
  margin-top: 2px;
}

.rfq-compare-summary {
  margin-top: 14px;
}

.rfq-compare-summary-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.rfq-compare-summary-card:last-child {
  margin-bottom: 0;
}

.comparison-pos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.comparison-po-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
}

.rfq-compare-summary-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}

.rfq-compare-summary-meta {
  font-size: 12px;
  color: var(--secondary-color);
}

.rfq-compare-summary-vendors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.rfq-compare-vendor-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-xl);
  font-size: 12px;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.rfq-compare-summary-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.modal-card.comparison-modal {
  width: 96vw;
  max-width: 1400px;
  max-height: 90vh;
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.comparison-modal-body {
  padding: 18px 20px 20px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.comparison-modal .detail-section.comparison-section {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.comparison-modal .comparison-table {
  min-width: 980px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
}

.info-row label {
  color: var(--secondary-color);
}

.info-row span {
  color: #1e293b;
  font-weight: 500;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.open {
  background: #dcfce7;
  color: var(--success-color);
}

.rfq-item-row {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  font-size: 13px;
}

.item-name {
  color: #1e293b;
  font-weight: 500;
}

.item-qty {
  color: var(--secondary-color);
}

/* Comparison Table */
.comparison-wrapper {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.comparison-table th {
  background: #f8fafc;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.comparison-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.comparison-table .item-cell {
  color: #1e293b;
}

.comparison-table .item-cell small {
  display: block;
  color: #94a3b8;
  margin-top: 4px;
}

.comparison-table .price-cell {
  text-align: right;
}

.comparison-table .price-cell .unit {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

.comparison-table .price-cell .total {
  display: block;
  font-weight: 700;
  color: #1e293b;
}

.comparison-table .price-cell.no-price {
  color: #cbd5e1;
  text-align: center;
}

.comparison-table .total-row {
  background: #f0fdf4;
}

.comparison-table .total-row td {
  border-top: 2px solid var(--success-color);
}

.no-quotes {
  text-align: center;
  padding: 40px;
  color: #94a3b8;
}

.no-quotes p {
  margin: 0 0 8px;
  font-size: 14px;
}

.no-quotes small {
  font-size: 12px;
}

/* RFQ Create Modal */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.rfq-items-selector, .rfq-vendors-selector {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 8px;
}

.item-checkbox, .vendor-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.item-checkbox:hover, .vendor-checkbox:hover {
  background: #f8fafc;
}

.item-checkbox input[type="checkbox"], .vendor-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.item-checkbox span, .vendor-checkbox span {
  flex: 1;
  font-size: 14px;
  color: #1e293b;
}

.vendor-checkbox small {
  font-size: 12px;
  color: #94a3b8;
}

.qty-input {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

@media (max-width: 900px) {
  .rfq-detail-content {
    grid-template-columns: 1fr;
  }
}

/* RFQ Linked Request Badge */
.rfq-linked-req {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.linked-badge {
  font-size: 11px;
  font-weight: 700;
  color: #9333ea;
  background: #f3e8ff;
  padding: 3px 8px;
  border-radius: 4px;
}

.linked-site {
  font-size: 12px;
  color: #64748b;
}

/* Request Selector in Modal */
.rfq-requests-selector {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px;
}

.request-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  margin-bottom: 8px;
}

.request-option:last-child {
  margin-bottom: 0;
}

.request-option:hover {
  background: #f8fafc;
}

.request-option:has(input:checked) {
  background: #f0fdf4;
  border-color: #16a34a;
}

.request-option input[type="radio"] {
  margin-top: 4px;
  accent-color: #16a34a;
  width: 18px;
  height: 18px;
}

.request-option-content {
  flex: 1;
}

.request-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.request-option-header .req-id {
  font-weight: 700;
  color: #9333ea;
  font-size: 13px;
}

.request-option-header .req-date {
  font-size: 12px;
  color: #94a3b8;
}

.request-option-meta {
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.request-option-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: #e2e8f0;
  color: #475569;
  border-radius: 4px;
}

.mini-tag.more {
  background: #dbeafe;
  color: #2563eb;
}

/* No Requests State */
.rfq-no-requests {
  text-align: center;
  padding: 40px 20px;
}

.rfq-no-requests svg {
  margin-bottom: 16px;
}

.rfq-no-requests h4 {
  font-size: 16px;
  color: #475569;
  margin: 0 0 8px;
}

.rfq-no-requests p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

/* ========== RFQ Wizard Modal ========== */
.rfq-wizard-modal {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.rfq-wizard-step {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.rfq-step-header {
  margin-bottom: 24px;
}

.rfq-step-header h4 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}

.rfq-step-header p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* Requests Grid */
.rfq-requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.rfq-request-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s;
}

.rfq-request-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.rfq-req-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.rfq-req-id {
  font-weight: 700;
  font-size: 14px;
  color: #9333ea;
  background: #f3e8ff;
  padding: 4px 10px;
  border-radius: 6px;
}

.rfq-req-date {
  font-size: 12px;
  color: #64748b;
}

.rfq-req-card-body {
  padding: 16px;
}

.rfq-req-info {
  margin-bottom: 12px;
}

.rfq-req-site {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

.rfq-req-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}

.rfq-req-by {
  font-size: 12px;
  color: #94a3b8;
}

.rfq-req-items-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rfq-item-chip {
  font-size: 11px;
  padding: 4px 10px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
}

.rfq-item-chip.more {
  background: #dbeafe;
  color: #2563eb;
}

/* Expandable Details */
.rfq-req-details {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 14px 16px;
}

.rfq-req-details-header {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.rfq-req-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rfq-req-item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
}

.rfq-req-item-row .item-name {
  color: #1e293b;
  font-weight: 500;
}

.rfq-req-item-row .item-qty {
  color: #64748b;
}

/* Card Actions */
.rfq-req-card-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.rfq-toggle-details-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.rfq-toggle-details-btn:hover {
  background: #e2e8f0;
}

.rfq-toggle-details-btn.expanded {
  background: #e2e8f0;
}

.rfq-toggle-details-btn.expanded svg {
  transform: rotate(180deg);
}

.rfq-select-req-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
}

/* Step 2 - Vendors */
.rfq-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  margin-bottom: 12px;
}

.rfq-back-btn:hover {
  background: #e2e8f0;
}

.rfq-deadline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.rfq-deadline-row label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.rfq-deadline-row .form-input {
  width: auto;
  padding: 8px 12px;
}

.rfq-vendor-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.rfq-vendor-filter span {
  font-size: 13px;
  color: #64748b;
}

.rfq-vendor-filter select {
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  min-width: 200px;
  cursor: pointer;
}

/* Vendors Grid */
.rfq-vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  max-height: 350px;
  overflow-y: auto;
  padding: 4px;
}

.rfq-vendor-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.rfq-vendor-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.rfq-vendor-card.selected {
  border-color: #16a34a;
  background: #f0fdf4;
}

.rfq-vendor-checkbox {
  padding-top: 2px;
}

.rfq-vendor-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #16a34a;
  cursor: pointer;
}

.rfq-vendor-info {
  flex: 1;
}

.rfq-vendor-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.rfq-vendor-category {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.rfq-vendor-category .category-icon {
  font-size: 14px;
}

.rfq-vendor-contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #94a3b8;
}

.rfq-vendor-select-overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

/* Selected Summary */
.rfq-selected-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.rfq-selected-summary span {
  font-size: 14px;
  color: #475569;
}

.rfq-selected-summary strong {
  color: #16a34a;
  font-size: 16px;
}

.rfq-selected-summary .primary-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* ========== RFQ Split Layout ========== */
.rfq-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

@media (max-width: 1200px) {
  .rfq-split-layout {
    grid-template-columns: 1fr;
  }
}

.rfq-section-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
}

.rfq-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.rfq-panel-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

#rfqRequestsPanel .rfq-panel-header h2 {
  color: #9333ea;
}

#rfqQuotationsPanel .rfq-panel-header h2 {
  color: #16a34a;
}

.rfq-panel-count {
  background: #e2e8f0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

#rfqRequestsPanel .rfq-panel-count {
  background: #f3e8ff;
  color: #9333ea;
}

#rfqQuotationsPanel .rfq-panel-count {
  background: #dcfce7;
  color: #16a34a;
}

.rfq-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rfq-panel-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.rfq-panel-empty svg {
  margin-bottom: 12px;
}

.rfq-panel-empty p {
  margin: 0;
  font-size: 14px;
}

/* Request Cards in Split View */
.rfq-req-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s;
}

.rfq-req-card:hover {
  border-color: #cbd5e1;
}

.rfq-req-card.expanded {
  border-color: #9333ea;
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.1);
}

.rfq-req-card.has-rfq {
  border-left: 4px solid #16a34a;
}

.rfq-req-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.rfq-req-main:hover {
  background: #f8fafc;
}

.rfq-req-header {
  flex: 1;
}

.rfq-req-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.rfq-req-badge {
  font-weight: 700;
  font-size: 13px;
  color: #9333ea;
  background: #f3e8ff;
  padding: 4px 10px;
  border-radius: 6px;
}

.rfq-sent-badge {
  font-size: 10px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.rfq-req-date {
  font-size: 12px;
  color: #94a3b8;
}

.rfq-req-body {
  flex: 2;
}

.rfq-req-site {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}

.rfq-req-stats {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.rfq-req-stats .quotes-received {
  color: #16a34a;
  font-weight: 600;
}

.rfq-req-toggle {
  color: #94a3b8;
  transition: transform 0.2s;
}

.rfq-req-card.expanded .rfq-req-toggle {
  transform: rotate(180deg);
}

/* Expandable Section */
.rfq-req-expand {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 16px;
}

.rfq-req-expand h4 {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.rfq-items-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.rfq-item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
}

.rfq-item-row .item-name {
  color: #1e293b;
  font-weight: 500;
}

.rfq-item-row .item-qty {
  color: #64748b;
}

/* Quotes in Request Card */
.rfq-req-quotes {
  margin-bottom: 16px;
}

.rfq-quotes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rfq-quote-chip {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.rfq-quote-chip:hover {
  border-color: #16a34a;
  background: #f0fdf4;
}

.rfq-quote-chip .vendor-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.rfq-quote-chip .quote-total {
  font-size: 12px;
  color: #16a34a;
  font-weight: 700;
}

/* Request Actions */
.rfq-req-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rfq-req-actions .primary-btn,
.rfq-req-actions .secondary-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
}

/* Quotation Cards */
.rfq-quote-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s;
}

.rfq-quote-card:hover {
  border-color: #16a34a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.rfq-quote-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.rfq-quote-vendor {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rfq-quote-vendor .vendor-icon {
  font-size: 24px;
  width: 42px;
  height: 42px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rfq-quote-vendor .vendor-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.rfq-quote-vendor .vendor-category {
  font-size: 12px;
  color: #64748b;
}

.rfq-quote-amount {
  font-size: 18px;
  font-weight: 700;
  color: #16a34a;
}

.rfq-quote-body {
  margin-bottom: 12px;
}

.rfq-quote-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.rfq-quote-ref {
  font-size: 11px;
  font-weight: 700;
  color: #3b82f6;
  background: #dbeafe;
  padding: 3px 8px;
  border-radius: 4px;
}

.rfq-quote-req {
  font-size: 11px;
  font-weight: 700;
  color: #9333ea;
  background: #f3e8ff;
  padding: 3px 8px;
  border-radius: 4px;
}

.rfq-quote-site {
  font-size: 13px;
  color: #475569;
  margin-bottom: 4px;
}

.rfq-quote-date {
  font-size: 12px;
  color: #94a3b8;
}

.rfq-quote-actions {
  display: flex;
  gap: 10px;
}

.rfq-quote-view-btn {
  flex: 1;
  padding: 10px;
  background: #f1f5f9;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.rfq-quote-view-btn:hover {
  background: #16a34a;
  color: #fff;
}

/* Vendor Selection Modal */
.rfq-vendor-modal {
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.rfq-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.rfq-modal-request-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f3e8ff 0%, #fae8ff 100%);
  border-radius: 12px;
  margin-bottom: 20px;
}

.rfq-modal-req-badge {
  font-weight: 700;
  font-size: 15px;
  color: #9333ea;
  background: #fff;
  padding: 8px 14px;
  border-radius: 8px;
}

.rfq-modal-req-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rfq-modal-req-details .site-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.rfq-modal-req-details .items-count {
  font-size: 13px;
  color: #64748b;
}

/* Requests Tracker Enhancements */
.po-tracker-header {
  margin-bottom: 12px;
}

.po-tracker-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.po-tracker-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px;
  overflow-x: auto;
}

.po-tracker-grid-container {
  padding: 0 4px;
}

/* Request Details View (Full Page) */
.po-req-details-page {
  background: #f8f9fa;
  min-height: 100%;
  padding-bottom: 40px;
}

.po-req-details-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 24px;
  margin-bottom: 20px;
}

.po-req-details-title-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.po-req-details-title {
  margin: 0;
  font-size: 20px;
}

.po-req-details-status {
  font-size: 12px;
  color: var(--secondary-color);
}

.po-req-details-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.po-req-details-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.po-req-details-card {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.po-req-details-card-head {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
  color: #334155;
}

.po-req-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.po-req-items-thead {
  background: #f8fafc;
  color: var(--secondary-color);
  text-align: left;
}

.po-req-items-th {
  padding: 12px 16px;
  font-weight: 500;
}

.po-req-items-th-center {
  padding: 12px 16px;
  font-weight: 500;
  text-align: center;
}

.po-req-details-card-footer {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.po-req-details-meta-tag {
  font-size: 11px;
  color: var(--secondary-color);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 10px;
}

.po-req-details-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.po-req-info-card {
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
  padding: 20px;
}

.po-req-info-title {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.po-req-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
}

.po-req-info-row {
  display: flex;
  justify-content: space-between;
}

.po-req-info-label {
  color: var(--secondary-color);
}

.po-req-info-value {
  color: #334155;
  font-weight: 700;
}

.po-req-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 0;
}

.po-req-summary-card {
  background: #fff7ed;
  border-radius: var(--radius-sm);
  border: 1px solid #ffedd5;
  padding: 20px;
}

.po-req-summary-title {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #c2410c;
  font-weight: 600;
}

.po-req-summary-text {
  font-size: 13px;
  color: #9a3412;
  line-height: 1.5;
  margin: 0;
}

/* PO Settings Modal Specifics */
.po-settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.po-settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.po-p-0 { padding: 0; }
.po-mr-6-vbottom { margin-right: 6px; vertical-align: text-bottom; }
.rfq-req-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s;
}

.rfq-req-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.rfq-req-card.has-rfq {
  border-left: 4px solid #16a34a;
}

.rfq-req-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.rfq-req-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rfq-req-badge {
  font-weight: 700;
  font-size: 12px;
  color: #9333ea;
  background: #f3e8ff;
  padding: 4px 10px;
  border-radius: 6px;
}

.rfq-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.rfq-status-badge.pending {
  background: #fef3c7;
  color: #d97706;
}

.rfq-status-badge.sent {
  background: #dbeafe;
  color: #2563eb;
}

.rfq-status-badge.partial {
  background: #fae8ff;
  color: #a855f7;
}

.rfq-status-badge.complete {
  background: #dcfce7;
  color: #16a34a;
}

.rfq-detail-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rfq-detail-btn:hover {
  background: #9333ea;
  color: #fff;
}

.rfq-req-info {
  margin-bottom: 12px;
}

.rfq-req-site-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.rfq-req-site-row svg {
  color: #9333ea;
}

.rfq-req-site-row .site-name {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.rfq-req-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}

.rfq-req-meta-row .meta-item strong {
  color: #1e293b;
}

.rfq-req-meta-row .meta-divider {
  color: #cbd5e1;
}

.rfq-req-meta-row .date {
  color: #94a3b8;
}

.rfq-req-creator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.rfq-req-items-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.item-pill {
  font-size: 11px;
  padding: 4px 10px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
}

.item-pill small {
  color: #94a3b8;
}

.item-pill.more {
  background: #dbeafe;
  color: #2563eb;
}

/* Quotes Summary in Card */
.rfq-req-quotes-summary {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.quotes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.quotes-count {
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
}

.quotes-range {
  font-size: 12px;
  color: #475569;
}

.quotes-vendors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-vendor-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
}

.quote-vendor-chip .vendor-icon {
  font-size: 14px;
}

.quote-vendor-chip .vendor-name {
  color: #1e293b;
  font-weight: 500;
}

.quote-vendor-chip .vendor-price {
  color: #16a34a;
  font-weight: 700;
}

.more-vendors {
  padding: 6px 10px;
  background: #dcfce7;
  color: #16a34a;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

/* Waiting State */
.rfq-req-waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #fef3c7;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #92400e;
}

.rfq-req-waiting svg {
  color: #d97706;
}

/* Card Actions */
.rfq-req-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.rfq-req-actions .primary-btn,
.rfq-req-actions .secondary-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
}

/* ========== Request Detail Modal ========== */
.request-detail-modal {
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-subtitle {
  font-size: 13px;
  color: #9333ea;
  font-weight: 600;
}

.request-detail-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.detail-section h4 svg {
  color: #9333ea;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.detail-item {
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.detail-item label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.detail-item span {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill.approved {
  background: #dcfce7;
  color: #16a34a;
}

/* Items Table */
.items-detail-table {
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
}

.items-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 10px 14px;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.items-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.items-table-row:last-child {
  border-bottom: none;
}

.item-name-col {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e293b;
}

.item-num {
  width: 22px;
  height: 22px;
  background: #9333ea;
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.item-qty-col {
  color: #475569;
  font-weight: 500;
}

.item-specs-col {
  color: #94a3b8;
}

/* RFQ Status Card */
.rfq-status-card {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 16px;
}

.rfq-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.rfq-status-card .rfq-ref {
  font-size: 15px;
  font-weight: 700;
  color: #0369a1;
}

.rfq-status-pill {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.rfq-status-pill.open {
  background: #dcfce7;
  color: #16a34a;
}

.rfq-status-pill.closed {
  background: #e2e8f0;
  color: #64748b;
}

.rfq-status-pill.awarded {
  background: #fef3c7;
  color: #d97706;
}

.rfq-status-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.rfq-status-info .info-item {
  text-align: center;
}

.rfq-status-info .info-item label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.rfq-status-info .info-item span {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.rfq-status-info .quotes-count {
  color: #16a34a;
}

/* No RFQ Card */
.no-rfq-card {
  text-align: center;
  padding: 30px;
  background: #f8fafc;
  border-radius: 12px;
  border: 2px dashed #e2e8f0;
}

.no-rfq-card p {
  margin: 12px 0 16px;
  color: #64748b;
}

/* Quotations Chain */
.quotations-chain {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quote-detail-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
}

.quote-detail-card:hover {
  border-color: #16a34a;
}

.quote-detail-card.lowest {
  border-color: #16a34a;
  background: #f0fdf4;
}

.lowest-badge {
  position: absolute;
  top: -8px;
  right: 16px;
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}

.quote-vendor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.quote-vendor-header .vendor-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  background: #f1f5f9;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-detail-card.lowest .vendor-icon {
  background: #dcfce7;
}

.quote-vendor-header .vendor-info {
  flex: 1;
}

.quote-vendor-header .vendor-name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  display: block;
}

.quote-vendor-header .vendor-category {
  font-size: 12px;
  color: #64748b;
}

.quote-vendor-header .quote-total {
  font-size: 20px;
  font-weight: 700;
  color: #16a34a;
}

.quote-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #64748b;
}

.quote-items-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.quote-item {
  font-size: 11px;
  padding: 4px 10px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
}

.more-items {
  font-size: 11px;
  padding: 4px 10px;
  background: #dbeafe;
  color: #2563eb;
  border-radius: 6px;
}

.quote-detail-card .quote-actions {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.view-quote-btn {
  padding: 8px 14px;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.view-quote-btn:hover {
  background: #e2e8f0;
}

.award-quote-btn {
  padding: 8px 14px;
  font-size: 13px;
}

.request-notes {
  padding: 14px;
  background: #fefce8;
  border-radius: 10px;
  font-size: 14px;
  color: #713f12;
  line-height: 1.5;
}

/* ========== Quote Detail Modal ========== */
.quote-detail-modal {
  max-width: 700px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.quote-detail-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.quote-vendor-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: 14px;
  margin-bottom: 20px;
}

.quote-vendor-info .vendor-icon.large {
  font-size: 36px;
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-vendor-info h4 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}

.quote-vendor-info p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.quote-vendor-info .vendor-contact {
  font-size: 12px;
  color: #94a3b8;
}

.quote-total-display {
  margin-left: auto;
  text-align: right;
}

.quote-total-display .label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.quote-total-display .amount {
  font-size: 24px;
  font-weight: 700;
  color: #16a34a;
}

.quote-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.quote-info-grid .info-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
}

.quote-info-grid .info-item label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
}

.quote-info-grid .info-item span {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.quote-items-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px;
}

.quote-items-table {
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.quote-items-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 10px 14px;
  background: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.quote-items-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.quote-items-row:last-child {
  border-bottom: none;
}

.quote-items-row .item-name {
  color: #1e293b;
  font-weight: 500;
}

.quote-items-row .item-price {
  color: #475569;
}

.quote-items-row .item-qty {
  color: #64748b;
}

.quote-items-row .item-total {
  color: #16a34a;
  font-weight: 600;
}

.quote-notes {
  margin-bottom: 20px;
}

.quote-notes h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px;
}

.quote-notes p {
  padding: 14px;
  background: #fefce8;
  border-radius: 10px;
  font-size: 14px;
  color: #713f12;
  margin: 0;
}

.quote-modal-actions {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
  .detail-grid,
  .rfq-status-info {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quote-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== Master-Detail Layout ========== */
.rfq-master-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  margin-top: 20px;
  height: calc(100vh - 160px);
}

@media (max-width: 1024px) {
  .rfq-master-detail {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 768px) {
  .rfq-master-detail {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Master Panel (Left) */
.rfq-master-panel {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rfq-master-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
}

.rfq-tab {
  flex: 1;
  padding: 14px 12px;
  background: #f8fafc;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rfq-tab:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}

.rfq-tab:hover {
  background: #f1f5f9;
  color: #475569;
}

.rfq-tab.active {
  background: #fff;
  color: #007bff;
  border-bottom: 2px solid #007bff;
  margin-bottom: -1px;
}

.rfq-tab .tab-count {
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 10px;
}

.rfq-tab.active .tab-count {
  background: rgba(0, 123, 255, 0.12);
  color: #007bff;
}

.rfq-master-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.rfq-master-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.rfq-master-empty p {
  margin: 12px 0 0;
  font-size: 13px;
}

/* Master List Items */
.rfq-master-item {
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 6px;
  border: 2px solid transparent;
}

.rfq-master-item:hover {
  background: #f8fafc;
}

.rfq-master-item.selected {
  background: #eef6ff;
  border-color: #007bff;
}

.rfq-master-item.pending {
  border-left: 3px solid #d97706;
}

.rfq-master-item.sent {
  border-left: 3px solid #2563eb;
}

.rfq-master-item.complete {
  border-left: 3px solid #16a34a;
}

.rfq-master-item.archived {
  border-left: 3px solid #16a34a;
  opacity: 0.85;
}

.rfq-master-item.partial {
  border-left: 3px solid #17a2b8;
}

.rfq-master-item.complete {
  border-left: 3px solid #16a34a;
}

.master-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.master-item-status-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rfq-master-item.pending .master-item-status-icon {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.rfq-master-item.sent .master-item-status-icon {
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.rfq-master-item.partial .master-item-status-icon {
  background: #17a2b8;
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.2);
}

.rfq-master-item.complete .master-item-status-icon {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.master-item-info {
  flex: 1;
  min-width: 0;
}

.master-item-ref {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.master-item-site {
  display: block;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.master-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.master-item-count {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
}

.master-item-quotes {
  font-size: 10px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 4px;
}

.master-item-pos {
  font-size: 10px;
  font-weight: 700;
  color: #7c3aed;
  background: #ede9fe;
  padding: 2px 6px;
  border-radius: 4px;
}

.master-item-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.master-item-rfq-ref {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.master-item-status-label {
  font-size: 10px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Detail Panel (Right) */
.rfq-detail-panel {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rfq-detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #94a3b8;
}

.rfq-detail-empty h4 {
  margin: 16px 0 8px;
  font-size: 18px;
  color: #64748b;
}

.rfq-detail-empty p {
  margin: 0;
  font-size: 14px;
}

.rfq-detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Compact Detail Header */
.detail-compact-header {
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 16px;
}

.detail-compact-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.detail-compact-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-req-badge {
  font-size: 11px;
  font-weight: 700;
  color: #007bff;
  background: #eef6ff;
  padding: 4px 10px;
  border-radius: 6px;
}

.detail-rfq-badge {
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 10px;
  border-radius: 6px;
}

.detail-compact-status .status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.status-tag.pending { background: #fef3c7; color: #92400e; }
.status-tag.waiting { background: #e0f2fe; color: #0369a1; }
.status-tag.active { background: #dcfce7; color: #166534; }
.status-tag.complete { background: #d1fae5; color: #065f46; }

.detail-compact-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px;
}

.detail-compact-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
}

.detail-compact-meta .meta-sep {
  color: #cbd5e1;
}

/* Stats Bar */
.detail-stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.stat-label {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Action Card */
.detail-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* POs Banner */
.detail-pos-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #86efac;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.pos-banner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(34, 197, 94, 0.1);
  border-bottom: 1px solid #86efac;
}

.pos-banner-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  border-radius: 10px;
  color: #16a34a;
}

.pos-banner-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pos-banner-title strong {
  font-size: 14px;
  font-weight: 700;
  color: #166534;
}

.pos-banner-title span {
  font-size: 12px;
  color: #15803d;
}

.pos-banner-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pos-banner-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}

.pos-item-ref {
  font-size: 12px;
  font-weight: 700;
  color: #7c3aed;
  background: #ede9fe;
  padding: 4px 10px;
  border-radius: 6px;
}

.pos-item-vendor {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.pos-item-total {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
}

.btn-icon.small {
  width: 28px;
  height: 28px;
}

.action-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef3c7;
  border-radius: 10px;
  color: #d97706;
  flex-shrink: 0;
}

.action-card-content {
  flex: 1;
}

.action-card-content h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
}

.action-card-content p {
  margin: 0;
  font-size: 12px;
  color: #a16207;
}

/* Detail Tabs */
.detail-tabs-container {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.detail-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.detail-tab {
  flex: 1;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.detail-tab:not(:last-child) {
  border-right: 1px solid #e2e8f0;
}

.detail-tab:hover {
  background: #f1f5f9;
  color: #475569;
}

.detail-tab.active {
  background: #fff;
  color: #007bff;
  border-bottom: 2px solid #007bff;
  margin-bottom: -1px;
}

.detail-tab .tab-badge {
  font-size: 10px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 6px;
  border-radius: 8px;
}

.detail-tab.active .tab-badge {
  background: #dbeafe;
  color: #007bff;
}

.detail-tab-content {
  display: none;
  padding: 16px;
}

.detail-tab-content.active {
  display: block;
}

/* Compact Items List */
.detail-items-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.item-num-small {
  width: 24px;
  height: 24px;
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.item-info-compact {
  flex: 1;
  min-width: 0;
}

.item-name-compact {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-specs-compact {
  display: block;
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-qty-compact {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* Compact Quotes */
.quotes-compact-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quotes-compact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quotes-select-all-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
}

.quotes-compact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-compact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.quote-compact-item.lowest {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.quote-compact-check {
  flex-shrink: 0;
}

.quote-compact-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.quote-compact-vendor {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.quote-lowest-tag {
  font-size: 10px;
  font-weight: 700;
  color: #059669;
  background: #d1fae5;
  padding: 2px 6px;
  border-radius: 4px;
}

.quote-compact-total {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-right: 8px;
}

/* Icon Button */
.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

/* Compact History */
.comparison-history-compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item-wrapper {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  background: #f8fafc;
}

.history-item-wrapper.has-pos {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
}

.history-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-ref {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.history-meta {
  font-size: 12px;
  color: #64748b;
}

/* POs List in History */
.history-pos-list {
  border-top: 1px solid #d1fae5;
  padding: 10px 12px;
  background: #ecfdf5;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-po-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #d1fae5;
}

.history-po-ref {
  font-size: 12px;
  font-weight: 700;
  color: #7c3aed;
  background: #ede9fe;
  padding: 4px 10px;
  border-radius: 6px;
}

.history-po-vendor {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}

.history-po-total {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
}

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

.empty-state-box p {
  margin: 12px 0 4px;
  font-size: 14px;
  color: #64748b;
}

.empty-state-box small {
  font-size: 12px;
  color: #94a3b8;
}

/* Legacy Detail Header (keep for compatibility) */
.detail-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f1f5f9;
}

.detail-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.detail-header-main h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.detail-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
}

.detail-header-meta span:not(:last-child)::after {
  content: '';
}

/* Detail Sections */
.detail-section {
  margin-bottom: 24px;
}

.detail-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.detail-section-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

/* Detail Items List */
.detail-items-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.detail-item-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  align-items: start;
}

.detail-item-row:last-child {
  border-bottom: none;
}

.detail-item-row:hover {
  background: #f8fafc;
}

.detail-item-row .item-num {
  width: 28px;
  height: 28px;
  background: #007bff;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.detail-item-row .item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item-row .item-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
}

.detail-item-row .item-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.detail-item-row .item-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.detail-item-row .item-spec-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.detail-item-row .item-note {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-style: italic;
  margin-top: 4px;
  padding-left: 2px;
}

.detail-item-row .item-qty {
  color: #1e293b;
  font-weight: 600;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

/* No RFQ State */
.detail-no-rfq {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  border-radius: 14px;
  margin: 24px 0;
}

.no-rfq-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #854d0e;
  font-size: 14px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .detail-no-rfq {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

.detail-no-rfq .send-rfq-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
}

/* RFQ Info */
.detail-rfq-info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.rfq-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.detail-rfq-info .rfq-ref {
  font-size: 16px;
  font-weight: 700;
  color: #0369a1;
}

.rfq-info-row {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #475569;
}

/* Waiting State */
.detail-waiting {
  text-align: center;
  padding: 40px;
  background: #fffbeb;
  border-radius: 12px;
  margin-bottom: 24px;
}

.detail-waiting p {
  margin: 12px 0 4px;
  font-size: 15px;
  color: #92400e;
}

.detail-waiting small {
  color: #b45309;
  font-size: 12px;
}

/* ========== Comparison Table ========== */
.comparison-section {
  background: #f8fafc;
  border-radius: 14px;
  padding: 20px;
}

.comparison-hint {
  font-size: 12px;
  color: #64748b;
}

.comparison-table-wrapper {
  overflow-x: auto;
  margin: 16px 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.comparison-table th,
.comparison-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
  background: #e2e8f0;
  font-weight: 600;
  color: #475569;
}

.comparison-table .item-col {
  min-width: 150px;
}

.comparison-table .qty-col {
  width: 60px;
  text-align: center;
}

.comparison-table .vendor-col {
  min-width: 140px;
  text-align: center;
}

.comparison-table .vendor-col.lowest {
  background: #dcfce7;
}

.vendor-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vendor-header .vendor-name {
  font-weight: 700;
  color: #1e293b;
}

.vendor-header .vendor-total {
  font-size: 12px;
  color: #16a34a;
  font-weight: 700;
}

.lowest-tag {
  font-size: 10px;
  background: #16a34a;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.comparison-table .price-col {
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  vertical-align: middle;
}

.comparison-table .price-col:hover {
  background: #f1f5f9;
}

.comparison-table .price-col.lowest-price {
  background: #f0fdf4;
}

.comparison-table .price-col.selected {
  background: #dbeafe;
  border: 2px solid #3b82f6;
}

.price-col .price {
  display: block;
  font-weight: 600;
  color: #1e293b;
}

.price-col .total {
  display: block;
  font-size: 11px;
  color: #64748b;
}

.price-col .no-price {
  color: #cbd5e1;
}

.comparison-table .selected-col {
  width: 100px;
  text-align: center;
  background: #f8fafc;
}

.selected-col .not-selected {
  color: #cbd5e1;
}

.selected-col .selected-vendor {
  display: block;
  font-size: 11px;
  color: #3b82f6;
  font-weight: 600;
}

.selected-col .selected-price {
  display: block;
  font-size: 12px;
  color: #1e293b;
  font-weight: 700;
}

.comparison-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comparison-item-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comparison-item-name {
  font-weight: 700;
  color: #0f172a;
}

.comparison-item-desc {
  font-size: 12px;
  color: #475569;
}

.comparison-item-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.comparison-spec-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
}

.comparison-item-note {
  font-size: 11px;
  color: #64748b;
}

.quote-spec-changes {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quote-change-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #fed7aa;
}

.comparison-table tfoot td {
  background: #e2e8f0;
  font-weight: 700;
}

.comparison-table .total-col {
  text-align: center;
  color: #16a34a;
}

.comparison-table .selected-total {
  text-align: center;
  color: #3b82f6;
}

/* Comparison Actions */
.comparison-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.comparison-actions .secondary-btn,
.comparison-actions .primary-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
}

.comparison-actions .primary-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* Draft POs under comparison */
.comparison-draft-pos {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.comparison-draft-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.comparison-draft-title {
  font-weight: 800;
  color: #0f172a;
}

.comparison-draft-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.comparison-draft-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comparison-draft-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.comparison-draft-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comparison-draft-vendor {
  font-weight: 800;
  color: #0f172a;
}

.comparison-draft-meta {
  font-size: 12px;
  color: #475569;
}

.comparison-draft-status {
  font-size: 12px;
  color: #16a34a;
  font-weight: 700;
}

.comparison-draft-status.pending {
  color: #d97706;
}

.comparison-draft-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ========== RFQ Vendor Selection Modal ========== */
.rfq-vendor-modal {
  max-width: 1060px;
  width: min(96vw, 1060px);
  height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.rfq-modal-body {
  padding: 18px 20px 0;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rfq-modal-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rfq-modal-header-left h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.rfq-modal-header-meta {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.rfq-modal-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.rfq-vendors-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.rfq-vendors-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rfq-vendors-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}

.rfq-vendors-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.rfq-vendors-count {
  font-size: 12px;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.rfq-modal-request-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #eef6ff 0%, #e0f2fe 100%);
  border: 1px solid rgba(0, 123, 255, 0.15);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,123,255,0.08);
}

.rfq-modal-req-badge {
  font-size: 13px;
  font-weight: 700;
  color: #007bff;
  background: rgba(255,255,255,0.9);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 123, 255, 0.2);
  box-shadow: 0 2px 4px rgba(0,123,255,0.1);
}

.rfq-modal-req-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rfq-modal-req-details .site-name {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.rfq-modal-req-details .items-count {
  font-size: 13px;
  color: #64748b;
}

.rfq-deadline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.8);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rfq-deadline-row label {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.rfq-deadline-row input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.rfq-vendor-tools {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  margin-bottom: 0;
  padding: 0;
}

.rfq-vendor-search input {
  width: 100%;
}

.rfq-vendor-bulk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.8);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rfq-send-all {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
}

.rfq-send-all input {
  width: 18px;
  height: 18px;
  accent-color: #007bff;
}

.rfq-bulk-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 768px) {
  .rfq-vendor-tools {
    grid-template-columns: 1fr;
  }
  .rfq-vendor-bulk {
    flex-direction: column;
    align-items: flex-start;
  }
}

.rfq-vendor-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.rfq-vendor-filter span {
  font-size: 13px;
  color: #64748b;
}

.rfq-vendor-filter select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}

.rfq-vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  overflow-y: auto;
  padding: 8px;
  margin-bottom: 0;
  border-radius: 12px;
  min-height: 0;
  background: linear-gradient(135deg, #fafbfc 0%, #f8fafc 100%);
}

.rfq-selected-summary {
  position: sticky;
  bottom: 0;
  margin-top: 14px;
  border-radius: 0 0 12px 12px;
}

@media (max-width: 768px) {
  .rfq-vendor-modal {
    width: 96vw;
    height: 92vh;
  }
  .rfq-modal-body {
    padding: 16px 16px 0;
  }
}

.rfq-vendor-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: rgba(255,255,255,0.95);
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.rfq-vendor-card:hover {
  border-color: #007bff;
  background: linear-gradient(135deg, #eef6ff 0%, #e0f2fe 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,123,255,0.12);
}

.rfq-vendor-card.selected {
  border-color: #007bff;
  background: linear-gradient(135deg, #eef6ff 0%, #dbeafe 100%);
  box-shadow: 0 4px 16px rgba(0,123,255,0.15);
}

.rfq-vendor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  color: #007bff;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rfq-vendor-card.selected .rfq-vendor-avatar {
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.15) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-color: rgba(0, 123, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.rfq-vendor-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #007bff;
  cursor: pointer;
  flex-shrink: 0;
}

.rfq-vendor-info {
  flex: 1;
  min-width: 0;
}

.rfq-vendor-name {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}

.rfq-vendor-category {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 2px;
}

.rfq-vendor-contact {
  font-size: 11px;
  color: #94a3b8;
}

.rfq-selected-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 0 0 20px 20px;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.rfq-selected-summary span {
  font-size: 14px;
  color: #475569;
}

.rfq-selected-summary .primary-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
}

.rfq-selected-summary .primary-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}