@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root{
    --white-color: hsl(212, 84%, 49%);
    --black-color:hsla(0, 0%, 0%, 0.873);

    --body--font:"Kanit", sans-serif;
    --h1-font-size:1.75rem;
    --normal-font-size:1rem;
    --small-font-size:0.813rem;

    --font-medium:500;
}

*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    text-decoration: none;

}

body,
input,
button{
    font-size: var(--normal-font-size);
    font-family: var(--body--font);

}

.text-header{
    font-size: 1.1rem;
    font-family: var(--body--font);
    font-weight: 600;
    padding: 15px;
    line-height: 1.8;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.titleChat{
    font-size: 1.3rem;
    font-family: var(--body--font);
    font-weight: 700;
    margin: 20px 0 15px 0;
    grid-column: 1 / -1;
    color: #2c3e50;
    padding: 10px 15px;
    border-left: 5px solid #667eea;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
    border-radius: 5px;
}

.titlePire{
    font-size: 28px;
    font-family: var(--body--font);
    font-weight: var(--font-medium);
    margin-top: 10px;
}
body{
    color: var(--black-color);
    background: #f5f7fa;
    overflow-x: hidden;
}

input,
button{
    border: none;
    outline: none;
}

a{
    text-decoration: none;
}

img{
    max-width: 100%;
    height: auto;
}
.container-main{
    display:grid;
    min-height: 100vh;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 80px auto auto auto auto auto;
    grid-template-areas: 
    "nav nav nav nav"
    "main main main main"
    "content1 content1 content1 content1"
    "content2 content2 content2 content2"
    "content3 content3 content3 content3"
    "content4 content4 content4 content4"
    "footer footer footer footer";
    grid-gap: 0;
}

nav{
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    background-size: cover; 
    grid-area: nav;
    padding-top: var(--main-padding);
    height: 80px;
    width: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

label.logo{
    color:#fff;
    font-size: 35px;
    line-height: 80px;
    padding: 0 20px;
    font-weight: bold;
    float: left;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

label.logo .imglogo{
    width: 60px;
    height: 60px;
    vertical-align: middle;
}

nav ul{
    float: right;
    margin-right: 20px;
}

nav ul li{
    display: inline-block;
    line-height: 80px;
    margin: 0 5px;
}

nav ul li a{
    color: #fff;
    font-size: 17px;
    padding: 10px 18px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

a.active,a:hover{
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.checkbtn{
    font-size: 30px;
    color: #fff;
    float: right;
    line-height: 80px;
    margin-right: 40px;
    cursor: pointer;
    display: none;
}

#check{
    display: none;
}

main{
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    grid-area: main;
    padding: 30px 20px;
    min-height: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.main-content{
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
}

.main-content_data{
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    
    flex-wrap: wrap;
    justify-content: center;
}

.main-content_box_data{
  width: 150px;
  height: 110px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  text-align: center;
  font-size: 20px;
  line-height: 80px;
  border-radius: 12px;
  border: none;
  margin: 8px;
  cursor: pointer;
  align-items: center;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-content_box_data:hover{
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
} 

.icon {
    margin-left: 10px;
}
  
.content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
   
}
  
.label {
    margin-bottom: 0px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.95;
}
  
.number {
    font-size: 38px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.label, .number {
    line-height: 1.6;
}

.bottom-texts {
    display: flex;
    justify-content: center;
    margin-top: 0px;
  }

  .bottom-texts2 {
    margin-top: 0px;
  }
  
  .bottom-text {
    display: flex;
    align-items: center;
  }

  .bottom-text1 {
    display: flex;
    align-items: center;
  }

  .bottom-text2 {
   
    align-items: center;
  }
  
  .blue-line {
    width: 5px;
    height: 20px;
    background-color: #af09d8;
    margin-right: 10px;
    margin-left: 10px;
  }

  .blue-line1 {
    width: 5px;
    height: 30px;
    background-color: #09d360;
    margin-right: 10px;
    margin-left: 10px;
  }
  
  
  .bottom-text > span {
    color: #34495e;
    margin-right: 20px;
    display: block;
    font-size: 16px;
    margin-left: 10px;
    font-weight: 600;
  }

  .bottom-text1 > span {
    color: #2c3e50;
    margin-right: 20px;
    display: block;
    font-size: 18px;
    margin-left: 10px;
    font-weight: 600;
  }


 .main-content_box{
    width: 400px;
    height: 400px;
    background: none;
    color: #fff;
    text-align: center;
    font-size: 25px;
    line-height: 200px;
    border-radius: 10px;
    border: 1px solid #0082e6;
    margin: 10px;
    cursor: pointer;
} 
.main-content_box{
    display:grid;
    height: 100vh;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 0.2fr 1.5fr 1.2fr;
    grid-template-areas: 
    "mainbox1 mainbox1 mainbox2";
    grid-gap: 0.2rem;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px;
}



#sidebar{
    background: #98b4c1;
    grid-area: sidebar;
}

#content1{
    background: #ffffff;
    grid-area: content1;
    text-align: center;
    font-size: 25px;
    line-height: normal;
    border-radius: 15px;
    border: none;
    margin: 15px;
    padding: 30px 20px;
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#content1:hover{
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

#content2{
    background: #ffffff;
    grid-area: content2;
    text-align: center;
    font-size: 25px;
    line-height: normal;
    border-radius: 15px;
    border: none;
    margin: 15px;
    padding: 30px 20px;
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#content2:hover{
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.3);
}

#chartBar2 {
    height: 400px;
    width: 400px;
    max-width: 100%; /* Limit the maximum width of the canvas element */
    margin: 0 auto; /* Center the canvas element horizontally */
  }


.dataPire{
    position: absolute;
    margin-top: 150px;
    text-align: center;
    right: 300px;

    font-size: 6rem;
  }

#chartPie{
position: relative;
    margin-top: 80px;
    text-align: center;
    right: 0px;

    font-size: 6rem;
}

#chartPie2{
    position: relative;
        margin-top: 5px;
        text-align: center;
        right: 0px;
    
        font-size: 6rem;
        margin-bottom: 5px;
        width: 400px; /* กำหนดความกว้างของ Canvas */
        height: 200px; /* กำหนดความสูงของ Canvas */
    }
 

