:root {
  --primary-color: #6b3e91;
  --secondary-color: #ff8200;
  --primary-light: #8a5ca8;
  --secondary-light: #ff9533;
  --primary-dark: #4a2b66;
  --secondary-dark: #cc6700;
  
  --success-color: #22c55e;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  --white: #ffffff;
  --black: #000000;
  
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::-webkit-scrollbar {
  background: #ff000000;
  width: 0.6rem
}

*::-webkit-scrollbar-thumb {
  background: rgb(0 0 0 / 12%); /* cor do "polegar" da barra, pode ajustar */
  border-radius: 10px;
  width: 0.2rem
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  background-image: url(/assets/images/Background.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

td.text-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-bottom: 3px solid var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  gap: 2rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.logo {
  width: 70px;
  object-fit: contain;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-section {
  flex: 1;
  max-width: 500px;
}

.search-container {
  position: relative;
  display: flex;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
}

.search-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(107, 62, 145, 0.1);
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--gray-500);
}

.search-btn {
  padding: 0.75rem 1rem;
  border: none;
  background: var(--primary-color);
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--primary-dark);
}

.actions-section {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.action-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background: var(--gray-100);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.user-btn:hover {
  background: var(--gray-200);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-weight: 500;
  color: var(--gray-700);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1000;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--primary-color);
}

/* Main Content */
.main-content {
  padding: 2rem 0;
}

.goals-container {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.goals-list {
  display: flex;
  flex-direction: column;
}

/* Goal Items */
.goal-item {
  position: relative;
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
  overflow: hidden;
}

.goal-item:last-child {
  border-bottom: none;
}

.goal-item:hover {
  background: var(--gray-50);
  box-shadow: var(--shadow-md);
}

.goal-item-completed {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  border-left: 4px solid var(--success-color);
}

.goal-item-delayed, .goal-item-denied {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  border-left: 4px solid var(--danger-color);
}

.swipe-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
  opacity: 0;
  transition: var(--transition);
  z-index: 10;
}

.swipe-overlay span {
  padding: 1rem;
}

.swipe-confirm {
  left: 0;
  display: none;
  background: linear-gradient(135deg, var(--success-color), #16a34a);
  border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

.swipe-reject {
  right: 0;
  display: none;
  background: linear-gradient(135deg, var(--danger-color), #dc2626);
  border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
}

.swipe-overlay i {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.goal-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.5rem;
  gap: 1rem;
}

.goal-info {
  flex: 1;
}

.goal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.goal-subtitle {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.goal-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.goal-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-600);
  font-size: 0.85rem;
}

.goal-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-completed {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success-color);
}

.status-delayed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.status-denied {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.delay-reason {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  font-weight: 500;
}

.goal-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  justify-content: center;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

.btn-secondary:hover {
  border: 1px solid #ffe100;
}

.btn-success {
  background: var(--success-color);
  color: var(--white);
}

.btn-success:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-danger {
  background: var(--danger-color);
  color: var(--white);
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Empty Message */
.empty-message {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-600);
}

.empty-illustration {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.empty-message h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: var(--transition);
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
  margin: 0;
  color: var(--primary-color);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(107, 62, 145, 0.1);
}

.date-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.radio-option:hover,
.checkbox-option:hover {
  background: var(--gray-50);
}

.radio-option input,
.checkbox-option input {
  display: none;
}

.radio-custom,
.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  position: relative;
  transition: var(--transition);
}

.checkbox-custom {
  border-radius: 50%;
}

.radio-option input:checked + .radio-custom,
.checkbox-option input:checked + .checkbox-custom {
  border-color: var(--primary-color);
  background: var(--primary-color);
}

.radio-option input:checked + .radio-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 12px;
  font-weight: bold;
}

.checkbox-option input:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 12px;
  font-weight: bold;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid;
  min-width: 300px;
  transform: translateX(100%);
  transition: var(--transition);
}

.toast.show {
  transform: translateX(0);
  display: flex;
}

.toast-success {
  border-left-color: var(--success-color);
  color: var(--success-color);
}

.toast-error {
  border-left-color: var(--danger-color);
  color: var(--danger-color);
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
}

