.zf-shell {
  max-width: 1440px;
}

.zf-form-shell {
  max-width: 1180px;
}

.zf-hero {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.zf-form-hero {
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
}

.zf-title,
.zf-form-title,
.zf-table-title,
.zf-detail-title,
.zf-step-label {
  margin: 0;
}

.zf-subtitle {
  margin: 0.35rem 0 0;
}

.zf-form-subtitle {
  margin: 0.4rem 0 0;
}

.zf-table-subtitle,
.zf-detail-copy,
.zf-step-desc {
  margin: 0.2rem 0 0;
}

.zf-form-breadcrumb .breadcrumb {
  margin-bottom: 0.8rem;
}

.zf-toolbar,
.zf-form-header-actions,
.zf-filter-actions,
.zf-detail-head,
.zf-detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.zf-toolbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.zf-form-header-actions,
.zf-filter-actions,
.zf-detail-actions {
  justify-content: flex-end;
}

.zf-count-badge,
.zf-file-link,
.zf-step-badge {
  display: inline-flex;
  align-items: center;
}

.zf-count-badge {
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
}

.zf-form-card {
  padding: 1.4rem;
}

.zf-filter-card,
.zf-table-card,
.zf-detail-panel {
  overflow: hidden;
  margin-bottom: 1rem;
}

.zf-table-card {
  overflow: visible;
}

.zf-field-card {
  height: 100%;
}

.zf-field-card .form-floating,
.zf-field-card .mb-3,
.zf-field-card .mb-4 {
  margin-bottom: 0 !important;
}

.zf-field-card .form-control,
.zf-field-card .form-select {
  min-height: 3.35rem;
}

.zf-field-card textarea.form-control,
.zf-field-card .note-editor {
  min-height: 10rem;
}

.zf-field-help,
.zf-builder-help {
  margin-top: 0.55rem;
}

.zf-file-link {
  gap: 0.4rem;
  margin-top: 0.75rem;
  text-decoration: none;
  word-break: break-all;
}

.zf-image-upload {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
}

.zf-image-upload__preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 200px;
  border-radius: 0.9rem;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(37, 99, 235, 0.08)),
    repeating-linear-gradient(45deg, rgba(148, 163, 184, 0.12) 0, rgba(148, 163, 184, 0.12) 12px, transparent 12px, transparent 24px);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.zf-image-upload__img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.zf-image-upload__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: rgba(71, 85, 105, 0.95);
  text-align: center;
  padding: 1rem;
}

.zf-image-upload__placeholder i {
  font-size: 2rem;
}

.zf-image-upload__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
  min-width: 0;
}

.zf-image-upload__topline {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.zf-image-upload__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: rgb(29, 78, 216);
  font-size: 0.8rem;
  font-weight: 600;
}

.zf-image-upload__status {
  color: rgba(51, 65, 85, 0.95);
  font-size: 0.95rem;
}

.zf-image-upload__input {
  min-height: 3.5rem;
}

.zf-image-upload__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.zf-image-upload__crop {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.78);
}

.zf-image-upload__crop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.zf-image-upload__cropper {
  min-height: 280px;
}

.zf-image-upload__cropper .croppie-container {
  width: 100%;
  height: 100%;
}

.zf-image-upload__cropper .cr-boundary {
  width: 100% !important;
}

.zf-image-upload__crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.zf-image-upload__hint {
  color: rgba(100, 116, 139, 0.95);
  font-size: 0.87rem;
}

.zf-image-upload__link {
  margin-top: 0;
  font-weight: 600;
  word-break: normal;
}

.zf-switch-card {
  display: flex;
  align-items: center;
  min-height: 100%;
}

.zf-builder-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.zf-form-actions {
  position: sticky;
  bottom: 1rem;
  z-index: 5;
  margin-top: 1.25rem;
  padding: 0.85rem;
  backdrop-filter: blur(10px);
}

.zf-form-actions .btn-group {
  width: 100%;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.zf-form-actions .btn {
  min-width: 140px;
}

.zf-steps-card {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
}

.zf-steps-head {
  margin-bottom: 0.9rem;
}

.zf-steps-copy {
  margin: 0.3rem 0 0;
}

.zf-steps-grid,
.zf-multiple-select,
.zf-masterdetail {
  display: grid;
  gap: 0.85rem;
}

.zf-steps-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.zf-step-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  text-decoration: none;
  color: inherit;
}

.zf-step-item.is-locked {
  opacity: 0.65;
}

.zf-step-badge {
  width: 2rem;
  height: 2rem;
  justify-content: center;
  flex: 0 0 auto;
}

.zf-multiple-select-search {
  min-height: 3rem;
}

.zf-multiple-select-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.35rem;
}

.zf-multiple-select-option {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
}

.zf-multiple-select-option .form-check-input {
  margin: 0;
}

.zf-multiple-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zf-multiple-select-code {
  justify-self: end;
  padding: 0.12rem 0.35rem;
  white-space: nowrap;
}

.zf-masterdetail {
  margin-top: 1rem;
  gap: 1rem;
}

