/* ==========================================================================
   OnlineQC - Concrete Quality & Strength Summary Portal Styles
   The Concrete Advantage - Your Online Technical Assistant
   ========================================================================== */

:root {
  --primary-red: #c92a2a;
  --primary-red-hover: #b02525;
  --nav-dark: #a61e1e;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #cbd5e1;
  --border-light: #e2e8f0;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-link: #b91c1c;
  --success: #15803d;
  --warning: #b45309;
  --danger: #dc2626;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   TOP APP HEADER & BRAND
   ========================================================================== */
.app-top-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.top-header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-box {
  display: flex;
  flex-direction: column;
}

.brand-logo-text {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: Arial, sans-serif;
}

.logo-the {
  font-size: 1.15rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.logo-concrete {
  font-size: 1.65rem;
  font-weight: 900;
  color: #b91c1c;
  letter-spacing: -0.03em;
  line-height: 1;
}

.logo-advantage {
  font-size: 1.65rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.03em;
  line-height: 1;
}

.tagline {
  font-size: 0.92rem;
  color: #334155;
  font-style: italic;
  font-family: Georgia, serif;
  margin-top: 2px;
}

.user-meta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.customer-badge {
  font-size: 0.88rem;
  color: #1e293b;
}

.customer-label {
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.user-links {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.user-links a {
  color: #b91c1c;
  text-decoration: none;
  font-weight: 600;
}

.user-links a:hover {
  text-decoration: underline;
}

.user-links span.sep {
  color: #cbd5e1;
}

/* ==========================================================================
   RED NAVIGATION BAR (CLASSIC ONLINEQC)
   ========================================================================== */
.main-nav-bar {
  background: linear-gradient(180deg, #e11d48 0%, #b91c1c 100%);
  border-top: 1px solid #f43f5e;
  border-bottom: 2px solid #991b1b;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.nav-item {
  background: transparent;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  color: #ffffff;
  padding: 0.65rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-item:hover {
  background: rgba(0, 0, 0, 0.15);
  color: #fef2f2;
}

.nav-item.active {
  background: #991b1b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
  border-bottom: 3px solid #fbbf24;
}

.alert-counter-badge {
  background: #fbbf24;
  color: #78350f;
  font-size: 0.70rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 0.25rem;
}

/* ==========================================================================
   PORTAL CONTAINER & BREADCRUMBS
   ========================================================================== */
.portal-container {
  max-width: 1280px;
  margin: 1rem auto 2.5rem auto;
  padding: 0 1rem;
}

.breadcrumb-bar {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.crumb-link {
  color: #b91c1c;
  cursor: pointer;
  text-decoration: underline;
}

.crumb-link:hover {
  color: #991b1b;
}

.crumb-sep {
  color: #94a3b8;
}

.crumb-active {
  color: #0f172a;
}

/* ==========================================================================
   SECTION HEADER & KPIS
   ========================================================================== */
.qc-section {
  display: block;
}

.section-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header-bar h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.section-subtext {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.search-box input {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 220px;
  outline: none;
}

.search-box input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.kpi-card.warning {
  border-left: 4px solid #f59e0b;
}

.kpi-card.danger {
  border-left: 4px solid #ef4444;
}

.kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-dark);
  line-height: 1.1;
}

.kpi-value.highlight-warn {
  color: #d97706;
}

.kpi-value.highlight-danger {
  color: #dc2626;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ==========================================================================
   TABLES & CARDS
   ========================================================================== */
.card-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.qc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.80rem;
  text-align: left;
}

.qc-table th {
  background: #f1f5f9;
  color: #1e293b;
  font-weight: 800;
  padding: 0.55rem 0.65rem;
  border-bottom: 2px solid var(--border-color);
  border-right: 1px solid var(--border-light);
  white-space: nowrap;
}

.qc-table th:last-child {
  border-right: none;
}

.th-sub {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-muted);
}

.qc-table td {
  padding: 0.50rem 0.65rem;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  vertical-align: middle;
}

.qc-table td:last-child {
  border-right: none;
}

.qc-table tbody tr:hover {
  background-color: #f8fafc;
}

.qc-table .num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.qc-table a.table-link {
  color: #b91c1c;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.qc-table a.table-link:hover {
  color: #991b1b;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.70rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.table-legend-note {
  font-size: 0.76rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

/* ==========================================================================
   MIX DETAILS CARD (MATCHING USER SCREENSHOT)
   ========================================================================== */
.mix-details-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.mix-details-title {
  color: #b91c1c;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
  border-bottom: 1.5px solid #fee2e2;
  padding-bottom: 0.35rem;
}

.mix-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 1.5rem;
}

.mix-detail-item {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  background: #f8fafc;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  border: 1px solid #f1f5f9;
}

.mix-detail-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  min-width: 110px;
}

.mix-detail-val {
  font-size: 0.84rem;
  font-weight: 600;
  color: #0f172a;
}

.mix-detail-val.highlight-bold {
  font-size: 0.94rem;
  font-weight: 900;
  color: #b91c1c;
}

.mix-details-footer {
  margin-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dotted #e2e8f0;
  padding-top: 0.6rem;
}

.edit-link {
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* ==========================================================================
   TICKETS SECTION & FILTER BAR (MATCHING SCREENSHOT)
   ========================================================================== */
.tickets-section {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.tickets-header-title {
  color: #b91c1c;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.tickets-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.filter-controls-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.82rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.btn-filter-submit {
  background: #e2e8f0;
  color: #1e293b;
  border: 1px solid #94a3b8;
  padding: 0.25rem 0.75rem;
  font-size: 0.80rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
}

.btn-filter-submit:hover {
  background: #cbd5e1;
}

.filter-sublabel {
  font-size: 0.80rem;
  font-weight: 700;
  color: #334155;
  margin-left: 0.5rem;
}

.ticket-status-select {
  padding: 0.30rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #ffffff;
  outline: none;
  cursor: pointer;
  min-width: 320px;
}

.ticket-status-select:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.2);
}

.toggle-pill-group {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  border: 1px solid #cbd5e1;
}

.btn-pill-toggle {
  background: transparent;
  border: none;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-pill-toggle:hover {
  color: #0f172a;
}

.btn-pill-toggle.active {
  background: #ffffff;
  color: #b91c1c;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  font-weight: 800;
}

.filter-results-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 12px;
}

.tickets-table th {
  background: #f1f5f9;
  color: #0f172a;
}

.tickets-table a.ticket-link {
  color: #b91c1c;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.tickets-table a.view-link {
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.pending-cell {
  color: #d97706;
  font-style: italic;
  font-weight: 700;
  background: #fefce8;
}

.low-break-cell {
  color: #dc2626;
  font-weight: 900;
  background: #fee2e2;
}

/* ==========================================================================
   CHART CARD BOX
   ========================================================================== */
.chart-card-box {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: #ffffff;
  margin-top: 1.25rem;
}

.chart-header {
  margin-bottom: 0.65rem;
}

.chart-header h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
}

.chart-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   BUTTONS & MODALS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: #b91c1c;
  color: #ffffff;
}

.btn-primary:hover {
  background: #991b1b;
}

.btn-outline {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-outline:hover {
  background: #f1f5f9;
}

.btn-submittal {
  background: #047857;
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
}

.btn-submittal:hover {
  background: #065f46;
}

/* Modal styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-card {
  background: #ffffff;
  border-radius: 10px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  background: #1e293b;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  font-size: 0.85rem;
}

.modal-footer {
  background: #f8fafc;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.toast-notification {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: #1e293b;
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 20000;
  display: none;
  box-shadow: var(--shadow-md);
}

.toast-notification.show {
  display: block;
}

.toast-notification.success {
  background: #047857;
}

.toast-notification.error {
  background: #b91c1c;
}

/* ==========================================================================
   QA REVIEW & INGESTION STYLES
   ========================================================================== */
.modal-card-xl {
  max-width: 1240px !important;
  width: 96% !important;
  max-height: 92vh !important;
}

.qa-review-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1rem;
  height: 100%;
  transition: grid-template-columns 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.qa-review-split.wide-pdf-layout {
  grid-template-columns: 1.85fr 1fr;
}

@media (max-width: 960px) {
  .qa-review-split,
  .qa-review-split.wide-pdf-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.qa-doc-pane {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.85rem;
  overflow-y: auto;
  height: 100%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.qa-pdf-zoom-toolbar button {
  transition: all 0.15s ease;
}

.qa-pdf-zoom-toolbar button:hover {
  filter: brightness(0.95);
}

.qa-editor-pane {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  overflow-y: auto;
  height: 100%;
}

.qa-doc-sheet {
  background: #ffffff;
  border: 1px solid #94a3b8;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  padding: 1.25rem;
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
  font-size: 11px;
  line-height: 1.3;
  flex: 1;
  overflow: auto;
}

.qa-doc-zoom-container {
  transform-origin: top left;
  transition: transform 0.18s cubic-bezier(0.2, 0, 0, 1);
  width: 100%;
  min-height: 100%;
}

.qa-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1.25rem;
}

.qa-dropzone:hover {
  border-color: #b91c1c;
  background: #fff5f5;
}

.qa-dropzone.drag-active {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2) !important;
  transform: scale(1.01);
}

.global-drag-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: fadeIn 0.15s ease-out;
}

.drag-overlay-box {
  background: #ffffff;
  border: 3px dashed #2563eb;
  border-radius: 16px;
  padding: 3rem 4.5rem;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: pulseBox 1.6s infinite ease-in-out;
}

@keyframes pulseBox {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.qa-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
}

.qa-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.qa-form-group label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #334155;
}

.qa-cylinder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.qa-cylinder-table th {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 4px 6px;
  font-weight: 800;
  text-align: center;
  font-size: 10.5px;
}

.qa-cylinder-table td {
  border: 1px solid #cbd5e1;
  padding: 3px 4px;
  vertical-align: middle;
  text-align: center;
}

.qa-cylinder-table input {
  width: 100%;
  padding: 2px 4px;
  font-size: 11px;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  text-align: right;
  box-sizing: border-box;
}

.qa-verification-checklist {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
}

/* ==========================================================================
   PRINT MEDIA RULES
   ========================================================================== */
/* ==========================================================================
   STRENGTH ANALYSIS WIZARD & FINAL REPORT STYLES (CLASSIC TCA QC DESIGN)
   ========================================================================== */
.analysis-top-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.analysis-title-wrap {
  flex: 1;
}

.analysis-main-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.query-action-links {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.query-action-links a {
  color: #b91c1c;
  text-decoration: underline;
}

.query-action-links a:hover {
  color: #991b1b;
}

.query-action-links .sep {
  color: #94a3b8;
}

/* 5 TABS NAVIGATION (CLASSIC ONLINEQC TABS) */
.analysis-tabs-nav {
  display: flex;
  align-items: flex-end;
  border-bottom: 2px solid #cbd5e1;
  margin-bottom: 1.25rem;
  gap: 0.25rem;
  overflow: visible;
  padding-bottom: 0px;
}

.analysis-tab-btn {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  padding: 0.55rem 1.15rem;
  font-size: 0.80rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  position: relative;
  bottom: -2px;
}

.analysis-tab-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.analysis-tab-btn.active {
  background: #ffffff;
  border-color: #cbd5e1;
  border-top: 3px solid #b91c1c;
  border-bottom: 2px solid #ffffff;
  color: #0f172a;
  font-weight: 900;
  z-index: 2;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.04);
}

/* WIZARD PANELS */
.wizard-panel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.panel-header-card {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
}

.panel-header-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.panel-header-card p {
  font-size: 0.82rem;
  color: #64748b;
}

.selection-bulk-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.selection-count-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}

.wizard-selection-table th {
  background: #f8fafc;
  font-size: 0.75rem;
  font-weight: 800;
  color: #334155;
}

.wizard-selection-table td {
  font-size: 0.80rem;
  vertical-align: middle;
}

.wizard-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  margin-top: 1.25rem;
}

