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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Login Screen */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-title {
  text-align: center;
  margin-bottom: 30px;
}

.login-company-name {
  color: white;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.login-container h1 {
  color: white;
  font-size: 2rem;
  font-weight: 500;
}

#loginForm {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 400px;
}

#loginForm input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

#loginForm input:focus {
  outline: none;
  border-color: #667eea;
}

#loginForm button {
  width: 100%;
  padding: 12px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

#loginForm button:hover {
  background: #5568d3;
}

.error {
  color: #e74c3c;
  margin-top: 10px;
  font-size: 14px;
}

/* Dashboard Screen */
.header {
  background: white;
  padding: 20px 40px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.company-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header h1 {
  color: #667eea;
  font-size: 1.5rem;
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  position: relative;
  gap: 15px;
}

#welcomeText {
  color: #555;
  font-weight: 500;
}

/* Settings Menu Dropdown */
.settings-menu {
  position: relative;
}

.settings-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.settings-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.3s;
}

.settings-button:hover .dropdown-arrow {
  transform: translateY(2px);
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
  animation: dropdownSlide 0.2s ease-out;
  padding: 8px 0;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-section {
  padding: 8px 0;
}

.dropdown-label {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.5px;
}

.dropdown-item {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: #667eea;
  padding-left: 20px;
}

.dropdown-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 4px 0;
}

.logout-item {
  color: #e74c3c;
}

.logout-item:hover {
  background: #fee;
  color: #c0392b;
}

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

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: #555;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s;
}

.tab:hover {
  background: #f0f0f0;
}

.tab.active {
  background: #667eea;
  color: white;
}

