/* Import font configuration */
@import url('font-config.css');

html {
  font-size: 13px;
}

@media (min-width: 768px) {
  html {
    font-size: 13px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 50px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Custom CSS for Pharmaceutical Bidding Analysis - màu #1e88e5 */
.bg-gradient-primary {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  color: #ffffff;
}

.bg-gradient-success {
  background: linear-gradient(135deg, #198754 0%, #146c43 100%);
  color: #ffffff;
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  color: #212529;
}

.bg-gradient-info {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  color: #ffffff;
}

/* Card enhancements */
.card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border-radius: 15px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.card-header {
  border-radius: 15px 15px 0 0 !important;
}

/* Button enhancements */
.btn {
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}

/* Form enhancements */
.form-control, .form-select {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control-lg {
  padding: 15px 20px;
  font-size: 15px;
}

/* Badge enhancements */
.badge {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 20px;
}

/* Alert enhancements */
.alert {
  border-radius: 15px;
  border: none;
}

/* Navigation enhancements */
.navbar {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 17px;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #667eea !important;
}

/* Hero section */
.bg-gradient-primary {
  position: relative;
  overflow: hidden;
}

.bg-gradient-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

/* Icon enhancements */
.fas, .fa {
  transition: transform 0.3s ease;
}

.card:hover .fas,
.card:hover .fa {
  transform: scale(1.1);
}

/* Footer enhancements - Compact version */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  margin-top: 1rem;
  padding: 0.75rem 0;
  min-height: 50px;
}

.footer small {
  font-size: 11px;
  line-height: 1.2;
}

.footer .text-white-50 {
  opacity: 0.75;
}

.footer .row {
  margin: 0;
}

.footer .col-md-6 {
  padding: 0.25rem 0.75rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .display-3 {
    font-size: 2.5rem;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .btn-lg {
    padding: 10px 20px;
    font-size: 12px;
  }
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5a6fd8;
}

/* Global table text color - chỉ giữ màu xanh dương cho số thông báo, còn lại đều xám */
.table tbody td .text-info,
.table tbody td .text-success,
.table tbody td .text-warning {
  color: #6c757d !important;
}

/* Giữ màu xanh dương cho số thông báo */
.table tbody td .text-primary {
  color: #0d6efd !important;
}

/* Global tab navigation - màu #1e88e5 cho active, xanh nhạt cho inactive */
.nav-tabs .nav-link {
  color: #1e88e5 !important;
  background-color: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 0.375rem 0.375rem 0 0 !important;
  transition: all 0.3s ease !important;
  margin-right: 2px !important;
}

.nav-tabs .nav-link:hover {
  color: #1e88e5 !important;
  background-color: #e9ecef !important;
  border-color: #dee2e6 !important;
}

.nav-tabs .nav-link.active {
  color: #ffffff !important;
  background-color: #1e88e5 !important;
  border-color: #1e88e5 #1e88e5 #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3) !important;
}

/* Global gradient backgrounds - màu #1e88e5 */
.bg-gradient-primary {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%) !important;
  color: #ffffff !important;
}

.bg-gradient-info {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%) !important;
  color: #ffffff !important;
}

/* Card headers với màu #1e88e5 */
.card-header.bg-gradient-primary,
.card-header.bg-gradient-info {
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%) !important;
  color: #ffffff !important;
  border-bottom: 1px solid #1565c0 !important;
}

/* Table headers - nền xanh nhạt và chữ đậm cho toàn bộ chương trình */
.table thead th {
  background-color: #e3f2fd !important;
  color: #1565c0 !important;
  font-weight: bold !important;
  border-bottom: 2px solid #bbdefb !important;
  padding: 12px 8px !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.table thead th:hover {
  background-color: #bbdefb !important;
  color: #0d47a1 !important;
}

/* Bootstrap table header overrides */
.table-dark thead th {
  background-color: #e3f2fd !important;
  color: #1565c0 !important;
  font-weight: bold !important;
  border-color: #bbdefb !important;
}

.table-striped thead th {
  background-color: #e3f2fd !important;
  color: #1565c0 !important;
  font-weight: bold !important;
}

/* DataTable headers */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
  color: #1565c0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #1565c0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #1e88e5 !important;
  color: white !important;
  border: 1px solid #1e88e5 !important;
}

/* Override cho tất cả table headers trong toàn bộ chương trình */
.table th,
.table thead th,
table th,
table thead th {
  background-color: #e3f2fd !important;
  color: #1565c0 !important;
  font-weight: bold !important;
  border-bottom: 2px solid #bbdefb !important;
  padding: 12px 8px !important;
  text-align: center !important;
  vertical-align: middle !important;
}

/* Override cho các class table khác nhau */
.table-bordered thead th,
.table-hover thead th,
.table-sm thead th,
.table-responsive thead th {
  background-color: #e3f2fd !important;
  color: #1565c0 !important;
  font-weight: bold !important;
  border-color: #bbdefb !important;
}

/* Bid Information Page Styles */
.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.card.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-marker {
  position: absolute;
  left: -30px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 3px #dee2e6;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: -24px;
  top: 12px;
  width: 2px;
  height: 20px;
  background-color: #dee2e6;
}

.timeline-content {
  padding-left: 10px;
}

/* Status badge colors */
.badge.bg-success {
  background-color: #198754 !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

.badge.bg-info {
  background-color: #0dcaf0 !important;
}

/* Card hover effects for bid items */
.card.shadow-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
  transition: all 0.3s ease;
}

/* Compact bid card styles */
.card-body.p-3 {
  padding: 0.75rem !important;
}

.card-body .small {
  font-size: 11px;
}

.card-body h6.small {
  font-size: 12px;
  line-height: 1.3;
}

.badge.small {
  font-size: 10px;
  padding: 0.25rem 0.5rem;
}

/* Grid layout improvements */
.row.g-2 > .col-6 {
  padding: 0.25rem;
}

.row.g-2 .small {
  line-height: 1.2;
}