* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    overflow: hidden;
    font-family: 'Sarabun', sans-serif !important;
    font-size: 12px !important;
    margin: 0; padding: 0;
}
.swal-notify-title, .swal-notify-body, .swal2-confirm, .swal2-cancel, .swal-result-title, .swal-result-body {
    font-family: 'Sarabun', sans-serif !important;
}
body { 
    opacity: 0; 
    transition: opacity 0.4s ease-in-out; 
}
body.loaded { 
    opacity: 1; 
}
.btn, a, select, input, textarea, .select2-container--bootstrap-5 .select2-selection, .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option {
    font-size: 12px !important;
}
.main-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow-y: auto;
    min-width: 375px !important;
}
.main-container.blue-frame {
    background: linear-gradient(135deg, #7eb9e8 0%, #5a9fd4 100%);
}
header {
    background-color: white;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-height: 75px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center; 
    min-width: 375px !important;
}
header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 0;
}
.footer {
    background: #ffffff;
    color: #555;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -3px 8px rgba(0,0,0,0.05);
    z-index: 1000;
    overflow: hidden;
}
.scrolling {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    overflow: hidden;
    z-index: 1001;
    pointer-events: none;
}
.scrolling-container {
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 25s linear infinite;
    display: flex;
    align-items: center;
}
.scrolling-text {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    line-height: 1;
    color: #ffffff;
}
.footer-container {
    position: relative;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; 
}
.footer-text {
    font-size: 13px;
    color: #333;
    padding: 0 10px;
    display: flex;
    align-items: center;
    height: 100%; 
    line-height: 1;
}
.footer-logo {
    height: 28px; 
    max-height: 100%;
}
.scrolling-text img {
    height: 20px;
    max-height: 100%;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
a {
    cursor: pointer;
}
.sidebar {
    width: 260px;
    height: 100vh;
    background: #ffffff;
    position: fixed;
    top: 0;
    left: -260px;
    border-right: 1px solid #e0e0e0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    z-index: 99999;
    transition: 0.3s ease;
    padding: 15px 12px;
}
.sidebar.open {
    left: 0;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eaeaea;
}
.sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    margin: 4px 0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    text-decoration: none;
    transition: 0.2s;
}
.sidebar .sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #555;
}
.sidebar .sidebar-link:hover {
    background: #f0f7ff;
    color: #5bb8f5;
}
.sidebar .sidebar-link:hover i {
    color: #5bb8f5;
}
.sidebar .active {
    background: #e7f1ff;
    color: #5bb8f5;
    font-weight: 600;
}
.sidebar .active i {
    color: #5bb8f5;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1040;
}
.sidebar-overlay.show {
    display: block;
}
.table {
    width: 100% !important;
}
.ck-editor__editable {
    min-height: 500px;
    max-height: 500px; 
}
.modal-body {
    width: 100%;
    max-height: calc(100vh - 100px - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-color: #f1f1f1;
    scrollbar-width: thin;
}
#notificationCount {
    font-size: 0.5rem;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}
.notification-item.unread {
    background-color: #f8f9fa;
}
.notification-item:hover {
    background-color: #e9ecef;
}
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.dropdown-menu::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}
.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #555;
}
.notification-item {
    transition: all 0.2s ease;
}
.position-relative .badge {
    transform: translate(-50%, -50%);
    z-index: 2;
}
.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.panel-footer {
    background: white;
    padding: 20px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}
