/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Thu nhỏ cột STT và căn giữa */
#birth-records-table th:first-child,
#birth-records-table td:first-child {
  width: 70px;
  text-align: center;
}

/* Căn giữa các cột số liệu */
#birth-records-table th:nth-child(3),
#birth-records-table th:nth-child(4),
#birth-records-table td:nth-child(3),
#birth-records-table td:nth-child(4),
#birth-records-table th:nth-child(5),
#birth-records-table td:nth-child(5) {
  text-align: center;
}

:root {
  /* Colors */
  --primary-red: #cc0000;
  --primary-gold: #e8b84d;
  --primary-blue: #2196f3;
  --primary-blue-dark: #1976d2;
  --primary-orange: #ffa726;
  --primary-red-dark: #c62828;
  --dark-text: #0d0d0d;
  --gray-bg: #ebebeb;
  --white: #ffffff;
  --footer-dark: #0a1929;

  /* Spacing */
  --container-max-width: 1440px;
  --section-padding: 80px 20px;
  --card-padding: 30px;

  /* Typography */
  --font-primary: "Roboto", sans-serif;
}

body {
  font-family: var(--font-primary);
  color: var(--dark-text);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================================
   HEADER
   =================================== */
.header {
  background: linear-gradient(135deg, #f4d58d 0%, #e8b84d 100%);
  padding: 35px 20px;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("assets/images/pattern-gold.png") repeat;
  opacity: 0.3;
  z-index: 0;
}

.header-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 25px;
  position: relative;
  z-index: 1;
}

.logo-wrapper {
  background: white;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-login {
  background: #9d2c2f;
  border-radius: 20px;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(157, 44, 47, 0.3);
  white-space: nowrap;
  height: 75px;
}

.btn-login:hover {
  background: #7d1f22;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(157, 44, 47, 0.4);
}

.login-icon {
  width: 49px;
  height: 49px;
  object-fit: contain;
}

.login-text {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 30px;
  color: var(--white);
  line-height: 1;
}

.logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  display: block;
}

.header-text {
  flex: 1;
}

.header-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 2px;
  line-height: 1.3;
}

.header-subtitle {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-red);
  line-height: 1.3;
}

/* ===================================
   PROCESS SECTION
   =================================== */
.process-section {
  background: var(--gray-bg);
  padding: 60px 20px;
}

.section-title {
  text-align: center;
  font-size: 40px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
  line-height: 47px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-red);
}

.process-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
  max-width: 1280px;
  margin: 0 auto;
}

.process-card {
  border-radius: 20px;
  padding: 20px;
  text-align: left;
  flex: 1 1 0;
  min-width: 0;
  height: 154px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}

.process-card.blue {
  background: var(--primary-blue);
}

.process-card.blue-dark {
  background: var(--primary-blue-dark);
}

.process-card.orange {
  background: var(--primary-orange);
}

.process-card.red {
  background: var(--primary-red-dark);
}

.process-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.process-icon {
  width: 84px;
  height: 84px;
  min-width: 84px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  flex-shrink: 0;
  background: var(--white);
  padding: 17px;
}

.process-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.process-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  line-height: 1.3;
}

.process-desc {
  font-size: 14px;
  color: var(--white);
  line-height: 1.5;
  margin: 0;
}

.process-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===================================
   SERVICE INTRO
   =================================== */
.service-intro {
  background: var(--white);
  padding: var(--section-padding);
}

.service-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.service-image img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.service-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 30px;
  line-height: 1.4;
}

.service-benefits {
  list-style: none;
  margin-bottom: 30px;
}

.service-benefits li {
  font-size: 16px;
  color: var(--dark-text);
  margin-bottom: 15px;
  padding-left: 30px;
  position: relative;
}

.service-benefits li::before {
  content: "●";
  position: absolute;
  left: 0;
  color: var(--primary-red);
  font-size: 20px;
}

.btn-primary {
  background: var(--primary-red);
  color: var(--white);
  border: none;
  padding: 15px 40px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
}

.btn-primary:hover {
  background: #a80000;
  transform: scale(1.05);
}

/* ===================================
   SERVICES SECTION
   =================================== */
.services-section {
  background: var(--gray-bg);
  padding: var(--section-padding);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: var(--white);
  border: 1px solid #c0b7b7;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  height: 405px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 20px;
  line-height: 24px;
}

