/* Base Styles - Keep your existing variables and base styles */
:root {
  --primary: #4361ee;
  --primary-dark: #3f37c9;
  --primary-light: #4895ef;
  --secondary: #f72585;
  --accent: #4cc9f0;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #38b000;
  --warning: #ffbe0b;
  --danger: #ff006e;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --font-main: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: var(--font-main);
  background-color: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
}

header {
  background-color: var(--primary);
  color: white;
  padding: 1.2rem 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1000;
  width: 100%;
}

.navbar {
  box-shadow: none !important;
  background: none !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  color: white;
}

.logo span {
  color: white;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
}

.nav-links a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
  background-color: rgba(255, 255, 255, 0.2);
}

.nav-cta {
  background-color: white;
  color: var(--primary) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-cta:hover {
  background-color: var(--background);
  transform: translateY(-2px);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Keep all your existing button, navigation, hero, and basic styles */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  box-shadow: var(--shadow);
}

.btn-primary:disabled {
  background-color: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  color: white;
  transform: translateY(-2px);
}

.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.btn-back:hover {
  color: var(--primary-dark);
}

/* SOP Creator App Styles */
.app-container {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 70px - 300px);
  width: 100%;
  overflow-x: hidden;
}

.sop-creator {
  padding: 2rem 0;
  background-color: var(--background);
}

.sop-builder-interface {
  display: flex;
  gap: 2rem;
}

/* Question Panel Styles */
.question-panel {
  flex: 1;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  max-width: 50%;
}

/* Enhanced Category Selection */
.category-selection h2 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.category-option {
  background: white;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-align: center;
}

.category-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-light);
}

.category-option.selected {
  border-color: var(--primary);
  background-color: rgba(67, 97, 238, 0.05);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.15);
}

.category-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.category-option h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.category-option p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.category-count {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--primary);
  color: white;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  font-weight: 500;
}

