/* ============================================================
   ArenaFoot Community â€” Components
   Sincronizado com arenafoot-soul.css
   ============================================================ */

/* === Button === */
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius-sm);
  font-family: var(--af-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms var(--af-ease-out),
    filter 140ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--ui-accent);
  color: #fff;
  border: 1px solid transparent;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--af-line-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ui-accent) 9%, var(--bg-input));
  border-color: color-mix(in srgb, var(--ui-accent) 50%, var(--af-line-strong));
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  border: 1px solid transparent;
}

.btn-danger:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btn-sm {
  min-height: 30px;
  padding: var(--space-1) var(--space-3);
  font-size: 11px;
}

.btn-lg {
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  font-size: 13px;
}

/* === Form === */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-family: var(--af-data);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-label .required {
  color: var(--color-danger);
}

.form-input, input[type='text'], input[type='number'], input[type='search'], select, textarea {
  width: 100%;
  min-height: 38px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--af-line-strong);
  border-radius: var(--border-radius-sm);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--af-body);
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:hover, input:hover, select:hover, textarea:hover {
  border-color: color-mix(in srgb, var(--ui-accent) 35%, var(--af-line-strong));
}

.form-input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent) 16%, transparent);
}

.form-input.is-invalid {
  border-color: var(--color-danger);
}

.form-error {
  font-size: var(--text-sm);
  color: var(--color-danger);
  font-weight: 600;
}

.form-helper {
  font-size: 10px;
  color: var(--text-muted);
}

textarea.form-input {
  min-height: 100px;
  resize: vertical;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23929ba3' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

/* === Card === */
.card, .panel, .section-card {
  background: color-mix(in srgb, var(--bg-card) 96%, transparent);
  border: 1px solid var(--af-line);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 18px;
  transition: border-color 160ms ease, box-shadow 180ms ease;
}

.card-hover:hover {
  border-color: var(--af-line-strong);
}

.card-header {
  min-height: 28px;
  margin: -2px 0 14px;
  padding: 0 0 8px 12px;
  border-bottom: 1px solid var(--af-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: var(--af-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.card-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 8px;
  width: 3px;
  background: var(--ui-accent);
}

/* Card com faixa verde no topo */
.card-featured {
  border-top: 3px solid var(--ui-accent);
}

/* === Badge === */
.badge, .status-badge, .chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 3px;
  font-family: var(--af-data);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  line-height: 1;
}

.badge-primary {
  background: color-mix(in srgb, var(--ui-accent) 15%, transparent);
  color: var(--ui-accent);
  border: 1px solid color-mix(in srgb, var(--ui-accent) 40%, transparent);
}

.badge-accent {
  background: color-mix(in srgb, var(--color-accent) 15%, transparent);
  color: var(--color-accent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-muted);
  border: 1px solid var(--af-line);
}

/* === Tabs === */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--af-line-strong);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  padding: var(--space-3) var(--space-4);
  font-family: var(--af-data);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease;
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.025);
}

.tab.active {
  color: var(--ui-accent);
  border-bottom-color: var(--ui-accent);
}

/* === Toast === */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--space-4));
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 380px;
  width: 100%;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--af-line-strong);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  animation: slideIn var(--duration-normal) var(--ease-out);
}

.toast-success { border-left: 3px solid var(--ui-accent); }
.toast-error { border-left: 3px solid var(--color-danger); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-info { border-left: 3px solid var(--color-info); }

.toast-message {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: var(--space-1);
  line-height: 1;
}

.toast-close:hover { color: var(--text-main); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* === Empty State === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.empty-state-title {
  font-family: var(--af-display);
  font-size: var(--text-xl);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.empty-state-text {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: var(--space-5);
  line-height: 1.6;
}

/* === Skeleton === */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-input) 25%,
    var(--bg-surface) 50%,
    var(--bg-input) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius-sm);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* === Modal === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 6, 0.7);
  backdrop-filter: blur(5px);
  z-index: var(--z-modal-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--af-line-strong);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform-origin: center;
  animation: modalEnter 220ms var(--af-ease-out) both;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-bottom: 1px solid var(--af-line);
}

.modal-title {
  font-family: var(--af-display);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-body { padding: var(--space-4); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4);
  border-top: 1px solid var(--af-line);
}

/* === Table === */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--af-line);
  border-radius: var(--border-radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 32px;
  padding: 7px 10px;
  background: color-mix(in srgb, var(--bg-deep) 78%, var(--bg-card));
  color: var(--text-muted);
  border-bottom: 1px solid var(--af-line-strong);
  font-family: var(--af-data);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
}

.table td {
  height: 34px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--af-line);
  text-align: left;
}