.service-card-desc {
  font-size: 14px;
  font-weight: 400;
  color: #000000;
  line-height: 22px;
}

/* ===================================
   STATS SECTION
   =================================== */
.stats-section {
  background: var(--white);
  padding: var(--section-padding);
}

.controls-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  /* gap: 20px; */
  flex-wrap: wrap;
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 22px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--white);
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 14px;
  gap: 6px;
}

.btn-icon:hover {
  background: #f8f9fa;
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.export-excel-btn {
  border-color: #28a745;
  color: #28a745;
}

.export-excel-btn:hover {
  background: #28a745;
  color: var(--white);
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  flex-wrap: wrap;
}

.date-range-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #dde7ff;
  flex-wrap: wrap;
}

.filter-select {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 13px;
  font-family: var(--font-primary);
  outline: none;
  background-color: #ffffff;
}

.filter-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.date-range-wrapper label {
  font-size: 13px;
  color: #555;
}

.date-range-wrapper input[type="date"] {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 13px;
  font-family: var(--font-primary);
  outline: none;
  background-color: #ffffff;
}

.date-range-wrapper input[type="date"]:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Nút Lọc trong khối ngày: thấp ngang với ô chọn ngày */
.date-range-wrapper .btn-primary {
  padding: 6px 16px;
  font-size: 13px;
  line-height: 1.4;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #666;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-primary);
  outline: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.search-input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.table-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.table-wrapper {
  overflow-x: auto;
}

#birth-records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#birth-records-table th {
  background: #f8f9fa;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: var(--dark-text);
  border-bottom: 2px solid #e9ecef;
  white-space: nowrap;
}

/* Sortable column headers */
#birth-records-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

#birth-records-table th.sortable:hover {
  background: #eef2f7;
}

#birth-records-table th.sortable .sort-icon {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

#birth-records-table th.sortable .sort-icon svg {
  display: block;
}

#birth-records-table th.sortable .sort-icon .sort-asc,
#birth-records-table th.sortable .sort-icon .sort-desc {
  fill: #ccc;
  transition: fill 0.2s ease;
}

#birth-records-table th.sortable.active.desc .sort-icon .sort-desc {
  fill: #28a745;
}

#birth-records-table th.sortable.active.asc .sort-icon .sort-asc {
  fill: #28a745;
}

#birth-records-table td {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

#birth-records-table tbody tr:hover {
  background: #f8f9fa;
}

#birth-records-table tbody tr:last-child td {
  border-bottom: none;
}

.empty-message {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 40px !important;
}

/* Contact table specific styles */
#contact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#contact-table th,
#contact-table td {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

#contact-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--dark-text);
  border-bottom: 2px solid #e9ecef;
  white-space: nowrap;
}

#contact-table tbody tr:hover {
  background: #f8f9fa;
}

#contact-table tbody tr:last-child td {
  border-bottom: none;
}

#contact-table .col-stt {
  width: 70px;
  text-align: center;
}

#contact-table .col-donvi {
  padding-left: 50px;
}

#contact-table .col-phone {
  width: 180px;
  text-align: center;
  font-weight: 500;
  color: #333;
}

#contact-table .col-action {
  width: 140px;
  text-align: center;
}

/* Call button */
.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-call:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-call svg {
  flex-shrink: 0;
}

/* Detail button */
.btn-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f0f7ff;
  color: var(--primary-blue);
  border: 1px solid #cce5ff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-detail:hover {
  background: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.action-cell {
  text-align: center;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 0 20px;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-top: 1px solid #e9ecef;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-controls-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.pagination-size-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-size-selector label {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.page-size-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: var(--white);
  font-size: 14px;
  color: #666;
  outline: none;
  cursor: pointer;
}

.page-size-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.pagination-info {
  color: #666;
  font-size: 14px;
}

.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: var(--white);
  color: #666;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  min-width: 36px;
  text-align: center;
}

