/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* Font preload for better performance */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Base styling with Inter font */
* {
  box-sizing: border-box;
}

body, html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Typography improvements with Inter */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Additional typography utilities */
.section-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 400;
  font-family: 'Inter', sans-serif;
}

.font-inter {
  font-family: 'Inter', sans-serif;
}

.font-weight-medium {
  font-weight: 500;
}

.font-weight-semibold {
  font-weight: 600;
}

.font-weight-bold {
  font-weight: 700;
}

.font-weight-extrabold {
  font-weight: 800;
}

/* Header centering and improvements */
.header-title {
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Utility classes */
.hidden {
  display: none;
}

.show {
  display: block;
}

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* We Leasing brand colors */
:root {
  --we-teal: #4ECDC4;
  --we-navy: #1E3A8A;
  --we-orange: #FF6B35;
  --we-green: #10B981;
  --we-purple: #8B5CF6;
  --we-gradient: linear-gradient(135deg, #4ECDC4 0%, #1E3A8A 100%);
}

/* Color utility classes */
.we-gradient {
  background: var(--we-gradient);
}

.we-teal {
  background-color: var(--we-teal);
}

.we-navy {
  background-color: var(--we-navy);
}

.we-orange {
  background-color: var(--we-orange);
}

.we-green {
  background-color: var(--we-green);
}

.we-purple {
  background-color: var(--we-purple);
}

.text-we-teal {
  color: var(--we-teal);
}

.text-we-navy {
  color: var(--we-navy);
}

.text-we-orange {
  color: var(--we-orange);
}

.text-we-purple {
  color: var(--we-purple);
}

.text-we-green {
  color: var(--we-green);
}

.bg-we-teal {
  background-color: var(--we-teal);
}

.border-we-teal {
  border-color: var(--we-teal);
}

.hover\:bg-we-teal:hover {
  background-color: var(--we-teal);
}

.we-gradient:hover {
  opacity: 0.9;
}

/* ============================================ */
/* COTIZADOR STYLES */
/* ============================================ */

.cotizador-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.cotizador-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.form-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.results-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--we-navy);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--we-teal);
  margin-right: 0.75rem;
  border-radius: 2px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
  font-family: 'Inter', sans-serif;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--we-teal);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.dual-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: end;
}

