/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo h1 {
  color: #ff6b35;
  font-size: 1.8rem;
  font-weight: bold;
}

.logo i {
  margin-right: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #ff6b35;
}

.btn-signin {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-signin:hover {
  background: #e55a30;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white;
  text-align: center;
  padding: 120px 0 80px;
  margin-top: 70px;
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  display: flex;
  background: white;
  border-radius: 50px;
  padding: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  align-items: center;
}

.search-input i {
  color: #ff6b35;
  margin: 0 1rem;
  font-size: 1.2rem;
}

.search-input input {
  flex: 1;
  border: none;
  outline: none;
  padding: 1rem 0;
  font-size: 1rem;
  color: #333;
}

.btn-search {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-search:hover {
  background: #e55a30;
}

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

.btn-ship-hero,
.btn-rates-hero {
  background: white;
  color: #ff6b35;
  border: 2px solid #ff6b35;
  padding: 1rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-ship-hero:hover,
.btn-rates-hero:hover {
  background: #ff6b35;
  color: white;
  transform: translateY(-2px);
}

.btn-ship-nav {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
}

.btn-ship-nav:hover {
  background: #218838;
}

/* Quick Actions Section */
.quick-actions {
  padding: 60px 0;
  background: #f8f9fa;
}

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

.action-card {
  background: white;
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.action-card i {
  font-size: 3rem;
  color: #ff6b35;
  margin-bottom: 1.5rem;
}

.action-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.action-card p {
  color: #666;
  font-size: 0.9rem;
}

/* Services Section */
.services {
  padding: 80px 0;
}

.services h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

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

.service-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-info {
  padding: 2rem;
}

.service-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.service-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-features li {
  padding: 0.5rem 0;
  color: #666;
}

.service-features i {
  color: #28a745;
  margin-right: 0.5rem;
}

.service-price {
  font-size: 1.3rem;
  font-weight: bold;
  color: #ff6b35;
}

/* Tracking Section */
.tracking-section {
  padding: 80px 0;
  background: #f8f9fa;
}

.tracking-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

.tracking-container {
  max-width: 800px;
  margin: 0 auto;
}

.tracking-input-section {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tracking-input-section input {
  flex: 1;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
}

.btn-track {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-track:hover {
  background: #e55a30;
}

.tracking-results {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tracking-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.status-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.status-delivered {
  background: #28a745;
}

.status-in-transit {
  background: #ffc107;
}

.status-processing {
  background: #17a2b8;
}

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

.timeline-item {
  position: relative;
  padding: 1rem 0;
  border-left: 2px solid #ddd;
  padding-left: 2rem;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -6px;
  top: 1.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}

.timeline-item.active:before {
  background: #ff6b35;
}

.timeline-item.completed:before {
  background: #28a745;
}

/* Features Section */
.features {
  padding: 80px 0;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #333;
}

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

.feature-item {
  text-align: center;
  padding: 2rem;
}

.feature-item i {
  font-size: 3rem;
  color: #ff6b35;
  margin-bottom: 1.5rem;
}

.feature-item h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #333;
}

.feature-item p {
  color: #666;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: #333;
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: #ff6b35;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section ul li a:hover {
  color: #ff6b35;
}

.footer-section p {
  color: #ccc;
  margin-bottom: 0.5rem;
}

.footer-section i {
  color: #ff6b35;
  margin-right: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #555;
  margin-top: 2rem;
  padding-top: 2rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #999;
  font-size: 0.9rem;
}

.btn-admin-subtle {
  background: transparent;
  border: 1px solid #555;
  color: #999;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  opacity: 0.7;
}

.btn-admin-subtle:hover {
  background: #555;
  color: #ccc;
  opacity: 1;
  border-color: #777;
}

@media (max-width: 768px) {
  .footer-bottom-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Ship Sidebar */
.ship-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s;
}

.ship-sidebar.open {
  right: 0;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-sidebar {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.sidebar-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.ship-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #ff6b35;
}

.btn-ship {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-ship:hover {
  background: #e55a30;
}

/* Rate Display Styles */
.rate-display {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.rate-breakdown h4,
.service-selected h4 {
  margin-bottom: 0.75rem;
  color: #ff6b35;
}

.rate-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.rate-total {
  border-top: 1px solid #ddd;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  font-size: 1.1rem;
}

.btn-book {
  width: 100%;
  background: #28a745;
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.3s;
}

.btn-book:hover {
  background: #218838;
}

/* Location Modal Styles */
.location-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.location-modal.show {
  opacity: 1;
  visibility: visible;
}

.location-item {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.location-item h4 {
  margin-bottom: 0.5rem;
  color: #333;
}

.location-item p {
  margin-bottom: 0.25rem;
  color: #666;
}

.location-item i {
  color: #ff6b35;
  margin-right: 0.5rem;
}

.btn-directions {
  background: #17a2b8;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-directions:hover {
  background: #138496;
}

/* Modal Overlay Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.signin-modal {
  max-width: 400px;
  width: 90%;
}

.signin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-signin-submit {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-signin-submit:hover {
  background: #e55a30;
}

.signin-options {
  text-align: center;
  margin-top: 1rem;
}

.signin-options a {
  color: #ff6b35;
  text-decoration: none;
  font-weight: 600;
}

.signin-options a:hover {
  text-decoration: underline;
}

/* User Sidebar */
.user-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s;
}

.user-sidebar.open {
  right: 0;
}

.user-info {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.user-shipments h4 {
  margin-bottom: 1rem;
  color: #333;
}

.shipment-item {
  padding: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.shipment-item:hover {
  background: #f8f9fa;
}

.shipment-status {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.shipment-details {
  font-size: 0.9rem;
  color: #666;
}

.status-delivered {
  color: #28a745;
}

.status-in-transit {
  color: #ffc107;
}

.status-processing {
  color: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a {
    display: none;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
  
  .search-input {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .btn-search {
    width: 100%;
  }
  
  .ship-sidebar {
    width: 100vw;
    right: -100vw;
  }
  
  .tracking-input-section {
    flex-direction: column;
  }
  
  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn-ship-hero,
  .btn-rates-hero {
    width: 100%;
    justify-content: center;
  }
  
  .btn-ship-nav {
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .user-sidebar {
    width: 100vw;
    right: -100vw;
  }
  
  .signin-modal {
    width: 95%;
    margin: 0 1rem;
  }
}

/* Admin Styles */
.btn-admin {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.btn-admin:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(106, 17, 203, 0.3);
}

.btn-admin i {
  font-size: 1rem;
}

/* Admin Login Modal */
.admin-modal-content {
  max-width: 400px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
}

.admin-modal-content .modal-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-modal-content .modal-header h3 {
  color: white;
}

.admin-login-form {
  padding: 0;
}

.admin-login-form .form-group label {
  color: white;
  font-weight: 500;
}

.admin-login-form .form-group input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 8px;
  padding: 12px;
}

.admin-login-form .form-group input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.admin-login-form .form-group input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-admin-login {
  background: linear-gradient(135deg, #ff6b35 0%, #f093fb 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 1rem;
}

.btn-admin-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

/* Admin Dashboard */
.admin-dashboard {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8f9fa;
  z-index: 3000;
  overflow: hidden;
}

.admin-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.admin-nav h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-user-info span {
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
}

.btn-admin-logout {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-admin-logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 65, 108, 0.4);
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.admin-tab {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 1rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
}

.admin-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.admin-tab.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-bottom-color: #ff6b35;
}

/* Admin Content */
.admin-content {
  height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 2rem;
}

.admin-tab-content {
  max-width: 1400px;
  margin: 0 auto;
}

/* Statistics Cards */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.stat-card:nth-child(1) .stat-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card:nth-child(2) .stat-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) .stat-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) .stat-icon {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-info h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #333;
}

.stat-info p {
  margin: 0;
  color: #666;
  font-weight: 500;
}

/* Activity Feed */
.admin-charts {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.chart-container h4 {
  margin: 0 0 1.5rem 0;
  color: #333;
  font-weight: 600;
  font-size: 1.2rem;
}

.activity-feed {
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.activity-icon.user {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.activity-icon.shipment {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.activity-icon.system {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.activity-content p {
  margin: 0 0 0.25rem 0;
  color: #333;
  font-weight: 500;
}

.activity-content small {
  color: #666;
  font-size: 0.85rem;
}

/* Tab Headers */
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.tab-header h3 {
  margin: 0;
  color: #333;
  font-weight: 600;
  font-size: 1.5rem;
}

.tab-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-input {
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  background: white;
  transition: all 0.3s ease;
  min-width: 200px;
}

.search-input:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-select:focus {
  border-color: #667eea;
  outline: none;
}

.btn-export {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-export:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
}

/* Admin Tables */
.admin-table-container {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}

.admin-table tbody tr:hover {
  background: #f8f9fa;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table code {
  background: #e3f2fd;
  color: #1565c0;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: #d4edda;
  color: #155724;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.delivered {
  background: #d1ecf1;
  color: #0c5460;
}

.status-badge.cancelled {
  background: #f8d7da;
  color: #721c24;
}

/* Action Buttons */
.btn-action {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
}

.btn-action:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.btn-action.danger:hover {
  background: #f5c6cb;
  border-color: #f1b0b7;
  color: #721c24;
}

/* Settings */
.settings-section {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.settings-section h3 {
  margin: 0 0 1.5rem 0;
  color: #333;
  font-weight: 600;
  font-size: 1.3rem;
}

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

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 2px solid #f0f0f0;
  border-radius: 10px;
  transition: border-color 0.3s ease;
}

.setting-item:hover {
  border-color: #667eea;
}

.setting-item label {
  font-weight: 500;
  color: #333;
}

.setting-input,
.setting-select {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  min-width: 120px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Service Rates */
.service-rates {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rate-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 2px solid #f0f0f0;
  border-radius: 10px;
  transition: border-color 0.3s ease;
}

.rate-item:hover {
  border-color: #667eea;
}

.rate-item span {
  font-weight: 500;
  color: #333;
}

.rate-input {
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  width: 100px;
  text-align: right;
}

.setting-actions {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e1e5e9;
}

.setting-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.setting-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-input textarea {
  resize: vertical;
  min-height: 80px;
}

/* Responsive Admin */
@media (max-width: 768px) {
  .admin-nav {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .admin-nav h2 {
    font-size: 1.2rem;
  }
  
  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  
  .admin-tab {
    padding: 0.75rem 1rem;
    white-space: nowrap;
  }
  
  .admin-content {
    padding: 1rem;
  }
  
  .admin-stats {
    grid-template-columns: 1fr;
  }
  
  .tab-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .tab-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .search-input {
    min-width: auto;
  }
  
  .admin-table-container {
    overflow-x: auto;
  }
  
  .admin-table {
    min-width: 800px;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .setting-item {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .btn-admin {
    display: none;
  }
}

/* In-Transit Control Styles */
.transit-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.transit-control-header h3 {
  color: #2c3e50;
  font-size: 1.5em;
  margin: 0;
}

.transit-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

.control-filters {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bulk-actions {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.bulk-actions button {
  padding: 8px 12px;
  font-size: 0.9em;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.transit-dashboard {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.transit-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.transit-stat-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-left: 4px solid #3498db;
  display: flex;
  align-items: center;
  gap: 15px;
}

.transit-stat-card .stat-icon {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
}

.transit-stat-card .stat-info h3 {
  margin: 0;
  font-size: 1.8em;
  color: #2c3e50;
  font-weight: bold;
}

.transit-stat-card .stat-info p {
  margin: 5px 0 0 0;
  color: #7f8c8d;
  font-size: 0.9em;
}

.transit-main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.transit-table-section {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.section-header h4 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.2em;
}

.table-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.transit-table-container {
  overflow-x: auto;
}

.transit-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.transit-table th,
.transit-table td {
  padding: 15px 12px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.transit-table th {
  background: #f8f9fa;
  color: #2c3e50;
  font-weight: 600;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.transit-table tbody tr:hover {
  background: #f8f9fa;
}

.transit-table .tracking-number {
  font-family: 'Courier New', monospace;
  background: #e9ecef;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  cursor: pointer;
}

.transit-table .tracking-number:hover {
  background: #3498db;
  color: white;
}

.priority-badge {
  padding: 4px 8px;
  border-radius: 15px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-standard {
  background: #e9ecef;
  color: #495057;
}

.priority-high {
  background: #fff3cd;
  color: #856404;
}

.priority-urgent {
  background: #f8d7da;
  color: #721c24;
}

.driver-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.driver-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #3498db;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8em;
}

.eta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.eta-time {
  font-weight: 600;
  color: #2c3e50;
}

.eta-delay {
  font-size: 0.8em;
  color: #e74c3c;
}

.transit-action-btn {
  padding: 6px 12px;
  margin: 0 2px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  transition: all 0.3s ease;
}

.transit-action-btn.update {
  background: #3498db;
  color: white;
}

.transit-action-btn.deliver {
  background: #27ae60;
  color: white;
}

.transit-action-btn.assign {
  background: #f39c12;
  color: white;
}

.transit-action-btn:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

.transit-map-section {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  min-height: 400px;
}

.map-container {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 10px;
}

.map-placeholder {
  text-align: center;
  color: #7f8c8d;
}

.map-placeholder i {
  font-size: 3em;
  margin-bottom: 15px;
  color: #bdc3c7;
}

.map-placeholder h4 {
  margin: 10px 0;
  color: #2c3e50;
}

/* Quick Action and Driver Assignment Modals */
.quick-action-modal,
.driver-assignment-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.driver-selection {
  margin-bottom: 20px;
}

.driver-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.driver-card {
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.driver-card:hover {
  border-color: #3498db;
  background: #f8f9fa;
}

.driver-card.selected {
  border-color: #3498db;
  background: #e3f2fd;
}

.driver-card .driver-name {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 5px;
}

.driver-card .driver-status {
  font-size: 0.9em;
  color: #7f8c8d;
}

.assignment-details {
  border-top: 1px solid #e9ecef;
  padding-top: 20px;
}

/* User Edit Modal Styles */
.user-edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2001;
}

.user-edit-modal .modal-content {
  background: white;
  border-radius: 15px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.user-edit-modal .modal-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 20px 30px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-edit-modal .modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.user-edit-modal .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.user-edit-modal .close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-edit-form {
  padding: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e1e5e9;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.btn-secondary:hover {
  background: #5a6268;
}

/* Form row responsiveness for user edit modal */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .user-edit-modal .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .user-edit-form {
    padding: 20px;
  }
  
  .modal-actions {
    flex-direction: column-reverse;
  }
}


/* Delivery Status Modal Styles */
.delivery-status-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2002;
}

.delivery-status-modal .modal-content {
  background: white;
  border-radius: 15px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.delivery-status-form {
  padding: 20px;
}

.transit-action-btn.manage {
  background: linear-gradient(135deg, #6c757d, #495057);
  color: white;
}

.transit-action-btn.manage:hover {
  background: linear-gradient(135deg, #495057, #343a40);
  transform: translateY(-2px);
}

/* Enhanced timeline manager styles */
.timeline-manager {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.timeline-manager h4 {
  margin: 0 0 1.5rem 0;
  color: #333;
  font-size: 1.2rem;
}

.timeline-entry-editor {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #ff6b35;
}

.timeline-entry-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.timeline-entry-row:last-child {
  margin-bottom: 0;
}

.status-input,
.location-input,
.date-input {
  flex: 1;
  padding: 0.6rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  color: #333;
  font-size: 0.9rem;
}

.timeline-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
}

.btn-remove {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background-color 0.3s;
}

.btn-remove:hover {
  background: #c82333;
}

.timeline-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.btn-add-timeline,
.btn-reset-timeline {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.btn-reset-timeline {
  background: #6c757d;
}

.btn-add-timeline:hover {
  background: #218838;
}

.btn-reset-timeline:hover {
  background: #5a6268;
}

.shipment-overview {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid #e9ecef;
}

.shipment-overview h4 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.2rem;
}

/* Quick action buttons for admin table */
.quick-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.quick-action-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background-color 0.2s;
}

.quick-action-btn.delivered {
  background: #28a745;
}

.quick-action-btn.in-transit {
  background: #fd7e14;
}

.quick-action-btn.out-for-delivery {
  background: #6f42c1;
}

.quick-action-btn:hover {
  opacity: 0.8;
}

.tracking-link {
  cursor: pointer;
  color: #667eea;
  text-decoration: underline;
  transition: color 0.3s;
}

.tracking-link:hover {
  color: #5a6fd8;
}