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

/* Body Styling */
body {
  background-color: #273459;
  color: #333;
  font-family: Arial, sans-serif;
}

/* Header Bar */
.header-bar {
  background-color: #007bff;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-bar h2 {
  font-size: 1.5rem;
}

.header-bar .user-info {
  font-size: 0.9rem;
}

/* Main Container */
.main-container {
  padding: 24px;
}

/* Page Headings */
h2.mb-4 {
  text-align: center;
  color: #fff;
  background-color: #007bff;
  padding: 12px 20px;
  border-radius: 12px;
  max-width: 800px;
  margin: 2rem auto;
  font-size: 1.75rem;
}

/* Upload Form */
.upload-form {
  background: #ffffff;
  padding: 24px 32px;
  border-radius: 16px;
  max-width: 960px;
  margin: 2rem auto;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.upload-form label {
  font-weight: bold;
  margin-top: 1rem;
  display: block;
}

.upload-form .note {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.5rem;
}

/* Summary Card Section (flush-left container) */
.summary-wrapper {
  width: 100%;
  overflow-x: auto;
  background-color: #202b47;
}

/* Summary Cards Row */
.summary-cards {
  display: flex;
  gap: 24px;
  padding: 24px;
  justify-content: flex-start;
  overflow-x: auto;
  background-color: transparent;
}

/* Individual Card */
.summary-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 16px;
  width: 130px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  font-size: 0.85rem;
}

.summary-card h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  font-weight: normal;
  color: #555;
}


.summary-card p {
  font-size: 1.8rem;
  font-weight: bold;
  color: #111;
  margin-top: 4px;
}


.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 12px rgba(0, 123, 255, 0.35);
}

.summary-card::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  background: linear-gradient(90deg, #007bff, #00c6ff, #007bff);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 18px;
}

.summary-card:hover::before {
  opacity: 0.2;
}

.summary-card h3,
.summary-card p {
  position: relative;
  z-index: 1;
}

/* Table Section */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
}

th, td {
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  text-align: left;
  font-size: 0.95rem;
}

th {
  background-color: #007bff;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

tr:nth-child(even) {
  background-color: #fafafa;
}

.catalog-link {
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}

.catalog-link:hover {
  color: #0056b3;
  text-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Special for Comparison Tables */
.comparison-table th {
  background-color: #343a40;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.ds-row { background-color: #f8f9fa; }
.qa-row { background-color: #e9ecef; }

.badge-clean {
  background-color: #28a745;
  color: white;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
}

.badge-mismatch {
  background-color: #dc3545;
  color: white;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.75rem;
}

.mismatch-cell {
  background-color: #ffe6e6 !important;
  font-weight: 500;
}

/* Footer */
footer {
  text-align: center;
  color: #ccc;
  margin: 2rem 0 1rem;
  font-size: 0.85rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px 30px;
  border-radius: 12px;
  width: 60%;
  max-height: 70%;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.modal-header h4 {
  margin: 0;
}

.modal-close {
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: black;
  text-decoration: none;
}

/* Error Breakdown */
.error-breakdown {
  background: #fff;
  margin: 24px auto;
  padding: 16px;
  border-radius: 12px;
  max-width: 800px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.error-breakdown h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
  color: #333;
}

.error-breakdown table {
  width: 100%;
  border-collapse: collapse;
}

.error-breakdown th,
.error-breakdown td {
  border: 1px solid #e0e0e0;
  padding: 8px 12px;
  text-align: left;
}

.error-breakdown th {
  background-color: #007bff;
  color: #fff;
}

/* Admin Table Section */
.admin-container {
  padding: 2rem 1rem;
  max-width: 1100px;
  margin: auto;
}

.admin-title {
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #343a40;
}

.admin-table {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-table th {
  background-color: #007bff;
  color: white;
  text-align: center;
  font-size: 0.9rem;
}

.admin-table td {
  text-align: center;
  font-size: 0.88rem;
}

.admin-table .btn-danger {
  font-size: 0.8rem;
  padding: 4px 10px;
}
/* === Mirror Table: Match DS Summary Style === */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
}

.comparison-table th {
  background-color: #007bff;
  color: #fff;
  font-weight: bold;
  text-align: center;
  padding: 12px;
  border: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.comparison-table td {
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  text-align: left;
  vertical-align: middle;
  font-size: 0.95rem;
}

.comparison-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.comparison-table .ds-row {
  background-color: #fefefe;
}

.comparison-table .qa-row {
  background-color: #f5f5f5;
}

.comparison-table tbody tr:hover {
  background-color: #f1f8ff;
}
/* Tooltip Header for Long Column Descriptions */
.tooltip-header {
  position: relative;
  cursor: help;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
}

.tooltip-header::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background-color: #343a40;
  color: #fff;
  padding: 8px 10px;
  font-size: 0.75rem;
  white-space: pre-line;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 9999;
  width: 220px;
}

.tooltip-header:hover::after {
  opacity: 1;
}
/* Gray Header Range Styling */
th.gray-header {
  background-color: #6c757d !important; /* Bootstrap gray */
  color: white !important;
}

/* Filter Buttons */
.filter-buttons {
  text-align: center;
  margin: 10px 0 20px;
}

.filter-buttons .btn {
  padding: 8px 16px;
  margin: 0 5px;
  font-size: 0.9rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-buttons .btn-danger {
  background-color: #dc3545;
  color: white;
}

.filter-buttons .btn-secondary {
  background-color: #6c757d;
  color: white;
}

.filter-buttons .btn:hover {
  opacity: 0.9;
}
