.modal-auth.sample-select-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 2147483200;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(4px);
}

.modal-auth.sample-select-modal.show {
  display: flex !important;
}

.sample-select-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1280px, 100%);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 22px;
  background: #fff;
  color: var(--text, #0f172a);
}

.sample-select-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #e5edf6;
  background: #fff;
}

.sample-select-head > div {
  min-width: 0;
}

.sample-select-head h3 {
  margin: 0;
  color: var(--text, #0f172a);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.sample-select-head p {
  margin: 6px 0 0;
  color: var(--muted, #64748b);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.sample-select-head .sample-select-process-wrap{
  margin-top:12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sample-select-head p.sample-select-process-title {
  margin: 0 0 0;
  color: var(--text, #fe6b21);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.6;
}


.sample-select-process {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 0 0 0;
  padding: 0;
  list-style: none;
}

.sample-select-process li {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 14px 0 10px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.sample-select-process li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -12px;
  width: 8px;
  height: 8px;
  border-top: 2px solid #94a3b8;
  border-right: 2px solid #94a3b8;
  transform: translateY(-50%) rotate(45deg);
}

.sample-select-process span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 999px;
  background: #fe6b21;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.sample-select-process strong {
  font: inherit;
}

.modal-x.sample-select-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid var(--btn-neutral-border, #dbe3ef);
  border-radius: 999px;
  background: var(--btn-neutral-bg, #fff);
  color: var(--btn-neutral-text, #0f172a);
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.modal-x.sample-select-close:hover {
  border-color: var(--btn-soft-border-strong, #bfdbfe);
  background: var(--btn-soft-bg, #f8fbff);
  color: var(--btn-soft-text, #2563eb);
  transform: translateY(-1px);
}

.sample-select-body {
  min-height: 0;
  overflow: auto;
  padding: 18px 22px 24px;
  background: #f8fafc;
}

.sample-select-status {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.sample-select-status[hidden] {
  display: none !important;
}

.sample-preview-primary,
.sample-preview-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #fe6b21;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.sample-preview-primary:hover,
.sample-preview-close:hover {
  background: #d95414;
  color: #fff;
}

.sample-select-restore-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.78);
}

.sample-select-restore-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1160px, calc(100vw - 28px));
  height: min(88vh, 890px);
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.sample-select-restore-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.sample-select-restore-titlebox {
  min-width: 0;
}

.sample-select-restore-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.sample-select-restore-titlebox h3 {
  margin: 9px 0 0;
  color: #111827;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0;
}

.sample-select-restore-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  padding-top: 4px;
}

.sample-select-restore-overlay .sample-select-restore-submit,
.sample-select-restore-overlay .sample-select-restore-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: #fe6b21 !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.sample-select-restore-overlay .sample-select-restore-submit {
  min-width: 230px;
  padding: 0 22px;
}

.sample-select-restore-overlay .sample-select-restore-close {
  min-width: 64px;
  padding: 0 18px;
  border-radius: 999px;
}

.sample-select-restore-overlay .sample-select-restore-submit:hover,
.sample-select-restore-overlay .sample-select-restore-close:hover {
  background: #d95414 !important;
}

.sample-select-restore-frame {
  min-height: 0;
  overflow: hidden;
  background: #f8fafc;
}

.sample-select-restore-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

body.is-sample-restore-preview-open {
  overflow: hidden;
}

.sample-select-status.is-loading {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.sample-select-status.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.sample-select-status.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.sample-select-modal .ai-prod-portfolio-section {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-main-area {
  display: grid;
  gap: 16px;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-search-panel {
  display: grid;
  gap: 12px;
  padding: 0;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-search-form {
  width: 100%;
  margin: 0;
  box-shadow: none;
  border: 1px solid #dbe3ef;
  background: #fff;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-category-nav-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: auto;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  max-width: none;
  width: 100%;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-category-root {
  width: auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-gallery-section {
  padding: 0;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-gallery-inner {
  max-width: none;
}

.sample-select-modal .ai-prod-portfolio-section .portfolio-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

body.is-sample-select-modal-open {
  overflow: hidden;
}

@media screen and (max-width: 1100px) {
  .sample-select-modal .ai-prod-portfolio-section .portfolio-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .modal-auth.sample-select-modal {
    padding: 10px;
  }

  .sample-select-dialog {
    max-height: calc(100vh - 100px);
    border-radius: 18px;
  }

  .sample-select-head {
    padding: 16px;
  }

  .sample-select-process {
    gap: 7px;
  }

  .sample-select-process li {
    flex: 1 1 calc(33.333% - 7px);
    justify-content: flex-start;
    padding: 0 10px;
    white-space: normal;
    text-align: left;
  }

  .sample-select-process li:not(:last-child)::after {
    display: none;
  }

  .sample-select-body {
    padding: 14px;
  }

  .sample-select-modal .ai-prod-portfolio-section .portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .sample-select-restore-overlay {
    padding: 8px;
  }

  .sample-select-restore-shell {
    width: calc(100vw - 16px);
    height: calc(100vh - 90px);
    border-radius: 8px;
  }

  .sample-select-restore-head {
    gap: 12px;
    padding: 14px;
  }

  .sample-select-restore-titlebox h3 {
    font-size: 22px;
  }

  .sample-select-restore-actions {
    gap: 8px;
  }

  .sample-select-restore-submit {
    min-width: 176px;
    padding: 0 14px;
  }
}

@media screen and (max-width: 560px) {
  .sample-select-head {
    align-items: flex-start;
  }

  .sample-select-head h3 {
    font-size: 19px;
  }

  .sample-select-process li {
    flex-basis: calc(50% - 7px);
    min-height: 38px;
    font-size: 12px;
  }

  .sample-select-modal .ai-prod-portfolio-section .portfolio-search-form {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
  }

  .sample-select-modal .ai-prod-portfolio-section .portfolio-search-button {
    width: 100%;
  }

  .sample-select-modal .ai-prod-portfolio-section .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-select-restore-head {
    flex-direction: column;
  }

  .sample-select-restore-actions {
    width: 100%;
  }

  .sample-select-restore-submit {
    flex: 1 1 auto;
    min-width: 0;
  }
}
