.dn { display: none; }
.bsdn { box-shadow: none; }
.drp-buttons{ display: none; }

.selectgroup {
  display: inline-flex; }

.selectgroup-item {
  flex-grow: 1;
  position: relative; }
  .selectgroup-item + .selectgroup-item {
    margin-left: -1px; }
  .selectgroup-item:not(:first-child) .selectgroup-button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0; }
  .selectgroup-item:not(:last-child) .selectgroup-button {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0; }

.selectgroup-input {
  opacity: 0;
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0; }

.selectgroup-button {
  background-color: #fdfdff;
  border-color: #e4e6fc;
  border-width: 1px;
  border-style: solid;
  display: block;
  text-align: center;
  padding: 0 1rem;
  height: 35px;
  position: relative;
  cursor: pointer;
  border-radius: 3px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-size: 13px;
  min-width: 2.375rem;
  line-height: 36px; }

.selectgroup-button-icon {
  padding-left: .5rem;
  padding-right: .5rem; }
  .selectgroup-button-icon i {
    font-size: 14px; }

.selectgroup-input:focus + .selectgroup-button,
.selectgroup-input:checked + .selectgroup-button {
  background-color: #6777ef;
  color: #fff;
  z-index: 1; }

.selectgroup-pills {
  display: block;
  flex-wrap: wrap;
  align-items: flex-start; }
  .selectgroup-pills .selectgroup-item {
    margin-right: .5rem;
    flex-grow: 0; }
  .selectgroup-pills .selectgroup-button {
    border-radius: 50px !important; }

.custom-switch {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
  display: inline-flex;
  align-items: center;
  margin: 0; }

.custom-switch-input {
  position: absolute;
  z-index: -1;
  opacity: 0; }

.custom-switches-stacked {
  display: flex;
  flex-direction: column; }
  .custom-switches-stacked .custom-switch {
    margin-bottom: .5rem; }

.custom-switch-indicator {
  display: inline-block;
  height: 1.25rem;
  width: 2.25rem;
  background: #e9ecef;
  border-radius: 50px;
  position: relative;
  vertical-align: bottom;
  border: 1px solid rgba(0, 40, 100, 0.12);
  transition: .3s border-color, .3s background-color; }
  .custom-switch-indicator:before {
    content: '';
    position: absolute;
    height: calc(1.25rem - 4px);
    width: calc(1.25rem - 4px);
    top: 1px;
    left: 1px;
    background: #fff;
    border-radius: 50%;
    transition: .3s left; }

