/* Reset e configurações globais */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #ff5420;
  --primary-dark: #e04815;
  --secondary-color: #ffff1e;
  --secondary-dark: #e6e61a;
  --bg-primary: #fef7f0;
  --bg-secondary: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #ffd6cc;
  --border-light: #fff3ed;
  --shadow-sm: 0 1px 3px 0 rgba(255, 84, 32, 0.1), 0 1px 2px 0 rgba(255, 84, 32, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(255, 84, 32, 0.1), 0 2px 4px -1px rgba(255, 84, 32, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(255, 84, 32, 0.1), 0 4px 6px -2px rgba(255, 84, 32, 0.05);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --gradient-primary: linear-gradient(135deg, #ff5420 0%, #ffff1e 100%);
  --gradient-secondary: linear-gradient(135deg, #ffff1e 0%, #ff5420 100%);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: auto;
}

/* Layout principal */
.app {
  min-height: 100vh;
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Logo */
.logo-container {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(255, 84, 32, 0.15));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0% {
    filter: drop-shadow(0 0 10px rgba(255, 84, 32, 0.3));
  }

  100% {
    filter: drop-shadow(0 0 20px rgba(255, 255, 30, 0.5));
  }
}

.title-underline {
  width: 150px;
  height: 4px;
  background: var(--gradient-primary);
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
}

/* Content */
.content {
  margin-top: 2rem;
}

/* Container da tabela */
.table-container {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.table-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Tabela */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table thead {
  background: var(--gradient-primary);
}

.data-table thead th {
  padding: 1.25rem 1rem;
  text-align: left;
  font-weight: 600;
  color: white;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  position: relative;
}

.data-table thead th:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
  position: relative;
}

.data-table tbody tr::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  opacity: 0.7;
}

.data-table tbody tr:hover::after {
  transform: scaleX(1);
}

.data-table tbody tr:hover {
  background: linear-gradient(135deg, rgba(255, 84, 32, 0.03) 0%, rgba(255, 255, 30, 0.03) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 84, 32, 0.08);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

.data-table td {
  padding: 1.25rem 1rem;
  vertical-align: middle;
  color: var(--text-secondary);
  font-weight: 400;
  border: none;
}

.data-table td:first-child {
  font-weight: 700;
  color: var(--primary-color);
  background: linear-gradient(135deg, rgba(255, 84, 32, 0.08) 0%, rgba(255, 255, 30, 0.08) 100%);
  font-size: 0.875rem;
  text-align: center;
  width: 80px;
  position: relative;
}

.data-table td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-primary);
}

/* Estados especiais */
.data-table tbody tr.empty-state td {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-style: italic;
  background: linear-gradient(135deg, rgba(255, 84, 32, 0.02) 0%, rgba(255, 255, 30, 0.02) 100%);
}

.data-table tbody tr.error-state td {
  text-align: center;
  padding: 3rem;
  color: #e53e3e;
  font-weight: 500;
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.02) 0%, rgba(245, 101, 101, 0.02) 100%);
}

/* Responsividade */
@media (max-width: 1200px) {
  .app {
    padding: 1.5rem 1rem;
  }

  .title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .app {
    padding: 1rem 0.5rem;
    max-width: 1000px;
  }

  .logo {
    height: 60px;
  }

  .title {
    font-size: 2.5rem;
  }

  .header {
    margin-bottom: 2rem;
  }

  .table-container {
    margin: 0 -0.5rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .data-table {
    font-size: 0.875rem;
  }

  .data-table thead th,
  .data-table td {
    padding: 1rem 0.75rem;
  }

  .data-table td:first-child {
    width: 60px;
  }
}

@media (max-width: 640px) {
  .logo {
    height: 50px;
  }

  .title {
    font-size: 2rem;
  }

  .data-table {
    font-size: 0.8125rem;
  }

  .data-table thead th,
  .data-table td {
    padding: 0.875rem 0.5rem;
  }

  /* Tornar algumas colunas mais estreitas em mobile */
  .data-table td:first-child {
    width: 50px;
  }

  .data-table thead th:first-child {
    width: 50px;
  }
}

/* Animações suaves */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-container {
  animation: fadeIn 0.6s ease-out;
}

.data-table tbody tr {
  animation: fadeIn 0.4s ease-out;
}

/* Melhorias de acessibilidade */
.data-table:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 84, 32, 0.15);
}

/* Loading state para quando os dados estão carregando */
.loading-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  color: var(--text-muted);
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.75rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Scrollbar personalizada */
.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.table-container::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--radius-sm);
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}