.table tr {
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.table tr:hover td {
  background-color: color-mix(in srgb, var(--ui-accent) 7%, transparent);
  box-shadow: inset 2px 0 0 var(--ui-accent);
}

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

/* === Pagination === */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 var(--space-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--af-line);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all 120ms ease;
}

.pagination-btn:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-main);
}

.pagination-btn.active {
  background: var(--ui-accent);
  color: var(--color-ink-inverse);
  border-color: var(--ui-accent);
}

/* === Alert === */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 500;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

/* === Like Button Box (FootSim style joinhas) === */
.like-button-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface-sunken);
  padding: var(--space-2) 0;
  width: 48px;
  height: 56px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  color: var(--color-ink-secondary);
  gap: 6px;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: -0.4px;
  box-shadow: var(--shadow-sm);
  outline: none;
  user-select: none;
}

.like-button-box:hover {
  border-color: var(--color-border-strong);
  color: var(--color-ink);
  background-color: var(--color-surface-raised);
  transform: translateY(-1px);
}

.like-button-box.liked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-ink-inverse);
  box-shadow: 0 4px 12px oklch(0.55 0.18 145 / 0.3);
}

.like-button-box.liked svg {
  fill: currentColor;
  stroke: currentColor;
}

/* === VoteBox (estilo joinha do jogo) === */
.vote-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--af-line-strong);
  border-radius: var(--border-radius);
  background: var(--bg-card);
  padding: var(--space-2) 0;
  width: 56px;
  height: 64px;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  color: var(--text-muted);
  gap: 4px;
  font-family: var(--af-data);
  font-size: var(--text-lg);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  outline: none;
  user-select: none;
}

.vote-box:hover {
  border-color: var(--af-line-strong);
  color: var(--text-main);
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.vote-box.voted {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.vote-box.voted svg {
  fill: currentColor;
  stroke: currentColor;
}

/* === StatusChip === */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--af-data);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.status-chip--open {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.status-chip--closed {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.4);
}

.status-chip--approved {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.status-chip--rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-chip--pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-chip--hot {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* === Timeline === */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--af-line-strong);
}

.timeline-item {
  position: relative;
  padding: var(--space-3) 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--ui-accent);
}

.timeline-item--completed::before {
  background: var(--ui-accent);
}

.timeline-item--active::before {
  background: var(--ui-accent);
  box-shadow: 0 0 0 4px var(--ui-accent-soft);
}

.timeline-time {
  font-family: var(--af-data);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.timeline-content {
  font-size: var(--text-sm);
  color: var(--text-main);
}

/* === ProgressBar === */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--ui-accent);
  border-radius: 3px;
  transition: width var(--duration-normal) var(--ease-out);
}

.progress-bar--warning .progress-bar__fill {
  background: var(--color-warning);
}

.progress-bar--danger .progress-bar__fill {
  background: var(--color-danger);
}

/* === CountdownTimer === */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--af-data);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.countdown-value {
  font-weight: 700;
  color: var(--text-main);
}

.countdown--urgent .countdown-value {
  color: var(--color-danger);
}

/* === Kanban Board === */
.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.kanban-column {
  background: var(--bg-surface);
  border: 1px solid var(--af-line);
  border-radius: var(--border-radius);
  padding: var(--space-3);
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--af-line);
  margin-bottom: var(--space-3);
}

.kanban-column-title {
  font-family: var(--af-display);
  font-size: var(--text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.kanban-column-count {
  font-family: var(--af-data);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 10px;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--af-line);
  border-radius: var(--border-radius-sm);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  transition: border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
  cursor: pointer;
}

.kanban-card:hover {
  border-color: var(--af-line-strong);
  box-shadow: var(--shadow-sm);
}

.kanban-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--af-data);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* === MatchCard (placar de partida) === */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--af-line);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  font-family: var(--af-data);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.match-card-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  text-align: center;
}

.match-card-team {
  font-family: var(--af-display);
  font-size: var(--text-lg);
  font-weight: 800;
  text-transform: uppercase;
}

.match-card-goals {
  font-family: var(--af-display);
  font-size: var(--text-3xl);
  font-weight: 900;
}

.match-card-divider {
  color: var(--text-muted);
  font-size: var(--text-xl);
}

/* === Section Heading === */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.section-heading h2 {
  font-family: var(--af-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}

.section-heading a {
  font-family: var(--af-data);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ui-accent);
}

