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

:root {
  /* ===== Text Colors ===== */
  --text-blue: #02243e;
  --text-gray: #707070;
  --text-primary: #0971ce;

  --header-bg: #02243e;
  --header-border: #ffffff;
  --header-text: #ffffff;

  /* ===== Board Colors ===== */
  --board-blue-dark: #02243e;
  --board-blue: #0971ce;
  --board-cyan: #88fcff;
  --board-gray-light: #ededed;
  --board-gray-dark: #bcbcbc;
  --board-gray: #cecece;
  --board-green: #caffcf;

  /* ===== Legacy Mapping ===== */
  --primary-dark: var(--text-blue);
  --primary-cyan: var(--board-cyan);
  --primary-green: var(--board-green);

  --gray-light: var(--board-gray-light);
  --gray-medium: var(--board-gray);
  --text-dark: var(--text-blue);
  --text-light: var(--text-gray);

  /* ===== Extra Gray Utilities ===== */
  --gray-200: #dfdfdf;
  --gray-300: #d3d3d3;
  --gray-400: #b6b6b6;
  --gray-500: #b3e5fc; /* border highlight */
}

html,
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--text-dark);
  background: white;
}

.header {
  background: var(--header-bg);
  color: var(--header-text);
}

.header-container {
  /* max-width: 1200px; */
  margin: 0 auto;
  padding: 0.75rem 2rem;

  display: flex;
  justify-content: space-between;
  align-items: center;

  @media (max-width: 768px) {
    padding: 0.75rem 0.5rem;
  }
}

.header-logo img {
  height: 32px;
}

.header-nav {
  display: flex;
  gap: 1rem;

  @media (max-width: 768px) {
    gap: 0.75rem;
  }
}

.header-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--header-border);
  border-radius: 16px;
  background: transparent;
  color: var(--header-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;

  @media (max-width: 768px) {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    border-radius: 12px;
  }
}

.header-btn:hover {
  background: var(--header-text);
  color: var(--header-bg);
}

/* Footer */
.footer {
  background: white;
  color: var(--text-gray);
  padding: 0;
}

.footer-container {
  width: 100%;
  background-color: var(--board-blue-dark);
  margin: 0 auto;
  padding: 0;
}

.footer-topper {
  height: 32px;
  background-color: var(--board-blue);
}

.footer-grid {
  display: grid;
  background-color: var(--board-blue-dark);
  color: white;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.footer-subtitle {
  font-weight: bold;
  margin: 1rem 0 0.5rem;
}

.footer-text {
  font-size: 0.875rem;
  color: #d0d0d0;
  line-height: 1.6;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 0.5rem;
}

.footer-list a {
  font-size: 0.875rem;
  color: #d0d0d0;
  text-decoration: none;
  transition: 0.2s;
}

.footer-list a:hover {
  color: var(--primary-cyan);
}

.highlight {
  color: var(--primary-cyan);
  font-weight: bold;
}

.footer-copy {
  background-color: white;
  padding: 1.5rem 1rem;
  font-size: 0.875rem;
  line-height: 0.9rem;
  color: var(--text-gray);
}

.footer-copy p + p {
  margin-top: 0.75rem;
}

/* Tab container */
.tab-container {
  padding-left: 0;
  padding-right: 0;
  border: 1px solid var(--gray-medium);
  border-radius: 12px;
  box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.05), -8px 8px 8px rgba(0, 0, 0, 0.05);
}

/* Tabs */
.tabs {
  display: flex;
  background: white;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-btn {
  flex: 1;
  padding: 4px 8px;
  border: none;
  background: var(--gray-300);
  color: var(--text-light);
  cursor: pointer;
  font-size: 20px;
  font-weight: 500;
  transition: all 0.3s;
}

.tab-btn:hover {
  background: var(--board-gray-dark);
  color: var(--text-light);
}

.tab-btn.active {
  background: var(--board-cyan);
  color: var(--text-dark);
}

/* Tab Content */
.tab-content {
  padding: 1rem 2rem 0 2rem;
  min-height: 50vh;
}

.product-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Tables */
table {
  border-collapse: collapse;
  color: var(--text-blue);
}

thead {
  background-color: var(--primary-cyan);
}

thead th {
  padding: 0.6rem;
  text-align: left;
  font-weight: 400;
  font-size: 16px;
  color: var(--text-blue);
}

tbody td {
  padding: 0.6rem;
  font-size: 16px;
  font-weight: 600;
  border-top: 1px solid var(--gray-500);
}

tbody tr {
  color: var(--text-blue);
  background-color: var(--gray-200);
}

tbody tr:hover {
  background-color: var(--gray-400);
}

table tbody tr:nth-child(odd) {
  background-color: var(--board-gray-light);
}

table tbody tr:nth-child(even) {
  background-color: var(--board-green);
}

/* Input + Select */
select,
input[type="number"] {
  border: 1px solid var(--board-gray);
  border-radius: 12px;
  padding: 0.4rem 0.5rem;
  font-size: 16px;
  font-weight: 600;
}

select:focus,
input[type="number"]:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--board-cyan);
}

/* Remove arrows from number input */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

select {
  cursor: pointer;
  background-color: white;
  padding: 0.4rem 0.5rem;
}

input[type="number"] {
  max-width: 100%;
  text-align: center;
  color: var(--text-primary);
  -moz-appearance: textfield;

  @media (max-width: 768px) {
    max-width: 100px;
  }
}

.select-wrapper {
  position: relative;
  /* min-width: 160px; */
  max-width: 200px;
}

.select-wrapper__mobile {
  position: relative;
  margin: auto;
  margin-bottom: 24px;
  max-width: 100%;
  width: 100%;
}

/* Select base styling */
.custom-select {
  width: 100%;
  padding: 4px 32px 4px 8px;
  font-size: 16px;
  color: var(--text-blue);
  font-weight: 400;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  appearance: none; /* Ẩn UI default */
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* Fake arrow */
.select-wrapper__mobile::after,
.select-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--board-blue);
  transform: translateY(-50%);
  pointer-events: none;
}

/* Dropdown list styling (Chrome/Edge/WebKit) */
.custom-select option {
  padding: 8px;
  font-size: 16px;
}

/* first and last item */
.custom-select option:first-child {
  border-radius: 12px 12px 0 0 !important;
}
.custom-select option:last-child {
  border-radius: 0 0 12px 12px;
}

/* Improve dropdown look */
.custom-select:focus {
  border-color: #5dd3d3;
  outline: none;
  box-shadow: 0 0 0 2px rgba(93, 211, 211, 0.3);
}
