.hsgl-board {
  --hsgl-header-start: #1d4d86;
  --hsgl-header-end: #153b67;
  --hsgl-header-shadow: rgba(16, 43, 73, 0.16);
  border: 1px solid rgba(45, 114, 196, 0.62);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06), 0 0 0 1px rgba(45, 114, 196, 0.05) inset;
}

.hsgl-board.hsgl-theme-purple {
  --hsgl-header-start: #6c39b4;
  --hsgl-header-end: #4d258f;
  --hsgl-header-shadow: rgba(61, 25, 110, 0.22);
}

.hsgl-board.hsgl-theme-blue {
  --hsgl-header-start: #1d4d86;
  --hsgl-header-end: #153b67;
  --hsgl-header-shadow: rgba(16, 43, 73, 0.16);
}

.hsgl-board__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hsgl-board__title {
  margin: 0;
  font-size: 1.25rem;
  color: #143a67;
}

.hsgl-board__controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.hsgl-board__controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.hsgl-board__controls select {
  min-width: 132px;
  min-height: 40px;
  border: 1px solid rgba(34, 82, 140, 0.18);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}

.hsgl-check-wrap {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  min-height: 40px;
  padding-top: 20px;
}

.hsgl-board__status {
  padding: 10px 0;
  color: #444;
}

.hsgl-board__table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 13px;
}

.hsgl-board__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
  overflow: hidden;
  border-radius: 13px;
}

.hsgl-board__table th,
.hsgl-board__table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #dfe5ec;
}

.hsgl-board__table thead th {
  background: linear-gradient(180deg, var(--hsgl-header-start) 0%, var(--hsgl-header-end) 100%);
  color: #f4f9ff;
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: 0 8px 14px var(--hsgl-header-shadow);
}

.hsgl-board__table thead th:first-child {
  border-top-left-radius: 13px;
}

.hsgl-board__table thead th:last-child {
  border-top-right-radius: 13px;
}

.hsgl-board__table tbody tr {
  transition: background-color .18s ease, transform .18s ease;
}

.hsgl-board__table tbody tr:nth-child(odd) {
  background: #f4f4f4;
}

.hsgl-board__table tbody tr:nth-child(even) {
  background: #ffffff;
}

.hsgl-board__table tbody tr:hover {
  background: #eef5fc;
}

.hsgl-board__table tbody tr.hsgl-pos-1 {
  background: linear-gradient(90deg, rgba(255, 201, 46, 0.62) 0%, rgba(255, 233, 152, 0.60) 42%, rgba(255, 249, 219, 0.76) 72%, rgba(255, 255, 255, 0.98) 100%);
}

.hsgl-board__table tbody tr.hsgl-pos-2 {
  background: linear-gradient(90deg, rgba(230, 192, 84, 0.44) 0%, rgba(248, 225, 159, 0.44) 42%, rgba(255, 245, 220, 0.68) 72%, rgba(255, 255, 255, 0.98) 100%);
}

.hsgl-board__table tbody tr.hsgl-pos-3 {
  background: linear-gradient(90deg, rgba(214, 160, 108, 0.30) 0%, rgba(244, 213, 173, 0.38) 42%, rgba(253, 241, 225, 0.78) 72%, rgba(255, 255, 255, 0.99) 100%);
}

.hsgl-board__table tbody tr.hsgl-pos-1 td:first-child,
.hsgl-board__table tbody tr.hsgl-pos-2 td:first-child,
.hsgl-board__table tbody tr.hsgl-pos-3 td:first-child {
  font-weight: 700;
  color: #7c5600;
}

.hsgl-board__table td:first-child {
  font-weight: 600;
  width: 76px;
}

.hsgl-board__table td:nth-child(3) {
  color: #234b78;
}

@media (max-width: 700px) {
  .hsgl-board {
    padding: 12px;
    border-radius: 14px;
  }

  .hsgl-board__header {
    gap: 12px;
    margin-bottom: 10px;
  }

  .hsgl-board__title {
    font-size: 1.08rem;
  }

  .hsgl-board__controls {
    width: 100%;
    gap: 8px;
  }

  .hsgl-board__controls label {
    flex: 1 1 100%;
    font-size: 0.84rem;
  }

  .hsgl-board__controls select {
    min-height: 38px;
  }

  .hsgl-check-wrap {
    padding-top: 0;
  }

  .hsgl-board__status {
    font-size: 0.92rem;
    padding: 8px 0;
  }

  .hsgl-board__table {
    min-width: 0;
  }

  .hsgl-board__table thead {
    display: none;
  }

  .hsgl-board__table,
  .hsgl-board__table tbody,
  .hsgl-board__table tr,
  .hsgl-board__table td {
    display: block;
    width: 100%;
  }

  .hsgl-board__table tr {
    border: 1px solid rgba(29, 77, 134, 0.14);
    border-radius: 12px;
    margin-bottom: 9px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 12px rgba(11, 32, 54, 0.05);
  }

  .hsgl-board__table tbody tr:nth-child(odd),
  .hsgl-board__table tbody tr:nth-child(even) {
    background: #ffffff;
  }

  .hsgl-board__table tbody tr.hsgl-pos-1 {
    background: linear-gradient(180deg, rgba(255, 231, 157, 0.98) 0%, rgba(255, 247, 214, 1) 58%, rgba(255, 255, 255, 1) 100%);
  }

  .hsgl-board__table tbody tr.hsgl-pos-2 {
    background: linear-gradient(180deg, rgba(248, 236, 191, 0.96) 0%, rgba(255, 249, 230, 1) 58%, rgba(255, 255, 255, 1) 100%);
  }

  .hsgl-board__table tbody tr.hsgl-pos-3 {
    background: linear-gradient(180deg, rgba(248, 230, 209, 0.98) 0%, rgba(255, 247, 239, 1) 58%, rgba(255, 255, 255, 1) 100%);
  }

  .hsgl-board__table td {
    border-bottom: 1px solid #edf1f5;
    padding: 8px 10px;
    font-size: 0.93rem;
  }

  .hsgl-board__table td:last-child {
    border-bottom: none;
  }

  .hsgl-board__table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    color: #496483;
    margin-bottom: 2px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
  }
}


.hsgl-pos-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hsgl-pos-num {
  display: inline-block;
}

.hsgl-crown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95em;
  line-height: 1;
  transform: translateY(-1px);
  text-shadow: 0 1px 1px rgba(255,255,255,0.35), 0 1px 4px rgba(0,0,0,0.18);
}

.hsgl-crown-gold {
  color: rgba(214, 157, 22, 0.92);
}

.hsgl-crown-silver {
  color: rgba(138, 148, 162, 0.92);
}

.hsgl-crown-bronze {
  color: rgba(191, 135, 92, 0.92);
}

.hsgl-board__table tbody tr.hsgl-pos-1 td:first-child .hsgl-pos-num,
.hsgl-board__table tbody tr.hsgl-pos-2 td:first-child .hsgl-pos-num,
.hsgl-board__table tbody tr.hsgl-pos-3 td:first-child .hsgl-pos-num {
  color: inherit;
}

@media (max-width: 700px) {
  .hsgl-crown {
    font-size: 1.02em;
  }
}