#content3{
    background: #ffffff;
    grid-area: content3;
    text-align: center;
    font-size: 25px;
    line-height: normal;
    border-radius: 15px;
    border: none;
    margin: 15px;
    padding: 30px 20px;
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#content3:hover{
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 152, 0, 0.3);
}

#content4{
    background: #ffffff;
    grid-area: content4;
    text-align: center;
    font-size: 25px;
    line-height: normal;
    border-radius: 15px;
    border: none;
    margin: 15px;
    padding: 30px 20px;
    min-height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#content4:hover{
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(156, 39, 176, 0.3);
}

footer{
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    grid-area: footer;
    padding: 20px;
    min-height: 80px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
}

#content5{
    display: none;
}
canvas {
    max-width: 100%;
    height: auto;
  }
@media(max-width:940px){
    .container-main{
        grid-template-columns: 1fr;
        grid-template-rows: 40px auto auto auto auto auto auto;
        grid-template-areas: 
         "nav"
         "main"
         "content1"
         "content2"
         "content3"
         "content4"
         "footer";
    }
    
    #sidebar{
        background:none;
        grid-area: none;
    }
    
    #content1{
        display: block;
        grid-area: content1;
    }
    
    #content2{
        display: block;
        grid-area: content2;
    }

    #content3{
        display: block;
        grid-area: content3;
    }
    
    #content4{
        display: block;
        grid-area: content4;
    }

    .text-header{
        font-size: 14px;
        line-height: 1.6;
        padding: 15px;
    }
    
    .titleChat{
        font-size: 18px !important;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    label.logo{
        color:#fff;
        font-size: 20px;
        line-height: 40px;
        padding: 0 10px;
        font-weight: bold;
        margin: 0;
        text-align: center;
        justify-content: center;
    }
    
    label.logo .imglogo{
        width: 40px;
        height: 40px;
    }
    
    nav{
        background: #04325b;
        background-size: cover; 
        grid-area: nav;
        padding-top: var(--main-padding);
        height: 40px;
        width: 100%;
    }

}

