/* Parkguru User Plugin — Auth + Dashboard + Tracking */

:root {
  --pgu-primary: #2ecc71;
  --pgu-primary-dark: #27ae60;
  --pgu-bg: #f7f9fc;
  --pgu-text: #0f1b2d;
  --pgu-muted: #6b7280;
  --pgu-border: #e5e7eb;
  --pgu-shadow: 0 10px 30px rgba(15, 27, 45, .08);
  --pgu-shadow-sm: 0 2px 8px rgba(15, 27, 45, .06);
}

.pgu-auth-wrap, .pgu-dashboard, .pgu-pass, .pgu-track-lookup {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--pgu-text);
}

/* ================= AUTH PAGES ================= */
.pgu-auth-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1080px;
  margin: 60px auto;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(15, 27, 45, .12);
}
.pgu-auth-single { grid-template-columns: 1fr; max-width: 520px; }

.pgu-auth-card { padding: 56px 48px; }
.pgu-auth-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; margin-bottom: 32px;
}
.pgu-auth-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #2ecc71, #1abc9c);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 900; box-shadow: 0 6px 14px rgba(46,204,113,.35);
}
.pgu-auth-card h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.02em; font-weight: 800; }
.pgu-muted { color: var(--pgu-muted); }

.pgu-form { margin-top: 24px; }
.pgu-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pgu-field { margin-bottom: 14px; }
.pgu-field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--pgu-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .03em;
}
.pgu-field input, .pgu-field select {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--pgu-border); background: var(--pgu-bg);
  font-size: 15px; font-family: inherit; outline: none;
  transition: all .2s ease; box-sizing: border-box;
}
.pgu-field input:focus { background: #fff; border-color: var(--pgu-primary); box-shadow: 0 0 0 3px rgba(46,204,113,.12); }
.pgu-field small { font-size: 11px; margin-top: 4px; display: block; }

.pgu-row-between { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 16px; font-size: 13px; }
.pgu-check { display: inline-flex; align-items: center; gap: 6px; color: var(--pgu-muted); cursor: pointer; font-size: 13px; }
.pgu-check input { margin: 0; accent-color: var(--pgu-primary); }
.pgu-link { color: var(--pgu-primary); text-decoration: none; font-weight: 600; }

.pgu-btn {
  background: linear-gradient(135deg, #2ecc71, #1abc9c);
  color: #fff; border: 0; padding: 15px 26px;
  font-size: 15px; font-weight: 700; font-family: inherit;
  border-radius: 12px; cursor: pointer;
  transition: all .25s ease; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; box-shadow: 0 8px 20px rgba(46,204,113,.3);
}
.pgu-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(46,204,113,.4); color: #fff; }
.pgu-btn-block { width: 100%; }
.pgu-btn-ghost {
  padding: 10px 18px; background: #fff; color: var(--pgu-text);
  border: 1px solid var(--pgu-border); border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
  font-family: inherit;
}
.pgu-btn-ghost:hover { border-color: var(--pgu-primary); color: var(--pgu-primary); }
.pgu-btn-danger {
  background: #fff; color: #dc2626; border: 1px solid #fecaca;
  padding: 12px 20px; border-radius: 10px; cursor: pointer;
  font-weight: 600; font-family: inherit;
}
.pgu-btn-danger:hover { background: #fef2f2; }

.pgu-msg { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-size: 14px; display: none; }
.pgu-msg.error { display: block; background: #fef2f2; color: #dc2626; }
.pgu-msg.success { display: block; background: #eafff4; color: #16794c; }

.pgu-auth-foot {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--pgu-border);
  font-size: 14px; color: var(--pgu-muted);
}
.pgu-auth-foot a { color: var(--pgu-primary); font-weight: 700; }

.pgu-auth-side {
  background: linear-gradient(135deg, #2ecc71 0%, #1abc9c 100%);
  color: #fff; padding: 56px 48px;
  display: flex; align-items: center; position: relative;
  overflow: hidden;
}
.pgu-auth-side::before {
  content: ''; position: absolute; top: -50%; right: -30%;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.pgu-auth-side-inner { position: relative; z-index: 1; }
.pgu-auth-side h2 { font-size: 36px; margin: 0 0 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.pgu-auth-side ul { list-style: none; padding: 0; margin: 0; }
.pgu-auth-side li { padding: 10px 0; font-size: 15px; font-weight: 500; }

@media (max-width: 900px) {
  .pgu-auth-wrap { grid-template-columns: 1fr; margin: 20px; }
  .pgu-auth-card { padding: 40px 28px; }
  .pgu-auth-side { padding: 40px 28px; }
}

/* OTP block + action row */
.pgu-otp-block {
  background: #f7f9fc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 6px 0 16px;
}
.pgu-otp-block .pgu-field { margin-bottom: 4px; }
.pgu-otp-block small { display: block; margin-top: 6px; font-size: 12px; }
.pgu-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.pgu-action-row .pgu-btn,
.pgu-action-row .pgu-btn-ghost { flex: 0 0 auto; }

/* Password setup banner */
.pgu-password-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff7e0, #fef3c7);
  border: 1px solid #fcd34d;
  border-radius: 14px;
  margin-bottom: 20px;
}
.pgu-pwbanner-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(245, 158, 11, .2);
  color: #92400e;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pgu-pwbanner-text { flex: 1; min-width: 0; }
.pgu-pwbanner-text strong {
  display: block;
  font: 700 15px "Montserrat", sans-serif;
  color: #92400e;
  margin-bottom: 2px;
}
.pgu-pwbanner-text span {
  display: block;
  font-size: 13px;
  color: #92400e;
  opacity: .85;
}
.pgu-pwbanner-btn {
  flex-shrink: 0;
  padding: 9px 18px;
  background: #f59e0b;
  color: #fff;
  border-radius: 22px;
  font: 700 13px "Montserrat", sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.pgu-pwbanner-btn:hover { background: #d97706; color: #fff; }

@media (max-width: 600px) {
  .pgu-password-banner { flex-wrap: wrap; }
  .pgu-pwbanner-btn { width: 100%; text-align: center; }
}

/* ================= DASHBOARD ================= */
.pgu-dashboard {
  max-width: 1180px; margin: 40px auto;
  padding: 0 20px;
}
.pgu-dash-head {
  display: flex; align-items: center; gap: 20px;
  background: #fff; padding: 28px 32px;
  border-radius: 20px; box-shadow: var(--pgu-shadow-sm);
  margin-bottom: 20px;
}
.pgu-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #2ecc71, #1abc9c);
  color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(46,204,113,.35);
}
.pgu-head-info { flex: 1; }
.pgu-head-info h2 { margin: 0 0 4px; font-size: 22px; }
.pgu-head-info p { margin: 0; color: var(--pgu-muted); font-size: 14px; }
.pgu-logout-btn {
  padding: 10px 18px; background: #fff; color: #dc2626;
  border: 1px solid var(--pgu-border); border-radius: 10px;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.pgu-logout-btn:hover { background: #fef2f2; color: #dc2626; }

.pgu-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 20px;
}
.pgu-stat {
  background: #fff; padding: 22px 24px; border-radius: 16px;
  box-shadow: var(--pgu-shadow-sm);
  border: 1px solid var(--pgu-border);
  transition: transform .2s;
}
.pgu-stat:hover { transform: translateY(-3px); box-shadow: var(--pgu-shadow); }
.pgu-stat-num { font-size: 28px; font-weight: 800; color: var(--pgu-primary); line-height: 1; }
.pgu-stat-label { font-size: 12px; color: var(--pgu-muted); margin-top: 6px; text-transform: uppercase; letter-spacing: .04em; }

.pgu-dash-body {
  display: grid; grid-template-columns: 240px 1fr; gap: 20px;
}
.pgu-sidebar {
  background: #fff; border-radius: 16px;
  padding: 14px; box-shadow: var(--pgu-shadow-sm); height: fit-content;
  border: 1px solid var(--pgu-border);
}
.pgu-sidebar a {
  display: block; padding: 12px 16px; border-radius: 10px;
  color: var(--pgu-text); font-weight: 600; font-size: 14px;
  text-decoration: none; margin-bottom: 4px; transition: all .2s;
}
.pgu-sidebar a:hover { background: var(--pgu-bg); color: var(--pgu-primary-dark); }
.pgu-sidebar a.active {
  background: linear-gradient(135deg, #eafff4, #d4f7e5);
  color: var(--pgu-primary-dark);
}

.pgu-dash-main {
  background: #fff; border-radius: 16px;
  padding: 32px; box-shadow: var(--pgu-shadow-sm);
  border: 1px solid var(--pgu-border);
}
.pgu-dash-main h3 { margin: 0 0 20px; font-size: 20px; }

/* Booking list */
.pgu-booking-list { display: flex; flex-direction: column; gap: 12px; }
.pgu-booking {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 16px; align-items: center;
  padding: 18px; border-radius: 14px;
  border: 1px solid var(--pgu-border);
  transition: all .2s;
}
.pgu-booking:hover { border-color: var(--pgu-primary); box-shadow: var(--pgu-shadow-sm); }
.pgu-b-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: #eafff4; display: flex; align-items: center; justify-content: center;
}
.pgu-b-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.pgu-b-title strong { font-size: 15px; }
.pgu-b-addr { color: var(--pgu-muted); font-size: 13px; margin-bottom: 6px; }
.pgu-b-meta { display: flex; gap: 14px; font-size: 12px; color: var(--pgu-muted); flex-wrap: wrap; }

/* Status chips */
.pgu-status {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: capitalize;
}
.pgu-confirmed, .pgu-succeeded { background: #eafff4; color: #16794c; }
.pgu-pending   { background: #fff7e0; color: #8a5a00; }
.pgu-cancelled, .pgu-failed { background: #fef2f2; color: #dc2626; }
.pgu-refunded  { background: #eff6ff; color: #2563eb; }

/* Filter pills */
.pgu-filter-pills { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.pgu-pill {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--pgu-border); background: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all .2s;
}
.pgu-pill.active { background: var(--pgu-primary); color: #fff; border-color: var(--pgu-primary); }

/* Empty state */
.pgu-empty {
  text-align: center; padding: 50px 20px; color: var(--pgu-muted);
}
.pgu-empty svg { margin-bottom: 16px; }
.pgu-empty h4 { color: var(--pgu-text); margin: 0 0 8px; font-size: 18px; }
.pgu-empty p { margin: 0 0 20px; }

/* Saved grid */
.pgu-saved-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pgu-saved-card {
  padding: 20px; border-radius: 14px; border: 1px solid var(--pgu-border);
  background: var(--pgu-bg);
}
.pgu-saved-icon {
  display: inline-block; padding: 4px 10px; background: #eafff4;
  color: var(--pgu-primary-dark); border-radius: 999px;
  font-size: 11px; font-weight: 700; margin-bottom: 10px;
}
.pgu-saved-card h5 { margin: 0 0 4px; font-size: 15px; }
.pgu-saved-card p { margin: 0; font-size: 13px; color: var(--pgu-muted); }

/* Payment table */
.pgu-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pgu-table th, .pgu-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--pgu-border); }
.pgu-table th { font-size: 12px; text-transform: uppercase; color: var(--pgu-muted); letter-spacing: .04em; }

@media (max-width: 900px) {
  .pgu-dash-body { grid-template-columns: 1fr; }
  .pgu-stats { grid-template-columns: repeat(2, 1fr); }
  .pgu-dash-head { flex-direction: column; text-align: center; }
  .pgu-booking { grid-template-columns: 54px 1fr; }
  .pgu-b-actions { grid-column: 1 / -1; justify-self: stretch; }
  .pgu-b-actions .pgu-btn-ghost { width: 100%; justify-content: center; }
}

/* ================= TRACKING / PASS ================= */
.pgu-pass { max-width: 560px; margin: 40px auto; padding: 0 20px; }
.pgu-pass-card {
  background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 25px 60px rgba(15, 27, 45, .15);
}
.pgu-pass-header {
  padding: 32px 32px 20px;
  background: linear-gradient(135deg, #2ecc71, #1abc9c);
  color: #fff;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.pgu-pass-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; opacity: .85; margin-bottom: 6px; }
.pgu-pass-header h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.pgu-pass-addr { margin: 0; font-size: 13px; opacity: .9; }
.pgu-pass-header .pgu-status { background: rgba(255,255,255,.2); color: #fff; }

.pgu-pass-photo { height: 180px; }
.pgu-pass-photo img { width: 100%; height: 100%; object-fit: cover; }

.pgu-pass-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  padding: 26px 32px; border-bottom: 1px dashed var(--pgu-border);
}
.pgu-pass-grid > div span { display: block; font-size: 11px; color: var(--pgu-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.pgu-pass-grid > div strong { font-size: 14px; }

.pgu-qr { text-align: center; padding: 26px 32px; border-bottom: 1px dashed var(--pgu-border); }
.pgu-qr img { border-radius: 14px; padding: 14px; background: var(--pgu-bg); display: inline-block; }
.pgu-qr p { margin: 10px 0 0; font-size: 13px; color: var(--pgu-muted); }

.pgu-timeline {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 32px; position: relative;
}
.pgu-timeline::before {
  content: ''; position: absolute; top: 48px; left: 60px; right: 60px;
  height: 2px; background: var(--pgu-border); z-index: 0;
}
.pgu-tl-step { text-align: center; position: relative; z-index: 1; }
.pgu-tl-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff; border: 2px solid var(--pgu-border);
  color: var(--pgu-muted); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
}
.pgu-tl-step.done .pgu-tl-dot { background: var(--pgu-primary); border-color: var(--pgu-primary); color: #fff; }
.pgu-tl-label { font-size: 11px; color: var(--pgu-muted); font-weight: 600; }
.pgu-tl-step.done .pgu-tl-label { color: var(--pgu-text); }

.pgu-pass-actions {
  display: flex; gap: 10px; padding: 24px 32px 32px;
}
.pgu-pass-actions .pgu-btn, .pgu-pass-actions .pgu-btn-ghost { flex: 1; justify-content: center; }

.pgu-track-lookup {
  max-width: 440px; margin: 60px auto; padding: 40px;
  background: #fff; border-radius: 20px; box-shadow: var(--pgu-shadow); text-align: center;
}
.pgu-track-lookup h2 { margin: 0 0 8px; }
.pgu-track-form { display: flex; gap: 10px; margin-top: 20px; }
.pgu-track-form input {
  flex: 1; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--pgu-border); font-size: 14px; font-family: inherit;
  text-transform: uppercase; outline: none;
}
.pgu-track-form input:focus { border-color: var(--pgu-primary); }
