/* Import Google Font - Kanit */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@200;300;400;500;600&display=swap');

body {
    background-color: #f8f9fa;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.page-title,
.card-title,
.form-label,
.btn {
    font-family: 'Kanit', sans-serif;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 40px auto;
}

.page-title {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4D55CC;
    font-weight: 500;
}

.form-label {
    font-weight: 500;
    color: #4D2DB7 !important;
}

.form-control, .form-select {
    border: 1px solid #ddd;
    padding: 10px;
}

.form-control:focus, .form-select:focus {
    border-color: #4D55CC;
    box-shadow: 0 0 0 0.2rem rgba(52,152,219,0.25);
}

.btn-submit {
    background: #4D2DB7;
    border: none;
    padding: 12px 30px;
    font-weight: 500;
    width: 100%;
    margin-top: 20px;
}

.btn-submit:hover {
    background: #2980b9;
}

.header-logo {
    text-align: center;
    margin-bottom: 20px;
}

.header-logo img {
    max-height: 80px;
    max-width: 100%;
    height: auto;
}

/* Table Styles */
.table th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
}

.table td {
    vertical-align: middle;
}

.table-responsive {
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* View All Page Specific */
.container.view-all {
    max-width: 1200px;
}

.table-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    margin: 40px auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #4D55CC;
}

.login-form {
    max-width: 340px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.login-form .header-logo img {
    max-height: 100px;
    margin-bottom: 1rem;
}

.login-form .form-control {
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
}

.login-form .btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.page-header h2 {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    color: #4D2DB7 !important;
}

/* Card Styles */
.card-title {
    font-weight: 500;
    color: #4D2DB7 !important;
}

/* การ์ดกลุ่มสาระหน้าหลัก — สอดคล้อง sendwijai/index.php */
.dept-card {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #4D2DB7 !important;
}
.dept-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

.dept-card .card-body,
.dept-card .card-title,
.dept-card .h2,
.dept-card small,
.dept-card .dept-link,
.dept-card .dept-icon {
    color: #4D2DB7 !important;
}

.dept-card .text-muted {
    color: rgba(77, 45, 183, 0.85) !important;
}

.dept-card .dept-link:hover {
    color: #4D2DB7 !important;
    opacity: 0.95;
    text-decoration: underline !important;
}

.dept-card .dept-icon {
    opacity: 0.95;
}

.dept-card .dept-na-notice {
    color: #dc3545 !important;
}

.dept-card .progress {
    background-color: rgba(157, 68, 192, 0.12);
}

.dept-card .dept-progress-bar {
    background-color: var(--progress-color, #9D44C0) !important;
}

/* กัน rule อื่นทับสีแถบตามเกณฑ์ (เช่น .progress-bar ท้ายไฟล์) */
.dept-card .progress-bar {
    background-color: var(--progress-color, #9D44C0) !important;
    background-image: none;
}

.btn-primary {
    background-color: #4D2DB7;
    border-color: #4D2DB7;
}

.btn-primary:hover {
    background-color: #8b3dcc;
    border-color: #8b3dcc;
}

.btn-outline-primary {
    color: #4D2DB7;
    border-color: #4D2DB7;
}

.btn-outline-primary:hover {
    background-color: #4D2DB7;
    border-color: #4D2DB7;
    color: white;
}

.page-link {
    color: #4D2DB7;
}

.page-item.active .page-link {
    background-color: #4D2DB7;
    border-color: #4D2DB7;
}

.text-primary {
    color: #4D2DB7 !important;
}

.bg-primary {
    background-color: #4D2DB7 !important;
}

.border-primary {
    border-color: #4D2DB7 !important;
}

/* Link color */
a {
    color: #4D2DB7;
}

a:hover {
    color: #8b3dcc;
}

/* DataTables pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #4D2DB7 !important;
    color: white !important;
    border-color: #4D2DB7 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #8b3dcc !important;
    color: white !important;
    border-color: #8b3dcc !important;
}
