/* ============================================================================
   CSS CUSTOMIZADO PARA SISTEMA PROFISSIONAL - ALL LIFE
   ============================================================================ */

/* Variables CSS para consistência */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  
  --brown-color: #8B4513;
  --brown-hover: #A0522D;
  
  --border-radius: 8px;
  --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

/* ============================================================================
   PROGRESS INDICATORS
   ============================================================================ */

.progress-indicator {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin: 20px 0;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #dee2e6;
  z-index: 1;
}

.progress-bar.completed::before {
  background: linear-gradient(to right, var(--success-color) 0%, var(--success-color) 100%);
}

.step {
  text-align: center;
  flex: 1;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #dee2e6;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: bold;
  font-size: 14px;
  border: 3px solid #fff;
  transition: var(--transition);
}

.step.active .step-number {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.step.completed .step-number {
  background-color: var(--success-color);
  color: white;
}

.step-label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
  transition: var(--transition);
}

.step.active .step-label,
.step.completed .step-label {
  color: var(--primary-color);
  font-weight: 600;
}

/* ============================================================================
   FORMS AND INPUTS
   ============================================================================ */

.professional-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
  display: block;
}

.required {
  color: var(--danger-color);
  font-weight: bold;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: var(--border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-control.is-valid {
  border-color: var(--success-color);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.68-.68L4.58 4.5l1.5-1.55.68.68L4.58 6.01z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
  border-color: var(--danger-color);
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6l-2.4 2.4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.text-danger {
  color: var(--danger-color) !important;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6c757d;
}

/* ============================================================================
   RADIO BUTTONS AND CHECKBOXES
   ============================================================================ */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 2px solid #dee2e6;
  border-radius: var(--border-radius);
  background-color: white;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.radio-option:hover {
  background-color: #f8f9fa;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked {
  background-color: var(--primary-color);
}

.radio-option:has(input:checked) {
  border-color: var(--primary-color);
  background-color: rgba(0,123,255,0.05);
}

.radio-label {
  cursor: pointer;
  margin: 0;
  font-weight: 500;
  color: #495057;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 15px 0;
}

.form-check-input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary-color);
}

.form-check-label {
  font-size: 14px;
  color: #495057;
  line-height: 1.4;
  cursor: pointer;
}

/* ============================================================================
   CARDS AND SECTIONS
   ============================================================================ */

.form-section {
  margin: 30px 0;
  padding: 25px;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  background-color: #f8f9fa;
  position: relative;
}

.section-title {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.subsection-title {
  color: #495057;
  margin: 25px 0 15px 0;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 5px;
}

.info-card {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.info-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.card-header {
  background-color: #f8f9fa;
  padding: 15px 20px;
  border-bottom: 1px solid #dee2e6;
}

.card-title {
  margin: 0;
  font-size: 18px;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  text-align: center;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #004085;
}

.btn-secondary {
  color: #fff;
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

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

.brown {
  color: white;
  background-color: var(--brown-color);
  border-color: var(--brown-color);
}

.brown:hover {
  background-color: var(--brown-hover);
  border-color: var(--brown-hover);
  color: white;
}

.btn-outline-primary {
  color: var(--primary-color);
  background-color: transparent;
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* ============================================================================
   ALERTS AND NOTIFICATIONS
   ============================================================================ */

.alert {
  position: relative;
  padding: 15px 20px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  font-size: 14px;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeaa7;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert h5 {
  color: inherit;
  font-size: 16px;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert ul {
  margin: 10px 0 0 0;
  padding-left: 20px;
}

.alert li {
  margin-bottom: 5px;
}

/* ============================================================================
   STATUS BADGES
   ============================================================================ */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.approved {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-badge.rejected {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ============================================================================
   DASHBOARD STYLES
   ============================================================================ */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 1px solid #dee2e6;
}

.dashboard-title {
  color: var(--primary-color);
  font-size: 28px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-message {
  margin: 5px 0 0 0;
  color: #6c757d;
  font-size: 16px;
  font-weight: 500;
}

.status-indicators {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

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

.action-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
}

.action-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  text-decoration: none;
  color: inherit;
}

.action-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: var(--transition);
}

.action-card:hover .action-icon {
  transform: scale(1.1);
  background-color: var(--brown-color);
}

.action-content {
  flex: 1;
}

.action-title {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: #495057;
  font-weight: 600;
}

.action-description {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

/* ============================================================================
   TABLES AND DATA DISPLAY
   ============================================================================ */

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f8f9fa;
}

.info-row:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.info-row .label {
  font-weight: 500;
  color: #6c757d;
  flex-shrink: 0;
}

.info-row .value {
  color: #495057;
  text-align: right;
  word-break: break-word;
}

/* ============================================================================
   MODAL STYLES
   ============================================================================ */

.modal-content {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 15px 20px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #495057;
  font-weight: 600;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ============================================================================
   LOADING AND EMPTY STATES
   ============================================================================ */

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6c757d;
}

.empty-icon {
  font-size: 48px;
  color: #dee2e6;
  margin-bottom: 15px;
}

.empty-title {
  color: #495057;
  font-size: 18px;
  margin-bottom: 10px;
  font-weight: 500;
}

.empty-description {
  color: #6c757d;
  margin: 0;
  line-height: 1.5;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.3s ease-out;
}

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .status-indicators {
    width: 100%;
    justify-content: flex-start;
  }
  
  .info-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
  }
  
  .action-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 15px;
  }
  
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .radio-group {
    gap: 8px;
  }
  
  .radio-option {
    padding: 12px;
  }
  
  .progress-indicator {
    padding: 0 10px;
  }
  
  .step-label {
    font-size: 11px;
  }
  
  .dashboard-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .info-row .value {
    text-align: left;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .form-section {
    padding: 20px 15px;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important; }
.shadow { box-shadow: var(--box-shadow) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,0.175) !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-circle { border-radius: 50% !important; }

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
  .btn, .action-card, .form-actions {
    display: none !important;
  }
  
  .info-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #000;
  }
  
  .dashboard-header {
    border-bottom: 2px solid #000;
  }
}