/* Tab Content */
.tab-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Buttons */
.btn-primary {
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-secondary {
  padding: 10px 20px;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.btn-danger {
  padding: 8px 16px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-edit {
  padding: 8px 16px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
  margin-right: 5px;
}

.btn-edit:hover {
  background: #2980b9;
}

/* Dashboard Stats */
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.month-selector {
  display: flex;
  gap: 10px;
  align-items: center;
}

.month-selector select {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

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

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 25px;
  border-radius: 10px;
  color: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.stat-card h3 {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.product-breakdown {
  margin-top: 30px;
}

.product-breakdown h3 {
  margin-bottom: 15px;
  color: #333;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-header h2 {
  color: #333;
}

/* Forms */
.form-container {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.form-container h3 {
  margin-bottom: 20px;
  color: #333;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #555;
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
}

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

.form-group input[readonly] {
  background: #e9ecef;
  cursor: not-allowed;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

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

thead {
  background: #f8f9fa;
}

th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #ddd;
}

td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  color: #555;
}

tbody tr:hover {
  background: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-header {
    flex-direction: column;
    gap: 15px;
  }
}

/* Pricing Configuration Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-subtitle {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Pricing Management */
.pricing-filters {
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}

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

.pricing-filters select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.pricing-table-container {
  margin-bottom: 20px;
  overflow-x: auto;
}

.pricing-actions {
  display: flex;
  justify-content: flex-end;
}

.pricing-input,
.pricing-edit-input {
  width: 120px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.availability-checkbox,
.availability-edit-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

#pricingConfigTable {
  width: 100%;
  margin-top: 15px;
  border-collapse: collapse;
}

#pricingConfigTable th {
  text-align: left;
  padding: 10px;
  background: #f5f5f5;
  border-bottom: 2px solid #ddd;
}

#pricingConfigTable td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

#pricingManagementTable {
  width: 100%;
  border-collapse: collapse;
}

#pricingManagementTable th {
  text-align: left;
  padding: 12px;
  background: #f5f5f5;
  border-bottom: 2px solid #ddd;
}

#pricingManagementTable td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

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

/* Expense Management Styles */
.expense-stats {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.expense-filters select {
  padding: 8px 12px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background: white;
}

.expense-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.breakdown-section {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.breakdown-section h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2rem;
}

.stat-card h4 {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Settings Tab Styles */
.settings-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

.settings-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.settings-tab:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px 8px 0 0;
}

.settings-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
  font-weight: 600;
}

.settings-subtab-content {
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Analytics Styles */
.stat-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 8px;
  font-weight: 400;
}

.dashboard-analytics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.analytics-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.analytics-card.full-width {
  grid-column: 1 / -1;
}

.analytics-card h3 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.1rem;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* Revenue vs Expenses Chart */
.comparison-chart {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chart-bar-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-label {
  font-weight: 600;
  color: #555;
  font-size: 14px;
}

.chart-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
}

.chart-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
  position: relative;
  min-width: 2px;
}

.revenue-bar {
  background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
}

.expense-bar {
  background: linear-gradient(90deg, #eb3349 0%, #f45c43 100%);
}

.chart-value {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  font-size: 14px;
}

/* Top Items List */
.top-items-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.top-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: transform 0.2s;
}

.top-item:hover {
  transform: translateX(5px);
  background: #f0f2f5;
}

.top-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.top-item-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.top-item-value {
  font-weight: 600;
  color: #667eea;
  font-size: 14px;
}

.top-item-bar-wrapper {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.top-item-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.top-item-bar.route-bar {
  background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.top-item-details {
  font-size: 12px;
  color: #666;
}

/* Expense Breakdown Chart */
.expense-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.expense-item {
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
}

.expense-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.expense-item-name {
  font-weight: 600;
  color: #333;
  font-size: 13px;
}

.expense-item-value {
  font-weight: 600;
  color: #e74c3c;
  font-size: 13px;
}

.expense-item-bar-wrapper {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.expense-item-bar {
  height: 100%;
  background: linear-gradient(90deg, #eb3349 0%, #f45c43 100%);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.expense-item-count {
  font-size: 11px;
  color: #999;
}

/* Car Performance */
.car-performance-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.car-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.car-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.car-item-name {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.car-item-value {
  font-weight: 600;
  color: #667eea;
  font-size: 13px;
}

.car-item-stats {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.car-stat {
  font-size: 12px;
  color: #666;
  padding: 4px 8px;
  background: white;
  border-radius: 4px;
}

.car-stat.net {
  font-weight: 600;
  color: #11998e;
}

/* No Data Message */
.no-data {
  text-align: center;
  padding: 30px;
  color: #999;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-analytics {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    flex-wrap: wrap;
  }

  .analytics-card.full-width {
    grid-column: 1;
  }
}

/* ============= WEEKLY PAYMENTS SYSTEM STYLES ============= */

/* Week Selector Container */
.week-selector-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

.week-selector-container select {
  min-width: 250px;
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.status-partial {
  background: #dbeafe;
  color: #2563eb;
}

.status-collected {
  background: #d1fae5;
  color: #059669;
}

/* Week Configuration Container */
.week-config-container {
  max-width: 600px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.week-config-container .form-group {
  margin-bottom: 20px;
}

.week-preview {
  margin-top: 20px;
  padding: 15px;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid #11998e;
}

.week-preview h3 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #666;
}

.week-preview p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Form Row for Side-by-Side Fields */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

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

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 8px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h3 {
  margin: 0 0 20px 0;
  color: #333;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* Button Sizes */
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .week-selector-container {
    flex-direction: column;
    align-items: stretch;
  }

  .week-selector-container select {
    min-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    padding: 16px;
  }
}

/* Action Menu (Three Dots) */
.action-menu {
  position: relative;
  display: inline-block;
}

.action-menu-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  color: #666;
}

.action-menu-btn:hover {
  background: #f0f0f0;
}

.action-menu-dropdown {
  position: absolute;
  right: 0;
  bottom: 100%;
  margin-bottom: 5px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
  min-width: 100px;
  z-index: 1000;
}

.action-menu-dropdown a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
}

.action-menu-dropdown a:hover {
  background: #f5f5f5;
}

/* Tab Content - prevent overflow issues */
.tab-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: visible;
}

/* Table container improvements */
.table-container {
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
}

/* ============= ENHANCED MOBILE RESPONSIVE STYLES ============= */

/* Small tablets and large phones */
@media (max-width: 992px) {
  .container {
    padding: 0 15px;
    margin: 20px auto;
  }

  .tab-content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .stat-card {
    padding: 20px;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .dashboard-analytics {
    grid-template-columns: 1fr;
  }

  .expense-breakdown {
    grid-template-columns: 1fr;
  }
}

/* Mobile phones */
@media (max-width: 768px) {
  /* Header */
  .header {
    padding: 15px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .header-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .company-name {
    font-size: 1.2rem;
  }

  .header h1 {
    font-size: 1.1rem;
  }

  /* Tabs - make them scrollable horizontally */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Stats grid - single column on mobile */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-card {
    padding: 18px;
  }

  .stat-card h3,
  .stat-card h4 {
    font-size: 12px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  /* Section header - stack vertically */
  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .section-header h2 {
    font-size: 1.3rem;
    text-align: center;
  }

  .section-header .btn-primary {
    width: 100%;
  }

  /* Forms */
  .form-container {
    padding: 15px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  /* Tables - make responsive */
  .table-container {
    margin: 0 -15px;
    padding: 0 15px;
  }

  table {
    font-size: 13px;
  }

  th, td {
    padding: 10px 8px;
  }

  /* Hide less important columns on mobile */
  .hide-mobile {
    display: none !important;
  }

  /* Action menu */
  .action-menu-dropdown {
    min-width: 90px;
  }

  .action-menu-dropdown a {
    padding: 12px 15px;
    font-size: 14px;
  }

  /* Week selector */
  .week-selector-container {
    flex-direction: column;
    align-items: stretch;
  }

  .week-selector-container select {
    min-width: 100%;
  }

  /* Settings tabs - horizontal scroll */
  .settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 10px;
  }

  .settings-tabs::-webkit-scrollbar {
    display: none;
  }

  .settings-tab {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Modal - full width on mobile */
  .modal-content {
    width: 95%;
    max-width: none;
    padding: 20px;
    margin: 10px;
    max-height: 85vh;
  }

  /* Expense filters */
  .expense-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .expense-filters select {
    width: 100%;
  }

  /* Month selector */
  .month-selector {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .month-selector select {
    flex: 1;
    min-width: 100px;
  }

  /* Analytics cards */
  .analytics-card {
    padding: 15px;
  }

  .analytics-card h3 {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  /* Top items */
  .top-item {
    padding: 10px;
  }

  .top-item-name,
  .top-item-value {
    font-size: 13px;
  }

  /* Car performance */
  .car-item {
    padding: 12px;
  }

  .car-item-stats {
    gap: 8px;
  }

  .car-stat {
    font-size: 11px;
    padding: 3px 6px;
  }

  /* Login screen */
  .login-company-name {
    font-size: 2rem;
  }

  .login-container h1 {
    font-size: 1.5rem;
  }

  #loginForm {
    padding: 25px;
    margin: 0 15px;
  }

  /* Pricing filters */
  .pricing-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .pricing-filters label {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .header {
    padding: 12px;
  }

  .company-name {
    font-size: 1rem;
  }

  .header h1 {
    font-size: 0.95rem;
  }

  .tab {
    padding: 8px 12px;
    font-size: 13px;
  }

  .tab-content {
    padding: 15px;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 10px 15px;
    font-size: 13px;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px;
    font-size: 14px;
  }

  /* Table adjustments for very small screens */
  th, td {
    padding: 8px 6px;
    font-size: 12px;
  }

  .action-menu-btn {
    padding: 5px 8px;
    font-size: 18px;
  }

  /* Settings button */
  .settings-button {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ============= DRIVER WAGE SETTINGS ============= */

.driver-wage-container {
  max-width: 600px;
  padding: 20px 0;
}

.setting-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ============= SHIFT SELECTION ============= */

.shift-selection {
  display: flex;
  gap: 20px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.2s;
}

.radio-label:hover {
  border-color: #667eea;
  background: #f0f2ff;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
  color: #667eea;
  font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
  border-color: #667eea;
  background: #f0f2ff;
}

/* ============= REPORTS ============= */

.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  gap: 15px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
}

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

.date-filters .form-group {
  margin: 0;
}

.date-filters .form-group label {
  font-size: 12px;
  margin-bottom: 4px;
}

.date-filters input[type="date"] {
  padding: 8px 12px;
  font-size: 14px;
}

.report-summary {
  margin-bottom: 20px;
}

#reportTable tfoot {
  background: #f8f9fa;
  font-weight: 600;
}

#reportTable tfoot td {
  border-top: 2px solid #ddd;
}

/* Report PDF button */
#exportPdfBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .report-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    justify-content: center;
  }

  .date-filters {
    flex-direction: column;
    width: 100%;
  }

  .shift-selection {
    flex-direction: column;
    gap: 10px;
  }
}
