﻿    body {
      box-sizing: border-box;
    }

    /* New badge for recent news */
    .new-icon {
      border: 2px solid yellow;
      animation: blink-slow 2s ease-in-out infinite;
    }

    .news-new-badge {
      position: absolute;
      top: 5px;
      right: 5px;
      background: #FFD700;
      border: 2px solid #FFA500;
      color: #000;
      padding: 4px 8px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 0.75rem;
      text-transform: uppercase;
      animation: blink-slow 2s ease-in-out infinite;
      z-index: 10;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    .news-feature-card,
    .news-list-item,
    .news-card,
    .news-list-thumb,
    .news-card-thumb {
      position: relative;
    }

    /* News Feed */
    .news-feed-wrapper {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 20px;
      margin-bottom: 30px;
    }

    .news-feed-title {
      font-size: 1.4rem;
      font-weight: 700;
      color: #b71c1c;
      margin: 0 0 12px 0;
      padding: 10px 14px;
      border-radius: 10px;
      border: 2px solid #e53935;
      display: inline-block;
      background: #fff;
      box-shadow: 0 6px 16px rgba(229, 57, 53, 0.18);
    }

    .blinking-border {
      animation: blink-border 1.2s infinite;
    }

    @keyframes blink-border {

      0%,
      100% {
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.65);
      }

      50% {
        box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.25);
      }
    }

    .news-feed-feature,
    .news-feed-list {
      background: #fff;
      border-radius: 14px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
      overflow: hidden;
      min-height: 320px;
    }

    .news-feature-card {
      position: relative;
      height: 100%;
      cursor: pointer;
    }

    .news-feature-image {
      position: absolute;
      inset: 0;
      background-size: cover;
      background-position: center;
      filter: brightness(0.75);
      transition: transform 0.3s ease, filter 0.3s ease;
    }

    .news-feature-card:hover .news-feature-image {
      transform: scale(1.03);
      filter: brightness(0.9);
    }

    .news-feature-overlay {
      position: relative;
      z-index: 1;
      color: #fff;
      padding: 24px;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.65) 100%);
    }

    .news-meta {
      font-size: 0.9rem;
      opacity: 0.9;
      margin-bottom: 6px;
    }

    .news-feature-overlay h3 {
      font-size: 1.5rem;
      margin: 0 0 10px 0;
      line-height: 1.3;
    }

    .news-feature-overlay p {
      margin: 0 0 12px 0;
      opacity: 0.95;
    }

    .news-read-btn {
      align-self: flex-start;
      background: #26A69A;
      color: #fff;
      border: none;
      padding: 10px 16px;
      border-radius: 10px;
      cursor: pointer;
      font-weight: 600;
    }

    .news-feed-list {
      padding: 14px;
      display: grid;
      gap: 12px;
    }

    .news-list-item {
      display: grid;
      grid-template-columns: 90px 1fr;
      gap: 12px;
      align-items: center;
      background: #f7f9fc;
      border-radius: 12px;
      padding: 10px;
      cursor: pointer;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .news-list-item:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .news-list-thumb {
      width: 90px;
      height: 70px;
      border-radius: 10px;
      background-size: cover;
      background-position: center;
      background-color: #e0e0e0;
    }

    .news-list-body h4 {
      margin: 0 0 4px 0;
      font-size: 1rem;
      color: #111;
    }

    .news-list-body p {
      margin: 0;
      color: #555;
      font-size: 0.9rem;
    }

    .news-placeholder {
      text-align: center;
      color: #777;
      padding: 20px;
    }

    /* News page */
    .news-page-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
      gap: 12px;
    }

    .news-add-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: #2616af;
      color: #fff;
      border: none;
      padding: 10px 14px;
      border-radius: 10px;
      cursor: pointer;
      box-shadow: 0 8px 20px rgba(38, 22, 175, 0.25);
    }

    .news-add-btn i {
      font-size: 0.95rem;
    }

    .news-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
    }

    .news-card {
      background: #fff;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
      cursor: pointer;
      display: flex;
      flex-direction: column;
      height: 100%;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .news-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    }

    .news-card-thumb {
      width: 100%;
      height: 160px;
      background-size: cover;
      background-position: center;
      background-color: #e0e0e0;
    }

    .news-card-body {
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 6px;
      height: 100%;
    }

    .news-card-body h4 {
      margin: 0;
      color: #111;
      font-size: 1.05rem;
      line-height: 1.4;
    }

    .news-card-body p {
      margin: 0;
      color: #555;
      font-size: 0.95rem;
      flex: 1;
    }

    .news-card-footer {
      font-size: 0.9rem;
      color: #2616af;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .news-detail-panel {
      display: flex;
      flex-direction: column;
      gap: 20px;
      background: #fff;
      padding: 20px;
      border-radius: 12px;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
      margin-bottom: 16px;
    }

    .news-detail-media {
      width: 100%;
      display: flex;
      justify-content: center;
      margin-bottom: 10px;
    }

    .news-detail-media img {
      max-width: 300px;
      width: 100%;
      border-radius: 12px;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
      object-fit: cover;
      display: block;
      margin: 0 auto;
    }

    .news-detail-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 10px;
      max-width: 100%;
      overflow-wrap: break-word;
      word-wrap: break-word;
      word-break: break-word;
    }

    .news-delete-btn {
      background: #e53935;
      color: #fff;
      border: none;
      padding: 14px 18px;
      border-radius: 10px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 1rem;
      font-weight: 700;
      box-shadow: 0 10px 24px rgba(229, 57, 53, 0.4);
    }

    .news-edit-btn {
      background: linear-gradient(135deg, #FF9800, #FFB74D);
      color: #fff;
      border: none;
      padding: 14px 18px;
      border-radius: 10px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 1rem;
      font-weight: 700;
      box-shadow: 0 10px 24px rgba(255, 152, 0, 0.4);
      transition: all 0.3s;
    }

    .news-edit-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 28px rgba(255, 152, 0, 0.5);
    }


    .news-detail-meta {
      color: #666;
      font-size: 0.95rem;
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .news-gallery {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 6px;
    }

    .news-thumb {
      width: 110px;
      height: 80px;
      border-radius: 10px;
      overflow: hidden;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .news-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.2s ease;
    }

    .news-thumb:hover img {
      transform: scale(1.05);
    }

    /* Lightbox */
    .news-lightbox {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 10000;
    }

    .news-lightbox img {
      max-width: 90%;
      max-height: 80%;
      border-radius: 12px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    }

    .news-lightbox-close {
      position: absolute;
      top: 20px;
      right: 20px;
      background: rgba(0, 0, 0, 0.6);
      color: #fff;
      border: none;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 1.2rem;
    }

    .news-lightbox-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(0, 0, 0, 0.6);
      color: #fff;
      border: none;
      width: 42px;
      height: 42px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 1.2rem;
    }

    .news-lightbox-nav.prev {
      left: 20px;
    }

    .news-lightbox-nav.next {
      right: 20px;
    }

    @media (max-width: 992px) {
      .news-feed-wrapper {
        grid-template-columns: 1fr;
      }

      .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .news-detail-panel {
        flex-direction: column;
      }

      .news-detail-media {
        width: 100%;
      }
    }

    /* Slow blink animation for New badge */
    @keyframes blink {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.5;
      }
    }

    @keyframes blink-slow {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.5;
      }
    }

    @media (max-width: 640px) {
      .news-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
      }

      /* Reduce news height on mobile */
      .news-feed-feature,
      .news-feed-list {
        min-height: 220px;
      }

      .news-list-thumb {
        width: 70px;
        height: 55px;
      }

      .news-card-thumb {
        height: 120px;
      }

      .news-list-item {
        padding: 8px;
        gap: 10px;
      }

      .news-list-body h4 {
        font-size: 0.9rem;
      }

      .news-list-body p {
        font-size: 0.85rem;
      }

      .news-feature-overlay {
        padding: 16px;
      }

      .news-feature-overlay h3 {
        font-size: 1.2rem;
      }
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Kanit', sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100%;
      overflow-x: hidden;
    }

    .container {
      width: 100%;
      min-height: 100%;
      display: flex;
      flex-direction: column;
    }

    /* Loading Spinner */
    .loading-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 9999;
    }

    .loading-overlay.active {
      display: flex;
    }

    .spinner {
      width: 50px;
      height: 50px;
      border: 5px solid #f3f3f3;
      border-top: 5px solid #26A69A;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    /* Login Page */
    .login-container {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100%;
      padding: 20px;
    }

    .login-box {
      background: white;
      border-radius: 20px;
      padding: 40px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
      width: 100%;
      max-width: 450px;
    }

    .login-header {
      text-align: center;
      margin-bottom: 30px;
    }

    .login-header h1 {
      color: #26A69A;
      font-size: 2.5rem;
      font-weight: 700;
      margin-bottom: 10px;
    }

    .login-header p {
      color: #666;
      font-size: 1rem;
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-group label {
      display: block;
      margin-bottom: 8px;
      color: #333;
      font-weight: 500;
      font-size: 0.95rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
      width: 100%;
      padding: 12px 15px;
      border: 2px solid #e0e0e0;
      border-radius: 10px;
      font-size: 1rem;
      font-family: 'Kanit', sans-serif;
      transition: all 0.3s;
    }

    .password-input-container {
      position: relative;
    }

    .password-input-container input {
      padding-right: 45px;
    }

    .password-toggle {
      position: absolute;
      right: 15px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: #666;
      cursor: pointer;
      font-size: 1.1rem;
      transition: color 0.3s;
    }

    .password-toggle:hover {
      color: #26A69A;
    }

    .password-display {
      background: linear-gradient(135deg, #26A69A, #AED581);
      color: white;
      padding: 15px 20px;
      border-radius: 10px;
      text-align: center;
      margin: 15px 0;
      font-size: 1.2rem;
      font-weight: 600;
      letter-spacing: 2px;
      box-shadow: 0 5px 15px rgba(38, 166, 154, 0.3);
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
      outline: none;
      border-color: #26A69A;
    }

    .form-group textarea {
      resize: vertical;
      min-height: 80px;
    }

    .btn {
      width: 100%;
      padding: 12px;
      border: none;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
      font-family: 'Kanit', sans-serif;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .btn-primary {
      background: #26A69A;
      color: white;
      margin-bottom: 15px;
    }

    .btn-primary:hover {
      background: #1e8a7f;
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(38, 166, 154, 0.3);
    }

    .btn-secondary {
      background: #AED581;
      color: #333;
      margin-bottom: 15px;
    }

    .btn-secondary:hover {
      background: #9bc76d;
      transform: translateY(-2px);
    }

    .btn-warning {
      background: #FFCA28;
      color: #333;
      margin-bottom: 15px;
    }

    .btn-warning:hover {
      background: #f5b800;
      transform: translateY(-2px);
    }

    .btn-link {
      background: #FF8A65;
      color: white;
      margin-bottom: 10px;
    }

    .btn-link:hover {
      background: #ff6e40;
      transform: translateY(-2px);
    }

    .btn-danger {
      background: #EF5350;
      color: white;
    }

    .btn-danger:hover {
      background: #e53935;
      transform: translateY(-2px);
    }

    .link-buttons {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 20px;
    }

    /* Main App Layout */
    .app-container {
      display: none;
      height: 100%;
      background: #f5f5f5;
    }

    .app-container.active {
      display: flex;
    }

    /* Sidebar */
    .sidebar {
      width: 280px;
      background: linear-gradient(180deg, #4938dc 0%, #2616af 100%);
      color: white;
      position: fixed;
      height: 100%;
      overflow: hidden;
      z-index: 1000;
      box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
      /* Hardware acceleration for smooth animations */
      will-change: width;
      transform: translateZ(0);
    }

    .sidebar.collapsed {
      width: 70px !important;
    }

    /* Enable smooth transitions only during user interactions */
    .sidebar.transitioning {
      transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .sidebar-header {
      padding: 25px 20px;
      background: rgba(0, 0, 0, 0.1);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      transition: padding 0.3s ease;
      overflow: hidden;
    }

    .sidebar-logo-container {
      display: flex;
      align-items: center;
      gap: 15px;
      transition: justify-content 0.3s ease;
    }

    .sidebar-logo {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      object-fit: cover;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      border: 2px solid rgba(255, 255, 255, 0.2);
      transition: all 0.3s ease;
      flex-shrink: 0;
    }

    .sidebar-text {
      flex: 1;
      transition: opacity 0.2s ease;
    }

    .sidebar-text h2 {
      font-size: 1.5rem;
      font-weight: 700;
      margin-bottom: 5px;
      white-space: nowrap;
      margin: 0 0 5px 0;
    }

    .sidebar-text p {
      font-size: 0.85rem;
      opacity: 0.8;
      white-space: nowrap;
      margin: 0;
    }

    .sidebar.collapsed .sidebar-header {
      padding: 25px 10px;
      text-align: center;
    }

    .sidebar.collapsed .sidebar-logo-container {
      justify-content: center;
    }

    .sidebar.collapsed .sidebar-logo {
      width: 40px;
      height: 40px;
    }

    .sidebar.collapsed .sidebar-text {
      opacity: 0;
      position: absolute;
      left: -9999px;
    }

    .sidebar-menu {
      padding: 20px 0;
      overflow-y: auto;
      height: calc(100% - 120px);
    }

    .menu-item {
      padding: 15px 25px;
      cursor: pointer;
      transition: background-color 0.2s ease, border-left-color 0.2s ease;
      display: flex;
      align-items: center;
      gap: 15px;
      border-left: 4px solid transparent;
      position: relative;
      overflow: hidden;
    }

    .menu-item:hover {
      background: rgba(255, 255, 255, 0.1);
      border-left-color: #AED581;
    }

    .menu-item.active {
      background: rgba(255, 255, 255, 0.15);
      border-left-color: #FFCA28;
      box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
    }

    .menu-item i {
      font-size: 1.3rem;
      width: 25px;
      text-align: center;
      transition: font-size 0.2s ease;
      flex-shrink: 0;
    }

    .menu-item span {
      font-size: 1rem;
      font-weight: 500;
      transition: opacity 0.2s ease;
      white-space: nowrap;
    }

    .sidebar.collapsed .menu-item {
      padding: 15px 0;
      justify-content: center;
      gap: 0;
    }

    .sidebar.collapsed .menu-item span {
      opacity: 0;
      position: absolute;
      left: 70px;
      background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8));
      padding: 10px 15px;
      border-radius: 8px;
      font-size: 0.9rem;
      z-index: 1001;
      pointer-events: none;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: opacity 0.2s ease;
    }

    .sidebar.collapsed .menu-item:hover span {
      opacity: 1;
      pointer-events: auto;
    }

    .sidebar.collapsed .menu-item span::before {
      content: '';
      position: absolute;
      left: -8px;
      top: 50%;
      transform: translateY(-50%);
      border: 8px solid transparent;
      border-right-color: rgba(0, 0, 0, 0.9);
    }

    .sidebar.collapsed .menu-item i {
      font-size: 1.4rem;
    }

    /* Main Content */
    .main-content {
      margin-left: 280px;
      flex: 1;
      transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
      display: flex;
      flex-direction: column;
      min-height: 100%;
    }

    .main-content.collapsed {
      margin-left: 70px;
    }

    .main-content.expanded {
      margin-left: 0;
    }

    .topbar {
      background: white;
      padding: 15px 30px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .menu-toggle {
      background: #26A69A;
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 1.2rem;
      transition: all 0.3s;
    }

    .menu-toggle:hover {
      background: #1e8a7f;
    }

    .user-info {
      display: flex;
      align-items: center;
      gap: 15px;
    }

    .user-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: linear-gradient(135deg, #26A69A, #AED581);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-weight: 600;
    }

    .content-area {
      flex: 1;
      padding: 30px;
      overflow-y: auto;
    }

    /* Calendar Section */
    .calendar-header {
      text-align: center;
      margin-bottom: 30px;
    }

    .calendar-header h2 {
      font-size: 2rem;
      color: #333;
      margin-bottom: 10px;
    }

    .calendar-header h3 {
      font-size: 1.5rem;
      color: #666;
      margin-bottom: 20px;
    }

    .calendar-filters {
      display: flex;
      justify-content: center;
      align-items: end;
      gap: 20px;
      margin-bottom: 30px;
      flex-wrap: wrap;
    }

    .filter-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .filter-group label {
      font-weight: 600;
      color: #333;
      font-size: 0.95rem;
    }

    .filter-group input,
    .filter-group select {
      padding: 10px 15px;
      border: 2px solid #e0e0e0;
      border-radius: 10px;
      font-family: 'Kanit', sans-serif;
      font-size: 1rem;
      width: 150px;
      transition: border-color 0.3s;
      background: white;
    }

    .filter-group input:focus,
    .filter-group select:focus {
      outline: none;
      border-color: #26A69A;
    }

    .filter-buttons {
      display: flex;
      gap: 10px;
    }

    .filter-buttons .btn {
      width: auto;
      padding: 10px 20px;
      font-size: 0.95rem;
    }

    .calendar-grid {
      display: grid;
      gap: 40px;
    }

    .month-section {
      background: white;
      border-radius: 15px;
      padding: 25px;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }

    .month-title {
      font-size: 1.5rem;
      color: #26A69A;
      margin-bottom: 20px;
      text-align: center;
      font-weight: 600;
    }

    .two-column-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
    }

    /* Calendar */
    .calendar {
      background: #f9f9f9;
      border-radius: 10px;
      padding: 15px;
    }

    .calendar-days {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 5px;
      margin-bottom: 10px;
    }

    .calendar-day-header {
      text-align: center;
      padding: 10px 5px;
      font-weight: 600;
      font-size: 0.9rem;
      border-radius: 5px;
    }

    .calendar-day-header.sun {
      background: #EF5350;
      color: white;
    }

    .calendar-day-header.mon {
      background: #FFCA28;
      color: #333;
    }

    .calendar-day-header.tue {
      background: #FF8A65;
      color: white;
    }

    .calendar-day-header.wed {
      background: #AED581;
      color: #333;
    }

    .calendar-day-header.thu {
      background: #FF8A65;
      color: white;
    }

    .calendar-day-header.fri {
      background: #26A69A;
      color: white;
    }

    .calendar-day-header.sat {
      background: #9575CD;
      color: white;
    }

    .calendar-dates {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 5px;
    }

    .calendar-date {
      aspect-ratio: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s;
      font-weight: 500;
      position: relative;
    }

    .calendar-date:hover {
      transform: scale(1.05);
    }

    .calendar-date.empty {
      cursor: default;
    }

    .calendar-date.has-event {
      background: #26A69A;
      color: white;
      font-weight: 600;
    }

    .calendar-date.has-event:hover {
      background: #1e8a7f;
    }

    .event-indicator {
      position: absolute;
      bottom: 2px;
      width: 6px;
      height: 6px;
      background: #FFCA28;
      border-radius: 50%;
    }

    .report-count-badge {
      position: absolute;
      top: -5px;
      right: -5px;
      background: #f44336;
      color: white;
      border-radius: 50%;
      width: 20px;
      height: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      font-weight: 600;
      border: 2px solid white;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    /* Event Table */
    .event-table {
      overflow-x: auto;
    }

    .event-table table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.9rem;
    }

    .event-table th {
      background: #26A69A;
      color: white;
      padding: 12px 8px;
      text-align: left;
      font-weight: 600;
      white-space: nowrap;
    }

    .event-table td {
      padding: 12px 8px;
      border-bottom: 1px solid #e0e0e0;
    }

    .event-table tr:hover {
      background: #f5f5f5;
    }

    .badge {
      display: inline-block;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 0.85rem;
      font-weight: 500;
    }

    .badge-success {
      background: #AED581;
      color: #333;
    }

    .badge-warning {
      background: #FFCA28;
      color: #333;
    }

    .badge-danger {
      background: #EF5350;
      color: white;
    }

    .badge-info {
      background: #26A69A;
      color: white;
    }

    /* Dashboard */
    .dashboard-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      margin-bottom: 30px;
    }

    .dashboard-three-column {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 30px;
      margin-bottom: 30px;
    }

    .dashboard-card {
      background: white;
      border-radius: 15px;
      padding: 25px;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }

    .dashboard-card h3 {
      font-size: 1.3rem;
      color: #333;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    #map {
      height: 500px;
      border-radius: 10px;
    }

    /* Animation à¸ªà¸³à¸«à¸£à¸±à¸šà¸ˆà¸¸à¸”à¹à¸”à¸‡à¸šà¸™à¹à¸œà¸™à¸—à¸µà¹ˆ */
    @keyframes pulse {
      0% {
        transform: scale(1);
        opacity: 1;
      }

      50% {
        transform: scale(1.3);
        opacity: 0.7;
      }

      100% {
        transform: scale(1);
        opacity: 1;
      }
    }

    /* à¸‹à¹ˆà¸­à¸™ background à¸‚à¸­à¸‡ custom marker */
    .custom-marker {
      background: transparent !important;
      border: none !important;
    }

    /* Custom tooltip à¸ªà¸³à¸«à¸£à¸±à¸šà¸ˆà¸¸à¸”à¹à¸”à¸‡ */
    .custom-tooltip {
      background: white !important;
      border: none !important;
      border-radius: 8px !important;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
      padding: 0 !important;
    }

    .custom-tooltip::before {
      border-top-color: white !important;
    }

    .leaflet-tooltip-top.custom-tooltip::before {
      border-top-color: white !important;
    }

    .leaflet-tooltip-bottom.custom-tooltip::before {
      border-bottom-color: white !important;
    }

    .leaflet-tooltip-left.custom-tooltip::before {
      border-left-color: white !important;
    }

    .leaflet-tooltip-right.custom-tooltip::before {
      border-right-color: white !important;
    }

    /* Responsive Dashboard */
    @media (max-width: 1024px) {
      .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
      }
    }

    /* Responsive Modal à¸ªà¸³à¸«à¸£à¸±à¸šà¸«à¸™à¹‰à¸²à¸ˆà¸­à¸¡à¸·à¸­à¸–à¸·à¸­ */
    @media (max-width: 768px) {
      .region-reports-modal .swal2-popup {
        width: 95% !important;
        max-width: 95% !important;
        padding: 15px !important;
        margin: 10px !important;
      }

      .region-reports-modal h3 {
        font-size: 1.2rem !important;
      }

      .region-reports-modal table {
        font-size: 0.7rem !important;
      }

      .region-reports-modal th,
      .region-reports-modal td {
        padding: 5px 3px !important;
      }

      .region-reports-modal th {
        font-size: 0.65rem !important;
      }

      /* Dashboard responsive for mobile */
      .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
      }

      #diseaseButtonsContainer {
        gap: 8px !important;
      }

      #diseaseButtonsContainer button {
        padding: 8px 15px !important;
        font-size: 0.8rem !important;
      }

      /* à¸‹à¹ˆà¸­à¸™à¸„à¸­à¸¥à¸±à¸¡à¸™à¹Œà¸šà¸²à¸‡à¸ªà¹ˆà¸§à¸™à¹ƒà¸™à¸¡à¸·à¸­à¸–à¸·à¸­ */
      .region-reports-modal .hide-mobile {
        display: none !important;
      }

      /* à¸›à¸£à¸±à¸šà¸ªà¸–à¸´à¸•à¸´à¸£à¸§à¸¡à¹ƒà¸«à¹‰à¸žà¸­à¸”à¸µà¸à¸±à¸šà¸¡à¸·à¸­à¸–à¸·à¸­ */
      .region-reports-modal .swal2-html-container>div>div:first-of-type {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 15px 12px !important;
      }

      .region-reports-modal .swal2-html-container>div>div:first-of-type>div {
        padding: 12px 8px !important;
      }

      .region-reports-modal .swal2-html-container>div>div:first-of-type>div>div:nth-child(1) {
        font-size: 0.85rem !important;
      }

      .region-reports-modal .swal2-html-container>div>div:first-of-type>div>div:nth-child(2) {
        font-size: 2rem !important;
      }

      .region-reports-modal .swal2-html-container>div>div:first-of-type>div>div:nth-child(3) {
        font-size: 0.75rem !important;
      }
    }

    /* Responsive à¸ªà¸³à¸«à¸£à¸±à¸š Map Summary page */
    @media (max-width: 768px) {
      #mapContainer {
        height: 400px !important;
      }

      #regionMap {
        height: 400px !important;
      }

      .legend {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 12px !important;
      }

      .legend-item {
        font-size: 0.85rem;
      }
    }

    .stats-list {
      display: flex;
      flex-direction: column;
      gap: 15px;
    }

    .stat-item {
      background: linear-gradient(135deg, #26A69A, #AED581);
      padding: 20px;
      border-radius: 10px;
      color: white;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .stat-label {
      font-size: 1rem;
      opacity: 0.9;
    }

    .stat-value {
      font-size: 2rem;
      font-weight: 700;
    }

    /* DataTable */
    .datatable-container {
      background: white;
      border-radius: 15px;
      padding: 25px;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }

    .datatable-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      flex-wrap: wrap;
      gap: 15px;
    }

    .search-box {
      display: flex;
      gap: 10px;
      flex: 1;
      max-width: 400px;
    }

    .search-box input {
      flex: 1;
      padding: 10px 15px;
      border: 2px solid #e0e0e0;
      border-radius: 10px;
      font-family: 'Kanit', sans-serif;
    }

    .datatable {
      overflow-x: auto;
    }

    .datatable table {
      width: 100%;
      border-collapse: collapse;
    }

    .datatable th {
      background: #26A69A;
      color: white;
      padding: 15px 10px;
      text-align: left;
      font-weight: 600;
      white-space: nowrap;
    }

    .datatable td {
      padding: 15px 10px;
      border-bottom: 1px solid #e0e0e0;
    }

    .datatable tr:hover {
      background: #f5f5f5;
    }

    .action-buttons {
      display: flex;
      gap: 8px;
    }

    .btn-icon {
      padding: 8px 12px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s;
      font-size: 0.9rem;
    }

    .btn-edit {
      background: #FFCA28;
      color: #333;
    }

    .btn-edit:hover {
      background: #f5b800;
    }

    .btn-delete {
      background: #EF5350;
      color: white;
    }

    .btn-delete:hover {
      background: #e53935;
    }

    /* Modal */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 2000;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      background: white;
      border-radius: 20px;
      padding: 30px;
      max-width: 600px;
      width: 100%;
      max-height: 90%;
      overflow-y: auto;
      position: relative;
    }

    /* Region Modal Specific Styles */
    .region-modal-content {
      max-width: 1200px;
    }

    .region-summary {
      margin-bottom: 20px;
    }

    .region-table-container {
      overflow-x: auto;
      margin-top: 20px;
    }

    .region-reports-table {
      width: 100%;
      border-collapse: collapse;
      min-width: 800px;
    }

    .region-reports-table thead tr {
      background: #26A69A;
      color: white;
    }

    .region-reports-table th {
      padding: 12px;
      text-align: left;
      border: 1px solid #ddd;
      font-weight: 600;
      white-space: nowrap;
    }

    .region-reports-table td {
      padding: 12px;
      border: 1px solid #ddd;
      font-size: 0.9rem;
    }

    .region-reports-table tbody tr:hover {
      background: #f5f5f5;
    }

    /* Mobile Cards for Region Reports */
    .region-mobile-cards {
      display: none;
      flex-direction: column;
      gap: 15px;
    }

    .region-mobile-card {
      background: white;
      border-radius: 12px;
      padding: 15px;
      box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
      border-left: 4px solid #26A69A;
    }

    .region-mobile-card-row {
      display: flex;
      flex-direction: column;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
      font-size: 0.9rem;
    }

    .region-mobile-card-row:last-child {
      border-bottom: none;
    }

    .region-mobile-card-label {
      font-weight: 600;
      color: #26A69A;
      margin-bottom: 4px;
      font-size: 0.85rem;
    }

    .region-mobile-card-value {
      color: #333;
      text-align: left;
      word-break: break-word;
      font-size: 0.9rem;
    }

    .region-mobile-card-actions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    /* Responsive Styles for Region Modal */
    @media (max-width: 768px) {
      .region-modal-content {
        max-width: 95% !important;
        padding: 15px !important;
        max-height: 95vh;
        margin: 10px;
      }

      .region-modal-content .modal-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
      }

      .region-modal-content .modal-header h3 {
        font-size: 1.3rem !important;
        line-height: 1.4;
      }

      .region-modal-content .modal-close {
        font-size: 1.5rem;
        padding: 0;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .region-summary {
        margin-bottom: 15px;
      }

      .region-summary h4 {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
        line-height: 1.5;
      }

      .region-modal-content .modal-body {
        max-height: calc(95vh - 150px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      .region-table-container {
        display: none !important;
      }

      .region-mobile-cards {
        display: flex !important;
      }

      .region-mobile-card {
        padding: 15px;
        margin-bottom: 0;
      }

      .region-mobile-card-row {
        padding: 8px 0;
        font-size: 1rem;
      }

      .region-mobile-card-label {
        font-size: 1rem;
        margin-bottom: 6px;
      }

      .region-mobile-card-value {
        font-size: 1rem;
        text-align: left;
      }

      .region-mobile-card-actions {
        margin-top: 12px;
        justify-content: center;
      }

      .region-mobile-card-actions .btn-icon {
        padding: 10px 14px;
        font-size: 1rem;
        min-width: 45px;
      }

      .region-modal-content .modal-footer {
        padding-top: 10px;
        margin-top: 10px;
      }

      .region-modal-content .modal-footer .btn {
        padding: 12px 24px;
        font-size: 1rem;
      }
    }

    @media (max-width: 480px) {
      .region-modal-content {
        max-width: 98% !important;
        padding: 15px !important;
      }

      .region-modal-content .modal-header h3 {
        font-size: 1.2rem !important;
      }

      .region-summary h4 {
        font-size: 1rem !important;
      }

      .region-mobile-card {
        padding: 15px;
      }

      .region-mobile-card-row {
        font-size: 0.95rem;
      }

      .region-mobile-card-label {
        font-size: 0.95rem;
        margin-bottom: 6px;
      }

      .region-mobile-card-value {
        font-size: 0.95rem;
      }

      .region-mobile-card-actions .btn-icon {
        padding: 10px 12px;
        font-size: 0.95rem;
        min-width: 42px;
      }

      .region-modal-content .modal-footer .btn {
        font-size: 0.95rem;
      }
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 25px;
      padding-bottom: 15px;
      border-bottom: 2px solid #e0e0e0;
    }

    .modal-header h3 {
      font-size: 1.5rem;
      color: #26A69A;
    }

    .modal-close {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: #999;
      transition: all 0.3s;
    }

    .modal-close:hover {
      color: #333;
    }

    .modal-body {
      margin-bottom: 20px;
    }

    .modal-footer {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
    }

    .modal-footer .btn {
      width: auto;
      padding: 10px 25px;
    }

    /* Footer */
    .footer {
      background: white;
      padding: 20px;
      text-align: center;
      color: #666;
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
      margin-top: auto;
    }

    /* Mobile Cards */
    .mobile-cards {
      display: none;
    }

    .mobile-card {
      background: white;
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 15px;
      box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
      border-left: 4px solid #26A69A;
    }

    .mobile-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 15px;
      flex-wrap: wrap;
      gap: 10px;
    }

    .mobile-card-title {
      font-size: 1.1rem;
      font-weight: 600;
      color: #26A69A;
      margin: 0;
    }

    .mobile-card-id {
      font-size: 0.9rem;
      color: #666;
      background: #f0f0f0;
      padding: 4px 8px;
      border-radius: 4px;
    }

    .mobile-card-content {
      display: grid;
      gap: 8px;
      margin-bottom: 15px;
    }

    .mobile-card-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
      font-size: 0.9rem;
    }

    .mobile-card-row:last-child {
      border-bottom: none;
    }

    .mobile-card-label {
      font-weight: 500;
      color: #333;
      flex: 1;
    }

    .mobile-card-value {
      flex: 1;
      text-align: right;
      color: #666;
    }

    .mobile-card-actions {
      display: flex;
      gap: 8px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .mobile-card-actions .btn-icon {
      padding: 10px 15px;
      font-size: 0.9rem;
      border-radius: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* Responsive */
    @media (max-width: 1024px) {
      .two-column-layout {
        grid-template-columns: 1fr;
      }

      .dashboard-grid {
        grid-template-columns: 1fr;
      }

      .dashboard-three-column {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 768px) {

      /* On mobile: sidebar is hidden by default with .collapsed class */
      /* When .collapsed is removed (toggle), sidebar shows */
      .sidebar {
        position: fixed;
        z-index: 1001;
        width: 280px !important;
        /* Override desktop collapsed width */
      }

      .sidebar.collapsed {
        transform: translateX(-280px);
        /* Hidden off-screen */
        width: 280px !important;
        /* Maintain full width even when hidden */
      }

      .sidebar:not(.collapsed) {
        transform: translateX(0);
        /* Shown on-screen */
      }

      .main-content {
        margin-left: 0;
      }

      .main-content.collapsed {
        margin-left: 0;
      }

      .login-box {
        padding: 30px 20px;
      }

      .content-area {
        padding: 20px 15px;
      }

      .calendar-filters {
        flex-direction: column;
        align-items: center;
      }

      .filter-group input {
        width: 100%;
      }

      .filter-buttons {
        width: 100%;
        justify-content: center;
      }

      .filter-buttons .btn {
        flex: 1;
        max-width: 150px;
      }

      .datatable-header {
        flex-direction: column;
      }

      .search-box {
        max-width: 100%;
      }

      /* Hide desktop tables and show mobile cards on mobile */
      .desktop-table {
        display: none !important;
      }

      .mobile-cards {
        display: block !important;
      }
    }

    /* Scrollbar for sidebar menu */
    .sidebar-menu::-webkit-scrollbar {
      width: 4px;
    }

    .sidebar-menu::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 2px;
    }

    .sidebar-menu::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.3);
      border-radius: 2px;
    }

    .sidebar-menu::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.5);
    }

    .sidebar.collapsed .sidebar-menu::-webkit-scrollbar {
      width: 0;
    }

    /* Region Statistics Cards */
    .region-stats-container {
      display: flex;
      flex-direction: column;
      gap: 20px;
      margin-bottom: 40px;
      padding: 25px;
      border: 3px solid #e0e0e0;
      border-radius: 20px;
      background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }

    .region-title {
      text-align: center;
      font-size: 1.8rem;
      font-weight: 700;
      color: #2616af;
      margin-bottom: 15px;
      padding-bottom: 15px;
      border-bottom: 2px solid #e0e0e0;
    }

    .region-content-row {
      margin-bottom: 20px;
    }

    .region-image-section {
      width: 100%;
    }

    .region-stats-section {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .stats-cards-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 15px;
    }

    .stats-card {
      background: white;
      padding: 15px;
      border-radius: 15px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      text-align: center;
      transition: transform 0.3s, box-shadow 0.3s;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: auto;
      /* Remove fixed height to make it shorter */
    }

    .stats-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }

    .stats-card.blue {
      background: #1565C0;
      color: white;
    }

    .stats-card.orange {
      background: #FF9800;
      color: white;
    }

    .stats-card.gray {
      background: #545454;
      color: white;
    }

    /* Reorder elements to put text at top and value box at bottom */
    .stats-card-title {
      order: 1;
      font-size: 0.9rem;
      font-weight: 600;
      margin-bottom: 2px;
      line-height: 1.2;
    }

    .stats-card-label {
      order: 2;
      font-size: 0.8rem;
      opacity: 0.9;
      margin-bottom: 10px;
      font-weight: 400;
    }

    .stats-card-value {
      order: 3;
      background: rgba(0, 0, 0, 0.2);
      /* Darker inner box */
      border-radius: 8px;
      padding: 5px 0;
      font-size: 2.2rem;
      font-weight: 700;
      margin: 0;
      line-height: 1.2;
      width: 100%;
    }

    .top-diseases-table {
      background: white;
      padding: 20px;
      border-radius: 15px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .top-diseases-title {
      font-size: 1rem;
      font-weight: 600;
      color: #333;
      margin-bottom: 15px;
      text-align: center;
    }

    .disease-row {
      display: flex;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid #f0f0f0;
    }

    .disease-row:last-child {
      border-bottom: none;
    }

    .disease-color-bar {
      width: 8px;
      height: 40px;
      border-radius: 4px;
      margin-right: 12px;
      flex-shrink: 0;
    }

    .disease-color-bar.rank-1 {
      background: #FF0000;
    }

    .disease-color-bar.rank-2 {
      background: #FF6600;
    }

    .disease-color-bar.rank-3 {
      background: #FF9933;
    }

    .disease-color-bar.rank-4 {
      background: #FFCC00;
    }

    .disease-color-bar.rank-5 {
      background: #FFFF99;
    }

    .disease-info {
      flex: 1;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .disease-name {
      font-weight: 500;
      color: #333;
      font-size: 0.9rem;
    }

    .disease-stats {
      display: flex;
      gap: 15px;
      font-size: 0.85rem;
      color: #666;
    }

    .disease-stat-item {
      text-align: right;
    }

    .disease-stat-label {
      display: block;
      font-size: 0.75rem;
      color: #999;
    }

    .disease-stat-value {
      display: block;
      font-weight: 600;
      color: #333;
    }

    /* Responsive for Region Stats */
    @media (max-width: 1024px) {
      .stats-cards-row {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    @media (max-width: 768px) {
      .region-stats-container {
        padding: 15px;
        margin-bottom: 25px;
      }

      .region-title {
        font-size: 1.4rem;
      }

      .stats-cards-row {
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .region-stats-section {
        gap: 15px;
      }
    }

    /* Dashboard */
    .dashboard-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 30px;
      margin-bottom: 30px;
    }

    .dashboard-three-column {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 30px;
      margin-bottom: 30px;
    }

    .dashboard-card {
      background: white;
      border-radius: 15px;
      padding: 25px;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }

    .dashboard-card h3 {
      font-size: 1.3rem;
      color: #333;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    #map {
      height: 500px;
      border-radius: 10px;
    }

    /* Animation สำหรับจุดแดงบนแผนที่ */
    @keyframes pulse {
      0% {
        transform: scale(1);
        opacity: 1;
      }

      50% {
        transform: scale(1.3);
        opacity: 0.7;
      }

      100% {
        transform: scale(1);
        opacity: 1;
      }
    }

    /* ซ่อน background ของ custom marker */
    .custom-marker {
      background: transparent !important;
      border: none !important;
    }

    /* Custom tooltip สำหรับจุดแดง */
    .custom-tooltip {
      background: white !important;
      border: none !important;
      border-radius: 8px !important;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
      padding: 0 !important;
    }

    .custom-tooltip::before {
      border-top-color: white !important;
    }

    .leaflet-tooltip-top.custom-tooltip::before {
      border-top-color: white !important;
    }

    .leaflet-tooltip-bottom.custom-tooltip::before {
      border-bottom-color: white !important;
    }

    .leaflet-tooltip-left.custom-tooltip::before {
      border-left-color: white !important;
    }

    .leaflet-tooltip-right.custom-tooltip::before {
      border-right-color: white !important;
    }

    /* Responsive Dashboard */
    @media (max-width: 1024px) {
      .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
      }
    }

    /* Responsive Modal สำหรับหน้าจอมือถือ */
    @media (max-width: 768px) {
      .region-reports-modal .swal2-popup {
        width: 95% !important;
        max-width: 95% !important;
        padding: 15px !important;
        margin: 10px !important;
      }

      .region-reports-modal h3 {
        font-size: 1.2rem !important;
      }

      .region-reports-modal table {
        font-size: 0.7rem !important;
      }

      .region-reports-modal th,
      .region-reports-modal td {
        padding: 5px 3px !important;
      }

      .region-reports-modal th {
        font-size: 0.65rem !important;
      }

      /* Dashboard responsive for mobile */
      .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
      }

      #diseaseButtonsContainer {
        gap: 8px !important;
      }

      #diseaseButtonsContainer button {
        padding: 8px 15px !important;
        font-size: 0.8rem !important;
      }

      /* ซ่อนคอลัมน์บางส่วนในมือถือ */
      .region-reports-modal .hide-mobile {
        display: none !important;
      }

      /* ปรับสถิติรวมให้พอดีกับมือถือ */
      .region-reports-modal .swal2-html-container>div>div:first-of-type {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        padding: 15px 12px !important;
      }

      .region-reports-modal .swal2-html-container>div>div:first-of-type>div {
        padding: 12px 8px !important;
      }

      .region-reports-modal .swal2-html-container>div>div:first-of-type>div>div:nth-child(1) {
        font-size: 0.85rem !important;
      }

      .region-reports-modal .swal2-html-container>div>div:first-of-type>div>div:nth-child(2) {
        font-size: 2rem !important;
      }

      .region-reports-modal .swal2-html-container>div>div:first-of-type>div>div:nth-child(3) {
        font-size: 0.75rem !important;
      }
    }

    /* Responsive สำหรับ Map Summary page */
    @media (max-width: 768px) {
      #mapContainer {
        height: 400px !important;
      }

      #regionMap {
        height: 400px !important;
      }

      .legend {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 12px !important;
      }

      .legend-item {
        font-size: 0.85rem;
      }
    }

    .stats-list {
      display: flex;
      flex-direction: column;
      gap: 15px;
    }

    .stat-item {
      background: linear-gradient(135deg, #26A69A, #AED581);
      padding: 20px;
      border-radius: 10px;
      color: white;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .stat-label {
      font-size: 1rem;
      opacity: 0.9;
    }

    .stat-value {
      font-size: 2rem;
      font-weight: 700;
    }

    /* DataTable */
    .datatable-container {
      background: white;
      border-radius: 15px;
      padding: 25px;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }

    .datatable-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      flex-wrap: wrap;
      gap: 15px;
    }

    .search-box {
      display: flex;
      gap: 10px;
      flex: 1;
      max-width: 400px;
    }

    .search-box input {
      flex: 1;
      padding: 10px 15px;
      border: 2px solid #e0e0e0;
      border-radius: 10px;
      font-family: 'Kanit', sans-serif;
    }

    .datatable {
      overflow-x: auto;
    }

    .datatable table {
      width: 100%;
      border-collapse: collapse;
    }

    .datatable th {
      background: #26A69A;
      color: white;
      padding: 15px 10px;
      text-align: left;
      font-weight: 600;
      white-space: nowrap;
    }

    .datatable td {
      padding: 15px 10px;
      border-bottom: 1px solid #e0e0e0;
    }

    .datatable tr:hover {
      background: #f5f5f5;
    }

    .action-buttons {
      display: flex;
      gap: 8px;
    }

    .btn-icon {
      padding: 8px 12px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.3s;
      font-size: 0.9rem;
    }

    .btn-edit {
      background: #FFCA28;
      color: #333;
    }

    .btn-edit:hover {
      background: #f5b800;
    }

    .btn-delete {
      background: #EF5350;
      color: white;
    }

    .btn-delete:hover {
      background: #e53935;
    }

    /* Modal */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 2000;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .modal.active {
      display: flex;
    }

    .modal-content {
      background: white;
      border-radius: 20px;
      padding: 30px;
      max-width: 600px;
      width: 100%;
      max-height: 90%;
      overflow-y: auto;
      position: relative;
    }

    /* Region Modal Specific Styles */
    .region-modal-content {
      max-width: 1200px;
    }

    .region-summary {
      margin-bottom: 20px;
    }

    .region-table-container {
      overflow-x: auto;
      margin-top: 20px;
    }

    .region-reports-table {
      width: 100%;
      border-collapse: collapse;
      min-width: 800px;
    }

    .region-reports-table thead tr {
      background: #26A69A;
      color: white;
    }

    .region-reports-table th {
      padding: 12px;
      text-align: left;
      border: 1px solid #ddd;
      font-weight: 600;
      white-space: nowrap;
    }

    .region-reports-table td {
      padding: 12px;
      border: 1px solid #ddd;
      font-size: 0.9rem;
    }

    .region-reports-table tbody tr:hover {
      background: #f5f5f5;
    }

    /* Mobile Cards for Region Reports */
    .region-mobile-cards {
      display: none;
      flex-direction: column;
      gap: 15px;
    }

    .region-mobile-card {
      background: white;
      border-radius: 12px;
      padding: 15px;
      box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
      border-left: 4px solid #26A69A;
    }

    .region-mobile-card-row {
      display: flex;
      flex-direction: column;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
      font-size: 0.9rem;
    }

    .region-mobile-card-row:last-child {
      border-bottom: none;
    }

    .region-mobile-card-label {
      font-weight: 600;
      color: #26A69A;
      margin-bottom: 4px;
      font-size: 0.85rem;
    }

    .region-mobile-card-value {
      color: #333;
      text-align: left;
      word-break: break-word;
      font-size: 0.9rem;
    }

    .region-mobile-card-actions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    /* Responsive Styles for Region Modal */
    @media (max-width: 768px) {
      .region-modal-content {
        max-width: 95% !important;
        padding: 15px !important;
        max-height: 95vh;
        margin: 10px;
      }

      .region-modal-content .modal-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
      }

      .region-modal-content .modal-header h3 {
        font-size: 1.3rem !important;
        line-height: 1.4;
      }

      .region-modal-content .modal-close {
        font-size: 1.5rem;
        padding: 0;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .region-summary {
        margin-bottom: 15px;
      }

      .region-summary h4 {
        font-size: 1.1rem !important;
        margin-bottom: 10px !important;
        line-height: 1.5;
      }

      .region-modal-content .modal-body {
        max-height: calc(95vh - 150px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      .region-table-container {
        display: none !important;
      }

      .region-mobile-cards {
        display: flex !important;
      }

      .region-mobile-card {
        padding: 15px;
        margin-bottom: 0;
      }

      .region-mobile-card-row {
        padding: 8px 0;
        font-size: 1rem;
      }

      .region-mobile-card-label {
        font-size: 1rem;
        margin-bottom: 6px;
      }

      .region-mobile-card-value {
        font-size: 1rem;
        text-align: left;
      }

      .region-mobile-card-actions {
        margin-top: 12px;
        justify-content: center;
      }

      .region-mobile-card-actions .btn-icon {
        padding: 10px 14px;
        font-size: 1rem;
        min-width: 45px;
      }

      .region-modal-content .modal-footer {
        padding-top: 10px;
        margin-top: 10px;
      }

      .region-modal-content .modal-footer .btn {
        padding: 12px 24px;
        font-size: 1rem;
      }
    }

    @media (max-width: 480px) {
      .region-modal-content {
        max-width: 98% !important;
        padding: 15px !important;
      }

      .region-modal-content .modal-header h3 {
        font-size: 1.2rem !important;
      }

      .region-summary h4 {
        font-size: 1rem !important;
      }

      .region-mobile-card {
        padding: 15px;
      }

      .region-mobile-card-row {
        font-size: 0.95rem;
      }

      .region-mobile-card-label {
        font-size: 0.95rem;
        margin-bottom: 6px;
      }

      .region-mobile-card-value {
        font-size: 0.95rem;
      }

      .region-mobile-card-actions .btn-icon {
        padding: 10px 12px;
        font-size: 0.95rem;
        min-width: 42px;
      }

      .region-modal-content .modal-footer .btn {
        font-size: 0.95rem;
      }
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 25px;
      padding-bottom: 15px;
      border-bottom: 2px solid #e0e0e0;
    }

    .modal-header h3 {
      font-size: 1.5rem;
      color: #26A69A;
    }

    .modal-close {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: #999;
      transition: all 0.3s;
    }

    .modal-close:hover {
      color: #333;
    }

    .modal-body {
      margin-bottom: 20px;
    }

    .modal-footer {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
    }

    .modal-footer .btn {
      width: auto;
      padding: 10px 25px;
    }

    /* Footer */
    .footer {
      background: white;
      padding: 20px;
      text-align: center;
      color: #666;
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
      margin-top: auto;
    }

    /* Mobile Cards */
    .mobile-cards {
      display: none;
    }

    .mobile-card {
      background: white;
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 15px;
      box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
      border-left: 4px solid #26A69A;
    }

    .mobile-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 15px;
      flex-wrap: wrap;
      gap: 10px;
    }

    .mobile-card-title {
      font-size: 1.1rem;
      font-weight: 600;
      color: #26A69A;
      margin: 0;
    }

    .mobile-card-id {
      font-size: 0.9rem;
      color: #666;
      background: #f0f0f0;
      padding: 4px 8px;
      border-radius: 4px;
    }

    .mobile-card-content {
      display: grid;
      gap: 8px;
      margin-bottom: 15px;
    }

    .mobile-card-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 0;
      border-bottom: 1px solid #f0f0f0;
      font-size: 0.9rem;
    }

    .mobile-card-row:last-child {
      border-bottom: none;
    }

    .mobile-card-label {
      font-weight: 500;
      color: #333;
      flex: 1;
    }

    .mobile-card-value {
      flex: 1;
      text-align: right;
      color: #666;
    }

    .mobile-card-actions {
      display: flex;
      gap: 8px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .mobile-card-actions .btn-icon {
      padding: 10px 15px;
      font-size: 0.9rem;
      border-radius: 8px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* Responsive */
    @media (max-width: 1024px) {
      .two-column-layout {
        grid-template-columns: 1fr;
      }

      .dashboard-grid {
        grid-template-columns: 1fr;
      }

      .dashboard-three-column {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 768px) {

      /* On mobile: sidebar is hidden by default with .collapsed class */
      /* When .collapsed is removed (toggle), sidebar shows */
      .sidebar {
        position: fixed;
        z-index: 1001;
        width: 280px !important;
        /* Override desktop collapsed width */
      }

      .sidebar.collapsed {
        transform: translateX(-280px);
        /* Hidden off-screen */
        width: 280px !important;
        /* Maintain full width even when hidden */
      }

      .sidebar:not(.collapsed) {
        transform: translateX(0);
        /* Shown on-screen */
      }

      .main-content {
        margin-left: 0;
      }

      .main-content.collapsed {
        margin-left: 0;
      }

      .login-box {
        padding: 30px 20px;
      }

      .content-area {
        padding: 20px 15px;
      }

      .calendar-filters {
        flex-direction: column;
        align-items: center;
      }

      .filter-group input {
        width: 100%;
      }

      .filter-buttons {
        width: 100%;
        justify-content: center;
      }

      .filter-buttons .btn {
        flex: 1;
        max-width: 150px;
      }

      .datatable-header {
        flex-direction: column;
      }

      .search-box {
        max-width: 100%;
      }

      /* Hide desktop tables and show mobile cards on mobile */
      .desktop-table {
        display: none !important;
      }

      .mobile-cards {
        display: block !important;
      }
    }

    /* Scrollbar for sidebar menu */
    .sidebar-menu::-webkit-scrollbar {
      width: 4px;
    }

    .sidebar-menu::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 2px;
    }

    .sidebar-menu::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.3);
      border-radius: 2px;
    }

    .sidebar-menu::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.5);
    }

    .sidebar.collapsed .sidebar-menu::-webkit-scrollbar {
      width: 0;
    }

    /* Region Statistics Cards */
    .region-stats-container {
      display: flex;
      flex-direction: column;
      gap: 20px;
      margin-bottom: 40px;
      padding: 25px;
      border: 3px solid #e0e0e0;
      border-radius: 20px;
      background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }

    .region-title {
      text-align: center;
      font-size: 1.8rem;
      font-weight: 700;
      color: #2616af;
      margin-bottom: 15px;
      padding-bottom: 15px;
      border-bottom: 2px solid #e0e0e0;
    }

    .region-content-row {
      margin-bottom: 20px;
    }

    .region-image-section {
      width: 100%;
    }

    .region-stats-section {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .stats-cards-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 15px;
    }

    .stats-card {
      background: white;
      padding: 15px;
      border-radius: 15px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      text-align: center;
      transition: transform 0.3s, box-shadow 0.3s;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: auto;
      /* Remove fixed height to make it shorter */
    }

    .stats-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }

    .stats-card.blue {
      background: #1565C0;
      color: white;
    }

    .stats-card.orange {
      background: #FF9800;
      color: white;
    }

    .stats-card.gray {
      background: #545454;
      color: white;
    }

    /* Reorder elements to put text at top and value box at bottom */
    .stats-card-title {
      order: 1;
      font-size: 0.9rem;
      font-weight: 600;
      margin-bottom: 2px;
      line-height: 1.2;
    }

    .stats-card-label {
      order: 2;
      font-size: 0.8rem;
      opacity: 0.9;
      margin-bottom: 10px;
      font-weight: 400;
    }

    .stats-card-value {
      order: 3;
      background: rgba(0, 0, 0, 0.2);
      /* Darker inner box */
      border-radius: 8px;
      padding: 5px 0;
      font-size: 2.2rem;
      font-weight: 700;
      margin: 0;
      line-height: 1.2;
      width: 100%;
    }

    .top-diseases-table {
      background: white;
      padding: 20px;
      border-radius: 15px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .top-diseases-title {
      font-size: 1rem;
      font-weight: 600;
      color: #333;
      margin-bottom: 15px;
      text-align: center;
    }

    .disease-row {
      display: flex;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid #f0f0f0;
    }

    .disease-row:last-child {
      border-bottom: none;
    }

    .disease-color-bar {
      width: 8px;
      height: 40px;
      border-radius: 4px;
      margin-right: 12px;
      flex-shrink: 0;
    }

    .disease-color-bar.rank-1 {
      background: #FF0000;
    }

    .disease-color-bar.rank-2 {
      background: #FF6600;
    }

    .disease-color-bar.rank-3 {
      background: #FF9933;
    }

    .disease-color-bar.rank-4 {
      background: #FFCC00;
    }

    .disease-color-bar.rank-5 {
      background: #FFFF99;
    }

    .disease-info {
      flex: 1;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .disease-name {
      font-weight: 500;
      color: #333;
      font-size: 0.9rem;
    }

    .disease-stats {
      display: flex;
      gap: 15px;
      font-size: 0.85rem;
      color: #666;
    }

    .disease-stat-item {
      text-align: right;
    }

    .disease-stat-label {
      display: block;
      font-size: 0.75rem;
      color: #999;
    }

    .disease-stat-value {
      display: block;
      font-weight: 600;
      color: #333;
    }

    /* Responsive for Region Stats */
    @media (max-width: 1024px) {
      .stats-cards-row {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    @media (max-width: 768px) {
      .region-stats-container {
        padding: 15px;
        margin-bottom: 25px;
      }

      .region-stats-section {
        display: flex;
        flex-direction: column;
        gap: 20px;
      }

      .stats-cards-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
      }

      .stats-card {
        background: white;
        padding: 15px;
        border-radius: 15px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        text-align: center;
        transition: transform 0.3s, box-shadow 0.3s;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: auto;
        /* Remove fixed height to make it shorter */
      }

      .stats-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
      }

      .stats-card.blue {
        background: #1565C0;
        color: white;
      }

      .stats-card.orange {
        background: #FF9800;
        color: white;
      }

      .stats-card.gray {
        background: #545454;
        color: white;
      }

      /* Reorder elements to put text at top and value box at bottom */
      .stats-card-title {
        order: 1;
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 2px;
        line-height: 1.2;
      }

      .stats-card-label {
        order: 2;
        font-size: 0.8rem;
        opacity: 0.9;
        margin-bottom: 10px;
        font-weight: 400;
      }

      .stats-card-value {
        order: 3;
        background: rgba(0, 0, 0, 0.2);
        /* Darker inner box */
        border-radius: 8px;
        padding: 5px 0;
        font-size: 2.2rem;
        font-weight: 700;
        margin: 0;
        line-height: 1.2;
        width: 100%;
      }

      .top-diseases-table {
        background: white;
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
      }

      .top-diseases-title {
        font-size: 1rem;
        font-weight: 600;
        color: #333;
        margin-bottom: 15px;
        text-align: center;
      }

      .disease-row {
        display: flex;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
      }

      .disease-row:last-child {
        border-bottom: none;
      }

      .disease-color-bar {
        width: 8px;
        height: 40px;
        border-radius: 4px;
        margin-right: 12px;
        flex-shrink: 0;
      }

      .disease-color-bar.rank-1 {
        background: #FF0000;
      }

      .disease-color-bar.rank-2 {
        background: #FF6600;
      }

      .disease-color-bar.rank-3 {
        background: #FF9933;
      }

      .disease-color-bar.rank-4 {
        background: #FFCC00;
      }

      .disease-color-bar.rank-5 {
        background: #FFFF99;
      }

      .disease-info {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .disease-name {
        font-weight: 500;
        color: #333;
        font-size: 0.9rem;
      }

      .disease-stats {
        display: flex;
        gap: 15px;
        font-size: 0.85rem;
        color: #666;
      }

      .disease-stat-item {
        text-align: right;
      }

      .disease-stat-label {
        display: block;
        font-size: 0.75rem;
        color: #999;
      }

      .disease-stat-value {
        display: block;
        font-weight: 600;
        color: #333;
      }

      /* Responsive for Region Stats */
      @media (max-width: 1024px) {
        .stats-cards-row {
          grid-template-columns: repeat(3, 1fr);
        }
      }

      @media (max-width: 768px) {
        .region-stats-container {
          padding: 15px;
          margin-bottom: 25px;
        }

        .region-title {
          font-size: 1.4rem;
        }

        .stats-cards-row {
          grid-template-columns: 1fr;
          gap: 10px;
        }

        .region-stats-section {
          gap: 15px;
        }
      }

      /* Modal Z-Index Fix - Ensure modals appear above SweetAlert2 */
      .modal.active {
        z-index: 10100 !important;
      }

      /* Specific fix for nested modals */
      #reportDetailModal {
        z-index: 10200 !important;
      }

      #editReportModal {
        z-index: 10300 !important;
      }
    }

    /* ==========================================
       Weekly Trend Dashboard - Modern Redesign
       ========================================== */

    /* Main Container with Glassmorphism */
    .weekly-trend-container {
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
      backdrop-filter: blur(20px);
      border-radius: 24px;
      padding: 30px;
      box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
      border: 1px solid rgba(255, 255, 255, 0.6);
      position: relative;
      overflow: hidden;
    }

    .weekly-trend-container::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, #26A69A, #00BCD4, #4DD0E1, #26A69A);
      background-size: 300% 100%;
      animation: gradientShift 4s ease infinite;
    }

    @keyframes gradientShift {

      0%,
      100% {
        background-position: 0% 50%;
      }

      50% {
        background-position: 100% 50%;
      }
    }

    /* Header with Animated Icon */
    .weekly-trend-header {
      text-align: center;
      margin-bottom: 25px;
    }

    .weekly-trend-header h3 {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      font-size: 1.6rem;
      font-weight: 700;
      background: linear-gradient(135deg, #1565C0, #00ACC1);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin: 0;
    }

    .weekly-trend-header .header-icon {
      font-size: 1.8rem;
      color: #26A69A;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        transform: scale(1);
        opacity: 1;
      }

      50% {
        transform: scale(1.1);
        opacity: 0.8;
      }
    }

    /* Controls Row */
    .weekly-trend-controls {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 20px;
      margin-bottom: 25px;
      padding: 15px 20px;
      background: linear-gradient(135deg, rgba(38, 166, 154, 0.08), rgba(0, 188, 212, 0.05));
      border-radius: 16px;
      flex-wrap: wrap;
    }

    .weekly-trend-disease-name {
      font-size: 1.4rem;
      font-weight: 700;
      color: #1565C0;
      min-width: 180px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .weekly-trend-disease-name::before {
      content: '🦠';
      font-size: 1.5rem;
    }

    /* Styled Dropdown */
    .weekly-trend-select {
      padding: 10px 20px;
      border-radius: 30px;
      border: 2px solid #E0E7EE;
      font-family: 'Kanit', sans-serif;
      font-size: 0.95rem;
      font-weight: 500;
      color: #333;
      background: white;
      cursor: pointer;
      transition: all 0.3s ease;
      min-width: 200px;
      text-align: center;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 15px center;
      padding-right: 40px;
    }

    .weekly-trend-select:hover {
      border-color: #26A69A;
      box-shadow: 0 4px 12px rgba(38, 166, 154, 0.15);
    }

    .weekly-trend-select:focus {
      outline: none;
      border-color: #26A69A;
      box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.2);
    }

    .weekly-trend-select.week-select {
      background: linear-gradient(135deg, #E3F2FD, #FFF);
      min-width: 300px;
    }

    /* Dashboard Grid */
    .weekly-trend-dashboard {
      display: grid;
      grid-template-columns: 260px 1fr 260px;
      gap: 20px;
      min-height: 350px;
    }

    /* Stat Cards - Left Side */
    .weekly-trend-stat-card {
      background: linear-gradient(145deg, #1565C0 0%, #0D47A1 50%, #0A2463 100%);
      border-radius: 20px;
      padding: 25px;
      color: white;
      display: flex;
      flex-direction: column;
      justify-content: center;
      box-shadow:
        0 10px 30px rgba(21, 101, 192, 0.35),
        0 5px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
      position: relative;
      overflow: hidden;
    }

    .weekly-trend-stat-card::before {
      content: '';
      position: absolute;
      top: -50%;
      right: -50%;
      width: 100%;
      height: 100%;
      background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    }

    .weekly-trend-stat-card::after {
      content: '📊';
      position: absolute;
      bottom: 10px;
      right: 15px;
      font-size: 3rem;
      opacity: 0.15;
    }

    .stat-card-label {
      font-size: 0.9rem;
      opacity: 0.85;
      text-align: center;
      margin-bottom: 10px;
      font-weight: 400;
    }

    .stat-card-value {
      font-size: 2.8rem;
      font-weight: 800;
      text-align: center;
      line-height: 1.1;
      color: #FFD54F;
      text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
      animation: countUp 0.6s ease-out;
    }

    @keyframes countUp {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .stat-card-divider {
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
      margin: 20px 0;
    }

    .stat-card-sub-label {
      font-size: 0.8rem;
      opacity: 0.75;
      text-align: center;
      margin-bottom: 8px;
    }

    .stat-card-sub-value {
      font-size: 1.4rem;
      font-weight: 600;
      text-align: center;
    }

    /* Chart Container */
    .weekly-trend-chart-container {
      background: #FAFBFC;
      border-radius: 16px;
      padding: 20px;
      box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.03),
        0 1px 3px rgba(0, 0, 0, 0.05);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .weekly-trend-chart-container::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background:
        radial-gradient(ellipse at top left, rgba(38, 166, 154, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(0, 188, 212, 0.03) 0%, transparent 50%);
      border-radius: 16px;
      pointer-events: none;
    }

    .weekly-trend-chart-container canvas {
      max-height: 320px;
      width: 100% !important;
      position: relative;
      z-index: 1;
    }

    /* Change Card - Right Side */
    .weekly-trend-change-card {
      background: linear-gradient(145deg, #FFF9C4 0%, #FFF59D 100%);
      border-radius: 20px;
      padding: 25px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      box-shadow:
        0 8px 25px rgba(255, 202, 40, 0.25),
        0 3px 10px rgba(0, 0, 0, 0.05);
      border: 1px solid rgba(255, 193, 7, 0.3);
    }

    .change-card-title {
      font-size: 0.85rem;
      color: #5D4037;
      text-align: center;
      margin-bottom: 20px;
      font-weight: 600;
      line-height: 1.4;
    }

    .change-card-item {
      background: white;
      border-radius: 14px;
      padding: 15px;
      margin-bottom: 12px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .change-card-item:last-child {
      margin-bottom: 0;
    }

    .change-card-item:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .change-card-item-label {
      font-size: 0.75rem;
      color: #666;
      text-align: center;
      margin-bottom: 8px;
    }

    .change-card-item-value {
      font-size: 1.6rem;
      font-weight: 700;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .change-card-item-value.increase {
      color: #E53935;
    }

    .change-card-item-value.decrease {
      color: #43A047;
    }

    .change-arrow {
      font-size: 1.2rem;
      animation: bounce 1s ease-in-out infinite;
    }

    @keyframes bounce {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-3px);
      }
    }

    /* Responsive Design */
    @media (max-width: 1200px) {
      .weekly-trend-dashboard {
        grid-template-columns: 1fr;
        gap: 15px;
      }

      .weekly-trend-stat-card,
      .weekly-trend-change-card {
        max-width: 100%;
      }

      .weekly-trend-chart-container canvas {
        max-height: 280px;
      }
    }

    @media (max-width: 768px) {
      .weekly-trend-container {
        padding: 20px;
        border-radius: 16px;
      }

      .weekly-trend-header h3 {
        font-size: 1.3rem;
      }

      .weekly-trend-controls {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
      }

      .weekly-trend-disease-name {
        font-size: 1.2rem;
        justify-content: center;
      }

      .weekly-trend-select {
        width: 100%;
        min-width: unset;
      }

      .weekly-trend-select.week-select {
        min-width: unset;
      }

      .stat-card-value {
        font-size: 2.2rem;
      }

      .change-card-item-value {
        font-size: 1.3rem;
      }
    }

    /* Infection Chart Summary Cards */
    .infection-summary-card {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .infection-summary-card:hover {
      transform: translateY(-3px) scale(1.02);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35) !important;
    }

    /* Responsive grid for infection chart and cards */
    @media (max-width: 992px) {
      .infection-chart-grid {
        grid-template-columns: 1fr !important;
      }

      .infection-chart-grid>div:last-child {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
      }
    }

    @media (max-width: 576px) {
      .infection-chart-grid>div:last-child {
        grid-template-columns: 1fr;
      }

      .infection-summary-card {
        padding: 12px !important;
      }

      .infection-summary-card div:last-child {
        font-size: 1.5rem !important;
      }
    }