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

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

/* Login Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

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

.bike-icon {
  width: 48px;
  height: 48px;
  color: #667eea;
  margin-bottom: 16px;
}

.login-header h1 {
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.login-form input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.login-form input:focus {
  outline: none;
  border-color: #667eea;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.login-btn:hover {
  background: #5a6fd8;
}

.demo-credentials {
  margin-top: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.demo-credentials p {
  margin: 4px 0;
}

/* Dashboard Styles */
.dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: white;
  border-bottom: 1px solid #e1e5e9;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left .bike-icon {
  width: 32px;
  height: 32px;
  color: #667eea;
}

.header-left h1 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.welcome-text {
  color: #666;
  font-size: 14px;
}

.logout-btn {
  padding: 8px 16px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

/* Main Content */
.main-content {
  flex: 1;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

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

.content-header h2 {
  font-size: 28px;
  font-weight: 600;
  color: #333;
}

.add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

.add-btn svg {
  width: 18px;
  height: 18px;
}

/* Search Section */
.search-section {
  margin-bottom: 30px;
}

.search-container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#searchInput {
  flex: 1;
  min-width: 250px;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

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

.voice-btn {
  padding: 12px;
  background: #6f42c1;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-btn:hover {
  background: #5a32a3;
}

.voice-btn svg {
  width: 18px;
  height: 18px;
}

.search-btn {
  padding: 12px 20px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background: #0056b3;
}

.clear-btn {
  padding: 12px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.clear-btn:hover {
  background: #545b62;
}

/* Table Styles */
.table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

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

.data-table th {
  background: #f8f9fa;
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #555;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e1e5e9;
}

.data-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #e1e5e9;
  font-size: 18px;
}

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

.action-buttons {
  display: flex;
  gap: 8px;
}

.edit-btn {
  padding: 6px 12px;
  background: #ffc107;
  color: #212529;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.edit-btn:hover {
  background: #e0a800;
}

.delete-btn {
  padding: 6px 12px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  margin: 50px auto;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.close-btn {
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.close-btn:hover {
  background: #f8f9fa;
}

.close-btn svg {
  width: 20px;
  height: 20px;
}

.bike-form {
  padding: 24px;
}

.bike-form .form-group {
  margin-bottom: 20px;
}

.bike-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
}

.input-with-voice {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-voice input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.input-with-voice input:focus {
  outline: none;
  border-color: #667eea;
}

.input-with-voice .voice-btn {
  padding: 12px;
  min-width: 44px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 30px;
}

.cancel-btn {
  padding: 12px 20px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cancel-btn:hover {
  background: #545b62;
}

.save-btn {
  padding: 12px 20px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

/* Loading Spinner */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Toast Notification */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 3000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: #28a745;
}

.toast.error {
  background: #dc3545;
}

/* Voice Recording Animation */
.voice-btn.recording {
  background: #dc3545 !important;
  animation: pulse 1s infinite;
}


@media (max-width: 480px) {
    .data-table th, .data-table td {
        padding: 8px 6px;
        font-size: 18px;
    }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .main-content {
    max-width: 768px;
    padding: 16px;
  }
  
  .header-content {
    padding: 0 16px;
    height: 60px;
  }
  
  .header-left h1 {
    font-size: 18px;
  }
  
  .welcome-text {
    display: none;
  }
  
  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .content-header h2 {
    font-size: 24px;
  }
  
  .search-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  #searchInput {
    min-width: auto;
  }
  
  .search-container > * {
    width: 100%;
  }
  
  .table-container {
    overflow-x: auto;
  }
  
  .data-table {
    min-width: 800px;
  }
  
  .data-table th,
  .data-table td {
    padding: 12px 8px;
    font-size: 12px;
  }
  
  .modal-content {
    margin: 20px auto;
    max-height: calc(100vh - 40px);
  }
  
  .bike-form {
    padding: 20px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions button {
    width: 100%;
  }
  
  .login-card {
    padding: 30px 20px;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 4px;
  }
  
  .edit-btn,
  .delete-btn {
    width: 100%;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 12px;
  }
  
  .header-content {
    padding: 0 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 6px;
    font-size: 11px;
  }
  
  .bike-form {
    padding: 16px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .login-card {
    padding: 24px 16px;
  }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-content {
    padding: 20px;
  }
  
  .data-table th,
  .data-table td {
    padding: 14px 10px;
    font-size: 13px;
  }
}

/* Desktop Responsive */
@media (min-width: 1025px) {
  .main-content {
    padding: 24px;
  }
  
  .search-container {
    max-width: 800px;
  }
  
  .table-container {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }
}

/* Print Styles */
@media print {
  .header,
  .search-section,
  .content-header .add-btn,
  .action-buttons {
    display: none !important;
  }
  
  .main-content {
    padding: 0;
  }
  
  .table-container {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