.category-actions {
  text-align: center;
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Template Selection within Category */
.template-header {
  margin-bottom: 2rem;
}

.template-header h2 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.template-header p {
  color: var(--text-light);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.template-option {
  background: white;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.template-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.template-option.selected {
  border-color: var(--primary);
  background-color: rgba(67, 97, 238, 0.05);
}

.template-option::before {
  content: '';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.template-option.selected::before {
  background-color: var(--primary);
  border-color: var(--primary);
}

.template-option.selected::after {
  content: '✓';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 18px;
  height: 18px;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.template-icon {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.template-option h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  padding-right: 2rem;
}

.template-option p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0;
}

.template-actions {
  text-align: center;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.selection-info {
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Content Builder Styles */
.content-builder {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.progress-indicator {
  margin-bottom: 2rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
}

.progress-step {
  text-align: center;
  position: relative;
  flex: 1;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--border);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-weight: bold;
  font-size: 0.9rem;
}

.progress-step.active .step-number {
  background-color: var(--primary);
  color: white;
}

.progress-step.completed .step-number {
  background-color: var(--success);
  color: white;
}

.progress-step span {
  font-size: 0.8rem;
  color: var(--text-light);
}

.progress-step.active span {
  color: var(--primary);
  font-weight: 600;
}

.progress-step.completed span {
  color: var(--success);
  font-weight: 600;
}

/* Content Block Library */
.content-block-library {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.content-block-library h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.block-search {
  position: relative;
  margin-bottom: 1rem;
}

.block-search input {
  width: 100%;
  padding: 0.8rem 2.5rem 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: inherit;
}

.block-search i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.block-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.block-category {
  padding: 0.5rem 1rem;
  background-color: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.block-category:hover {
  border-color: var(--primary);
}

.block-category.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.content-blocks-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.content-block {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  cursor: grab;
  transition: all 0.3s ease;
  position: relative;
}

.content-block:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.content-block:active {
  cursor: grabbing;
}

.content-block.dragging {
  opacity: 0.5;
  transform: rotate(5deg);
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.block-type {
  background-color: var(--primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.block-drag-handle {
  color: var(--text-light);
  font-size: 1.2rem;
  cursor: grab;
}

.block-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.block-preview {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Basic Info Form */
.basic-info-form {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.basic-info-form h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.question-field {
  margin-bottom: 1.5rem;
}

.question-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

.builder-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Preview Panel Enhancements */
.preview-panel {
  flex: 1;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  max-width: 50%;
  display: flex;
  flex-direction: column;
}

.preview-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-header h2 {
  margin-bottom: 0;
}

.preview-controls {
  display: flex;
  gap: 0.5rem;
}

.preview-control-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.5rem;
}

.preview-control-btn:hover {
  color: var(--primary);
}

.preview-document {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  background-color: #f9f9f9;
}

.preview-content {
  background: white;
  padding: 3rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  min-height: 500px;
  border-radius: 8px;
}

/* SOP Document Styles */
.sop-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--text-dark);
}

.sop-title-block {
  margin-bottom: 1rem;
}

.sop-title-block h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.sop-id {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
}

.sop-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  font-size: 0.9rem;
}

.meta-item {
  display: flex;
}

.meta-label {
  font-weight: 600;
  margin-right: 0.5rem;
}

.meta-input {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: #fff;
}

.meta-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Drop Zones for Content Blocks */
.sop-section {
  margin-bottom: 2rem;
}

.sop-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.drop-zone {
  position: relative;
}

.drop-target {
  min-height: 80px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.drop-target.drag-over {
  border-color: var(--primary);
  background-color: rgba(67, 97, 238, 0.05);
}

.drop-target.has-content {
  border: none;
  padding: 0;
  min-height: auto;
}

.placeholder-text {
  text-align: center;
  color: var(--text-light);
  font-style: italic;
}

.placeholder-text i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.dropped-content {
  background-color: #f8f9fa;
  border-left: 4px solid var(--primary);
  padding: 1rem;
  border-radius: 0 8px 8px 0;
  position: relative;
  line-height: 1.6;
}

.dropped-content::before {
  content: attr(data-block-type);
  position: absolute;
  top: -8px;
  left: 12px;
  background-color: var(--primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.content-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropped-content:hover .content-actions {
  opacity: 1;
}

.content-action-btn {
  background: white;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.3rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.content-action-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* SOP Table Styles */
.sop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.sop-table th, .sop-table td {
  padding: 0.7rem;
  border: 1px solid var(--border);
  text-align: left;
}

.sop-table th {
  background-color: #f1f3f5;
  font-weight: 600;
}

.preview-actions {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Finalization Styles */
.success-message {
  text-align: center;
  margin: 2rem 0;
  padding: 2rem;
  background-color: rgba(12, 206, 107, 0.1);
  border-radius: 10px;
}

.success-icon {
  font-size: 3rem;
  color: var(--success);
  margin-bottom: 1rem;
}

.success-message h3 {
  color: var(--success);
  margin-bottom: 0.5rem;
}

.finalize-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .sop-builder-interface {
    flex-direction: column;
  }

  .question-panel, .preview-panel {
    width: 100%;
    max-width: 100%;
    margin-bottom: 2rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .template-grid {
    grid-template-columns: 1fr;
  }

  .content-blocks-container {
    grid-template-columns: 1fr;
  }

  .sop-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .question-panel {
    padding: 1rem;
  }

  .category-grid {
    gap: 1rem;
  }

  .category-option {
    padding: 1.5rem;
  }

  .category-actions {
    flex-direction: column;
  }

  .template-actions {
    flex-direction: column;
  }

  .builder-actions {
    flex-direction: column;
  }

  .finalize-actions {
    gap: 0.5rem;
  }

  .preview-document {
    padding: 1rem;
  }

  .preview-content {
    padding: 1.5rem;
  }

  .progress-steps {
    display: none;
  }

  .block-categories {
    justify-content: center;
  }
}

/* Enhanced Content Block Styles for Phase 2 */

.content-block {
  background: white;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  cursor: grab;
  transition: all 0.3s ease;
  position: relative;
  margin-bottom: 1rem;
}

.content-block:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}

.content-block:active {
  cursor: grabbing;
}

.content-block.dragging {
  opacity: 0.7;
  transform: rotate(3deg) scale(1.05);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.block-type {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(67, 97, 238, 0.3);
}

.block-drag-handle {
  color: var(--text-light);
  font-size: 1.2rem;
  cursor: grab;
  transition: color 0.3s ease;
}

.content-block:hover .block-drag-handle {
  color: var(--primary);
}

.block-title {
  font-weight: 600;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.3;
}

.block-preview {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.mixable-block {
  border-color: var(--success);
  background: linear-gradient(135deg, rgba(12, 206, 107, 0.03), rgba(12, 206, 107, 0.08));
}

.mixable-block .block-type {
  background: linear-gradient(135deg, var(--success), #0a9954);
}

/* Enhanced Drop Zone Styles */
.drop-zone {
  position: relative;
  margin-bottom: 2rem;
}

.drop-target {
  min-height: 100px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  background: rgba(248, 249, 250, 0.5);
}

.drop-target.drag-over {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.08), rgba(67, 97, 238, 0.12));
  border-style: solid;
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.15);
}

.drop-target.has-content {
  border: none;
  padding: 0;
  min-height: auto;
  background: transparent;
}

.placeholder-text {
  text-align: center;
  color: var(--text-light);
  font-style: italic;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.placeholder-text i {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  color: var(--primary-light);
  opacity: 0.6;
}

.placeholder-text p {
  margin: 0;
  font-size: 0.95rem;
}

/* Dropped Content Styles */
.dropped-content {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border-left: 5px solid var(--primary);
  padding: 1.5rem;
  border-radius: 0 12px 12px 0;
  position: relative;
  line-height: 1.7;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.dropped-content:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.dropped-content::before {
  content: attr(data-block-type);
  position: absolute;
  top: -10px;
  left: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 0.7rem;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 8px rgba(67, 97, 238, 0.3);
}

.content-source {
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.content-source small {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.8rem;
}

.content-source i {
  margin-right: 0.5rem;
  color: var(--primary);
}

.content-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-dark);
}

.content-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropped-content:hover .content-actions {
  opacity: 1;
}

.content-action-btn {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-light);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-action-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

.content-action-btn:active {
  transform: translateY(0);
}

/* Enhanced Block Filtering */
.block-search {
  position: relative;
  margin-bottom: 1.5rem;
}

.block-search input {
  width: 100%;
  padding: 1rem 3rem 1rem 1.2rem;
  border: 2px solid var(--border);
  border-radius: 25px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
}

.block-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.02), rgba(255, 255, 255, 1));
}

.block-search i {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
}

.block-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.block-category {
  padding: 0.6rem 1.4rem;
  background: white;
  border: 2px solid var(--border);
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.block-category:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.block-category.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

/* Content Blocks Container */
.content-blocks-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
  max-height: 500px;
  overflow-y: auto;
  padding: 0.5rem;
}

.content-blocks-container::-webkit-scrollbar {
  width: 8px;
}

.content-blocks-container::-webkit-scrollbar-track {
  background: var(--background);
  border-radius: 4px;
}

.content-blocks-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.content-blocks-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Notification System */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 1rem 1.5rem;
  z-index: 10000;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  border-left: 4px solid var(--primary);
  max-width: 350px;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.notification-content i {
  font-size: 1.2rem;
}

.notification-success {
  border-left-color: var(--success);
}

.notification-success .notification-content i {
  color: var(--success);
}

.notification-error {
  border-left-color: #dc3545;
}

.notification-error .notification-content i {
  color: #dc3545;
}

.notification-warning {
  border-left-color: #ffc107;
}

.notification-warning .notification-content i {
  color: #ffc107;
}

.notification-info {
  border-left-color: var(--primary);
}

.notification-info .notification-content i {
  color: var(--primary);
}

/* Enhanced Progress Indicator */
.progress-step.completed .step-number {
  background: linear-gradient(135deg, var(--success), #0a9954);
  color: white;
  position: relative;
}

.progress-step.completed .step-number::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  font-weight: bold;
}

/* Responsive Enhancements */
@media (max-width: 992px) {
  .content-blocks-container {
    grid-template-columns: 1fr;
    max-height: 400px;
  }
  
  .block-categories {
    justify-content: flex-start;
  }
  
  .content-block {
    margin-bottom: 0.8rem;
  }
}

@media (max-width: 768px) {
  .content-blocks-container {
    max-height: 300px;
  }
  
  .block-search input {
    padding: 0.8rem 2.5rem 0.8rem 1rem;
  }
  
  .block-categories {
    gap: 0.5rem;
  }
  
  .block-category {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .dropped-content {
    padding: 1rem;
  }
  
  .content-actions {
    position: static;
    opacity: 1;
    margin-top: 1rem;
    justify-content: flex-end;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100%);
  }
  
  .notification.show {
    transform: translateY(0);
  }
}

/* Animation Enhancements */
@keyframes blockPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.content-block:active {
  animation: blockPulse 0.3s ease;
}

@keyframes dropZoneReady {
  0% { background-color: rgba(67, 97, 238, 0.05); }
  50% { background-color: rgba(67, 97, 238, 0.1); }
  100% { background-color: rgba(67, 97, 238, 0.05); }
}

.drop-target.drag-over {
  animation: dropZoneReady 1s ease infinite;
}

/* Dark mode support (optional enhancement) */
@media (prefers-color-scheme: dark) {
  .content-block {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  .dropped-content {
    background: linear-gradient(135deg, #2d3748, #374151);
    color: #e2e8f0;
  }
  
  .notification {
    background: #2d3748;
    color: #e2e8f0;
  }
}

.finalization-form {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.finalization-form .form-group {
  margin-bottom: 15px;
}

.finalization-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.finalization-form input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.finalization-form input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.finalization-form input[type="date"] {
  width: auto;
}

.finalization-form input:required {
  border-left: 3px solid #007bff;
}

.title-section {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 3rem 0;
  background: linear-gradient(to bottom, #ffffff, var(--gray-100));
}

.title-section h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.title-section p {
  color: var(--gray-600);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.6;
}

@media (max-width: 576px) {
  .title-section {
    padding: 2rem 0;
  }
  
  .title-section h1 {
    font-size: 2rem;
  }
  
  .title-section p {
    font-size: 1.1rem;
  }
}

@media (max-width: 380px) {
  .title-section h1 {
    font-size: 1.8rem;
  }
  
  .title-section p {
    font-size: 1rem;
  }
}
