@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700;800&display=swap');

@font-face {
  font-family: 'Arial';
  src: url('/static/fonts/Arial.ttf') format('truetype');
}

@font-face {
  font-family: 'ArialBold';
  src: url('/static/fonts/arialBold.ttf') format('truetype');
  font-weight: bold;
}

.units-table-wrapper {
    width: 100%;
    overflow: auto;
    max-height: fit-content;
    position: relative;
  }
  
  .units-table {
    border-collapse: collapse;
    width: 100%;
  }
  
  .units-table thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    border-bottom: 2px solid #ccc;
  }
  
  .units-table .floor-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 3;
    border-right: 1px solid #ccc;
  }
  
  .units-table th,
  .units-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #ddd;
    white-space: nowrap;
  }
  
  .project-listing-page {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  .project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    padding-right: 8px;
  }
  
  .project-card {
    
    padding: 20px;
    background: #fff;
    min-height: 250px;
    display: flex;
    flex-direction: column;
  }
  
  .project-header {
    display: flex;
    align-items: start;
    justify-content: left;
    gap: 12px;
  }
  
  .project-logo {
    width: 50px;
    height: 50px;
  }
  
  .project-name {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    margin: 0;
  }
  
  .project-subzones {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 4px;
  }
  
  .zone-btn {
    background-color: var(--Primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .zone-btn:hover {
    background-color: #ea580c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  }
  
  /*project_detail*/
  .detail-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
  }
  
  .project-detail-wrapper {
      position: relative;
      background: #fff;
      border-radius: 14px;
      padding: 16px 16px 24px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, .06)
  }
  
  .back-btn {
      position: sticky;
      top: 8px;
      left: 8px;
      z-index: 50;
      background: #f3f4f6;
      border: 1px solid #e5e7eb;
      color: #111827;
      padding: 6px 10px;
      border-radius: 999px;
      font-weight: 600;
      cursor: pointer;
      max-width: 100px;
      max-height: 40px;
  }
  
  .back-btn:hover {
      background: #e5e7eb
  }
  
  .logo-img-start-sale {
      width: 85%;
  }
  
  .jackpot-banner {
      display: flex;
      margin-bottom: 16px;
      min-height: 400px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
      background: url('https://quanly.tongkhobds.com/uploads/2025/10/1761368646245.jpg') center center no-repeat;
      background-size: 100% 100%;
      background-position: center center;
      position: relative;
      overflow: hidden;
      width: 100%;
  }
  
  .jackpot-banner_start_sale {
      display: flex;
      margin-bottom: 16px;
      min-height: 400px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
      background: url('https://quanly.tongkhobds.com/uploads/2025/10/1761363170472.jpg') center center no-repeat;
      background-size: 100% 100%;
      background-position: center center;
      position: relative;
      overflow: hidden;
      width: 100%;
  }
  
  .jackpot-banner::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1;
  }
  
  /* Cột trái: Project info và Countdown */
  .jackpot-left-column {
      flex: 6.3;
      position: relative;
      display: flex;
      flex-direction: column;
      padding: 32px;
      padding-right: 0;
      z-index: 2;
  }
  
  .jackpot-left-column-start-sale {
      flex: 6.2;
      position: relative;
      display: flex;
      flex-direction: column;
      padding: 32px;
      padding-right: 0;
      z-index: 2;
  }
  
  /* Cột phải: Jackpot info */
  .jackpot-right-column {
      flex: 5.7;
      display: flex;
      flex-direction: column;
      z-index: 2;
  }
  
  /* Cột phải: Jackpot info */
  .jackpot-right-column-start-sale {
      flex: 5.8;
      display: flex;
      flex-direction: column;
      padding: 32px;
      padding-left: 0;
      padding-top: 21px;
      z-index: 2;
  }
  
  
  .jackpot-image-container {
      flex: 1;
      display: flex;
      align-items: flex-start;
      padding-top: 5%;
      width: 100%;
      align-items: center
  }
  
  .jackpot-image-container-start-sale {
      flex: 1;
      display: flex;
      align-items: flex-start;
      height: 100%;
      margin-left: 2rem;
  }
  
  .jackpot-image-container .jackpot-image {
      max-width: 95%;
      max-height: 89%;
      width: auto;
      height: auto;
      margin-top: 4%;
  }
  
  .jackpot-image-container-start-sale .jackpot-image {
      max-width: 92%;
      max-height: 60%;
      width: auto;
      height: auto;
  }
  
  .jackpot-image {
      max-width: 90%;
      max-height: 100%;
      width: auto;
      height: auto;
      object-fit: contain;
      border-radius: 8px;
  }
  
  /* Logo Row */
  .jackpot-logo-row {
      position: relative;
      z-index: 2;
      flex: 0.6;
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
  }
  
  .logo-container {
      margin-left: 1.5em;
      margin-top: 0.2em;
      display: flex;
      align-items: center;
      gap: 12px;
  }
  
  .logo-img {
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
  }
  
  .logo-text {
      color: #fff;
      font-size: 1.2rem;
      font-weight: 700;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  
  /* Project Row */
  .jackpot-project-row {
      position: relative;
      z-index: 2;
      flex: 1;
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      margin-left: 6px;
  }
  
  /* Project Row */
  .jackpot-project-row-start-sale {
      position: relative;
      z-index: 2;
      flex: 1;
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      margin-left: 6px;
  }
  
  .project-info-container {
      height: 100%;
      text-align: center;
      padding-top: 10px!important;
  }
  
  .project-info-container-start-sale {
      height: 100%;
      text-align: center;
      padding-top: 10px!important;
  }
  
  .project-name-container {
      height: 50%;
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      align-items: center
  }
  .project-name-container-start-sale {
      height: 50%;
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      align-items: center
  }
  
  .project-date-container{
      height: 50%;
      display: flex;
      align-items: flex-start;
      justify-content: flex-start;
      align-items: center
  }
  
  
  .project-name {
      color: #000000;
      font-size: 2.5rem;
      margin-bottom: 12px;
      line-height: 1.2;
  }
  
  .project-name-banner {
      color: #ffffff;
      font-size: 3.2rem;
      margin-bottom: -14px;
      line-height: 1.2;
      margin-bottom: -16px;
      font-family: "Be Vietnam Pro", sans-serif;
  }
  
  .project-name-banner-start-sale {
      color: #ffffff;
      font-size: 3.2rem;
      margin-bottom: -14px;
      line-height: 1.2;
      margin-bottom: -16px;
      font-family: "Be Vietnam Pro", sans-serif;
  }
  
  .project-date {
      color: #ffffff;
      font-size: 2.42rem;
      margin-bottom: -14px;
      line-height: 1.2;
      margin-bottom: -9px;
      font-family: "Be Vietnam Pro", sans-serif;
  }
  
  .project-date-start-sale {
      color: #ffffff;
      font-size: 2.42rem;
      margin-bottom: -14px;
      line-height: 1.2;
      margin-bottom: -9px;
      font-family: "Be Vietnam Pro", sans-serif;
  }
  
  /* Countdown Row */
  .jackpot-countdown-row {
      position: relative;
      z-index: 2;
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
  .countdown-container {
      display: flex;
      width: 100%;
      margin-top: 0;
      height: 9rem;
  }
  
  .countdown-container-start-sale {
      display: flex;
      width: 100%;
      margin-top: 0;
      height: 9rem;
  }
  
  .countdown-section {
      text-align: center;
  }
  
  .countdown-title {
      color: #fff;
      font-size: 1.1rem;
      font-weight: 600;
      margin-bottom: 12px;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }
  
  .treasure-chest {
      flex-shrink: 0;
  }
  
  .jackpot-banner-overlay {
      position: absolute;
      top: 82%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 10;
      pointer-events: none;
  }
  
  .treasure-chest-image {
      transform: scale(0.5);
  }
  
  .jackpot-banner-overlay-start-sale {
      position: absolute;
      top: 75%;
      left: 84%;
      transform: translate(-80%, -50%);
      z-index: 10;
      pointer-events: none;
  }
  
  .treasure-chest-image-start-sale {
      transform: scale(1.3);
  }
  
  /* Jackpot Info Section */
  .jackpot-info-section {
      position: relative;
      z-index: 2;
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
  .jackpot-content {
      text-align: center;
      position: relative;
  }
  
  .jackpot-title {
      color: #fff;
      font-size: 2.5rem;
      font-weight: 900;
      text-transform: uppercase;
      margin-bottom: 16px;
      text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
      letter-spacing: 0.1em;
  }
  
  .jackpot-amount {
      color: #fff;
      font-size: 2.8rem;
      font-weight: 900;
      text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
      letter-spacing: 0.05em;
  }
  
  .confetti-effects {
      position: absolute;
      top: -20px;
      left: -20px;
      right: -20px;
      bottom: -20px;
      background-image:
          radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
          radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.3) 1px, transparent 1px),
          radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
      background-size: 15px 15px, 20px 20px, 25px 25px;
      opacity: 0.6;
      pointer-events: none;
  }
  
  /* Leaderboard Section */
  .leaderboard-section {
      position: relative;
      z-index: 2;
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
  }
  
  .leaderboard-container {
      display: flex;
      flex-direction: column;
      gap: 12px;
  }
  
  .leader-item {
      background: rgba(255, 255, 255, 0.15);
      border-radius: 8px;
      padding: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      transition: all 0.3s ease;
  }
  
  .leader-item:hover {
      background: rgba(255, 255, 255, 0.25);
      transform: translateY(-2px);
  }
  
  .leader-rank {
      flex-shrink: 0;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.2);
  }
  
  .rank-medal {
      font-size: 1.2rem;
  }
  
  .rank-number {
      color: #fff;
      font-size: 1rem;
  }
  
  .leader-avatar {
      flex-shrink: 0;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      overflow: hidden;
      border: 2px solid rgba(255, 255, 255, 0.3);
  }
  
  .avatar-img {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      background: rgba(255, 255, 255, 0.2);
  }
  
  .leader-info {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 2px;
  }
  
  .leader-name {
      color: #fff;
      font-weight: 600;
      font-size: 0.9rem;
  }
  
  .leader-phone {
      color: rgba(255, 255, 255, 0.8);
      font-size: 0.8rem;
  }
  
  .leader-amount {
      color: #fff;
      font-weight: 700;
      font-size: 0.9rem;
  }
  
  /* Row 2: Bottom row với 2 cột */
  .jackpot-row.bottom-row {
      justify-content: space-between;
      align-items: center;
  }
  
  .jackpot-column {
      position: relative;
      z-index: 2;
      display: flex;
      
  }
  
  /* Cột 1: Project info */
  .jackpot-column.project-info {
      flex: 1;
      justify-content: flex-start;
  }
  
  .jackpot-column.project-info .project-line {
      margin-bottom: 6px; /* Tăng khoảng cách giữa tên dự án và phân khu */
  }
  
  .jackpot-column.project-info .project-title {
      color: #fff;
      font-size: 1.5rem; /* Tăng kích thước */
      font-weight: 700; /* Tăng độ đậm */
      line-height: 1.3;
  }
  
  .jackpot-column.project-info .zone-line {
      margin-bottom: 0;
  }
  
  .jackpot-column.project-info .zone-line .project-title {
      font-size: 1.3rem; /* Tăng kích thước */
      font-weight: 600; /* Tăng độ đậm */
      opacity: 0.9;
  }
  
  /* Cột 2: Countdown */
  .jackpot-column.countdown-section {
      flex: 1;
      justify-content: flex-start;
      align-items: center;
  }
  
  .jackpot-column.countdown-section .sale-countdown {
      text-align: left; /* Căn trái cho thông báo */
      color: #fff;
      font-size: 1.2rem; /* Tăng kích thước */
      font-weight: 600; /* Tăng độ đậm */
      opacity: 0.9;
  }
  
  .jackpot-column.countdown-section #countdown {
      font-size: 3rem; /* Tăng kích thước */
      font-weight: 900; /* Tăng độ đậm */
      margin-top: 10px; /* Tăng khoảng cách */
      color: #fff;
      line-height: 1;
      letter-spacing: 0.02em;
  }
  
  /* Responsive design cho mobile */
  @media (max-width: 768px) {
      .jackpot-banner {
          flex-direction: column;
          min-height: auto;
      }
  
      .jackpot-left-column-start-sale {
          flex: none;
          padding: 24px;
      }
  
      .jackpot-right-column {
          flex: 1;
          flex: none;
          padding-top: 1%;
      }
  
      .project-name {
          font-size: 1.8rem;
          color: #000000;
      }
  
      .project-date {
          font-size: 1rem;
      }
  
      .countdown-container {
          display: flex;
          margin: 0!important;
          flex-direction: column;
          gap: 16px;
          justify-content: flex-start;
      }
      
      .jackpot-title {
          font-size: 2rem;
      }
      
      .jackpot-amount {
          font-size: 2.2rem;
      }
      
      .leaderboard-container {
          gap: 8px;
      }
      
      .leader-item {
          padding: 8px;
          gap: 8px;
      }
      
      .leader-avatar {
          width: 32px;
          height: 32px;
      }
      
      .leader-name {
          font-size: 0.8rem;
      }
  
      .leader-phone {
          font-size: 0.7rem;
      }
  
      .leader-amount {
          font-size: 0.8rem;
      }
  }
  
  .badge-booking {
      background-color: var(--Primary);
      color: #fff;
      border: none;
      border-radius: 8px;
      padding: 8px 20px;
      font-weight: 600;
      cursor: pointer;
      width: 80px;
      transition: all 0.2s ease;
  }
  
  .badge-booking:hover {
      background-color: #ea580c;
      color: #fff;
      transform: translateY(-2px);
      box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  }
  
  .unit-grid {
      overflow: auto;
      border-radius: 10px;
      border: 1px solid #eee;
      background: #fff
  }
  
  .units-table {
      width: max(100%, 900px);
      border-collapse: separate;
      border-spacing: 2px
  }
  
  .units-table th,
  .units-table td {
      text-align: center;
      padding: 8px 6px;
      font-size: .85rem;
      border-radius: 6px
  }
  
  .units-table thead th {
      background: #f3f4f6;
      color: #111827;
      font-weight: 700
  }
  
  .floor-col {
      position: sticky;
      left: 0;
      background: #065298 !important;
      color: #fff;
      font-weight: 600;
      min-width: 80px;
  }
  
  .unit-cell {
      background: #f9fafb;
      color: #111827;
      min-width: 60px
  }
  
  .unit-cell .unit-code-table {
      font-weight: 600
  }
  
  .unit-cell.HOLD {
    background-color: #e8f625;
    position: relative;
    text-align: center;
  }
  
  .unit-cell.ACTIVE {
    background: #05ae2f;
    color: #111827;
  }
  
  .unit-cell.SOLD {
    background: #FF3B30;
    color: #fff;
  }
  
  .legend {
      display: flex;
      align-items: center;
      gap: 24px;
      padding: 10px 4px;
      color: #374151;
      width: auto;
      flex: 1 1 auto;
      flex-wrap: wrap;
  }
  
  .legend .dot {
      display: inline-block;
      width: 12px;
      height: 12px;
      border-radius: 999px;
      margin-right: 6px
  }
  
  .legend .available {
      background: #34C759;
  }
  
  .legend .pending {
      background: #e8f625;
  }
  
  .legend .sold {
      background: #FF3B30;
  }
  
  /* Team sale */
  .team-sale-card {
      margin-top: 16px;
      background: #fff;
      border: 1px solid #eee;
      border-radius: 12px;
      padding: 12px
  }
  
  .team-sale-card h3 {
      font-size: 18px;
      margin: 0 0 10px 0
  }
  
  .team-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0
  }
  
  .team-table th,
  .team-table td {
      padding: 10px;
      border-bottom: 1px solid #f0f0f0;
      text-align: left
  }
  
  .team-table th {
      background: #f9fafb;
      font-weight: 600
  }

  .table.team-table tbody tr:last-child td {
      border-bottom: none !important;
  }

  span.transaction-action {
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
  }

  span.transaction-action.HOLD {
      background: #e8f625;
      color: #f97316;
  }

  span.transaction-action.QUEUE {
      background: #065298;
      color: #FFFFFF;
  }

  span.transaction-action.CANCEL {
    background: #A8A29E;
    color: #000000;
  }

  span.transaction-action.EXPIRED {
      background: #EF4444;
      color: #FFFFFF;
  }

  span.transaction-action.SOLD {
      background: #FF3B30;
      color: #FFFFFF;
  }

  span.transaction-action.FAILED {
      background: #BFBFBF;
      color: #000000;
  }

  .transaction-action-timer {
    color: #EF4444;
    margin-left: 8px;
  }

  html.no-scroll,
  body.no-scroll {
      overflow: hidden;
  }
  
  .project-detail-wrapper.is-zoomed {
      position: fixed;
      inset: 0;
      z-index: 99;
      width: 100vw;
      height: 100vh;
      background: #fff;
      margin: 0 !important;
      border-radius: 0;
      padding: 12px;
      display: flex;
      flex-direction: column;
  }
  
  .project-detail-wrapper.is-zoomed .team-sale-card {
      display: none !important;
  }
  
  .project-detail-wrapper.is-zoomed .zoom-btn,
  .project-detail-wrapper.is-zoomed .back-btn,
  .project-detail-wrapper.is-zoomed .jackpot-banner,
  .project-detail-wrapper.is-zoomed .detail-header,
  .project-detail-wrapper.is-zoomed .unit-grid {
      flex: 1;
      overflow: auto;
      border-width: 2px;
  }
  
  .project-detail-wrapper.is-zoomed .legend-bar {
      flex: 0 0 auto;
      background: #fff;
  }
  
  .legend-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-top: 10px;
  }
  
  .project-detail-wrapper.is-zoomed .zoom-btn {
      color: #fff;
  }
  
  .zoom-btn {
      background: #f3f4f6;
      border: 1px solid #e5e7eb;
      color: #111827;
      padding: 6px 10px;
      border-radius: 8px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all .2s ease;
      margin-left: auto;
      max-height: 40px;
      max-width: 40px;
  }
  
  .zoom-btn:hover {
      background: #e5e7eb;
  }
  
  .zoom-btn .icon {
      display: block;
  }
  
  /* Filter */
  .grid-filters {
      align-items: flex-end;
      gap: 10px;
      margin: 8px 0 12px;
  }
  
  .filter-item {
      display: flex;
      flex-direction: column;
      gap: 6px;
      height: 40px;
  }
  
  .filter-label {
      font-weight: 600;
  }
  
  .filter-select {
      min-width: 150px;
      padding: 8px 10px;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      background: #fff;
  }
  
  .unit-cell {
    position: relative;
    overflow: hidden;
    text-align: center;
    vertical-align: middle;
    transition: color 0.3s ease;
    background-color: var(--current-color, #fff);
    color: var(--text-color, #111827);
  }

  .unit-cell:hover {
    cursor: pointer;
  }
  
  .unit-cell.color-transition::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--next-color, #fff);
    z-index: 0;
    animation: wipe-in 0.8s ease forwards;
  }
  
  @keyframes wipe-in {
    from { width: 0%; }
    to { width: 100%; }
  }
  
  .unit-cell .countdown-timer {
    display: none;
    font-size: 10px;
    color: #f97316;
    font-weight: 600;
    margin-top: 2px;
    display: block;
  }
  
  .unit-cell.own-hold {
    border: 1px solid #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
    transition: all 0.3s ease-in-out;
  }
  
  @keyframes pulseBorder {
    0% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); transform: scale(1); }
    50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.9); transform: scale(1.05); }
    100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.7); transform: scale(1); }
  }
  
  .unit-cell.pulse {
    animation: pulseBorder 1.2s ease-out;
  }
  
  .unit-cell.HOLD {
    background-color: #e8f625;
  }
  
  .unit-cell.HOLD .unit-code-table {
    display: block;
    color: #d97706;
    font-weight: 600;
  }
  
  .unit-cell.SOLD {
    background-color: #FF3B30;
    color: white;
  }
  
  /*detail_real_estate*/
  .modal-loading {
      position:absolute; inset:0;
      display:flex; align-items:center; justify-content:center;
      gap:10px; font-weight:600; color:#374151;
      background: rgba(255,255,255,.65);
      backdrop-filter: blur(1px);
      z-index: 10;
  }
  .modal__body.is-dim {
      filter: grayscale(.2) opacity(.7);
  }
  .spinner {
      width:18px; height:18px;
      border:2px solid #e5e7eb; border-top-color:#111827;
      border-radius:50%; animation:spin .8s linear infinite;
  }

  .modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
  }
  .modal.active {
    display: block;
    z-index: 3000;
  }
  
  .modal[aria-hidden="false"] {
      display: block;
  }
  
  .modal__overlay {
      position: inherit;
      inset: 0;
      background: rgba(0, 0, 0, .5);
  }
  
  .modal__content {
      position: relative;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      max-width: 980px;
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
      overflow: hidden;
  }
  
  .modal__content_auth {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      max-width: 600px;
      width: 90%;
      max-height: 90vh;
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
      overflow: hidden;
      z-index: 10001;
  }
  
  .modal__content_register {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      max-width: 40%;
      width: 90%;
      max-height: 90vh;
      background: #fff;
      border-radius: 12px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
      overflow: hidden;
      z-index: 10001;
  }
  
  /* Header */
  .modal__header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      background: #f8fafc;
      border-bottom: 1px solid #eef2f7;
  }
  
   .modal__header_deposit {
       display: flex;
       align-items: center;
       justify-content: space-between;
       padding: 24px 30px 20px;
   }
  
   .modal__header_deposit h2 {
       font-size: 24px;
       font-weight: 700;
       color: #1f2937;
       margin: 0;
   }
  
   .modal__header_deposit .text-1 {
       font-size: 14px;
       color: #6b7280;
   }
  
   /* Deposit Modal Body */
   .modal__body_deposit {
       display: grid;
       grid-template-columns: 1fr 1fr;
       gap: 40px;
       padding: 30px;
   }
  
   .deposit-left-column,
   .deposit-right-column {
       display: flex;
       flex-direction: column;
       gap: 24px;
   }
  
   /* Section Header với thanh cam */
   .section-header {
       display: flex;
       align-items: center;
       gap: 12px;
   }
  
   .orange-bar {
       width: 4px;
       height: 20px;
       background: #f1913d;
       border-radius: 2px;
   }
  
   .section-title {
       font-size: 16px;
       font-weight: 600;
       color: #1f2937;
       margin: 0;
   }
  
   /* Input Group Custom */
   .input-group-custom {
       position: relative;
       display: flex;
       align-items: center;
       background: #f9fafb;
       border: 1px solid #d1d5db;
       border-radius: 8px;
       overflow: hidden;
   }
  
   .input-group-custom .form-control {
       flex: 1;
       border: none;
       background: transparent;
       padding: 12px 16px;
       font-size: 14px;
   }
  
   .input-group-custom .form-control:focus {
       outline: none;
       box-shadow: none;
   }
  
   .btn-dropdown {
       padding: 12px;
       color: #6b7280;
       cursor: pointer;
       border-left: 1px solid #d1d5db;
   }
  
   .btn-add-custom {
       padding: 12px;
       background: #fff;
       border: none;
       color: #f1913d;
       cursor: pointer;
       border-left: 1px solid #d1d5db;
       display: flex;
       align-items: center;
       justify-content: center;
   }
  
   .btn-add-custom:hover {
       background: #f9fafb;
   }
  
   /* Form Control Styling */
   .deposit-section .form-control {
       width: 100%;
       padding: 12px 16px;
       border-radius: 8px;
       font-size: 14px;
       background: #f9fafb;
       transition: border-color 0.2s ease;
   }
  
   .deposit-section .form-control:focus {
       outline: none;
       border-color: #f1913d;
       box-shadow: 0 0 0 3px rgba(241, 145, 61, 0.1);
   }
  
   .deposit-section .form-control[readonly] {
       background: #f9fafb;
       color: #374151;
       font-weight: 600;
   }
  
  /* Checkbox Custom */
  .checkbox-text-custom {
      font-size: 14px;
      color: #374151;
      font-weight: 400;
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
  }
  
  /* Prevent text selection on checkbox labels */
  .checkbox-item label {
      user-select: none;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      cursor: pointer;
  }
  
   /* Radio Group Custom */
   .radio-group-custom {
       display: flex;
       flex-direction: column;
       gap: 12px;
   }
  
   .radio-text-custom {
       font-size: 14px;
       color: #374151;
       font-weight: 500;
   }
  
   .radio-description-custom {
       font-size: 12px;
       color: #6b7280;
       line-height: 1.5;
       margin: 0;
       padding-left: 30px;
   }
  
   /* Responsive */
   @media (max-width: 768px) {
       .modal__body_deposit {
           grid-template-columns: 1fr;
           gap: 24px;
           padding: 20px;
       }
  
       .modal__header_deposit {
           padding: 20px;
       }
   }
  
   /* Payment Modal CSS */
   .modal__header_payment {
       display: flex;
       align-items: center;
       justify-content: space-between;
       padding: 24px 30px 20px;
   }
  
   .modal__header_payment h2 {
       font-size: 24px;
       font-weight: 700;
       color: #1f2937;
       margin: 0;
   }
  
   .modal__header_payment .text-1 {
       font-size: 14px;
       color: #6b7280;
   }
  
   /* Payment Modal Body */
   .modal__body_payment {
       display: grid;
       grid-template-columns: 1fr 1fr;
       gap: 40px;
       padding: 30px;
   }
  
   .payment-left-column,
   .payment-right-column {
       display: flex;
       flex-direction: column;
       gap: 24px;
   }
  
   /* QR Code Section */
   .qr-section {
       display: flex;
       flex-direction: column;
       align-items: center;
       gap: 20px;
   }
  
   .qr-code-container {
       display: flex;
       justify-content: center;
       align-items: center;
       padding: 20px;
       background: #fff;
       border: 1px solid #e5e7eb;
       border-radius: 12px;
       box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
   }
  
   .qr-code {
       width: 200px;
       height: 200px;
       display: flex;
       align-items: center;
       justify-content: center;
   }
  
   .qr-image {
       width: 100%;
       height: 100%;
       object-fit: contain;
       border-radius: 8px;
   }
  
   /* Amount Info */
   .amount-info {
       text-align: center;
       font-size: 16px;
       color: #374151;
   }
  
   .amount-label {
       font-weight: 400;
   }
  
   .amount-value {
       font-weight: 700;
       color: #1f2937;
   }
  
   /* Save QR */
   .save-qr {
       display: flex;
       align-items: center;
       gap: 8px;
       color: #374151;
       cursor: pointer;
       font-size: 14px;
       transition: color 0.2s ease;
   }
  
   .save-qr:hover {
       color: #f1913d;
   }
  
   /* Payment Note */
   .payment-note {
       text-align: center;
       font-size: 12px;
       line-height: 1.5;
       padding: 0 20px;
   }
  
   /* Bank Info */
   .bank-info {
       margin-bottom: 20px;
   }
  
   .bank-label {
       font-size: 14px;
       font-weight: 600;
       color: #374151;
       margin-bottom: 8px;
   }
  
   .bank-value {
       display: flex;
       align-items: center;
       gap: 12px;
       padding: 12px 16px;
       background: #f9fafb;
       border: 1px solid #d1d5db;
       border-radius: 8px;
   }
  
   .bank-logo {
       width: 40px;
       height: 24px;
       display: flex;
       align-items: center;
       justify-content: center;
       overflow: hidden;
       border-radius: 4px;
   }
  
   .bank-logo-image {
       width: 100%;
       height: 100%;
       object-fit: contain;
   }
  
   /* Account Fields */
   .account-field {
       margin-bottom: 16px;
   }
  
   .field-label {
       display: block;
       font-size: 14px;
       font-weight: 600;
       color: #374151;
   }
  
   .form-control.readonly {
       width: 100%;
       padding: 12px 16px;
       border: 1px solid #d1d5db;
       border-radius: 8px;
       font-size: 14px;
       background: #f9fafb;
       color: #374151;
       cursor: not-allowed;
   }
  
   /* Close Button */
   .btn-close-payment {
       padding: 12px 24px;
       background: #6b7280;
       color: #fff;
       border: none;
       border-radius: 8px;
       font-size: 14px;
       font-weight: 600;
       cursor: pointer;
       transition: all 0.2s ease;
       min-width: 120px;
   }
  
   .btn-close-payment:hover {
       background: #4b5563;
   }
  
   /* Payment Modal Responsive */
   @media (max-width: 768px) {
       .modal__body_payment {
           grid-template-columns: 1fr;
           gap: 24px;
           padding: 20px;
       }
  
       .modal__header_payment {
           padding: 20px;
       }
  
       .qr-code {
           width: 150px;
           height: 150px;
       }
  
       .qr-code-container {
           padding: 15px;
       }
   }
  
  .proj-chip {
      background: #f1913d;
      color: #fff;
      font-weight: 700;
      padding: 6px 12px;
      border-radius: 8px;
      text-align: center;
  }
  
  .modal__close {
      border: 0;
      background: transparent;
      font-size: 18px;
      cursor: pointer;
      padding: 6px;
  }
  
  /* Body layout */
  .modal__body {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 16px;
      padding: 16px;
  }
  
  @media (max-width: 900px) {
      .modal__body {
          grid-template-columns: 1fr;
      }
  }
  
  /* Left */
  .unit-price-card {
      background: #f3f4f6;
      border-radius: 10px;
      padding: 14px;
      margin-bottom: 12px;
      text-align: center;
  }
  
  .unit-code {
      font-size: 18px;
      margin-bottom: 8px;
      font-weight: 700;
      color: #333;
  }
  
  .price-line {
      /* display: flex; */
      /* align-items: center; */
      text-align: center;
      gap: 8px;
      margin-bottom: 6px;
  }
  
  .price-icon {
      font-size: 20px;
  }
  
  .price-value {
      font-size: 24px;
      font-weight: 800;
      color: #f1913d;
  }
  
  .price-note {
      color: #6b7280;
      font-size: 13px;
  }
  
  .price-link {
      font-size: 13px;
      color: #2563eb;
      text-decoration: underline;
  }
  
  .spec-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      background: #fbf8f8;
      border: 1px solid #eef2f7;
      border-radius: 10px;
      padding: 12px;
  }
  
  .spec {
      display: flex;
      flex-direction: column;
      gap: 4px;
  }
  
  .spec span {
      color: #6b7280;
      font-size: 13px;
  }
  
  .spec b,
  .spec a {
      font-weight: 700;
  }
  
  .spec a {
      color: #2563eb;
      text-decoration: none;
  }
  
  .badge {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 12px;
  }
  
  .badge--green {
      background: #16a34a;
      color: #fff;
  }
  
  .badge--blue {
      background: #3b82f6;
      color: #fff;
  }
  
  .amenities {
      margin-top: 14px;
  }
  
  .amenities h6 {
      margin: 0 0 8px 18px;
  }
  
  .amenities ul {
      margin: 0;
      padding-left: 18px;
      list-style: none;
  }

  .amenities li {
      position: relative;
      padding-left: 18px;
      margin: 6px 0;
      color: #2563eb;
  }

  .amenities li:hover {
      cursor: pointer;
  }
  
  .amenities li::before {
      content: '';
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 6px;
      height: 6px;
      background: #000000;
      border-radius: 999px;
  }
  
  /* Right */
  .brand-card {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      background: #f3f4f6;
      border-radius: 10px;
      padding: 12px;
      margin-bottom: 12px;
  }
  
  .brand-card img {
      height: 56px;
      object-fit: contain;
  }
  
  .lock-btn, .lock-queue-btn, .lock-booking-btn {
      width: 100%;
      background: #1a73e8;
      color: #fff;
      border: 0;
      border-radius: 10px;
      padding: 12px;
      font-weight: 600;
      cursor: pointer;
      font-size: 14px;
      margin-bottom: 12px;
  }

  .btn-load {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    vertical-align: middle;
    color: #FFFFFF;
  }
  
  .lock-btn.btn:hover, .lock-queue-btn.btn:hover, .lock-booking-btn.btn:hover {
      color: #fff;
      background: #f1913d;
  }
  
  .queue-card {
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      background: #fff;
  }
  
  .queue-title {
      text-align: center;
      font-weight: 600;
      padding: 10px 12px;
      border-bottom: 1px solid #e5e7eb;
  }
  
  .queue-list {
      list-style: none;
      padding: 8px 12px;
      margin: 0;
      display: flex;
      flex-direction: column;
      gap: 8px;
  }
  
  .queue-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 10px;
      background: #fff;
  }
  
  .queue-order {
      background: #f1913d;
      color: #fff;
      font-weight: 800;
      width: 24px;
      height: 24px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
  }
  
  .queue-name {
      flex: 1;
      font-weight: 600;
  }
  
  .queue-state {
      font-weight: 700;
      font-size: 12px;
  }
  
  .queue-info {
      color: #1d4ed8;
  }
  
  .queue-muted {
      color: #e3ee44;
  }
  
  .queue-danger {
      color: #ef4444;
  }
  
  .queue-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .btn-action {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .pay-now-btn {
    background-color: #1a73e8;
  }
  
  .pay-now-btn:hover {
    background-color: #1669c1;
  }
  
  .cancel-queue-btn {
    background-color: #a8a3a3;
  }
  
  .cancel-queue-btn:hover {
    background-color: #8f8b8b;
  }
  
  .pay-now-btn.disabled {
    cursor: pointer;
    background-color: #a8a3a3;
  }
  
  .spinner-border {
      display: inline-block;
      width: var(--bs-spinner-width);
      height: var(--bs-spinner-height);
      vertical-align: var(--bs-spinner-vertical-align);
      border-radius: 50%;
      color: var(--Primary);
      animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)
  }
  
  @keyframes spinner-border {
      to {
          transform: rotate(360deg)
      }
  }
  
  .spinner-border {
      --bs-spinner-width: 2rem;
      --bs-spinner-height: 2rem;
      --bs-spinner-vertical-align: -0.125em;
      --bs-spinner-border-width: 0.25em;
      --bs-spinner-animation-speed: 0.75s;
      --bs-spinner-animation-name: spinner-border;
      border: var(--bs-spinner-border-width) solid currentcolor;
      border-right-color: transparent
  }
  
  .queue-item.highlight-border {
      border: 1px solid #F38533;
      border-radius: 8px;
      padding: 8px;
  }

    /* Leaderboard Styles */
    .leaderboard-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-left: 18%;
        height: 66%;
        overflow: visible; /* allow header to overflow */
        background-image: url('https://quanly.tongkhobds.com/uploads/2025/10/1761621289542.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 16px;
        min-width: 75%;
        padding-top: 7%;
        position: relative;

    }

