th {
    text-align: center;
    font-size: 1.5rem;
}

.row {
    padding-right: 25px; /* Note: This might affect layout, consider Bootstrap grid system if possible */
}

.bgblue {
    /* background: #d8f1f3; */ /* Original light blue */
    background: #d7e9eb; /* Slightly muted light blue */
}

.form-contact {
    width: auto;
    text-align: center;
}

div.form-content {
    width: auto;
    /* color: #000000; */
    color: var(--bs-body, #333); /* Use body text color */
    /* background-color: #fff; */
    background-color: var(--bs-white, #fff); /* Use white variable */
    padding-top: 20px;
    padding-left: 30px;
    padding-bottom: 15px;
    padding-right: 15px;
    line-height: 1.15em;
    word-wrap: break-word;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    text-align: center;
    margin: 0 auto;
}

.form-contain {
    width: auto;
}

.fm-select {
    width: 250px;
}

ul.wrapper {
    position: relative;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    text-align: center;
}

ul.wrapper > li.item {
    position: relative;
    margin: 10px 5px;
    padding: 1px;
    display: -moz-inline-stack;
    display: inline-block;
    vertical-align: top;
}

.h-40 {
    height: 40px;
}

.h-content {
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 3rem;
    margin: 8px;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    outline: none;
    color: #fff; /* Keep text white for contrast */
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px #999;
}

/* --- Muted Button Colors --- */
.green {
    /* background-color: #4CAF50; */
    background-color: #77a079; /* Muted Green */
}

.green:hover {
    /* background-color: #3e8e41; */
    background-color: #5e8560; /* Darker Muted Green */
}

.green:active {
    /* background-color: #3e8e41; */
    background-color: #5e8560;
    box-shadow: 0 5px #666;
    transform: translateY(4px);
}

.yellow {
    /* background-color: #deb316; */
    background-color: #c7b461; /* Muted Yellow */
    color: #333; /* Darker text for better contrast */
}

.yellow:hover {
    /* background-color: #f5ac08; */
    background-color: #d4c17a; /* Lighter Muted Yellow */
    color: #333;
}

.yellow:active {
    /* background-color: #de8e16; */
    background-color: #b59d4a; /* Darker Muted Yellow */
    color: #333;
    box-shadow: 0 5px #666;
    transform: translateY(4px);
}

.red {
    /* background-color: #ca0c26; */
    background-color: #b36b75; /* Muted Red */
}

.red:hover {
    /* background-color: #a20d21; */
    background-color: #9c545f; /* Darker Muted Red */
}

.red:active {
    /* background-color: #a20d21; */
    background-color: #9c545f;
    box-shadow: 0 5px #666;
    transform: translateY(4px);
}

.f-red {
    /* color: red; */
    color: #b36b75; /* Muted Red */
    font-weight: bold;
    font-size: +1.5rem; /* Note: This is not standard CSS, maybe meant 1.5rem or calc(1em + 0.5rem)? Keeping as is. */
}


.login {
    /* background: white; */
    background: var(--bs-white, #fff);
    width: 500px;
    margin: 0 auto;
    padding-top: 30px;
    padding-bottom: 30px;
}

fmtext { /* Note: 'fmtext' is not a standard HTML tag */
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.imgcontainer {
    text-align: center;
    margin: 24px 0 12px 0;
}

img.avatar {
    width: 40%;
    border-radius: 50%;
    /* Apply filter to avatar if needed */
    /* filter: saturate(60%) brightness(90%); */
}

.fmtext { /* Duplicate selector, assuming it's for input fields */
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 1.5rem;
}

.container {
    width: 500px; /* Consider using max-width for responsiveness */
    padding: 16px;
}

label {
    font-size: 2rem;
}

@media screen and (max-width: 499px) {
    .login {
        display: block;
        width: 300px;
    }

    .container {
        width: 300px;
    }
}

textarea {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    font-size: 1.8rem;
    max-width: 100%;
    /* float: left; Removed float, handle layout with flex/grid if needed */
    width: 100%;
    min-height: 95px;
    outline: none;
    resize: none;
    border: 1px solid grey;
    padding: 10px;
    line-height: 1.8rem;
    margin: 10px 0; /* Adjusted margin */
}

#calendar {
    max-width: 700px;
    margin: 0 auto;
    font-size: 13px;
}

/* Font styles - Assuming THSarabunNew provides desired look */
.f-style1 {
    font-family: 'THSarabunNew', sans-serif;
    font-size: 0.5em; /* Very small */
    line-height: 1.5rem;
}

.f-style2 {
    font-family: 'THSarabunNew', sans-serif;
    font-size: 1.6em;
    line-height: 1.8rem;
}

.f-style3 {
    font-family: 'THSarabunNew', sans-serif;
    font-size: 1.5em;
    line-height: 1.8rem;
}

.f-style4 {
    font-family: 'THSarabunNew', sans-serif;
    font-size: 1.5em;
    line-height: 1.8rem;
    /* color: red; */
    color: #b36b75; /* Muted Red */
}

.f-style5 {
    font-family: 'THSarabunNew', sans-serif;
    font-size: 1.4rem;
    line-height: 1.5rem;
    color: #999; /* Keeping gray */
}

.f-style6 {
    font-family: 'THSarabunNew', sans-serif;
    font-size: medium;
    line-height: 1.5rem;
}

ul.wrapper2 {
    position: relative;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    text-align: center;
}

ul.wrapper2 > li.item {
    position: relative;
    margin: 10px 5px;
    padding: 1px;
    vertical-align: top;
}

/* --- Muted FontAwesome Icon Colors --- */
.fa-map-marker:before {
    /* color: red; */
    color: #b36b75; /* Muted Red */
    font-size: 3rem;
}

.fa-phone:before {
    /* color: green; */
    color: #77a079; /* Muted Green */
    font-size: 3rem;
}

.fa-fax:before {
    /* color: brown; */
    color: #967d69; /* Muted Brown */
    font-size: 3rem;
}

.fa-envelope:before {
    /* color: orange; */
    color: #d1a377; /* Muted Orange */
    font-size: 3rem;
}

.fa-facebook-square:before {
    /* color: blue; */
    color: var(--bs-primary, #5a7a9c); /* Muted Blue from variable */
    font-size: 3rem;
}

.w-40 {
    width: 40px;
}

.contact-fm {
    border: 2px solid #eae9e9;
    padding: 10px;
}

ul.wrapper > li.item2 {
    position: relative;
    margin: 10px 5px;
    padding: 1px;
    display: -moz-inline-stack;
    display: inline-block;
    vertical-align: top;
    width: 35%;
}

@media screen and (max-width: 699px) {
    ul.wrapper > li.item2 {
        position: relative;
        margin: 10px 5px;
        padding: 20px;
        display: -moz-inline-stack;
        display: inline-block;
        vertical-align: top;
        width: 100%;
    }
}

ul.listitem > li.item3 {
    position: relative;
    margin: 10px 5px;
    padding: 1px;
    vertical-align: top;
    line-height: 2.5rem;
    text-align: left;
    font-size: 1.5rem;
    font-weight: bold;
}

.h-30 {
    height: 30px;
}

/* --- Muted Nav Button --- */
.navbutton {
    /* Original Green Gradient */
    /* background: linear-gradient(to bottom, #89c403 5%, #77a809 100%); */
    /* border: 1px solid #74b807; */
    /* text-shadow: 0px 1px 0px #528009; */
    /* box-shadow: inset 0px 1px 0px 0px #a4e271; */

    /* Muted Green Gradient */
    background: linear-gradient(to bottom, #8dbf8e 5%, #6a9c6c 100%);
    border: 1px solid #619163;
    text-shadow: 0px 1px 0px #4d7a4f;
    box-shadow: inset 0px 1px 0px 0px #b5d4b6;
    background-color: #8dbf8e; /* Fallback */

    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border-radius: 6px;
    display: inline-block;
    cursor: pointer;
    color: #ffffff;
    font-family: Arial;
    font-size: 15px;
    padding: 6px 24px;
    text-decoration: none;
}

.navbutton:hover {
    /* Original Hover */
    /* background: linear-gradient(to bottom, #77a809 5%, #89c403 100%); */
    /* background-color: #77a809; */

    /* Muted Hover */
    background: linear-gradient(to bottom, #6a9c6c 5%, #8dbf8e 100%);
    background-color: #6a9c6c;
}

.navbutton:active {
    position: relative;
    top: 1px;
}

.mytbborder {
    border: 1px solid #ddd;
}

.mytbth {
    border: 1px solid #ddd;
    /* background: #009688; */
    background: #649993; /* Muted Teal */
    color: white;
}

.mytbtd {
    border: 1px solid #ddd;
    font-size: 15px;
    font-weight: bold;
}

.navleft {
    text-align: left; /* Changed from position */
}

.navright {
    text-align: right; /* Changed from position */
}

/* --- Muted td Color Classes --- */
.tdcolor, .tdcolor1 {
    /* background-color: #F44336; */
    background-color: #c47973; /* Muted Red */
    color: white;
    font-size: 1.3rem; /* Adjusted tdcolor font-size */
    padding: 4px;
}
.tdcolor{
    font-size: 1.8rem; /* Kept original for tdcolor */
}


.tdcolor2 {
    /* background-color: #E91E63; */
    background-color: #c78ca3; /* Muted Pink */
    color: white;
    font-size: 1.3rem;
    padding: 4px;
}

.tdcolor3 {
    /* background-color: #FF9800; */
    background-color: #d1a377; /* Muted Orange */
    color: white;
    font-size: 1.3rem;
    padding: 4px;
}

.tdcolor4 {
    /* background-color: #4CAF50; */
    background-color: #77a079; /* Muted Green */
    color: white;
    font-size: 1.3rem;
    padding: 4px;
}

/* --- Muted Calendar Header Colors --- */
.mytbthsun {
    border: 1px solid #ddd;
    /* background: #d21313; */
    background: #c47973; /* Muted Red */
    color: white;
    font-size: 1.7rem;
}

.mytbthmon {
    border: 1px solid #ddd;
    /* background: #FFC107; */
    background: #d1c8a1; /* Muted Yellow */
    color: #333; /* Dark text */
    font-size: 1.7rem;
}

.mytbthtue {
    border: 1px solid #ddd;
    /* background: pink; */
    background: #d1aeb5; /* Muted Pink */
    color: #333; /* Dark text */
    font-size: 1.7rem;
}

.mytbthwed {
    border: 1px solid #ddd;
    /* background: green; */
    background: #77a079; /* Muted Green */
    color: white;
    font-size: 1.7rem;
}

.mytbththr {
    border: 1px solid #ddd;
    /* background: #FF5722; */
    background: #d1a377; /* Muted Orange */
    color: white;
    font-size: 1.7rem;
}

.mytbthfri {
    border: 1px solid #ddd;
    /* background: #00BCD4; */
    background: #77b1b9; /* Muted Cyan */
    color: white;
    font-size: 1.7rem;
}

.mytbthsat {
    border: 1px solid #ddd;
    /* background: #673AB7; */
    background: #9b8abf; /* Muted Purple */
    color: white;
    font-size: 1.7rem;
}

.popup {
    position: relative;
    display: inline-block;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* The actual popup */
.popup .popuptext {
    visibility: hidden;
    width: 160px;
    background-color: #555; /* Keep dark gray */
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -80px;
}

/* Popup arrow */
.popup .popuptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent; /* Keep dark gray */
}

/* Toggle this class - hide and show the popup */
.popup .show {
    visibility: visible;
    -webkit-animation: fadeIn 1s;
    animation: fadeIn 1s;
}

/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pointer {
    cursor: pointer;
}

.daystr {
    font-size: 2.5rem;
}

.strcolor {
    /* color: red; */
    color: #b36b75; /* Muted Red */
}

/* --- Muted Navbar Link Colors --- */
.navbar-default .navbar-nav > li > a {
    /* color: #101010; */
    color: var(--bs-body, #333); /* Use body text color */
}

.navbar-default .navbar-nav > li > a:hover {
    /* color: #2196F3; */
    color: var(--bs-primary, #5a7a9c); /* Use primary muted color */
}

.navbar-default .navbar-nav > li > a:focus {
    /* color: #00BCD4; */
    color: #77b1b9; /* Muted Cyan */
}

.navbar-default .navbar-nav > li > a:active {
    /* color: #3F51B5; */
    color: #7581b5; /* Muted Indigo */
}

/* --- Muted Calendar Day Backgrounds --- */
.todaytd {
    /* background: #795548; */
    background: #967d69; /* Muted Brown */
    color: #fff; /* Ensure text is readable */
}

.holidaytd {
    /* background: #CDDC39; */
    background: #b8bf74; /* Muted Lime */
    color: #333; /* Ensure text is readable */
}
