@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --gpce-bg: #f7f8fb;
  --gpce-card: #ffffff;
  --gpce-text: #0f172a;
  --gpce-muted: #6b7280;
  --gpce-line: rgba(15, 23, 42, 0.10);
  --gpce-accent: #0b5cff;
  --gpce-good: #1a7f37;
  --gpce-bad: #b42318;
  --gpce-soft: #e9edfb;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
}

.gpce-wrap {
  padding: 28px 18px 48px;
  background:
    radial-gradient(1100px 560px at 10% -10%, rgba(11, 92, 255, 0.10), transparent 60%),
    radial-gradient(900px 520px at 110% 8%, rgba(26, 127, 55, 0.10), transparent 60%),
    linear-gradient(180deg, #f8f9fb 0%, #eef1f7 100%);
}

.gpce-card {
  max-width: 1280px;
  width: min(1280px, 100%);
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.94));
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  padding: 26px 26px 32px;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.08);
}

.gpce-header {
  display: flex;
  gap: 8px;
  flex-direction: column;
  margin-bottom: 18px;
}

.gpce-title {
  margin: 0;
  color: var(--gpce-text);
  letter-spacing: -0.02em;
  font-size: 28px;
}

.gpce-subtitle {
  margin: 0;
  color: var(--gpce-muted);
}

.gpce-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(11, 92, 255, 0.08), rgba(11, 92, 255, 0.02));
  align-items: center;
  margin-bottom: 10px;
}

.gpce-hero-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gpce-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gpce-text);
}

.gpce-hero-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gpce-muted);
  font-size: 13px;
}

.gpce-hero-muted {
  color: var(--gpce-muted);
}

.gpce-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gpce-switch--hero .gpce-switch-text {
  font-weight: 700;
}

.gpce-section {
  padding: 18px 0;
}

.gpce-section:not(:first-of-type) {
  margin-top: 8px;
}

.gpce-section {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 18px 18px 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.gpce-h2 {
  margin: 0 0 12px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gpce-muted);
}

.gpce-topbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gpce-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gpce-topbar-right {
  margin-left: auto;
}

.gpce-link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(11, 92, 255, 0.10);
  border: 1px solid rgba(11, 92, 255, 0.25);
  color: #0b5cff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 140ms ease, background 140ms ease;
}

.gpce-link-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(11, 92, 255, 0.18);
  background: rgba(11, 92, 255, 0.14);
}

.gpce-link-button--ghost {
  background: rgba(11, 92, 255, 0.08);
  border-color: rgba(11, 92, 255, 0.18);
  color: #0b5cff;
}

.gpce-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.gpce-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 820px) {
  .gpce-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
  }
  .gpce-field--span2 {
    grid-column: span 2;
  }
}

.gpce-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gpce-label {
  font-weight: 600;
  color: var(--gpce-text);
}

.gpce-help {
  margin: 0;
  color: var(--gpce-muted);
  font-size: 12px;
}

.gpce-input,
.gpce-select,
.gpce-textarea {
  width: 100%;
  border: 1px solid var(--gpce-line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--gpce-text);
  background: #fff;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 120ms ease;
}

.gpce-input:focus,
.gpce-select:focus,
.gpce-textarea:focus {
  border-color: rgba(11, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(11, 92, 255, 0.12);
  transform: translateY(-1px);
}

.gpce-textarea {
  min-height: 140px;
  resize: vertical;
}

.gpce-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.gpce-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gpce-switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  border: 1px solid var(--gpce-line);
  position: relative;
  flex: 0 0 auto;
  transition: background 180ms ease, border-color 180ms ease;
}

.gpce-switch-ui::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease;
}

.gpce-switch input:checked + .gpce-switch-ui {
  background: rgba(11, 92, 255, 0.90);
  border-color: rgba(11, 92, 255, 0.40);
}

.gpce-switch input:checked + .gpce-switch-ui::after {
  transform: translateX(18px);
}

.gpce-switch-text {
  color: var(--gpce-muted);
  font-size: 13px;
}

.gpce-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.gpce-photo-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--gpce-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  position: relative;
}

.gpce-photo-thumb {
  position: relative;
}

.gpce-photo-thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.gpce-photo-meta {
  font-size: 12px;
  color: var(--gpce-muted);
  word-break: break-word;
  text-align: center;
}

