.sp-page {
  max-width: 1280px;
  margin: auto;
}
.sp-page .card,
.sp-public .card {
  padding: 24px;
  margin-bottom: 18px;
}
.sp-page h2,
.sp-public h2 {
  margin: 0 0 16px;
  font-size: 21px;
}
.sp-page h3,
.sp-public h3 {
  margin: 22px 0 12px;
  font-size: 16px;
}
.sp-heading,
.sp-toolbar,
.sp-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.sp-toolbar {
  justify-content: flex-start;
  margin: 18px 0;
}
.sp-page label,
.sp-public label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
  flex: 1;
  min-width: 150px;
}
.sp-page textarea,
.sp-page input,
.sp-page select,
.sp-public input,
.sp-public textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}
.sp-page textarea,
.sp-public textarea {
  resize: vertical;
}
.sp-copy {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.8;
  background: #f7f9fc;
  padding: 18px;
  border-radius: 10px;
}
.sp-badge {
  padding: 5px 12px;
  border-radius: 20px;
  background: #e8f1ff;
  color: #245bb3;
  font-size: 13px;
  white-space: nowrap;
}
.sp-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.sp-asset {
  margin: 0;
  min-width: 0;
}
.sp-asset img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #f6f8fb;
  border-radius: 10px;
}
.sp-asset figcaption {
  font-size: 12px;
  color: #6b7588;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.sp-image-placeholder {
  min-height: 120px;
  display: grid;
  place-items: center;
  background: #f5f7fa;
  border-radius: 10px;
  font-size: 13px;
}
.sp-notice {
  border-left: 4px solid #5288da !important;
}
.sp-url {
  overflow-wrap: anywhere;
}
.sp-money {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  color: #1756a5;
}
.sp-table {
  overflow: auto;
}
.sp-table table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.sp-table th,
.sp-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #edf0f5;
}
.sp-table th {
  font-size: 12px;
  color: #788397;
  background: #f8faff;
}
.sp-table td.sp-title {
  max-width: 300px;
  white-space: normal;
  min-width: 180px;
}
.sp-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 20px;
}
.sp-error {
  color: #b53131;
  white-space: pre-wrap;
}
.sp-file-row {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.sp-page small,
.sp-public small {
  font-weight: 400;
  color: #6d788b;
}
.sp-public {
  background: #f4f7fb;
  margin: 0;
  color: #263347;
}
.sp-public > header {
  max-width: 900px;
  margin: auto;
  padding: 24px;
  display: flex;
  justify-content: space-between;
}
.sp-public > main {
  max-width: 900px;
  margin: auto;
  padding: 0 20px 40px;
}
.sp-public .card {
  background: white;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
}
.sp-public .btn {
  cursor: pointer;
}
.sp-page [role='status'],
.sp-public [role='status'] {
  min-height: 20px;
}
.sp-credentials {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f0f6ff;
  padding: 16px;
  border-radius: 8px;
}
.sp-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin: 20px 0;
}
@media (max-width: 700px) {
  .sp-form-grid {
    grid-template-columns: 1fr;
  }
  .sp-page .card,
  .sp-public .card {
    padding: 16px;
  }
  .sp-images {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sp-public > main {
    padding: 0 10px 30px;
  }
  .sp-copy {
    padding: 12px;
  }
  .sp-money {
    font-size: 28px;
  }
}

.sp-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid #e2e8f0; margin: 16px 0; }
.sp-tab { padding: 10px 18px; text-decoration: none; color: inherit; border-bottom: 3px solid transparent; }
.sp-tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }
.sp-tab:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.sidebar .nav-group[hidden], .sidebar [data-route][hidden] { display: none; }

.sp-tabs .sp-tab { background: none; box-shadow: none; border-radius: 0; }
.sp-tabs .sp-tab.active { background: #eff6ff; }

.sp-assignment-filter { display: flex !important; align-items: center; gap: 12px; max-width: 320px; margin: 16px 0; }
.sp-batch-panel { padding: 18px; border: 1px solid #dbeafe; background: #f8fbff; border-radius: 10px; margin: 18px 0; }
.sp-batch-panel .sp-toolbar { margin: 16px 0 0; }
.sp-page .sp-select-cell { width: 44px; text-align: center; }
.sp-page .sp-select-cell input[type=checkbox] { width: 18px; height: 18px; margin: 0; padding: 0; cursor: pointer; }