/* Scrolling list content inside leaderboard */
.leaderboard-list {
    overflow-y: auto;
    height: 100%;
}

/* Fixed header above leaderboard */
.leaderboard-header-fixed {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.leaderboard-header-img {
    max-width: 78%;
    height: auto;
    pointer-events: none;
    transform: translate(7%, -65%);
}

.leaderboard-header-amount {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-52%, -55%);
    font-weight: 700;
    font-size: clamp(16px, 2.6vw, 36px);
    color: #FFE37A;
    text-shadow: 0 3px 8px rgba(0,0,0,0.35);
    font-family: "Exo 2", sans-serif;
    font-style: italic;
    pointer-events: none;
    white-space: nowrap;
}

.leaderboard-item {
    display: flex;
    padding: 0px 16px;
    align-items: center;
    margin-bottom: 1%;
}

.leaderboard-info {
    padding: 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 6px;
    min-width: 0;
    border-radius: 6px;
    background-image: url('https://quanly.tongkhobds.com/uploads/2025/10/1761622010867.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    backdrop-filter: blur(4px);

}

.leaderboard-rank {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    }

  .rank-icon {
      width: 22px;
      object-fit: contain;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  }

  .medal {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .medal.gold {
      background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  }

  .medal.silver {
      background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
  }

  .medal.bronze {
      background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
  }

  .medal-ribbon {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  .rank-number {
    height: 31.33px;
      width: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 15px;
  }

  .leaderboard-name {
      font-size: 12px;
      color: #fff;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
      line-height: 1.3;
  }

  .leaderboard-phone {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.9);
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
      line-height: 1.3;
  }

    .leaderboard-amount {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        line-height: 1.3;
      font-family: "Inter", sans-serif;
      font-weight: bold;
    }
  
    .jackpot-banner-overlay {
        position: absolute;
        top: 79%;
        left: 60%;
        transform: translate(-50%, -50%);
        z-index: 10;
        pointer-events: none;
    }

    .treasure-chest-image {
        transform: scale(0.4);
    }

  .holder-cell {
    vertical-align: middle;
    text-align: center;
    font-weight: 500;
  }

  .queue-list {
    max-height: 250px;
    overflow-y: auto;
    margin-top: 1rem;
  }

  .row-normal {
    background-color: #ffffff;
  }

  .row-alt {
      background-color: #f7f7f7;
  }

  .modal-congratulation {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .modal-congratulation.h3 {
    font-size: 32px;
  }