body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    height: 100%;

}
.btn-container {
    display: flex;
    gap: 15px; /* ระยะห่างระหว่างปุ่ม */
    justify-content: center; /* จัดตรงกลาง */
    flex-wrap: wrap; /* ให้ปุ่มขึ้นบรรทัดใหม่เมื่อจอเล็กลง */
}

.custom-btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
}

.btn-dashboard {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-it {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

/* เอฟเฟกต์ Hover */
.custom-btn:hover {
    transform: scale(1.05);
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);
}



.tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}
.tab-button {
    padding: 8px 16px;
    margin: 0 5px;
    border: none;
    cursor: pointer;
    background-color: #ddd;
    border-radius: 5px;
    transition: 0.3s;
}
.tab-button.active {
    background-color: #007bff;
    color: white;
}
.tab-content {
    display: none;
    padding: 10px;
}
.tab-content.active {
    display: block;
}


.container {
    width: 90%;
    margin: auto;
    padding: 20px;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

.bed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* ปรับขนาด bed-card */
    gap: 1px; /* ระยะห่างระหว่างการ์ด */
}

.bed-card {
    width: 80px; /* กำหนดขนาดคงที่ของแต่ละการ์ด */
    height: 70px; /* ปรับความสูงของการ์ด */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 8px; /* ทำให้ขอบโค้ง */
    padding: 1px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    position: relative; /* ใช้กำหนดตำแหน่งพื้นหลัง */
    overflow: hidden;
}

/* ใช้ Pseudo-element ::before เพื่อเพิ่มไอคอนเป็นพื้นหลัง */
.bed-card::before {
    content: "\f236"; /* ค่า Unicode ของไอคอน FontAwesome (fa-bed) */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 20px;
    color: rgba(0, 0, 0, 0.1); /* ทำให้จางลง */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ปรับพื้นหลังตามสถานะ */
.bed-card.ว่าง {
    background-color: #d4edda;
    color: #155724;
}

.bed-card.ไม่ว่าง {
    background-color: #f8d7da;
    color: #721c24;
}

.bed-card.กำลังทำความสะอาด {
    background-color: #fff3cd;
    color: #856404;
}

/* เปลี่ยนไอคอนตามสถานะ */
.bed-card.ว่าง::before {
    content: "\f236"; /* ไอคอนเตียงว่าง (fa-bed) */
}

.bed-card.ไม่ว่าง::before {
    content: "\f487"; /* ไอคอนผู้ป่วยบนเตียง (fa-procedures) */
}

.bed-card.กำลังทำความสะอาด::before {
    content: "\f51e"; /* ไอคอนไม้กวาด (fa-broom) */
}

.bed-occupied {
    background-color: #4CAF50;
    color: white;
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}

.bed-card:hover {
    transform: scale(1.05);
}

.bed-empty {
    background-color: #ccc;
}

.summary {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.ว่าง {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
  }

.ไม่ว่าง {
    background-color: #ffe0b2;
    border: 1px solid #ffb74d;
}

.มีผู้ป่วย {
    background-color: #f8d7da;
}

.สำรอง {
    background-color: #fff3cd;
}

.กำลังทำความสะอาด {
    background-color: #bbdefb;
    border: 1px solid #64b5f6;
}

.box {
    padding: 10px;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    width: 150px;
}

.small-box {
    min-height: 45px; /* ลดความสูงลง */
    padding: 1px; /* ลด padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.small-box .inner {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.small-box h3 {
    font-size: 16px; /* ลดขนาดตัวเลข */
    margin: 3px 0;
}

.small-box p {
    font-size: 12px; /* ลดขนาดข้อความ */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.small-box .icon {
    font-size: 24px; /* ลดขนาดไอคอน */
    position: absolute;
    right: 5px;
    top: 5px;
}


.blue { background-color: #007bff; color: white; }
.green { background-color: #28a745; color: white; }
.orange { background-color: #fd7e14; color: white; }

/* Set height of body and the document to 100% to enable "full page tabs" */
  
  /* Style tab links */
  .tablink {
    background-color: #555;
    color: white;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    font-size: 17px;
    width: 25%;
  }
  
  .tablink:hover {
    background-color: #777;
  }
  
  /* Style the tab content (and add height:100% for full page content) */
  .tabcontent {
    color: white;
    display: none;
    padding: 100px 20px;
    height: 100%;
  }
  
  #Home {background-color: red;}
  #News {background-color: green;}
  #Contact {background-color: blue;}
  #About {background-color: orange;}

