:root {
    --primary-color: #3f51b5;
    --secondary-color: #76838f;
    --border-color: #e4eaec;
    --background-light: #f8f9fa;
    --text-color: #495057;
    --danger-color: #dc3545;
    --success-color: #28a745;
}

/*
* Start CSS validation
*/

label.error {
    color: red;
    margin-bottom: 0px;
}

div.error {
    color: red;
}

/*
* New Style Profile
*/
.page-profile .card-block {
    padding: 40px 15px;
    background-color: #fff;
}

.page-profile .card .avatar {
    width: 130px;
    margin-bottom: 10px;
}

.page-profile .avatar img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 0 none;
    border-radius: 5%;
}

.page-profile table tr td.font-bold {
    font-weight: bold !important;
}

/*
* New Style Profile-v2
*/
.page-profile-v2 .user-release-actions button {
    margin: 10px;
}


/*
* New Style form-group
*/
.form-group.reset-margin-bottom-0 {
    margin-bottom: 0 !important;
}

span.glyphicon-remove {
    line-height: 35px;
    margin-left: 60px;
    position: absolute;
}

/*
* New Style Form Validation
*/
span.required {
    color: red;
}


/*
* New Style DataTable
*/
table .tool a {
    margin-left: 5px;
}

button.disabled i {
    color: white;
}

button.disabled,
a.disabled {
    cursor: default;
}


table.dataTable thead tr th {
    vertical-align: middle;
}

.table thead th {
    vertical-align: middle;
}

/*
* New Style toolWidgets HelperService
*/
a.card-table {
    text-decoration: none;
}


/*
* New Style computer-map (moduel room)
*/
.computer-map {
    display: inline-block;
}

.computer-map a {
    border: 1px solid #ccc;
    padding: 10px;
    display: inline-block;
    width: 220px;
}

.computer-map a:hover {
    border: 1px solid #ff4c52;
}

.computer-map .computer-map-icon {
    float: left;
}

.computer-map .computer-map-detail {
    float: right;
    margin-left: 20px;
    width: 60%;
}

.boxexam {
    display: inline-block;
}

.listexam {
    float: left;
    margin-right: 20px;
}

.listexam input[type=number] {
    width: 100px;
    text-align: center;
}

.computer-map .box-series {
    border: 1px solid #ccc;
    margin-bottom: 18px;
    padding: 10px;
    height: 60px;
    width: 220px;
}

.computer-map .box-series-monitor {
    border: 1px solid #ccc;
    margin-bottom: 18px;
    padding: 10px;
    height: 130px;
    width: 220px;
}

/*
* New Style Other
*/
img.img-profile{
    border: 2px solid #adc7cd;
    width: 30px;
    height: 30px;
}

.cursor-default {
    cursor: default !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

.modal-open .modal {
    z-index: 9999 !important;
}

.modal-backdrop{
    z-index: 9998 !important;
}

.modal-open .select2-container--open {
    z-index: 10000 !important;
}

.modal-body-res-detail {
    max-height: 90vh;
    overflow-y: auto;
}

.select2-container--default .select2-selection--single {
    text-align: left !important;
}

i.font-3rem {
    font-size: 3rem;
}

i.font-25px {
    font-size: 25px;
}

i.color.fa-file-pdf-o {
    color: #ee1212;
}

.font-weight-bold {
    font-weight: 600 !important;
}

.text-bold {
    font-weight: bold;
}

.text-bold-500 {
    font-weight: 500;
}

.note-info {
    cursor: pointer;
}


.page-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 20px;
}


table.row-col-span thead th {
    border: 1px solid #e4eaec;
    vertical-align: middle;
    border-top: 1px solid #e4eaec !important;
}

.col-checkbox {
    margin-left: 15px;
}

.badge-red {
    color: #ffffff;
    background-color: #f44336;
}

.btn-width-170 {
    width: 170px;
}

a.fancybox-gallery.tools img {
    height: 250px;
    max-width: 350px;
}

/* a.toolMinio button {
    height: 36px;
    padding: 5px 11px;
}

a.toolMinio button i {
    font-size: 1rem;
} */

/* search-knowledge */
.search-knowledge .btn-group .btn.active {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
    /* ขอบรอบปุ่ม */
    transform: scale(1.05);
    /* ขยายเล็กน้อย */
    outline: none;
}