@media(max-width:952px){
    label.logo{
        font-size: 30px;
        padding: 0 20px;
    }
    
    label.logo .imglogo{
        width: 50px;
        height: 50px;
    }
    nav ul li a{
        font-size: 16px;
    }

    nav ul li{
        display: inline-block;
        line-height: 40px;
        margin: 0 5px;
    }
    
    nav ul li a{
        color: #fff;
        font-size: 14px;
        padding: 7px 13px;
        border-radius: 5px;
        text-decoration: none;
    
    }
    
    a.active,a:hover{
        background: #1b9bff;
        transition: 0.5s;
    }
    
    .checkbtn{
        font-size: 20px;
        color: #fff;
        float: right;
        line-height: 40px;
        margin-right: 40px;
        cursor: pointer;
        display: none;
    }
    
    /* Responsive for rows and columns */
    .row {
        flex-direction: column !important;
    }
    
    .col {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px;
    }
    
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    .main-content_box_data{
        width: 110px;
        height: 90px;
        background: rgba(211, 207, 207, 0.5);
        color: #2a3c88;
        text-align: center;
        font-size: 18px;
        line-height: normal;
        border-radius: 5px;
        border: 1px solid #0082e6;
        margin: 5px;
        cursor: pointer;
        align-items: center;
        box-shadow: none;
      }
      
    .main-content_box_data:hover {
        transform: none;
        box-shadow: none;
    }
    
    .main-content_box_data .number {
        color: #2a3c88;
        text-shadow: none;
    }
    
    .main-content_box_data .label {
        color: #2a3c88;
    } 

   
    .number {
        font-size: 15px;
    }

    .label{
        font-size: 15px;
    }

    .label, .number {
        line-height: 2.0; /* ปรับระยะห่างระหว่างบรรทัดให้มีความสูง 1.5 เท่าของข้อความ */
    }

    #content1{
        display: block;
        background: #f1f2f2;
        grid-area: content1;
        text-align: center;
        font-size: 16px;
        line-height: normal;
        border-radius: 5px;
        border: 1px solid #0082e6;
        margin: 10px;
        padding: 15px;
        min-height: auto;
    }
    
    #content2{
        display: block;
        background: #f1f2f2;
        grid-area: content2;
        text-align: center;
        font-size: 16px;
        line-height: normal;
        border-radius: 5px;
        border: 1px solid #0082e6;
        margin: 10px;
        padding: 15px;
        min-height: auto;
    }
    
    #content3{
        display: block;
        background: #f1f2f2;
        grid-area: content3;
        text-align: center;
        font-size: 16px;
        line-height: normal;
        border-radius: 5px;
        border: 1px solid #0082e6;
        margin: 10px;
        padding: 15px;
        min-height: auto;
    }
    
    #content4{
        display: block;
        background: #f1f2f2;
        grid-area: content4;
        text-align: center;
        font-size: 16px;
        line-height: normal;
        border-radius: 5px;
        border: 1px solid #0082e6;
        margin: 10px;
        padding: 15px;
        min-height: auto;
    }


  
    .main-content_data{
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: row;
        
        flex-wrap: wrap;
        justify-content: center;
    }
    .bottom-texts {
        display: block;
        justify-content: center;
        margin-top: 0px;
        line-height: 10px;
      }
    .bottom-text > span {
        color: #2b0fcc;
        margin-right: 20x;
        display: block;
        font-size: 12px;
        margin-left: 10px;
      }


  
    .blue-line1 {
        width: 5px;
        height: 10px;
        background-color: #09d360;
        margin-right: .2px;
        margin-left: .2px;
      }
      

    
      .bottom-text1 > span {
        color: #0f9f0a;
        margin-right: 10x;
        display: flex;
        font-size: 10px;
        margin-left: .2px;
        flex-wrap: wrap;
    
      }
   
}

@media(max-width:540px){
    .checkbtn{
        display:block;
    }
    
    label.logo{
        padding: 0 10px;
        line-height: 40px;
    }
    
    label.logo .imglogo{
        width: 35px;
        height: 35px;
    }
    
    ul{
        position: fixed;
        width: 100%;
        height: 100vh;
        background: #2c3e50;
        top:40px;
        left:-100%;
        text-align: center;
        transition: all 0.5s;
        z-index: 999;
    }
    nav ul li {
        display:block;
        margin: 50px 0px;
        line-height: 30px;
    }
    nav ul li a{
        font-size: 20px;
    }
    a:hover,a.active{
        background: none;
        color: #0082e6;
    }

    #check:checked ~ ul{
        left: 0;
    }
    
    /* Mobile-specific improvements */
    .text-header {
        font-size: 12px !important;
        line-height: 1.5;
        padding: 10px;
    }
    
    .titleChat {
        font-size: 16px !important;
        line-height: 1.3;
        padding: 10px 5px;
        word-wrap: break-word;
    }
    
    .row {
        flex-direction: column !important;
        margin: 0 !important;
    }
    
    .col {
        width: 100% !important;
        padding: 10px 5px !important;
    }
    
    .main-content_box_data {
        width: 45% !important;
        height: 85px !important;
        margin: 5px !important;
        font-size: 12px !important;
        background: rgba(211, 207, 207, 0.5) !important;
        color: #2a3c88 !important;
        border: 1px solid #0082e6 !important;
        box-shadow: none !important;
    }
    
    .main-content_box_data .number {
        font-size: 24px !important;
        font-weight: 700 !important;
        color: #2a3c88 !important;
        text-shadow: none !important;
    }
    
    .main-content_box_data .label {
        font-size: 11px !important;
        font-weight: 500 !important;
        color: #2a3c88 !important;
    }
    
    .main-content_box_data:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .main-content_data {
        justify-content: space-around !important;
    }
    
    .bottom-texts {
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.8;
    }
    
    .bottom-text {
        margin: 5px 0;
    }
    
    .bottom-text > span {
        font-size: 11px !important;
    }
    
    .bottom-texts2 {
        padding: 10px;
    }
    
    .bottom-text1 {
        margin: 10px 0;
        flex-wrap: wrap;
    }
    
    .bottom-text1 > span {
        font-size: 11px !important;
        line-height: 1.5;
    }
    
    canvas {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    #content1, #content2, #content3, #content4 {
        padding: 15px 10px !important;
        margin: 10px 5px !important;
        min-height: auto !important;
        background: #f1f2f2 !important;
        border-radius: 5px !important;
        border: 1px solid #0082e6 !important;
        box-shadow: none !important;
    }
    
    #content1:hover, #content2:hover, #content3:hover, #content4:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