.gpce-photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: var(--gpce-text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.gpce-photo-remove:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.gpce-photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  padding: 8px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.gpce-photo-card.is-remove .gpce-photo-thumb img {
  filter: grayscale(1) brightness(0.7);
}

.gpce-photo-card.is-remove .gpce-photo-overlay {
  opacity: 1;
}

.gpce-photos-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.gpce-dropzone {
  margin-top: 14px;
  border: 1.5px dashed rgba(11, 92, 255, 0.45);
  border-radius: 14px;
  padding: 22px;
  background: linear-gradient(120deg, rgba(11, 92, 255, 0.06), rgba(26, 127, 55, 0.05));
  text-align: center;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 140ms ease;
}

.gpce-dropzone:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.gpce-dropzone.is-drag {
  border-color: rgba(26, 127, 55, 0.75);
  box-shadow: 0 0 0 4px rgba(26, 127, 55, 0.18);
}

.gpce-dropzone-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.gpce-dropzone-title {
  font-weight: 700;
  color: var(--gpce-text);
  letter-spacing: -0.01em;
}

.gpce-dropzone-sub {
  color: var(--gpce-muted);
  font-size: 13px;
}

.gpce-dropzone-files {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.gpce-drop-preview {
  position: relative;
  border: 1px solid var(--gpce-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.gpce-drop-preview img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.gpce-drop-preview-meta {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--gpce-text);
  word-break: break-word;
}

.gpce-drop-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: var(--gpce-text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.gpce-drop-preview-remove:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.gpce-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  padding-top: 10px;
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(247,248,251,0.65), rgba(247,248,251,0.95));
  padding: 16px 0 8px;
  z-index: 5;
}

.gpce-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gpce-aside-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.gpce-aside-title {
  font-weight: 700;
  color: var(--gpce-text);
  margin-bottom: 6px;
}

.gpce-aside-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gpce-muted);
  gap: 8px;
}

.gpce-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.gpce-pill--green {
  background: rgba(26, 127, 55, 0.12);
  color: #0f7c2f;
}

.gpce-pill--gray {
  background: rgba(15, 23, 42, 0.08);
  color: var(--gpce-text);
}

.gpce-code {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.06);
  padding: 6px 8px;
  border-radius: 8px;
}

.gpce-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(120deg, #0b5cff, #0090ff);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 144, 255, 0.25);
  transition: transform 120ms ease, box-shadow 160ms ease;
}

.gpce-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.gpce-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0, 144, 255, 0.30);
}

.gpce-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  display: none;
  animation: gpce-spin 800ms linear infinite;
}

.gpce-button.is-loading .gpce-spinner {
  display: inline-block;
}

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

.gpce-link {
  color: var(--gpce-accent);
  text-decoration: none;
  font-weight: 600;
}

.gpce-link:hover {
  text-decoration: underline;
}

.gpce-notice {
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  border: 1px solid var(--gpce-line);
  background: rgba(15, 23, 42, 0.04);
  color: var(--gpce-text);
}

.gpce-notice--success {
  border-color: rgba(26, 127, 55, 0.28);
  background: rgba(26, 127, 55, 0.10);
}

.gpce-notice--error {
  border-color: rgba(180, 35, 24, 0.28);
  background: rgba(180, 35, 24, 0.10);
}

.gpce-notice--info {
  border-color: rgba(11, 92, 255, 0.22);
  background: rgba(11, 92, 255, 0.08);
}

.gpce-photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 760px) {
  .gpce-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gpce-photo {
  border: 1px dashed var(--gpce-line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(20, 20, 20, 0.02);
}

.gpce-photo-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.gpce-chip {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--gpce-line);
  background: #fff;
  color: var(--gpce-muted);
}

.gpce-photo-path {
  font-size: 12px;
  color: var(--gpce-text);
  word-break: break-word;
}

/* SlimSelect overrides */
.ss-main {
  border-radius: 12px;
  border-color: var(--gpce-line);
  min-height: 44px;
}
.ss-main .ss-values .ss-placeholder {
  color: var(--gpce-muted);
}
.ss-content {
  border-color: var(--gpce-line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}
.ss-content .ss-list .ss-option.ss-highlighted,
.ss-content .ss-list .ss-option:hover {
  background: var(--gpce-soft);
}
