/* ==========================================================================
   W3PAY.COM.BR - MERCHANT DASHBOARD STYLES (LIGHT SILVERY W3 THEME)
   Full merchant management portal styled in the clean W3 identity
   ========================================================================== */

.dashboard-view {
  display: none;
  min-height: 100vh;
  background: var(--silver-bg-primary, #f8fafc);
  color: var(--silver-text-main, #0f172a);
}

.dashboard-view.active {
  display: flex;
}

/* Sidebar */
.dash-sidebar {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid var(--silver-card-border, #e2e8f0);
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.25rem;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  box-shadow: 2px 0 15px rgba(15, 23, 42, 0.03);
}

.dash-menu {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-menu-item a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md, 14px);
  color: var(--silver-text-muted, #64748b);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.dash-menu-item.active a, 
.dash-menu-item a:hover {
  background: rgba(0, 210, 133, 0.1);
  color: #008f58;
  border: 1px solid rgba(0, 210, 133, 0.3);
  box-shadow: 0 2px 8px rgba(0, 210, 133, 0.08);
}

/* Main Dashboard Body */
.dash-main {
  margin-left: 260px;
  flex: 1;
  padding: 2.25rem 2.75rem;
  background: #f8fafc;
  min-height: 100vh;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--silver-card-border, #e2e8f0);
}

.dash-merchant-info h2 {
  font-family: var(--font-heading, 'Sora', sans-serif);
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.dash-merchant-info p {
  color: var(--silver-text-muted, #64748b);
  font-size: 0.9rem;
  margin-top: 2px;
}

.environment-badge {
  background: rgba(0, 210, 133, 0.12);
  border: 1px solid rgba(0, 210, 133, 0.3);
  color: #008f58;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.5px;
}

/* Balance & Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--silver-card-border, #e2e8f0);
  border-radius: var(--radius-lg, 20px);
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.metric-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--silver-text-muted, #64748b);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.metric-trend {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
}

.trend-up { color: #008f58; }
.trend-down { color: #ef4444; }

/* Chart Section */
.chart-container-box {
  background: #ffffff;
  border: 1px solid var(--silver-card-border, #e2e8f0);
  border-radius: var(--radius-lg, 24px);
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

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

.chart-header h3 {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Transactions Table */
.tx-table-container {
  background: #ffffff;
  border: 1px solid var(--silver-card-border, #e2e8f0);
  border-radius: var(--radius-lg, 24px);
  padding: 1.75rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  overflow-x: auto;
}

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

.table-header h3 {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 1rem;
  color: var(--silver-text-muted, #64748b);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
}

.custom-table td {
  padding: 1.1rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #0f172a;
}

.custom-table tr:hover td {
  background: rgba(241, 245, 249, 0.6);
}

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

.tx-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.tag-pix {
  background: rgba(0, 210, 133, 0.12);
  color: #008f58;
  border: 1px solid rgba(0, 210, 133, 0.3);
}

.tag-crypto {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.status-dot-success {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00b370;
  display: inline-block;
  margin-right: 4px;
}

@media (max-width: 1024px) {
  .dash-main {
    margin-left: 0;
    padding: 1.5rem;
  }
  .dash-sidebar {
    display: none;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dash-main {
    margin-left: 0;
    padding: 1rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .dash-header h1 {
    font-size: 1.35rem;
  }

  .chart-card,
  .table-card {
    padding: 1rem;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .dash-main {
    padding: 0.85rem;
  }
}
