 @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;600;700&display=swap');

 * {
   box-sizing: border-box;
 }

 body {
   font-family: 'Poppins', 'Noto Sans TC', sans-serif;
   margin: 0;
   padding: 0;
   background: #fff;
 }
.table-box{
  display: none;
}
.table-box.active{
  display: block;
}
 .custom-legend {
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   padding-bottom: 10px;
   list-style: none;
 }

 .legend-item {
   display: flex;
   align-items: center;
   cursor: pointer;
   transition: opacity 0.3s;
   margin: 0 10px;
 }

 .legend-item:hover {
   opacity: 0.7;
 }

 .legend-item.hidden {
   opacity: 0.4;
   text-decoration: line-through;
 }

 .legend-color {
   width: 12px;
   height: 12px;
   border-radius: 50%;
   margin-right: 8px;
   flex-shrink: 0;
 }

 .legend-text {
   color: #575757;
   font-size: 12px;
   font-weight: 500;
 }

 .sort {
   display: inline-block;
   margin-left: 4px;
   width: 12px;
   height: 10px;
   background-image: url(../images/sort.svg);
   background-size: cover;
 }

 .show-xs {
   display: none;
 }

 #scatterChart {
   width: 100%;
   height: 280px;
 }

 .chart-container {
   position: relative;
   width: 100%;
   padding: 0 30px;
 }

 .data-label {
   position: absolute;
   padding: 4px;
   font-size: 12px;
   font-weight: 500;
   line-height: 1.4;
   color: #575757;
   white-space: nowrap;
   pointer-events: none;
   z-index: 10;
 }

 .data-label.male {
   bottom: 5px;
   right: -12px;
 }

 .data-label.female {
  top: 5px;
   left: -16px;
 }

 .half-moon {
   display: inline-flex;
   margin-left: auto;
 }

 .half-moon .btn:nth-child(2) {
   margin-left: 8px;
 }

 .btn {
   display: inline-block;
   border-radius: 4px;
   border: solid 1px rgba(102, 0, 102, 1);
   font-size: 14px;
   letter-spacing: 0.1em;
   line-height: 1.6;
   font-weight: 400;
   color: rgba(102, 0, 102, 1);
   letter-spacing: 1px;
   padding: 0 6px;
   text-decoration: none;
   transition: all 0.3s ease;
   white-space: nowrap;
 }

 .btn.active {
   color: #fff;
   background: rgba(102, 0, 102, 1);
   border-color: rgba(102, 0, 102, 1);
 }

 .btn span {
   font-size: 60%;
 }

 .btn-select {
   display: inline-block;
   border-radius: 4px;
   border: solid 1px rgba(102, 0, 102, 1);
   font-size: 14px;
   letter-spacing: 0.1em;
   line-height: 1.6;
   font-weight: 400;
   color: rgba(102, 0, 102, 1);
   letter-spacing: 1px;
   padding: 0 6px;
   margin-left: 8px;
 }

 .gender-chart {
   display: flex;
   flex-direction: column;
   gap: 10px;
 }

 .gender-bar {
   display: flex;
   align-items: center;
   white-space: nowrap;
 }

 .gender-label {
   font-size: 18px;
   letter-spacing: 0.1em;
   line-height: 1.6;
   font-weight: 700;
   color: rgba(102, 0, 102, 1);
   letter-spacing: 0.01em;
   min-width: 120px;
 }

 .gender-label.fix {
   min-width: 150px;
 }

 .gender-label span {
   color: rgba(102, 0, 102, 1);
   font-weight: 500;
 }

 .gender-label span i {
   font-size: 70%;
 }

 .bar-wrapper {
   flex: 1;
   background: #f5f5f5;
   height: 26px;
   border-radius: 10px;
   position: relative;
   overflow: hidden;
   border: 1px solid #ddd;
 }

 .bar-fill {
   height: 100%;
   display: flex;
   align-items: center;
   justify-content: flex-end;
   padding-right: 8px;
   font-weight: bold;
   border-radius: 10px;
   transition: width 0.5s ease;
   font-size: 14px;
   font-weight: 400;
   color: #fff;
   min-width: 46px;
 }

 .bar-male {
   background: rgba(102, 0, 102, 1);
 }

 .bar-female {
   background: rgba(187, 97, 0, 0.8);
 }

 .age-num {
   color: rgba(102, 0, 102, 1);
   margin-top: 10px;
   font-size: 16px;
   letter-spacing: 0.01em;
   line-height: 1.6;
   font-weight: 500;
 }

 select {
   background: none;
   border: none;
   outline: none;
   padding: 0;
   margin: 0;
   font: inherit;
   color: inherit;
   width: 100%;
   cursor: pointer;
 }

 .style-select {
   border-radius: 4px;
   background-size: 12px;
   padding: 4px 12px;
   color: rgba(102, 0, 102, 1);
   background-color: #eee;
   font-size: 14px;
   font-weight: 500;
   width: auto;
   transition: all 0.3s ease;
 }

 .style-select:hover {
   background: #f9f9f9;
 }

 .style-select option {
   color: rgba(102, 0, 102, 1);
   background: #fff;
 }

 main {
   overflow: hidden;
   background: #fff;
   padding: 8px;
   min-height: 100vh;
   position: relative;
 }

 table {
   width: 100%;
   border-collapse: collapse;
   color: #575757;
   font-size: 12px;
   border: 1px solid #e0e0e0;
 }

 th,
 td {
   padding: 4px 6px;
   text-align: left;
   border-bottom: 1px solid #e0e0e0;
   vertical-align: middle;
 }

 th {
   background: rgba(102, 0, 102, 0.1);
   color: rgba(102, 0, 102, 1);
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 1px;
   white-space: nowrap;
 }

 tbody tr:nth-child(even) {
   background: rgba(102, 0, 102, 0.05);
 }

 tr td:nth-child(even) {
   background: rgba(102, 0, 102, 0.05);
 }

 .chart-wrapper {
   height: 276px;
 }
  .chart-wrapper.fix {
   margin-top: -20px;
 }

 .chart-title {
   color: rgba(102, 0, 102, 1);
   margin-bottom: 20px;
   font-size: 18px;
   letter-spacing: 0.1em;
   line-height: 1.6;
   font-weight: 700;
   display: flex;
   align-items: center;
 }

 .chart-title span i {
   font-size: 60%;
   font-weight: 500;
 }

 .chart-title-btn {
   display: inline-flex;
   margin-left: auto;
 }

 .chart-title-btn .btn:last-child {
   margin-left: 8px;
 }

 .card-title {
   font-size: 16px;
   letter-spacing: 0.1em;
   line-height: 1.6;
   font-weight: 700;
   color: rgba(102, 0, 102, 1);
   margin-bottom: 10px;
   letter-spacing: 1px;
   white-space: nowrap;
 }

 .card-num {
   font-size: 32px;
   font-weight: 700;
   line-height: 1;
   letter-spacing: 0.01em;
   color: rgba(102, 0, 102, 1);
   white-space: nowrap;
 }
