@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;700&display=swap');

body { font-family: 'Sarabun', sans-serif; background-color: #f3f4f6; }

/* Modal Styles */
.modal { display: none; position: fixed; z-index: 50; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.4);align-items: center; 
  justify-content: center;}
.modal-content-lg { background-color: #fefefe; margin: 5% auto; padding: 20px; border: 1px solid #888; width: 90%; max-width: 900px; border-radius: 0.5rem; }

/* Employee Table */
.employee-table { width: 100%; border-collapse: collapse; background: white; }
.employee-table th, .employee-table td { border: 1px solid #e5e7eb; padding: 10px; text-align: left; }
.employee-table th { background-color: #1f2937; color: white; }
.employee-table tr:hover { background-color: #f9fafb; }

/* Roster Table */
.roster-table { border-collapse: collapse; width: 100%; }
.roster-table th, .roster-table td { border: 1px solid #ddd; padding: 5px; text-align: center; height: 40px; white-space: nowrap; }
.roster-table thead th { position: sticky; top: 0; background: #f3f4f6; z-index: 10; }
.roster-cell-data { cursor: pointer; }
.workcode-N { background-color: #fef08a; color: #854d0e; }
.workcode-DF { background-color: #fee2e2; color: #991b1b; }
.workcode-ANL { background-color: #dcfce7; color: #166534; }

/* เพิ่ม class นี้เข้าไปเพื่อจัดหน้าตา Modal เล็ก (เช่น Modal ยืนยัน, Modal เพิ่มประวัติ) */
.modal-content, .confirm-modal {
    background-color: #fefefe;
    margin: 10% auto; /* เว้นระยะจากด้านบน 10% และจัดกึ่งกลางแนวนอน */
    padding: 25px;
    border: 1px solid #e5e7eb;
    width: 90%;       /* ความกว้าง 90% ของจอ */
    max-width: 500px; /* แต่ไม่เกิน 500px (ขนาดกำลังดีสำหรับฟอร์มเล็ก) */
    border-radius: 12px; /* มุมโค้ง */
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* เงา */
}

/* ปรับ input ใน Modal ให้สวยขึ้น */
.modal-content input[type="text"],
.modal-content input[type="date"],
.modal-content input[type="datetime-local"],
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-content input:focus,
.modal-content textarea:focus {
    border-color: #3b82f6; /* สีฟ้าเวลาพิมพ์ */
    ring: 2px solid #93c5fd;
}