/* Theme Variables */
:root {
  /* Default Theme: Midnight (current dark) */
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #21262d;
  --border: #30363d;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --green: #3fb950;
  --red: #f85149;
  --yellow: #d29922;
  --purple: #a371f7;
}

/* Theme: Ocean */
[data-theme="ocean"] {
  --bg-dark: #0a192f;
  --bg-card: #112240;
  --bg-hover: #1d3557;
  --border: #233554;
  --text: #ccd6f6;
  --text-muted: #8892b0;
  --accent: #64ffda;
  --green: #64ffda;
  --red: #ff6b6b;
  --yellow: #ffd93d;
  --purple: #bd93f9;
}

/* Theme: Ember */
[data-theme="ember"] {
  --bg-dark: #1a1a2e;
  --bg-card: #16213e;
  --bg-hover: #0f3460;
  --border: #1f4068;
  --text: #eaeaea;
  --text-muted: #a0a0a0;
  --accent: #e94560;
  --green: #00d9a5;
  --red: #e94560;
  --yellow: #ffc107;
  --purple: #9c27b0;
}

/* Theme: Forest */
[data-theme="forest"] {
  --bg-dark: #1b2d1b;
  --bg-card: #243524;
  --bg-hover: #2d4a2d;
  --border: #3d5c3d;
  --text: #d4e6d4;
  --text-muted: #8fa88f;
  --accent: #7cb342;
  --green: #7cb342;
  --red: #ef5350;
  --yellow: #ffca28;
  --purple: #ab47bc;
}

/* Theme: Slate */
[data-theme="slate"] {
  --bg-dark: #1e1e2e;
  --bg-card: #2a2a3c;
  --bg-hover: #363649;
  --border: #45475a;
  --text: #cdd6f4;
  --text-muted: #a6adc8;
  --accent: #89b4fa;
  --green: #a6e3a1;
  --red: #f38ba8;
  --yellow: #f9e2af;
  --purple: #cba6f7;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* P/L Animations */
@keyframes pulse-danger {
  0%, 100% { 
    background-color: rgba(248, 81, 73, 0.3);
    box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.4);
  }
  50% { 
    background-color: rgba(248, 81, 73, 0.5);
    box-shadow: 0 0 20px 5px rgba(248, 81, 73, 0.3);
  }
}

.pl-warning {
  color: var(--red) !important;
  font-weight: bold;
}

.pl-danger {
  color: var(--red) !important;
  font-weight: bold;
  animation: pulse-danger 1.5s ease-in-out infinite;
  border-radius: 4px;
  padding: 2px 6px;
}

.pl-card-warning {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(248, 81, 73, 0.15) 100%) !important;
  border-color: var(--red) !important;
}

.pl-card-danger {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(248, 81, 73, 0.25) 100%) !important;
  border-color: var(--red) !important;
  animation: pulse-danger 2s ease-in-out infinite;
}

/* Login Screen (Modal Overlay) */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.login-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.login-box {
  position: relative;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
  width: 320px;
  z-index: 1;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.login-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.login-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.login-box h1 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-dark);
  color: var(--text);
  font-size: 1rem;
}