.custom-switch-input:checked ~ .custom-switch-indicator {
  background: #6777ef; }
  .custom-switch-input:checked ~ .custom-switch-indicator:before {
    left: calc(1rem + 1px); }

.custom-switch-input:focus ~ .custom-switch-indicator {
  border-color: #6777ef; }

.custom-switch-description {
  margin-left: .5rem;
  color: #6e7687;
  transition: .3s color; }

.custom-switch-input:checked ~ .custom-switch-description {
  color: #495057; }
html,
body {}

.th {
    font-family: 'Kanit', sans-serif;
    font-weight: 300 !important;
}

.th300 {
    font-family: 'Kanit', sans-serif;
    font-weight: 300 !important;
}

.th400 {
    font-family: 'Kanit', sans-serif;
    font-weight: 400 !important;
}

.fx08 {
    font-size: 0.8em;
}

.fx06 {
    font-size: 0.6em !important;
}

.dn {
    display: none;
}

.reqDiv {
    font-size: 0.8em;
    padding: 5px 10px;
}

.item {
    padding: 8px 10px;
    margin-bottom: 3px;
    cursor: pointer;
    border: none;
    border-width: 0px 0px 1px 0px;
    border-color: rgb(245, 245, 245);
}

.non-active {
    margin-bottom: 0px;
}

.non-active:hover {
    color: #3425aa;
    border: none;
    border-width: 0px 0px 1px 0px;
    border-color: rgb(205, 205, 205);
}

.active:hover {
    background: rgb(83, 85, 108);
    color: #fff;
    border: none;
}

.active {
    transition: 0.3s;
    background: rgb(255, 255, 255);
    border-radius: 5px;
    font-weight: 400 !important;
}

.thumbnail-icon {
    transition: .2s;
}

.thumbnail-icon:hover {
    cursor: pointer;
    transform: scale(1.1);
}

/* --- Mobile Responsive Patch (01/03/2026) --- */

/* 1. Global Utilities for Mobile */
@media (max-width: 767.98px) {
    .w-100-mobile {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .mt-3-mobile {
        margin-top: 1rem !important;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    .h1,
    h1 {
        font-size: 1.5rem !important;
    }

    .h2,
    h2 {
        font-size: 1.25rem !important;
    }

    .h3,
    h3 {
        font-size: 1.1rem !important;
    }
}

/* 2. Argon Dashboard Responsive Fixes */
@media (max-width: 767.98px) {
    .main-content .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .header-body .row>[class*="col-"] {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 1rem !important;
    }
}

/* 3. Table Responsive (Card View) - General Patch */
@media (max-width: 767.98px) {
    .table-responsive table.table {
        border: 0 !important;
    }

    .table-responsive table.table thead {
        display: none !important;
    }

    .table-responsive table.table tr {
        display: block !important;
        margin-bottom: 1.5rem !important;
        border: 1px solid #e9ecef !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
        background: #fff !important;
    }

    .table-responsive table.table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: right !important;
        border-bottom: 1px solid #f6f9fc !important;
        padding: 0.75rem 1rem !important;
        white-space: normal !important;
        min-height: 50px;
        width: 100% !important;
        font-size: 0.9rem !important;
        /* Normalize large fonts in tables */
    }

    .table-responsive table.table td * {
        font-size: inherit !important;
    }

    .table-responsive table.table td:not([data-label]) {
        justify-content: center !important;
        text-align: center !important;
    }

    .table-responsive table.table td:last-child {
        border-bottom: 0 !important;
    }

    .table-responsive table.table td::before {
        content: attr(data-label);
        font-weight: 600 !important;
        text-align: left !important;
        color: #8898aa !important;
        margin-right: 1rem !important;
        flex-shrink: 0;
    }

    /* Hide label if empty or not present */
    .table-responsive table.table td:not([data-label])::before,
    .table-responsive table.table td[data-label=""]::before {
        display: none !important;
    }

    /* Calendar responsiveness */
    .fc-overflow {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .fc-view-container {
        min-width: 600px !important;
        /* Force scrollable on small screens instead of breaking layout */
    }
}

/* 4. Sidebar & Navbar Fixes */
@media (max-width: 1199.98px) {
    .navbar-top .navbar-collapse {
        background: #5e72e4 !important;
        padding: 1rem !important;
        border-radius: 0.5rem !important;
        margin-top: 10px !important;
    }
}

/* 5. Form & Modal Adjustments */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem !important;
    }

    .custom-switch {
        padding-left: 3rem !important;
        display: block !important;
        margin-bottom: 10px !important;
    }
}

/* 6. Universal Dark Mode Styles */
body.dark-theme {
    background-color: #121212 !important;
    color: #fff !important;
}

body.dark-theme .navbar,
body.dark-theme .navbar-top,
body.dark-theme .header {
    background: #1e1e1e !important;
    border-bottom-color: #333 !important;
}

body.dark-theme .card,
body.dark-theme .modal-content,
body.dark-theme .card-body {
    background-color: #1e1e1e !important;
    color: #fff !important;
    border-color: #333 !important;
}

body.dark-theme .form-control {
    background-color: #2c2c2c !important;
    color: #fff !important;
    border-color: #444 !important;
}

body.dark-theme .form-control:focus {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #5e72e4 !important;
}

body.dark-theme .table,
body.dark-theme table {
    color: #fff !important;
    background-color: transparent !important;
}

body.dark-theme .table thead th {
    background-color: #2c2c2c !important;
    color: #fff !important;
    border-color: #444 !important;
}

body.dark-theme .table td,
body.dark-theme .table th,
body.dark-theme .table td *,
body.dark-theme .table th * {
    border-color: #444 !important;
    color: #fff !important;
}

body.dark-theme .text-muted {
    color: #999 !important;
}

body.dark-theme .bg-secondary {
    background-color: #1a1a1a !important;
}

body.dark-theme .bg-white {
    background-color: #1e1e1e !important;
}

body.dark-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, .05) !important;
}

body.dark-theme .border-dashed {
    border-style: dashed !important;
    border-color: #444 !important;
}

/* Login Page Specific Dark Mode */
body.dark-theme .wrap-login100 {
    background: #1e1e1e !important;
}

body.dark-theme .login100-form {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
}

body.dark-theme .login100-more {
    background: #121212 !important;
}

body.dark-theme .input100 {
    background: transparent !important;
    color: #fff !important;
}

body.dark-theme .label-input100 {
    color: #999 !important;
}

body.dark-theme .focus-input100::before {
    background: #5e72e4 !important;
}

/* SweetAlert 1 Dark Mode */
body.dark-theme .sweet-alert {
    background-color: #1e1e1e !important;
}

body.dark-theme .sweet-alert h2,
body.dark-theme .sweet-alert p {
    color: #fff !important;
}

/* DataTables Dark Mode */
body.dark-theme .page-item .page-link {
    background-color: #2c2c2c !important;
    border-color: #444 !important;
    color: #fff !important;
}

body.dark-theme .page-item.active .page-link {
    background-color: #5e72e4 !important;
    border-color: #5e72e4 !important;
    color: #fff !important;
}

body.dark-theme .dataTables_wrapper .dataTables_length select,
body.dark-theme .dataTables_wrapper .dataTables_filter input {
    background-color: #2c2c2c !important;
    color: #fff !important;
    border-color: #444 !important;
}

body.dark-theme .dataTables_wrapper .dataTables_info {
    color: #fff !important;
}

/* --- Expanded Dark Mode Support (Stisla & Utility) --- */

body.dark-theme .bg-primary,
body.dark-theme .bg-gradient-primary,
body.dark-theme .bg-secondary {
    background: #1a2a4d !important; /* Deeper blue for dark mode */
    background-image: none !important;
}

body.dark-theme .text-primary {
    color: #8c9eff !important; /* Lighter blue for better contrast */
}

body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4, body.dark-theme h5, body.dark-theme h6,
body.dark-theme label, body.dark-theme p, body.dark-theme span, body.dark-theme strong,
body.dark-theme .text-dark, body.dark-theme .text-muted, body.dark-theme .text-secondary,
body.dark-theme .card-title, body.dark-theme .card-text {
    color: #fff !important;
}

body.dark-theme .table td,
body.dark-theme .table th,
body.dark-theme .table td *,
body.dark-theme .table th * {
    border-color: #444 !important;
    color: #fff !important;
}

body.dark-theme .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .dataTables_wrapper .dataTables_info,
body.dark-theme .dataTables_wrapper .dataTables_length,
body.dark-theme .dataTables_wrapper .dataTables_filter,
body.dark-theme .dataTables_wrapper .dataTables_paginate {
    color: #fff !important;
}

body.dark-theme .dataTables_wrapper .dataTables_length select,
body.dark-theme .dataTables_wrapper .dataTables_filter input {
    background-color: #2c3e50 !important;
    color: #fff !important;
    border: 1px solid #444 !important;
}

body.dark-theme .page-link {
    background-color: #2c3e50 !important;
    border-color: #444 !important;
    color: #fff !important;
}

body.dark-theme .page-item.active .page-link {
    background-color: #3498db !important;
    border-color: #3498db !important;
}

body.dark-theme .dropdown-item {
    color: #fff !important;
}

body.dark-theme .dropdown-item:hover {
    background-color: #34495e !important;
}

body.dark-theme .navbar-heading {
    color: #fff !important;
}

body.dark-theme .dropdown-menu {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
}

body.dark-theme .dropdown-item {
    color: #fff !important;
}

body.dark-theme .dropdown-item:hover {
    background-color: #2c2c2c !important;
}

/* Stisla Specific Overrides */
body.dark-theme .main-sidebar,
body.dark-theme .sidebar-style-2 .sidebar-menu li.active a {
    background-color: #1a1a1a !important;
    color: #fff !important;
}

body.dark-theme .sidebar-menu li a {
    color: #aaa !important;
}

body.dark-theme .sidebar-menu li a:hover {
    background-color: #222 !important;
}

body.dark-theme .card,
body.dark-theme .modal-content,
body.dark-theme .card-body {
    background-color: #2c3e50 !important;
    color: #fff !important;
}

body.dark-theme .main-navbar,
body.dark-theme .navbar-bg {
    background-color: #1e1e1e !important;
}

body.dark-theme .section-header {
    background-color: #1a1a1a !important;
    color: #fff !important;
    border-bottom: 1px solid #333 !important;
}

body.dark-theme .main-footer {
    background-color: #121212 !important;
    border-top-color: #333 !important;
    color: #888 !important;
}

/* Sidebar (Argon) Dark Mode */
body.dark-theme .sidenav,
body.dark-theme .navbar-vertical {
    background-color: #1a1a1a !important;
    border-right-color: #333 !important;
}

body.dark-theme .sidenav .nav-link,
body.dark-theme .sidenav .nav-link-text {
    color: #fff !important;
}

body.dark-theme .sidenav .nav-link:hover {
    background-color: #2c2c2c !important;
    color: #fff !important;
}

body.dark-theme .sidenav .nav-link.active {
    background-color: #333 !important;
    color: #5e72e4 !important;
}

body.dark-theme .sidenav .navbar-heading {
    color: #888 !important;
}

body.dark-theme .sidenav .nav-link i {
    color: #8c9eff !important;
}

body.dark-theme .sidenav .nav-link.active i {
    color: #5e72e4 !important;
}

body.dark-theme .sidenav .scrollbar-inner {
    background-color: #1a1a1a !important;
}

/* Floating Button for Dark Mode Toggle */
.dark-mode-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #333;
    color: #f1c40f;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: 0.3s;
    font-size: 20px;
    border: 2px solid #555;
}

.dark-mode-floating-btn:hover {
    background: #444;
    transform: scale(1.1);
}

body.dark-theme .dark-mode-floating-btn {
    background: #fff;
    color: #333;
}