#jqcloud.cloudtag span {
    cursor: pointer;
}

/* manageTimeOpenRegister */
a.changeDataOpenRegister {
    width: 165px;
}

.bg-color-sat-sun {
    background: #fffcf2 !important;
}

.box-icon-width50 {
    width: 51px !important;
}

.form-control-left {
    padding-top: 7px;
    margin-bottom: 1;
    text-align: left;
}

.form-control-left-h {
    padding-top: 5px;
    margin-bottom: 1;
    text-align: left;
}

.inline-top {
    align-items: stretch !important;
}

.tab1 {
    background-color: #f0f0f0 !important;
    color: #000000;
    font-weight: 5000 !important;
}

.input-group .form-control.money {
    z-index: 1;
}

/*New buttons */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none;
    color: #066BF6;
}

/*END New buttons */


/*
*
* ==========================================
* CUSTOM UTIL CLASSES
* ==========================================
*
*/
.table-fixed tbody {
    height: 300px;
    overflow-y: auto;
    width: 100%;
}

.table-fixed thead,
.table-fixed tbody,
.table-fixed tr,
.table-fixed td,
.table-fixed th {
    display: block;
}

.table-fixed tbody td,
.table-fixed tbody th,
.table-fixed thead>tr>th {
    float: left;
    position: relative;

    &::after {
        content: '';
        clear: both;
        display: block;
    }
}

/*END*/

a:hover {
    text-decoration: none;
}

.helptext {
    color: #396;
    font-size: 12px;
    margin-top: 5px;
}

span.font-green,
div.font-green {
    color: #006621 !important;
}

span.font-blue,
div.font-blue {
    color: #1A0DAB !important;
}

span.font-red,
div.font-red {
    color: #EC6D39 !important;
}

span.font-black,
div.font-black {
    color: black !important;
}

span.text-small,
div.text-small {
    font-size: 12px;
    color: #1A0DAB;
}

span.icon-report-tb {
    font-size: 20px;
    color: #2780e3;
}

.tab1 {
    font-weight: bold;
    color: #008040;
}

.tab2 {
    font-weight: bold;
    color: #913702;
}

.tab3 {
    font-weight: bold;
    color: #6F006F;
}

/************* tableinput ************/
div.tableinput {
    width: 100%;
    background-color: #FFFAF0;
    border-width: 1px;
    border-color: #f6dfdf;
    border-style: dashed;
    text-align: left !important;
    padding: 5px;
    padding-top: 15px;
    padding-bottom: 15px;
}

div.tableinput .row {
    padding-bottom: 5px;
    width: 101%;
}

/***************************************/

thead.bg-blue-200 th, thead.bg-blue-300 th {
    color: #FFFFFF !important;
    vertical-align: top;
}

table thead tr th {
    text-align: center;
}

.requires {
    font-size: 14px;
    padding-left: 5px;
    color: #FF0000;
}

.ck-editor__editable {
    min-height: 200px;
}

.money {
    text-align: right;
}

.unset-cursor {
    cursor: default;
}

.font-weight-bold.bold {
    font-weight: bold !important;
}

i.font-16 {
    font-size: 16px;
}

/* from */
.btn-w-100 {
    width: 100px;
}

.wpx-350 {
    width: 350px;
}

/* end form*/

/* Data Table */
.table-sum > td {
    background-color: #cceccd !important;
}

div.header-table-button {
    text-align: right;
    margin-bottom: 20px;
}

div.header-table-button.box-select {
    text-align: left !important;
}

table.table-datatable thead {
    background-color: #53adf6 !important;
    color: #fff;
}

table.table-datatable thead th {
    color: #fff;
    font-weight: 500;
}

table.table-datatable a {
    text-decoration: none;
}

div.dt-container div.dt-search input {
    margin-left: 0.5em;
    display: inline-block;
    width: auto;
}

div.dt-container div.dt-search label {
    font-weight: normal;
    white-space: nowrap;
    text-align: left;
    margin-bottom: 0;
}

.dt-length {
    line-height: 0;
}