.login-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-box > button:not(.login-close) {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.login-box > button:not(.login-close):hover {
  opacity: 0.9;
}

.error {
  color: var(--red);
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Dashboard */
.dashboard {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  position: sticky;
  top: 0;
  background: var(--bg-dark);
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  font-size: 1.5rem;
}

.brand-icon.anor-logo {
  font-size: 3rem;
  width: 48px;
  height: 48px;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-link.active {
  background: var(--accent);
  color: white;
}

.nav-icon {
  font-size: 1.1rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Selector */
.theme-selector {
  position: relative;
}

.theme-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-btn:hover {
  background: var(--border);
}

.theme-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  min-width: 140px;
  z-index: 1000;
  display: none;
}

.theme-dropdown.show {
  display: block;
}

.theme-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.85rem;
}

.theme-option:hover {
  background: var(--bg-hover);
}

.theme-option.active {
  background: var(--accent);
  color: white;
}

/* Pages */
.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* Legacy header (for backwards compatibility) */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 1.5rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.status-dot.connected {
  background: var(--green);
}

.btn-logout {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
}

.btn-logout:hover {
  background: var(--bg-hover);
}

/* Grid Layout - 2 rows of 3 cards on desktop/tablet */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Tablet: keep 3 columns for 2 rows */
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: single column */
@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.card.wide {
  grid-column: 1 / -1;
}

.card h2 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card h2 .week-label {
  font-size: 0.75rem;
  font-weight: normal;
  color: var(--text-muted);
}

.card h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1rem 0 0.5rem;
}

.badge {
  background: var(--red);
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: normal;
}

/* System Grid */
.system-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

/* Tablet: 3 columns for stats */
@media (max-width: 1200px) {
  .system-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-box {
  background: var(--bg-dark);
  padding: 0.5rem;
  border-radius: 6px;
  text-align: center;
}

.stat-box .label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.stat-box .value {
  font-size: 1rem;
  font-weight: 600;
}

.stat-box.highlight .value {
  color: var(--green);
}

.stat-box.highlight .value.negative {
  color: var(--red);
}

/* Stats Row */
.stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.stats-row .stat-box {
  flex: 1;
  min-width: 100px;
}

/* Lists */
.list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list.scrollable {
  max-height: 200px;
  overflow-y: auto;
}

.list-item {
  background: var(--bg-dark);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-item .meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.list-item .category {
  color: var(--accent);
  font-weight: 500;
}

.list-item .actions {
  display: flex;
  gap: 0.5rem;
}

.list-item button {
  padding: 4px 8px;
  font-size: 0.75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-approve {
  background: var(--green);
  color: white;
}

.btn-reject {
  background: var(--red);
  color: white;
}

/* Twitter */
.twitter-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(63, 185, 80, 0.2);
  color: var(--green);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
}

tr:hover {
  background: var(--bg-hover);
}

.outcome-won { color: var(--green); }
.outcome-lost { color: var(--red); }
.outcome-pending { color: var(--yellow); }

.type-buy { color: var(--green); }
.type-sell { color: var(--red); }

.pl-positive { color: var(--green); }
.pl-negative { color: var(--red); }

td button {
  padding: 4px 8px;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  margin-right: 4px;
}

td button:hover {
  background: var(--bg-hover);
}

td button.delete {
  color: var(--red);
  border-color: var(--red);
}

/* Buttons */
.btn-add {
  padding: 10px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn-add:hover {
  opacity: 0.9;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-bottom: 1.5rem;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-dark);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.modal-actions button {
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.modal-actions button[type="button"] {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.modal-actions button[type="submit"] {
  background: var(--accent);
  border: none;
  color: white;
}

/* Responsive - Mobile First Improvements */
@media (max-width: 768px) {
  .main-nav {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.5rem 0;
  }
  
  .nav-brand {
    flex: 1;
  }
  
  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
  }
  
  /* Trading page header mobile */
  .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }
  
  .trading-account-info {
    font-size: 0.8rem !important;
    gap: 8px !important;
  }
  
  .trading-account-info > span[style*="border"] {
    display: none;
  }
    font-size: 0.85rem;
  }
  
  .nav-text {
    display: none;
  }
  
  .nav-icon {
    font-size: 1.25rem;
  }
  
  .nav-actions {
    gap: 0.5rem;
  }
  
  .theme-btn span:last-child {
    display: none;
  }
  
  .system-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-row {
    flex-direction: column;
  }
  
  .stats-row .stat-box {
    min-width: unset;
  }
  
  /* Mobile card styles */
  .card {
    padding: 1rem;
  }
  
  .card h2 {
    font-size: 1rem;
  }
  
  /* Mobile table → card conversion */
  .mobile-cards .table-wrapper {
    overflow: visible;
  }
  
  .mobile-cards table {
    display: none;
  }
  
  .mobile-cards .card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .mobile-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
  }
  
  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  
  .mobile-card-title {
    font-weight: 600;
    font-size: 1rem;
  }
  
  .mobile-card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.85rem;
  }
  
  .mobile-card-label {
    color: var(--text-muted);
  }
  
  .mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .dashboard {
    padding: 0 0.5rem 0.5rem;
  }
  
  .system-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  
  .stat-box {
    padding: 0.75rem;
  }
  
  .stat-box .label {
    font-size: 0.65rem;
  }
  
  .stat-box .value {
    font-size: 1rem;
  }
  
  .btn-logout {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Posting Schedule Calendar */
.schedule-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.btn-platform {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-platform.twitter {
  background: rgba(29, 161, 242, 0.2);
  color: #1da1f2;
  border: 1px solid #1da1f2;
}

.btn-platform.twitter:hover {
  background: #1da1f2;
  color: #fff;
}

.btn-platform.instagram {
  background: rgba(225, 48, 108, 0.2);
  color: #e1306c;
  border: 1px solid #e1306c;
}

.btn-platform.instagram:hover {
  background: #e1306c;
  color: #fff;
}

.btn-platform.youtube {
  background: rgba(255, 0, 0, 0.2);
  color: #ff6666;
  border: 1px solid #ff0000;
}

.btn-platform.youtube:hover {
  background: #ff0000;
  color: #fff;
}

.btn-platform:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-nav {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-nav:hover {
  background: var(--accent);
  color: #fff;
}

#week-label {
  font-weight: 600;
  color: var(--text);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}

.calendar-grid.five-day {
  grid-template-columns: repeat(5, 1fr);
}

.calendar-day {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  min-height: 100px;
}

.calendar-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.day-header {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 4px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.day-name {
  color: var(--text-muted);
}

.day-date {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 700;
}

.day-counters {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.platform-count {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.platform-count.twitter { background: rgba(29, 161, 242, 0.3); color: #1da1f2; }
.platform-count.instagram { background: rgba(225, 48, 108, 0.3); color: #e1306c; }
.platform-count.youtube { background: rgba(255, 0, 0, 0.3); color: #ff6666; }

.day-posts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scheduled-post {
  font-size: 0.75rem;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  position: relative;
}

.scheduled-post.twitter { background: rgba(29, 161, 242, 0.2); border-left: 3px solid #1da1f2; }
.scheduled-post.instagram { background: rgba(225, 48, 108, 0.2); border-left: 3px solid #e1306c; }
.scheduled-post.youtube { background: rgba(255, 0, 0, 0.2); border-left: 3px solid #ff0000; }

/* Posted vs Scheduled status indicators */
.scheduled-post.is-posted {
  opacity: 0.7;
}

.scheduled-post.is-posted::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.scheduled-post.is-scheduled::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.5);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 6px;
}

.btn-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}

.btn-remove:hover {
  opacity: 1;
  color: var(--red);
}

.post-platform {
  font-weight: 600;
  text-transform: capitalize;
}

.post-time {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.post-content {
  color: var(--text);
  font-size: 0.7rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.post-link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.7rem;
  text-decoration: none;
  font-weight: 500;
}

.post-link:hover {
  text-decoration: underline;
}

.ip-status {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.ip-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--yellow);
}

.status-badge.warning {
  background: var(--yellow);
  color: #000;
}

@media (max-width: 768px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .calendar-grid.five-day {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .schedule-actions {
    flex-direction: column;
  }
  
  .btn-platform {
    width: 100%;
  }
  
  .schedule-header {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  
  #week-label {
    order: -1;
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
  }
  
  .calendar-day {
    min-height: 80px;
    padding: 6px;
  }
  
  .day-header {
    flex-direction: column;
    gap: 2px;
  }
  
  .scheduled-post {
    font-size: 0.7rem;
    padding: 6px;
  }
  
  .post-content {
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* Mobile/Desktop visibility classes */
.mobile-only { display: none; }
.desktop-only { display: flex; }

@media (max-width: 600px) {
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }
  
  /* Mobile day navigation */
  .schedule-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 8px;
  }
  
  #mobile-day-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
  }
  
  /* Mobile day view */
  .mobile-day-view {
    min-height: 150px;
  }
  
  .mobile-day-posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .mobile-no-posts {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 0.95rem;
  }
  
  .mobile-day-posts .scheduled-post {
    font-size: 0.9rem;
    padding: 14px;
    border-radius: 10px;
  }
  
  .mobile-day-posts .post-time {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }
  
  .mobile-day-posts .post-content {
    line-height: 1.4;
  }
  
  .schedule-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-platform {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
  }
  
  .btn-add {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
    margin-top: 1rem;
  }
}

/* Alfred Widget */
.alfred-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.alfred-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-start {
  background: var(--green);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-stop {
  background: var(--red);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.alert-text {
  margin-top: 1rem;
  padding: 0.5rem;
  background: rgba(248, 81, 73, 0.2);
  border-left: 3px solid var(--red);
  color: var(--red);
}

#alfred-duration {
  background: var(--bg-dark);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination-controls label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pagination-controls select {
  background: var(--bg-dark);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
  margin-left: 0.5rem;
  cursor: pointer;
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-nav button {
  background: var(--bg-dark);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.page-nav button:hover:not(:disabled) {
  background: var(--border);
}

.page-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#trades-page-info {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Betting Filters */
.bet-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.bet-filter-group {
  display: flex;
  gap: 0.25rem;
}

.bet-filter-btn {
  padding: 0.4rem 0.75rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.bet-filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.bet-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.bet-sport-select {
  background: var(--bg-dark);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .bet-filters {
    flex-direction: column;
  }
  
  .bet-filter-group {
    width: 100%;
  }
  
  .bet-filter-btn {
    flex: 1;
    text-align: center;
  }
  
  .bet-sport-select {
    width: 100%;
  }
  
  .pagination-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .page-nav {
    width: 100%;
    justify-content: space-between;
  }
}

/* Trading Bots Section - Two column layout */
#bots-section {
  display: grid;
  grid-template-columns: 1fr minmax(250px, 320px);
  gap: 1.5rem;
  align-items: start;
}

#bots-section > h2 {
  display: none; /* Hide section title, leaderboard has its own */
}

@media (max-width: 800px) {
  #bots-section {
    grid-template-columns: 1fr;
  }
}

/* Compact account grid */
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.account-grid .stat-box {
  padding: 0.5rem;
}

.account-grid .stat-box .label {
  font-size: 0.6rem;
}

.account-grid .stat-box .value {
  font-size: 0.9rem;
}

/* Compact bot status */
.bot-status {
  padding: 0.75rem;
}

.bot-status .bot-header {
  margin-bottom: 0.5rem;
}

.bot-status .bot-description {
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.bot-status .bot-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.bot-status .bot-stats .stat-box {
  padding: 0.4rem;
}

.bot-status .bot-stats .stat-box .label {
  font-size: 0.55rem;
}

.bot-status .bot-stats .stat-box .value {
  font-size: 0.8rem;
}

.bot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bot-actions select,
.bot-actions button {
  padding: 0.35rem 0.5rem;
  font-size: 0.7rem;
}

/* Leaderboard takes more space */
#bots-section .leaderboard {
  min-width: 0;
}

.leaderboard h3, .bot-controls h3 {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 1rem;
}

.leaderboard-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.leaderboard-filter .filter-btn {
  padding: 0.35rem 0.75rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.leaderboard-filter .filter-icon {
  width: 14px;
  height: 14px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.leaderboard-filter .filter-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.leaderboard-filter .filter-btn.active {
  background: var(--bg-medium);
  border-color: var(--accent);
  color: var(--text);
}

.leaderboard-filter .filter-btn.active[data-mode="paper"] {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

.leaderboard-filter .filter-btn.active[data-mode="real"] {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.leaderboard .bot-panel {
  margin-top: 1rem;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-dark);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.leaderboard-list.compact .leaderboard-item {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.leaderboard-list.compact .bot-emoji {
  font-size: 1rem;
}

.leaderboard-list.compact .bot-stats-mini {
  font-size: 0.7rem;
}

.leaderboard-item.running {
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(63, 185, 80, 0.2);
}

.leaderboard-item .rank {
  font-weight: bold;
  color: var(--text-muted);
  width: 24px;
}

.leaderboard-item .bot-emoji {
  font-size: 1.25rem;
}

.leaderboard-item .bot-name {
  font-weight: 600;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.leaderboard-item .bot-short-desc {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.8;
}

.leaderboard-item .bot-stats-mini {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.leaderboard-item .bot-pnl {
  font-weight: bold;
  min-width: 80px;
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.leaderboard-item .bot-pnl .pnl-icon {
  width: 14px;
  height: 14px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.leaderboard-item .bot-pnl.positive {
  color: var(--green);
}

.leaderboard-item .bot-pnl.negative {
  color: var(--red);
}

.running-badge {
  background: var(--green);
  color: white;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  animation: pulse 1.5s infinite;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.running-badge .mode-divider {
  margin: 0 4px;
  opacity: 0.7;
}

.running-badge .badge-icon {
  width: 10px;
  height: 10px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.running-badge.paper {
  background: #f59e0b;
  animation: pulse-paper 1.5s infinite;
}

.running-badge.real {
  background: var(--green);
}

@keyframes pulse-paper {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { opacity: 0.9; box-shadow: 0 0 8px 2px rgba(245, 158, 11, 0.3); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.bot-selector {
  margin-bottom: 1rem;
}

.bot-selector label {
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.bot-selector select, #bot-duration {
  background: var(--bg-dark);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Trade Mode Toggle */
.trade-mode-toggle {
  display: inline-flex;
  background: var(--bg-dark);
  border-radius: 6px;
  padding: 3px;
  border: 1px solid var(--border);
}

.trade-mode-toggle input[type="radio"] {
  display: none;
}

.trade-mode-toggle .mode-btn {
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  color: var(--text-muted);
}

.trade-mode-toggle input[type="radio"]:checked + .mode-btn.paper {
  background: #3b82f6;
  color: white;
}

.trade-mode-toggle input[type="radio"]:checked + .mode-btn.live {
  background: #ef4444;
  color: white;
}

.bot-status {
  background: var(--bg-dark);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

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

.bot-header .bot-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.bot-description {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.bot-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bot-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  #bots-section {
    grid-template-columns: 1fr;
  }
  
  .bot-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .bot-actions {
    flex-direction: column;
  }
  
  .bot-actions select,
  .bot-actions button {
    width: 100%;
  }
}

/* Bot badges */
.bot-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.bot-badge.alfred {
  background: rgba(218, 165, 32, 0.2);
  color: #daa520;
}

.bot-badge.kenny {
  background: rgba(255, 87, 34, 0.2);
  color: #ff5722;
}

.bot-badge.manual {
  background: rgba(158, 158, 158, 0.2);
  color: #9e9e9e;
}

/* Account Overview & Positions in Bot Panel */
.bot-panel {
  background: var(--bg-dark);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.bot-panel h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.bot-panel h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0.25rem;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.account-grid .stat-box {
  padding: 0.5rem;
  font-size: 0.85rem;
}

.account-grid .stat-box .label {
  font-size: 0.65rem;
  margin-bottom: 0.25rem;
}

.account-grid .stat-box .value {
  font-size: 0.95rem;
}

.account-loading, .positions-loading {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.account-error {
  color: var(--red);
  font-size: 0.8rem;
  margin: 0.5rem 0;
}

.btn-refresh-mini {
  padding: 4px 8px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  margin-left: 6px;
  opacity: 0.6;
  font-size: 0.75rem;
  transition: color 0.2s;
}

.btn-refresh-mini:hover {
  opacity: 1;
  color: var(--accent);
}

.btn-refresh-mini:active {
  transform: scale(0.9);
}

/* Positions List */
.positions-container {
  display: block;
}

.positions-group {
  margin-bottom: 0.5rem;
}

.positions-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.position-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  background: var(--bg-hover);
  border-radius: 4px;
  font-size: 0.8rem;
}

.pos-symbol {
  font-weight: 600;
  min-width: 50px;
}

.pos-value {
  color: var(--text-muted);
  flex: 1;
  text-align: right;
  margin-right: 0.75rem;
}

.pos-pl {
  font-weight: 600;
  min-width: 50px;
  text-align: right;
}

.no-data {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.5rem;
  text-align: center;
}

/* Compact positions display - horizontal chips */
.positions-group h4 {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.positions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.position-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-hover);
  border-radius: 4px;
  font-size: 0.75rem;
}

/* API Usage */
.api-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.api-filter-btn {
  flex: 1;
  padding: 0.4rem 0.5rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.api-filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.api-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.api-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.api-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-dark);
  border-radius: 6px;
}

.api-name {
  font-size: 0.9rem;
}

.api-count {
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
}

.api-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

.api-total span:last-child {
  font-size: 1.1rem;
  color: var(--green);
}

/* System Health Widget */
.health-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.health-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-dark);
  border-radius: 6px;
}

.health-icon {
  font-size: 0.9rem;
  width: 16px;
  text-align: center;
}

.health-icon.green { color: var(--green); }
.health-icon.red { color: var(--red); }
.health-icon.yellow { color: var(--yellow); }
.health-icon.gray { color: var(--text-muted); }

.health-label {
  flex: 1;
  font-size: 0.9rem;
}

.health-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.health-footer {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
}

/* Mobile-specific bet card view */
@media (max-width: 768px) {
  #betting-section .table-wrapper {
    display: none;
  }
  
  #betting-section .bet-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .bet-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
  }
  
  .bet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  
  .bet-card-title {
    font-weight: 600;
    font-size: 0.95rem;
  }
  
  .bet-card-sport {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 2px 8px;
    background: var(--bg-hover);
    border-radius: 10px;
  }
  
  .bet-card-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.85rem;
  }
  
  .bet-card-label {
    color: var(--text-muted);
  }
  
  .bet-card-pl {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: right;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }
  
  .bet-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }
  
  .bet-card-actions button {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.8rem;
  }
}

@media (min-width: 769px) {
  .bet-cards {
    display: none;
  }
}

/* Monthly Costs Section */
.costs-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.costs-section h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cost-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.cost-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}
.cost-item.total {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white;
}
.cost-item.total .cost-label,
.cost-item.total .cost-value {
  color: white;
  font-weight: 600;
}
.cost-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.cost-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* Athena's Picks Section */
.picks-section {
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(251, 191, 36, 0.05) 100%);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 12px;
}
/* Sport Stats Grid */
.sport-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}

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

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

.sport-stat-item {
  background: var(--bg-dark);
  padding: 0.5rem;
  border-radius: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sport-name {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.sport-record {
  font-size: 0.9rem;
  font-weight: 600;
}

.sport-winrate {
  font-size: 0.75rem;
  color: var(--green);
}

.sport-winrate.negative {
  color: var(--red);
}

/* Bot Run Cards */
.bot-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.bot-cards-grid.asset-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
  .bot-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .bot-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bot-cards-grid.asset-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.bot-run-card {
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.875rem;
  text-align: center;
  transition: all 0.2s ease;
}

.bot-run-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.bot-run-card.positive {
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(63, 185, 80, 0.15);
}

.bot-run-card.negative {
  border-color: var(--red);
  box-shadow: 0 0 12px rgba(248, 81, 73, 0.15);
}

.bot-run-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.bot-run-icon {
  font-size: 1.25rem;
}

.bot-run-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
}

.bot-run-pl {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.25rem 0;
}

.bot-run-card.positive .bot-run-pl {
  color: var(--green);
}

.bot-run-card.negative .bot-run-pl {
  color: var(--red);
}

.bot-run-meta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.bot-run-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.picks-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #fbbf24;
}
.picks-section h3 .icon {
  width: 20px;
  height: 20px;
  color: #fbbf24;
}
.picks-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px;
}
.picks-grid.hammer-grid {
  grid-template-columns: 1fr !important;
}
@media (max-width: 900px) {
  .picks-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 500px) {
  .picks-grid,
  .picks-grid.hammer-grid {
    grid-template-columns: 1fr !important;
  }
}
.picks-empty {
  color: var(--text-muted);
  font-style: italic;
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
}
.pick-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
}
.pick-card .pick-rationale {
  flex: 1;
}
.pick-card .pick-actions {
  margin-top: auto;
}
.pick-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.pick-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.pick-sport {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: white;
}
.pick-confidence {
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 4px;
}
.pick-confidence.high { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.pick-confidence.medium { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.pick-confidence.low { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.pick-score {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
}
.pick-score.excellent { background: rgba(34, 197, 94, 0.25); color: #22c55e; }
.pick-score.good { background: rgba(88, 166, 255, 0.25); color: #58a6ff; }
.pick-score.moderate { background: rgba(251, 191, 36, 0.25); color: #fbbf24; }
.pick-score.low { background: rgba(239, 68, 68, 0.25); color: #ef4444; }
.pick-game {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pick-selection {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.pick-odds {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.pick-rationale {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  min-height: 80px;
}
.pick-actions {
  display: flex;
  gap: 6px;
}
.pick-actions button, .pick-actions .pick-status {
  flex: 1;
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}
.pick-submit {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}
.pick-submit:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
}
.pick-skip {
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border) !important;
}
.pick-skip:hover {
  background: var(--bg-tertiary);
}

/* Pick status badges */
.pick-status {
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.75rem;
  text-align: center;
}
.pick-status.submitted {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.pick-status.skipped {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}
.pick-card.submitted {
  opacity: 0.85;
  border-color: rgba(34, 197, 94, 0.3);
}
.pick-card.skipped {
  opacity: 0.5;
}

/* Hammer plays styling */
#hammer-plays-card {
  border: 1px solid rgba(234, 179, 8, 0.3);
}
#hammer-plays-card h2 {
  color: #eab308;
}
.pick-card.hammer {
  border: 2px solid rgba(234, 179, 8, 0.5);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.05), transparent);
}
.pick-card.hammer .pick-confidence {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000;
}

/* Summary section divider */
.summary-divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0 0.5rem;
}

/* Insights grid */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.insight-item {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}
.insight-item:hover {
  transform: translateY(-2px);
  border-color: var(--text-muted);
}
.insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.insight-icon svg {
  width: 20px;
  height: 20px;
}
.insight-icon.fire { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.insight-icon.trend { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.insight-icon.money { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.insight-icon.calendar { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.insight-icon.clock { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.insight-icon.chart { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }
.insight-content {
  flex: 1;
  min-width: 0;
}
.insight-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.insight-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.insight-value.positive { color: #22c55e; }
.insight-value.negative { color: #ef4444; }
.insight-value.hot { color: #f97316; }
.insight-value.cold { color: #3b82f6; }

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

/* Leaderboard Paper vs Live P/L */
.bot-pnl-split {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.pnl-paper, .pnl-real {
  padding: 2px 6px;
  border-radius: 4px;
}
.pnl-paper {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}
.pnl-paper.positive { color: #86efac; }
.pnl-paper.negative { color: #fca5a5; }
.pnl-real {
  background: rgba(34, 197, 94, 0.15);
}
.pnl-real.positive { color: #22c55e; }
.pnl-real.negative { color: #ef4444; }

/* ============== SECURITY: Lock UI for Unauthenticated Users ============== */

/* Lock icon in buttons */
.lock-icon {
  display: inline-block;
  vertical-align: middle;
  opacity: 1;
  margin-right: 6px;
  color: #fbbf24;
  filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.5));
}

/* Dim buttons with lock icons */
button:has(.lock-icon),
.btn-add:has(.lock-icon),
.btn-primary:has(.lock-icon),
.btn-platform:has(.lock-icon) {
  opacity: 0.7;
  position: relative;
}

/* Alternative for browsers without :has() support */
body.locked .btn-add,
body.locked .btn-primary,
body.locked .btn-platform,
body.locked .btn-start,
body.locked .btn-stop,
body.locked .btn-danger,
body.locked .bot-actions button:not(.btn-refresh-mini),
body.locked .schedule-actions button,
body.locked .pick-actions button,
body.locked .pick-submit,
body.locked .pick-skip,
body.locked .bet-actions button {
  opacity: 0.7;
  border: 1px dashed rgba(251, 191, 36, 0.5) !important;
  position: relative;
}

/* Lock cursor on locked buttons */
body.locked .pick-submit,
body.locked .pick-skip,
body.locked .btn-add,
body.locked .btn-primary {
  cursor: not-allowed;
}

/* Locked button state */
button:has(.lock-icon) {
  cursor: pointer;
  position: relative;
  opacity: 0.85;
}

button:has(.lock-icon)::after {
  content: '🔒 Sign in to unlock';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.95);
  color: #fbbf24;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

button:has(.lock-icon):hover::after {
  opacity: 1;
}

/* Sign In button style */
.btn-logout.sign-in {
  background: var(--accent);
  color: white;
}

/* Locked section overlay - shown over action areas when not authenticated */
.locked-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 50;
  cursor: pointer;
  transition: background 0.2s;
}

.locked-overlay:hover {
  background: rgba(0, 0, 0, 0.7);
}

.locked-overlay-icon {
  width: 48px;
  height: 48px;
  color: #fbbf24;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4));
}

.locked-overlay-text {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.locked-overlay-subtext {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  margin-top: 4px;
}

/* Cards with lockable actions need position relative */
.card.lockable {
  position: relative;
}

/* Hide overlay when authenticated */
body.authenticated .locked-overlay {
  display: none;
}

/* Locked action bar - shows at bottom of sections */
.locked-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  margin-top: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.locked-action-bar:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.5);
}

.locked-action-bar svg {
  width: 18px;
  height: 18px;
  color: #fbbf24;
}

.locked-action-bar span {
  color: #fbbf24;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Hide locked action bar when authenticated */
body.authenticated .locked-action-bar {
  display: none;
}

/* Auth status indicator in nav */
.auth-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-status-badge.locked {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.auth-status-badge.unlocked {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

body.authenticated .auth-status-badge.locked { display: none; }
body:not(.authenticated) .auth-status-badge.unlocked { display: none; }
