:root {
  --primary:#2563eb;
  --radius:14px;
}

/* Reset */
* { box-sizing:border-box; font-family:system-ui, sans-serif; }

body {
  margin:0;
  background:#f5f5f5;
}

body.dark {
  background:#0f172a;
  color:#e5e7eb;
}

/* Header */
.topbar {
  padding:14px;
  background:var(--primary);
  color:#fff;
  text-align:center;
}

/* Layout */
.container {
  padding:16px;
  max-width:480px;
  margin:auto;
}

/* Cards */
.card, .auth-card {
  background:#fff;
  border-radius:var(--radius);
  padding:16px;
  margin-bottom:14px;
  box-shadow:0 4px 10px rgba(0,0,0,.06);
}

body.dark .card,
body.dark .auth-card {
  background:#1e293b;
}

/* Forms */
input, select, textarea {
  width:100%;
  padding:12px;
  margin-bottom:12px;
  border-radius:10px;
  border:1px solid #ddd;
  font-size:16px;
}

textarea { min-height:80px; }

button {
  width:100%;
  padding:14px;
  border:none;
  border-radius:12px;
  background:var(--primary);
  color:white;
  font-size:16px;
  font-weight:600;
}

.btn-primary {
  display:block;
  text-align:center;
  background:var(--primary);
  color:white;
  padding:14px;
  border-radius:12px;
  margin-bottom:16px;
  text-decoration:none;
}

/* Package Card */
.row {
  display:flex;
  justify-content:space-between;
  margin-bottom:6px;
}

.tracking {
  font-size:14px;
  opacity:.8;
}

/* Text */
h2 { margin-top:0; }
.muted { font-size:14px; opacity:.7; }

/* Desktop enhancement */
@media (min-width:768px) {
  .container { max-width:720px; }
}


body.light { background:#f9f9f9; color:#111; }
body.dark { background:#111; color:#eee; }

.card {
  background:#fff;
  padding:15px;
  margin:10px 0;
  border-radius:8px;
}
body.dark .card {
  background:#1e1e1e;
}

.bottom-nav {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  display:flex;
  justify-content:space-around;
  background:#fff;
  border-top:1px solid #ddd;
  padding:8px 0;
}

.bottom-nav a {
  text-align:center;
  font-size:12px;
  color:#444;
  text-decoration:none;
}

.bottom-nav span {
  display:block;
  font-size:11px;
}

body.dark .bottom-nav {
  background:#020617;
  border-color:#1e293b;
}

body.dark .bottom-nav a {
  color:#e5e7eb;
}

/* Prevent nav overlap */
.container {
  padding-bottom:80px;
}


.badge {
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}

.badge.intransit {
  background:#fef3c7;
  color:#92400e;
}

.badge.arrived {
  background:#dbeafe;
  color:#1e40af;
}

.badge.ready {
  background:#dcfce7;
  color:#166534;
}
.success-message {
  background:#dcfce7;
  color:#166534;
  padding:12px;
  border-radius:10px;
  margin-bottom:16px;
  text-align:center;
}
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar button,
.btn-reset {
  padding: 8px 10px;
  border-radius: 8px;
}

.btn-reset {
  text-decoration: none;
  background: #e5e7eb;
}
.muted {
  text-align:center;
  font-size:14px;
  margin-top:10px;
}

.muted a {
  color:#6b7280;
}
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg, #fff);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 16px;
}

.auth-card input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.auth-card button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
}
body.dark .auth-card {
  background: #1f2937;
  color: #f9fafb;
}

body.dark .auth-card input {
  background: #111827;
  color: #fff;
  border-color: #374151;
}

html, body {
  height: 100%;
  margin: 0;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  max-width:720px;
}

.form-buttons{
  display:flex;
  gap:10px;
  margin-top:15px;
}

.btn-cancel{
  background:var(--primary);
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  color:white;
  font-size:16px;
  font-weight:600;
  margin-bottom:16px
}
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;   /* stack link above card */
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 16px;                /* spacing between TrackBox and form */
}

.auth-home-link {
  display: inline-block;
  font-size: clamp(24px, 4vw, 32px); /* responsive text size */
  font-weight: 700;
  text-decoration: none;
  color: var(--primary);
  text-align: center;
}

.auth-home-link:hover {
  opacity: 0.9;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg, #fff);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

@media (max-width: 480px) {
  .auth-wrapper {
    padding: 20px 12px;
    gap: 12px;
  }

  .auth-card {
    max-width: 100%;
    padding: 20px;
  }
}
