     /* ===== TOOL HEADER ===== */
  .tool-header {
    text-align: center;
    padding: 3rem 2rem 1rem;
    background: var(--accent);
    background-size: cover;
  }
  
  .tool-header-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
  }
  
  .tool-title {
    font-size: 2.8rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    font-weight: 800;
  }
  
  .tool-subtitle {
    font-size: 1.2rem;
    color: var(--secondary-light);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
  }
  
  .tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(44, 62, 80, 0.08);
    color: var(--secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.95rem;
    margin-top: 1rem;
  }
  
  .tool-header-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 2.5rem;
    opacity: 0.9;
  }
  
  .graphic-pdf, .graphic-pdf-second {
    width: 100px;
    height: 130px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    transform: rotate(3deg);
  }
  
  .graphic-pdf {
    background: var(--primary);
  }
  
  .graphic-pdf-second {
    background: var(--secondary);
    transform: rotate(-3deg);
  }
  
  .graphic-pdf i, .graphic-pdf-second i {
    font-size: 3.5rem;
    color: var(--light);
  }
  
  .graphic-arrow i {
    font-size: 2.5rem;
    color: var(--secondary-light);
    opacity: 0.7;
  }
  
  .tool-container {
    max-width: 1400px;
    margin: -50px auto 0;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 10;
  }
  
  .tool-wrapper {
    background: var(--light);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
  }
  
  /* ===== UPLOAD AREA ===== */
  .upload-area {
    border: 2px dashed rgba(51, 51, 51, 0.2);
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    transition: all 0.3s;
    background: var(--accent);
    cursor: pointer;
    margin: 2.5rem;
    position: relative;
    transition: all 0.3s ease;
  }
  
  .upload-area.highlight {
    border-color: var(--primary);
    background: rgba(217, 79, 79, 0.03);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  }
  
  .upload-icon {
    font-size: 4.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    opacity: 0.8;
  }
  
  .upload-text h3 {
    font-size: 1.6rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
  }
  
  .upload-text p {
    color: var(--secondary-light);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
  }
  
  .upload-btn {
    display: inline-block;
    background: var(--primary);
    color: var(--light);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(217, 79, 79, 0.3);
    cursor: pointer;
    border: none;
    font-size: 1.05rem;
    margin-top: 1rem;
  }
  
  .upload-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(217, 79, 79, 0.4);
  }
  
  .file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
  }
  
  .upload-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
  }
  
  .feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(44, 62, 80, 0.05);
    padding: 0.7rem 1.3rem;
    border-radius: 30px;
    font-size: 0.95rem;
    color: var(--secondary);
  }
  
  /* ===== EDITOR ===== */
  .editor-container {
    height: 80vh;
    display: flex;
    flex-direction: column;
  }
  
  .editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--accent);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .file-icon {
    width: 40px;
    height: 40px;
    background: rgba(217, 79, 79, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .file-icon i {
    color: var(--primary);
    font-size: 1.2rem;
  }
  
  .file-details {
    display: flex;
    flex-direction: column;
  }
  
  .file-name {
    font-weight: 600;
    color: var(--secondary);
    font-size: 1.1rem;
  }
  
  .file-size {
    font-size: 0.9rem;
    color: var(--secondary-light);
  }
  
  .editor-actions {
    display: flex;
    gap: 1rem;
  }
  
  .action-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light);
    color: var(--secondary);
    border: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .action-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
  }
  
  .action-btn.primary {
    background: var(--primary);
    color: var(--light);
    border-color: var(--primary);
  }
  
  .action-btn.primary:hover {
    background: var(--primary-dark);
  }
  
  .action-btn.danger {
    background: var(--danger);
    color: var(--light);
    border-color: var(--danger);
  }
  
  .action-btn.danger:hover {
    background: #c62828;
  }
  
  /* ===== MAIN TOOLBAR ===== */
  .main-toolbar {
    display: flex;
    gap: 2rem;
    padding: 1rem 2rem;
    background: var(--light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
  }
  
  .tool-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .tool-section h4 {
    font-size: 0.9rem;
    color: var(--secondary-light);
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  .tool-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }
  
  .tool-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: var(--light);
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
  }
  
  .tool-btn:hover {
    background: var(--accent);
    border-color: var(--primary);
    color: var(--primary);
  }
  
  .tool-btn.active {
    background: var(--primary);
    color: var(--light);
    border-color: var(--primary);
  }
  
  .tool-btn.danger {
    color: var(--danger);
  }
  
  .tool-btn.danger:hover {
    background: var(--danger);
    color: var(--light);
  }
  
  /* ===== EDITOR CONTENT ===== */
  .editor-content {
    display: flex;
    flex: 1;
    overflow: hidden;
  }
  
  .pdf-preview-container {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 1rem;
    max-height: 70vh;
    position: relative;
  }
  
  .pdf-pages {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    min-height: 100%;
  }
  
  .pdf-page {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 100%;
    transition: transform 0.3s ease;
  }
  
  .pdf-page:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  }
  
  .page-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
  }
  
  .page-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .nav-btn {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: var(--light);
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-btn:hover {
    background: var(--accent);
    border-color: var(--primary);
    color: var(--primary);
  }
  
  .nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  #pageInfo {
    font-weight: 500;
    color: var(--secondary);
    min-width: 100px;
    text-align: center;
  }
  
  .zoom-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 500;
  }
  
  #zoomLevel {
    font-weight: 600;
    color: var(--primary);
  }
  
  /* Properties Panel */
  .properties-panel {
    width: 280px;
    background: var(--light);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
  }
  
  /* Custom scrollbar for properties panel */
  .properties-panel::-webkit-scrollbar {
    width: 6px;
  }
  
  .properties-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
  }
  
  .properties-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
  }
  
  .properties-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
  }
  
  .properties-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .properties-header h4 {
    color: var(--secondary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
  }
  
  .property-group {
    margin-bottom: 1.5rem;
  }
  
  .property-group label {
    display: block;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }
  
  .property-group select,
  .property-group input[type="range"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: var(--light);
    color: var(--secondary);
    font-size: 0.9rem;
  }
  
  .property-group select:focus,
  .property-group input[type="range"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(217, 79, 79, 0.1);
  }
  
  .style-buttons {
    display: flex;
    gap: 0.5rem;
  }
  
  .style-btn {
    width: 35px;
    height: 35px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: var(--light);
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .style-btn:hover {
    background: var(--accent);
    border-color: var(--primary);
    color: var(--primary);
  }
  
  .style-btn.active {
    background: var(--primary);
    color: var(--light);
    border-color: var(--primary);
  }
  
  .color-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
  }
  
  .color-option:hover {
    transform: scale(1.1);
  }
  
  .color-option.active {
    border-color: var(--secondary);
  }
  
  .color-option.red { background: #e53935; }
  .color-option.blue { background: #1e88e5; }
  .color-option.green { background: #43a047; }
  .color-option.black { background: #212529; }
  .color-option.yellow { background: #fdd835; }
  .color-option.purple { background: #8e24aa; }
  .color-option.orange { background: #ff9800; }
  .color-option.gray { background: #757575; }
  
  .property-btn {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: var(--light);
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
  }
  
  .property-btn:hover {
    background: var(--accent);
    border-color: var(--primary);
    color: var(--primary);
  }
  
  .property-btn.danger {
    color: var(--danger);
    border-color: var(--danger);
  }
  
  .property-btn.danger:hover {
    background: var(--danger);
    color: var(--light);
  }
  
  /* ===== RESPONSIVE ===== */
  @media (max-width: 1200px) {
    .editor-content {
      flex-direction: column;
    }
    
    .properties-panel {
      width: 100%;
      border-left: none;
      border-top: 1px solid rgba(0, 0, 0, 0.1);
      max-height: 200px;
    }
    
    .main-toolbar {
      flex-wrap: wrap;
      gap: 1rem;
    }
  }
  
  @media (max-width: 768px) {
    .tool-container {
      padding: 0 1rem 2rem;
    }
    
    .editor-header {
      flex-direction: column;
      gap: 1rem;
      align-items: flex-start;
    }
    
    .editor-actions {
      width: 100%;
      justify-content: space-between;
    }
    
    .main-toolbar {
      padding: 1rem;
    }
    
    .tool-section {
      flex: 1;
      min-width: 200px;
    }
    
    .pdf-pages {
      padding: 1rem;
    }
    
    .page-canvas {
      max-width: 100%;
      height: auto;
    }
  }
  
  @media (max-width: 576px) {
    .tool-header {
      padding: 3rem 1rem 1rem;
    }
    
    .tool-title {
      font-size: 1.8rem;
    }
    
    .tool-subtitle {
      font-size: 1rem;
    }
    
    .tool-header-graphic {
      gap: 1rem;
    }
    
    .graphic-pdf {
      width: 60px;
      height: 80px;
    }
    
    .graphic-pdf i {
      font-size: 2rem;
    }
    
    .graphic-arrow i {
      font-size: 1.8rem;
    }
    
    .upload-area {
      margin: 1rem;
      padding: 1.5rem;
    }
    
    .upload-icon {
      font-size: 3.5rem;
    }
    
    .upload-text h3 {
      font-size: 1.3rem;
    }
    
    .upload-btn {
      padding: 0.8rem 1.8rem;
    }
  }
  
  .error-message,
  .success-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
  }
  
  .error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
  
  .success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
  }
  
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  /* Annotation layer */
.annotation-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 10;
  }
  
  /* Cursor styles for different tools */
  .pdf-page[data-tool="select"] .annotation-layer {
    cursor: crosshair;
  }
  
  .pdf-page[data-tool="text"] .annotation-layer {
    cursor: text;
  }
  
  .pdf-page[data-tool="shape"] .annotation-layer {
    cursor: crosshair;
  }
  
  .pdf-page[data-tool="highlight"] .annotation-layer {
    cursor: crosshair;
  }
  
  .pdf-page[data-tool="comment"] .annotation-layer {
    cursor: crosshair;
  }
  
  /* Text annotations */
  .text-annotation {
    position: absolute;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    color: var(--secondary);
    resize: none;
    overflow: hidden;
  }
  
  /* Drawing canvas */
  .drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
  }

/* ===== INSTRUCTIONS PANEL ===== */
.instructions-panel {
  background: var(--accent);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.5rem 2rem;
}

.instructions-content h3 {
  color: var(--secondary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.instruction-item {
  color: var(--secondary-light);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ===== ANNOTATION STYLES ===== */
.annotation {
  position: absolute;
  cursor: move;
  user-select: none;
}

.text-annotation {
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  color: var(--secondary);
  resize: none;
  overflow: hidden;
}

.shape-annotation {
  border: 2px solid var(--primary);
  background: rgba(217, 79, 79, 0.1);
}

.highlight-annotation {
  background: rgba(253, 216, 53, 0.3);
  border: none;
}

.comment-annotation {
  background: rgba(30, 136, 229, 0.1);
  border: 2px solid #1e88e5;
  border-radius: 4px;
  padding: 0.5rem;
  font-size: 0.9rem;
  color: var(--secondary);
}

@media (max-width: 600px) {
  .upload-area {
    margin: 1rem auto;
    padding: 2rem 0.5rem;
    max-width: 95vw;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .file-info-container {
    margin: 1rem auto;
    width: 100%;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .file-info-card {
    width: 100%;
    max-width: 350px;
    margin: 0 auto 1rem auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .file-info {
    width: 100%;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .upload-area, .file-info-container, .file-info-card {
    max-width: 99vw;
    padding: 1rem 0.2rem;
  }
}