html {
  background-color: #f5f2f9;
}

.container {
  animation-name: 'fade-in';
  animation-fill-mode: both;
  animation-duration: .5s;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

html.admin-container {
  /* background: url('../image/pexels-photo-442574.jpeg') no-repeat center center fixed; */
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-color:#f0f0f0;
}

.is-csc {
  background-color: #353678;
}

.btn-icon-control {
  width: 100%;
  cursor: pointer;
}

.span-circle-success {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #48c774;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #48c774;
  z-index: 2;
}

.span-circle-danger {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #f14668;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #f14668;
  z-index: 2;
}

.custom-table {
  width: 100%;
  box-shadow: 0 0 3px #ccc;
}

.custom-table thead th,
.custom-table tbody td {
  line-height: 20px;
  padding: 0.3em 0.9em;
  text-align: center;
  border: 1px solid #ddd;
}

/* img box center flex */
.box-content-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.box-img {
  border: 4px solid #fff;
}

.box-img-danger {
  border: 4px solid #fd6a6a;
}

.box-img-warning {
  border: 4px solid #a13bc6;
}

.box-img-label-danger {
  width: 120px;
  top: 139px;
  border-radius: 8px;
  border: 4px solid #fd6a6a;
  position: absolute;
  background: #fd6a6a;
  color: #fff;
  box-shadow: 0 0 2px #ccc;
}

.box-img-label-warning {
  width: 120px;
  top: 139px;
  border-radius: 8px;
  border: 4px solid #a13bc6;
  position: absolute;
  background: #a13bc6;
  color: #fff;
  box-shadow: 0 0 2px #ccc;
}

.box-img-label {
  width: 120px;
  border-radius: 8px;
  border: 4px solid #fff;
  position: absolute;
  background: #fff;
  box-shadow: 0 0 2px #ccc;
}

.text-purple {
  color: #d35aff !important;
}

.box-gray-shadow {
  padding: 1em;
  font-size: 1em;
  background-color: #f2f2f2;
  border-radius: 6px;
  box-shadow: 0 0 3px #ccc;
}

.box-att-summary {
  border-radius: 1em;
  padding: 10px 20px;
  min-width: 150px;
}

/* สไตล์สำหรับกล่องหลัก */
.custom-fieldset {
  border: 2px solid #dbdbdb;
  border-radius: 12px;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  position: relative;
  margin-top: 2rem;
  background-color: white;
}

/* สไตล์สำหรับหัวข้อที่หย่อนลงมากลางเส้น */
.custom-fieldset-title {
  position: absolute;
  top: -15px;
  left: 20px;
  background-color: white;
  padding: 0 15px;
  font-weight: bold;
  color: #4a4a4a;
}

.skeleton-load-img {
  background: linear-gradient(90deg,
        #f0f0f0 0%,
        #dfdfdf 50%,
        #f0f0f0 100%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.table-holder {
  max-height: 500px;
  /* กำหนดความสูงที่ต้องการให้เริ่ม Scroll */
  overflow-y: auto;
  /* ให้เลื่อนขึ้นลงได้ภายใน div นี้ */
}

.table-holder thead th {
  position: sticky;
  top: 0;
  /* คราวนี้ top: 0 จะหมายถึงบนสุดของ .table-holder */
  background-color: white;
  z-index: 5;
}

/* css absent list history */
/* Container หลักของแต่ละรายการ */
.log-item {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #eef0f2;
  border-radius: 6px;
  padding: 6px 10px;
  height: 100%;
}

/* วันที่ด้านซ้าย */
.log-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  border-right: 2px solid #f0f0f0;
  margin-right: 12px;
  line-height: 1.1;
}

.log-date .d {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
}

.log-date .m {
  font-size: 0.7rem;
  color: #666;
  font-weight: 600;
}

.log-date .y {
  font-size: 0.65rem;
  color: #aaa;
}

/* รายละเอียดด้านขวา */
.log-details {
  flex-grow: 1;
  overflow: hidden;
  /* กันเนื้อหาล้น */
}

.log-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

/* คาบเรียน (Tag เล็กๆ) */
.period-tag {
  background: #f1f3f5;
  color: #495057;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ประเภทการลา */
.leave-type {
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
}

/* เหตุผลการลา */
.log-reason {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* ตัดคำถ้าประโยคยาวเกินไป */
}

/* เอฟเฟกต์เบาๆ เวลาเอาเมาส์วาง */
.log-item:hover {
  border-color: #dbdbdb;
  background-color: #fafafa;
}

.menu-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
}

.menu-list a:hover {
  background: #f5f5f5;
}

.menu-list li ul {
  margin-top: 2px;
  border-left: 2px solid #e5e7eb;
  padding-left: 0;
  margin-left: 16px;
}

.menu-list li ul li a {
  padding: 10px 14px;
  cursor: default;
}

.menu-list li ul li a:hover {
  background: transparent;
}

.stat-right {
  text-align: right;
}

.stat-num {
  font-size: 24px;
  font-weight: 500;
  color: #111;
  line-height: 1;
}

.stat-unit {
  font-size: 11px;
  color: #9ca3af;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  flex-shrink: 0;
}

.chevron {
  font-size: 13px;
  color: #9ca3af;
  transition: transform .2s;
  margin-left: 8px;
}

.is-open .chevron {
  transform: rotate(90deg);
}

.left-group {
  display: flex;
  align-items: center;
}

.sub-list {
  display: none;
}

.sub-list.is-active {
  display: block;
}

.day-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.day-num {
  font-size: 22px;
  font-weight: 500;
  color: #111;
  line-height: 1;
  min-width: 28px;
  text-align: center;
}

.day-meta {
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.4;
}

.day-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.day-note {
  font-size: 12px;
  color: #9ca3af;
}