.test-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.filter-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   GLOBAL FORM CONTROLS & STEP 4 FORMAT CARDS
   ========================================================================== */
.form-control {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: #1e293b;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  border-color: #2563eb;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

select.form-control {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 10px 10px;
  padding-right: 1.75rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-control-sm {
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 4px;
}

.format-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 1024px) {
  .format-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.form-group-card {
  min-width: 0;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  overflow: hidden;
}

.form-group-card input.form-control,
.form-group-card select.form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

.form-title-lbl {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.form-help-text {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.aci-factor-info-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.75rem 1rem;
}

/* ==========================================================================
   FINAL REPORT DISPLAY (EXACT MATCH WITH CLASSIC SCREENSHOT)
   ========================================================================== */
.final-report-container {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.final-report-header-bar {
  margin-bottom: 0.75rem;
}

.final-report-main-title {
  font-size: 0.95rem;
  font-weight: 900;
  color: #b91c1c;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 3px;
  cursor: pointer;
}

.column-presets-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.column-checkboxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.75rem;
}

.col-chk-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 3px;
  transition: background 0.1s ease;
}

.col-chk-label:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.col-chk-label input[type="checkbox"] {
  accent-color: #b91c1c;
  cursor: pointer;
}

.live-col-drawer {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.final-report-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.15rem;
}

.action-btn-group {
  display: flex;
  gap: 0.35rem;
}

.btn-report-action {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #94a3b8;
  border-radius: 3px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.btn-report-action:hover {
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  border-color: #64748b;
}

.final-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
}

.final-meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   OFFICIAL HISTORICAL SUBMITTAL SHEET (MATCHES SAMPLE HISTORICAL DATA PDF)
   ========================================================================== */
.historical-doc-sheet {
  background: #ffffff;
  max-width: 860px;
  min-height: 1040px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: max-width 0.25s ease;
}

/* Landscape Mode for Submittal Sheet (Wide View for 8+ / All Columns) */
.historical-doc-sheet.doc-landscape {
  max-width: 1140px;
  min-height: 740px;
  padding: 1.25rem 1.75rem;
}

.historical-doc-sheet.doc-landscape .doc-metadata-grid {
  gap: 2.5rem;
}

.historical-doc-sheet.doc-landscape .doc-historical-table thead th {
  padding: 3.5px 3px;
  font-size: 10px;
  line-height: 1.15;
}

.historical-doc-sheet.doc-landscape .doc-historical-table tbody td {
  padding: 3.2px 3.5px;
  font-size: 10.5px;
  line-height: 1.25;
}

/* Report Action & Orientation Control Toolbar */
.report-toolbar-bar {
  max-width: 860px;
  margin: 0 auto 0.75rem auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
  gap: 0.75rem;
  transition: max-width 0.25s ease;
}

body.report-landscape-mode .report-toolbar-bar {
  max-width: 1140px;
}

.report-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.report-toolbar-lbl {
  font-size: 0.75rem;
  font-weight: 800;
  color: #475569;
}

.orient-pill-group {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
}

.orient-pill {
  background: transparent;
  border: none;
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.orient-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.orient-pill.active {
  background: #2563eb;
  color: #ffffff;
}

.orientation-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.report-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.doc-header-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.doc-brand-logo .logo-box {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.doc-brand-logo .logo-the {
  font-size: 1.1rem;
  font-weight: 900;
  color: #000000;
}

.doc-brand-logo .logo-concrete {
  font-size: 1.55rem;
  font-weight: 900;
  color: #b91c1c;
  line-height: 1;
}

.doc-brand-logo .logo-advantage {
  font-size: 1.55rem;
  font-weight: 900;
  color: #000000;
  line-height: 1;
}

.doc-producer-sub {
  font-size: 0.65rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.doc-producer-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: right;
}

.doc-producer-company {
  font-size: 0.92rem;
  font-weight: 900;
  color: #1e293b;
  line-height: 1.15;
}

.doc-producer-city {
  font-size: 0.70rem;
  color: #64748b;
  font-weight: 700;
}

.doc-title-box {
  text-align: right;
}

.doc-main-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.01em;
}

/* Tan/Beige decorative bar matching Sample Historical Data.pdf */
.doc-accent-bar {
  height: 14px;
  background: #eedbb7;
  margin: 0.45rem 0 0.25rem 0;
  width: 100%;
  border-radius: 2px;
}

.doc-subheading-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.doc-req-heading {
  font-size: 0.80rem;
  font-weight: 800;
  color: #000000;
}

.doc-metadata-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.25rem;
  margin-bottom: 0.85rem;
  font-size: 0.80rem;
}

.doc-meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.doc-meta-lbl {
  font-weight: 800;
  color: #000000;
}

.doc-meta-val {
  color: #000000;
  text-align: right;
}

.doc-meta-val.highlight-req {
  font-weight: 800;
}

.doc-table-wrapper {
  width: 100%;
  flex: 1;
  margin-top: 0.4rem;
}

.doc-historical-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
}

.doc-historical-table thead th {
  border-top: 1px solid #000000;
  border-bottom: 1px solid #000000;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 800;
  color: #000000;
  line-height: 1.2;
  background: transparent;
  vertical-align: bottom;
  box-sizing: border-box;
}

.doc-historical-table tbody tr {
  border: none;
}

.doc-historical-table tbody td {
  padding: 4.2px 6px;
  border: none;
  font-size: 11.5px;
  color: #000000;
  line-height: 1.32;
  box-sizing: border-box;
}

.doc-historical-table td.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.doc-sheet-footer {
  margin-top: 0.85rem;
  padding-top: 0.45rem;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  font-size: 0.70rem;
  color: #475569;
}

/* ==========================================================================
   TCA SUITE APP SWITCHER & ECOSYSTEM LAUNCHER
   ========================================================================== */
.tca-suite-launcher {
  position: relative;
  display: inline-block;
}

.tca-suite-btn {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.tca-suite-btn:hover {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-color: #94a3b8;
  color: #ffffff;
}

.tca-suite-btn .grid-icon {
  font-size: 0.95rem;
  line-height: 1;
  color: #f59e0b;
}

.tca-suite-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 480px;
  max-width: 95vw;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  overflow: hidden;
  animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tca-suite-popover-header {
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #b91c1c;
}

.tca-suite-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tca-suite-sub {
  font-size: 0.68rem;
  color: #94a3b8;
}

.tca-suite-app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0.85rem;
  background: #f8fafc;
}

.tca-app-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
  cursor: pointer;
  position: relative;
}