label.required::after {
    content: " *";
    color: red;
    font-weight: bold;
}
.logo-full {
    width: 95%;
    height: auto;
    max-height: 40px;
    object-fit: contain;
}
.custom-notification-menu {
    flex-direction: column;
    max-height: 85vh;
    width: 350px;
}
.custom-notification-menu.show {
    display: flex;
}
@media (max-width: 768px) {
    .custom-notification-menu {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100vw;
        max-height: 85vh;
        border-radius: 5px;
        margin: 0;
        flex-direction: column;
        z-index: 9999;
    }
    .notification-list {
        flex: 1;
        overflow-y: auto;
    }
}
.notification-list{
    overflow-y: auto;
}
.datepicker {
    padding: 10px !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    font-size: 13px;
}
.datepicker table tr td, .datepicker table tr th {
    width: 35px;
    height: 35px;
    border-radius: 8px !important;
    border: none;
}
.datepicker table tr td.active, 
.datepicker table tr td.active:hover {
    background-image: none !important;
    background-color: #5bb8f5 !important;
    color: #fff !important;
    text-shadow: none;
}
.datepicker table tr td.today {
    background-color: #e7f1ff !important;
    color: #5bb8f5 !important;
    background-image: none !important;
}
.datepicker .prev, .datepicker .next, .datepicker .datepicker-switch {
    transition: 0.2s;
}
.datepicker .prev:hover, .datepicker .next:hover {
    background-color: #f8f9fa !important;
}
.cover-drop-area{
    border: 2px dashed #c8d3e1;
    border-radius: 14px;
    background: #f8fafc;
    padding: 15px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: .2s;
    cursor: pointer;
}
.cover-drop-area:hover{
    background: #f1f5ff;
    border-color: #7aa2ff;
}
.cover-drop-area.dragover{
    background: #e9f3ff;
    border-color: #2f6bff;
}
.swal2-html-container {
    font-size: 12px !important;
}
.swal2-title {
    font-size: 16px !important;
}
button {
    font-size: 12px !important;
}
.mt-90 {
    margin-top: 90px !important;
}
.nav-link {
    color: #333 !important;
}
.nav-link.active {
    background: #e7f1ff;
    color: #FFFFFF !important;
    font-weight: 600;
    border-radius: 5px;
}
a.nav-link.active {
    color: #5bb8f5 !important;
}
.table>thead>tr>th {
    white-space: nowrap;
}
.content-view img {
    max-width: 100% !important;
    height: auto !important;
}
img {
    max-width: 100% !important;  
}
.content-view table {
    max-width: 100% !important;
}
.content-view iframe, 
.content-view video {
    max-width: 100% !important;
}
 #mainTabs {
    display: flex;
    flex-wrap: nowrap; 
    overflow-x: auto;
    overflow-y: hidden; 
    white-space: nowrap; 
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px; 
}
#mainTabs .nav-item {
    flex: 0 0 auto;  
}
#mainTabs::-webkit-scrollbar {
    display: none;
}
#mainTabs {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.notification-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden; 
}
.notification-item {
    white-space: normal !important;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}
