
body, html {
    height: 100%;
    font-family: 'Kanit', cursive !important;
    font-size: 0.95rem !important;
}
.bg {
    background: #56baed;
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: -1;
    clip-path: polygon(0 0, 55% 0, 45% 100%, 0% 100%);
}

.w-60p{
    width: 60px !important;
}
.w-90p{
    width: 90px !important;
}
.w-150p{
    width: 150px !important;
}

.canvas{
    height: 300px!important;
}
.toggle.ios, .toggle-on.ios, .toggle-off.ios { 
    border-radius: 20px; 
    font-weight: 100px;
}
.toggle.ios .toggle-handle { 
    border-radius: 20px; 
}
.toggle-on.btn {
    padding-right: 19px;
    font-weight: 100 !important;
}
.btn {
    font-size: inherit !important;
}

.card, .small-box, .small-box-footer{
    border-radius: 15px !important;
}
.small-box h1{
    font-size: 2rem !important;
}

.rtl{
    direction: rtl !important;
}

@media (max-width: 1400px) {
    .table-responsive-xxl {
      display: block;
      width: 100%;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .table-responsive-xxl > .table-bordered {
      border: 0;
    }
    #orders .detail{
        width: 300px !important;
    }
}

@media (max-width: 1200px) {
    .small-box h1 {
        font-size: 1.7rem !important;
    }
}

@media (max-width: 767px) {
    .small-box h1 {
        font-size: 1.4rem !important;
    }
}

/* Shared presentation for record details and responsive table details. */
:is(.record-detail-modal, .dtr-bs-modal) .modal-content,
.swal2-popup.record-detail-popup {
    border: 1px solid #dbe5ef;
    border-radius: 16px;
    box-shadow: 0 22px 64px rgba(17, 38, 61, .28);
    overflow: hidden;
    color: #23394d;
}
:is(.record-detail-modal, .dtr-bs-modal) .modal-header,
.record-detail-popup .swal2-title {
    padding: .95rem 1.25rem;
    border-bottom: 1px solid #dce8f3;
    background: linear-gradient(115deg, #e8f3fc, #f8fbfe 75%);
    color: #173f60;
}
:is(.record-detail-modal, .dtr-bs-modal) .modal-title,
.record-detail-popup .swal2-title {
    font-size: 1.2rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}
:is(.record-detail-modal, .dtr-bs-modal) .modal-body,
.record-detail-popup :is(.swal2-content, .swal2-html-container) {
    padding: 1rem 1.25rem;
    background: #f5f8fc;
    text-align: left;
    overflow-wrap: anywhere;
}
:is(.record-detail-modal, .dtr-bs-modal) .modal-dialog:not(.modal-dialog-scrollable) .modal-body {
    max-height: calc(100vh - 10rem);
    overflow: auto;
}
.swal2-popup.record-detail-popup {
    max-width: calc(100vw - 1.5rem);
    padding: 0;
}
.record-detail-popup .swal2-header { padding: 0; }
.record-detail-popup .swal2-title { width: 100%; margin: 0; text-align: left; }
.record-detail-popup .swal2-html-container { margin: 0; font-size: .95rem; }
.record-detail-popup .swal2-content { max-height: 62vh; overflow: auto; }
.record-detail-popup > .swal2-html-container { max-height: 62vh; overflow: auto; }
.record-detail-popup .swal2-content .swal2-html-container { padding: 0; }
:is(.record-detail-modal, .dtr-bs-modal) .modal-footer,
.record-detail-popup .swal2-actions {
    background: #fff;
    border-top: 1px solid #dce8f3;
    padding: .65rem 1rem;
}
.record-detail-popup .swal2-actions { width: 100%; margin: 0; justify-content: flex-end; }
.record-detail-popup .swal2-styled { border-radius: 8px; min-width: 5rem; }
:is(.record-detail-modal, .dtr-bs-modal, .record-detail-popup) .table {
    background: #fff;
    color: inherit;
}
:is(.record-detail-modal, .dtr-bs-modal, .record-detail-popup) .table thead th,
:is(.record-detail-modal, .dtr-bs-modal, .record-detail-popup) .table tbody th[scope="row"] {
    background: #edf4fb;
    color: #274a67;
    border-color: #dce8f3;
}
:is(.record-detail-modal, .dtr-bs-modal, .record-detail-popup) .table td { border-color: #e0e9f2; }
.record-detail-summary, .record-detail-section {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-bottom: .75rem;
}
.record-detail-section:last-child { margin-bottom: 0; }
.record-detail-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.record-detail-summary h3, .record-detail-section h3 { color: #173f60; margin: 0 0 .4rem; font-weight: 700; }
.record-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin: 0;
}
.record-detail-grid > div { background: #f4f8fc; border: 1px solid #e5edf5; border-radius: 8px; padding: .5rem .65rem; }
.record-detail-grid dt { color: #4b647a; font-size: .8rem; }
.record-detail-grid dd { margin: .12rem 0 0; white-space: pre-wrap; }
.record-detail-grid .record-detail-wide { grid-column: 1 / -1; }
@media (max-width: 575.98px) {
    :is(.record-detail-modal, .dtr-bs-modal) :is(.modal-header, .modal-body),
    .record-detail-popup :is(.swal2-title, .swal2-content, .swal2-html-container) { padding: .75rem; }
    .record-detail-grid { grid-template-columns: minmax(0, 1fr); }
    .record-detail-popup .swal2-content, .record-detail-popup > .swal2-html-container { max-height: 65vh; }
}
@media (prefers-reduced-motion: reduce) {
    :is(.record-detail-modal, .dtr-bs-modal) .modal-dialog,
    .record-detail-popup { animation: none !important; transition: none !important; }
}
