/* Swift Courier – Modern courier service styles */
:root {
  --primary: #0f766e;
  --primary-dark: #0d5f59;
  --primary-light: #14b8a6;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #059669;
  --warning: #d97706;
  --error: #dc2626;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--primary);
}

.logo-icon {
  font-size: 1.4rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 50%, #14b8a6 100%);
  color: white;
  padding: 4rem 0 5rem;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero .accent {
  color: #fde68a;
}

.hero-sub {
  font-size: 1.15rem;
  opacity: 0.95;
  max-width: 520px;
  margin: 0 auto 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero .btn-outline {
  border-color: white;
  color: white;
}

.hero .btn-outline:hover {
  background: white;
  color: var(--primary);
}

.quick-track {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem;
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

.quick-track input {
  flex: 1;
  border: none;
  background: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.quick-track input:focus {
  outline: 2px solid #fde68a;
}

/* Features */
.features {
  padding: 3.5rem 1.25rem;
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 2rem;
  color: var(--text);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* How it works */
.how-it-works {
  background: var(--surface);
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.step {
  text-align: center;
  padding: 1rem;
}

.step-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 auto 1rem;
}

.step h3 {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Demo section */
.demo {
  padding: 3rem 1.25rem;
}

.demo-hint {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.demo-cards {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 220px;
}

.demo-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.demo-card strong {
  display: block;
  margin: 0.5rem 0 0.25rem;
  font-size: 1.05rem;
}

.demo-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge.pending,
.badge.order-placed,
.badge.picked-up {
  background: #fef3c7;
  color: #92400e;
}

.badge.in-transit,
.badge.out-for-delivery {
  background: #ccfbf1;
  color: #0f766e;
}

.badge.delivered {
  background: #d1fae5;
  color: #065f46;
}

.badge.failed,
.badge.returned {
  background: #fee2e2;
  color: #991b1b;
}

/* Footer */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer strong {
  color: white;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  width: 100%;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* Page layouts */
.page {
  padding: 2.5rem 0 4rem;
  flex: 1;
}

.page-title {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.page-sub {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

/* Forms */
.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-group .required {
  color: var(--error);
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.input-lg {
  padding: 0.85rem 1rem;
  font-size: 1rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.form-row input {
  flex: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Alerts */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-info {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.hidden {
  display: none !important;
}

/* Track result */
.package-summary {
  margin-bottom: 1.5rem;
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tracking-id {
  font-size: 1.25rem;
  font-weight: 700;
  margin-right: 0.75rem;
}

.est-delivery {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.detail-item label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.detail-item span {
  font-weight: 500;
}

/* Timeline */
.timeline-section {
  margin-top: 1.5rem;
}

.timeline-section h2 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.timeline {
  position: relative;
  padding-left: 1.75rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--border);
}

.timeline-item.current .timeline-dot {
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-status {
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.timeline-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Admin table */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f8fafc;
}

tr:hover td {
  background: #f8fafc;
}

/* Status update form in admin */
.status-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.status-form select,
.status-form input {
  width: auto;
  min-width: 120px;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

/* Success result after shipping */
.result-box {
  text-align: center;
  padding: 2rem;
}

.result-box .tracking-big {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin: 1rem 0;
  word-break: break-all;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 3rem 0 3.5rem;
  }

  .quick-track {
    flex-direction: column;
  }
}