#mapFilter {
    display: none;
}
.attachment-card {
    display: block;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
}
.attachment-card:hover {
    background: #f8fafc;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.08);
}
.file-icon-box {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.attachment-card:hover .file-icon-box {
    background: #eff6ff;
}
.file-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.file-action {
    font-size: 0.8rem;
}
.content-view .row.g-3 {
    margin-bottom: 10px;
}
.vr-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.vr-preview-wrapper {
    position: relative;
    height: 140px;
    overflow: hidden;
    background: #000;
}
.vr-blur-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    filter: blur(2px);
    transform: scale(1.1);
}
.vr-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.vr-icon-spin {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.9;
    animation: vr-rotate 8s linear infinite;
}
@keyframes vr-rotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}
.vr-card:hover {
    border-color: #0ea5e9;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.15);
}
#vrModal .modal-content {
    background-color: #000;
    border: none;
}
#panorama-viewer {
    width: 100%;
    height: 80vh;
    background-color: #000;
}
#vrModal .btn-dark {
    pointer-events: auto !important;
    opacity: 0.8;
    transition: opacity 0.2s;
}
#vrModal .btn-dark:hover {
    opacity: 1;
    background-color: #000;
}
.pnlm-controls-container {
    top: 65px !important;
    z-index: 1000 !important;
}
.pnlm-load-button {
    background-color: var(--bs-primary) !important;
}
#vrModal .modal-body {
    overflow: hidden;
    height: 80vh;
}
@media (max-width: 768px) {
    #vrModal .modal-body {
        height: 85vh; 
    }
    #panorama-viewer {
        height: 100% !important;
    }
    .pnlm-compass {
        bottom: 15px !important;
    }
}
.pnlm-controls-container, .pnlm-compass, .pnlm-controls {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1050 !important;
}
.pnlm-compass {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50px !important;
    right: 15px !important;
    bottom: 65px !important;
    background-size: contain !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.pnlm-control {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
    margin-bottom: 5px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
    transition: all 0.2s;
    cursor: pointer !important;
    pointer-events: auto !important;
}
.pnlm-control:hover {
    background-color: #fff !important;
    color: #0ea5e9 !important;
    transform: scale(1.05);
}
.pnlm-zoom-controls {
    top: 70px !important; 
    left: 15px !important;
}
.modal-fullscreen .modal-footer {
    padding: 0.5rem 1rem; 
    min-height: auto; 
}
.modal-fullscreen .modal-body {
    max-height: none;
}
.fancybox__container {
    z-index: 10000 !important;
}
.wind-custom-tooltip {
    background: rgba(30, 30, 30, 0.85) !important;
    border: 1px solid #444 !important;
    border-radius: 20px !important;
    color: #fff !important;
    padding: 5px 12px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4) !important;
    font-family: 'Arial', sans-serif;
}
.wind-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}
.arrow-icon {
    display: inline-block;
    font-size: 13px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    color: #5bb8f5 ;
}
.wind-value {
    font-size: 9px;
}
#contentBody img {
    max-width: 100% !important;
    height: auto;
}
.note-editor img,
.tox-edit-area img {
    max-width: 100%;
    height: auto;
}
.note-editor {
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,.05);
}
.note-toolbar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.note-toolbar button {
    border-radius: 6px;
}
.note-editor .note-editable {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.7;
}
.note-modal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 40px rgba(0,0,0,.2);
    font-family: 'Sarabun', sans-serif;
}
.note-modal .modal-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
}
.note-modal .modal-title {
    font-size: 16px;
    font-weight: 600;
}
.note-modal .close {
    font-size: 20px;
    width: 25px;
    height: 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    opacity: .7;
    pointer-events: auto;
    z-index: 10; 
    margin-right: 10px;
}
.note-modal .close:hover {
    opacity: 1;
    background: #e5e7eb;
}
.note-modal .modal-body {
    padding: 20px;
}
.note-modal label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.note-modal input[type="text"],
.note-modal input[type="file"] {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
}
.note-modal .modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
}
.note-modal .btn-primary {
    background: #6366f1;
    border-color: #6366f1;
    border-radius: 8px;
    padding: 6px 16px;
}
.note-modal .btn-primary:hover {
    background: #4f46e5;
}
.note-modal .note-image-url, .note-modal .note-group-image-url {
    display: none;
}
.empty-state-container {
    padding: 80px 20px;
    text-align: center;
    background: #ffffff;
    border-radius: 24px;
    border: 2px dashed #e2e8f0;
    margin-top: 20px;
}
.empty-icon {
    font-size: 64px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    width: 120px;
    height: 120px;
    line-height: 120px;
    border-radius: 50%;
    margin: 0 auto 24px;
    color: #94a3b8;
}
.empty-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}
.empty-subtitle {
    color: #64748b;
    max-width: 400px;
    margin: 0 auto 24px;
}
#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 45px;
    height: 45px;
    z-index: 1050;
    border: none;
    background: linear-gradient(135deg, #5bb8f5, #2d7fc1);
    color: white;
}
#btn-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
}
#btn-back-to-top i {
    font-size: 18px;
}
@media (max-width: 576px) {
    #btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
.btn-blue {
    background: linear-gradient(135deg, #5bb8f5, #3aa0e6);
    color: #fff;
    transition: all 0.25s ease;
    box-shadow: 0 6px 16px rgba(91, 184, 245, 0.25);
    position: relative;
    overflow: hidden;
}
.btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(91, 184, 245, 0.35);
}
.btn-blue::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}
.btn-blue:hover::after {
    left: 100%;
}
.text-blue {
    color: #5bb8f5;
}
.form-check-input:checked {
    background-color: #5bb8f5;
    border-color: #5bb8f5;
}
.note-editor .dropdown-menu.show {
    display: block !important;
    position: absolute !important;
    z-index: 9999 !important;
    background-color: white !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}
.note-color-palette {
    padding: 5px !important;
}
.modal-open .note-dropdown-menu {
    z-index: 2000 !important;
}
.border-bottom-dashed {
    border-bottom: 1px dashed #dee2e6;
}
.hover-bg-light:hover {
    background-color: #f8f9fa;
    transition: 0.2s;
}
.cursor-pointer {
    cursor: pointer;
}
#menu-list-container::-webkit-scrollbar {
    width: 6px;
}
#menu-list-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.carousel {
    max-height: 300px;
}
.carousel-item .ratio {
    max-height: 300px;
    background-color: #000;
}
.object-fit-cover {
    object-fit: contain !important;
    width: 100%;
    height: 100%;
}
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: #fff;
    opacity: 0.5;
}
.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.2);
}
.carousel-control-prev, .carousel-control-next {
    width: 8%;
    transition: all 0.3s ease;
}
.carousel-control-prev:hover, .carousel-control-next:hover {
    background: rgba(0,0,0,0.1);
}
.project-status {
    transition: all 0.3s ease;
}
.status-pulse {
    position: relative;
    display: inline-block;
}
.status-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.8;
    animation: status-ripple 2s infinite ease-out;
    z-index: -1;
}
@keyframes status-ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}
.modal-open .select2-container--open {
    z-index: 9999 !important;
}
.select2-container {
    z-index: 1055 !important;
}