.toast-close:hover {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
      padding: 0 0.5rem;
  }
  
  .header-content {
      gap: 0.5rem;
      padding: 0.5rem 0;
      flex-direction: row;
      flex-wrap: wrap;
      
  }
  
  .logo-section {
      align-self: flex-start;
  }
  
  .search-section {
      order: 3;
      max-width: none;
  }
  
  .actions-section {
      align-self: flex-end;
      order: 2;
  }
  
  .site-title {
      font-size: 1.25rem;
  }
  
  .goal-content {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
  }
  
  .goal-actions {
      display: none; /* Hide buttons on mobile, swipe gestures will be used */
  }
  
  .goal-meta {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
  }
  
  .modal-content {
      margin: 1rem;
      width: calc(100% - 2rem);
  }
  
  .modal-footer {
      flex-direction: column;
  }
  
  .date-group {
      grid-template-columns: 1fr;
  }
  
  .user-name {
      display: none;
  }
  
  .toast {
      min-width: auto;
      width: calc(100vw - 2rem);
  }
  
  .toast-container {
      left: 1rem;
      right: 1rem;
  }
}

@media (max-width: 480px) {
  .main-content {
      padding: 1rem 0;
  }
  
  .goal-content {
      padding: 1rem;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
      padding: 1rem;
  }
}

/* Swipe animations */
.goal-item.swiping {
  z-index: 20;
}

.goal-item.swipe-right {
  transform: translateX(100px);
}

.goal-item.swipe-left {
  transform: translateX(-100px);
}

.goal-item.swipe-right .swipe-confirm {
  opacity: 1;
}

.goal-item.swipe-left .swipe-reject {
  opacity: 1;
}

/* Loading states */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
  }
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus, 
.action-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
      --gray-50: #ffffff;
      --gray-100: #f0f0f0;
      --gray-200: #d0d0d0;
      --gray-300: #b0b0b0;
      --gray-400: #808080;
      --gray-500: #606060;
      --gray-600: #404040;
      --gray-700: #202020;
      --gray-800: #101010;
      --gray-900: #000000;
  }
}

/* Campo de senha estilizado (igual index) */
.input-container {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 12px;
  width: 22px;
  height: 22px;
  color: #bdbdbd;
  pointer-events: none;
}
.form-input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus {
  border-color: #ff8200;
}
.password-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 6px;
  display: flex;
  align-items: center;
  height: 100%;
}
.eye-icon {
  width: 22px;
  height: 22px;
  color: #bdbdbd;
}
@media (max-width: 600px) {
  .form-input {
      font-size: 14px;
      padding: 8px 36px 8px 36px;
  }
  .input-icon, .eye-icon {
      width: 18px;
      height: 18px;
  }
}