.dt-length .dt-input {
    display: block;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.dt-search {
    text-align: right;
}

.dt-search .dt-input {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.dt-search .dt-input:focus,
.dt-search select.dt-input:focus,
.dt-length select:focus {
    outline: none;
}

div.dt-container div.dt-paging {
    margin: 0;
}

div.dt-container div.dt-paging nav {
    text-align: right;
}

div.dt-container div.dt-paging button {
    border: 1px solid #dee2e6;
    background-color: #fff;
    padding: 0.5rem 0.78rem;
    cursor: pointer;
}

div.dt-container div.dt-paging button:focus {
    outline: none;
}

div.dt-container div.dt-paging button.current {
    z-index: 3;
    color: #fff;
    background-color: #2196f3;
    border-color: #2196f3;
}

table.table-datatable .checkbox-default input[type="checkbox"]:checked+label::before {
    background-color: #fff;
    border-color: #ffffff;
    border: 1px solid #ccc;
}

table.dataTable.table.table-striped>tbody>tr:nth-of-type(2n+1)>* {
    background-color: rgba(238, 238, 238, .3);
    box-shadow: none;
}

table.dataTable .btn-icon,
table.dataTable .btn.icon,
.modal-dialog .btn-icon{
    padding: 7px 8px;
}

div.table-responsive > div.dt-container > div.row{
    padding-top: 0.5rem;
}


/* End Data Table */


/*
* New Style Card Widget toolWidgets
*/
.widget-card {
    max-width: 250px;
}

.widget-icon {
    width: 45px;
    height: 45px;
}

.widget-icon-size {
    font-size: 1.1rem;
}

.widget-content {
    padding: 0.25rem 0.5rem;
}

.widget-amount {
    font-size: 1.3rem;
    line-height: 1.2;
    margin-left: 0.25rem;
}

.widget-message {
    font-size: 0.85rem;
    line-height: 1.2;
    margin-left: 0.25rem;
}

div.multiple-tools-widget {
    display: table;
}

div.multiple-tools-widget a {
    float: left;
    margin-right: 10px;
    min-width: 150px;
}

div.multiple-tools-widget a:last-child {
    margin-right: 0px;
}

/* End Card Widget */


/*
* New Style Swal
*/
.swal2-container {
    z-index: 10000 !important;
}

/* End Swal */



/* Input Group Styles */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group>.form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    margin-bottom: 0;
}

.input-group-append {
    display: flex;
    margin-left: -1px;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.input-group-append>.input-group-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Panel Styles */
.panel {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.panel-heading {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-light);
}

.panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
}

/* Radio */
.checkbox-custom.mt-10 input[type="checkbox"] {
    margin-top: 10px;
}

.radio-custom label::after {
    border: 4px solid #757575;
}

.radio-custom label::after {
    top: 5px;
    left: 5px;
    width: 10px;
    height: 10px;
}

/* Graph Dashboard */
.graph-layout {
    min-width: 310px;
    height: 400px;
    margin: 0 auto
}


/*home-menu-system*/
div.home-menu-system .menu-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
}

@media (min-width: 576px) {
    div.home-menu-system  .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    div.home-menu-system  .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

div.home-menu-system  .menu-tile {
    display: block;
    padding: 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e9eef6;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    height: 100%;
}

div.home-menu-system  .menu-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(27, 39, 94, 0.12);
    border-color: #d5deec;
    text-decoration: none;
}

div.home-menu-system  .menu-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, .6);
    background: linear-gradient(135deg, #eff5ff 0%, #e7f0ff 100%);
    color: #2f55d4;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(47, 85, 212, .25), inset 0 0 0 6px rgba(255, 255, 255, .6);
    transition: transform .2s ease, box-shadow .2s ease;
}

div.home-menu-system  .menu-tile:hover .menu-icon {
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(47, 85, 212, .32), inset 0 0 0 6px rgba(255, 255, 255, .7);
}

div.home-menu-system  .menu-icon>i {
    font-size: 26px;
}

div.home-menu-system  .menu-label {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: .2px;
}

