/* Componentes profissionais e modernos - RECONSTRUÍDO */

/* Card */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 0.95rem;
  gap: 8px;
  text-decoration: none;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--text-muted);
}

.btn:active {
  transform: translateY(0);
}

.btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn.primary {
  background: var(--gradient-button);
  color: white;
  border: none;
  box-shadow: var(--shadow-colored);
}

.btn.primary:hover {
  background: var(--gradient-button-hover);
  box-shadow: var(--shadow-lg);
}

.btn.secondary {
  background: var(--bg-secondary);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn.secondary:hover {
  background: var(--bg);
}

.btn.small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

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

.btn.primary-outline:hover {
  background: var(--bg);
}

/* Inputs & Forms */
input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: var(--bg-secondary);
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid.one { grid-template-columns: 1fr; }

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: all 0.3s ease;
}

.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-body {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-2xl);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

/* Pills modernos */
.pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* Row & Space */
.row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.space {
  height: 16px;
}

/* Tabela profissional */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-secondary);
}

.table th {
  background: var(--gradient-nav);
  color: var(--primary);
  font-weight: 700;
  padding: 16px;
  text-align: left;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s ease;
}

.table tbody tr:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

/* List */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* KPI cards */
.kpi {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.kpi .item {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.kpi .item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.kpi .item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.kpi .item:hover::before {
  opacity: 1;
}

/* Auth Specific Styles (Restored) */
.auth-modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-modal-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.auth-modal-subtitle {
  color: var(--text-light);
  font-size: 1rem;
}

.auth-tabs {
  display: flex;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-form .grid.two {
  margin-bottom: 12px;
}

.auth-extra {
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.auth-form.auth-mode-login .auth-extra {
  display: none;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.auth-actions-spacer {
  flex: 1;
}

.auth-hint {
  margin-top: 24px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

.auth-hint.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

/* Validation Feedback */
input.invalid, select.invalid, textarea.invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

input.invalid:focus, select.invalid:focus, textarea.invalid:focus {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4) !important;
}
