/* PicoFxBot Dashboard Styles — Dark Theme */

/* Match main site font size (UIKit base = .875rem / 14px) */
#dashboard-sidebar,
#dashboard-main {
  font-size: .875rem;
  line-height: 1.5;
}

#dashboard-main h3 { font-size: 1.15rem; color: #fff; }
#dashboard-main h4 { font-size: 1rem; color: #fff; }
#dashboard-main strong { font-weight: 600; color: #fff; }
#dashboard-main p { color: rgba(255,255,255,0.6); }

/* Sidebar — dark glass */
#dashboard-sidebar {
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  z-index: 100;
  overflow-y: auto;
  background: #0d1117;
  border-right: 1px solid rgba(255,255,255,0.06);
}

#dashboard-sidebar .uk-logo {
  display: block;
  padding: 20px 0;
}

#dashboard-sidebar .uk-nav > li > a {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  margin: 2px 0;
  font-size: 0.85rem;
  transition: all 0.2s;
}

#dashboard-sidebar .uk-nav > li > a:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255, 255, 255, 0.04);
}

#dashboard-sidebar .uk-nav > li.uk-active > a {
  color: #fff;
  background: rgba(59, 210, 151, 0.1);
}

#dashboard-sidebar .uk-nav > li.uk-active > a i {
  color: #3BD297;
}

#dashboard-sidebar .uk-nav > li > a i {
  width: 20px;
  margin-right: 10px;
  text-align: center;
}

/* Main content area */
#dashboard-main {
  margin-left: 240px;
  min-height: 100vh;
  background: #0a0e17;
  color: rgba(255,255,255,0.7);
}

/* Top bar */
.dashboard-topbar {
  background: rgba(13,17,23,0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.dashboard-topbar h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
}

/* Dashboard cards */
.dash-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.dash-card:hover {
  border-color: rgba(255,255,255,0.1);
}

.dash-card .card-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dash-card .card-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.dash-card .card-value.positive { color: #3BD297; }
.dash-card .card-value.negative { color: #e74c3c; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.active { background: rgba(59,210,151,0.15); color: #3BD297; }
.status-badge.paused { background: rgba(243,156,18,0.15); color: #f39c12; }
.status-badge.stopped { background: rgba(231,76,60,0.15); color: #e74c3c; }
.status-badge.connected { background: rgba(59,210,151,0.15); color: #3BD297; }
.status-badge.disconnected { background: rgba(231,76,60,0.15); color: #e74c3c; }

/* Tables */
.dash-table {
  width: 100%;
  border-collapse: collapse;
}

.dash-table th {
  background: rgba(255,255,255,0.03);
  padding: 10px 12px;
  text-align: left;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dash-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}

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

.profit-positive { color: #3BD297; font-weight: 600; }
.profit-negative { color: #e74c3c; font-weight: 600; }

/* Loading spinner */
.dash-loading {
  text-align: center;
  padding: 60px;
  color: rgba(255,255,255,0.35);
}

.dash-loading .spinner {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #3BD297;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Empty state */
.dash-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.3);
}

.dash-empty i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

/* UIKit overrides for dark theme */
.uk-card-default {
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  color: #fff !important;
}

.uk-input, .uk-select, .uk-textarea {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}

.uk-input:focus, .uk-select:focus, .uk-textarea:focus {
  border-color: rgba(59,210,151,0.4) !important;
}

.uk-form-label { color: rgba(255,255,255,0.55) !important; }
.uk-alert-danger { background: rgba(231,76,60,0.1) !important; color: #e74c3c !important; border: 1px solid rgba(231,76,60,0.2) !important; }
.uk-text-muted { color: rgba(255,255,255,0.4) !important; }
.uk-text-small { color: rgba(255,255,255,0.5) !important; }
.uk-button-default { background: rgba(255,255,255,0.06) !important; color: rgba(255,255,255,0.7) !important; border-color: rgba(255,255,255,0.1) !important; }
.uk-button-primary { background: linear-gradient(135deg, #3BD297, #2ecc71) !important; color: #0a0e17 !important; }
.uk-button-danger { background: rgba(231,76,60,0.2) !important; color: #e74c3c !important; }
hr { border-color: rgba(255,255,255,0.06) !important; }

/* Account link form */
.link-form .step { display: none; }
.link-form .step.active { display: block; }

.link-form .step-indicator {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.link-form .step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.link-form .step-dot.active { background: #FCB42D; color: #0a0e17; }
.link-form .step-dot.done { background: #3BD297; color: #fff; }

/* Responsive: mobile */
@media (max-width: 960px) {
  #dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: 200;
  }

  #dashboard-sidebar.show {
    transform: translateX(0);
  }

  /* Dark overlay behind sidebar */
  #sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
    backdrop-filter: blur(2px);
  }
  #sidebar-overlay.show { display: block; }

  /* Close button inside sidebar */
  .sidebar-close-btn {
    display: flex !important;
  }

  #dashboard-main {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: inline-block !important;
  }
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: rgba(255,255,255,0.6);
  padding: 5px;
}

.sidebar-close-btn {
  display: none;
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); font-size: 0.9rem;
  align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; z-index: 10;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }


/* Notification toast */
.dash-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.dash-toast.success { background: #3BD297; }
.dash-toast.error { background: #e74c3c; }

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

/* Dash table wrapper scrollable */
.dash-table-wrap { overflow-x: auto; }
