.bf-page {
  color: #0f172a;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bf-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.bf-card-pad {
  padding: 1.25rem;
}

.bf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bf-title {
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
  color: #1e293b;
}

.bf-subtitle {
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.875rem;
}

.bf-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 9px;
  border: 1px solid transparent;
  padding: 0.62rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bf-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.bf-btn-primary {
  background: #4c8c1a;
  color: #ffffff;
  border-color: #4c8c1a;
}

.bf-btn-primary:hover {
  background: #3a6b14;
  border-color: #3a6b14;
}

.bf-btn-secondary {
  background: #ffffff;
  color: #475569;
  border-color: #dbe3ed;
}

.bf-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.bf-btn-danger {
  background: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
}

.bf-btn-danger:hover {
  background: #ffe4e6;
}

.bf-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.bf-stat {
  min-height: 108px;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bf-stat-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.bf-stat-value {
  margin-top: 0.35rem;
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 900;
  color: #1e293b;
}

.bf-stat-note {
  margin-top: 0.5rem;
  color: #94a3b8;
  font-size: 0.75rem;
}

.bf-stat-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.bf-icon-green { color: #15803d; background: #dcfce7; }
.bf-icon-purple { color: #7e22ce; background: #f3e8ff; }
.bf-icon-indigo { color: #4338ca; background: #e0e7ff; }
.bf-icon-amber { color: #b45309; background: #fef3c7; }
.bf-icon-pink { color: #be185d; background: #fce7f3; }

.bf-filter-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(160px, 0.75fr)) auto;
  gap: 0.85rem;
  align-items: end;
}

.bf-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bf-input,
.bf-select,
.bf-textarea {
  width: 100%;
  border: 1px solid #dbe3ed;
  border-radius: 9px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.88rem;
  outline: none;
}

.bf-input,
.bf-select {
  height: 2.55rem;
  padding: 0 0.75rem;
}

.bf-textarea {
  min-height: 112px;
  padding: 0.75rem;
  resize: vertical;
}

.bf-input:focus,
.bf-select:focus,
.bf-textarea:focus {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.bf-table-wrap {
  overflow-x: auto;
}

.bf-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.bf-table th {
  padding: 0.85rem 1rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.bf-table td {
  padding: 0.95rem 1rem;
  border-top: 1px solid #f1f5f9;
  vertical-align: middle;
}

.bf-row {
  background: #ffffff;
}

.bf-row:hover,
.bf-row.is-drag-over {
  background: #fbfef8;
}

.bf-row.is-dragging {
  opacity: 0.5;
}

.bf-preview {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 260px;
}

.bf-phone {
  width: 2.35rem;
  height: 3.25rem;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(145deg, #0f172a, #334155);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.bf-phone.is-text {
  background: linear-gradient(145deg, #dcfce7, #f8fafc);
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.bf-row-title {
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 750;
}

.bf-row-meta {
  margin-top: 0.2rem;
  color: #94a3b8;
  font-size: 0.75rem;
}

.bf-type-pill,
.bf-cat-pill,
.bf-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 750;
  white-space: nowrap;
}

.bf-type-video { color: #7e22ce; background: #f3e8ff; }
.bf-type-update { color: #1d4ed8; background: #dbeafe; }
.bf-type-circular { color: #4338ca; background: #e0e7ff; }
.bf-type-content { color: #15803d; background: #dcfce7; }
.bf-type-mcq { color: #0f766e; background: #ccfbf1; }
.bf-type-announcement { color: #b45309; background: #fef3c7; }
.bf-type-promotional { color: #be185d; background: #fce7f3; }

.bf-cat-pill {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  margin: 0.12rem;
}

.bf-status-pill {
  color: #475569;
  background: #f1f5f9;
}

.bf-icon-btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #94a3b8;
}

.bf-icon-btn:hover {
  color: #4c8c1a;
  background: #f0f7ea;
}

.bf-order-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.bf-drag-handle {
  cursor: grab;
}

.bf-mini-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
}

.bf-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bf-muted {
  color: #94a3b8;
  font-size: 0.78rem;
}

.bf-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.bf-modal {
  width: min(1280px, calc(100vw - 2rem));
  max-height: 94vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.bf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid #e2e8f0;
}

.bf-modal-body {
  padding: 1.5rem 1.6rem;
}

.bf-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.bf-modal-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f7;
}

.bf-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.bf-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 650;
}

.bf-help {
  margin-top: 0.4rem;
  color: #94a3b8;
  font-size: 0.75rem;
}

.bf-inline-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.bf-mcq-selected-wrap {
  margin-top: 0.85rem;
}

.bf-mcq-selected {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  background: #f0fdf4;
}

.bf-mcq-kicker {
  color: #15803d;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bf-mcq-results {
  margin-top: 0.85rem;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.bf-mcq-option {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
}

.bf-mcq-option:hover {
  background: #fbfef8;
}

.bf-mcq-option:last-child {
  border-bottom: 0;
}

.bf-mcq-number {
  min-width: 3.25rem;
  display: inline-flex;
  justify-content: center;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.75rem;
  font-weight: 800;
}

.bf-mcq-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.bf-mcq-question {
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.35;
}

.bf-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.5rem;
  border: 1px solid #dbe3ed;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #f8fafc;
}

.bf-editor-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.7rem;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 750;
}

.bf-editor-btn:hover {
  background: #f0f7ea;
  border-color: #bbf7d0;
  color: #3a6b14;
}

.bf-editor {
  min-height: 210px;
  padding: 1rem;
  border: 1px solid #dbe3ed;
  border-radius: 0 0 10px 10px;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.65;
  outline: none;
}

.bf-editor:focus {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.bf-editor:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

.bf-editor ul,
.bf-editor ol {
  margin: 0.75rem 0 0.75rem 1.5rem;
}

.bf-editor ul {
  list-style: disc;
}

.bf-editor ol {
  list-style: decimal;
}

.bf-editor li {
  margin: 0.25rem 0;
}

.bf-editor .bg-amber-50 {
  background: #fffbeb;
}

.bf-editor .rounded-xl {
  border-radius: 0.75rem;
}

.bf-editor .p-4 {
  padding: 1rem;
}

.bf-editor .mb-6 {
  margin-bottom: 1.5rem;
}

.bf-editor .border {
  border-width: 1px;
}

.bf-editor .border-amber-100 {
  border-color: #fde68a;
}

.bf-editor .text-sm {
  font-size: 0.875rem;
}

.bf-editor .text-gray-800 {
  color: #1f2937;
}

.bf-editor .mt-1 {
  margin-top: 0.25rem;
}

.bf-modal-wide {
  grid-column: 1 / -1;
}

.bf-upload-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.bf-upload-dropzone {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bf-upload-dropzone:hover,
.bf-upload-dropzone:focus,
.bf-upload-dropzone.is-dragover {
  border-color: #4c8c1a;
  background: #fbfef8;
  box-shadow: 0 0 0 3px rgba(76, 140, 26, 0.1);
  outline: none;
}

.bf-upload-drop-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #4c8c1a;
  background: #ecfdf5;
}

.bf-upload-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.bf-upload-title {
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 800;
}

.bf-thumbnail-preview {
  display: block;
  width: min(240px, 100%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0.75rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.bf-row-thumbnail {
  width: 3.4rem;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.bf-progress {
  margin-top: 0.8rem;
}

.bf-progress-track {
  width: 100%;
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.bf-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: #4c8c1a;
  transition: width 0.2s ease;
}

.bf-progress-text {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .bf-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bf-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bf-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .bf-stat-grid,
  .bf-filter-row,
  .bf-modal-grid,
  .bf-check-grid {
    grid-template-columns: 1fr;
  }

  .bf-actions {
    justify-content: flex-start;
  }
}
