.control-panel {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.35s ease-out;
}

.filters-group,
.action-buttons {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-item label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.filter-item input[type="date"] {
  width: 180px;
  height: 38px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  background: #f8fafc;
  outline: none;
  transition: var(--transition);
}

.filter-item input[type="date"]:focus {
  border-color: var(--latam-red);
  box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.12);
}

.table-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.35s ease-out;
}

.table-container {
  max-height: 64vh;
  overflow: auto;
}

.table-status {
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  background: #fafafa;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
}

table {
  width: 100%;
  min-width: 1680px;
  border-collapse: collapse;
  text-align: center;
  white-space: nowrap;
  border: 1px solid #cfd8e3;
}

th,
td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-right: 1px solid #d6dde7;
  border-bottom: 1px solid #d6dde7;
}

th {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0;
  color: var(--text-secondary);
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

th.active-sort-column {
  color: var(--latam-indigo);
  background: #eaf1fb;
}

td {
  color: var(--text-primary);
  font-size: 0.875rem;
}

tbody tr {
  transition: background-color 0.16s ease;
}

tbody tr:nth-child(even) {
  background: #f8fafc;
}

tbody tr:hover {
  background: #eef6ff;
}

.column-sort-button {
  width: 100%;
  min-height: 43px;
  padding: 0.65rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  white-space: nowrap;
}

.column-sort-button:hover {
  color: var(--latam-indigo);
  background: rgba(255, 255, 255, 0.5);
}

.column-sort-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(227, 24, 55, 0.18);
  outline-offset: -3px;
}

.sort-icons {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 0.57rem;
  line-height: 1;
}

.sort-icon {
  color: #aeb8c5;
  opacity: 0.62;
  transform: translateY(1px);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 -1px 0 rgba(15, 23, 42, 0.28);
  transition:
    color 0.16s ease,
    opacity 0.16s ease,
    transform 0.16s ease,
    text-shadow 0.16s ease;
}

.sort-icon.active {
  color: var(--latam-red);
  opacity: 1;
  transform: translateY(-1px);
  text-shadow: 0 2px 4px rgba(227, 24, 55, 0.32);
}

.align-center {
  text-align: center;
}

.align-right {
  text-align: right;
}

.empty-state {
  padding: 3rem;
  color: var(--text-secondary);
  text-align: center;
  font-size: 0.875rem;
}

.arbotech-signature {
  padding: 0.8rem 1.5rem;
  color: #8a94a3;
  background: linear-gradient(180deg, #f7f9fc 0%, #edf1f6 100%);
  border-top: 1px solid var(--border-color);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 -1px 0 rgba(15, 23, 42, 0.18);
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.1);
}

.arbotech-signature strong {
  color: #6f7a8a;
  font-weight: 700;
}

/* ==========================================
   TELA DE LOGIN (LATAM / Arbotech Style)
   ========================================== */
.login-page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 10% 20%, var(--latam-indigo) 0%, #030712 100%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  padding: 2.5rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--latam-indigo);
  margin-bottom: 0.5rem;
}

.login-header h1 span {
  color: var(--latam-red);
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.input-field-group label {
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 0.85rem;
  color: var(--text-secondary);
  pointer-events: none;
  transition: var(--transition);
}

.input-field-group input {
  width: 100%;
  height: 44px;
  padding: 0.5rem 0.85rem 0.5rem 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  background: #f8fafc;
  outline: none;
  transition: var(--transition);
  font-size: 0.9375rem;
}

.input-field-group input:focus {
  border-color: var(--latam-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.15);
}

.input-field-group input:focus + .input-icon-left {
  color: var(--latam-red);
}

.password-toggle-btn {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 4px;
  transition: var(--transition);
}

.password-toggle-btn:hover {
  color: var(--latam-red);
  background-color: rgba(227, 24, 55, 0.05);
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--latam-red);
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.remember-me-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}

.remember-me-checkbox input[type="checkbox"] {
  accent-color: var(--latam-red);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-password-link {
  color: var(--latam-red);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.forgot-password-link:hover {
  color: var(--latam-red-hover);
  text-decoration: underline;
}

.login-error-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #991b1b;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  text-align: left;
  animation: fadeIn 0.2s ease-out;
}

.login-error-alert svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.login-submit-btn {
  width: 100%;
  height: 44px;
  background: var(--latam-red);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(227, 24, 55, 0.2), 0 2px 4px -1px rgba(227, 24, 55, 0.1);
}

.login-submit-btn:hover:not(:disabled) {
  background: var(--latam-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -2px rgba(227, 24, 55, 0.25), 0 3px 6px -2px rgba(227, 24, 55, 0.15);
}

.login-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-footer-sig {
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8125rem;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.login-footer-sig strong {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.auth-checking-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-color);
  gap: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.logout-header-button {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  min-height: 32px !important;
  padding: 0.4rem 0.8rem !important;
  font-size: 0.8125rem !important;
  transition: var(--transition);
}

.logout-header-button:hover {
  background: var(--latam-red) !important;
  color: #ffffff !important;
  border-color: var(--latam-red) !important;
  box-shadow: 0 2px 8px rgba(227, 24, 55, 0.3) !important;
}

/* ==========================================
   MODAL DE AVISO CUSTOMIZADO (Esqueci Senha)
   ========================================== */
.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

.custom-modal-card {
  width: 90%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--latam-indigo);
}

.custom-modal-body p {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.custom-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.custom-modal-footer .btn {
  min-height: 38px;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  border-radius: 6px;
  cursor: pointer;
}

