:root {
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --accent: #7c3aed;
  --panel: #ffffff;
  --bg: #f8fafc;
  --muted: #6b7280;
  --ring: #c7d2fe;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  --radius: 14px;
}

/* Base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, #ede9fe 0%, #f5f3ff 40%, #ffffff 100%); /* light purple gradient */
  color: #0f172a;
  min-height: 100vh;
  padding-bottom: 130px; /* room for fixed nav */
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(109, 40, 217, 0.08);
  border-bottom:1px solid #ede9fe;
}
.topbar .left {
  display: flex;
  gap: 16px;
  align-items: center;
}
.topbar .right{
  display:flex;
  align-items:center;
  gap:12px;
}

/* Park&Go! image logo */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 40px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.logo-img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.logo {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.topbar .heading{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.topbar .heading .title {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.2px;
  color:#111827;
}
.topbar .heading .subtitle{
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 14px;
  transition: background 0.2s, transform 0.04s;
  text-decoration: none;
  display: inline-block;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--primary);
  color: #fff;
}
.btn.primary:hover {
  background: var(--primary-600);
}
.btn.ghost {
  background: #fff;
  color: #4f46e5;
  border: 1px solid #e5e7eb;
}
.link-btn{
  background:none;
  border:none;
  color:var(--primary);
  font-weight:700;
  cursor:pointer;
  padding:0;
}
.link-btn:hover{
  text-decoration:underline;
}

/* Content container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 16px;
  min-height: calc(100vh - 160px);
  padding-bottom: 220px;
  display: flex;
  flex-direction: column;
}

/* Panels */
.resv-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.resv-panel + .resv-panel{
  margin-top:24px;
}
.resv-panel[hidden] {
  display: none !important;
}

/* Cards */
.resv-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  border: 1px solid #e5e7eb;
}
.active-pass-card{
  background:#ecfdf5;
  border-radius:var(--radius);
  box-shadow:0 20px 40px rgba(4,120,87,0.15);
  padding:28px;
  border:1px solid #bbf7d0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}
.pass-copy{
  flex:1;
  min-width:240px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.pass-tag{
  font-size:12px;
  font-weight:700;
  letter-spacing:.3px;
  text-transform:uppercase;
  color:#047857;
}
.pass-copy h4{
  margin:0;
  font-size:26px;
  color:#065f46;
  font-weight:800;
}
.pass-spot{
  margin:0;
  color:#065f46;
  font-weight:700;
  font-size:16px;
}
.pass-details{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
}
.pass-details li{
  display:flex;
  justify-content:space-between;
  font-size:14px;
}
.pass-details span{
  color:#6b7280;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.3px;
}
.pass-details strong{
  color:#111827;
}
.pass-meta{
  font-size:13px;
  color:#047857;
  font-weight:600;
}
.empty-pass-card{
  background:#f8fafc;
  border:1px dashed #d1d5db;
  border-radius:18px;
  padding:24px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  box-shadow:0 14px 28px rgba(15,23,42,0.08);
}
.empty-pass-card h4{
  margin:8px 0 4px;
  font-size:24px;
  color:#111827;
}
.empty-pass-card .pass-spot{
  margin:0;
  color:#4b5563;
  font-weight:600;
}
.pass-tag.inactive{
  color:#9ca3af;
}
.pass-qr{
  width:200px;
  height:200px;
  border:10px solid #f4f4f5;
  border-radius:16px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pass-qr canvas,
.pass-qr img{
  width:100%;
  height:100%;
  image-rendering:pixelated;
}
.qr-fallback{
  font-weight:600;
  color:#b91c1c;
  text-align:center;
}
.pass-actions{
  margin-top:16px;
  display:flex;
  justify-content:flex-start;
}
.btn.danger{
  background:#f97316;
  color:#fff;
  border:none;
}
.btn.danger:hover{
  background:#ea580c;
}
.modal{
  padding:0;
  border:none;
  border-radius:12px;
}
.modal-card{
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:12px;
  width:min(90vw,420px);
}
.modal::backdrop{
  background:rgba(0,0,0,0.35);
}
.modal .row{
  display:flex;
  gap:12px;
  justify-content:flex-end;
}
.history-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.history-line{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding-bottom:10px;
  border-bottom:1px solid #e5e7eb;
}
.history-line:last-child{
  border-bottom:none;
  padding-bottom:0;
}
.history-line strong{
  display:block;
  color:#111827;
}
.history-line span{
  display:block;
  color:#6b7280;
  font-size:13px;
}
.history-amount{
  font-weight:700;
  color:#111827;
}
.history-card{
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  padding:20px;
  box-shadow:0 10px 24px rgba(15,23,42,0.08);
}
.history-empty.history-card{
  text-align:center;
}
.resv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.resv-title {
  font-weight: 800;
}
.resv-price {
  font-weight: 800;
  color: #0f172a;
}
.resv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 13px;
}

/* Empty state */
.empty {
  background: #fff;
  border: 1px dashed #e5e7eb;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  width: min(92vw, 720px);
  margin: 24px auto;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
.empty-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px 0;
  color: #0f172a;
}
.empty .muted {
  font-size: 15px;
  margin-bottom: 12px;
}

/* Bottom Nav — identical to home/map */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  height: 68px;
}
.tabbar .tab {
  text-decoration: none;
  color: #6b7280;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.2s, background 0.3s;
  padding: 6px 10px;
  border-radius: 12px;
}
.tabbar .tab:hover {
  color: var(--primary);
  background: #f3e8ff;
  transform: translateY(-2px);
}
.tabbar .tab.active {
  color: var(--primary);
  background: #eef2ff;
  box-shadow: inset 0 0 0 1.5px var(--primary);
}
.tabbar .tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}
.history-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:16px;
}
.history-header h3{
  margin:0;
  font-size:20px;
  color:#0f172a;
}
.history-list.full{
  margin-top:12px;
  max-height:400px;
  overflow-y:auto;
  padding-right:8px;
}
.history-empty{
  margin-top:12px;
}
