body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.upload-box {
  border: 2px dashed #cfe7e9;
  border-radius: 8px;
  padding: 24px;
  background: #f2fbfb;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.photo-grid img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

.search-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.search-photo img,
.photo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0f0f0;
}

.break-all {
  word-break: break-all;
}

.category-picker {
  position: relative;
}

.category-field {
  width: 100%;
  height: 46px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6c757d;
  cursor: pointer;
}

.category-field-text.is-selected {
  color: #212529;
}

.category-caret {
  width: 6px;
  height: 6px;
  border-right: 2px solid #8aa3a7;
  border-bottom: 2px solid #8aa3a7;
  transform: rotate(45deg);
  margin-left: 8px;
}

.category-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 460px;
  background: #fff;
  border: 1px solid #e7ecee;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 20;
  display: none;
  overflow: hidden;
}

@media (max-width: 576px) {
  .category-panel {
    width: 100%;
    left: 0;
    right: auto;
  }
}

.category-panel.is-open {
  display: block;
}

.category-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f4;
}

.category-back,
.category-close {
  background: none;
  border: none;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #6c757d;
}

.category-back:disabled {
  opacity: 0.4;
}

.category-title {
  font-weight: 600;
  color: #1f2d3d;
}

.category-panel-search {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f4;
}

.category-panel-list {
  max-height: 320px;
  overflow-y: auto;
}

.category-item {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: none;
  border-bottom: 1px solid #f3f5f7;
  text-align: left;
  cursor: pointer;
}

.category-item:hover {
  background: #f7f9fa;
}

.category-item-left {
  display: flex;
  gap: 10px;
  align-items: center;
}

.category-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #e9f3f4;
}

.category-item-title {
  font-size: 14px;
  color: #1f2d3d;
}

.category-path {
  font-size: 12px;
  color: #9aa6ac;
}

.category-arrow {
  color: #8aa3a7;
  font-size: 18px;
}

.category-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #cfd9dd;
}

.category-empty {
  padding: 16px;
  color: #9aa6ac;
}

body.label-print {
  background: #fff;
  margin: 0;
}

.label-page {
  width: 30mm;
  height: 50mm;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.label-card {
  width: 30mm;
  height: 50mm;
  border: 1px solid #ddd;
  padding: 2mm;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2mm;
}

.label-code {
  font-weight: 700;
  font-size: 11pt;
  text-align: center;
}

.label-photo {
  width: 100%;
  height: 18mm;
  object-fit: cover;
  border-radius: 2mm;
}

.photo-status-title {
  font-weight: 600;
}

.photo-next .btn {
  font-size: 1.1rem;
  padding: 14px 18px;
  min-height: 56px;
}

.photo-slots {
  display: grid;
  gap: 12px;
}

.photo-slot {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-items: center;
  grid-template-columns: 1fr;
}

.photo-slot-label {
  font-size: 13px;
  font-weight: 600;
}

.photo-slot-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  background: #f2f2f2;
}

.photo-slot-empty {
  font-size: 12px;
  color: #9aa0a6;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-subtitle {
  color: #6b7280;
  margin-bottom: 0;
}

.section-card {
  background: #ffffff;
  border: 1px solid #e3e7ec;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 10px 24px rgba(22, 32, 54, 0.06);
  margin-bottom: 16px;
}

.description-textarea {
  min-height: 240px;
}

.section-title {
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

.form-label {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f6;
}

.form-row:last-child {
  border-bottom: none;
}

.form-field {
  width: 100%;
}

.form-field .form-control,
.form-field .btn,
.tag-input {
  min-height: 44px;
}

.form-field .btn,
.tag-input {
  text-align: left;
}

.form-field .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.attribute-fields.is-hidden {
  display: none;
}

.condition-override .form-check {
  margin: 0;
}

.color-chip {
  font-weight: 600;
  color: #475569;
}

.color-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-color: #d2d8e1;
  background: #fff;
  padding: 8px 12px;
}

.color-dropdown-menu {
  max-height: 260px;
  overflow: auto;
  padding: 8px;
}

.dropdown-searchable {
  padding: 0;
}

.dropdown-searchable .dropdown-items .dropdown-item {
  white-space: normal;
}

.dropdown-search {
  padding: 8px;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
}

.dropdown-items {
  max-height: 200px;
  overflow: auto;
}


.tag-input {
  border: 1px solid #d2d8e1;
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.tag-input:focus-within {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  font-size: 13px;
  line-height: 1;
}

.tag-remove {
  border: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: #4f4f4f;
}

.tag-entry {
  border: 0;
  outline: none;
  flex: 1 1 160px;
  min-width: 140px;
  padding: 6px 4px;
}

.color-picker {
  display: grid;
  gap: 8px;
}

.color-list {
  display: grid;
  gap: 8px;
}

.color-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
}

.color-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #d0d0d0;
  background: #fff;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.color-title {
  font-size: 14px;
}

.dashboard-search {
  font-size: 1.15rem;
  padding: 14px 16px;
  border: 2px solid #8ecae6;
  box-shadow: 0 8px 20px rgba(142, 202, 230, 0.25);
}

.dashboard-photo {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #f2f2f2;
  display: block;
}

.dashboard-photo.placeholder {
  border: 1px dashed #d5d8dc;
}

@media print {
  @page {
    size: 30mm 50mm;
    margin: 0;
  }

  body {
    background: #fff;
    margin: 0;
  }

  .navbar,
  .d-print-none {
    display: none !important;
  }

  .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }

  .label-page {
    margin: 0;
  }

  .label-card {
    border: none;
  }
}
.bg-light {
  background-color: #f3f5f7 !important;
}

body {
  font-family: "V_INTER", "V_INTER Fallback", "Helvetica Neue", "Helvetica-Neue", Arial, sans-serif;
}