/* Color variants */
div.home-menu-system  .menu-tile.is-cyan .menu-icon {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    color: #0e7490;
    box-shadow: 0 4px 14px rgba(14, 116, 144, .2), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-purple .menu-icon {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #6d28d9;
    box-shadow: 0 4px 14px rgba(109, 40, 217, .2), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-orange .menu-icon {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #c2410c;
    box-shadow: 0 4px 14px rgba(194, 65, 12, .22), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-green .menu-icon {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #047857;
    box-shadow: 0 4px 14px rgba(4, 120, 87, .2), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-pink .menu-icon {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    color: #be185d;
    box-shadow: 0 4px 14px rgba(190, 24, 93, .2), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-teal .menu-icon {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    color: #0f766e;
    box-shadow: 0 4px 14px rgba(15, 118, 110, .2), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-indigo .menu-icon {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
    box-shadow: 0 4px 14px rgba(67, 56, 202, .22), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-amber .menu-icon {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #b45309;
    box-shadow: 0 4px 14px rgba(180, 83, 9, .22), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-sky .menu-icon {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
    box-shadow: 0 4px 14px rgba(3, 105, 161, .22), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-blue .menu-icon {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(29, 78, 216, .22), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-lime .menu-icon {
    background: linear-gradient(135deg, #f7fee7 0%, #ecfccb 100%);
    color: #4d7c0f;
    box-shadow: 0 4px 14px rgba(77, 124, 15, .2), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-slate .menu-icon {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .18), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

div.home-menu-system  .menu-tile.is-red .menu-icon {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #b91c1c;
    box-shadow: 0 4px 14px rgba(185, 28, 28, .22), inset 0 0 0 6px rgba(255, 255, 255, .65);
}

a.more-detail{
    float: right;
    color: #8a0000;
    font-size: 15px;
    margin-bottom: 2rem;
  }



/* permission เปลี่ยนสิทธิ์ผู้ใช้งานระบบ */
.permission-wrapper{
    margin:0 auto;
}
.permission-card{
    border:1px solid #e5e7eb;
    border-radius:12px;
    box-shadow:0 15px 35px rgba(15,23,42,0.08);
    background:#ffffff;
    margin-bottom:30px;
    overflow:hidden;
}
.permission-card__header{
    padding:28px 32px 20px;
    border-bottom:1px solid #f1f5f9;
}
.permission-card__header h4{
    margin:0;
    font-weight:600;
    color:#0f172a;
}
.permission-card__body{
    padding:24px 32px 8px;
}
.permission-card__body p{
    color:#475569;
}
.permission-summary{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    background:#f8fafc;
    border-radius:10px;
    padding:14px 18px;
    margin-top:18px;
    row-gap:10px;
}
.permission-summary strong{
    color:#0f172a;
}
.permission-faculty{
    border:1px solid #e2e8f0;
    border-radius:12px;
    padding:20px;
    margin-bottom:18px;
    background:#fff;
    transition:box-shadow .2s ease, border-color .2s ease;
}
.permission-faculty:hover{
    border-color:#cbd5f5;
    box-shadow:0 20px 25px -5px rgba(15,23,42,0.08);
}
.permission-card__body form{
    width:100%;
}
.permission-faculty__title{
    font-weight:600;
    margin-bottom:12px;
    color:#0f172a;
    display:flex;
    align-items:center;
    gap:10px;
}
.permission-faculty__title i{
    color:#2563eb;
}
.permission-options{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:10px 18px;
}
.permission-option{
    position:relative;
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 16px;
    border-radius:10px;
    border:1px solid #e2e8f0;
    background:#fff;
    cursor:pointer;
    transition:all .2s ease;
    user-select:none;
}
.permission-option:hover{
    border-color:#c7d2fe;
    box-shadow:0 8px 20px rgba(37,99,235,0.12);
}
.permission-option input[type="radio"]{
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.permission-option__marker{
    width:22px;
    height:22px;
    border-radius:50%;
    border:2px solid #cbd5f5;
    position:relative;
    flex-shrink:0;
    transition:all .2s ease;
}
.permission-option__marker::after{
    content:'';
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%) scale(0);
    width:10px;
    height:10px;
    border-radius:50%;
    background:#2563eb;
    transition:transform .2s ease;
}
.permission-option input[type="radio"]:checked + .permission-option__marker{
    border-color:#2563eb;
    box-shadow:0 0 0 4px rgba(37,99,235,0.12);
}
.permission-option input[type="radio"]:checked + .permission-option__marker::after{
    transform:translate(-50%,-50%) scale(1);
}
.permission-option__text{
    color:#0f172a;
    font-weight:500;
}
.permission-empty{
    text-align:center;
    padding:40px 20px;
    color:#94a3b8;
}
@media (max-width:767px){
    .permission-card__header,
    .permission-card__body{
        padding:20px;
    }
}