/* --- Modal Detalhes Avaliação (layout customizado) --- */
.modal-content.detalhes-modal {
background: white;
border-radius: 0.5rem;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
max-width: 80rem;
max-height: 95vh;
width: 90%;
display: flex;
flex-direction: column;
overflow: hidden;
}
@media (max-width: 1100px) {
.modal-content.detalhes-modal {
  max-width: 98vw;
  width: 98vw;
}
}
/* Modal header ajustes */
.modal-header.detalhes-modal-header {
background: hsl(275, 47%, 41%);
color: white;
padding: 1.5rem 2rem 1.2rem 2rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
border-top-left-radius: 0.5rem;
border-top-right-radius: 0.5rem;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
position: relative;
display: flex;
gap: 0.2rem;
}
.modal-header.detalhes-modal-header h3 {
font-size: 1.5rem;
font-weight: 700;
margin: 0 0 0.3rem 0;
padding-left: 0.1rem;
}
.modal-header.detalhes-modal-header p {
color: rgba(255, 255, 255, 0.85);
margin: 0 0 0 0.1rem;
font-size: 1rem;
}
.modal-close {
position: absolute;
top: 1rem;
right: 1rem;
background: none;
border: none;
color: var(--primary-color);
font-size: 1.5rem;
cursor: pointer;
opacity: 0.7;
transition: opacity 0.2s;
}
.modal-close:hover {
opacity: 1;
}
.modal-body.detalhes-modal-body {
flex: 1;
overflow-y: auto;
padding: 1.5rem;
max-height: 85vh;
}
.modal-footer {
padding: 1rem 1.5rem;
border-top: 1px solid hsl(214.3, 31.8%, 91.4%);
display: flex;
justify-content: flex-end;
}
/* Ajuste do card de header */
.header-card {
background: hsl(272, 36%, 53%);
color: white;
border-radius: 0.75rem 0.75rem 0 0;
padding: 1.5rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.header-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}
@media (min-width: 768px) {
.header-grid {
  grid-template-columns: repeat(4, 1fr);
}
}
.header-item {
display: flex;
align-items: center;
gap: 0.5rem;
}
.header-item .label {
font-weight: 500;
}
.separator {
height: 1px;
background: rgba(255, 255, 255, 0.2);
margin: 1rem 0;
}
.nota-final {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.nota-final .nota {
font-size: 1.5rem;
font-weight: bold;
}
.card {
background: white;
border: 1px solid hsl(214.3, 31.8%, 91.4%);
border-radius: 0 0 0.75rem 0.75rem;
margin-bottom: 1.5rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}
.card-header {
padding: 1.5rem 1.5rem 0.75rem 1.5rem;
}
.card-header h3 {
color: hsl(275, 47%, 41%);
font-size: 1.125rem;
font-weight: 600;
margin: 0;
}
.card-content {
padding: 0 1.5rem 1.5rem 1.5rem;
}
.observation {
color: hsl(215.4, 16.3%, 46.9%);
font-style: italic;
margin: 0;
}
.category-card {
background: white;
border: 1px solid hsl(214.3, 31.8%, 91.4%);
border-left: 4px solid hsl(275, 47%, 41%);
border-radius: 0.5rem;
margin-bottom: 1.5rem;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}
.category-header {
padding: 1.5rem 1.5rem 1rem 1.5rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
@media (min-width: 640px) {
.category-header {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
}
.category-title h3 {
color: hsl(275, 47%, 41%);
font-size: 1.125rem;
font-weight: 600;
margin: 0;
}
.category-badges {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.category-content {
padding: 0 1.5rem 1.5rem 1.5rem;
}
.category-observation {
background: rgba(0, 0, 0, 0.02);
border-left: 2px solid hsl(23, 100%, 50%);
border-radius: 0.375rem;
padding: 0.75rem 1rem;
margin-bottom: 1rem;
}
.category-observation h4 {
font-weight: 500;
font-size: 0.875rem;
margin: 0 0 0.25rem 0;
}
.category-observation p {
color: hsl(215.4, 16.3%, 46.9%);
font-style: italic;
font-size: 0.875rem;
margin: 0;
}
.table-container {
border: 1px solid hsl(214.3, 31.8%, 91.4%);
border-radius: 0.375rem;
overflow: hidden;
}
.subcategory-table {
width: 100%;
border-collapse: collapse;
}
.subcategory-table th {
background: rgba(0, 0, 0, 0.02);
padding: 0.75rem;
text-align: left;
font-weight: 600;
font-size: 0.875rem;
border-bottom: 1px solid hsl(214.3, 31.8%, 91.4%);
}
.subcategory-table td {
padding: 0.75rem;
border-bottom: 1px solid hsl(214.3, 31.8%, 91.4%);
font-size: 0.875rem;
}
.subcategory-table tr:hover {
background: rgba(0, 0, 0, 0.02);
}
/* Badge ajustes */
.badge {
display: inline-block;
padding: 0.25rem 0.95rem;
border-radius: 999px;
font-size: 0.85rem;
font-weight: 500;
line-height: 1.2;
}
.badge.outline {
border: 1.5px solid #e5e7eb;
background: transparent;
color: #22223b;
}
.badge.secondary {
background: #ff8200;
color: #fff;
border: none;
}
.badge.status-na {
background: #e5e7eb;
color: #374151;
border: none;
}
.badge.status-conforme {
background: #22c55e;
color: #fff;
border: none;
}
.badge.status-nao-conforme {
background: #ef4444;
color: #fff;
border: none;
}
.btn {
padding: 0.5rem 1rem;
border-radius: 0.375rem;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
border: none;
transition: all 0.2s;
}
.btn-secondary {
background: hsl(210, 40%, 96.1%);
color: hsl(222.2, 47.4%, 11.2%);
}
.btn-secondary:hover {
background: hsl(210, 40%, 90%);
}
.modal-title-block {
display: flex;
flex-direction: column;
align-items: flex-start;
padding-left: 0.2rem;
}
.modal-title {
font-size: 1.7rem;
font-weight: 800;
margin: 0 0 0.3rem 0;
color: var(--primary-color);
letter-spacing: -0.5px;
}

/* Responsividade para o header do modal de detalhes */
@media (max-width: 700px) {
.header-grid.responsive-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.header-card .nota-final {
  flex-direction: row;
  justify-content: flex-start;
  font-size: 1.1rem;
  gap: 0.5rem;
}
.header-item {
  font-size: 0.98rem;
  gap: 0.3rem;
  display: flex;
  align-items: center;
}
.header-item i {
  margin-right: 0.4em;
  font-size: 1.1em;
  color: var(--primary-color);
}
}

/* Responsividade para badges das categorias */
@media (max-width: 700px) {
.category-badges.responsive-badges {
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-start;
}
.category-badges .badge {
  font-size: 0.95rem;
  padding: 0.3em 0.7em;
  margin-bottom: 0.2em;
}
}

/* Melhorias gerais para badges */
.category-badges.responsive-badges {
display: flex;
gap: 0.7rem;
flex-wrap: wrap;
align-items: center;
}
.header-grid.responsive-header {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 1rem;
align-items: center;
}
.header-item {
display: flex;
align-items: center;
gap: 0.5em;
}
.header-item i {
color: var(--primary-color);
font-size: 1.2em;
}
.nota-final i {
color: var(--secondary-color);
margin-right: 0.3em;
}

/* Ícones brancos e outline no header do modal de detalhes */
.header-icon-white {
color: #fff !important;
filter: drop-shadow(0 1px 2px rgba(0,0,0,0.10));
font-size: 1.3em;
}

/* Ícone da categoria herda cor do nome */
.category-title {
display: flex;
align-items: center;
gap: 0.5em;
}
.category-title .category-icon {
font-size: 1.2em;
color: var(--primary-color);
/* cor herdada do h3 */
}
.category-title h3 {
color: var(--primary-color);
font-weight: 600;
margin: 0;
}

/* Para responsividade, garantir alinhamento dos ícones */
@media (max-width: 700px) {
.header-icon-white {
  font-size: 1.1em;
}
.category-title .category-icon {
  font-size: 1em;
}
}

/* Botão retrátil das categorias no modal */
.toggle-category-btn {
background: none;
border: none;
cursor: pointer;
margin-right: 0.5em;
padding: 0.2em 0.3em;
display: flex;
align-items: center;
font-size: 1em;
color: var(--primary-color);
transition: color 0.2s;
}
.toggle-category-btn:focus {
outline: 2px solid var(--secondary-color);
}
.toggle-category-btn i {
font-size: 1.1em;
transition: transform 0.2s;
}

/* Animação suave para abrir/fechar categorias no modal de detalhes */
.animated-collapse {
overflow: hidden;
transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), padding 0.3s, margin 0.3s;
will-change: max-height;
}
.animated-collapse.collapsed {
padding: 0 !important;
margin: 0 !important;
}

/* Padronização das tabelas de subcategorias no modal */
.subcategory-table {
table-layout: fixed;
width: 100%;
min-width: 600px;
}
.subcategory-table th, .subcategory-table td {
text-align: left;
padding: 0.5em 0.7em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.subcategory-table th:nth-child(1), .subcategory-table td:nth-child(1) {
width: 95%;
min-width: 120px;
}
.subcategory-table th:nth-child(2), .subcategory-table td:nth-child(2) {
width: 18%;
min-width: 80px;
}
.subcategory-table th:nth-child(3), .subcategory-table td:nth-child(3) {
width: 14%;
min-width: 60px;
text-align: center;
}
.subcategory-table th:nth-child(4), .subcategory-table td:nth-child(4) {
width: 30%;
min-width: 120px;
}

/* Alinhamento consistente dos badges e nomes das categorias */
.category-header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 1.5em;
}
.category-title {
  display: flex;
  align-items: center;
  gap: 0.7em;
  min-width: 0;
  flex: 1 1 0;
}
.category-title h3 {
  color: var(--primary-color);
  font-weight: 600;
  margin: 0;
  word-break: break-word;
  white-space: normal;
  flex: 1 1 0;
  min-width: 0;
}
.category-badges.responsive-badges {
display: flex;
flex-wrap: wrap;
gap: 0.5em;
align-items: center;
margin-left: 1em;
}
@media (max-width: 900px) {
  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  .category-badges.responsive-badges {
    margin-left: 0;
  }
}

/* Responsividade para tabelas do modal em dispositivos pequenos */
.table-container {
  width: 100%;
  overflow-x: auto;
}
.subcategory-table {
  min-width: 500px;
}
@media (max-width: 700px) {
  .subcategory-table {
    table-layout: auto;
    min-width: 400px;
  }
  .subcategory-table th:nth-child(2),
  .subcategory-table td:nth-child(2),
  .subcategory-table th:nth-child(3),
  .subcategory-table td:nth-child(3) {
    white-space: nowrap;
  }
  .subcategory-table th:not(:nth-child(2)):not(:nth-child(3)),
  .subcategory-table td:not(:nth-child(2)):not(:nth-child(3)) {
    white-space: normal;
    word-break: break-word;
  }
}

/* Permitir quebra de linha nas tabelas do modal */
.subcategory-table th, .subcategory-table td {
  white-space: normal;
  word-break: break-word;
  text-overflow: initial;
  overflow: visible;
}

/* Corrigir responsividade das tabelas: manter células em uma linha só, com rolagem horizontal em telas pequenas */
.subcategory-table th, .subcategory-table td {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
@media (max-width: 700px) {
  .subcategory-table th, .subcategory-table td {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
}