/* ========== DASHBOARD-SPEZIFISCHE STILE ========== */

/* Navigation */
.dashboard-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dashboard-nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s;
}

body.light .dashboard-nav a {
  background: rgba(0, 0, 0, 0.1);
  color: #222;
}

.dashboard-nav a:hover {
  background: rgba(255, 102, 0, 0.2);
}

.dashboard-nav a.active {
  background: #ff6600;
  color: #fff;
}

body.light .dashboard-nav a.active {
  background: #ff6600;
  color: #fff;
}

/* Dashboard Header */
.dashboard-header {
  text-align: center;
  margin-bottom: 30px;
}

.dashboard-header h1 {
  font-size: 2.2em;
  margin-bottom: 10px;
  color: #ff6600;
}

.dashboard-header .subtitle {
  font-size: 1.1em;
  opacity: 0.8;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: stretch;
}

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

/* Card Styles (erweitert) */
.card {
  background: #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fadeIn 0.5s ease-out;

  height: 100%;
}

body.light .card {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.light .card-header {
  background: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-header h2 {
  margin: 0;
  font-size: 1.2em;
  color: #ff9900;
}

/* Stats Grid (erweitert) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

body.light .stat-item {
  background: rgba(0, 0, 0, 0.04);
}

.stat-label {
  font-size: 0.85em;
  opacity: 0.7;
  margin-bottom: 5px;
}

.stat-value {
  font-size: clamp(1rem, 1.8vw, 1.5em);
  font-weight: bold;
  color: #4CAF50;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

/* Rewards Grid */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.reward-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

body.light .reward-item {
  background: rgba(0, 0, 0, 0.04);
}

.reward-label {
  font-size: 0.85em;
  opacity: 0.7;
  margin-bottom: 5px;
}

.reward-value {
  font-size: 1.3em;
  font-weight: bold;
  color: #FFD700;
}

/* Progress Bar */
.progress-container {
  margin-top: 20px;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6600, #ff9900);
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.9em;
  opacity: 0.8;
  text-align: center;
}

/* Chart Row */
.chart-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.chart-container {
  position: relative;
  height: 300px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 10px;
}

body.light .chart-container {
  background: rgba(0, 0, 0, 0.03);
}

/* Table Container */
.table-container {
  overflow-x: auto;
}

#topAccountsTable {
  width: 100%;
  border-collapse: collapse;
}

#topAccountsTable th,
#topAccountsTable td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.light #topAccountsTable th,
body.light #topAccountsTable td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#topAccountsTable th {
  background: rgba(255, 255, 255, 0.1);
  font-weight: bold;
}

body.light #topAccountsTable th {
  background: rgba(0, 0, 0, 0.05);
}

#topAccountsTable tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

#topAccountsTable a {
  color: #ff9900;
  text-decoration: none;
  font-weight: bold;
}

#topAccountsTable a:hover {
  color: #ffb347;
  text-decoration: underline;
}

#topAccountsTable a:visited {
  color: #ff9900;
}

body.light #topAccountsTable tr:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Footer */
.dashboard-footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  opacity: 0.7;
  font-size: 0.9em;
}

.dashboard-footer a {
  color: #ff6600;
  text-decoration: none;
  margin: 0 5px;
}

.dashboard-footer a:hover {
  text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .rewards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chart-row {
    grid-template-columns: 1fr;
  }
}

.reward-search {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
}

.reward-search input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ff6600;
  background: #1f1f1f;
  color: #fff;
}

.reward-search button {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: #ff6600;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

/* Account Rewards search spacing fix */
.reward-search {
  display: flex;
  gap: 8px;
  padding: 0 14px;
  margin: 14px 0 12px;
  box-sizing: border-box;
}

.reward-search input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.reward-search button {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .reward-search {
    flex-direction: column;
    padding: 0 14px;
  }

  .reward-search input,
  .reward-search button {
    width: 100%;
  }
}

.hidden {
  display: none !important;
}

#powerDownsTable {
  font-size: 20px;
}

#powerDownsTable th {
  font-size: 18px;
  padding: 12px 10px;
}

#powerDownsTable td {
  padding: 12px;
  vertical-align: middle;
}

#powerDownsTable a {
  color: #42d392;
  text-decoration: none;
  font-weight: 600;
}

#powerDownsTable a:hover {
  color: #5df2aa;
  text-decoration: underline;
}

.table-container {
  overflow-x: auto;
}

.pd-active {
  display: inline-block;
  margin-top: 6px;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.pd-finished {
  display: inline-block;
  margin-top: 6px;
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

#powerDownsTable td {
  font-variant-numeric: tabular-nums;
}

.table-container {
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
}

#powerDownsTable {
  min-width: 1100px;
}

#powerDownsTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #252525;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg,#f59e0b,#ff7b00);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(255,140,0,0.4);
}

#powerDownsTable tbody tr:hover {
  background: rgba(255,255,255,0.03);
}