/* ═══════════════════════════════════════════════════════════════
   Quotations module — matches Figma 3976:409654 + 3976:513712
   ═══════════════════════════════════════════════════════════════ */

/* ── Page shell ──────────────────────────────────────────────── */
.qt-page { display: flex; flex-direction: column; }

/* ── Main tab bar (SHIPMENTS | QUOTATIONS) ───────────────────── */
.qt-tabs-bar {
  display: flex;
  border-bottom: 2px solid #E8ECEF;
  margin-bottom: 16px;
}
.qt-main-tab {
  padding: 10px 20px;
  border: none; background: transparent;
  font: 600 13px/18px 'Open Sans';
  letter-spacing: 0.5px;
  color: #8B9092;
  cursor: pointer; transition: all .12s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .12s, border-color .12s;
}
.qt-main-tab:hover { color: #2F4F57; }
.qt-main-tab.active { color: #568793; border-bottom-color: #568793; }

/* ── Tab content area ────────────────────────────────────────── */
.qt-tab-content { display: flex; flex-direction: column; }

/* ── Toolbar (filter pills + search + action buttons) ────────── */
.qt-tab-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.qt-filter-pills { display: flex; gap: 6px; }
.qt-filter-pill {
  padding: 5px 14px;
  border: 1px solid #E2E7EB;
  border-radius: 999px;
  background: transparent;
  font: 500 12px/16px 'Open Sans';
  color: #4F6063;
  cursor: pointer; transition: all .12s;
}
.qt-filter-pill:hover { border-color: #568793; color: #2F4F57; }
.qt-filter-pill.active { background: #568793; border-color: #568793; color: white; font-weight: 700; }

.qt-toolbar-right { display: flex; align-items: center; gap: 8px; }
.qt-search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid #E2E7EB; border-radius: 6px;
  background: white; transition: border-color .12s;
}
.qt-search-bar:focus-within { border-color: #568793; }
.qt-search-bar .icon { font-size: 16px !important; color: #A8B4B8; font-family: 'Material Icons Outlined' !important; text-transform: none !important; letter-spacing: 0 !important; }
.qt-search-input { border: none; outline: none; font: 400 12px/16px 'Open Sans'; color: #172326; width: 200px; }
.qt-search-input::placeholder { color: #C0CAD0; }
.qt-btn-outline {
  padding: 6px 14px;
  border: 1px solid #E2E7EB; border-radius: 6px;
  background: white; font: 600 12px/16px 'Open Sans';
  color: #4F6063; cursor: pointer; letter-spacing: 0.3px;
  transition: all .12s;
}
.qt-btn-outline:hover { border-color: #568793; color: #568793; }
.qt-create-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border: none; border-radius: 6px;
  background: #568793; color: white;
  font: 700 12px/16px 'Open Sans'; letter-spacing: 0.5px;
  cursor: pointer; transition: background .12s;
}
.qt-create-btn:hover { background: #3C636C; }
.qt-create-btn .icon { font-size: 16px !important; font-family: 'Material Icons Outlined' !important; text-transform: none !important; letter-spacing: 0 !important; }

/* ── Shipments table ─────────────────────────────────────────── */
.qt-table-wrap { overflow-x: auto; }
.qt-ships-table { table-layout: auto; min-width: 760px; }
.qt-ships-table thead tr { background: #568793; }
.qt-ships-table thead th {
  color: white !important;
  font: 600 11px/14px 'Open Sans' !important;
  letter-spacing: 0.3px;
  padding: 11px 14px;
  border-bottom: none !important;
  background: transparent;
}
.qt-table-row { cursor: pointer; transition: background .1s; }
.qt-ships-table tbody tr:nth-child(4n+1),
.qt-ships-table tbody tr:nth-child(4n+2) { background: rgba(86,135,147,.04); }
.qt-table-row:hover { background: rgba(86,135,147,.1) !important; }
.qt-col-id { min-width: 120px; }
.qt-col-lane { min-width: 200px; }
.qt-id-badge {
  display: inline-block;
  font: 600 12px/16px 'Open Sans'; color: #568793;
}
.qt-id-flagged { color: #ED323B !important; }
.qt-lane-origin, .qt-lane-dest { font: 400 12px/16px 'Open Sans'; color: #172326; }
.qt-lane-arrow { font-size: 13px !important; color: #568793; margin: 0 4px; font-family: 'Material Icons Outlined' !important; text-transform: none !important; letter-spacing: 0 !important; vertical-align: middle; }
.qt-status-chip {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px;
  border: 1px solid; font: 600 10px/14px 'Open Sans';
  letter-spacing: 0.3px; text-transform: capitalize; white-space: nowrap;
}
.qt-empty-state-cell { padding: 0 !important; }
.qt-empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px; gap: 12px;
}
.qt-empty-icon { font-size: 48px !important; color: #C0CAD0; font-family: 'Material Icons Outlined' !important; text-transform: none !important; letter-spacing: 0 !important; }
.qt-empty-heading { font: 400 14px/20px 'Open Sans'; color: #8B9092; margin: 0; }
.qt-table-footer {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10px 4px; border-top: 1px solid #F0F3F5;
}
.qt-footer-count { font: 400 12px/16px 'Open Sans'; color: #8B9092; }

/* ── Shipment Detail Page ────────────────────────────────────── */
.qt-detail-page { display: flex; flex-direction: column; gap: 0; }

.qt-detail-header {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid #EEF0F2;
  margin-bottom: 24px;
}
.qt-detail-title-wrap { display: flex; align-items: center; gap: 10px; }
.qt-detail-icon-box {
  width: 40px; height: 40px; border-radius: 8px;
  background: #2F4F57;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.qt-detail-icon-box .icon { font-size: 22px !important; color: white; font-family: 'Material Icons Outlined' !important; text-transform: none !important; letter-spacing: 0 !important; }
.qt-detail-title { font: 400 26px/32px 'Open Sans'; color: #172326; margin: 0; }

.qt-detail-body { display: flex; gap: 20px; align-items: flex-start; }
.qt-detail-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.qt-detail-rail { width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px; }

/* ── Sections ─────────────────────────────────────────────────── */
.qt-section {
  border: 1px solid #E8ECEF;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}
.qt-section-header, .qt-section-header-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: #EEF3F5;
  border-bottom: 1px solid #E8ECEF;
}
.qt-section-header-row { justify-content: space-between; }
.qt-section-icon {
  font-size: 18px !important; color: #568793;
  font-family: 'Material Icons Outlined' !important;
  text-transform: none !important; letter-spacing: 0 !important;
}
.qt-section-label { font: 600 13px/18px 'Open Sans'; color: #172326; }

/* Field grids */
.qt-fields-grid {
  display: grid;
  border-left: 1px solid #E8ECEF;
}
.qt-fields-3col { grid-template-columns: repeat(3, 1fr); }
.qt-fields-4col { grid-template-columns: repeat(4, 1fr); }
.qt-fields-7col { grid-template-columns: repeat(7, 1fr); }
.qt-field-cell {
  padding: 12px 16px;
  border-right: 1px solid #E8ECEF;
  border-bottom: 1px solid #E8ECEF;
}
.qt-fields-3col .qt-field-cell:nth-child(3n),
.qt-fields-4col .qt-field-cell:nth-child(4n),
.qt-fields-7col .qt-field-cell:nth-child(7n) { border-right: none; }
.qt-field-label { font: 400 11px/14px 'Open Sans'; color: #8B9092; margin-bottom: 4px; }
.qt-field-value { font: 500 13px/18px 'Open Sans'; color: #172326; }
.qt-field-wide { grid-column: 1 / -1; }

/* Deliveries table */
.qt-deliveries-table-wrap { overflow-x: auto; }
.qt-deliveries-table { table-layout: auto; }
.qt-deliveries-table thead tr { background: #568793; }
.qt-deliveries-table thead th { color: white !important; font: 600 11px/14px 'Open Sans' !important; border: none !important; padding: 10px 14px; }
.qt-deliveries-table tbody tr:nth-child(even) { background: rgba(86,135,147,.04); }
.qt-del-actions { display: flex; gap: 8px; justify-content: flex-end; }
.qt-del-btn {
  font-size: 16px !important; color: #8B9092; cursor: pointer; transition: all .12s;
  font-family: 'Material Icons Outlined' !important;
  text-transform: none !important; letter-spacing: 0 !important;
  transition: color .12s;
}
.qt-del-btn:hover { color: #568793; }
.qt-empty-cell { padding: 20px !important; color: #8B9092; font: 400 13px/18px 'Open Sans'; text-align: center; }

.qt-add-delivery-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 12px;
  border: 1px solid #568793; border-radius: 4px;
  background: transparent; color: #568793;
  font: 600 11px/14px 'Open Sans'; letter-spacing: 0.3px;
  cursor: pointer; transition: all .12s;
}
.qt-add-delivery-btn:hover { background: rgba(86,135,147,.08); }
.qt-add-delivery-btn .icon { font-size: 14px !important; font-family: 'Material Icons Outlined' !important; text-transform: none !important; letter-spacing: 0 !important; }

/* Documentation */
.qt-docs-grid {
  display: grid; grid-template-columns: repeat(5,1fr);
  border-left: 1px solid #E8ECEF;
}
.qt-doc-cell {
  padding: 14px 16px;
  border-right: 1px solid #E8ECEF;
  border-bottom: 1px solid #E8ECEF;
}
.qt-doc-cell:nth-child(5n) { border-right: none; }
.qt-doc-link { color: #568793; font: 400 12px/16px 'Open Sans'; text-decoration: none; word-break: break-all; }
.qt-doc-link:hover { text-decoration: underline; }
.qt-doc-na { color: #C0CAD0; font: 400 12px/16px 'Open Sans'; font-style: italic; }

/* ── Right rail ───────────────────────────────────────────────── */
.qt-rail-card {
  background: white;
  border: 1px solid #E8ECEF;
  border-radius: 8px;
  overflow: hidden;
}
.qt-rail-card-title {
  padding: 12px 16px;
  background: #F7F8F9;
  border-bottom: 1px solid #E8ECEF;
  font: 700 12px/16px 'Open Sans';
  color: #172326; letter-spacing: 0.2px;
}
.qt-status-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #F0F3F5;
}
.qt-status-row-last { border-bottom: none; }
.qt-status-label { font: 400 12px/16px 'Open Sans'; color: #4F6063; }

/* Actions */
.qt-rail-actions { padding: 0; }
.qt-rail-actions .qt-rail-card-title { padding: 12px 16px; }
.qt-action-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 11px 16px;
  border: none; border-radius: 0;
  font: 700 12px/16px 'Open Sans'; letter-spacing: 0.5px;
  cursor: pointer; transition: all .12s;
}
.qt-action-btn + .qt-action-btn { border-top: 1px solid rgba(0,0,0,.08); }
.qt-action-primary + .qt-action-primary { border-top-color: rgba(255,255,255,.18); }
.qt-action-btn .icon { font-size: 16px !important; font-family: 'Material Icons Outlined' !important; text-transform: none !important; letter-spacing: 0 !important; }
.qt-action-primary  { background: #568793; color: white; }
.qt-action-primary:hover { background: #3C636C; }
.qt-action-outlined { background: white; color: #568793; }
.qt-action-outlined + .qt-action-outlined { border-top-color: #E2E7EB; }
.qt-action-outlined:hover { background: rgba(86,135,147,.05); }
.qt-action-cancel { color: #ED323B; }
.qt-action-cancel:hover { background: rgba(237,50,59,.04); }

/* ── Rate Checker Modal ───────────────────────────────────────── */
.qt-modal-overlay {
  position: fixed; inset: 0; z-index: 2400;
  background: rgba(23,35,38,.4); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  animation: cmdkFade .18s ease;
}
.qt-modal {
  background: white;
  border-radius: 8px;
  width: 560px; max-width: calc(100vw - 32px);
  box-shadow: 5px 5px 10px rgba(53,91,101,.2);
  overflow: hidden;
  animation: cmdkSlide .22s ease;
}
.qt-modal-body { padding: 40px 32px; text-align: center; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.qt-rc-illustration { display: flex; align-items: center; justify-content: center; }
.qt-rc-icon { font-size: 72px !important; color: #568793; font-family: 'Material Icons Outlined' !important; text-transform: none !important; letter-spacing: 0 !important; animation: agentPulse 2s ease-in-out infinite; }
.qt-rc-body .qt-rc-icon.success { color: #27AE60; animation: none; }
.qt-rc-heading { font: 600 18px/26px 'Open Sans'; color: #172326; margin: 0; max-width: 380px; }
.qt-rc-sub     { font: 400 13px/20px 'Open Sans'; color: #4F6063; margin: 0; max-width: 380px; }
.qt-rc-cta { margin-top: 8px; }
.qt-modal-foot {
  display: flex; justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid #EEF0F2;
  background: #FAFBFC;
}
.qt-modal-close {
  padding: 7px 20px;
  border: 1px solid #E2E7EB; border-radius: 6px;
  background: white; font: 500 12px/16px 'Open Sans';
  color: #4F6063; cursor: pointer; transition: all .12s;
}
.qt-modal-close:hover { border-color: #568793; color: #568793; }
