body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #f6c65b, #f05b5b, #7a2a4a);
  background-size: 400% 400%;
  animation: bg 18s ease infinite;
  color: #333;
}

@keyframes bg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 30px;
  background: linear-gradient(180deg, #fff6f2, #ffeae2);
  border-radius: 22px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  box-sizing: border-box;
}

.narrow {
  max-width: 860px;
}

.logo {
  display: block;
  margin: 0 auto 20px auto;
  max-width: 220px;
  width: 100%;
  height: auto;
}

.hero-card {
  background: linear-gradient(135deg, #fff3da, #ffd9c7);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: 0 8px 18px rgba(122, 42, 74, 0.08);
}

h1 {
  text-align: center;
  color: #7a2a4a;
  margin: 0 0 10px 0;
}

h2, h3 {
  color: #7a2a4a;
}

.intro {
  text-align: center;
  margin: 0;
  font-size: 18px;
}

.card {
  background: linear-gradient(180deg, #fffaf7, #ffe9df);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  margin-bottom: 22px;
}

.basket-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.basket-card {
  background: linear-gradient(180deg, #fffaf6, #ffe7de);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform .2s ease;
}

.basket-card:hover {
  transform: translateY(-6px);
}

.image-wrap {
  background: #fff8f3;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.basket-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.full-link {
  text-decoration: none;
}

button {
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff7a5c, #f04c6a);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(240, 76, 106, 0.18);
}

button:hover {
  opacity: 0.94;
}

button.primary {
  background: linear-gradient(135deg, #7a2a4a, #b23a65);
}

button.secondary {
  background: #ead8d1;
  color: #333;
  box-shadow: none;
}

.save-btn {
  background: linear-gradient(135deg, #7a2a4a, #b23a65);
}

.small-btn {
  padding: 8px 12px;
  font-size: 13px;
}

.input,
.number-input,
.select {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid #f1c3b3;
  background: #fff7f3;
}

.small-number {
  max-width: 110px;
  margin: 0;
}

.label {
  display: block;
  margin-top: 12px;
  font-weight: 700;
}

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

.required {
  color: #c00000;
  font-size: 12px;
}

.notice {
  margin-top: 12px;
  min-height: 22px;
  font-weight: 700;
}

.success {
  color: #18753c;
}

.error {
  color: #b00020;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 14px 0;
}

.total-box {
  background: linear-gradient(135deg, #fff2d8, #ffe4d8);
  padding: 15px;
  border-radius: 10px;
  margin: 16px 0;
  font-weight: 700;
}

.lot-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #efd8cf;
}

.admin-lot-line {
  align-items: flex-start;
}

.move-box {
  min-width: 145px;
}

.popup {
  position: fixed;
  inset: 0;
  background: rgba(60, 20, 30, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
  box-sizing: border-box;
}

.popup-content {
  background: linear-gradient(180deg, #fffaf7, #ffe9df);
  padding: 26px;
  border-radius: 18px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
}

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

.popup-list p {
  padding: 8px 0;
  border-bottom: 1px solid #eed7cf;
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: #fff8f4;
  border-radius: 10px;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid #ead5cc;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #ffe6dc;
}

.row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.winner-card {
  background: linear-gradient(135deg, #fff2d8, #ffe4d8);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
}

.admin-hidden {
  display: none;
}

.admin-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.admin-actions button {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .basket-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .row-3 {
    grid-template-columns: 1fr;
  }

  .lot-line {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .container {
    margin: 0;
    border-radius: 0;
    padding: 18px;
  }

  .basket-grid {
    grid-template-columns: 1fr;
  }

  .logo {
    max-width: 180px;
  }

  button {
    width: 100%;
  }

  .btn-row {
    flex-direction: column;
  }
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.inline-notice {
  min-height: auto;
  margin: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.summary-box {
  background: linear-gradient(180deg, #fffaf6, #ffe7de);
  border: 1px solid #f0d6ca;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 18px rgba(122, 42, 74, 0.08);
}

.summary-title {
  font-weight: 700;
  color: #7a2a4a;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 24px;
  font-weight: 800;
  color: #7a2a4a;
}

.summary-sub,
.basket-meta {
  color: #6b5b54;
  font-size: 14px;
}

.admin-baskets-grid {
  align-items: start;
}

.basket-admin-card {
  background: linear-gradient(180deg, #fffaf6, #ffe7de);
  border: 1px solid #f0d6ca;
  border-radius: 16px;
  padding: 18px;
}

.basket-admin-header {
  margin-bottom: 10px;
}

.move-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.move-stack {
  justify-content: flex-end;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success {
  background: #dff4e7;
  color: #1f6f43;
}

.badge-warn {
  background: #fbe7d8;
  color: #9a531e;
}

.badge-info {
  background: #dfeafb;
  color: #2153a6;
}

.badge-muted {
  background: #ece8e5;
  color: #6b625c;
}

.btn-import {
  background: linear-gradient(135deg, #3498db, #2b6fd3);
}

.btn-add {
  background: linear-gradient(135deg, #2ecc71, #24a85c);
}

.btn-generate {
  background: linear-gradient(135deg, #8e44ad, #6f2f92);
}

.btn-save {
  background: linear-gradient(135deg, #1f4ed8, #173ca8);
}

.btn-calc {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-secondary-soft {
  background: #ead8d1;
  color: #333;
  box-shadow: none;
}

.btn-login {
  background: linear-gradient(135deg, #7a2a4a, #b23a65);
}

@media (max-width: 900px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}


.import-audit {
  margin-top: 10px;
  white-space: pre-line;
  background: #fff7f3;
  border: 1px solid #f1c3b3;
  border-radius: 12px;
  padding: 12px 14px;
}


.import-mode-box {
  margin-top: 10px;
  background: #fff7f3;
  border: 1px solid #f1c3b3;
  border-radius: 12px;
  padding: 12px 14px;
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 700;
  color: #5a3040;
  margin-bottom: 6px;
}


.basket-admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.basket-admin-header .btn-export {
  white-space: nowrap;
  align-self: center;
}


.top-stats-row {
  display: flex;
  justify-content: center;
  margin: 18px 0 8px 0;
}

.participant-box {
  min-width: 260px;
  text-align: center;
}


.participant-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.participant-box {
  min-width: 0;
  text-align: center;
}

.participant-box.total-box {
  border: 2px solid rgba(122, 42, 74, 0.18);
}

@media (max-width: 900px) {
  .participant-stats-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 600px) {
  .participant-stats-grid {
    grid-template-columns: 1fr;
  }
}

.login-card { max-width: 420px; margin: 0 auto 24px auto; }
