/* Custom styles for Driver Log PWA */
:root {
  --primary-color: #0d6efd;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --dark-color: #212529;
}

/* PWA specific styles */
.pwa-install-prompt {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.pwa-install-prompt.show {
  display: block;
}

/* Form styling */
.trip-form, .expense-form {
  max-width: 600px;
  margin: 0 auto;
}

.trip-form .form-group,
.expense-form .form-group {
  margin-bottom: 1rem;
}

/* Dashboard cards */
.dashboard-card {
  background: var(--bs-dark);
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: transform 0.2s;
}

.dashboard-card:hover {
  transform: translateY(-2px);
}

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Navigation improvements */
.navbar-brand {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 1rem !important;
  border-radius: 6px;
  margin: 0 0.25rem;
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: var(--bs-primary);
  color: white !important;
}

.nav-link.active {
  background-color: var(--bs-primary);
  color: white !important;
}

/* Table styling */
.table-responsive {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table th {
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-weight: 500;
  padding: 1rem 0.75rem;
}

.table td {
  padding: 0.75rem;
  vertical-align: middle;
  border-color: var(--bs-border-color);
}

.table tbody tr:hover {
  background-color: var(--bs-secondary-bg);
}

/* Button enhancements */
.btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Form enhancements */
.form-control, .form-select {
  border-radius: 6px;
  border: 1px solid var(--bs-border-color);
  padding: 0.75rem;
  font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .stat-card {
    padding: 1.5rem 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .table-responsive {
    font-size: 0.9rem;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .navbar-nav {
    background-color: var(--bs-dark);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
  }
}

/* Landing page hero */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

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

/* Feature cards */
.feature-card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  height: 100%;
  transition: transform 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Subscription styling */
.subscription-box {
  background: linear-gradient(135deg, var(--warning-color), #e0a800);
  color: var(--dark-color);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  margin: 2rem 0;
}

.subscription-box h3 {
  margin-bottom: 1rem;
  font-weight: bold;
}

.subscription-box .btn {
  background: var(--dark-color);
  color: white;
  border: none;
  font-weight: bold;
  padding: 1rem 2rem;
}

/* Reports page */
.report-summary {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

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

.report-metric h4 {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.report-metric p {
  margin: 0;
  color: var(--bs-secondary-color);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--bs-border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--bs-secondary-color);
}

.empty-state h4 {
  margin-bottom: 1rem;
  color: var(--bs-body-color);
}

.empty-state p {
  margin-bottom: 2rem;
}

/* PWA status indicator */
.pwa-status {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  display: none;
  z-index: 1000;
}

.pwa-status.show {
  display: block;
}
