body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  position: relative;
}

.small-logo {
  position: absolute;
  top: 15px;
  right: 15px;
  height: 60px;
  width: auto;
}

h1 {
  text-align: center;
  color: #667eea;
  margin-bottom: 15px;
  font-size: 2.5rem;
  font-weight: 700;
}

p {
  text-align: center;
  margin-bottom: 30px;
  color: #666;
  font-size: 16px;
}

/* Tutorial Modal Styles */
.tutorial-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.tutorial-modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  animation: slideIn 0.4s ease-out;
}

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

.tutorial-close-x {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s;
}

.tutorial-close-x:hover {
  transform: scale(1.2);
}

.tutorial-intro {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 30px;
  color: white;
  text-align: center;
}

.tutorial-intro h2 {
  margin: 0 0 15px 0;
  font-size: 28px;
  color: white !important;
}

.tutorial-intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: white !important;
}

.tutorial-intro u {
  text-decoration: underline;
  text-decoration-color: white;
}

.tutorial-slider-container {
  position: relative;
  padding: 40px 80px 5px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.slider-arrow:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.slider-arrow-left {
  left: 15px;
}

.slider-arrow-right {
  right: 15px;
}

.tutorial-steps {
  min-height: 250px;
  position: relative;
}

.step {
  display: none;
  text-align: center;
  animation: fadeIn 0.5s ease-in;
}

.step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.step-number {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.step-content h3 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 22px;
}

.step-content p {
  color: #555;
  line-height: 1.6;
  font-size: 15px;
}

.slider-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 5px;
  margin-top: -35px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 30px;
  border-radius: 6px;
}

.tutorial-close-btn {
  width: calc(100% - 60px);
  margin: 5px 30px 20px;
  padding: 15px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tutorial-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Section Styles */
.dashboard-section,
.clients-section,
.budgets-section {
  background: white;
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.dashboard-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.clients-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.budgets-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.dashboard-section h2 {
  color: #667eea;
  margin: 0 0 25px 0;
  font-size: 24px;
  font-weight: 700;
}

.clients-section h2 {
  color: #059669;
  margin: 0 0 25px 0;
  font-size: 24px;
  font-weight: 700;
}

.budgets-section h2 {
  color: #d97706;
  margin: 0 0 25px 0;
  font-size: 24px;
  font-weight: 700;
}

/* Stats Grid */
.stats-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 30px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  flex: 1;
  min-width: 200px;
  max-width: 240px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.stat-card.highlight {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #f59e0b;
}

.stat-icon {
  font-size: 40px;
  line-height: 1;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
  word-break: break-word;
}

/* Budget Status Breakdown */
.budget-status-breakdown {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.budget-status-breakdown h3 {
  color: #333;
  margin: 0 0 20px 0;
  font-size: 18px;
  text-align: center;
}

.status-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
}

.status-item {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  border-left: 4px solid #667eea;
}

.status-item.borrador {
  border-left-color: #94a3b8;
}

.status-item.enviado {
  border-left-color: #3b82f6;
}

.status-item.aceptado {
  border-left-color: #10b981;
}

.status-item.rechazado {
  border-left-color: #ef4444;
}

.status-item-label {
  font-size: 13px;
  color: #666;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-weight: 500;
}

.status-item-value {
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

/* Buttons */
.action-btn {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  margin-bottom: 20px;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
  background: #f0f4ff;
  color: #667eea;
  border: 2px solid #667eea;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 15px 0;
}

.secondary-btn:hover {
  background: #667eea;
  color: white;
}

/* Filters */
.filters {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 25px;
  align-items: center;
}

.filters input[type="text"],
.filters select {
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 200px;
}

.filters input[type="text"]:focus,
.filters select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filters button {
  padding: 12px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.filters button:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

/* Tables */
.clients-table,
.budgets-table {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

thead {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

th {
  padding: 16px 12px;
  text-align: center;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
  border-right: 2px solid #cbd5e1;
}

th:last-child {
  border-right: none;
}

td {
  padding: 16px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 14px;
}

td.text-center {
  text-align: center;
  white-space: nowrap;
}

tbody tr {
  transition: all 0.2s ease;
}

tbody tr:hover {
  background: #f8fafc;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.prospecto {
  background: #e0e7ff;
  color: #4338ca;
}

.status-badge.activo {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.inactivo {
  background: #f3f4f6;
  color: #6b7280;
}

.status-badge.borrador {
  background: #f1f5f9;
  color: #475569;
}

.status-badge.enviado {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.aceptado {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.rechazado {
  background: #fee2e2;
  color: #991b1b;
}

/* Action Buttons in Table */
.table-btn {
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 3px;
}

.view-btn:hover,
.edit-btn:hover,
.delete-btn:hover,
.pdf-btn:hover {
  transform: scale(1.2);
  background: #f1f5f9;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1500;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalSlideIn 0.3s ease-out;
  position: relative;
}

.budget-modal-large {
  max-width: 700px;
}

.client-view-large {
  max-width: 900px;
}

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

.modal-content h3 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 25px;
  margin: 0;
  border-radius: 16px 16px 0 0;
  font-size: 22px;
  font-weight: 600;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 100;
}

.close:hover {
  transform: scale(1.2);
}

.modal-content form {
  padding: 30px;
}

.modal-content label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-weight: 600;
  font-size: 14px;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-content textarea {
  resize: vertical;
  min-height: 80px;
}

.modal-content button[type="submit"] {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-content button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.modal-content button[type="button"] {
  background: #e2e8f0;
  color: #475569;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-content button[type="button"]:hover {
  background: #cbd5e1;
  transform: translateY(-2px);
}

/* Item Row */
.item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

.item-row input {
  margin-bottom: 0;
}

.remove-item {
  background: #ef4444;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.remove-item:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.budget-total-display {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  font-size: 20px;
  margin: 20px 0;
  border: 2px solid #e2e8f0;
}

/* Client View Modal */
#client-view-content {
  padding: 30px;
}

.client-view-large .close {
  color: #334155;
}

.client-view-large .close:hover {
  color: #667eea;
}

.client-view-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 30px;
}

.client-view-header h2 {
  color: #667eea;
  margin: 0 0 10px 0;
  font-size: 28px;
}

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

.client-info-item {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
}

.client-info-label {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
}

.client-info-value {
  font-size: 16px;
  color: #1e293b;
  font-weight: 600;
}

.client-view-section {
  margin-bottom: 30px;
}

.client-view-section h3 {
  color: #334155;
  margin-bottom: 15px;
  font-size: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.client-budgets-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.budget-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
}

.budget-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

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

.budget-card-date {
  color: #64748b;
  font-size: 14px;
}

.budget-card-amount {
  font-size: 24px;
  font-weight: 700;
  color: #059669;
}

/* Message Modal */
.message-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.message-content {
  background: white;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  min-width: 300px;
  max-width: 500px;
  position: relative;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.message-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #94a3b8;
  cursor: pointer;
}

.message-close:hover {
  color: #64748b;
}

#message-text {
  margin: 0;
  color: #334155;
  font-size: 16px;
  text-align: center;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  
  .stats-grid {
    flex-direction: column;
  }
  
  .stat-card {
    max-width: none;
  }
  
  .item-row {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-direction: column;
  }
  
  .filters input,
  .filters select {
    width: 100%;
  }
}