.zf-detail-panel.is-nested {
  margin: 1rem;
}

.zf-detail-head {
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.15rem;
}

.zf-detail-empty,
.zf-detail-locked,
.zf-empty {
  text-align: center;
}

.zf-detail-empty,
.zf-detail-locked {
  padding: 1.5rem;
}

.zf-detail-table {
  margin: 0;
  vertical-align: middle;
}

.zf-detail-table th {
  white-space: nowrap;
}

.zf-detail-value {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  max-width: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zf-detail-actions {
  gap: 0.45rem;
  white-space: nowrap;
}

.zf-detail-actions-cell {
  width: 1%;
  white-space: nowrap;
}

.zf-detail-actions .btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.zf-detail-actions-inline {
  display: flex;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.zf-filter-card .accordion-body {
  padding: 1.25rem 1.25rem 0.75rem;
}

.zf-filter-actions {
  margin-top: 0.5rem;
}

.zf-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.zf-table-card .table {
  margin-bottom: 0;
  vertical-align: middle;
}

.zf-table-card .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
}

.zf-table-card thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.zf-actions-cell {
  min-width: 132px;
}

.zf-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.zf-row-actions .btn {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.zf-file-cell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 220px;
}

.zf-file-cell__preview-link {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 0.9rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.05), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.zf-file-cell__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zf-file-cell__body {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
}

.zf-file-cell__name {
  display: block;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zf-file-cell__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.zf-file-cell__badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(51, 65, 85, 0.95);
  font-size: 0.77rem;
  line-height: 1.2;
}

.zf-select-display {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.35rem 0.7rem;
}

.zf-empty {
  padding: 2.5rem 1.25rem;
}

.zf-crud-modal-loading {
  padding: 2rem 1rem;
  text-align: center;
}

.zf-crud-modal {
  overscroll-behavior: contain;
}

.zf-crud-modal .modal-content {
  max-height: calc(100vh - 2rem);
}

.zf-crud-modal .modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.zf-crud-modal-busy .modal-content {
  pointer-events: none;
}

.zf-crud-modal .zf-form-card {
  padding: 0;
}

.zf-crud-modal .zf-form-actions {
  position: static;
}

.zf-crud-modal form > .zf-masterdetail {
  margin-bottom: 1rem;
}

.zf-crud-modal-nested .modal-dialog {
  max-width: min(1140px, calc(100vw - 2rem));
}

.zf-fragment-loading {
  opacity: 0.6;
  pointer-events: none;
}

.zf-pagination-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.zf-htmlbuilder-body {
  margin: 0;
  height: 100%;
}

.zf-htmlbuilder-content {
  height: 0;
  overflow: hidden;
}

.gjs-frame {
  padding-left: 4px;
}

.content-cv-canvas {
  top: 0;
  width: 100%;
  height: calc(100% - 40px);
}

.gjs-pn-views-container {
  height: calc(100% - 40px);
  top: 40px;
  text-align: left !important;
}

.grapesjs-fonts select,
.grapesjs-fonts input,
.grapesjs-fonts button {
  padding: 5px;
}

.grapesjs-fonts .silex-bar,
.grapesjs-fonts .silex-list__item__footer {
  display: flex;
}

.grapesjs-fonts .silex-list__item__footer {
  justify-content: flex-end;
}

.grapesjs-fonts .silex-bar > *,
.grapesjs-fonts button {
  margin: 5px;
}

.grapesjs-fonts button {
  padding-top: 8px;
}

.spinner-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 9999;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: zf-spin 0.8s linear infinite;
}

@keyframes zf-spin {
  to {
    transform: rotate(360deg);
  }
}

.gjs-one-bg,
.gjs-two-color,
.gjs-three-bg,
.gjs-four-color {
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (max-width: 767.98px) {
  .zf-hero {
    padding: 1.1rem;
  }

  .zf-form-hero,
  .zf-form-card {
    padding: 1rem;
  }

  .zf-image-upload {
    grid-template-columns: 1fr;
  }

  .zf-image-upload__preview,
  .zf-image-upload__img {
    min-height: 180px;
    height: 180px;
  }

  .zf-image-upload__crop-head {
    align-items: flex-start;
  }

  .zf-image-upload__cropper {
    min-height: 240px;
  }

  .zf-image-upload__crop-actions .btn {
    width: 100%;
  }

  .zf-toolbar,
  .zf-table-header,
  .zf-filter-actions,
  .zf-detail-head,
  .zf-detail-actions {
    align-items: stretch;
  }

  .zf-toolbar > *,
  .zf-filter-actions > *,
  .zf-form-actions .btn-group > *,
  .zf-form-header-actions > * {
    width: 100%;
  }

  .zf-file-cell {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .zf-file-cell__preview-link {
    width: 100%;
    max-width: 96px;
    height: 96px;
  }

  .zf-form-header-actions {
    justify-content: stretch;
  }

  .zf-detail-head .btn {
    width: 100%;
  }

  .zf-detail-head,
  .zf-detail-actions {
    flex-direction: column;
  }
}
