/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn--primary {
  background: var(--cyan);
  color: var(--black);
}
.btn--primary:hover:not(:disabled) {
  background: #33d4ff;
  box-shadow: 0 0 16px rgba(0,200,255,0.35);
}

.btn--danger { background: rgba(255,60,60,0.2); color: #ff6b6b; border: 1px solid rgba(255,60,60,0.35); }
.btn--danger:hover:not(:disabled) { background: rgba(255,60,60,0.3); }

.btn--outline {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}
.btn--outline:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

.btn--ghost { background: transparent; color: var(--gray-500); }
.btn--ghost:hover:not(:disabled) { background: var(--gray-200); color: var(--white); }

.btn--sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn--full { width: 100%; }

/* ===== INPUTS ===== */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--white);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,200,255,0.08);
}
.input::placeholder { color: var(--gray-400); }
.textarea { resize: vertical; min-height: 80px; }
.select { cursor: pointer; }
.select option { background: var(--off-white); color: var(--white); }

/* ===== TABELAS ===== */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--cyan);
  border-bottom: 1px solid rgba(0,200,255,0.2);
  background: rgba(0,200,255,0.04);
  font-family: var(--font-heading);
}
tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
tbody tr:hover td { background: rgba(0,200,255,0.04); color: var(--white); }
.table-empty {
  text-align: center;
  color: var(--gray-400);
  padding: 32px !important;
  font-style: italic;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge--red { background: rgba(0,200,255,0.1); color: var(--cyan); }
.badge--gray { background: var(--gray-200); color: var(--gray-500); }
.badge--green { background: rgba(16,232,152,0.1); color: var(--green); }

/* ===== BADGES DE STATUS ===== */
.badge-used {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(16,232,152,0.1);
  color: var(--green);
}
.badge-unused {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--gray-200);
  color: var(--gray-500);
}

.btn--used-on {
  background: rgba(16,232,152,0.1);
  color: var(--green);
  border: 1px solid rgba(16,232,152,0.3);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.btn--used-off {
  background: var(--gray-200);
  color: var(--gray-500);
  border: 1px solid var(--gray-300);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.btn--used-on:hover { background: rgba(16,232,152,0.2); }
.btn--used-off:hover { background: rgba(255,255,255,0.05); color: var(--white); }

/* ===== DIVIDER ===== */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 0; }

/* ===== HISTÓRICO EXPAND ===== */
.history-expand-row td { background: var(--surface) !important; padding: 0 !important; }
.history-expand-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-left: 3px solid var(--cyan);
}
.history-expand-text {
  flex: 1;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--gray-700);
  white-space: pre-wrap;
  max-height: 280px;
  overflow-y: auto;
}