.toggle-btn {
  padding: 0.5rem 1rem;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.toggle-btn.active {
  background: var(--we-teal);
  color: white;
  border-color: var(--we-teal);
}

.asset-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.asset-button {
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: white;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.asset-button.active {
  border-color: var(--we-teal);
  background: var(--we-teal);
  color: white;
}

.monthly-payment-highlight {
  background: linear-gradient(135deg, var(--we-orange) 0%, #e55a2b 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 2rem;
}

.monthly-payment-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  opacity: 0.9;
  font-family: 'Inter', sans-serif;
}

.monthly-payment-amount {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.monthly-payment-subtitle {
  font-size: 0.875rem;
  opacity: 0.8;
  font-family: 'Inter', sans-serif;
}

.detail-grid {
  display: grid;
  gap: 1rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid var(--we-teal);
}

.detail-label {
  font-weight: 500;
  color: #374151;
  font-family: 'Inter', sans-serif;
}

.detail-value {
  font-weight: 700;
  color: var(--we-navy);
  font-family: 'Inter', sans-serif;
}

.commission-highlight {
  background: linear-gradient(135deg, var(--we-green) 0%, #059669 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1.5rem;
}

.commission-amount {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
}

.insurance-highlight {
  background: linear-gradient(135deg, var(--we-purple) 0%, #7c3aed 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1.5rem;
}

.insurance-section {
  background: #faf5ff;
  border: 2px solid var(--we-purple);
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.insurance-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider-switch {
  background-color: var(--we-purple);
}

input:checked+.slider-switch:before {
  transform: translateX(26px);
}

.btn-primary {
  background: var(--we-gradient);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s;
  width: 100%;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: #6b7280;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.btn-secondary:hover {
  background: #4b5563;
}

.client-data-section {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.client-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.plazo-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.plazo-btn {
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  text-align: center;
  font-size: 0.875rem;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.plazo-btn.active {
  border-color: var(--we-teal);
  background: var(--we-teal);
  color: white;
}

.info-tabs {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.tab-buttons {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e5e7eb;
}

.tab-button {
  padding: 1rem 2rem;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 500;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
}

.tab-button.active {
  color: var(--we-teal);
  border-bottom-color: var(--we-teal);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.benefit-item {
  display: flex;
  align-items: start;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid var(--we-green);
}

.benefit-icon {
  font-size: 2rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.document-section {
  margin-bottom: 2rem;
}

.document-type-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--we-navy);
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--we-teal);
  color: white;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
}

.document-list {
  list-style: none;
  padding: 0;
}

.document-list li {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 4px solid var(--we-teal);
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
}

.document-list li:before {
  content: "📄";
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.commission-slider {
  width: 100%;
  margin: 1rem 0;
}

.slider-container {
  position: relative;
  margin: 1rem 0;
}

.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--we-teal);
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--we-teal);
  cursor: pointer;
  border: none;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.5rem;
  font-family: 'Inter', sans-serif;
}

/* ============================================ */
/* QUOTE MANAGEMENT STYLES */
/* ============================================ */

.quote-management-container {
  max-width: 1400px;
  margin: 0 auto;
}

.quote-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.quote-table-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.quote-form-group {
  margin-bottom: 1.5rem;
}

.quote-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--we-navy);
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.quote-form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  font-family: 'Inter', sans-serif;
}

.quote-form-input:focus {
  outline: none;
  border-color: var(--we-teal);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.focus-ring:focus {
  outline: none;
  border-color: var(--we-teal);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.quote-form-input.error {
  border-color: #ef4444;
}

.error-message {
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  font-family: 'Inter', sans-serif;
}

.success-message {
  color: var(--we-teal);
  font-size: 0.875rem;
  padding: 0.75rem;
  background-color: #ecfdf5;
  border: 1px solid var(--we-teal);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

.action-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: 'Inter', sans-serif;
}

.action-btn-edit {
  background-color: #3b82f6;
  color: white;
}

.action-btn-edit:hover {
  background-color: #2563eb;
}

.action-btn-delete {
  background-color: #ef4444;
  color: white;
}

.action-btn-delete:hover {
  background-color: #dc2626;
}

.action-btn-view {
  background-color: var(--we-teal);
  color: white;
}

.action-btn-view:hover {
  opacity: 0.9;
}

.empty-state-icon {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

/* ============================================ */
/* USER MANAGEMENT STYLES */
/* ============================================ */

.user-management-container {
  max-width: 1400px;
  margin: 0 auto;
}

.user-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.user-table-header {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.action-button {
  transition: all 0.2s ease-in-out;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-button {
  color: #2563eb;
  border-color: #2563eb;
  background: white;
}

.edit-button:hover {
  background: #eff6ff;
  border-color: #1d4ed8;
}

.delete-button {
  color: #dc2626;
  border-color: #dc2626;
  background: white;
}

.delete-button:hover {
  background: #fef2f2;
  border-color: #b91c1c;
}

.user-form-group {
  margin-bottom: 1.5rem;
}

.user-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.user-form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  font-family: 'Inter', sans-serif;
}

.user-form-input:focus {
  outline: none;
  border-color: var(--we-teal);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.alert-success {
  background: #dcfce7;
  color: #16a34a;
  font-family: 'Inter', sans-serif;
}

.alert-error {
  background: #fef2f2;
  color: #dc2626;
  font-family: 'Inter', sans-serif;
}

.alert-info {
  background: #eff6ff;
  color: #2563eb;
  font-family: 'Inter', sans-serif;
}

.alert-warning {
  background: #fefce8;
  color: #ca8a04;
  font-family: 'Inter', sans-serif;
}

.pagination-button {
  transition: all 0.2s ease-in-out;
  font-family: 'Inter', sans-serif;
}

.pagination-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-button.active {
  background: var(--we-teal);
  border-color: var(--we-teal);
  color: white;
}

.search-container {
  position: relative;
}

.search-input {
  padding-left: 2.5rem;
  font-family: 'Inter', sans-serif;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

/* ============================================ */
/* MODAL AND OVERLAY STYLES */
/* ============================================ */

.modal-overlay {
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

@media (max-width: 768px) {
  .cotizador-grid {
    grid-template-columns: 1fr;
  }
  
  .client-form {
    grid-template-columns: 1fr;
  }
  
  .asset-type-grid {
    grid-template-columns: 1fr;
  }
  
  .plazo-buttons {
    grid-template-columns: 1fr;
  }
  
  .tab-buttons {
    flex-direction: column;
  }
  
  .tab-button {
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    border-right: 2px solid transparent;
  }
  
  .tab-button.active {
    border-bottom-color: #e5e7eb;
    border-right-color: var(--we-teal);
  }
  
  .quote-management-container,
  .user-management-container {
    padding: 1rem;
  }
  
  .action-button {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
  }
  
  .pagination-button {
    padding: 0.5rem;
    min-width: 2.5rem;
  }
  
  .monthly-payment-amount {
    font-size: 2.5rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-left {
    justify-content: flex-start;
  }
  
  .header-actions {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cotizador-container {
    padding: 1rem;
  }
  
  .form-section,
  .results-section {
    padding: 1rem;
  }
  
  .monthly-payment-amount {
    font-size: 2rem;
  }
  
  .commission-amount {
    font-size: 1.5rem;
  }
}

/* ============================================ */
/* ACCESSIBILITY IMPROVEMENTS */
/* ============================================ */

/* Focus improvements for better accessibility */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.3);
  border-color: var(--we-teal);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --we-teal: #00838f;
    --we-navy: #0d47a1;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print styles */
@media print {
  .header-actions,
  .btn-primary,
  .btn-secondary,
  .action-btn {
    display: none !important;
  }
  
  .monthly-payment-highlight,
  .commission-highlight,
  .insurance-highlight {
    background: white !important;
    border: 2px solid #000 !important;
    color: #000 !important;
  }
}