/* =============================================================================
   MODERN THEME OVERRIDES
   Enhanced professional styling that works with components.css
   ============================================================================= */

/* =============================================================================
   BASE STYLES
   ============================================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-700);
  background: #f5f5f5;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   MAIN CONTAINER - Full Width by Default
   ============================================================================= */

.container {
  width: 100%;
  margin: 0;
  background: rgba(255, 255, 255, 0.98);
  min-height: 100vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  transition: all var(--transition-base);
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary) 100%);
}

/* =============================================================================
   HEADER SECTION
   ============================================================================= */

.header {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  padding: 2.5rem;
  border-bottom: 2px solid #e3f2fd;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  display: inline-block;
  letter-spacing: -0.02em;
}

.header p {
  color: var(--gray-600);
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
}

.header a {
  text-decoration: none;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e3f2fd;
}

.nav-menu a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.925rem;
  transition: all var(--transition-fast);
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.nav-menu a:hover {
  color: var(--primary);
  background: #e3f2fd;
}

/* =============================================================================
   MODULE SECTIONS
   ============================================================================= */

.screen {
  display: none;
  animation: fadeIn var(--transition-base);
}

.screen.active,
.module-screen.active {
  display: block;
}

.module-content {
  padding: 2.5rem;
  position: relative;
}

.module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e3f2fd;
}

.module-header h1,
.module-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}

.module-header p {
  color: var(--gray-600);
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
}

/* =============================================================================
   ENHANCED MODULE SELECTION BUTTONS
   ============================================================================= */

#moduleSelectionScreen h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary);
  font-weight: 800;
}

.module-button,
.invoice-type-button,
.terminal-type-button,
.primary-button {
  background: var(--primary) !important;
  background-color: var(--primary) !important;
  background-image: none !important;
  color: white !important;
  border: 3px solid var(--primary);
  border-radius: 16px;
  padding: 1.75rem 1rem;
  font-size: 2.1rem !important;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, font-size 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.15);
  position: relative;
  overflow: hidden;
  width: calc(28.333% - 2rem);
  min-height: 112px;
  margin: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.module-button:hover,
.invoice-type-button:hover,
.terminal-type-button:hover,
.primary-button:hover {
  background: var(--primary-dark) !important;
  background-color: var(--primary-dark) !important;
  background-image: none !important;
  color: white !important;
  font-size: 2.2rem !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(33, 150, 243, 0.35);
}

/* Remove gradient bar and animations on all buttons */
.module-button::before,
.invoice-type-button::before,
.terminal-type-button::before,
.primary-button::before,
.module-button::after,
.invoice-type-button::after,
.terminal-type-button::after,
.primary-button::after {
  display: none !important;
  content: none !important;
  background: none !important;
  background-image: none !important;
}

/* Different colors for each module type */
/* All module buttons use the same blue color scheme */
.module-button[data-module="serviceReception"],
.module-button[data-module="invoice"],
.module-button[data-module="terminal"],
.module-button[data-module="vehicleRequest"],
.module-button[data-module="permissions"] {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.module-button[data-module="serviceReception"]:hover,
.module-button[data-module="invoice"]:hover,
.module-button[data-module="terminal"]:hover,
.module-button[data-module="vehicleRequest"]:hover,
.module-button[data-module="permissions"]:hover {
  background: var(--primary-dark) !important;
  color: white !important;
  font-size: 2.2rem !important;
}

/* =============================================================================
   BUTTONS - No more gradients, solid colors
   ============================================================================= */

.btn-secondary {
  background: var(--primary) !important;
  color: white !important;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(33, 150, 243, 0.2);
  min-width: fit-content;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.btn-primary {
  background: var(--primary) !important;
  color: white !important;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(33, 150, 243, 0.2);
  min-width: fit-content;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

.back-button,
.btn-back {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 3px 10px rgba(33, 150, 243, 0.2);
  margin-bottom: 1.5rem;
}

.back-button:hover,
.btn-back:hover {
  background: var(--primary-dark);
  transform: translateX(-4px);
  box-shadow: 0 5px 15px rgba(33, 150, 243, 0.3);
}

/* =============================================================================
   TABS
   ============================================================================= */

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e3f2fd;
  overflow-x: auto;
  padding-bottom: 0;
}

.tab {
  padding: 1rem 2rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--gray-600);
  background: transparent;
  border: none;
  border-radius: 8px 8px 0 0;
  transition: all var(--transition-fast);
  white-space: nowrap;
  position: relative;
}

.tab:hover {
  color: #1976d2;
  background: #f5f5f5;
}

.tab.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 -2px 10px rgba(33, 150, 243, 0.2);
}

/* =============================================================================
   CARDS AND SECTIONS
   ============================================================================= */

.card,
.section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #f0f0f0;
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

/* =============================================================================
   STAT CARDS - Service Reception Specific Colors
   ============================================================================= */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Stat card styles moved to serviceReception.css for cleaner organization */

/* Stat value and label styles are in serviceReception.css */

/* =============================================================================
   TABLES
   ============================================================================= */

.table,
.data-table {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.table th,
.data-table th {
  background: var(--primary);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1.25rem;
  font-size: 0.825rem;
}


.table tbody tr:hover,
.data-table tbody tr:hover {
  background: #f8f9fa;
}

/* =============================================================================
   FORMS - Simple borders
   ============================================================================= */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Search boxes specifically */
.search-input,
.search-box {
  border: 2px solid #e0e0e0;
  padding-left: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
  background-size: 1.25rem;
}

.search-input:focus,
.search-box:focus {
  border-color: var(--primary);
}

/* =============================================================================
   LOADING OVERLAY
   ============================================================================= */

#loadingOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#loadingOverlay .spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* =============================================================================
   STATUS MESSAGES
   ============================================================================= */

.status.success,
.alert-success {
  background: #e8f5e9;
  border-left: 4px solid #4CAF50;
  color: #2e7d32;
}

.status.error,
.alert-error {
  background: #ffebee;
  border-left: 4px solid var(--danger);
  color: #c62828;
}

.status.warning,
.alert-warning {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  color: #e65100;
}

.status.info,
.alert-info {
  background: #e3f2fd;
  border-left: 4px solid var(--primary);
  color: var(--primary-dark);
}

/* =============================================================================
   VERSION INFO - Remove gradient
   ============================================================================= */

.version-info {
  text-align: center;
  padding: 1rem;
  color: var(--gray-500);
  font-size: 0.75rem;
  border-top: 1px solid #e0e0e0;
  margin-top: 2rem;
  background: #f8f9fa;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 1024px) {
  .module-button,
  .invoice-type-button,
  .terminal-type-button,
  .primary-button {
    width: calc(50% - 2rem);
  }
}

@media (max-width: 768px) {
  .module-content {
    padding: 1.5rem;
  }
  
  .header {
    padding: 1.5rem;
  }
  
  .header h1 {
    font-size: 1.75rem;
  }
  
  .module-button,
  .invoice-type-button,
  .terminal-type-button,
  .primary-button {
    width: 100%;
    margin: 0.75rem 0;
    font-size: 1.575rem !important;
  }
  
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .module-content {
    padding: 1rem;
  }
  
  .header {
    padding: 1rem;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .stats-bar {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}