@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Figtree:wght@400;500;600&display=swap");

:root {
  --red-1: #a80000;
  --red-2: #c71e1e;
  --gold-1: #d8a71d;
  --gold-2: #f0c95d;
  --ink: #2b1a10;
  --paper: #fff7e6;
  --shadow: rgba(25, 10, 10, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Figtree", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(240, 201, 93, 0.45), transparent 45%),
    radial-gradient(circle at bottom right, rgba(167, 0, 0, 0.4), transparent 45%),
    linear-gradient(135deg, #fff4d7, #f9e5bf);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(167, 0, 0, 0.08) 0%, rgba(167, 0, 0, 0) 45%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.15) 0,
      rgba(255, 255, 255, 0.15) 1px,
      transparent 1px,
      transparent 12px
    );
  pointer-events: none;
  opacity: 0.85;
  animation: drift 12s ease-in-out infinite;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

h1,
h2,
h3 {
  font-family: "Cinzel", "Georgia", serif;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 16px 48px;
}

.auth-grid {
  display: grid;
  gap: 24px;
  width: min(980px, 100%);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.brand-panel {
  background: linear-gradient(140deg, var(--red-1), var(--red-2));
  color: var(--paper);
  border-radius: 24px;
  padding: 28px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 24px 60px rgba(87, 16, 16, 0.35);
  animation: rise 0.8s ease-out;
}

.brand-top {
  display: grid;
  gap: 18px;
}

.brand-panel p {
  margin: 0;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.8);
}

.badge span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 16px rgba(240, 201, 93, 0.7);
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 28px 28px 32px;
  box-shadow: 0 22px 60px var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise 0.9s ease-out;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(215, 168, 29, 0.2);
  border-radius: 24px;
  pointer-events: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-stack {
  display: grid;
  gap: 16px;
}

.form-stack > * {
  animation: stagger 0.8s ease both;
}

.form-stack > *:nth-child(1) { animation-delay: 0.05s; }
.form-stack > *:nth-child(2) { animation-delay: 0.1s; }
.form-stack > *:nth-child(3) { animation-delay: 0.15s; }
.form-stack > *:nth-child(4) { animation-delay: 0.2s; }
.form-stack > *:nth-child(5) { animation-delay: 0.25s; }
.form-stack > *:nth-child(6) { animation-delay: 0.3s; }
.form-stack > *:nth-child(7) { animation-delay: 0.35s; }

@keyframes stagger {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  color: rgba(43, 26, 16, 0.7);
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(199, 30, 30, 0.2);
  background: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.choice-group {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(199, 30, 30, 0.2);
  background: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.choice-option input {
  accent-color: var(--red-2);
}

.choice-option:has(input:checked) {
  border-color: var(--red-2);
  box-shadow: 0 0 0 3px rgba(199, 30, 30, 0.15);
  transform: translateY(-1px);
}

.field input:focus {
  outline: none;
  border-color: var(--red-2);
  box-shadow: 0 0 0 3px rgba(199, 30, 30, 0.15);
}

.store-map-wrap {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.store-map-wrap[hidden] {
  display: none;
}

.store-map-wrap .status-text {
  color: rgba(255, 255, 255, 0.85);
}

.store-map-wrap h2 {
  margin: 0;
  font-size: 18px;
}

#store-map {
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.map-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.store-only[hidden] {
  display: none;
}

.split {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--red-2), var(--red-1));
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 24px rgba(167, 0, 0, 0.25);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(167, 0, 0, 0.3);
}

.text-link {
  color: var(--gold-2);
  font-weight: 600;
}

.notice {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(240, 201, 93, 0.25);
  border: 1px solid rgba(215, 168, 29, 0.4);
  font-size: 14px;
}

.error {
  background: rgba(199, 30, 30, 0.12);
  border-color: rgba(199, 30, 30, 0.4);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 22px 32px;
  background: linear-gradient(120deg, var(--red-1), #8f0d0d);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-bar .logo {
  font-family: "Cinzel", "Georgia", serif;
  letter-spacing: 1px;
}

.top-bar .btn {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-1));
  color: var(--ink);
  box-shadow: 0 12px 22px rgba(216, 167, 29, 0.35);
}

.dashboard {
  padding: 24px 32px 40px;
  display: grid;
  gap: 18px;
}

.map-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 24px 60px var(--shadow);
  height:250px;
}

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

.status-text {
  font-size: 13px;
  color: rgba(43, 26, 16, 0.7);
}

#map {
  height: 100vh;
  min-height: 300px;
  border-radius: 18px;
  overflow: hidden;
}

#store-map {
  height: 100vh;
  min-height: 700px;
  border-radius: 18px;
  overflow: hidden;
}

.leaflet-routing-container {
  display: none;
}

.map-pin-wrapper {
  background: transparent;
  border: none;
}

.custom-marker {
  background: transparent;
  border: none;
}

.map-marker {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 2px solid var(--red-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-1);
  background: #fff;
  box-shadow: 0 10px 18px rgba(43, 26, 16, 0.28);
}

.map-marker.store {
  background: var(--gold-2);
  color: var(--red-1);
  border-color: var(--red-1);
}

.map-marker.home {
  background: #fff;
}

.marker-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pin {
  width: 26px;
  height: 26px;
  background: var(--gold-1);
  border: 3px solid var(--red-2);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: relative;
  box-shadow: 0 8px 16px rgba(43, 26, 16, 0.3);
}

.pin::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--red-1);
  border-radius: 50%;
  top: 6px;
  left: 6px;
}

.pin.user {
  background: var(--red-2);
  border-color: var(--gold-2);
}

.pin.user::after {
  background: var(--gold-2);
}

@media (max-width: 720px) {
  .top-bar {
    padding: 16px 20px;
  }

  .dashboard {
    padding: 18px;
  }

  #map {
    height: 80vh;
    min-height: 420px;
  }

  #store-map {
    height: 80vh;
    min-height: 420px;
  }
}