.section-label {
  color: var(--ui-accent);
  font-family: var(--af-data);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

/* === Light Theme Overrides === */
.light .header,
[data-theme="light"] .header {
  /* Header styles are inherited from CSS variables */
}

.light .card,
.light .panel,
.light .section-card,
[data-theme="light"] .card,
[data-theme="light"] .panel,
[data-theme="light"] .section-card {
  background: var(--bg-card);
  border-color: var(--af-line);
}

.light .card-hover:hover,
[data-theme="light"] .card-hover:hover {
  border-color: var(--af-line-strong);
}

.light .btn-secondary,
[data-theme="light"] .btn-secondary {
  border-color: var(--af-line-strong);
  color: var(--text-main);
}

.light .btn-secondary:hover,
[data-theme="light"] .btn-secondary:hover {
  background: color-mix(in srgb, var(--ui-accent) 10%, var(--bg-card));
  border-color: color-mix(in srgb, var(--ui-accent) 50%, var(--af-line-strong));
}

.light .btn-ghost:hover,
[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
}

.light .form-input,
.light input[type='text'],
.light input[type='number'],
.light input[type='search'],
.light select,
.light textarea,
[data-theme="light"] .form-input,
[data-theme="light"] input[type='text'],
[data-theme="light"] input[type='number'],
[data-theme="light"] input[type='search'],
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: var(--bg-input);
  border-color: var(--af-line-strong);
  color: var(--text-main);
}

.light .badge-neutral,
[data-theme="light"] .badge-neutral {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  border-color: var(--af-line);
}

.light .status-chip--open,
[data-theme="light"] .status-chip--open {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
}

.light .status-chip--closed,
[data-theme="light"] .status-chip--closed {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
  border-color: rgba(107, 114, 128, 0.3);
}

.light .status-chip--approved,
[data-theme="light"] .status-chip--approved {
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.4);
}

.light .status-chip--rejected,
[data-theme="light"] .status-chip--rejected {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.light .status-chip--pending,
[data-theme="light"] .status-chip--pending {
  background: rgba(234, 179, 8, 0.1);
  color: #ca8a04;
  border-color: rgba(234, 179, 8, 0.3);
}

.light .vote-box,
[data-theme="light"] .vote-box {
  background: var(--bg-card);
  border-color: var(--af-line-strong);
  color: var(--text-muted);
}

.light .vote-box:hover,
[data-theme="light"] .vote-box:hover {
  background: var(--bg-elevated);
  color: var(--text-main);
}

.light .vote-box.voted,
[data-theme="light"] .vote-box.voted {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: #fff;
}

.light .kanban-column,
[data-theme="light"] .kanban-column {
  background: var(--bg-surface);
  border-color: var(--af-line);
}

.light .kanban-card,
[data-theme="light"] .kanban-card {
  background: var(--bg-card);
  border-color: var(--af-line);
}

.light .match-card,
[data-theme="light"] .match-card {
  background: var(--bg-card);
  border-color: var(--af-line);
}

.light .progress-bar,
[data-theme="light"] .progress-bar {
  background: var(--bg-input);
}

.light .timeline::before,
[data-theme="light"] .timeline::before {
  background: var(--af-line-strong);
}

.light .timeline-item::before,
[data-theme="light"] .timeline-item::before {
  background: var(--bg-card);
  border-color: var(--ui-accent);
}

.light .timeline-item--completed::before,
[data-theme="light"] .timeline-item--completed::before {
  background: var(--ui-accent);
}

.light .countdown,
[data-theme="light"] .countdown {
  color: var(--text-muted);
}

.light .countdown-value,
[data-theme="light"] .countdown-value {
  color: var(--text-main);
}

/* === Theme Toggle === */
.theme-toggle {
  position: relative;
  min-width: 32px;
}

.theme-icon-dark,
.theme-icon-light {
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease;
}

/* DARK theme (default): show moon, hide sun */
.theme-icon-dark {
  display: block;
}

.theme-icon-light {
  display: none;
}

/* LIGHT theme: hide moon, show sun */
html.light .theme-icon-dark,
html[data-theme="light"] .theme-icon-dark {
  display: none !important;
}

html.light .theme-icon-light,
html[data-theme="light"] .theme-icon-light {
  display: block !important;
}

/* Hover animation */
.theme-toggle:hover .theme-icon-dark,
.theme-toggle:hover .theme-icon-light {
  transform: rotate(15deg);
}

/* Mobile theme toggle */
.mobile-menu-theme {
  padding: var(--space-3) 0;
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--af-line);
}

.theme-toggle-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.theme-label {
  font-size: var(--text-sm);
}

/* Loading state para botões de formulário */
.btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: progress;
}

.btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  vertical-align: middle;
  animation: af-spin 0.7s linear infinite;
}

@keyframes af-spin {
  to { transform: rotate(360deg); }
}

/* Alerta de erro em formulários */
.alert-error {
  background: var(--color-danger-bg, rgba(220, 38, 38, 0.1));
  color: var(--color-danger, #dc2626);
  border: 1px solid currentColor;
  border-radius: var(--radius, 8px);
  padding: var(--space-3, 12px);
  margin-bottom: var(--space-4, 16px);
  font-size: var(--text-sm);
}

.table-container {
  -webkit-overflow-scrolling: touch;
}

.table-container > .table {
  min-width: 600px;
}