.pagination-btn:hover {
  background: #f8f9fa;
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.pagination-btn.active {
  background: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn:disabled:hover {
  background: var(--white);
  border-color: #ddd;
  color: #666;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  background:
    linear-gradient(to bottom, rgba(10, 25, 41, 0.95), rgba(10, 25, 41, 0.98)),
    url("assets/images/footer-bg.jpg") center/cover;
  color: var(--white);
  padding: 60px 20px;
  text-align: center;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-info {
  font-size: 16px;
  margin-bottom: 10px;
  opacity: 0.9;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
  :root {
    --section-padding: 60px 20px;
  }

  .header-title {
    font-size: 18px;
  }

  .header-subtitle {
    font-size: 22px;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .btn-login {
    padding: 10px 20px;
    height: 60px;
    gap: 12px;
  }

  .login-icon {
    width: 40px;
    height: 40px;
  }

  .login-text {
    font-size: 22px;
  }

  .section-title {
    font-size: 32px;
  }

  .process-steps {
    flex-wrap: wrap;
    gap: 15px;
  }

  .process-card {
    flex: 1 1 calc(50% - 15px);
    min-width: 0;
    height: auto;
    min-height: 140px;
  }

  .process-arrow:nth-of-type(2) {
    display: none;
  }

  .process-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    padding: 14px;
  }

  .process-title {
    font-size: 15px;
  }

  .process-desc {
    font-size: 13px;
  }

  .service-content {
    gap: 40px;
  }

  .service-title {
    font-size: 24px;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
  }

  .service-card {
    padding: 35px 25px;
    height: 360px;
  }

  .service-icon {
    width: 70px;
    height: 70px;
  }

  .service-card-title {
    font-size: 16px;
    line-height: 22px;
  }

  .service-card-desc {
    font-size: 13px;
    line-height: 20px;
  }

  /* Tablet controls spacing */
  .controls-container {
    gap: 16px;
  }

  .controls-left {
    gap: 16px;
  }

  .search-wrapper {
    min-width: 280px;
  }

  .date-range-wrapper {
    margin-left: 0;
  }

  .controls-right {
    gap: 16px;
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  :root {
    --section-padding: 40px 15px;
  }

  .header {
    padding: 25px 15px;
  }

  .header-container {
    flex-wrap: wrap;
    text-align: left;
    gap: 15px;
    justify-content: space-between;
  }

  .logo {
    width: 50px;
    height: 50px;
  }

  .btn-login {
    padding: 8px 15px;
    height: 50px;
    gap: 10px;
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .login-icon {
    width: 32px;
    height: 32px;
  }

  .login-text {
    font-size: 18px;
  }

  .header-title {
    font-size: 14px;
  }

  .header-subtitle {
    font-size: 16px;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .controls-container {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .controls-left {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .date-range-wrapper {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 70px 1fr;
    grid-template-rows: auto auto;
    gap: 12px;
    align-items: center;
  }

  .date-range-wrapper label[for="start-date"],
  .date-range-wrapper label[for="end-date"] {
    font-size: 13px;
    white-space: nowrap;
    text-align: left;
    margin-left: 0;
  }

  .date-range-wrapper label[for="start-date"] {
    grid-column: 1;
    grid-row: 1;
  }

  #start-date {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
  }

  .date-range-wrapper label[for="end-date"] {
    grid-column: 1;
    grid-row: 2;
  }

  #end-date {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
  }

  .controls-right {
    width: 100%;
    margin-top: 0;
    gap: 8px;
    flex-direction: column;
    align-items: flex-start;
  }

  .total-records {
    width: auto;
  }

  #contact-table .col-donvi {
    padding-left: 0;
  }

  .process-steps {
    flex-direction: column;
    gap: 20px;
  }

  .process-arrow {
    transform: rotate(90deg);
  }

  .process-arrow:nth-of-type(2),
  .process-arrow:nth-of-type(4) {
    display: flex;
  }

  .process-card {
    flex: 1 1 auto;
    min-width: 100%;
    height: auto;
    min-height: 120px;
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
    gap: 15px;
  }

  .process-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    padding: 12px;
  }

  .process-content {
    align-items: center;
  }

  .process-title {
    font-size: 14px;
  }

  .process-desc {
    font-size: 12px;
    text-align: center;
  }

  .service-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .service-title {
    font-size: 20px;
    text-align: center;
  }

  .service-benefits {
    text-align: left;
  }

  .btn-primary {
    width: 100%;
    padding: 15px 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .service-card {
    padding: 30px 20px;
    height: auto;
    min-height: 300px;
  }

  .service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 18px;
  }

  .service-card-title {
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 15px;
  }

  .service-card-desc {
    font-size: 13px;
    line-height: 20px;
  }

  .footer {
    padding: 40px 15px;
  }

  .footer-title {
    font-size: 20px;
  }

  .footer-info {
    font-size: 14px;
  }
}

/* Small Mobile (max-width: 374px) */
@media (max-width: 374px) {
  .header-title {
    font-size: 16px;
  }

  .header-subtitle {
    font-size: 18px;
  }

  .section-title {
    font-size: 20px;
  }

  .process-card {
    min-width: 100%;
    padding: 25px 15px;
  }

  .service-title {
    font-size: 18px;
  }

  .service-card-title {
    font-size: 18px;
    line-height: 24px;
  }

  .service-card-desc {
    font-size: 14px;
    line-height: 20px;
  }
}

/* Large Desktop (min-width: 1440px) */
@media (min-width: 1440px) {
  .logo {
    width: 80px;
    height: 80px;
  }

  .btn-login {
    padding: 15px 30px;
    height: 80px;
    gap: 18px;
  }

  .login-icon {
    width: 55px;
    height: 55px;
  }

  .login-text {
    font-size: 32px;
  }

  .header-title {
    font-size: 26px;
  }

  .header-subtitle {
    font-size: 34px;
  }

  .section-title {
    font-size: 44px;
  }

  .process-card {
    padding: 32px 24px;
  }

  .process-icon {
    width: 72px;
    height: 72px;
  }

  .process-title {
    font-size: 16px;
  }

  .process-desc {
    font-size: 13px;
  }

  .service-title {
    font-size: 32px;
  }

  .service-card {
    padding: 50px 40px;
    height: 440px;
  }

  .service-icon {
    width: 90px;
    height: 90px;
  }

  .service-card-title {
    font-size: 20px;
    line-height: 26px;
  }

  .service-card-desc {
    font-size: 16px;
    line-height: 24px;
  }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.process-card,
.service-card {
  animation: fadeInUp 0.6s ease-out;
}

/* Print Styles */
@media print {
  .btn-primary {
    display: none;
  }

  .header,
  .footer {
    background: none !important;
  }
}

/* ===================================
   DATA SOURCE TABS
   =================================== */
.data-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  width: fit-content;
}

.data-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: 1px solid #e9ecef;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: #f8f9fa;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  margin-right: -1px;
  position: relative;
  z-index: 1;
}

.data-tab:hover {
  background: #fff;
  color: #333;
}

.data-tab.active {
  background: var(--white);
  color: var(--primary-blue);
  border-color: #e9ecef;
  z-index: 2;
}

.data-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--white);
}

.data-tab.active svg {
  stroke: var(--primary-blue);
}

.data-tab svg {
  flex-shrink: 0;
  stroke: #666;
  transition: stroke 0.3s ease;
}

/* Test tab specific styling */
.data-tab[data-source="test"].active {
  color: #f59e0b;
}

.data-tab[data-source="test"].active svg {
  stroke: #f59e0b;
}

/* Connect tabs to table card */
.data-tabs + .table-card {
  border-top-left-radius: 0;
}

/* Responsive tabs */
@media (max-width: 768px) {
  .data-tabs {
    width: 100%;
  }

  .data-tab {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13px;
  }
}

/* ===================================
   DETAIL PAGE STYLES
   =================================== */
.page-header {
  display: flex;
  align-items: center;
  margin-bottom: 50px;
  position: relative;
}

.page-header .section-title {
  flex: 1;
  margin-bottom: 0; /* Override default bottom margin */
}

.btn-back {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f8f9fa;
  color: #4b5563;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.btn-back:hover {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: var(--white);
  transform: translateY(-50%) translateX(-4px);
  box-shadow: 0 6px 12px rgba(33, 150, 243, 0.25);
}

.unit-info-header {
  padding: 18px 24px;
  background: linear-gradient(to right, #f8f9fa, #ffffff);
  border-bottom: 1px solid #e9ecef;
  display: flex;
  align-items: center;
}

.unit-info-title {
  margin: 0;
  color: var(--primary-blue-dark);
  font-size: 18px;
  font-weight: 700;
}

#detail-records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#detail-records-table th,
#detail-records-table td {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

#detail-records-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--dark-text);
  border-bottom: 2px solid #e9ecef;
  white-space: nowrap;
}

#detail-records-table tbody tr:hover {
  background: #f8f9fa;
}

#detail-records-table tbody tr:last-child td {
  border-bottom: none;
}

#detail-records-table .col-stt {
  width: 70px;
  text-align: center;
}

#detail-records-table .col-status {
  text-align: center;
}
