:root {
  --primary-color: #0F2B52;
  --secondary-color: #334155;
  --accent-color: #F05A28;
  --success-color: #16a34a;
  --danger-color: #dc2626;
  --dark-bg: #0F2B52;
  --light-bg: #F1F5F9;
  --card-bg: #F5F2ED;
  --card-alt: #E2D9C9;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --border-radius: 12px;
  --shadow: 0 10px 30px rgba(15, 43, 82, 0.1);
  --shadow-lg: 0 20px 60px rgba(15, 43, 82, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--light-bg);
}

/* Navigation */
nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,122.7C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  bottom: 0;
  background-size: cover;
}

.hero .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease;
}

.search-container {
  max-width: 600px;
  margin: 2rem auto;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.search-form {
  display: flex;
  gap: 1rem;
  background: var(--white);
  padding: 0.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.search-form input {
  flex: 1;
  padding: 1rem;
  border: none;
  font-size: 1rem;
  outline: none;
  border-radius: 8px;
}

.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: #1a4078;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-accent {
  background: var(--accent-color);
  color: var(--white);
}

.btn-accent:hover {
  background: #d64d1f;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(240, 90, 40, 0.3);
}

/* Features Section */
.features {
  padding: 5rem 2rem;
  background: var(--white);
}

.features .container {
  max-width: 1200px;
  margin: 0 auto;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.feature-card p {
  color: var(--text-light);
}

/* Footer */
footer {
  background: var(--dark-bg);
  color: var(--white);
  padding: 3rem 2rem 1rem;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* Tracking Page */
.tracking-section {
  padding: 3rem 2rem;
  min-height: 70vh;
}

.tracking-section .container {
  max-width: 800px;
  margin: 0 auto;
}

.tracking-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.tracking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--light-bg);
}

.tracking-code {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.status-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--accent-color);
  color: var(--white);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--light-bg);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--light-bg);
}

.timeline-item.active::before {
  background: var(--accent-color);
  box-shadow:
    0 0 0 3px var(--light-bg),
    0 0 0 6px rgba(240, 90, 40, 0.3);
  animation: pulse 2s infinite;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.timeline-status {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.timeline-location {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Payment Page */
.payment-section {
  padding: 3rem 2rem;
  min-height: 70vh;
}

.payment-section .container {
  max-width: 600px;
  margin: 0 auto;
}

.payment-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--light-bg);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.payment-methods {
  display: grid;
  gap: 1rem;
}

.payment-method {
  padding: 1rem;
  border: 2px solid var(--light-bg);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.payment-method:hover {
  border-color: var(--primary-color);
  background: var(--light-bg);
}

.payment-method input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
}

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.alert-info {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  color: #1976d2;
}

.alert-success {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  color: #2e7d32;
}

.alert-warning {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  color: #e65100;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .search-form {
    flex-direction: column;
  }

  .features h2 {
    font-size: 2rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .tracking-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Admin Styles */
.admin-nav {
  background: var(--dark-bg);
  color: var(--white);
}

.admin-nav .nav-links a {
  color: rgba(255, 255, 255, 0.8);
}

.admin-nav .nav-links a:hover {
  color: var(--white);
}

.admin-nav .menu-toggle span {
  background: var(--white);
}


.admin-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--text-dark);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent-color);
}

.stat-card h3 {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.table-container {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--light-bg);
}

th,
td {
  padding: 1rem;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--light-bg);
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: var(--light-bg);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-success {
  background: var(--accent-color);
  color: var(--white);
}

.btn-danger {
  background: #e74c3c;
  color: var(--white);
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--secondary-color) 100%
  );
}

.login-card {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-dark);
}

/* Admin Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Admin Navigation Mobile */
  .admin-nav .menu-toggle {
    display: flex;
  }

  .admin-nav .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-bg);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
  }

  .admin-nav .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Admin Container */
  .admin-container {
    padding: 0 1rem;
    margin: 1rem auto;
  }

  .page-header {
    margin-bottom: 1.5rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  /* Stats Grid - Stack to Single Column */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card .stat-value {
    font-size: 1.75rem;
  }

  /* Tables - Horizontal Scroll */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
  }

  th,
  td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  /* Table Form Inputs (for manage-payment-methods) */
  td .form-control {
    min-width: 150px;
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  td input[type="text"],
  td input[type="email"],
  td textarea {
    min-width: 200px;
  }

  /* Buttons - Mobile Friendly */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Action Button Groups - Wrap Properly */
  td > div,
  td > form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Forms - Stack Vertically */
  .search-form,
  .form-group {
    margin-bottom: 1rem;
  }

  /* Grid Layouts - Stack on Mobile */
  div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }

  /* Payment Card/Tracking Card */
  .payment-card,
  .tracking-card {
    padding: 1.5rem;
  }

  /* Image Grid (view-payment-proof.php) - Single Column */
  div[style*="repeat(auto-fill"] {
    grid-template-columns: 1fr !important;
  }

  /* Alert Messages */
  .alert {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Login Card Mobile */
  .login-card {
    padding: 2rem;
    margin: 1rem;
  }

  /* Ensure Touch-Friendly Buttons */
  button,
  .btn,
  a.btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Payment Methods - Stack Properly */
  .payment-method {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Timeline Adjustments */
  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item {
    padding-left: 1.5rem;
  }
}

/* Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .admin-container {
    padding: 0 0.5rem;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  table {
    font-size: 0.8rem;
  }

  th,
  td {
    padding: 0.5rem 0.25rem;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}
