:root {
  color-scheme: light;
  font-family: 'Segoe UI', PingFang SC, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f6fa;
  color: #222;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f6fa;
}

a {
  color: #1a73e8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  background: #1a73e8;
  color: #fff;
  transition: background 0.2s ease;
}

.button.secondary {
  background: #f0f3ff;
  color: #1a73e8;
}

.button.tertiary {
  background: transparent;
  color: #1a73e8;
  border: 1px solid rgba(26, 115, 232, 0.3);
}

.button.danger {
  background: #d93025;
}

.button.disabled,
.button:disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button.link {
  background: transparent;
  color: #1a73e8;
  padding: 0;
}

.camp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #e6e8ef;
  gap: 12px;
}

.camp-title {
  margin: 0;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 600;
  color: #1f2933;
  flex: 1;
  min-width: 0;
}

.camp-header .button {
  flex-shrink: 0;
  padding-inline: 18px;
}

.download-button {
  background: transparent;
  color: #1a73e8;
  border: 1px solid rgba(26, 115, 232, 0.3);
}

.download-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.download-button.is-loading {
  cursor: progress;
  opacity: 0.7;
}

.camp-main {
  padding: 20px;
  display: grid;
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e6e8ef;
  padding: 24px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.upload-inline {
  display: flex;
  justify-content: center;
  margin: 16px 0 12px;
}

.upload-button {
  width: 100%;
  max-width: 360px;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 999px;
  background: #1a73e8;
  color: #fff;
  border: none;
  box-shadow: 0 8px 16px rgba(26, 115, 232, 0.2);
}

.upload-button:hover {
  background: #1565c0;
}

.upload-button:active {
  transform: translateY(1px);
}

.upload-status {
  margin: 0 20px;
  color: #1a73e8;
  text-align: center;
}

.photos-section .photos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.photo-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #e3e5ee;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.02);
}

.photo-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.photo-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.photo-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.photo-select input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.photo-select__box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #94a3b8;
  background: #fff;
  transition: background 0.2s ease, border 0.2s ease;
}

.photo-select input:checked + .photo-select__box {
  background: #1a73e8;
  border-color: #1a73e8;
  box-shadow: inset 0 0 0 3px #fff;
}

.photo-select input:disabled + .photo-select__box {
  opacity: 0.4;
}

.photo-card__preview {
  position: relative;
  padding-top: 75%;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photos-grid.aspect-1-1 .photo-card__preview {
  padding-top: 100%;
}

.photos-grid.aspect-2-3 .photo-card__preview {
  padding-top: 150%;
}

.photo-card__preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #65748b;
}

.status {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3949ab;
  text-transform: uppercase;
}

.status[data-status="processing"] {
  background: #fff7e6;
  color: #d48806;
}

.status[data-status="ready"] {
  background: #e6fffb;
  color: #08979c;
}

.status[data-status="failed"] {
  background: #fff1f0;
  color: #cf1322;
}

.photo-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.photo-card__actions .action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.photo-action {
  padding: 7px 12px;
  font-size: 13px;
  justify-content: center;
}

.photo-action.is-disabled {
  pointer-events: none;
  opacity: 0.5;
}

.photo-card__delete {
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.photo-card__delete:hover {
  color: #4b5563;
}

.photo-card__delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  text-decoration: none;
}

.error {
  margin: 6px 0 0;
  color: #d93025;
  font-size: 12px;
}

.hint {
  color: #666;
  font-size: 14px;
}

.camp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
}

.admin-app {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-body {
  background: #f5f6fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 12px;
  background: #fff;
  border-bottom: 1px solid #e6e8ef;
}

.admin-header__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-title {
  margin: 0;
  font-size: clamp(20px, 5vw, 28px);
  color: #1f2933;
}

.admin-subtitle {
  margin: 0;
  color: #526079;
  font-size: 14px;
}

.admin-logout {
  display: flex;
  justify-content: flex-start;
}

.admin-main {
  flex: 1;
  padding: 16px 20px 24px;
  display: flex;
  justify-content: center;
}

.admin-react-root {
  width: 100%;
  max-width: 960px;
}

.admin-list-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.campaign-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.campaign-card {
  border: 1px solid #e6e8ef;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.campaign-card__headline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.campaign-card__headline h3 {
  margin: 0;
  font-size: 18px;
  color: #1f2933;
}

.campaign-card__headline span {
  font-size: 13px;
  color: #62748f;
}

.campaign-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 16px;
  font-size: 12px;
  color: #526079;
}

.campaign-card__meta strong {
  display: block;
  font-size: 13px;
  color: #1f2933;
}

.campaign-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.campaign-card__actions .button {
  flex: 1 1 140px;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6fa;
  padding: 24px;
}

.admin-login__card {
  width: 100%;
  max-width: 360px;
}

.admin-login__title {
  margin: 0 0 16px;
  font-size: 22px;
  text-align: center;
  color: #1f2933;
}

.admin-login__error {
  margin: 0 0 12px;
  text-align: center;
}

.admin-login__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-login__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
}

.admin-login__field input {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d0d7e2;
  font-size: 15px;
}

.admin-login__submit {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: #1a73e8;
  color: #fff;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

.admin-login__submit:hover {
  background: #1664c4;
}

.admin-login__submit:active {
  transform: translateY(1px);
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #d0d7e2;
  font-size: 14px;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6e8ef;
  text-align: left;
  font-size: 14px;
}

th {
  background: #f9fbff;
  font-weight: 600;
  color: #41526b;
}

td.actions {
  display: flex;
  gap: 8px;
}

@media (min-width: 640px) {
  .camp-header {
    padding-inline: 28px;
  }

  .upload-inline {
    margin: 20px 0 16px;
  }

  .admin-header {
    padding: 20px 28px 16px;
  }

  .admin-logout {
    justify-content: flex-end;
  }
}

@media (min-width: 768px) {
  .camp-header {
    justify-content: space-between;
    padding-inline: 32px;
  }

  .camp-main {
    padding: 32px;
    gap: 24px;
  }

  .photos-section .photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .camp-nav {
    width: auto;
  }

  .admin-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 18px;
  }

  .admin-header__meta {
    max-width: 70%;
  }
}
