/* Extracted from index.html; selector order preserved. */
/* =========================================================
   CSS MODULE INDEX - Version 2026.07.03
   Mục tiêu tổng vệ sinh:
   - Gom toàn bộ giao diện vào một khu vực CSS duy nhất.
   - Chia module theo CORE, RESPONSIVE, GDD2, GDD3 và FIX.
   - Mỗi module có tên, mã version và mô tả để dễ tìm khi file lớn.
   - Chỉ dọn cấu trúc/comment/khoảng trắng, không đổi logic hiển thị.
   ========================================================= */
/* =========================================================
   CORE CSS 01 - RESET & GLOBAL
   Mục tiêu: thiết lập font, box-sizing, màu nền và style nền tảng cho toàn bộ app.
========================================================= */
    * {
      box-sizing: border-box;
      font-family: "Times New Roman", Times, serif !important
    }
    body {
      margin: 0;
      background: #f3f6fb;
      color: #222
    }
/* =========================================================
   CORE CSS 02 - HEADER
   Mục tiêu: style phần đầu trang, logo, tên hội và mô tả ngắn.
========================================================= */
    .app-header {
      background: linear-gradient(135deg, #0b3d2e, #06291f);
      padding: 16px;
      position: sticky;
      top: 0;
      z-index: 50;
      box-shadow: 0 8px 24px rgba(0, 0, 0, .18)
    }
    .brand {
      display: flex;
      align-items: center;
      gap: 14px;
      background: rgba(255, 255, 255, .10);
      border-radius: 20px;
      padding: 14px 18px;
      max-width: 900px
    }
    .logo {
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: #ffd400;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      flex: 0 0 54px
    }
    .brand-title {
      font-size: 22px;
      font-weight: 900;
      color: white
    }
    .brand-sub {
      font-size: 13px;
      color: rgba(255, 255, 255, .88);
      margin-top: 4px
    }
/* =========================================================
   CORE CSS 03 - NAVIGATION
   Mục tiêu: style thanh tab và trạng thái tab đang được chọn.
========================================================= */
    .tabs {
      display: flex;
      gap: 10px;
      margin-top: 14px;
      overflow-x: auto
    }
    .tab-btn {
      border: 0;
      border-radius: 14px;
      padding: 13px 20px;
      background: rgba(255, 255, 255, .13);
      color: white;
      font-weight: 900;
      white-space: nowrap;
      cursor: pointer
    }
    .tab-btn.active {
      background: #ffd400;
      color: #111
    }
/* =========================================================
   CORE CSS 04 - LAYOUT
   Mục tiêu: khung nội dung, box chức năng, input/select và bố cục form.
========================================================= */
    .main {
      max-width: 1280px;
      margin: 0 auto;
      padding: 22px
    }
    .tab-content {
      display: none
    }
    .tab-content.active {
      display: block
    }
    .box {
      border-radius: 24px;
      padding: 24px;
      margin-bottom: 22px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, .06)
    }
    .search-box {
      background: linear-gradient(180deg, #f3fbff, #fff);
      border: 1px solid #cdeeff
    }
    .input-box {
      background: linear-gradient(180deg, #fff7fb, #fff);
      border: 1px solid #ffd6e8
    }
    .wait-box {
      background: linear-gradient(180deg, #fffaf2, #fff);
      border: 1px solid #ffe2aa
    }
    h3 {
      margin-top: 0
    }
    .row {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      margin-bottom: 14px
    }
    .control {
      width: 280px;
      flex: 0 0 280px
    }
    label {
      font-weight: 800;
      display: block;
      margin-bottom: 6px
    }
    input,
    select {
      width: 100%;
      height: 46px;
      padding: 10px 14px;
      border: 1px solid #ccc;
      border-radius: 14px;
      background: white;
      font-size: 15px
    }
/* =========================================================
   CORE CSS 05 - BUTTON
   Mục tiêu: style nhóm nút chính, nút lưu/chờ/tra cứu/thu hoạch.
========================================================= */
    .btn {
      border: 0;
      border-radius: 15px;
      padding: 12px 18px;
      color: white;
      font-weight: 900;
      cursor: pointer;
      margin: 5px 8px 5px 0;
      box-shadow: 0 6px 16px rgba(0, 0, 0, .14)
    }
    .btn-save {
      background: linear-gradient(135deg, #7c4dff, #5e35b1)
    }
    .btn-wait {
      background: linear-gradient(135deg, #ffb347, #ff7b54)
    }
    .btn-missing {
      background: linear-gradient(135deg, #ff8a65, #ff5c8a)
    }
    .btn-search {
      background: linear-gradient(135deg, #4facfe, #7367f0)
    }
    .btn-harvest {
      min-width: 0;
      width: 38px;
      height: 38px;
      padding: 0;
      border-radius: 14px;
      border: none;
      background: linear-gradient(135deg, #ffd6e8, #ffb6d5);
      color: #8B0000;
      font-size: 19px;
      box-shadow: 0 4px 10px rgba(255, 120, 170, .25);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer
    }
    .status {
      font-weight: 800;
      color: #444;
      margin-top: 10px
    }
/* =========================================================
   CORE CSS 06 - FLOWER COLOR & LIST
   Mục tiêu: màu nền theo nhóm hoa, danh sách hoa, thẻ kết quả và tổng quan.
========================================================= */
    .purple {
      background: rgba(200, 170, 255, .30)
    }
    .green {
      background: rgba(180, 220, 255, .32)
    }
    .orange {
      background: rgba(255, 210, 150, .30)
    }
    .red {
      background: rgba(255, 170, 180, .30)
    }
    .white {
      background: rgba(170, 235, 190, .30)
    }
    .flower-list {
      max-height: 620px;
      overflow: auto;
      padding-right: 4px
    }
    .color-section {
      margin-bottom: 24px;
      background: rgba(255, 255, 255, .55);
      border-radius: 22px;
      padding: 14px;
      border: 1px solid rgba(0, 0, 0, .05)
    }
    .color-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-radius: 16px;
      padding: 12px 16px;
      margin-bottom: 12px;
      font-weight: 900
    }
    .color-header small {
      color: #555;
      font-weight: 800
    }
    .h-scroll {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 10px;
      overflow-x: hidden;
      padding: 4px 2px 10px
    }
    .flower-item {
      width: 100%;
      min-height: 64px;
      display: grid;
      grid-template-columns: 22px 52px 1fr;
      align-items: center;
      gap: 9px;
      padding: 8px 10px;
      border-radius: 14px;
      border: 1px solid rgba(0, 0, 0, .06);
      cursor: pointer;
      box-shadow: 0 3px 10px rgba(0, 0, 0, .04)
    }
    .flower-item img {
      width: 46px;
      height: 46px;
      object-fit: contain
    }
    .flower-item input[type="checkbox"] {
      width: 16px;
      height: 16px;
      margin: 0
    }
    .flower-name {
      font-weight: 400;
      color: #222;
      font-size: 15px;
      line-height: 1.2;
      text-align: left
    }
    .overview-box {
      background:
        radial-gradient(circle at top left, rgba(255, 220, 245, .55), transparent 28%),
        radial-gradient(circle at top right, rgba(210, 245, 255, .55), transparent 30%),
        linear-gradient(180deg, #fbfdff, #fff);
      border: 1px solid #d6f0ff;
      box-shadow: 0 22px 50px rgba(80, 120, 160, .12);
    }
    .overview-cards {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 18px;
      margin: 22px 0;
    }
    .overview-card {
      position: relative;
      overflow: hidden;
      border-radius: 26px;
      padding: 22px;
      min-height: 140px;
      backdrop-filter: blur(12px);
      box-shadow: 0 18px 38px rgba(70, 70, 120, .10);
      border: 1px solid rgba(255, 255, 255, .75);
    }
    .overview-card:nth-child(1) {
      background: linear-gradient(135deg, #eef3ff, #ffffff);
    }
    .overview-card:nth-child(2) {
      background: linear-gradient(135deg, #eafff3, #ffffff);
    }
    .overview-card:nth-child(3) {
      background: linear-gradient(135deg, #f1e7ff, #ffffff);
    }
    .overview-card:nth-child(4) {
      background: linear-gradient(135deg, #fff0e7, #ffffff);
    }
    .overview-card::after {
      content: "";
      position: absolute;
      width: 120px;
      height: 120px;
      border-radius: 50%;
      right: -35px;
      top: -35px;
      background: rgba(255, 255, 255, .55);
    }
    .overview-card .icon {
      width: 46px;
      height: 46px;
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, .75);
      box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
      font-size: 24px;
      margin-bottom: 16px;
    }
    .overview-card .num {
      font-size: 34px;
      line-height: 1;
      font-weight: 900;
      color: #5e35b1;
      margin-bottom: 8px;
    }
    .overview-card .label {
      font-size: 13px;
      font-weight: 900;
      color: #555;
      text-transform: uppercase;
      letter-spacing: .6px;
    }
    .overview-progress-box {
      background: rgba(255, 255, 255, .88);
      border-radius: 30px;
      padding: 30px;
      box-shadow: 0 18px 45px rgba(80, 80, 120, .13);
      border: 1px solid rgba(255, 255, 255, .9);
    }
    .overview-progress-title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 30px;
      font-size: 18px;
    }
    .overview-progress-title span {
      font-weight: 900;
      color: #222;
    }
    .big-percent-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-bottom: 34px;
    }
    .big-percent {
      width: 150px;
      height: 150px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 38px;
      font-weight: 900;
      color: #8b4dff;
      background:
        radial-gradient(circle, #f8fdff 54%, transparent 55%),
        conic-gradient(#41b8c8 0deg, #edf3f6 0deg);
      box-shadow:
        0 16px 34px rgba(65, 184, 200, .18),
        inset 0 0 20px rgba(255, 255, 255, .7);
      margin-bottom: 12px;
    }
    .overview-percent-sub {
      color: #666;
      font-weight: 800;
      text-align: center;
      line-height: 1.45;
    }
    .overview-percent-sub span {
      color: #222;
      font-size: 18px;
      font-weight: 900;
    }
    .overview-color-cards {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
    }
    .overview-color-card {
      position: relative;
      overflow: hidden;
      border-radius: 24px;
      padding: 22px 12px 18px;
      text-align: center;
      min-height: 130px;
      box-shadow: 0 14px 30px rgba(80, 80, 120, .10);
      border: 1px solid rgba(255, 255, 255, .75);
    }
    .overview-color-card::before {
      content: "";
      display: block;
      width: 58px;
      height: 58px;
      margin: 0 auto 10px;
      border-radius: 50%;
      background:
        radial-gradient(circle, #fff 48%, transparent 50%),
        conic-gradient(currentColor var(--deg), rgba(255, 255, 255, .5) 0deg);
      box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
    }
    .overview-color-card.red {
      color: #ff3b3b;
      background: linear-gradient(135deg, #ffe1e1, #fff7f7);
    }
    .overview-color-card.orange {
      color: #f59b00;
      background: linear-gradient(135deg, #fff0d5, #fffaf1);
    }
    .overview-color-card.purple {
      color: #7c4dff;
      background: linear-gradient(135deg, #eadfff, #faf7ff);
    }
    .overview-color-card.green {
      color: #00a6df;
      background: linear-gradient(135deg, #dff3ff, #f7fcff);
    }
    .overview-color-card.white {
      color: #04b889;
      background: linear-gradient(135deg, #dff8ec, #f8fffb);
    }
    .overview-color-card .percent {
      font-size: 24px;
      font-weight: 900;
      margin-bottom: 10px;
      color: currentColor;
    }
    .overview-color-card .name {
      font-weight: 900;
      margin-bottom: 8px;
      color: #222;
    }
    .overview-color-card .count {
      color: #666;
      font-weight: 800;
    }
/* =========================================================
   RESPONSIVE - TABLET (≤900px)
========================================================= */
    @media(max-width:900px) {
      .overview-cards,
      .overview-color-cards {
        grid-template-columns: repeat(2, 1fr);
      }
    }
/* MOBILE 3 */
    @media(max-width:520px) {
      .overview-cards,
      .overview-color-cards {
        grid-template-columns: 1fr;
      }
    }
    .selected {
      border: 2px solid #6b5cff !important;
      box-shadow: 0 0 0 2px rgba(107, 92, 255, .18)
    }
    .result-color-section {
      margin-bottom: 28px;
      background: rgba(255, 255, 255, .55);
      border-radius: 22px;
      padding: 14px;
      border: 1px solid rgba(0, 0, 0, .05)
    }
    .result-color-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-radius: 16px;
      padding: 12px 16px;
      margin-bottom: 14px;
      font-weight: 900;
      font-size: 17px
    }
    .result-color-header small {
      font-size: 13px;
      color: #555;
      font-weight: 800
    }
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 16px;
      margin-top: 10px
    }
    .card {
      position: relative;
      border-radius: 20px;
      padding: 16px;
      text-align: center;
      box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
      min-height: 220px
    }
    .card img {
      width: 112px;
      height: 112px;
      object-fit: contain
    }
    .flower {
      font-weight: 400;
      color: #222;
      font-size: 16px;
      line-height: 1.25
    }
    .tag {
      display: inline-block;
      margin-top: 8px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 900
    }
    .tag-harvest {
      background: #d7ffe1;
      color: #137333
    }
    .tag-wait {
      background: #fff1cc;
      color: #9a5b00
    }
    .acc {
      color: #8B0000;
      font-weight: 700;
      font-size: 14px;
      margin-top: 6px
    }
    .acc-list {
      margin-top: 12px;
      display: flex;
      flex-direction: column;
      gap: 8px
    }
    .waiting-acc-row {
      display: grid;
      grid-template-columns: 1fr 44px;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, .82);
      border-radius: 18px;
      padding: 10px 12px;
      box-shadow: 0 3px 10px rgba(0, 0, 0, .04)
    }
    .waiting-acc-row span {
      color: #8B0000;
      font-weight: 700;
      font-size: 14px;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }
    .harvest-acc-row {
      display: grid;
      grid-template-columns: 1fr 28px;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, .72);
      border-radius: 13px;
      padding: 8px 10px
    }
    .harvest-acc-row span {
      color: #8B0000;
      font-weight: 700;
      font-size: 14px;
      text-align: center;
      overflow-wrap: anywhere
    }
    .mini-delete {
      width: 24px;
      height: 24px;
      padding: 0;
      border-radius: 50%;
      border: 0;
      background: white;
      color: #d63031;
      font-weight: 900;
      box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
      cursor: pointer
    }
    .empty-note {
      padding: 18px;
      background: white;
      border-radius: 16px;
      color: #777;
      font-weight: 800
    }
    .compact-row {
      min-height: 38px;
    }
    .more-acc-btn {
      border: none;
      border-radius: 14px;
      background: rgba(255, 255, 255, .72);
      color: #8B0000;
      font-weight: 900;
      padding: 9px 12px;
      cursor: pointer;
      box-shadow: 0 3px 10px rgba(0, 0, 0, .06);
    }
    .more-acc-btn:hover {
      background: white;
    }
    /* POPUP DANH SÁCH ACC */
    .modal.acc-full-modal {
      position: relative;
      width: min(1100px, 95vw);
      max-width: 95vw;
      max-height: 85vh;
      overflow: auto;
      background: #fff;
      border-radius: 28px;
      padding: 24px;
      text-align: center;
    }
.modal-x-btn{
    position:absolute;
    top:18px;
    right:18px;
    width:38px;
    height:38px;
    border:none;
    border-radius:50%;
    background:#ffe6ea;
    color:#d60000;
    cursor:pointer;
    z-index:1000;
    display:flex;
align-items:center;
justify-content:center;
}
.modal.member-progress-modal > .modal-x-btn{
  position:absolute !important;
  top:18px !important;
  right:28px !important;
  left:auto !important;
  bottom:auto !important;
  margin:0 !important;
  transform:none !important;
}
.modal{
    position:relative;
}
    .acc-modal-head {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      margin-bottom: 18px;
      padding: 0 45px;
    }
    #accListFlowerImg {
      width: 86px;
      height: 86px;
      object-fit: contain;
    }
    .acc-list-two-col {
      display: grid;
      grid-template-columns: repeat(4, minmax(210px, 1fr));
      gap: 10px;
    }
    .modal-acc-row {
      display: grid;
      grid-template-columns: 1fr 32px;
      align-items: center;
      gap: 8px;
      min-height: 48px;
      background: #fff7fb;
      border-radius: 14px;
      padding: 8px 10px;
    }
    .modal-acc-row span {
      color: #8B0000;
      font-weight: 900;
      font-size: 14px;
      line-height: 1.25;
      text-align: center;
      white-space: normal;
      word-break: normal;
      overflow-wrap: anywhere;
    }
    .modal-close-bottom {
      width: auto !important;
      min-width: 90px;
    }
    /* RESPONSIVE POPUP ACC */
    @media(max-width:1200px) {
      .acc-list-two-col {
        grid-template-columns: repeat(3, minmax(190px, 1fr));
      }
    }
    @media(max-width:768px) {
      .modal.acc-full-modal {
        width: 95vw;
        padding: 22px 16px;
      }
      .acc-list-two-col {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
      }
      .modal-acc-row span {
        font-size: 13px;
      }
    }
    @media(max-width:480px) {
      .acc-list-two-col {
        grid-template-columns: 1fr;
      }
      #accListFlowerImg {
        width: 72px;
        height: 72px;
      }
    }
    .modal-bg {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(20, 20, 30, .45);
      z-index: 999;
      align-items: center;
      justify-content: center
    }
    .modal {
      background: white;
      border-radius: 22px;
      padding: 24px;
      width: 360px;
      max-width: 90vw;
      box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
      text-align: center
    }
    .btn-danger {
      background: linear-gradient(135deg, #ff6b6b, #d63031)
    }
    .btn-cancel {
      background: linear-gradient(135deg, #a0a0a0, #777)
    }
    .toast {
      position: fixed;
      right: 24px;
      bottom: 24px;
      background: #222;
      color: white;
      padding: 14px 18px;
      border-radius: 14px;
      display: none;
      z-index: 1000;
      font-weight: 900
    }
    .password-box {
      background: linear-gradient(180deg, #f8f5ff, #fff);
      border: 1px solid #e2d6ff;
    }
    .pass-panel {
      background: rgba(255, 255, 255, .75);
      border: 1px solid rgba(0, 0, 0, .06);
      border-radius: 22px;
      padding: 22px;
      box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
      max-width: 820px;
    }
    .readonly-input {
      background: #f2f2f2 !important;
      color: #777 !important;
      cursor: not-allowed;
      pointer-events: none;
    }
    .pass-desc {
      margin-top: 0;
      color: #555;
      font-weight: 700;
      line-height: 1.5;
    }
    .pass-control {
      max-width: 320px;
    }
    #leaderPassInput,
    #oldDeletePass,
    #newDeletePass,
    #confirmDeletePass {
      text-align: center;
      font-size: 22px;
      letter-spacing: 8px;
      font-weight: 900;
    }
/* =========================================================
   RESPONSIVE - TABLET (≤900px)
========================================================= */
    @media(max-width:900px) {
      .main {
        padding: 12px
      }
      .brand-title {
        font-size: 18px
      }
      .control {
        width: 100%;
        flex: 1 1 100%
      }
      .btn {
        width: 100%;
        margin: 6px 0
      }
      .grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr))
      }
      .h-scroll {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr))
      }
    }
/* MOBILE 1 */
    @media(max-width:520px) {
      .app-header {
        padding: 12px
      }
      .brand {
        padding: 12px
      }
      .logo {
        width: 46px;
        height: 46px;
        font-size: 24px;
        flex-basis: 46px
      }
      .brand-title {
        font-size: 17px
      }
      .brand-sub {
        font-size: 12px
      }
      .tab-btn {
        min-width: 118px;
        padding: 11px 12px;
        font-size: 13px
      }
      .box {
        padding: 16px;
        border-radius: 18px
      }
      .h-scroll {
        grid-template-columns: 1fr
      }
      .flower-item {
        grid-template-columns: 20px 46px 1fr
      }
      .flower-item img {
        width: 42px;
        height: 42px
      }
      .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
      }
      .card {
        padding: 10px;
        min-height: 200px
      }
      .card img {
        width: 88px;
        height: 88px
      }
      .flower {
        font-size: 14px
      }
    }
    .missing-row {
      background: rgba(255, 255, 255, .82);
      color: #8B0000;
      font-weight: 900;
      border-radius: 16px;
      padding: 10px 12px;
      text-align: center;
      box-shadow: 0 3px 10px rgba(0, 0, 0, .04);
    }
    /* =========================
   FLOWER STAMP CARD
========================= */
    .card {
      position: relative;
      border-radius: 22px;
      padding: 22px 18px;
      text-align: center;
      min-height: 230px;
      overflow: hidden;
      box-shadow: 0 8px 22px rgba(0, 0, 0, .08);
    }
    /* nền */
    .card.purple {
      background: #eadcff;
    }
    .card.green {
      background: #dfeeff;
    }
    .card.orange {
      background: #ffe9cf;
    }
    .card.red {
      background: #ffdce3;
    }
    .card.white {
      background: #dff5df;
    }
    /* răng cưa */
    .card::before {
      content: "";
      position: absolute;
      inset: 0;
      padding: 10px;
      border-radius: 22px;
      background:
        radial-gradient(circle at top left,
          transparent 0 8px,
          #fff 8px 12px,
          transparent 12px) top left,
        radial-gradient(circle at top right,
          transparent 0 8px,
          #fff 8px 12px,
          transparent 12px) top right,
        radial-gradient(circle at bottom left,
          transparent 0 8px,
          #fff 8px 12px,
          transparent 12px) bottom left,
        radial-gradient(circle at bottom right,
          transparent 0 8px,
          #fff 8px 12px,
          transparent 12px) bottom right;
      background-size: 26px 26px;
      background-repeat: repeat-x, repeat-x, repeat-x, repeat-x;
      mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
      -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      pointer-events: none;
    }
    .point-corner {
      position: absolute;
      top: 18px;
      right: 20px;
      color: #8B0000;
      font-size: 20px;
      font-weight: 900;
      line-height: 1;
      z-index: 2;
    }
    .flower-source {
      margin-top: 6px;
      line-height: 1.3;
    }
    .source-label {
      color: #222;
      font-size: 12px;
      font-weight: 700;
    }
    .source-value {
      color: #c27a00;
      font-size: 14px;
      font-weight: 900;
    }
    .member-overview-box {
      margin-top: 22px;
      background: rgba(255, 255, 255, .88);
      border-radius: 30px;
      padding: 26px;
      box-shadow: 0 18px 45px rgba(80, 80, 120, .10);
      border: 1px solid rgba(255, 255, 255, .9);
    }
    .member-overview-title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 18px;
      font-size: 18px;
    }
    .member-overview-title span {
      color: #666;
      font-weight: 900;
      font-size: 14px;
    }
    .member-overview-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 14px;
    }
    .member-card {
      border-radius: 22px;
      padding: 16px;
      background:
        radial-gradient(circle at top left, rgba(255, 220, 245, .45), transparent 32%),
        linear-gradient(135deg, #ffffff, #f8fbff);
      box-shadow: 0 10px 24px rgba(80, 80, 120, .08);
      border: 1px solid rgba(255, 255, 255, .85);
    }
    .member-card-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 10px;
    }
    .member-name {
      color: #8B0000;
      font-weight: 900;
      font-size: 15px;
      line-height: 1.25;
      overflow-wrap: anywhere;
    }
    .member-percent {
      color: #7c4dff;
      font-size: 22px;
      font-weight: 900;
      flex: 0 0 auto;
    }
    .member-count {
      color: #666;
      font-weight: 800;
      font-size: 13px;
      margin-bottom: 10px;
    }
    .member-progress {
      height: 10px;
      border-radius: 999px;
      background: #edf2f7;
      overflow: hidden;
    }
    .member-progress-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, #40b7c9, #7c4dff);
    }
/* MOBILE 2 */
    @media(max-width:520px) {
      .member-overview-box {
        padding: 18px;
        border-radius: 22px;
      }
      .member-overview-title {
        flex-direction: column;
        align-items: flex-start;
      }
      .member-overview-list {
        grid-template-columns: 1fr;
      }
    }
    .member-card {
      cursor: pointer;
      transition: .18s ease;
    }
    .member-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 16px 34px rgba(80, 80, 120, .14);
    }
    .member-progress-modal {
      position: relative;
      width: min(980px, 94vw);
      max-width: 94vw;
      max-height: 88vh;
      overflow: auto;
      border-radius: 30px;
      padding: 28px;
    }
    .member-progress-big {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin: 20px 0 28px;
    }
    .member-progress-modal .overview-color-cards {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .modal-close-bottom {
      margin-top: 22px;
    }
    .acc-tooltip-box {
      position: fixed;
      z-index: 2000;
      display: none;
      min-width: 230px;
      max-width: 280px;
      background: white;
      border-radius: 18px;
      padding: 14px 16px;
      box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
      border: 1px solid rgba(255, 255, 255, .85);
      font-size: 14px;
      line-height: 1.55;
    }
    .acc-tooltip-box b {
      color: #8B0000;
    }
    .acc-tooltip-line {
      margin: 3px 0;
    }
    .acc-clickable {
      cursor: pointer;
      text-decoration: none;
    }
    .acc-clickable:hover {
      text-decoration: underline;
    }
    /* =========================================================
   PROJECT UI PASTEL - FLOWER CARDS & ACC PILLS
   Mục tiêu: đồng bộ thẻ hoa, pill ACC và nút thao tác theo phong cách pastel/glass của tab Tổng quan.
========================================================= */
    /* Section nhóm màu trong kết quả tra cứu */
    .result-color-section {
      background: rgba(255, 255, 255, .62) !important;
      border: 1px solid rgba(255, 255, 255, .85) !important;
      border-radius: 28px !important;
      padding: 16px !important;
      box-shadow: 0 16px 36px rgba(80, 80, 120, .08) !important;
      backdrop-filter: blur(10px);
    }
    .result-color-header {
      border-radius: 20px !important;
      padding: 14px 18px !important;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
    }
    /* Nền header nhóm màu mềm hơn */
    .result-color-header.red,
    .color-header.red {
      background: linear-gradient(135deg, #ffe4e9, #fff3f6) !important;
    }
    .result-color-header.orange,
    .color-header.orange {
      background: linear-gradient(135deg, #fff0d7, #fff9ef) !important;
    }
    .result-color-header.purple,
    .color-header.purple {
      background: linear-gradient(135deg, #eadfff, #faf7ff) !important;
    }
    .result-color-header.green,
    .color-header.green {
      background: linear-gradient(135deg, #dff3ff, #f7fcff) !important;
    }
    .result-color-header.white,
    .color-header.white {
      background: linear-gradient(135deg, #dff8ec, #f8fffb) !important;
    }
    /* Thẻ hoa kiểu pastel glass */
    .card {
      border-radius: 28px !important;
      padding: 24px 18px 20px !important;
      min-height: 250px !important;
      border: 1px solid rgba(255, 255, 255, .85) !important;
      box-shadow:
        0 18px 38px rgba(80, 80, 120, .12),
        inset 0 1px 0 rgba(255, 255, 255, .75) !important;
      backdrop-filter: blur(8px);
      transition: transform .18s ease, box-shadow .18s ease;
    }
    .card:hover {
      transform: translateY(-3px);
      box-shadow:
        0 24px 48px rgba(80, 80, 120, .16),
        inset 0 1px 0 rgba(255, 255, 255, .85) !important;
    }
    .card.red {
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .55), transparent 32%),
        linear-gradient(135deg, #ffe0e7, #fff4f7) !important;
    }
    .card.orange {
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .55), transparent 32%),
        linear-gradient(135deg, #fff0d7, #fff9ef) !important;
    }
    .card.purple {
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .55), transparent 32%),
        linear-gradient(135deg, #eadfff, #faf7ff) !important;
    }
    .card.green {
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .55), transparent 32%),
        linear-gradient(135deg, #dff3ff, #f7fcff) !important;
    }
    .card.white {
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .55), transparent 32%),
        linear-gradient(135deg, #dff8ec, #f8fffb) !important;
    }
    /* Răng cưa nhẹ hơn để không bị nặng mắt */
    .card::before {
      opacity: .75;
    }
    /* Hình hoa nổi hơn */
    .card img {
      width: 118px !important;
      height: 118px !important;
      margin-bottom: 6px;
      filter: drop-shadow(0 10px 14px rgba(70, 70, 100, .12));
    }
    /* Điểm hoa */
    .point-corner {
      top: 20px !important;
      right: 22px !important;
      color: #b00000 !important;
      font-size: 21px !important;
      text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
    }
    /* Tên hoa và nguồn */
    .flower {
      margin-top: 6px;
      font-weight: 500 !important;
      color: #1f1f1f !important;
    }
    .flower-source {
      margin-top: 7px !important;
    }
    .source-label {
      color: #222 !important;
      font-size: 12px !important;
      font-weight: 800 !important;
    }
    .source-value {
      color: #c77a00 !important;
      font-size: 14px !important;
      font-weight: 900 !important;
    }
    /* Tag trạng thái */
    .tag {
      padding: 5px 13px !important;
      border-radius: 999px !important;
      box-shadow: 0 5px 12px rgba(80, 80, 120, .08);
    }
    .tag-harvest {
      background: linear-gradient(135deg, #c9ffd8, #effff3) !important;
      color: #137333 !important;
    }
    .tag-wait {
      background: linear-gradient(135deg, #fff1be, #fff9de) !important;
      color: #9a5b00 !important;
    }
    /* Danh sách ACC dạng pill mềm */
    .acc-list {
      margin-top: 14px !important;
      gap: 10px !important;
    }
    .harvest-acc-row,
    .waiting-acc-row {
      min-height: 42px !important;
      border-radius: 18px !important;
      padding: 9px 10px !important;
      background: rgba(255, 255, 255, .72) !important;
      border: 1px solid rgba(255, 255, 255, .85) !important;
      box-shadow:
        0 8px 18px rgba(80, 80, 120, .08),
        inset 0 1px 0 rgba(255, 255, 255, .75) !important;
      backdrop-filter: blur(8px);
    }
    .harvest-acc-row {
      grid-template-columns: 1fr 32px !important;
    }
    .waiting-acc-row {
      grid-template-columns: 1fr 44px !important;
    }
    .harvest-acc-row span,
    .waiting-acc-row span {
      color: #8B0000 !important;
      font-weight: 900 !important;
      font-size: 14px !important;
      line-height: 1.25;
    }
    /* Nút X mềm hơn */
    .mini-delete {
      width: 28px !important;
      height: 28px !important;
      background: rgba(255, 255, 255, .92) !important;
      color: #e53935 !important;
      box-shadow: 0 6px 14px rgba(229, 57, 53, .18) !important;
      transition: transform .16s ease, background .16s ease;
    }
    .mini-delete:hover {
      transform: scale(1.08);
      background: #ffe5e5 !important;
    }
    /* Nút giỏ bồi dưỡng */
    .btn-harvest {
      border-radius: 16px !important;
      background: linear-gradient(135deg, #ffd1e7, #ffafd2) !important;
      box-shadow: 0 8px 18px rgba(255, 120, 170, .22) !important;
      transition: transform .16s ease;
    }
    .btn-harvest:hover {
      transform: scale(1.06);
    }
    /* Dòng chưa ai có */
    .missing-row {
      background: rgba(255, 255, 255, .72) !important;
      border: 1px solid rgba(255, 255, 255, .85);
      border-radius: 18px !important;
      padding: 11px 12px !important;
      box-shadow: 0 8px 18px rgba(80, 80, 120, .08) !important;
      backdrop-filter: blur(8px);
    }
    /* Nút + người khác */
    .more-acc-btn {
      border-radius: 18px !important;
      background: rgba(255, 255, 255, .72) !important;
      border: 1px solid rgba(255, 255, 255, .85) !important;
      box-shadow: 0 8px 18px rgba(80, 80, 120, .08) !important;
      backdrop-filter: blur(8px);
      transition: transform .16s ease, background .16s ease;
    }
    .more-acc-btn:hover {
      transform: translateY(-2px);
      background: white !important;
    }
    /* Card nhập hoa đồng bộ nhẹ */
    .flower-item {
      border-radius: 18px !important;
      background: rgba(255, 255, 255, .62);
      border: 1px solid rgba(255, 255, 255, .78) !important;
      box-shadow: 0 8px 18px rgba(80, 80, 120, .06) !important;
      transition: transform .16s ease, box-shadow .16s ease;
    }
    .flower-item:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 28px rgba(80, 80, 120, .11) !important;
    }
    /* Popup ACC list cũng đồng bộ */
    .modal-acc-row {
      border-radius: 18px !important;
      background: linear-gradient(135deg, #fff7fb, #ffffff) !important;
      border: 1px solid rgba(255, 255, 255, .85) !important;
      box-shadow: 0 8px 18px rgba(80, 80, 120, .08) !important;
    }
    /* Mobile tinh gọn */
/* MOBILE 4 */
    @media(max-width:520px) {
      .card {
        border-radius: 22px !important;
        padding: 18px 12px !important;
        min-height: 220px !important;
      }
      .card img {
        width: 92px !important;
        height: 92px !important;
      }
      .harvest-acc-row,
      .waiting-acc-row {
        min-height: 38px !important;
        padding: 8px !important;
      }
      .harvest-acc-row span,
      .waiting-acc-row span {
        font-size: 13px !important;
      }
    }
    .support-flower-box{
  margin-top:22px;
  background:rgba(255,255,255,.9);
  border-radius:30px;
  padding:26px;
  box-shadow:0 18px 45px rgba(80,80,120,.10);
  border:1px solid rgba(255,255,255,.9);
}
.support-flower-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
  font-size:18px;
}
.support-flower-title span{
  color:#666;
  font-weight:900;
  font-size:14px;
}
.support-flower-desc{
  margin:0 0 18px;
  color:#666;
  font-weight:700;
  line-height:1.45;
}
.support-flower-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:16px;
}
.support-flower-card{
  position:relative;
  border-radius:24px;
  padding:18px 14px;
  text-align:center;
  min-height:255px;
  box-shadow:0 14px 30px rgba(80,80,120,.10);
  border:1px solid rgba(255,255,255,.8);
  overflow:hidden;
  transition:.2s ease;
}
.support-flower-card:hover{
  transform:translateY(-4px);
  box-shadow:0 20px 40px rgba(80,80,120,.16);
}
.support-flower-card.red{
  background:linear-gradient(135deg,#ffe1e1,#fff7f7);
}
.support-flower-card.orange{
  background:linear-gradient(135deg,#fff0d5,#fffaf1);
}
.support-flower-card.purple{
  background:linear-gradient(135deg,#eadfff,#faf7ff);
}
.support-flower-card.green{
  background:linear-gradient(135deg,#dff3ff,#f7fcff);
}
.support-flower-card.white{
  background:linear-gradient(135deg,#dff8ec,#f8fffb);
}
.support-flower-card img{
  width:110px;
  height:110px;
  object-fit:contain;
  transition:.25s ease;
}
.support-flower-card:hover img{
  animation:flowerBounce .55s ease;
}
@keyframes flowerBounce{
  0%{transform:translateY(0) scale(1)}
  35%{transform:translateY(-7px) scale(1.06)}
  70%{transform:translateY(2px) scale(.98)}
  100%{transform:translateY(0) scale(1)}
}
.support-point{
  position:absolute;
  top:16px;
  right:18px;
  color:#8B0000;
  font-size:20px;
  font-weight:900;
}
.support-flower-name{
  font-size:16px;
  font-weight:900;
  color:#222;
  line-height:1.25;
  margin-top:8px;
}
.support-source{
  margin-top:6px;
  font-size:13px;
  font-weight:700;
}
.support-source span{
  color:#c27a00;
  font-weight:900;
}
.support-owner{
  margin-top:12px;
  padding:9px 10px;
  border-radius:16px;
  background:rgba(255,255,255,.76);
  color:#8B0000;
  font-weight:900;
  box-shadow:0 5px 14px rgba(80,80,120,.06);
}
/* MOBILE 5 */
@media(max-width:520px){
  .support-flower-box{
    padding:18px;
    border-radius:22px;
  }
  .support-flower-title{
    flex-direction:column;
    align-items:flex-start;
  }
  .support-flower-list{
    grid-template-columns:1fr;
  }
}
.flower-item.red{
  background:linear-gradient(135deg,#ffe1e8,#fff7f7) !important;
}
.flower-item.orange{
  background:linear-gradient(135deg,#fff0d5,#fffaf1) !important;
}
.flower-item.purple{
  background:linear-gradient(135deg,#eadfff,#faf7ff) !important;
}
.flower-item.green{
  background:linear-gradient(135deg,#dff3ff,#f7fcff) !important;
}
.flower-item.white{
  background:linear-gradient(135deg,#dff8ec,#f8fffb) !important;
}
.flower-item{
  box-shadow:0 8px 18px rgba(80,80,120,.08);
  border:1px solid rgba(255,255,255,.75);
}
/* =========================================================
   MOBILE COMPACT FIX - giảm zoom giao diện điện thoại
   ========================================================= */
@media(max-width:600px){
  html, body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    font-size:13px;
  }
  .app-header{
    padding:10px 8px !important;
  }
  .brand{
    max-width:100% !important;
    gap:10px !important;
    padding:10px 12px !important;
    border-radius:16px !important;
  }
  .logo{
    width:42px !important;
    height:42px !important;
    flex:0 0 42px !important;
    font-size:22px !important;
  }
  .brand-title{
    font-size:18px !important;
    line-height:1.1 !important;
  }
  .brand-sub{
    font-size:12px !important;
    line-height:1.25 !important;
  }
  .tabs{
    gap:8px !important;
    margin-top:10px !important;
    padding-bottom:5px !important;
  }
  .tab-btn{
    min-width:auto !important;
    padding:9px 13px !important;
    border-radius:12px !important;
    font-size:13px !important;
    line-height:1.1 !important;
  }
  .main{
    width:100% !important;
    max-width:100% !important;
    padding:10px !important;
  }
  .box{
    padding:14px !important;
    border-radius:18px !important;
    margin-bottom:14px !important;
  }
  h3{
    font-size:20px !important;
    line-height:1.2 !important;
  }
  .overview-cards{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    margin:14px 0 !important;
  }
  .overview-card{
    min-height:105px !important;
    padding:14px !important;
    border-radius:18px !important;
  }
  .overview-card::after{
    width:80px !important;
    height:80px !important;
    right:-25px !important;
    top:-25px !important;
  }
  .overview-card .icon{
    width:34px !important;
    height:34px !important;
    border-radius:12px !important;
    font-size:18px !important;
    margin-bottom:10px !important;
  }
  .overview-card .num{
    font-size:27px !important;
    margin-bottom:5px !important;
  }
  .overview-card .label{
    font-size:10.5px !important;
    letter-spacing:.25px !important;
    line-height:1.2 !important;
  }
  .overview-progress-box{
    padding:16px !important;
    border-radius:22px !important;
  }
  .overview-progress-title{
    font-size:15px !important;
    margin-bottom:16px !important;
    gap:8px !important;
    flex-wrap:wrap !important;
  }
  .big-percent-wrap{
    margin-bottom:18px !important;
  }
  .big-percent{
    width:96px !important;
    height:96px !important;
    font-size:28px !important;
    margin-bottom:8px !important;
  }
  .overview-percent-sub{
    font-size:13px !important;
  }
  .overview-percent-sub span{
    font-size:15px !important;
  }
  .overview-color-cards{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }
  .overview-color-card{
    min-height:105px !important;
    padding:14px 8px 12px !important;
    border-radius:18px !important;
  }
  .overview-color-card::before{
    width:42px !important;
    height:42px !important;
    margin-bottom:7px !important;
  }
  .overview-color-card .percent{
    font-size:19px !important;
    margin-bottom:5px !important;
  }
  .overview-color-card .name{
    font-size:12px !important;
    margin-bottom:5px !important;
  }
  .overview-color-card .count{
    font-size:12px !important;
  }
  .member-overview-box,
  .support-flower-box{
    padding:14px !important;
    border-radius:20px !important;
    margin-top:14px !important;
  }
  .member-overview-title,
  .support-flower-title{
    font-size:15px !important;
    margin-bottom:12px !important;
  }
  .member-overview-title span,
  .support-flower-title span{
    font-size:12px !important;
  }
  .member-overview-list{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }
  .member-card{
    padding:12px !important;
    border-radius:16px !important;
  }
  .member-name{
    font-size:13px !important;
  }
  .member-percent{
    font-size:18px !important;
  }
  .member-count{
    font-size:11.5px !important;
  }
  .member-progress{
    height:8px !important;
  }
  .support-flower-desc{
    font-size:12.5px !important;
  }
  .support-flower-list{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }
  .support-flower-card{
    min-height:210px !important;
    padding:14px 10px !important;
    border-radius:18px !important;
  }
  .support-flower-card img{
    width:82px !important;
    height:82px !important;
  }
  .support-flower-name{
    font-size:13px !important;
  }
  .support-source,
  .support-owner{
    font-size:12px !important;
  }
  .row{
    gap:10px !important;
  }
  input, select{
    height:42px !important;
    font-size:14px !important;
  }
  .btn{
    padding:10px 14px !important;
    font-size:13px !important;
    border-radius:13px !important;
  }
}
/* MOBILE EXTRA SMALL */
@media(max-width:360px){
  .overview-cards,
  .overview-color-cards,
  .member-overview-list,
  .support-flower-list{
    grid-template-columns:1fr !important;
  }
}
/* ===== MOBILE COMPACT FIX - giống giao diện cũ ===== */
/* MOBILE 6 */
@media(max-width:520px){
  .app-header{
    padding:8px 10px !important;
  }
  .brand{
    padding:8px 10px !important;
    border-radius:14px !important;
    gap:10px !important;
  }
  .logo{
    width:42px !important;
    height:42px !important;
    flex-basis:42px !important;
    font-size:22px !important;
  }
  .brand-title{
    font-size:17px !important;
    line-height:1.15 !important;
  }
  .brand-sub{
    font-size:11px !important;
  }
  .tabs{
    gap:8px !important;
    margin-top:8px !important;
  }
  .tab-btn{
    min-width:auto !important;
    padding:8px 12px !important;
    font-size:12px !important;
    border-radius:12px !important;
  }
  .main{
    padding:10px !important;
  }
  .box{
    padding:12px !important;
    border-radius:16px !important;
  }
  h3{
    font-size:18px !important;
  }
  .overview-cards{
    grid-template-columns:repeat(2,1fr) !important;
    gap:10px !important;
  }
  .overview-card{
    min-height:95px !important;
    padding:12px !important;
    border-radius:18px !important;
  }
  .overview-card .icon{
    width:32px !important;
    height:32px !important;
    font-size:17px !important;
    margin-bottom:8px !important;
  }
  .overview-card .num{
    font-size:24px !important;
  }
  .overview-card .label{
    font-size:10px !important;
  }
  .overview-progress-box{
    padding:14px !important;
    border-radius:18px !important;
  }
  .big-percent{
    width:95px !important;
    height:95px !important;
    font-size:26px !important;
  }
  .overview-color-cards{
    grid-template-columns:repeat(2,1fr) !important;
    gap:10px !important;
  }
  .grid{
    grid-template-columns:repeat(3,1fr) !important;
    gap:8px !important;
  }
  .card{
    min-height:175px !important;
    padding:10px 8px !important;
    border-radius:16px !important;
  }
  .card img{
    width:70px !important;
    height:70px !important;
  }
  .flower{
    font-size:12px !important;
  }
  .point-corner{
    font-size:16px !important;
    top:10px !important;
    right:12px !important;
  }
  .tag{
    font-size:10px !important;
    padding:3px 8px !important;
  }
  .harvest-acc-row,
  .waiting-acc-row{
    min-height:30px !important;
    padding:5px 7px !important;
    border-radius:12px !important;
  }
  .harvest-acc-row span,
  .waiting-acc-row span{
    font-size:10px !important;
  }
  .mini-delete{
    width:22px !important;
    height:22px !important;
    font-size:13px !important;
  }
  input, select{
    height:38px !important;
    font-size:14px !important;
    border-radius:12px !important;
  }
  .btn{
    padding:10px 12px !important;
    font-size:13px !important;
    border-radius:12px !important;
  }
}
/* =========================================================
   GDD2.1A - Performance UX: Skeleton + smooth tab
   ========================================================= */
.skeleton-line,.skeleton-card{
  position:relative;
  overflow:hidden;
  background:linear-gradient(90deg,#eef2f7 25%,#f8fbff 37%,#eef2f7 63%);
  background-size:400% 100%;
  animation:skeletonMove 1.2s ease-in-out infinite;
}
@keyframes skeletonMove{
  0%{background-position:100% 0}
  100%{background-position:0 0}
}
.skeleton-card{
  min-height:105px;
  border-radius:22px;
  box-shadow:0 10px 24px rgba(80,80,120,.08);
}
.skeleton-line{
  height:14px;
  border-radius:999px;
  margin:8px 0;
}
.tab-content{
  animation:tabFade .18s ease;
}
@keyframes tabFade{
  from{opacity:.55;transform:translateY(4px)}
  to{opacity:1;transform:translateY(0)}
}
.img-fade{
  opacity:0;
  transition:opacity .22s ease;
}
.img-fade.loaded{
  opacity:1;
}
/* =========================================================
   GDD2.1B - Lazy Render + Background Preload
   ========================================================= */
.load-more-wrap{
  text-align:center;
  padding:10px 0 4px;
}
.load-more-btn{
  border:0;
  border-radius:999px;
  padding:10px 18px;
  background:linear-gradient(135deg,#7c4dff,#4facfe);
  color:#fff;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(80,80,160,.16);
}
.load-more-btn:hover{filter:brightness(1.04);transform:translateY(-1px)}
.preload-note{
  opacity:.78;
  font-size:12px;
  font-weight:800;
}
/* MOBILE 7 */
@media(max-width:520px){
  .load-more-btn{width:auto !important;font-size:12px !important;padding:8px 14px !important}
}
/* =========================================================
   GDD2.7.1 - Browser Image Cache Helper
   ========================================================= */
img[data-img-cache="1"]{
  background:linear-gradient(90deg,#eef2f7 25%,#f8fbff 37%,#eef2f7 63%);
  background-size:400% 100%;
  animation:skeletonMove 1.2s ease-in-out infinite;
}
img[data-img-cache="1"].loaded{
  background:transparent;
  animation:none;
}
/* =========================================================
   GDD2.8.1 - Virtual Render / Infinite Render
   ========================================================= */
.virtual-sentinel{
  height:1px;
  width:100%;
}
.virtual-loading-note{
  text-align:center;
  color:#777;
  font-weight:900;
  font-size:13px;
  padding:8px 0;
}
/* =========================================================
   GDD2.8.3 - Scrollbar nhanh cho Tra cứu / Chờ bồi dưỡng
   ========================================================= */
#resultList,
#waitList{
  max-height: calc(100vh - 285px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scroll-behavior: smooth;
}
#resultList::-webkit-scrollbar,
#waitList::-webkit-scrollbar,
.flower-list::-webkit-scrollbar{
  width: 10px;
}
#resultList::-webkit-scrollbar-thumb,
#waitList::-webkit-scrollbar-thumb,
.flower-list::-webkit-scrollbar-thumb{
  background: rgba(11,61,46,.45);
  border-radius: 999px;
}
#resultList::-webkit-scrollbar-track,
#waitList::-webkit-scrollbar-track,
.flower-list::-webkit-scrollbar-track{
  background: rgba(255,255,255,.45);
  border-radius: 999px;
}
/* MOBILE 8 */
@media(max-width:520px){
  #resultList,
  #waitList{
    max-height: calc(100vh - 240px);
    padding-right: 4px;
  }
}
/* =========================================================
   PROJECT GDD2.2.2 - TOAST NOTIFICATION
   Mục tiêu: chuẩn hóa thông báo thành công/lỗi/cảnh báo với animation nhẹ, nằm nổi trên toàn bộ giao diện.
========================================================= */
.toast{
    position:fixed;
    left:50%;
    bottom:26px;
    transform:translate(-50%,30px);
    opacity:0;
    transition:
        transform .22s cubic-bezier(.22,1,.36,1),
        opacity .22s ease;
    padding:13px 22px;
    border-radius:16px;
    font-size:15px;
    font-weight:700;
    color:#fff;
    pointer-events:none;
    z-index:999999;
    box-shadow:
        0 12px 28px rgba(0,0,0,.22);
}
.toast.show{
    opacity:1;
    transform:translate(-50%,0);
}
.toast.success{
    background:linear-gradient(135deg,#37c871,#169d52);
}
.toast.error{
    background:linear-gradient(135deg,#ff6b6b,#d63031);
}
.toast.warning{
    background:linear-gradient(135deg,#ffb347,#ff7b54);
}
.toast.info{
    background:linear-gradient(135deg,#4facfe,#7367f0);
}
/* =========================================================
   PROJECT GDD2.2.3 - RIPPLE EFFECT PRO
   Mục tiêu: tạo hiệu ứng bấm nút mềm hơn cho button, tab và modal; thay thế bản ripple cũ đã bị loại bỏ.
========================================================= */
.btn,
.tab-btn,
.modal button,
button{
    position:relative;
    overflow:hidden;
    isolation:isolate;
}
.ripple{
    position:absolute;
    width:18px;
    height:18px;
    border-radius:50%;
    background:rgba(255,255,255,.55);
    pointer-events:none;
    transform:translate(-50%,-50%) scale(0);
    animation:ripplePro .65s cubic-bezier(.22,1,.36,1);
    z-index:0;
}
@keyframes ripplePro{
    0%{
        opacity:.8;
        transform:translate(-50%,-50%) scale(0);
    }
    100%{
        opacity:0;
        transform:translate(-50%,-50%) scale(18);
    }
}
/* =========================================================
   PROJECT GDD3.1 - ACTIVITY NOTICE ROTATE
   Mục tiêu: hiển thị thông báo hoạt động gần đây theo dạng chạy/đổi nội dung, giúp trang sinh động hơn.
========================================================= */
.activity-notice{
  margin-bottom:18px;
  padding:14px 18px 14px 20px;
  border-radius:18px;
  background:linear-gradient(135deg,#fff8d9,#fffdf3);
  border-left:6px solid #ffd400;
  box-shadow:0 12px 28px rgba(80,80,120,.10);
  transition:opacity .35s ease, transform .35s ease;
}
.activity-message{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:14px;
  font-weight:900;
  color:#222;
  line-height:1.45;
}
.activity-flowers{
  display:none;
}
.activity-fade{
  opacity:0;
  transform:translateY(-8px);
}
.activity-title{
  color:#c27a00;
  font-weight:900;
  margin-right:8px;
}
.activity-time{
  color:#777;
  font-weight:700;
  margin-right:8px;
}
.activity-user{
  color:#1976d2;
  font-weight:900;
}
.activity-acc{
  color:#b00020;
  font-weight:900;
}
.activity-flowers-inline{
  color:#7b1fa2;
  font-weight:800;
}
.activity-sep{
  color:#bbb;
  padding:0 5px;
}
/* =========================================================
   PROJECT GDD3.3 - DELETE MULTI ACC
   Mục tiêu: giao diện chọn nhiều ACC để xóa theo nhóm, gồm chọn tất cả, đếm số đã chọn, xác nhận và ưu tiên z-index popup.
========================================================= */
.multi-delete-btn{
  width:100%;
  margin-top:10px;
  border:none;
  border-radius:14px;
  padding:11px;
  background:#fff0f0;
  color:#c40000;
  font-weight:900;
  cursor:pointer;
}
.multi-delete-toolbar{
  grid-column:1/-1;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 14px;
  border-radius:14px;
  background:#fff7e6;
  font-weight:900;
}
.multi-delete-row{
  display:grid;
  grid-template-columns:26px 1fr;
  align-items:center;
  gap:8px;
  min-height:48px;
  background:#fff7fb;
  border-radius:14px;
  padding:8px 10px;
  color:#8B0000;
  font-weight:900;
}
.multi-delete-row input{
  width:18px;
  height:18px;
}
.multi-delete-actions{
  grid-column:1/-1;
  text-align:center;
  margin-top:10px;
}
.modal.acc-full-modal > .modal-x-btn{
  position:absolute !important;
  top:18px !important;
  right:18px !important;
  left:auto !important;
  bottom:auto !important;
  margin:0 !important;
  transform:none !important;
  z-index:9999;
}
.modal.race-pick-modal > .modal-x-btn{
  position:absolute !important;
  top:18px !important;
  right:18px !important;
  left:auto !important;
  bottom:auto !important;
  margin:0 !important;
  transform:none !important;
  z-index:9999;
}
.multi-delete-toolbar{
  display:none !important;
}
.multi-delete-header{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-bottom:14px;
}
.multi-select-all,
.multi-delete-count{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius:14px;
  background:#fff7e6;
  color:#8B0000;
  font-weight:900;
  padding:8px 12px;
}
.multi-select-all input{
  width:18px;
  height:18px;
}
.multi-delete-flex{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:10px;
}
.multi-delete-row{
  display:grid;
  grid-template-columns:26px 1fr;
  align-items:center;
  gap:8px;
  min-height:48px;
  background:#fff7fb;
  border-radius:14px;
  padding:8px 10px;
  color:#8B0000;
  font-weight:900;
}
.multi-delete-row input{
  width:18px;
  height:18px;
}
.multi-delete-row span{
  text-align:center;
  overflow-wrap:anywhere;
}
.multi-delete-actions{
  grid-column:1/-1;
  text-align:center;
  margin-top:10px;
}
/* FIX GDD3.3 - Z-INDEX POPUP
   Đảm bảo popup nhập pass/xác nhận luôn nổi trên popup chọn ACC. */
#accListModal{ z-index:3000 !important; }
#passModal{ z-index:5000 !important; }
#confirmModal{ z-index:6000 !important; }
#confirmModal .modal, #passModal .modal{ position:relative; z-index:6001 !important; }

/* =========================================================
   GDD5.1 - HOA ĐUA TUẦN
   Mục tiêu:
   - Mỗi ACC chọn tối đa 5 hoa đang có cho vòng đua tuần.
   - Vòng đua mở từ 09:00 thứ 3 đến 21:00 chủ nhật.
   - Danh sách ưu tiên theo thứ tự ACC lưu đầu tiên; ACC hoàn thành được làm mờ và đưa xuống cuối.
========================================================= */
.weekly-race-box{
  background:
    radial-gradient(circle at top left, rgba(255,220,245,.55), transparent 30%),
    radial-gradient(circle at top right, rgba(210,245,255,.55), transparent 32%),
    linear-gradient(180deg,#fbfdff,#fff);
  border:1px solid #d6f0ff;
}
.race-status-card{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin:16px 0 18px;
}
.race-mini-card{
  background:rgba(255,255,255,.82);
  border:1px solid rgba(255,255,255,.9);
  border-radius:22px;
  padding:16px;
  box-shadow:0 12px 28px rgba(80,80,120,.08);
}
.race-mini-card b{
  display:block;
  font-size:12px;
  color:#666;
  margin-bottom:6px;
}
.race-mini-card span{
  color:#5e35b1;
  font-weight:900;
  font-size:17px;
}
.race-toolbar{
  display:flex;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
  background:rgba(255,255,255,.72);
  border-radius:22px;
  padding:16px;
  margin-bottom:16px;
}
.race-toolbar .control{
  width:300px;
  flex:0 0 300px;
}
.race-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.race-member-card{
  display:grid;
  grid-template-columns:70px 1fr auto;
  gap:14px;
  align-items:center;
  border-radius:24px;
  padding:16px;
  background:linear-gradient(135deg,#ffffff,#f8fbff);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 14px 30px rgba(80,80,120,.08);
}
.race-member-card.completed{
  opacity:.48;
  filter:grayscale(.2);
}
.race-rank{
  width:54px;
  height:54px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#ffd400,#fff0a6);
  color:#5d4200;
  font-weight:900;
  font-size:20px;
}
.race-member-name{
  color:#8B0000;
  font-weight:900;
  font-size:17px;
  margin-bottom:8px;
}
.race-flower-pills{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.race-flower-pill{
  display:flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  background:#fff7fb;
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 6px 14px rgba(80,80,120,.06);
  color:#222;
  font-weight:800;
  font-size:13px;
}
.race-flower-pill img{
  width:28px;
  height:28px;
  object-fit:contain;
}
.race-score{
  margin-top:8px;
  color:#555;
  font-weight:800;
}
.race-score b{
  color:#5e35b1;
}
.race-actions{
  min-width:190px;
  text-align:right;
}
.race-actions .btn{
  width:auto;
  margin:4px 0 4px 6px;
}
.race-empty{
  padding:18px;
  background:white;
  border-radius:18px;
  color:#777;
  font-weight:900;
}
.race-notpicked{
  margin-top:16px;
  padding:16px;
  border-radius:22px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 12px 28px rgba(80,80,120,.08);
  color:#666;
  font-weight:800;
}
.race-notpicked-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.race-notpicked-head b{
  color:#8B0000;
  font-size:16px;
}
.race-notpicked-head span{
  padding:5px 11px;
  border-radius:999px;
  background:linear-gradient(135deg,#fff1be,#fff9de);
  color:#9a5b00;
  font-weight:900;
  white-space:nowrap;
}
.race-notpicked-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.race-notpicked-chip{
  border:none;
  border-radius:999px;
  padding:8px 12px;
  background:linear-gradient(135deg,#fff7fb,#ffffff);
  color:#8B0000;
  font-weight:900;
  box-shadow:0 6px 14px rgba(80,80,120,.08);
  cursor:pointer;
}
.race-notpicked-chip:hover{
  transform:translateY(-1px);
  background:#fff0f7;
}
.race-pick-modal{
  width:min(980px,94vw);
  max-width:94vw;
  max-height:88vh;
  overflow:auto;
  border-radius:30px;
  padding:28px;
}
.race-pick-head{
  text-align:center;
  margin-bottom:16px;
  padding:0 42px;
}

.race-pick-score-card.is-bonus{
  background:linear-gradient(135deg,#f6efff,#ffffff);
  border-color:#e2d6ff;
}
.race-pick-score-card.is-total{
  background:linear-gradient(135deg,#fff9ef,#ffffff);
  border-color:#f0ddff;
}
.race-pick-score-card.is-total b{
  color:#5e35b1;
  font-size:22px;
}
.race-pick-bonus-check{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:92px;
  padding:9px 14px;
  border-radius:999px;
  border:1px solid #e7eaf2;
  background:#fff;
  color:#444;
  font-weight:900;
  white-space:nowrap;
  box-shadow:0 6px 14px rgba(80,80,120,.06);
  cursor:pointer;
  user-select:none;
}
.race-pick-bonus-check input{
  width:16px !important;
  height:16px !important;
  margin:0;
}
.race-pick-bonus-check.is-active{
  color:white;
  border-color:transparent;
  background:linear-gradient(135deg,#7c4dff,#5e35b1);
  box-shadow:0 10px 22px rgba(94,53,177,.24);
}
.race-pick-bonus-check small{
  opacity:.85;
  font-weight:900;
}
.race-pick-bonus-badge{
  position:absolute;
  right:14px;
  top:14px;
  min-width:42px;
  height:34px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  font-weight:900;
  background:linear-gradient(135deg,#7c4dff,#5e35b1);
  box-shadow:0 8px 18px rgba(94,53,177,.22);
  z-index:3;
}
.race-pick-bonus-note{
  margin-top:4px;
  color:#5e35b1;
  font-weight:900;
  font-size:12px;
}
@media(max-width:900px){
  .race-pick-score-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .race-pick-filter-bar{
    grid-template-columns:1fr 1fr;
  }
  .race-pick-filter-bar input[type="text"]{
    grid-column:1/-1;
  }
}
@media(max-width:560px){
  .race-pick-filter-bar{
    grid-template-columns:1fr;
  }
  .race-pick-bonus-check,
  .race-pick-filter-check{
    justify-content:flex-start;
    width:100%;
  }
}

.race-pick-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:12px;
  margin-top:14px;
}
.race-pick-item{
  display:grid;
  grid-template-columns:24px 58px 1fr;
  gap:10px;
  align-items:center;
  padding:10px;
  border-radius:18px;
  background:linear-gradient(135deg,#fff7fb,#ffffff);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 8px 18px rgba(80,80,120,.08);
  cursor:pointer;
}
.race-pick-item input{
  width:18px;
  height:18px;
}
.race-pick-item img{
  width:52px;
  height:52px;
  object-fit:contain;
}
.race-pick-name{
  font-weight:900;
  color:#222;
  line-height:1.25;
}
.race-pick-point{
  color:#8B0000;
  font-weight:900;
  margin-top:3px;
}

.race-pick-item.red{background:linear-gradient(135deg,#ffe1e8,#fff7f7) !important;}
.race-pick-item.orange{background:linear-gradient(135deg,#fff0d5,#fffaf1) !important;}
.race-pick-item.purple{background:linear-gradient(135deg,#eadfff,#faf7ff) !important;}
.race-pick-item.green{background:linear-gradient(135deg,#dff3ff,#f7fcff) !important;}
.race-pick-item.white{background:linear-gradient(135deg,#dff8ec,#f8fffb) !important;}
.race-pick-count{
  color:#5e35b1;
  font-weight:900;
}
@media(max-width:900px){
  .race-status-card{
    grid-template-columns:repeat(2,1fr);
  }
  .race-member-card{
    grid-template-columns:52px 1fr;
  }
  .race-actions{
    grid-column:1/-1;
    text-align:left;
  }
}
@media(max-width:520px){
  .race-status-card{
    grid-template-columns:1fr;
  }
  .race-toolbar .control{
    width:100%;
    flex:1 1 100%;
  }
  .race-member-card{
    padding:12px;
    border-radius:18px;
  }
  .race-rank{
    width:42px;
    height:42px;
    border-radius:14px;
    font-size:16px;
  }
  .race-member-name{
    font-size:14px;
  }
  .race-flower-pill{
    font-size:11px;
    padding:6px 8px;
  }
  .race-flower-pill img{
    width:24px;
    height:24px;
  }
  .race-pick-list{
    grid-template-columns:1fr;
  }
}

  
/* =========================================================
   WEEKLY RACE V6 - History & Speed UI
   Mục tiêu: hiển thị lịch sử vòng, điểm ước tính x2, và phản hồi nhanh khi lưu.
========================================================= */
.race-history-box{
  margin-top:18px;
  padding:18px;
  border-radius:24px;
  background:rgba(255,255,255,.78);
  box-shadow:0 14px 34px rgba(80,80,120,.08);
}
.race-history-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  color:#8B0000;
  font-weight:900;
  margin-bottom:12px;
}
.race-history-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(230px,1fr));
  gap:12px;
}
.race-history-card{
  border-radius:18px;
  padding:14px;
  background:linear-gradient(135deg,#fff7fb,#ffffff);
  box-shadow:0 8px 18px rgba(80,80,120,.08);
  font-weight:900;
}
.race-history-card{
  border:0;
  text-align:left;
  cursor:pointer;
}
.race-history-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 30px rgba(80,80,120,.13);
}
.race-history-card small{
  display:block;
  margin-top:7px;
  color:#666;
  line-height:1.45;
}


/* =========================================================
   WEEKLY RACE V7 - Search, Stats & Hide Completed
   Mục tiêu: tra cứu hoa đang được đề xuất, thống kê nhanh và ẩn ACC đã hoàn thành.
========================================================= */
.race-extra-panel{
  margin-top:16px;
  padding:18px;
  border-radius:24px;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(255,255,255,.9);
  box-shadow:0 14px 34px rgba(80,80,120,.08);
}
.race-extra-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
  font-weight:900;
  color:#8B0000;
}
.race-extra-title span{
  color:#666;
  font-size:13px;
}
.race-search-row{
  display:flex;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.race-search-row .control{
  flex:1 1 280px;
}
.race-search-result{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:10px;
}
.race-search-card{
  border-radius:18px;
  padding:12px 14px;
  background:linear-gradient(135deg,#fff7fb,#ffffff);
  box-shadow:0 8px 18px rgba(80,80,120,.08);
  font-weight:900;
  color:#8B0000;
}
.race-search-card small{
  display:block;
  margin-top:5px;
  color:#666;
  line-height:1.35;
}
.race-stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
}
.race-stat-card{
  border-radius:20px;
  padding:14px;
  background:linear-gradient(135deg,#f7fbff,#ffffff);
  box-shadow:0 8px 18px rgba(80,80,120,.08);
}
.race-stat-card b{
  display:block;
  color:#4b24c9;
  font-size:22px;
  margin-top:5px;
}
.race-stat-card span{
  color:#666;
  font-size:13px;
  font-weight:900;
}
.race-top-list{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.race-top-box{
  border-radius:20px;
  padding:14px;
  background:rgba(255,255,255,.72);
  box-shadow:0 8px 18px rgba(80,80,120,.08);
}
.race-top-box h4{
  margin:0 0 10px;
  color:#8B0000;
}
.race-top-item{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:7px 0;
  border-bottom:1px dashed rgba(0,0,0,.08);
  font-weight:900;
}
.race-top-item:last-child{
  border-bottom:0;
}
.race-toggle-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  color:#8B0000;
  margin-top:8px;
}
.race-toggle-wrap input{
  width:18px;
  height:18px;
}
@media(max-width:900px){
  .race-stats-grid,
  .race-top-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:520px){
  .race-stats-grid,
  .race-top-list,
  .race-search-result{
    grid-template-columns:1fr;
  }
}



/* =========================================================
   WEEKLY RACE V1.0 - Sticky popup, realtime score & filters
   Mục tiêu: popup chọn hoa có header/footer cố định, body cuộn độc lập,
   progress realtime, khóa checkbox khi đủ 5 hoa, filter nhanh và highlight sau lưu.
========================================================= */
#racePickModal{
  align-items:center !important;
  justify-content:center !important;
}
.race-pick-modal{
  width:min(920px,94vw) !important;
  max-width:94vw !important;
  height:min(86vh,820px) !important;
  max-height:86vh !important;
  overflow:hidden !important;
  border-radius:30px !important;
  padding:0 !important;
  display:flex !important;
  flex-direction:column !important;
  background:linear-gradient(180deg,#ffffff,#fbfdff) !important;
}
.race-pick-head{
  position:sticky;
  top:0;
  z-index:5;
  text-align:left !important;
  margin:0 !important;
  padding:20px 58px 16px 22px !important;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid #edf0f6;
  box-shadow:0 10px 24px rgba(80,80,120,.08);
}
.race-pick-head h3{
  margin:0 0 12px !important;
  color:#8B0000;
  font-size:22px;
}
.race-pick-progress-wrap{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}
.race-pick-progress-bar{
  height:14px;
  border-radius:999px;
  background:#eef2f7;
  overflow:hidden;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.06);
}
.race-pick-progress-fill{
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg,#40b7c9,#7c4dff);
  transition:width .18s ease;
}
.race-pick-progress-text{
  color:#5e35b1;
  font-weight:900;
  white-space:nowrap;
}
.race-pick-score-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.race-pick-score-card{
  background:linear-gradient(135deg,#f7fbff,#ffffff);
  border:1px solid #edf2fb;
  border-radius:16px;
  padding:10px 12px;
}
.race-pick-score-card span{
  display:block;
  color:#666;
  font-weight:900;
  font-size:12px;
  margin-bottom:4px;
}
.race-pick-score-card b{
  color:#111;
  font-size:17px;
  font-weight:900;
}
.race-pick-body{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding:14px 18px 0;
}
.race-pick-filter-bar{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:minmax(150px,0.72fr) auto auto auto auto;
  gap:10px;
  align-items:center;
  margin-bottom:12px;
}
.race-pick-filter-bar input[type="text"]{
  height:42px;
  border-radius:14px;
}
.race-pick-filter-check{
  display:flex;
  align-items:center;
  gap:7px;
  background:#fff;
  border:1px solid #edf2fb;
  border-radius:999px;
  padding:9px 12px;
  color:#444;
  font-weight:900;
  white-space:nowrap;
  box-shadow:0 6px 14px rgba(80,80,120,.06);
}
.race-pick-filter-check input{
  width:16px !important;
  height:16px !important;
  margin:0;
}
.race-pick-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  align-content:start;
  gap:12px;
  margin:0 !important;
  padding:4px 4px 18px;
}
.race-pick-item{
  position:relative;
  transition:opacity .16s ease, transform .16s ease, box-shadow .16s ease;
}
.race-pick-item.is-checked{
  outline:2px solid rgba(124,77,255,.34);
  box-shadow:0 0 0 3px rgba(124,77,255,.10),0 8px 18px rgba(80,80,120,.08);
}
.race-pick-item.is-disabled{
  opacity:.42;
  filter:grayscale(.15);
  cursor:not-allowed;
}
.race-pick-item.is-disabled input{
  cursor:not-allowed;
}
.race-pick-footer{
  position:sticky;
  bottom:0;
  z-index:5;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 18px 18px;
  background:rgba(255,255,255,.96);
  border-top:1px solid #edf0f6;
  box-shadow:0 -10px 24px rgba(80,80,120,.08);
}
.race-pick-footer-left{
  color:#5e35b1;
  font-weight:900;
  line-height:1.35;
}
.race-pick-footer-left span{
  display:block;
  color:#444;
  font-size:13px;
}
.race-pick-footer-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.race-save-success{
  display:none;
  position:absolute;
  inset:0;
  z-index:20;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(6px);
  color:#137333;
  font-size:24px;
  font-weight:900;
}
.race-save-success.show{
  display:flex;
}
.race-member-card.race-just-saved{
  animation:raceSavedFlash 1s ease;
}
@keyframes raceSavedFlash{
  0%{box-shadow:0 0 0 0 rgba(255,212,0,.0); background:linear-gradient(135deg,#fff8cc,#ffffff)}
  35%{box-shadow:0 0 0 5px rgba(255,212,0,.28); background:linear-gradient(135deg,#fff4aa,#ffffff)}
  100%{box-shadow:0 14px 30px rgba(80,80,120,.08);}
}
.race-priority-no{
  display:inline-flex;
  width:22px;
  height:22px;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  margin-right:5px;
  background:rgba(124,77,255,.12);
  color:#5e35b1;
  font-weight:900;
}
@media(max-width:700px){
  .race-pick-modal{
    width:96vw !important;
    height:88vh !important;
    max-height:88vh !important;
  }
  .race-pick-head{
    padding:18px 50px 14px 16px !important;
  }
  .race-pick-score-grid{
    grid-template-columns:1fr;
  }
  .race-pick-filter-bar{
    grid-template-columns:1fr;
  }
  .race-pick-list{
    grid-template-columns:1fr;
  }
  .race-pick-footer{
    flex-direction:column;
    align-items:stretch;
  }
  .race-pick-footer-actions .btn{
    width:100%;
  }
}

/* =========================================================
   UI CLEANUP 2026.07.06 - Scroll ngoài, card thành viên, theme hội
========================================================= */
:root{
  --guild-header:#0b3d2e;
  --guild-header-dark:#06291f;
  --guild-tab:#ffd400;
}
body{background:#f3f6fb;}
.app-header{background:linear-gradient(135deg,var(--guild-header),var(--guild-header-dark));}
.tab-btn.active{background:var(--guild-tab);color:#111;}
.main{padding-top:18px;}
.box{background:white;border:1px solid rgba(0,0,0,.06);box-shadow:0 10px 28px rgba(80,80,120,.07);}
.search-box,.input-box,.wait-box,.password-box,.overview-box{background:white;}
.overview-box{border:0;box-shadow:none;padding:0;background:transparent;}
.overview-box > h3{padding:0 4px;}
.overview-cards{gap:14px;margin:14px 0;}
.overview-card,.overview-progress-box,.member-overview-box,.support-flower-box{box-shadow:0 8px 24px rgba(80,80,120,.07);border:1px solid rgba(0,0,0,.05);background:white;}
.overview-progress-box{padding:22px;border-radius:24px;}
.member-overview-box{padding:22px;border-radius:24px;}
.color-section,.result-color-section{background:transparent;border:0;padding:0;}
#resultList,#waitList{max-height:none !important;overflow:visible !important;padding-right:0 !important;scroll-behavior:auto;}
.page-result-list{padding-bottom:28px;}
/* Sticky search bar gọn hơn khi cuộn: không còn cảm giác một mảng trắng lớn đè lên danh sách */
.sticky-toolbox{
  position:sticky;
  top:132px;
  z-index:30;
  margin:0 0 22px;
  padding:14px 18px !important;
  border-radius:0 0 22px 22px !important;
  background:rgba(255,255,255,.94) !important;
  border:1px solid rgba(210,220,235,.9) !important;
  border-top:0 !important;
  box-shadow:0 12px 28px rgba(50,70,100,.10) !important;
  backdrop-filter:blur(14px);
}
.sticky-toolbox h3{
  margin:0 0 10px;
  font-size:18px;
}
.sticky-toolbox .row{
  margin-bottom:10px;
  gap:12px;
}
.sticky-toolbox .control{
  flex:1 1 210px;
  width:auto;
}
.sticky-toolbox input,
.sticky-toolbox select{
  height:42px;
  border-radius:13px;
}
.sticky-toolbox .btn{
  width:auto;
  padding:10px 15px;
  margin:4px 8px 4px 0;
  border-radius:13px;
}
.sticky-toolbox .status{
  margin-top:6px;
  font-size:14px;
  line-height:1.35;
}
.member-admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start;}
.member-admin-card{background:white;border:1px solid rgba(0,0,0,.06);border-radius:24px;padding:22px;box-shadow:0 10px 26px rgba(80,80,120,.08);}
.member-admin-card h3{margin-bottom:16px;}
.member-admin-card .control{width:100%;flex:1 1 auto;margin-bottom:13px;}
.member-admin-card .btn{width:auto;}
.member-admin-card.danger-soft{background:linear-gradient(180deg,#fff7f7,#fff);}
.member-admin-card.wide-card{grid-column:span 2;}
.theme-setting-grid{display:grid;grid-template-columns:170px 170px 1fr;gap:14px;align-items:end;}
.theme-setting-grid input[type="color"]{height:46px;padding:4px;cursor:pointer;}
.theme-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px;}
.member-admin-status{background:white;border-radius:18px;padding:14px 18px;margin-top:16px;box-shadow:0 8px 20px rgba(80,80,120,.06);}
@media(max-width:900px){
  .sticky-toolbox{top:118px;padding:12px !important;}
  .member-admin-grid{grid-template-columns:1fr;}
  .member-admin-card.wide-card{grid-column:span 1;}
  .theme-setting-grid{grid-template-columns:1fr;}
  .member-admin-card .btn,.theme-actions .btn{width:100%;}
}
@media(max-width:520px){
  .sticky-toolbox{top:112px;border-radius:0 0 18px 18px !important;}
  .sticky-toolbox h3{font-size:16px;}
  .sticky-toolbox .btn{width:100%;margin:4px 0;}
}
/* ===== VERCEL MOBILE RESPONSIVE FIX - không zoom body ===== */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-header {
    padding: 10px 12px !important;
  }

  .brand {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
  }

  .brand-title {
    font-size: 18px !important;
  }

  .brand-sub {
    font-size: 12px !important;
  }

  .tabs {
    gap: 8px !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    padding-bottom: 6px !important;
  }

  .tab-btn {
    min-width: auto !important;
    padding: 9px 13px !important;
    font-size: 13px !important;
    border-radius: 13px !important;
  }

  .main {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px !important;
  }

  .overview-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .overview-card {
    min-height: 105px !important;
    padding: 14px !important;
  }

  .overview-color-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .member-overview-list,
  .support-flower-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Quan trọng: popup chọn hoa đua tuần */
  .weekly-modal,
  .race-pick-modal,
  .modal.weekly-modal,
  .modal.race-pick-modal {
    width: 94vw !important;
    max-width: 94vw !important;
    max-height: 86vh !important;
    overflow: hidden !important;
    padding: 16px !important;
    border-radius: 22px !important;
  }

  .weekly-flower-list,
  .race-flower-list,
  .weekly-pick-list,
  .race-pick-list {
    max-height: 42vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px !important;
  }

  .weekly-flower-grid,
  .race-flower-grid,
  .weekly-pick-grid,
  .race-pick-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .weekly-flower-card,
  .race-flower-card,
  .weekly-pick-card,
  .race-pick-card {
    min-height: 58px !important;
    padding: 8px 10px !important;
    border-radius: 14px !important;
  }

  .weekly-flower-card img,
  .race-flower-card img,
  .weekly-pick-card img,
  .race-pick-card img {
    width: 42px !important;
    height: 42px !important;
  }
}

@media (max-width: 390px) {
  .overview-cards,
  .overview-color-cards,
  .member-overview-list,
  .support-flower-list,
  .grid {
    grid-template-columns: 1fr !important;
  }
}

  

/* ===== FIX FINAL - WEEKLY RACE MODAL MOBILE 2026.07.09 ===== */
@media (max-width: 768px) {
  #racePickModal {
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
  }

  #racePickModal .race-pick-modal,
  .modal.race-pick-modal {
    width: 94vw !important;
    max-width: 94vw !important;
    height: 82vh !important;
    max-height: 82vh !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #racePickModal .modal-x-btn {
    top: 12px !important;
    right: 12px !important;
    width: 34px !important;
    height: 34px !important;
    z-index: 50 !important;
  }

  .race-pick-head {
    flex: 0 0 auto !important;
    padding: 14px 48px 10px 14px !important;
    position: relative !important;
    top: auto !important;
  }

  .race-pick-head h3 {
    font-size: 18px !important;
    line-height: 1.2 !important;
    margin: 0 0 8px !important;
  }

  .race-pick-progress-wrap {
    grid-template-columns: 1fr auto !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }

  .race-pick-progress-bar {
    height: 10px !important;
  }

  .race-pick-progress-text {
    font-size: 13px !important;
  }

  .race-pick-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  .race-pick-score-card {
    padding: 7px 9px !important;
    border-radius: 13px !important;
  }

  .race-pick-score-card span {
    font-size: 10.5px !important;
    margin-bottom: 2px !important;
  }

  .race-pick-score-card b {
    font-size: 14px !important;
  }

  .race-pick-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 12px 0 !important;
  }

  .race-pick-filter-bar {
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
    margin-bottom: 8px !important;
  }

  #racePickSearch {
    grid-column: 1 / -1 !important;
    height: 38px !important;
    font-size: 13px !important;
  }

  .race-pick-bonus-check,
  .race-pick-filter-check {
    min-height: 36px !important;
    padding: 7px 8px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    justify-content: flex-start !important;
  }

  .race-pick-bonus-check input,
  .race-pick-filter-check input {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
  }

  .race-pick-list {
    flex: 1 1 auto !important;
    min-height: 180px !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: start !important;
    gap: 8px !important;
    padding: 4px 3px 12px !important;
    margin: 0 !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .race-pick-item {
    display: grid !important;
    grid-template-columns: 22px 46px 1fr !important;
    gap: 8px !important;
    align-items: center !important;
    min-height: 58px !important;
    padding: 7px 9px !important;
    border-radius: 14px !important;
  }

  .race-pick-item input {
    width: 17px !important;
    height: 17px !important;
  }

  .race-pick-item img {
    width: 42px !important;
    height: 42px !important;
  }

  .race-pick-name {
    font-size: 13px !important;
    line-height: 1.15 !important;
  }

  .race-pick-point,
  .race-pick-bonus-note {
    font-size: 12px !important;
    line-height: 1.15 !important;
  }

  .race-pick-footer {
    flex: 0 0 auto !important;
    padding: 10px 12px 12px !important;
    gap: 8px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    background: rgba(255,255,255,.97) !important;
  }

  .race-pick-footer-left {
    text-align: center !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  .race-pick-footer-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .race-pick-footer-actions .btn {
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 8px !important;
    font-size: 12.5px !important;
    border-radius: 13px !important;
  }
}

@media (max-width: 390px) {
  #racePickModal .race-pick-modal,
  .modal.race-pick-modal {
    width: 95vw !important;
    max-width: 95vw !important;
    height: 84vh !important;
    max-height: 84vh !important;
  }

  .race-pick-score-grid,
  .race-pick-filter-bar {
    grid-template-columns: 1fr !important;
  }

  .race-pick-list {
    min-height: 150px !important;
  }
}


/* WEEKLY RACE V2 — bonus theo từng hoa + dùng lại vòng trước */
.race-pick-filter-bar{
  grid-template-columns:minmax(150px,.75fr) auto auto auto !important;
}
.race-use-previous-btn{
  min-height:42px;
  border:1px solid #c9b8ff;
  border-radius:999px;
  padding:9px 14px;
  background:linear-gradient(135deg,#f7f2ff,#fff);
  color:#5d35b1;
  font-weight:900;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(80,80,120,.06);
}
.race-use-previous-btn:hover{ transform:translateY(-1px); box-shadow:0 9px 18px rgba(94,53,177,.12); }
.race-use-previous-btn:disabled{ opacity:.55; cursor:wait; transform:none; }
.race-pick-info{ min-width:0; flex:1; }
.race-item-bonus{
  display:flex;
  gap:6px;
  margin-top:7px;
}
.race-item-bonus button{
  min-width:42px;
  height:28px;
  border:1px solid #d8d0ef;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:#665a82;
  font-weight:900;
  cursor:pointer;
}
.race-item-bonus button:hover{ border-color:#8b66e8; color:#6037bd; }
.race-item-bonus button.is-active{
  border-color:#6f3bd5;
  background:linear-gradient(135deg,#7f52ef,#5e2fc2);
  color:#fff;
  box-shadow:0 5px 12px rgba(94,47,194,.22);
}
.race-pick-bonus-badge{ z-index:2; }
#racePickBonusFooter span{ margin-right:10px; }
.race-history-bonus{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:22px;
  margin-left:4px;
  padding:0 7px;
  border-radius:999px;
  background:#6f3bd5;
  color:#fff;
  font-size:12px;
}
@media(max-width:760px){
  .race-pick-filter-bar{ grid-template-columns:1fr 1fr !important; }
  .race-pick-filter-bar input[type="text"]{ grid-column:1/-1; }
  .race-use-previous-btn{ grid-column:1/-1; }
}


/* Weekly Race V2.1 — dùng lựa chọn vòng trước cho cả hội */
.race-history-card{
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid #f1edf6;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 22px rgba(73,45,110,.07);
}
.race-history-card-main{
  width:100%;
  border:0;
  padding:16px 16px 12px;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.race-history-card-main b,.race-history-card-main small{display:block;}
.race-history-card-main small{margin-top:7px;}
.race-copy-guild-btn{
  margin:0 12px 12px;
  border:1px solid #ccb9ff;
  border-radius:12px;
  padding:10px 12px;
  background:linear-gradient(135deg,#f8f3ff,#efe8ff);
  color:#6335bb;
  font-weight:800;
  cursor:pointer;
  transition:.16s ease;
}
.race-copy-guild-btn:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(99,53,187,.14);}

/* =========================================================
   WEEKLY RACE V2.2 — Lịch sử vòng + popup sao chép toàn hội
========================================================= */
.race-history-title > div{min-width:0}
.race-history-title small{display:block;margin-top:5px;color:#7b6f78;font-weight:600;font-size:13px}
.race-history-count{flex:0 0 auto;padding:7px 11px;border-radius:999px;background:#fff1f3;color:#a61427;font-size:13px;box-shadow:0 5px 13px rgba(110,38,55,.08)}
.race-history-grid{grid-template-columns:repeat(auto-fill,minmax(285px,1fr));gap:16px}
.race-history-card{position:relative;padding:0!important;border:1px solid #eee8f2!important;border-radius:22px!important;background:linear-gradient(150deg,#fff,#fff9fc)!important;box-shadow:0 12px 28px rgba(66,48,84,.09)!important;cursor:default!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.race-history-card:hover{transform:translateY(-3px);box-shadow:0 18px 38px rgba(66,48,84,.14)!important;border-color:#dcccf0!important}
.race-history-card.is-latest{border-color:#cdb8ff!important;background:linear-gradient(150deg,#fff,#faf7ff)!important}
.race-history-card-top{display:flex;gap:12px;align-items:center;padding:17px 17px 10px}
.race-history-week-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;background:linear-gradient(135deg,#f0eaff,#fff);font-size:23px;box-shadow:inset 0 0 0 1px #e6dcfb}
.race-history-week-meta{min-width:0;flex:1}.race-history-week-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.race-history-week-line b{color:#3c2634;font-size:16px}.race-history-week-meta>span{display:block;margin-top:4px;color:#806f7c;font-size:13px}
.race-latest-badge{padding:4px 8px;border-radius:999px;background:#6f3bd5;color:#fff;font-size:11px;font-weight:900}
.race-history-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 17px 12px}.race-history-stats>div{padding:10px 8px;border-radius:13px;background:#f8f7fa;text-align:center}.race-history-stats span{display:block;color:#857a83;font-size:11px}.race-history-stats b{display:block;margin-top:4px;color:#4a3342;font-size:15px}
.race-history-progress{height:7px;margin:0 17px 15px;overflow:hidden;border-radius:99px;background:#edeaf0}.race-history-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#49bad0,#7a42ed)}
.race-history-actions{display:grid;grid-template-columns:1fr 1.2fr;gap:9px;padding:0 17px 17px}.race-history-actions button{min-height:42px;border-radius:13px;font-weight:900;cursor:pointer;transition:.16s ease}.race-history-detail-btn{border:1px solid #ded7e4;background:#fff;color:#604f5d}.race-history-detail-btn:hover{background:#f7f4f8;border-color:#cfc3d7}.race-copy-guild-btn{margin:0!important;border:0!important;background:linear-gradient(135deg,#7d4de7,#5e2fc2)!important;color:#fff!important;box-shadow:0 8px 18px rgba(94,47,194,.22)!important}.race-copy-guild-btn:hover{transform:translateY(-1px);box-shadow:0 12px 23px rgba(94,47,194,.30)!important}
.race-copy-modal-layer{position:fixed;inset:0;z-index:100120;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(24,18,28,.34);backdrop-filter:blur(2px);opacity:0;visibility:hidden;transition:.18s ease}.race-copy-modal-layer.show{opacity:1;visibility:visible}
.race-copy-modal{position:relative;width:min(520px,calc(100vw - 28px));border:1px solid rgba(255,255,255,.8);border-radius:26px;padding:28px;background:#fff;box-shadow:0 26px 70px rgba(31,22,38,.25);text-align:center;transform:translateY(10px) scale(.98);transition:.2s ease}.race-copy-modal-layer.show .race-copy-modal{transform:none}
.race-copy-modal-close{position:absolute;top:13px;right:14px;width:36px;height:36px;border:0;border-radius:50%;background:#fff1f3;color:#bd4152;font-size:22px;cursor:pointer}.race-copy-modal-icon{display:grid;place-items:center;width:62px;height:62px;margin:0 auto 12px;border-radius:20px;background:linear-gradient(135deg,#eee7ff,#fff6fb);font-size:31px}.race-copy-modal h3{margin:0;color:#402d3b;font-size:23px}.race-copy-modal-subtitle{margin:8px 0 18px;color:#756873;line-height:1.5}.race-copy-benefits{display:grid;grid-template-columns:1fr 1fr;gap:10px;text-align:left}.race-copy-benefits>div{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #eee8f1;border-radius:15px;background:#fbfafc}.race-copy-benefits>div>span{font-size:21px}.race-copy-benefits p{margin:0}.race-copy-benefits b{display:block;color:#4d3948;font-size:13px}.race-copy-benefits small{display:block;margin-top:3px;color:#82747f;line-height:1.35;font-size:11px}
.race-copy-modal-status{margin-top:15px;padding:13px 15px;border-radius:15px;text-align:left;line-height:1.45}.race-copy-modal-status.ob-hidden{display:none}.race-copy-modal-status.is-loading{background:#f5f1ff;color:#6546a3}.race-copy-modal-status.is-error{background:#fff0f1;color:#a92e42}.race-copy-modal-status.is-success{display:grid;gap:4px;background:#eefaf4;color:#24724f}.race-copy-modal-status.is-success b{font-size:14px}.race-copy-modal-status.is-success span{font-size:12px}.race-copy-modal-status.is-success strong{font-size:14px}
.race-copy-modal-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:10px;margin-top:18px}.race-copy-modal-actions button{min-height:45px;border-radius:14px;font-weight:900;cursor:pointer}.race-copy-cancel-btn{border:1px solid #ddd5df;background:#fff;color:#776975}.race-copy-confirm-btn{border:0;background:linear-gradient(135deg,#7f50eb,#5e2fc2);color:#fff;box-shadow:0 10px 22px rgba(94,47,194,.24)}.race-copy-confirm-btn:disabled{opacity:.65;cursor:wait}
@media(max-width:680px){.race-history-box{padding:14px}.race-history-title{align-items:flex-start;gap:10px}.race-history-grid{grid-template-columns:1fr}.race-history-stats{gap:6px}.race-history-actions{grid-template-columns:1fr}.race-copy-benefits{grid-template-columns:1fr}.race-copy-modal{padding:25px 17px 18px;border-radius:22px}.race-copy-modal-actions{grid-template-columns:1fr}.race-copy-cancel-btn{order:2}}

/* =========================================================
   STICKY HEADER + STICKY TOOLBOX FIX 2026.08.06
   - Cố định toàn bộ header/tabs bằng wrapper thực tế.
   - Khung Tra cứu và Chờ bồi dưỡng dính ngay dưới header.
   - Chiều cao header được JS đo tự động qua --app-header-height.
========================================================= */
:root{
  --app-header-height: 136px;
  --sticky-toolbox-gap: 0px;
}

/* app-header nằm trong một root riêng; phải sticky root thay vì sticky child */
#app-header-root{
  position:sticky;
  top:0;
  z-index:1000;
  width:100%;
}

#app-header-root .app-header{
  position:relative !important;
  top:auto !important;
  z-index:auto !important;
}

/* Hai tab có danh sách dài cần giữ bộ công cụ cố định dưới thanh tab */
#tab-search .sticky-toolbox,
#tab-waiting .sticky-toolbox{
  position:sticky !important;
  top:calc(var(--app-header-height) + var(--sticky-toolbox-gap)) !important;
  z-index:900 !important;
  margin-top:0 !important;
}

/* Tránh nội dung/ảnh chạy đè lên khung cố định */
#tab-search .page-result-list,
#tab-waiting .page-result-list{
  position:relative;
  z-index:1;
}

@media(max-width:900px){
  :root{ --sticky-toolbox-gap: 0px; }
}

@media(max-width:520px){
  #tab-search .sticky-toolbox,
  #tab-waiting .sticky-toolbox{
    border-radius:0 0 18px 18px !important;
  }
}


/* GLOBAL WEBSITE BACKGROUND 1.1 — scale large source artwork to 1920px wide, desktop only */
body.hv-global-background-active{
  background-color:#f3f6fb !important;
  background-image:var(--hv-global-background-image) !important;
  background-position:center top !important;
  background-size:min(1920px, 100vw) auto !important;
  background-repeat:no-repeat !important;
  background-attachment:fixed !important;
}
@media (max-width:1399px), (pointer:coarse){
  body.hv-global-background-active{background-image:none !important;background-color:#f3f6fb !important;}
}

/* FIX: keep character faces outside the 1280px content column */
@media (min-width: 1400px){
  body.hv-global-bg-enabled{
    background-size: min(2200px, 115vw) auto !important;
    background-position: center top !important;
  }
}