.card-text{
  font-size: 16px;
   letter-spacing: 0.1em;
   line-height: 1.6;
   font-weight: 400;
   color: rgba(102, 0, 102, 1);
   margin-top: 10px;
   letter-spacing: 1px;
}
 .card-num span {
   font-size: 50%;
   font-weight: 500;
 }
.card-text span{
  font-size: 20px;
  font-weight: 700;
}
 .row {
   display: flex;
   margin: 0 -4px -8px -4px;
   flex-wrap: wrap;
   align-items: stretch;
   justify-content: space-around;
 }

 .col-4 {
   width: 25%;
   padding: 0 4px;
   margin-bottom: 8px;
 }

 .col-4.fix {
   text-align: center;
   padding: 0;
   max-width: 240px;
 }

 .col-3 {
   width: 33.3%;
   padding: 0 4px;
   margin-bottom: 8px;
 }

 .col-3x2 {
   width: 66.6%;
   padding: 0 4px;
   margin-bottom: 8px;
 }

 .col-6 {
   width: 14%;
   padding: 0 4px;
   margin-bottom: 8px;
 }

 .col-6.fix {
   width: 30%;
 }

 .col-6.fix-3,.col-6.fix-4 {
   width: 25%;
 }

 .col-6.fix-2 {
   width: 100%;
 }

 .card {
   background: #fff;
   padding: 20px;
   border: 1px solid #ddd;
   height: 100%;
   transition: all 0.3s ease;
 }

 .card:hover {
   border-color: #bbb;
 }

 .card.fix {
   padding: 0;
 }

 .card-item {
   display: flex;
   padding: 0;
 }

 .items {
   width: 50%;
   padding: 20px;
 }

 .card-item .items:first-child {
   border-right: 1px solid #ddd;
 }

 header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   background: rgba(102, 0, 102, 1);
   padding: 12px 30px;
   margin-bottom: 8px;
 }

 .container {
   display: flex;
   position: relative;
   z-index: 1;
 }

 .side-box {
   border: 1px solid #ddd;
   padding: 20px 30px;
   width: 220px;
   background-color: #f7f2f7;
 }

 .content {
   width: calc(100% - 220px);
   padding-left: 8px;
 }

 .header-left {
   display: inline-flex;
   align-items: center;
   white-space: nowrap;
 }

 .header-right {
   display: inline-block;
   text-align: right;
 }

 .header-title {
   font-size: 24px;
   font-weight: 600;
   letter-spacing: 0.1em;
   line-height: 1.6;
   margin-left: 40px;
   color: #fff;
 }

 .data-interval {
   font-size: 14px;
   font-weight: 300;
   letter-spacing: 0.1em;
   line-height: 1.6;
   color: #eee;
   margin-bottom: 8px;
 }

 .logo {
   height: 80px;
   width: auto;
 }

 .side-menu li {
   display: block;
 }

 .side-menu li a {
   display: block;
   color: rgba(102, 0, 102, 1);
   font-size: 18px;
   font-weight: 500;
   letter-spacing: 0.1em;
   line-height: 1.6;
   text-decoration: none;
   padding: 10px 0;
   transition: all 0.3s ease;
   opacity: 0.8;
 }

 .side-menu li a:hover {
   opacity: 1;
   padding-left: 8px;
 }

 .side-menu li a.active {
   font-weight: 700;
   padding-left: 18px;
   background-image: url(../images/dash-2.svg);
   background-repeat: no-repeat;
   background-position: center left;
   background-size: 6px auto;
   color: rgba(102, 0, 102, 1);
   opacity: 1;
 }

 .side-btn {
   display: none;
 }

 @media (max-width:1366px) {
   #scatterChart {
     height: 240px !important;
   }

   .side-btn {
     display: inline-block;
     padding: 8px;
     background-color: rgba(102, 0, 102, 1);
     position: fixed;
     top: 50%;
     right: 0;
     transform: translateY(-50%);
     z-index: 99;
     font-size: 14px;
     line-height: 1.4;
     color: #fff;
     width: 28px;
     border-radius: 4px 0 0 4px;
     text-decoration: none;
   }

   main {
     padding: 0 8px 8px 8px;
   }

   .side-box {
     height: 100%;
     position: fixed;
     top: 0;
     left: 0;
     z-index: 999;
     border: none;
     transform: translateX(-100%);
     transition: transform 0.5s;
   }

   .side-box.active {
     transform: translateX(0);
   }

   .content {
     width: 100%;
     padding-left: 0;
   }

   header {
     width: calc(100% + 16px);
     margin-left: -8px;
   }

 }

 @media (max-width:1024px) {
   .col-6.fix-2 {
     width: 100%;
   }

   .col-6.fix-3,.col-6.fix-4 {
     width: 50%;
   }

   .col-6 {
     width: 50%;
   }

   .col-6.fix {
     width: 50%;
   }

   .col-3 {
     width: 50%;
   }

   .col-3x2 {
     width: 100%;
   }

   .col-4 {
     width: 50%;
   }

   .col-4.fix {
     max-width: 320px;
   }
 }

 @media (max-width:540px) {
   .header-title {
     display: none;
   }

   header {
     padding: 12px 16px;
   }

   .card {
     padding: 8px;
   }

   .col-6.fix,
   .col-6.fix-1,.col-6.fix-4 {
     width: 100%;
   }

   .col-3 {
     width: 100%;
   }

   .col-3x2 {
     width: 100%;
   }

   .col-4 {
     width: 100%;
   }

   .col-4.fix {
     max-width: 260px;
   }

   .card-item {
     display: block;
   }

   .items {
     width: 100%;
     padding: 8px;
   }

   .card-item .items:first-child {
     border-right: none;
     border-bottom: 1px solid #ddd;
   }

   .chart-title {
     font-size: 16px;
     letter-spacing: 0.03em;
   }

   .chart-wrapper {
     height: auto;
     min-height: 240px;
   }

   .show-xs {
     display: block;
   }

    .bar-fill {
   padding-right: 4px;
   font-size: 12px;
   min-width: 36px;
 }

 }