* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  padding: 25px;
  text-align: center;
}

.header h1 {
  font-size: 28px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.header p {
  font-size: 16px;
  opacity: 0.9;
}

.logo {
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 5px 15px;
  border-radius: 50px;
  display: inline-block;
  margin-top: 10px;
  font-size: 18px;
}

.form-container {
  padding: 30px;
}

.form-group {
  margin-bottom: 25px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 15px;
}

.required::after {
  content: " *";
  color: #e74c3c;
}

select,
input[type="date"],
input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  padding: 14px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s;
  background-color: #f8f9fa;
}

select:focus,
input:focus {
  border-color: #25D366;
  outline: none;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.job-section {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  border-left: 4px solid #25D366;
}

.job-section h3 {
  color: #128C7E;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.checkbox-option {
  flex: 1;
  min-width: 120px;
}

.checkbox-option input {
  display: none;
}

.checkbox-option label {
  display: block;
  padding: 12px;
  background-color: white;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: normal;
}

.checkbox-option input:checked + label {
  background-color: #25D366;
  color: white;
  border-color: #25D366;
  font-weight: 600;
}

.checkbox-option input:checked + label::after {
  content: " ✓";
  font-weight: bold;
}

.buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

button {
  flex: 1;
  padding: 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn {
  background-color: #25D366;
  color: white;
}

.submit-btn:hover {
  background-color: #128C7E;
}

.reset-btn {
  background-color: #f8f9fa;
  color: #6c757d;
  border: 2px solid #e1e8ed;
}

.journey-note {
  font-size: 13px;
  color: #6c757d;
  font-weight: normal;
  font-style: italic;
}

.footer {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  font-size: 14px;
  border-top: 1px solid #e1e8ed;
}

.footer a {
  color: #128C7E;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert-error {
  background: #fdecea;
  color: #c0392b;
  border-left: 4px solid #e74c3c;
}

.alert-success {
  background: #f0f9f0;
  color: #128C7E;
  border-left: 4px solid #25D366;
}

.job-details {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f0f9f6;
  border: 1px solid #cdeae0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.job-details[hidden] {
  display: none;
}

.job-detail-row {
  display: flex;
  gap: 10px;
  font-size: 14px;
  align-items: baseline;
}

.job-detail-label {
  flex: 0 0 70px;
  font-weight: 700;
  color: #128C7E;
}

.job-detail-value {
  color: #333;
  word-break: break-word;
}

.portal-title {
  color: #128C7E;
  margin-bottom: 6px;
}

.hint {
  color: #6c757d;
  font-size: 14px;
  margin-bottom: 18px;
}

/* Logged-in bar */
.driver-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #f0f9f6;
  border: 1px solid #cdeae0;
  border-radius: 8px;
  margin-bottom: 18px;
}

.driver-welcome {
  font-size: 15px;
  color: #2c3e50;
}

.driver-welcome strong {
  color: #128C7E;
}

.btn-link {
  flex: 0 0 auto;
  width: auto;
  background: transparent;
  color: #128C7E;
  padding: 8px 10px;
  font-weight: 600;
  border-radius: 8px;
}

.btn-link:hover {
  background: rgba(18, 140, 126, 0.1);
}

/* Tabs */
.portal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e1e8ed;
}

.portal-tab {
  flex: 1;
  background: transparent;
  color: #6c757d;
  border-radius: 8px 8px 0 0;
  padding: 12px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.portal-tab.active {
  color: #128C7E;
  border-bottom-color: #25D366;
  background: #f0f9f6;
}

.portal-panel {
  display: none;
}

.portal-panel.active {
  display: block;
}

/* Earnings */
.earnings-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 12px;
  margin: 0;
  color: #6c757d;
}

.filter-group input {
  width: auto;
  padding: 10px 12px;
}

.btn-ghost {
  flex: 0 0 auto;
  width: auto;
  background: #f8f9fa;
  color: #6c757d;
  border: 2px solid #e1e8ed;
  padding: 10px 14px;
}

.btn-sm {
  font-size: 14px;
  padding: 10px 14px;
}

.earnings-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.summary-stat {
  flex: 1;
  min-width: 110px;
  background: #f0f9f6;
  border: 1px solid #cdeae0;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.summary-num {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #128C7E;
}

.summary-label {
  display: block;
  font-size: 13px;
  color: #6c757d;
  margin-top: 4px;
}

.earn-card {
  background: #f8f9fa;
  border: 1px solid #e1e8ed;
  border-left: 4px solid #25D366;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.earn-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.earn-date {
  font-weight: 600;
  color: #2c3e50;
}

.earn-total {
  color: #128C7E;
}

.earn-job {
  font-size: 14px;
  padding: 4px 0;
  border-top: 1px dashed #e1e8ed;
}

.earn-job .job-meta {
  display: inline-block;
  background: #e8f5ee;
  color: #128C7E;
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 4px;
}

@media (max-width: 768px) {
  .buttons {
    flex-direction: column;
  }

  .checkbox-group {
    flex-direction: column;
  }

  .checkbox-option {
    min-width: 100%;
  }

  .job-detail-label {
    flex-basis: 60px;
  }
}
