/* ==========================================================================
   ATS TOKEN ANALYTICS — DASHBOARD STYLES
   Matches design tokens from styles.css
   ========================================================================== */

/* Back to CV Optimizer button */
.btn-back-main {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color-md);
  color: var(--color-text-body);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-back-main:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--color-accent);
  transform: translateX(-2px);
}

/* Statistics Grid */
.metrics-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.metric-dashboard-card {
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.metric-dashboard-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.metric-value {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0.5rem 0;
  letter-spacing: -0.02em;
}

.metric-subtext {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.text-accent {
  color: var(--color-accent) !important;
  text-shadow: 0 0 15px rgba(96, 165, 250, 0.2);
}

.text-success {
  color: var(--color-success) !important;
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Charts Section */
.charts-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .charts-section {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  display: flex;
  flex-direction: column;
}

.full-width-chart {
  grid-column: 1 / -1;
}

.chart-container {
  position: relative;
  height: 240px;
  width: 100%;
}

.chart-container-large {
  position: relative;
  height: 280px;
  width: 100%;
}

/* Exchange Rate Input inside header */
.header-api-key input[type="number"] {
  width: 75px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  padding: 0.15rem 0.4rem;
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-family: var(--font-code);
}

.header-api-key input[type="number"]::-webkit-inner-spin-button {
  opacity: 1;
}

/* Table Card & Content */
.transactions-card {
  padding: 1.5rem;
}

.transactions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.transactions-header .section-title {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.btn-clear {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #F87171;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-clear:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fff;
}

/* Logs Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.78rem;
}

.logs-table th, 
.logs-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.logs-table th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.7rem;
}

.logs-table tbody tr {
  transition: background var(--transition-fast);
}

.logs-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

/* Action Badges */
.action-badge {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.badge-análise {
  background: rgba(129, 140, 248, 0.12);
  color: var(--color-ai);
  border: 1px solid rgba(129, 140, 248, 0.25);
}

.badge-reescrita {
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-mapeamento-vaga {
  background: rgba(56, 189, 248, 0.12);
  color: var(--color-info);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-limpeza-de-vaga {
  background: rgba(245, 158, 11, 0.12);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-sugestao {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.badge-busca {
  background: rgba(20, 184, 166, 0.12);
  color: #2dd4bf;
  border: 1px solid rgba(20, 184, 166, 0.25);
}

.badge-traducao {
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.badge-compra {
  background: rgba(234, 179, 8, 0.12);
  color: #ea9a05;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.badge-bonus {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-default {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* No transactions empty state */
.no-transactions {
  padding: 3.5rem 1.5rem;
  text-align: center;
  display: none;
}

.no-transactions-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.no-transactions p {
  font-size: 0.9rem;
  color: var(--color-text-main);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.no-transactions span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  max-width: 400px;
  display: inline-block;
  line-height: 1.5;
}

/* Responsive Overrides for Dashboard */
@media (max-width: 768px) {
  .system-status-hub {
    display: flex !important;
    width: 100%;
    justify-content: space-between;
    margin-top: 0.5rem;
    gap: 0.5rem;
  }
  .system-status-hub .status-indicator:not(.btn-back-main) {
    display: none !important;
  }
  .header-api-key {
    padding: 0.25rem 0.6rem !important;
  }
  .header-api-key label {
    font-size: 0.6rem !important;
  }
}
