* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, #dbeafe 0%, rgba(219, 234, 254, 0) 35%),
    radial-gradient(circle at 90% 10%, #fce7f3 0%, rgba(252, 231, 243, 0) 35%),
    linear-gradient(180deg, #f8fbff 0%, #f1f5ff 100%);
  color: #0f172a;
  min-height: 100vh;
}
.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 40px; }
.nav {
  background: linear-gradient(90deg, #0f172a, #1e1b4b);
  color: #fff;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}
.nav a {
  color: #e0e7ff;
  text-decoration: none;
  margin-right: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-block;
  transition: all .2s ease;
}
.nav a:hover { background: rgba(255, 255, 255, 0.18); color: #fff; transform: translateY(-1px); }
.hero {
  background:
    linear-gradient(130deg, rgba(59, 130, 246, 0.16), rgba(236, 72, 153, 0.12)),
    #ffffff;
  border: 1px solid rgba(147, 197, 253, 0.6);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 18px;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.12);
}
.hero h1 { margin-top: 0; margin-bottom: 10px; font-size: 35px; line-height: 1.15; }
.hero p { margin-top: 0; color: #334155; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(191, 219, 254, 0.65);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.product-title { margin-top: 0; margin-bottom: 10px; font-size: 20px; }
.price-line { margin: 6px 0; color: #1e293b; }
.muted { color: #64748b; }
.btn {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  color: #fff;
  border: 0;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
  transition: all .2s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.secondary { background: linear-gradient(90deg, #334155, #1f2937); box-shadow: none; }
.btn.secondary:hover { filter: brightness(1.08); }
.btn.danger { background: #dc2626; }
.btn.danger:hover { background: #b91c1c; }
.field { margin-bottom: 12px; }
.field label {
  display: block;
  margin-bottom: 5px;
  color: #334155;
  font-size: 14px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.flash {
  padding: 11px 12px;
  border-radius: 9px;
  margin-bottom: 12px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.small { font-size: 13px; color: #64748b; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  border-bottom: 1px solid #dbeafe;
  padding: 11px 8px;
  text-align: left;
  vertical-align: top;
}
.table th { background: #eff6ff; color: #334155; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.auth-card { max-width: 460px; margin: 40px auto; }
.narrow-card { max-width: 700px; margin: 24px auto; }
.status-pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 99px;
  font-size: 12px;
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
.section-title { margin-top: 4px; margin-bottom: 10px; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.step {
  background: #f9fbff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 14px;
}
.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.list-clean { margin: 0; padding-left: 18px; color: #334155; }
.footer {
  margin-top: 24px;
  padding: 20px;
  border-top: 1px solid #bfdbfe;
  color: #64748b;
  font-size: 14px;
}
.footer a { color: #334155; text-decoration: none; margin-right: 10px; }
.footer a:hover { text-decoration: underline; }
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle-label {
  margin: 0;
  font-size: 14px;
  color: #334155;
}
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .2s;
  border-radius: 999px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
.switch input:checked + .slider {
  background-color: #2563eb;
}
.switch input:checked + .slider:before {
  transform: translateX(20px);
}
.editor-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.editor-preview {
  margin-top: 8px;
  padding: 12px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #ffffff;
  min-height: 60px;
}
.dropzone {
  margin-top: 8px;
  padding: 12px;
  border: 2px dashed #93c5fd;
  border-radius: 10px;
  background: #f8fbff;
  color: #334155;
  text-align: center;
}
.dropzone.small {
  font-size: 13px;
  padding: 10px;
}
.dropzone.active {
  border-color: #2563eb;
  background: #eff6ff;
}
.media-library {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.media-library[hidden] {
  display: none !important;
}
.media-library-card {
  width: min(980px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #bfdbfe;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  padding: 16px;
}
.media-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.media-library-head h3 {
  margin: 0;
}
.media-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.media-item {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 8px;
  background: #f8fbff;
}
.media-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
}
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-gallery-main-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  background: linear-gradient(120deg, #e0ecff, #f8faff);
}
.product-gallery-main {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}
.product-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}
.product-gallery-arrow:hover {
  background: rgba(37, 99, 235, 0.85);
}
.product-gallery-arrow.prev {
  left: 12px;
}
.product-gallery-arrow.next {
  right: 12px;
}
.product-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.product-gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: #cbd5e1;
  cursor: pointer;
  padding: 0;
}
.product-gallery-dot.active {
  background: #2563eb;
}
.product-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}
.product-gallery-thumb-btn {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
}
.product-gallery-thumb-btn.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.product-gallery-thumb {
  width: 100%;
  height: 82px;
  object-fit: cover;
  display: block;
}
@media (max-width: 700px) {
  .product-gallery-main {
    max-height: 320px;
  }
  .product-gallery-arrow {
    width: 36px;
    height: 36px;
  }
}
