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

:root {
  --blue-900: #063a6b;
  --blue-700: #0b5cab;
  --blue-500: #1a7fd4;
  --blue-100: #e8f3fc;
  --green-700: #147a3d;
  --green-500: #1a9f4f;
  --green-100: #e6f7ed;
  --white: #ffffff;
  --ink: #0f2438;
  --muted: #4a6278;
  --line: #c9dceb;
  --danger: #c62828;
  --shadow: 0 12px 40px rgba(6, 58, 107, 0.12);
  --radius: 14px;
  --font: 'Heebo', sans-serif;
  --display: 'Rubik', 'Heebo', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(26, 159, 79, 0.12), transparent 55%),
    radial-gradient(900px 500px at -10% 0%, rgba(11, 92, 171, 0.16), transparent 50%),
    linear-gradient(180deg, #f4f9fd 0%, #eef7f2 45%, #f7fbff 100%);
  min-height: 100vh;
  line-height: 1.55;
}

a { color: var(--blue-700); text-decoration: none; }
a:hover { color: var(--green-700); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(201, 220, 235, 0.8);
}
.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--blue-700);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-700), var(--green-500));
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.1rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  padding: 10px 16px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: white;
  box-shadow: 0 8px 20px rgba(11, 92, 171, 0.28);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-green {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  box-shadow: 0 8px 20px rgba(26, 159, 79, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--blue-700);
  border: 1px solid var(--line);
}
.btn-danger {
  background: #fff5f5;
  color: var(--danger);
  border: 1px solid #f5c2c2;
}
.btn-block { width: 100%; }

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px 28px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  min-height: calc(100vh - 72px);
}
.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 14px;
  color: var(--blue-900);
}
.hero-copy .lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 36ch;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
  position: relative;
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(11, 92, 171, 0.92), rgba(20, 122, 61, 0.88)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  box-shadow: var(--shadow);
  color: white;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: rise 0.8s ease both;
}
.hero-visual h2 {
  font-family: var(--display);
  font-size: 1.8rem;
  margin: 0 0 8px;
}
.hero-visual p { margin: 0; opacity: 0.92; }
.price-tag {
  align-self: flex-start;
  margin-bottom: auto;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  animation: pulseSoft 2.8s ease-in-out infinite;
}

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px;
}
.section h2 {
  font-family: var(--display);
  color: var(--blue-900);
  margin: 0 0 8px;
  font-size: 1.8rem;
}
.section .sub {
  color: var(--muted);
  margin: 0 0 24px;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.store-chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  transition: transform .2s ease, border-color .2s ease;
}
.store-chip:hover {
  transform: translateY(-3px);
  border-color: var(--green-500);
}
.store-chip strong { display: block; color: var(--blue-700); }
.store-chip span { font-size: 0.85rem; color: var(--muted); }

.auth-wrap, .dash-wrap, .admin-wrap {
  max-width: 520px;
  margin: 40px auto;
  padding: 0 16px 48px;
}
.dash-wrap, .admin-wrap { max-width: 1080px; }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.45s ease both;
}
.panel h1 {
  font-family: var(--display);
  margin: 0 0 6px;
  color: var(--blue-900);
  font-size: 1.7rem;
}
.panel .hint { color: var(--muted); margin: 0 0 22px; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.92rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: #fbfdff;
  color: var(--ink);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: 2px solid rgba(11, 92, 171, 0.25);
  border-color: var(--blue-500);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.msg {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  display: none;
}
.msg.show { display: block; }
.msg.error { background: #fff0f0; color: var(--danger); border: 1px solid #f5c2c2; }
.msg.ok { background: var(--green-100); color: var(--green-700); border: 1px solid #b7e4c7; }
.msg.info { background: var(--blue-100); color: var(--blue-900); border: 1px solid #b7d4ef; }

.steps {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.step {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.step.active {
  background: var(--blue-700);
  color: white;
}
.step.done {
  background: var(--green-100);
  color: var(--green-700);
}

#paypal-button-container {
  min-height: 48px;
  margin-top: 12px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}
.side-panel, .main-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.basket-list { list-style: none; padding: 0; margin: 12px 0 0; }
.basket-list li {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 6px;
}
.basket-list li:hover { background: var(--blue-100); }
.basket-list li.active {
  background: var(--green-100);
  border-color: #b7e4c7;
  font-weight: 700;
}
.item-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.item-table th, .item-table td {
  text-align: right;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: linear-gradient(160deg, var(--blue-100), var(--white));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.stat .label { color: var(--muted); font-size: 0.85rem; }
.stat .value {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--blue-900);
  font-weight: 800;
}
.result-box {
  margin-top: 16px;
  background: var(--green-100);
  border: 1px solid #b7e4c7;
  border-radius: 12px;
  padding: 16px;
}
.source-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tag {
  font-size: 0.75rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 24px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.55);
}

.hidden { display: none !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 28px; }
  .dash-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-visual { min-height: 280px; }
}