.tca-app-card:hover {
  border-color: #b91c1c;
  background: #fffafa;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.tca-app-card.active-app {
  border: 2px solid #b91c1c;
  background: #fff5f5;
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.12);
}

.tca-app-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.tca-app-icon {
  font-size: 1.4rem;
  line-height: 1;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 6px;
}

.tca-app-card.active-app .tca-app-icon {
  background: #fee2e2;
}

.tca-app-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.tca-app-badge {
  display: inline-block;
  font-size: 0.60rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 2px;
  text-transform: uppercase;
}

.badge-live {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-active-now {
  background: #b91c1c;
  color: #ffffff;
}

.badge-toolbox {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.tca-app-desc {
  font-size: 0.70rem;
  color: #64748b;
  line-height: 1.3;
}

.tca-suite-footer {
  background: #ffffff;
  padding: 0.6rem 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.72rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   ROLE & PERSONA SWITCHER BAR
   ========================================================================== */
.role-persona-bar {
  background: #0f172a;
  color: #f8fafc;
  border-bottom: 2px solid #334155;
  padding: 0.4rem 1.25rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.78rem;
}

.role-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.role-bar-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.role-indicator-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.role-btn-group {
  display: flex;
  gap: 0.35rem;
  background: #1e293b;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid #334155;
}

.role-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.role-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.role-btn.active {
  background: #b91c1c;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.role-badge-info {
  font-size: 0.73rem;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   REVIEWER ASSIGNED BANNER & ADMIN ASSIGNMENT TOOLBAR
   ========================================================================== */
.reviewer-assigned-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-assignment-toolbar {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Admin Console Sub-Navigation Tabs */
.admin-sub-tabs-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.admin-sub-tab {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-sub-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-sub-tab.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.admin-maintenance-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.qa-dropzone {
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
}

.qa-dropzone:hover {
  background: #f1f5f9;
  border-color: #b91c1c;
}

/* ==========================================================================
   QA REVIEW SPLIT-SCREEN MODAL (PDF DOCUMENT VS DATA EDITOR)
   ========================================================================== */
.modal-card-xl {
  max-width: 1200px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.qa-review-split {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  gap: 1rem;
  height: 100%;
  overflow: hidden;
}

.qa-doc-pane {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100%;
}

.qa-doc-sheet {
  background: #ffffff;
  border: 1px solid #94a3b8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1rem;
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
  font-size: 10px;
  flex: 1;
}

.qa-editor-pane {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.qa-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.65rem;
}

.qa-form-group {
  display: flex;
  flex-direction: column;
}

.qa-form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 2px;
}

.qa-cylinder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

.qa-cylinder-table th {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 4px 6px;
  font-size: 0.70rem;
  font-weight: 800;
  color: #1e293b;
  text-align: left;
}

.qa-cylinder-table td {
  border: 1px solid #e2e8f0;
  padding: 3px 4px;
}

.qa-cylinder-table input {
  width: 100%;
  padding: 2px 4px;
  font-size: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  box-sizing: border-box;
}

.qa-cylinder-table input:focus {
  border-color: #2563eb;
  outline: none;
}

.qa-verification-checklist {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.65rem;
  font-size: 0.74rem;
}

/* ==========================================================================
/* ==========================================================================
   FULLSCREEN OPENING LANDING LOGIN PAGE & MODAL
   ========================================================================== */
.opening-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 25%, #1e293b 0%, #0f172a 65%, #020617 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  padding: 1.5rem;
  overflow-y: auto;
}

.opening-login-card {
  max-width: 480px;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: loginCardFadeIn 0.35s ease-out;
}

@keyframes loginCardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.opening-brand-header {
  background: #0f172a;
  color: #ffffff;
  padding: 2rem 1.75rem 1.5rem;
  text-align: center;
  border-bottom: 4px solid #b91c1c;
  position: relative;
}

.opening-brand-logo {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}

.opening-brand-logo .logo-the {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
}

.opening-brand-logo .logo-concrete {
  font-size: 1.8rem;
  font-weight: 900;
  color: #dc2626;
  line-height: 1;
}

.opening-brand-logo .logo-advantage {
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.opening-subhead {
  font-size: 0.85rem;
  color: #e2e8f0;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.opening-tagline {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.4rem 0 0;
  line-height: 1.4;
}

.opening-login-body {
  padding: 1.75rem;
}

.opening-feature-highlights {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.feature-badge {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.login-card {
  max-width: 480px;
  width: 92vw;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.login-brand-header {
  background: #0f172a;
  color: #ffffff;
  padding: 1.5rem 1.75rem;
  text-align: center;
  border-bottom: 3px solid #b91c1c;
}

.login-brand-logo {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.login-brand-logo .logo-the {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
}

.login-brand-logo .logo-concrete {
  font-size: 1.6rem;
  font-weight: 900;
  color: #dc2626;
  line-height: 1;
}

.login-brand-logo .logo-advantage {
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.login-subhead {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.login-body {
  padding: 1.5rem 1.75rem;
}

.login-input-group {
  margin-bottom: 0.95rem;
}

.login-input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.25rem;
}

.login-input-group input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.login-input-group input:focus {
  border-color: #b91c1c;
  outline: none;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.15);
}

.login-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.login-submit-btn {
  width: 100%;
  background: #b91c1c;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0.65rem 1rem;
  font-size: 0.90rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
  box-shadow: 0 2px 4px rgba(185, 28, 28, 0.25);
}

.login-submit-btn:hover {
  background: #991b1b;
}

.login-security-footer {
  text-align: center;
  font-size: 0.70rem;
  color: #94a3b8;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   PRINT MEDIA RULES (PRINTS ONLY CLEAN 1-PAGE ACI SUBMITTAL SHEET)
   ========================================================================== */
@media print {
  @page {
    size: letter portrait;
    margin: 0.35in 0.45in;
  }

  /* 1. Global Reset */
  html, body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 2. Strictly hide all website headers, branding bars, navigation, tabs, buttons, alerts */
  header,
  nav,
  footer,
  .role-persona-bar,
  .role-bar-inner,
  .app-top-header,
  .top-header-content,
  .brand-box,
  .user-meta-box,
  .main-nav-bar,
  .nav-container,
  .breadcrumb-bar,
  .section-header-bar,
  .kpi-grid,
  .card-table-wrapper,
  .table-legend-note,
  .tickets-filter-bar,
  .tickets-section,
  .chart-card-box,
  .alert-table,
  .analysis-top-actions,
  .analysis-title-wrap,
  .analysis-main-title,
  .query-action-links,
  .analysis-tabs-nav,
  .panel-header-card,
  .panel-body-card,
  .wizard-nav-footer,
  .report-toolbar-bar,
  .live-col-drawer,
  .tca-suite-launcher,
  .tca-suite-dropdown,
  .btn,
  .modal,
  .modal-backdrop,
  .modal-content,
  .toast-notification,
  .no-print,
  #viewAllMixes,
  #viewMixDetails,
  #viewLowBreaks,
  #panelMixSelection,
  #panelProjectSelection,
  #panelTestSelection,
  #panelReportFormat {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  /* 3. Render portal container & step 5 cleanly */
  .portal-container, 
  #viewStrengthAnalysis, 
  #panelFinalReport {
    display: block !important;
    position: static !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* 4. Document Sheet Formatting */
  .historical-doc-sheet {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 10.1in !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  .doc-header-block {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 3px !important;
  }

  .doc-accent-bar {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    background: #eedbb7 !important;
    height: 13px !important;
    margin: 4px 0 4px 0 !important;
    width: 100% !important;
  }

  .doc-brand-logo .logo-concrete {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color: #b91c1c !important;
  }

  .doc-subheading-row {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 4px !important;
  }

  .doc-req-heading {
    font-size: 10px !important;
  }

  .doc-metadata-grid {
    display: grid !important;
    grid-template-columns: 1.15fr 1fr !important;
    gap: 1.75rem !important;
    margin-bottom: 6px !important;
    font-size: 10px !important;
  }

  .doc-meta-row {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 1.5px !important;
    line-height: 1.22 !important;
  }

  .doc-table-wrapper {
    width: 100% !important;
    flex: 1 !important;
    margin-top: 4px !important;
  }

  .doc-historical-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-family: Arial, Helvetica, sans-serif !important;
  }

  .doc-historical-table thead th {
    border-top: 1px solid #000000 !important;
    border-bottom: 1px solid #000000 !important;
    padding: 3.5px 4px !important;
    font-size: 9.5px !important;
    line-height: 1.15 !important;
    background: transparent !important;
  }

  .doc-historical-table tbody td {
    padding: 3.4px 4px !important;
    font-size: 10.5px !important;
    line-height: 1.24 !important;
    border: none !important;
  }

  .doc-historical-table tbody tr {
    page-break-inside: avoid !important;
  }

  .doc-sheet-footer {
    margin-top: 6px !important;
    padding-top: 3px !important;
    border-top: 1px solid #cbd5e1 !important;
    display: flex !important;
    justify-content: space-between !important;
    font-size: 8.5px !important;
  }

  /* 5. Dedicated Landscape Print Layout (When All / 8+ Columns Selected) */
  body.report-landscape-mode .historical-doc-sheet {
    min-height: 7.2in !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  body.report-landscape-mode .doc-metadata-grid {
    grid-template-columns: 1.15fr 1fr !important;
    gap: 2.5rem !important;
    margin-bottom: 4px !important;
  }

  body.report-landscape-mode .doc-historical-table thead th {
    padding: 2.5px 2px !important;
    font-size: 8px !important;
    line-height: 1.1 !important;
  }

  body.report-landscape-mode .doc-historical-table tbody td {
    padding: 2.2px 2px !important;
    font-size: 8.5px !important;
    line-height: 1.18 !important;
  }

  body.report-landscape-mode .badge {
    font-size: 7px !important;
    padding: 1px 4px !important;
  }
}

/* ==========================================================================
   TCA SUITE APP SWITCHER & ECOSYSTEM STYLES
   ========================================================================== */
.tca-suite-launcher {
  position: relative;
  display: inline-block;
  z-index: 1000;
}

.tca-suite-btn {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 0.38rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.tca-suite-btn:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: #64748b;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tca-suite-btn .grid-icon {
  color: #38bdf8;
  font-size: 0.95rem;
}

.tca-suite-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 540px;
  max-width: 95vw;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.25), 0 8px 16px -4px rgba(15, 23, 42, 0.15);
  z-index: 99999;
  overflow: hidden;
  animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tca-suite-popover-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 0.85rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #b91c1c;
}

.tca-suite-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #ffffff;
}

.tca-suite-title span {
  color: #38bdf8;
}

.tca-suite-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
}

.tca-suite-app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  background: #f8fafc;
}

.tca-app-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  cursor: pointer;
  position: relative;
}

.tca-app-card:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.tca-app-card.active-app {
  border: 1.5px solid #b91c1c;
  background: #fffafa;
}

.tca-app-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.tca-app-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.active-app .tca-app-icon {
  background: #fee2e2;
}

.tca-app-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.tca-app-desc {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.35;
}

.tca-app-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.badge-active-now {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-live {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-toolbox {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.tca-suite-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
}

/* ==========================================================================
   TOOLBOX MODAL & CALCULATORS
   ========================================================================== */
.toolbox-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.toolbox-modal-card {
  background: #ffffff;
  border-radius: 12px;
  width: 920px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.toolbox-modal-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 1rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #b91c1c;
}

.toolbox-nav-tabs {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  padding: 0.35rem 1rem 0 1rem;
  gap: 0.5rem;
}

.toolbox-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  padding: 0.55rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.toolbox-tab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.toolbox-tab-btn.active {
  background: #ffffff;
  color: #b91c1c;
  border-color: #cbd5e1;
  border-bottom-color: #ffffff;
  margin-bottom: -1px;
}

.toolbox-modal-body {
  padding: 1.4rem;
  overflow-y: auto;
  flex: 1;
  background: #f8fafc;
}

.calc-grid-2col {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
}

.calc-card-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.15rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.calc-input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.calc-input-row label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.calc-input-row input,
.calc-input-row select {
  width: 140px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  text-align: right;
}

.calc-result-box {
  background: #0f172a;
  color: #ffffff;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

.calc-result-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: -0.02em;
}

.calc-risk-badge {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.risk-safe {
  background: #15803d;
  color: #ffffff;
}

.risk-warn {
  background: #d97706;
  color: #ffffff;
}

.risk-severe {
  background: #b91c1c;
  color: #ffffff;
}

/* Inspection checklist modal styling */
.checklist-group {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.checklist-group-header {
  background: #f1f5f9;
  padding: 0.65rem 1rem;
  font-weight: 800;
  font-size: 0.88rem;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checklist-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.82rem;
}

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



