

        .pdf-modal .modal-dialog {
            max-width: 98vw;
            width: 98vw;
            height: 98vh;
            margin: 1vh;
        }

        .pdf-modal .modal-content {
            height: 98vh;
            border: none;
            /*
            border-radius: 14px;
            */
            overflow: hidden;
        }

        .viewer-layout {
            display: flex;
            height: calc(96vh - 45px);
            overflow: hidden;
        }

        .thumb-sidebar {
            width: 180px;
            background: #f1f3f5;
            border-right: 1px solid #ddd;
            overflow-y: auto;
            padding: 10px;
        }

        .thumb-item {
            margin-bottom: 10px;
            padding: 6px;
            border: 2px solid transparent;
            border-radius: 8px;
            background: #fff;
            cursor: pointer;
        }

        .thumb-item.active {
            border-color: #0d6efd;
        }

        .thumb-item canvas {
            width: 100%;
            height: auto;
            display: block;
        }

        .thumb-label {
            text-align: center;
            font-size: 12px;
            margin-top: 4px;
        }

        .viewer-area {
            position: relative;
            flex: 1;
            overflow: hidden;
            background: #7f8c8d;
        }

        .viewer-scroll {
            width: 100%;
            height: 100%;
            /*
            overflow: auto;
            */
            overflow: hidden;
            cursor: grab;
            position: relative;
        }

        .viewer-scroll.dragging {
          cursor: grabbing;
        }

        .canvas-wrap {
            min-width: 100%;
            min-height: 100%;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding: 10px;
            position: relative;
        }

        #pdf-canvas {
            background: #fff;
            box-shadow: 0 3px 16px rgba(0,0,0,.35);
        }

        .toolbar-top {
            background: #fff;
            border-bottom: 1px solid #e5e5e5;
            padding: 8px 8px;
        }

        .toolbar-bottom {
            background: #fff;
            
            padding: 0;

            border-top: 1px solid #e5e5e5;
            border-bottom: none;
        }

        .toolbar-group {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }

        .status-box {
            font-size: 14px;
            font-weight: 600;
            padding: 6px 10px 0 10px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .search-result {
            font-size: 13px;
            color: #444;
        }

        .modal-title {
            font-size: 15px;
            font-weight: 600;
        }

  .btn-circle {
      width: 34px;
      height: 34px;
      padding: 0;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: bold;
  }

  .btn-circle-sm {
      width: 34px;
      height: 34px;
      font-size: 14px;
  }

  .btn-circle-lg {
      width: 50px;
      height: 50px;
      font-size: 18px;
  }

   /* ปุ่มควบคุมแบบลอย */
        .controls-overlay {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(255, 255, 255, 0.4); /* พื้นหลังโปร่งใส */
            backdrop-filter: blur(10px); /* เอฟเฟกต์เบลอ */
            padding: 13px 25px 0 25px;
            border-radius: 30px;
            display: flex;
            gap: 15px;
            z-index: 100;
            border: 1px solid rgba(255,255,255,0.5);
        }

        .controls-overlay button,.controls-overlay a {
            color: #444;
            background: none;
            border: none;
            font-size: 1.3rem;
            cursor: pointer;
            transition: 0.2s;
        }

        .controls-overlay button:hover,.controls-overlay a:hover {
            color: #ffc107;
            transform: scale(1.2);
        }

        @media (max-width: 768px) {
            .thumb-sidebar {
                display: none;
            }

            .toolbar-group {
                gap: 6px;
            }

            .status-box {
              font-size: 12px;
            }
        }