/* ==============================================================
   STAR STOCKS: STRUCTURE & CORE STYLES
============================================================== */

/* ===== Error Messages ===== */
.error-message {
  background: #fee;
  border: 1px solid #fcc;
  color: #c33;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin: 2rem auto;
  max-width: 600px;
  font-weight: 500;
}

/* ===== Loading Indicator ===== */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
  color: var(--color-text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007BFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-indicator.hidden {
  display: none;
}

/* ===== Force Override CSS Loading States ===== */
body {
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.css-loading {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.css-loading * {
  pointer-events: auto !important;
}

/* ===== Hide Any Loading Bars ===== */
/* Hide any fixed positioned bars at the top */
div[style*="position: fixed"][style*="top: 0"][style*="width: 100%"],
div[style*="position: fixed"][style*="top: 0"][style*="height: 3px"],
div[style*="position: fixed"][style*="top: 0"][style*="height: 4px"],
div[style*="position: fixed"][style*="top: 0"][style*="height: 5px"] {
  display: none !important;
}

/* Hide any elements with blue background at the top */
[style*="background: #007BFF"], 
[style*="background-color: #007BFF"],
[style*="background: #007bff"],
[style*="background-color: #007bff"] {
  display: none !important;
}

/* Hide any loading animations */
[style*="animation: css-loading"],
[style*="animation: loading"] {
  display: none !important;
}

/* Hide any progress bars at the top */
progress[style*="position: fixed"],
progress[style*="top: 0"] {
  display: none !important;
}

/* ===== Partial Sales Section ===== */
#partial-sales-totals-row {
  display: flex;
  justify-content: space-around;
  margin: var(--spacing-lg) 0;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.partial-sales-total-box {
  background: var(--color-white);
  border-radius: var(--border-radius-m);
  box-shadow: var(--drop-shadow-1);
  padding: var(--spacing-md);
  text-align: center;
  min-width: 120px;
  flex: 1;
  transition: transform 0.2s ease-out;
}

.partial-sales-total-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--drop-shadow-2);
}

.partial-sales-total-box .total-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-xs);
}

.partial-sales-total-box .total-num {
  font-family: var(--font-code);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text-primary);
}

.partial-sales-total-box .total-num.up {
  color: #22b14c;
}

.partial-sales-total-box .total-num.down {
  color: #e8413a;
}

/* ===== Partial Sales Cards - Using Main Actor Card Styling ===== */
#partial-sales-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  gap: 2rem;
  margin-top: var(--spacing-md);
}

/* Use actor-card styling for partial sales grid view */
.partial-sale-card {
  width: 600px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 24px #0001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  margin: 2rem auto;
  transition: box-shadow 0.25s, height 0.4s cubic-bezier(.4,0,.2,1);
  padding: 1rem;
}

/* When partial sales is in grid view, use same styling as portfolio grid */
#partial-sales-content.grid-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  #partial-sales-content.grid-view {
    grid-template-columns: 1fr !important;
  }
}

.partial-sale-card-header {
  display: flex;
  gap: 1.4rem;
  padding: 1.6rem 1.6rem 0 1.6rem;
  align-items: flex-start;
}

.partial-sale-card-photo {
  width: auto;
  height: 250px;
  object-fit: cover;
  border-radius: 16px;
  background: #f2f2f2;
  box-shadow: 0 2px 10px #0001;
  transition: opacity 0.3s ease;
}

.partial-sale-card-photo.loading {
  opacity: 0.6;
  background: linear-gradient(90deg, #f2f2f2 25%, #e0e0e0 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.partial-sale-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.partial-sale-card-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
}

.partial-sale-card-name {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.partial-sale-card-category-emoji,
.partial-sale-card-special-classification-emoji {
  font-size: 1.4em;
  margin: 0 0.3em;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.partial-sale-card-link {
  color: var(--color-primary);
  font-size: 1.6rem;
  margin-left: 0.3em;
  display: flex;
  align-items: center;
}

.partial-sale-card-stats-row {
  font-family: var(--font-heading);
  margin: 0.45rem 0 0.65rem 0;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.06rem;
  color: #222;
  gap: 1.1em;
  display: flex;
}

.partial-sale-card-stats-row span {
  font-weight: 400;
  color: #555;
  margin-left: 2px;
}

.partial-sale-card-trading {
  font-family: var(--font-code);
  font-size: 1.02rem;
  margin-bottom: 0.6em;
}

.partial-sale-card-trading-row {
  color: #888;
  font-weight: 500;
  line-height: 1.3;
}

.partial-sale-card-trading-row:last-child {
  margin-bottom: 0.3em;
}

.partial-sale-card-statscore-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-heading);
  margin-bottom: 0.3em;
  margin-top: 0.15em;
}

.partial-sale-card-statscore-label {
  font-size: 1.12rem;
  font-weight: 700;
  color: #222;
}

.partial-sale-card-statscore {
  font-size: 2.5rem;
  font-weight: 700;
  color: #178aff;
  letter-spacing: 0.01em;
  line-height: 1;
}

.partial-sale-card-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 1.6rem 1.2rem 1.6rem;
  margin-top: 2rem;
  gap: 2rem;
}

.partial-sale-card-bottom-col {
  flex: 1 1 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.partial-sale-card-bottom-label {
  font-size: 1.13rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #444;
  letter-spacing: 0.02em;
  margin-bottom: 0.14em;
  text-transform: uppercase;
}

.partial-sale-card-bottom-num {
  font-size: 1.0rem;
  font-family: var(--font-code);
  font-weight: 700;
  color: #178aff;
  line-height: 1.1;
}

.partial-sale-card-change .partial-sale-card-bottom-num {
  color: #22b14c;
}

.partial-sale-card-change.down .partial-sale-card-bottom-num {
  color: #e8413a;
}

.partial-sale-card-profit .partial-sale-card-bottom-num {
  color: #22b14c;
}

.partial-sale-card-profit.down .partial-sale-card-bottom-num {
  color: #e8413a;
}

/* Add hover effects to match actor cards */
.partial-sale-card:hover {
  box-shadow: 0 8px 32px #0002;
}

.change-pct {
  font-size: 0.8em;
  font-weight: 500;
  margin-left: 0.3em;
}

.no-partial-sales {
  text-align: center;
  color: var(--color-text-secondary);
  font-style: italic;
  padding: var(--spacing-lg);
}

/* ===== Category Emoji Styles ===== */
.actor-card-category-emoji,
.portfolio-list-category-emoji,
.mobile-portfolio-category-emoji {
  font-size: 1.2em;
  margin: 0 0.3em;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.actor-card-category-emoji {
  font-size: 1.4em;
}

.portfolio-list-category-emoji {
  font-size: 1em;
}


.mobile-portfolio-category-emoji {
  font-size: 1.1em;
}

/* ===== Special Classification Emoji Styles ===== */
.actor-card-special-classification-emoji,
.portfolio-list-special-classification-emoji,
.mobile-portfolio-special-classification-emoji {
  font-size: 1.2em;
  margin: 0 0.3em;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.actor-card-special-classification-emoji {
  font-size: 1.4em;
}

.portfolio-list-special-classification-emoji {
  font-size: 1em;
}

.mobile-portfolio-special-classification-emoji {
  font-size: 1.1em;
}

/* ===== Search Bar ===== */
.search-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) auto;
  max-width: 600px;
}

#search-input {
  flex: 1;
  max-width: 500px;
  padding: var(--spacing-md);
  font-size: var(--font-size-lg);
  border: 1px solid var(--color-third);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--drop-shadow-1);
}

.search-button {
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-md);
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
}

.search-button:hover {
  background: var(--color-secondary);
}

.search-button:disabled {
  background: var(--color-muted, #6c757d);
  cursor: not-allowed;
  opacity: 0.7;
}

.search-button .material-icons {
  font-size: 20px;
}

/* ===== Search Results Grid ===== */
#search-results {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.search-loading {
  text-align: center;
  color: var(--color-secondary);
  font-style: italic;
  padding: var(--spacing-lg);
}

.search-error {
  text-align: center;
  color: var(--color-error, #dc3545);
  padding: var(--spacing-lg);
  background: var(--color-error-bg, #f8d7da);
  border-radius: var(--border-radius-m);
  margin: var(--spacing-md) auto;
  max-width: 400px;
}

.result-card {
  width: 140px;
  cursor: pointer;
  background: var(--color-white);
  border-radius: var(--border-radius-m);
  box-shadow: var(--drop-shadow-1);
  transition: transform 0.2s ease-out;
  text-align: center;
  padding: var(--spacing-sm);
}
.result-card:hover {
  transform: translateY(-4px);
}
.result-card img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-m);
  margin-bottom: var(--spacing-xs);
}

/* ===== Selected Actor Box ===== */
#selected-actor-box {
  background: var(--color-white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--drop-shadow-1);
  padding: var(--spacing-lg);
  max-width: 600px;
  margin: var(--spacing-lg) auto;
  text-align: center;
}
#selected-actor-box img {
  width: 200px;
  height: auto;
  object-fit: cover;
  margin-bottom: var(--spacing-sm);
  box-shadow: var(--drop-shadow-1);
}
#selected-actor-box h2 {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
}
#selected-actor-box div {
  margin-bottom: var(--spacing-xs);
  font-size: var(--font-size-md);
}
#selected-actor-box.hidden {
  display: none !important;
}

/* ===== Buy Button ===== */
.buy-button {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--border-radius-m);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-md);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  margin-top: var(--spacing-md);
  transition: background-color 0.3s ease;
}
.buy-button:hover {
  background: var(--color-secondary);
}

/* ==============================================================
   PORTFOLIO Breakdown
============================================================== */

.portfolio-breakdown-charts {
  display: block;
  margin: 2rem 0;
  max-width: 100%;
}


.breakdown-collapsible-container {
  border: 2px solid #178aff;
  border-radius: 18px;
  box-shadow: 0 4px 16px #0002;
  margin: 2rem auto;
  padding: 0;
  background: #fff;
  max-width: 1000px;
  position: relative;
  transition: box-shadow 0.2s;
}
body.dark-mode .breakdown-collapsible-container {
  background: #191a1d;
  border-color: #5faeff;
}
.breakdown-header {
  display: flex;
  align-items: center !important;
  justify-content: space-between;
  padding: 1.2rem 1.7rem;
  border-bottom: 1px solid #eee;
  position: relative;
  height: auto;
}

.breakdown-header-title {
  display: flex;
  align-items: center !important;
  flex: 1 1 auto;
}

.breakdown-header-title h2 {
  margin: 0 !important;
  font-size: 1.45rem;
  font-family: var(--font-heading, inherit);
  line-height: 1.1;
}

.breakdown-header-icon {
  display: flex;
  align-items: center !important;
  justify-content: center;
  flex: 0 0 auto;
  height: 100%;
}

.breakdown-toggle-btn {
  display: flex;
  align-items: center !important;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.85rem;
  padding: 0;
  border-radius: 100px;
  color: #178aff;
  transition: background 0.15s;
  margin-left: 0.8em;
  height: auto;
}

.breakdown-toggle-icon {
  display: flex;
  align-items: center !important;
  justify-content: center;
  font-family: "Material Icons", Arial, sans-serif;
  line-height: 1 !important;
  font-size: 1.55em;
  margin: 0 !important;
  padding: 0 !important;
  height: auto;
}

body.dark-mode .breakdown-toggle-btn {
  color: #5faeff;
}
body.dark-mode .breakdown-toggle-btn:hover {
  background: #222c38;
}
.portfolio-breakdown-charts {
  transition: max-height 0.4s cubic-bezier(.4,0,.2,1), opacity 0.28s;
  overflow: hidden;
}
.portfolio-breakdown-charts.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  border: none !important;
}

.breakdown-collapsible-container.collapsed .breakdown-header {
  border-bottom: none !important;
}


/* Ensure the JS toggles .collapsed on the root container as well */





/* ==============================================================
   PORTFOLIO SECTIONS
============================================================== */

/* ===== Portfolio Totals ===== */

#portfolio-totals-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 1.5rem !important;
  justify-content: space-around !important;
  align-items: stretch !important;
  text-align: center;
  margin: 0 0 1.2em 0;
}

/* ===== Manual Update Container ===== */
.manual-update-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1rem;
}

/* Mobile: Stack buttons vertically */
@media (max-width: 768px) {
  .manual-update-container {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem 0.5rem;
  }
  
  .manual-update-container .manual-update-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* ===== Portfolio Controls Row ===== */
.portfolio-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e0e6ed;
}

.portfolio-controls-row .custom-dropdown {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 150px;
}

.manual-update-container .manual-update-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #178aff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.manual-update-container .manual-update-btn:hover {
  background: #0056b3;
}

.manual-update-container .manual-update-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.portfolio-controls-row .manual-update-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #178aff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.portfolio-controls-row .manual-update-btn:hover {
  background: #0056b3;
}

.portfolio-controls-row .manual-update-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#manual-update-status {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
}

/* Portfolio controls are visible by default */
.portfolio-controls-row {
  display: flex;
}

/* Hide portfolio filter dropdown when not in grid view */
#portfolio-content:not(.grid-view) ~ .portfolio-controls-row #portfolio-filter,
#portfolio-content:not(.grid-view) + .portfolio-controls-row #portfolio-filter {
  display: none !important;
}

@media (max-width: 700px) {
  .portfolio-controls-row {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .portfolio-controls-row .custom-dropdown {
    width: 100%;
    max-width: 300px;
  }
  
  .portfolio-controls-row .manual-update-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

#portfolio-content .portfolio-list-table-full {
  margin: 0 auto !important;
  width: auto !important;
  min-width: unset !important;
  max-width: unset !important;
  display: table;
}

/* Remove #portfolio-center-flex and related flexbox rules */
#portfolio-center-flex { display: unset !important; }

@media (max-width: 1400px) {
  #portfolio-content .portfolio-list-table-full {
    min-width: 900px;
  }
}

.portfolio-total-box {
  background: var(--card-bg, #fff);
  border-radius: 1rem;
  box-shadow: 0 2px 8px #0002;
  padding: 1.2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
  flex: 1;
}
.portfolio-total-box .total-label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.4em;
}
.portfolio-total-box .total-num {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-code);
  letter-spacing: 0.02em;
}
.portfolio-total-box .total-num.up {
  color: #22b14c; /* green */
}
.portfolio-total-box .total-num.down {
  color: #e8413a; /* red */
}


body.dark-mode .portfolio-total-box {
  background: #222;
  color: #eee;
  box-shadow: 0 2px 8px #0006;
}
body.dark-mode .portfolio-total-box .total-label {
  color: #9bb0c8;
}

@media (max-width: 700px) {
  #portfolio-totals-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.7rem !important;
  }
  .portfolio-total-box {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem;
    font-size: 0.97em;
  }
  .portfolio-total-box .total-label {
    font-size: 0.97em;
    margin-bottom: 0.25em;
  }
  .portfolio-total-box .total-num {
    font-size: 1.2em;
  }
  
  .last-update-box {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem;
    font-size: 0.97em;
  }
  
  .last-update-box .last-update-label {
    font-size: 0.97em;
  }
  
  .last-update-box .last-update-timestamp {
    font-size: 1.2em;
  }
  
  .cash-box .cash-label {
    font-size: 0.97em;
  }
  
  .cash-box .cash-amount {
    font-size: 1.2em;
  }
}

/* ===== Collapsible Section Headers ===== */
.section-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-dark, #333);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px #0002;
  margin-bottom: 1rem;
  min-height: 60px;
}

.section-header:hover {
  background: var(--color-white, #fff);
  border-color: var(--color-primary, #01b4e4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-header h2 {
  font-family: 'Roboto Slab', serif !important;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 500 !important;
  line-height: 1;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--color-dark, #333);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.toggle-icon {
  font-weight: bold;
  font-size: 1.2em;
  color: #22b14c;
}

.toggle-icon.expanded {
  color: #e8413a;
}

/* ===== Dark Mode for Section Headers ===== */
body.dark-mode .section-header {
  background: var(--color-dark-card, #2d2d2d);
  color: var(--color-light-text, #f0f0f0);
  border-color: var(--color-dark-border, #404040);
}

body.dark-mode .section-header:hover {
  background: var(--color-dark-bg, #1a1a1a);
  border-color: var(--color-primary, #01b4e4);
}

body.dark-mode .section-header h2 {
  color: var(--color-light-text, #f0f0f0);
  padding: 18px 0 0 0;
}

body.dark-mode .toggle-icon {
  color: #22b14c;
}

body.dark-mode .toggle-icon.expanded {
  color: #e8413a;
}



/* ===== Portfolio Main Section ===== */
section#portfolio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  width: 100vw;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 1rem;
  background: transparent;
}
#portfolio-content {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* ===== Portfolio List ===== */
.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* ===== Cash Box ===== */
.portfolio-section {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.cash-box {
  background: var(--card-bg, #fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px #0002;
  margin-bottom: var(--spacing-lg);
  margin-top: var(--spacing-md);
  min-width: 220px;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  text-align: center;
}
.cash-label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: .75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.4em;
}
.cash-amount {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-code);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

/* ===== Investor Dashboard ===== */
.investor-dashboard-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 1.5rem !important;
  justify-content: space-around !important;
  align-items: stretch !important;
  text-align: center;
  margin: 0 0 1.2em 0;
}



#investor-dashboard-overview {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

#investor-dashboard-performance {
  margin-bottom: 2rem;
}

.investor-dashboard-section {
  margin-bottom: 2rem;
}

.investor-dashboard-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.investor-dashboard-box {
  background: var(--card-bg, #fff);
  border-radius: 1rem;
  box-shadow: 0 2px 8px #0002;
  padding: 1.2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
  flex: 1;
  transition: transform 0.2s ease-out;
  cursor: pointer;
}

.investor-dashboard-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px #0004;
}


.investor-dashboard-box .dashboard-label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.4em;
}

.investor-dashboard-box .dashboard-description {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.6em;
  opacity: 0;
  line-height: 1.2;
  letter-spacing: 0.05rem;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.investor-dashboard-box .dashboard-description.visible {
  max-height: 2rem;
  margin-bottom: 0.6em;
}

.investor-dashboard-box .dashboard-value {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-code);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

.investor-dashboard-box .dashboard-value.up {
  color: #22b14c; /* green */
}

.investor-dashboard-box .dashboard-value.down {
  color: #e8413a; /* red */
}



body.dark-mode .investor-dashboard-box {
  background: #222 !important;
  color: #eee !important;
  box-shadow: 0 2px 8px #0006 !important;
}

body.dark-mode .investor-dashboard-box .dashboard-label {
  color: #9bb0c8 !important;
}


body.dark-mode .investor-dashboard-box .dashboard-value {
  color: #eee !important;
}

body.dark-mode .investor-dashboard-box .dashboard-value.up {
  color: #22b14c !important;
}

body.dark-mode .investor-dashboard-box .dashboard-value.down {
  color: #e8413a !important;
}

body.dark-mode .investor-dashboard-section h3 {
  color: #9bb0c8 !important;
}

body.dark-mode .error-message {
  color: #e8413a !important;
  background: rgba(232, 65, 58, 0.1) !important;
  border-color: rgba(232, 65, 58, 0.3) !important;
}

/* Enhanced dark mode styling for Investor Dashboard */
body.dark-mode .investor-dashboard-box:hover {
  background: #2a2a2a !important;
  box-shadow: 0 4px 16px #0008 !important;
  transform: translateY(-1px);
  transition: all 0.2s ease-in-out;
}

/* Mobile Trading Stats - Sleek Single Container */
.mobile-trading-stats-container {
  margin: 1rem 0;
}

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

.mobile-stat-item {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 0.8rem;
  padding: 1rem 0.8rem;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.mobile-stat-item:hover {
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-stat-item.expanded {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding-bottom: 2rem;
}

.mobile-stat-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.mobile-stat-description {
  font-family: var(--font-title);
  font-size: 0.7rem;
  color: var(--color-text-tertiary);
  line-height: 1.3;
  margin-bottom: 0.6rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.mobile-stat-item.expanded .mobile-stat-description {
  opacity: 1;
  max-height: 3rem;
  margin-bottom: 0.6rem;
}

.mobile-stat-value {
  font-family: var(--font-code);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.mobile-stat-value.up {
  color: #22b14c;
}

.mobile-stat-value.down {
  color: #e8413a;
}

/* Dark mode for mobile trading stats */

body.dark-mode .mobile-stat-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .mobile-stat-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .mobile-stat-item.expanded {
  background: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .mobile-stat-description {
  color: rgba(255, 255, 255, 0.6) !important;
}

body.dark-mode .mobile-stat-label {
  color: #9bb0c8 !important;
}

body.dark-mode .mobile-stat-value {
  color: #eee !important;
}

body.dark-mode .mobile-stat-value.up {
  color: #22b14c !important;
}

body.dark-mode .mobile-stat-value.down {
  color: #e8413a !important;
}

/* Mobile responsive styles for investor dashboard */
@media (max-width: 700px) {
  .investor-dashboard-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.7rem !important;
  }
  
  .investor-dashboard-box {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem;
    font-size: 0.97em;
  }
  
  .investor-dashboard-box .dashboard-label {
    font-size: 0.97em;
    margin-bottom: 0.25em;
  }
  
  .investor-dashboard-box .dashboard-value {
    font-size: 1.2em;
  }
  
  .investor-dashboard-box .dashboard-description {
    font-size: 0.6em;
    margin-bottom: 0.4em;
  }
}

/* ===== Last Update Box ===== */
.last-update-box {
  background: var(--card-bg, #fff);
  border-radius: 1rem;
  box-shadow: 0 2px 8px #0002;
  padding: 1.2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
  flex: 1;
  margin-top: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  width: 100%;
}

.last-update-label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: .75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.4em;
}

.last-update-timestamp {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-code);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

/* ===== Update/Refresh Button ===== */

.manual-update-btn .material-symbols-outlined {
  font-size: 1.3em;
  vertical-align: middle;
  margin-right: 0.55em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.manual-update-btn:hover .material-symbols-outlined {
  color: white;
  transition: filter 0.2s;
}
body.dark-mode .manual-update-btn:hover .material-symbols-outlined {
  filter: invert(0) hue-rotate(0deg);
}

/* ==============================================================
   PORTFOLIO CARD (ACTOR) STYLES
============================================================== */

.actor-card {
  width: 600px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 24px #0001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  margin: 2rem auto;
  transition: box-shadow 0.25s, height 0.4s cubic-bezier(.4,0,.2,1);
  padding: 1rem;
}
.actor-card-header {
  display: flex;
  gap: 1.4rem;
  padding: 1.6rem 1.6rem 0 1.6rem;
  align-items: flex-start;
}
.actor-card-photo {
  width: auto;
  height: 250px;
  object-fit: cover;
  border-radius: 16px;
  background: #f2f2f2;
  box-shadow: 0 2px 10px #0001;
  transition: opacity 0.3s ease;
}

.actor-card-photo.loading {
  opacity: 0.6;
  background: linear-gradient(90deg, #f2f2f2 25%, #e0e0e0 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.actor-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.actor-card-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
}
.actor-card-name {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.actor-card-link {
  color: var(--color-primary);
  font-size: 1.6rem;
  margin-left: 0.3em;
  display: flex;
  align-items: center;
}
.actor-card-stats-row {
  font-family: var(--font-heading);
  margin: 0.45rem 0 0.65rem 0;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.06rem;
  color: #222;
  gap: 1.1em;
  display: flex;
}
.actor-card-stats-row span {
  font-weight: 400;
  color: #555;
  margin-left: 2px;
}
.actor-card-trading {
  font-family: var(--font-code);
  font-size: 1.02rem;
  margin-bottom: 0.6em;
}
.actor-card-trading-row {
  color: #888;
  font-weight: 500;
  line-height: 1.3;
}
.actor-card-trading-row:last-child {
  margin-bottom: 0.3em;
}
.actor-card-statscore-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-heading);
  margin-bottom: 0.3em;
  margin-top: 0.15em;
}
.actor-card-statscore-label {
  font-size: 1.12rem;
  font-weight: 700;
  color: #222;
}
.actor-card-statscore {
  font-size: 2.5rem;
  font-weight: 700;
  color: #178aff;
  letter-spacing: 0.01em;
  line-height: 1;
}
.actor-card-chart-btn {
  background: none;
  border: none;
  color: #178aff;
  cursor: pointer;
  margin-left: 0.2em;
  display: flex;
  align-items: center;
  font-size: 1.7rem;
  transition: transform 0.25s;
}

.actor-card-chart-area {
  max-height: 280px;
  transition: max-height 0.45s cubic-bezier(.4,0,.2,1), opacity 0.3s;
  overflow: hidden;
  opacity: 1;
  margin: 1.5rem 1.5rem 0.4em 1.5rem;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.actor-card-chart-area.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  display: none !important;
}
.actor-card-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 1.6rem 1.2rem 1.6rem;
  margin-top: 2rem;
  gap: 2rem;
}
.actor-card-bottom-col {
  flex: 1 1 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.actor-card-bottom-label {
  font-size: 1.13rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #444;
  letter-spacing: 0.02em;
  margin-bottom: 0.14em;
  text-transform: uppercase;
}
.actor-card-bottom-num {
  font-size: 1.0rem;
  font-family: var(--font-code);
  font-weight: 700;
  color: #178aff;
  line-height: 1.1;
}
.actor-card-change .actor-card-bottom-num {
  color: #22b14c;
}
.actor-card-change.down .actor-card-bottom-num {
  color: #e8413a;
}
.actor-card-market-value .actor-card-bottom-num {
  color: #888888;
}
.actor-card-actions {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  margin-top: 1.2em;
}
.actor-card-actions button {
  flex: 1 1 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.88em 0;
  border-radius: 8px;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px #0001;
  transition: background 0.2s, color 0.2s;
}
.actor-card-actions .sell-btn {
  background: #e8413a;
  color: #fff;
  border: 2px solid #c0392b;
}
.actor-card-actions .sell-btn:hover { background: #c0392b; }
.actor-card-actions .buy-btn {
  background: #22b14c;
  color: #fff;
  border: 2px solid #18832f;
}
.actor-card-actions .buy-btn:hover { background: #18832f; }


/* ===== Chart Area ===== */
.chart-controls {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.4rem;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
}

.chart-time-range {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #495057;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 140px;
  font-family: inherit;
}

.chart-time-range:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.chart-time-range:focus {
  background: #007bff;
  border-color: #007bff;
  color: #fff;
  outline: none;
}

.chart-canvas-wrap {
  width: 100%;
  padding: 0;
  margin-top: 0;
  position: relative;
}
.actor-card-chart-area canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  display: block;
}
.chart-canvas-wrap { height: 220px; }
@media (min-width: 601px) {
  .chart-canvas-wrap { height: 280px; }
}



/* ==============================================================
   RESPONSIVE LAYOUTS
============================================================== */

@media (max-width: 900px) {
  #search-input {
    width: 98%;
    font-size: var(--font-size-md);
    padding: var(--spacing-sm);
  }
}

  /* Hide mobile mid row */

.actor-card-mid-row, .mobile-only.actor-card-mid-row {
  display: none !important;
}

@media (max-width: 600px) {
  html, body {
    overflow-x: hidden !important;
  }
  #portfolio-content {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  .actor-card {
    width: 100% !important;
    max-width: 420px !important;
    margin: 1rem auto !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
    float: none !important;
  }

    .actor-card-mid-row.mobile-only {
    display: flex !important;
    flex-direction: column;
    gap: 0.3em;
    padding: 0 1.1em 0.5em 1.1em;
  }
}

/* ==============================================================
   DARK MODE STYLES
============================================================== */

/* ===== Search & Results ===== */
body.dark-mode #search-input {
  background: #181818 !important;
  color: #fff !important;
  border: 1px solid #333 !important;
  box-shadow: none !important;
}
body.dark-mode #search-results .result-card {
  background: #181818 !important;
  color: #fff !important;
  box-shadow: 0 2px 10px #0008;
}
body.dark-mode .result-card:hover {
  background: #222 !important;
  box-shadow: 0 4px 16px #000a;
}

/* ===== Selected Actor Box ===== */
body.dark-mode #selected-actor-box {
  background: #181818 !important;
  color: #fff !important;
  box-shadow: 0 4px 16px #000a;
}

/* ===== Buy & Sell Buttons ===== */
body.dark-mode .buy-button,
body.dark-mode .actor-card-actions .buy-btn {
  background: #22b14c !important;
  color: #fff !important;
  border: 2px solid #18832f !important;
}
body.dark-mode .buy-button:hover,
body.dark-mode .actor-card-actions .buy-btn:hover {
  background: #18832f !important;
  color: #fff !important;
}
body.dark-mode .actor-card-actions .sell-btn {
  background: #e8413a !important;
  color: #fff !important;
  border: 2px solid #c0392b !important;
}
body.dark-mode .actor-card-actions .sell-btn:hover {
  background: #c0392b !important;
}
body.dark-mode .update-btn {
  background: #0a84ff !important;
  color: #fff !important;
  border: 1px solid #0056b3 !important;
}
body.dark-mode .update-btn:hover {
  background: #0056b3 !important;
}

/* ===== Portfolio Containers ===== */
body.dark-mode section#portfolio { background: transparent !important; }
body.dark-mode #portfolio-content { background: none !important; }
body.dark-mode .portfolio-list { background: none !important; }

/* ===== Cash Box ===== */
body.dark-mode .cash-box {
  background: #222 !important;
  color: #eee !important;
  box-shadow: 0 2px 8px #0006 !important;
}
body.dark-mode .cash-label { 
  color: #9bb0c8 !important; 
}
body.dark-mode .cash-amount {
  color: #eee !important;
}

/* ===== Last Update Box Dark Mode ===== */
body.dark-mode .last-update-box {
  background: #222 !important;
  color: #eee !important;
  box-shadow: 0 2px 8px #0006 !important;
}

body.dark-mode .last-update-label {
  color: #9bb0c8 !important;
}

body.dark-mode .last-update-timestamp {
  color: #eee !important;
}

/* ===== Portfolio Controls ===== */
body.dark-mode .manual-update-container .manual-update-btn {
  background: #0a84ff !important;
  color: #fff !important;
}

body.dark-mode .manual-update-container .manual-update-btn:hover {
  background: #0056b3 !important;
}

body.dark-mode .portfolio-controls-row {
  background: #181818 !important;
  border-color: #333 !important;
}

body.dark-mode .portfolio-controls-row .custom-dropdown {
  background: #222 !important;
  color: #fff !important;
  border-color: #444 !important;
}

body.dark-mode .portfolio-controls-row .manual-update-btn {
  background: #0a84ff !important;
  color: #fff !important;
}

body.dark-mode .portfolio-controls-row .manual-update-btn:hover {
  background: #0056b3 !important;
}

body.dark-mode #manual-update-status {
  color: #999 !important;
}

/* ===== Portfolio Cards ===== */
body.dark-mode .actor-card {
  background: #191a1d !important;
  color: #fff !important;
  box-shadow: 0 4px 24px #0007 !important;
  border: 1.5px solid #222 !important;
}

/* ===== Category Emojis in Dark Mode ===== */
body.dark-mode .actor-card-category-emoji,
body.dark-mode .portfolio-list-category-emoji,
body.dark-mode .mobile-portfolio-category-emoji,
body.dark-mode .actor-card-special-classification-emoji,
body.dark-mode .portfolio-list-special-classification-emoji,
body.dark-mode .mobile-portfolio-special-classification-emoji,
body.dark-mode .actor-card-watch-emoji {
  filter: brightness(1.1);
}
body.dark-mode .actor-card-photo { background: #222 !important; box-shadow: 0 2px 10px #0007 !important; }
body.dark-mode .actor-card-name-row,
body.dark-mode .actor-card-name { color: #fff !important; }
body.dark-mode .actor-card-link { color: #5faeff !important; }
body.dark-mode .actor-card-stats-row { color: #e0e6ed !important; }
body.dark-mode .actor-card-stats-row span { color: #8bafd9 !important; }
body.dark-mode .actor-card-trading-row { color: #b9b9b9 !important; }
body.dark-mode .actor-card-statscore-label { color: #fff !important; }
body.dark-mode .actor-card-statscore { color: #5faeff !important; }
body.dark-mode .actor-card-chart-btn { color: #5faeff !important; }
body.dark-mode .chart-controls {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .chart-time-range {
  background: #2d3748 !important;
  color: #e2e8f0 !important;
  border-color: #4a5568 !important;
}

body.dark-mode .chart-time-range:hover {
  border-color: #718096 !important;
  background: #4a5568 !important;
}

body.dark-mode .chart-time-range:focus {
  border-color: #3182ce !important;
  box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.25) !important;
}

body.dark-mode .actor-card-chart-area,
body.dark-mode .chart-canvas-wrap { background: #181a1e !important; border-radius: 10px; }
body.dark-mode .actor-card-chart-area canvas,
body.dark-mode .chart-canvas-wrap canvas { background: #181a1e !important; }
body.dark-mode .actor-card-bottom-label { color: #e0e6ed !important; }
body.dark-mode .actor-card-bottom-num { color: #5faeff !important; }
body.dark-mode .actor-card-change .actor-card-bottom-num { color: #1cd76f !important; }
body.dark-mode .actor-card-change.down .actor-card-bottom-num { color: #ff6565 !important; }
body.dark-mode .actor-card-market-value .actor-card-bottom-num { color: #b9b9b9 !important; }
.actor-card-profit .actor-card-bottom-num.up { color: #22b14c; }
.actor-card-profit .actor-card-bottom-num.down { color: #e8413a; }
body.dark-mode .actor-card-profit .actor-card-bottom-num.up { color: #22b14c !important; }
body.dark-mode .actor-card-profit .actor-card-bottom-num.down { color: #e8413a !important; }


/* ===== Links, Dropdowns, Misc ===== */
body.dark-mode a { color: #5faeff !important; }
body.dark-mode a:visited { color: #a9c5ec !important; }
body.dark-mode select,
body.dark-mode #portfolio-filter {
  background: #181818 !important;
  color: #fff !important;
  border: 1px solid #444 !important;
}

/* ===== Mobile Card in Dark Mode ===== */
@media (max-width: 600px) {
  body.dark-mode .actor-card {
    background: #191a1d !important;
    box-shadow: 0 2px 12px #0008 !important;
    border: 1.5px solid #232323 !important;
  }
  body.dark-mode .actor-card-photo { background: #222 !important; }
}

/* ===== Miscellaneous Dark Mode ===== */
body.dark-mode ::selection { background: #0056b3; color: #fff; }
body.dark-mode .chartjs-tooltip {
  background: #23232b !important;
  color: #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px #000a !important;
  border: 1px solid #2a2a2a !important;
}
body.dark-mode .chartjs-tooltip * { color: #fff !important; }


/* ==============================================================
   SOLD SECTION STYLES
============================================================== */

/* ===== Sold Section Container ===== */
#sold-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: stretch;
  justify-items: center;
}

/* Override for table view - remove width constraints */
#sold-content:not(.grid-view) {
  max-width: unset !important;
  width: 100% !important;
}

/* Override for grid view - match partial sales styling */
#sold-content.grid-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
  max-width: unset !important;
  width: 100% !important;
  margin-top: var(--spacing-md);
}

/* Override card margins in grid view */
#sold-content.grid-view .sold-actor-card {
  margin: 0 !important;
  max-width: unset !important;
}

/* ===== Sold Content Container & View Toggle ===== */
.sold-content-container {
  overflow: visible;
}

.no-sold-actors {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 3rem 2rem;
  background: #f8f9fa;
  border-radius: 18px;
  border: 2px dashed #ddd;
  font-size: 1.1rem;
  max-width: 500px;
  margin: 2rem auto;
}

/* Dark mode for no sold actors */
body.dark-mode .no-sold-actors {
  background: #181818 !important;
  border-color: #444 !important;
  color: #9bb0c8 !important;
}

/* ===== Sold Totals Row ===== */
#sold-totals-row {
  display: flex !important;
  flex-direction: row !important;
  gap: 1.5rem !important;
  justify-content: space-around !important;
  align-items: stretch !important;
  text-align: center;
  margin: 0 0 1.2em 0;
}

.sold-total-box {
  background: var(--card-bg, #fff);
  border-radius: 1rem;
  box-shadow: 0 2px 8px #0002;
  padding: 1.2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
  flex: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sold-total-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px #0004;
}

.sold-total-box .total-label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: .75rem;
  font-weight: 500;
  margin-bottom: 0.4em;
  color: #666;
}

.sold-total-box .total-num {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-code);
  letter-spacing: 0.02em;
}

.sold-total-box .total-num.up {
  color: #22b14c;
}

.sold-total-box .total-num.down {
  color: #e8413a;
}

/* ===== Dark Mode for Sold Totals ===== */
body.dark-mode .sold-total-box {
  background: #222;
  color: #eee;
  box-shadow: 0 2px 8px #0006;
}

body.dark-mode .sold-total-box .total-label {
  color: #9bb0c8;
}

/* ===== Sold Actor Cards ===== */
.sold-actor-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 24px #0001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  margin: 2rem auto;
  transition: box-shadow 0.25s, height 0.4s cubic-bezier(.4,0,.2,1);
  padding: 1rem;
}

.sold-actor-card:hover {
  box-shadow: 0 8px 32px #0002;
}

.sold-actor-card.error {
  border-color: #e8413a;
  background: #fff5f5;
}

.sold-actor-card-error {
  color: #e8413a;
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.5rem;
}

/* ===== Sold Actor Card Header ===== */
.sold-actor-card-header {
  display: flex;
  gap: 1.4rem;
  padding: 1.6rem 1.6rem 0 1.6rem;
  align-items: flex-start;
}

.sold-actor-card-photo {
  width: auto;
  height: 250px;
  object-fit: cover;
  border-radius: 16px;
  background: #f2f2f2;
  box-shadow: 0 2px 10px #0001;
  transition: opacity 0.3s ease;
}

.sold-actor-card-photo.loading {
  opacity: 0.6;
  background: linear-gradient(90deg, #f2f2f2 25%, #e0e0e0 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

.sold-actor-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sold-actor-card-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
}

.sold-actor-card-name {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sold-actor-card-category-emoji,
.sold-actor-card-special-classification-emoji {
  font-size: 1.4em;
  margin: 0 0.3em;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.sold-actor-card-link {
  color: var(--color-primary);
  font-size: 1.6rem;
  margin-left: 0.3em;
  display: flex;
  align-items: center;
}

.sold-actor-card-stats-row {
  font-family: var(--font-heading);
  margin: 0.45rem 0 0.65rem 0;
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 1.06rem;
  color: #222;
  gap: 1.1em;
  display: flex;
}

.sold-actor-card-stats-row span {
  font-weight: 400;
  color: #555;
  margin-left: 2px;
}

/* ===== Trading Info in Header ===== */
.sold-actor-card-trading-info {
  font-family: var(--font-code);
  font-size: 1.02rem;
  margin-top: 0.6em;
}

.sold-actor-card-trading-info .sold-actor-card-trading-header {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sold-actor-card-trading-info .sold-actor-card-trading-row {
  color: #888;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.3em;
}

.sold-actor-card-trading-info .sold-actor-card-trading-row:last-child {
  margin-bottom: 0.3em;
}

/* ===== Sold Actor Card Trading Section ===== */
.sold-actor-card-trading {
  font-family: var(--font-code);
  font-size: 1.02rem;
  margin-bottom: 0.6em;
  padding: 0 1.6rem;
}

.sold-actor-card-trading-header {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sold-actor-card-trading-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.sold-actor-card-buy-info,
.sold-actor-card-sell-info {
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  box-shadow: none;
}

.sold-actor-card-trade-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sold-actor-card-trade-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sold-actor-card-trade-row {
  font-size: 0.85rem;
  color: var(--text-primary, #111);
  padding: 0.3rem 0;
  border-bottom: 1px solid #f0f0f0;
  line-height: 1.4;
}

.sold-actor-card-trade-row:last-child {
  border-bottom: none;
}

.sold-actor-card-trade-date {
  color: #888;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

/* ===== Post-Sale Performance Section ===== */
.sold-actor-card-post-sale {
  background: transparent;
  border-radius: 0;
  padding: 1.2rem 1.6rem;
  margin: 1.5rem 1.6rem;
  border: none;
  box-shadow: none;
}

.sold-actor-card-post-sale-header {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: #495057;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 0.5rem;
}

.sold-actor-card-post-sale-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.sold-actor-card-post-sale-current,
.sold-actor-card-post-sale-change,
.sold-actor-card-post-sale-days {
  background: transparent;
  border-radius: 0;
  padding: 1rem;
  text-align: center;
  border: none;
  box-shadow: none;
  transition: transform 0.2s ease;
}

.sold-actor-card-post-sale-current:hover,
.sold-actor-card-post-sale-change:hover,
.sold-actor-card-post-sale-days:hover {
  transform: none;
  box-shadow: none;
}

.sold-actor-card-post-sale-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sold-actor-card-post-sale-value {
  font-family: var(--font-code);
  font-size: 1.1rem;
  font-weight: 700;
  color: #178aff;
  letter-spacing: 0.02em;
}

.sold-actor-card-post-sale-change.up .sold-actor-card-post-sale-value {
  color: #22b14c;
}

.sold-actor-card-post-sale-change.down .sold-actor-card-post-sale-value {
  color: #e8413a;
}

.post-sale-change-pct {
  font-size: 0.8rem;
  color: #666;
  margin-left: 0.3rem;
  font-weight: 500;
}

/* ===== Chart Section ===== */
.sold-actor-card-chart-section {
  background: transparent;
  border-radius: 0;
  margin: 0 1.6rem 1.5rem 1.6rem;
  border: none;
  box-shadow: none;
}

.sold-actor-card-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: #495057;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sold-actor-card-chart-controls {
  display: flex;
  gap: 0.5rem;
}

.sold-actor-card-chart-btn {
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
}

.sold-actor-card-chart-btn:hover {
  background: #178aff;
  border-color: #178aff;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px #0002;
}

.sold-actor-card-chart-btn .material-icons {
  font-size: 1.2rem;
}

.sold-actor-card-chart-area {
  background: transparent;
  border-radius: 0;
  padding: 1rem;
  border: none;
  box-shadow: none;
  transition: all 0.3s ease;
  overflow: hidden;
  max-height: 450px;
}

.sold-actor-card-chart-area.collapsed {
  max-height: 0;
  padding: 0 1rem;
  margin: 0;
  border: none;
  box-shadow: none;
}

.sold-chart-canvas-wrap {
  position: relative;
  height: 300px;
  width: 100%;
}

.sold-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== Sold Actor Card Bottom Row ===== */
.sold-actor-card-bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 1.6rem 1.2rem 1.6rem;
  margin-top: 2rem;
  gap: 2rem;
}

.sold-actor-card-bottom-col {
  flex: 1 1 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sold-actor-card-bottom-label {
  font-size: 1.13rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #444;
  letter-spacing: 0.02em;
  margin-bottom: 0.14em;
  text-transform: uppercase;
}

.sold-actor-card-bottom-num {
  font-size: 1.0rem;
  font-family: var(--font-code);
  font-weight: 700;
  color: #178aff;
  line-height: 1.1;
}

.sold-actor-card-change .sold-actor-card-bottom-num {
  color: #22b14c;
}

.sold-actor-card-change.down .sold-actor-card-bottom-num {
  color: #e8413a;
}

.sold-actor-card-percent .sold-actor-card-bottom-num,
.sold-actor-card-profit .sold-actor-card-bottom-num {
  color: #22b14c;
}

.sold-actor-card-percent.down .sold-actor-card-bottom-num,
.sold-actor-card-profit.down .sold-actor-card-bottom-num {
  color: #e8413a;
}

/* ===== Mobile Responsive for Sold Cards ===== */
@media (max-width: 900px) {
  #sold-content.grid-view {
    grid-template-columns: 1fr !important;
    max-width: unset !important;
  }
}

@media (max-width: 700px) {
  #sold-totals-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.7rem !important;
  }
  .sold-total-box {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem;
    font-size: 0.97em;
  }
  .sold-total-box .total-label {
    font-size: 0.97em;
    margin-bottom: 0.25em;
  }
  .sold-total-box .total-num {
    font-size: 1.2em;
  }
}

@media (max-width: 600px) {
  .sold-actor-card {
    width: 100% !important;
    max-width: 420px !important;
    margin: 1rem auto !important;
    padding: 0.5rem !important;
    box-sizing: border-box !important;
  }
  
  #sold-content {
    gap: 1.5rem;
  }

  .sold-actor-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1rem 1rem 0 1rem;
  }

  .sold-actor-card-photo {
    height: 200px;
    width: auto;
  }

  .sold-actor-card-name {
    font-size: 1.2rem;
  }

  .sold-actor-card-stats-row {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .sold-actor-card-trading-info {
    margin-top: 0.8em;
  }
  
  .sold-actor-card-trading-info .sold-actor-card-trading-header {
    text-align: center;
    margin-bottom: 0.6rem;
  }

  .sold-actor-card-trading {
    padding: 0 1rem;
  }

  .sold-actor-card-trading-details {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .sold-actor-card-post-sale {
    margin: 1rem 1rem;
  }

  .sold-actor-card-post-sale-content {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .sold-actor-card-chart-section {
    margin: 0 1rem 1rem 1rem;
  }

  .sold-actor-card-chart-header {
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
  }

  .sold-actor-card-chart-controls {
    width: 100%;
    justify-content: center;
  }

  .sold-actor-card-bottom-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0 1rem 1rem 1rem;
    margin-top: 1rem;
  }

  .sold-actor-card-bottom-col {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.25rem 0;
    text-align: center;
  }

  .sold-actor-card-bottom-num {
    font-size: 0.9rem;
  }
}

/* ===== Dark Mode for Sold Section ===== */
body.dark-mode .sold-actor-card {
  background: #191a1d !important;
  box-shadow: 0 4px 24px #0007 !important;
  border: 1.5px solid #222 !important;
}

body.dark-mode .sold-actor-card-photo {
  background: #222 !important;
  box-shadow: 0 2px 10px #0007 !important;
}

body.dark-mode .sold-actor-card.error {
  background: #2a1a1a !important;
  border-color: #e8413a !important;
}

body.dark-mode .sold-actor-card-error {
  color: #ff6565 !important;
}

body.dark-mode .sold-actor-card-name-row,
body.dark-mode .sold-actor-card-name {
  color: #fff !important;
}

body.dark-mode .sold-actor-card-link {
  color: #5faeff !important;
}

body.dark-mode .sold-actor-card-stats-row {
  color: #e0e6ed !important;
}

body.dark-mode .sold-actor-card-stats-row span {
  color: #8bafd9 !important;
}

body.dark-mode .sold-actor-card-trading-info .sold-actor-card-trading-header {
  color: #b9b9b9 !important;
}

body.dark-mode .sold-actor-card-trading-info .sold-actor-card-trading-row {
  color: #b9b9b9 !important;
}

body.dark-mode .sold-actor-card-trading {
  background: transparent;
  border-color: transparent;
}

body.dark-mode .sold-actor-card-trading-header {
  color: #fff;
}

body.dark-mode .sold-actor-card-buy-info,
body.dark-mode .sold-actor-card-sell-info {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.dark-mode .sold-actor-card-trade-label {
  color: #b9b9b9;
}

body.dark-mode .sold-actor-card-trade-row {
  color: #e0e6ed;
  border-color: #333;
}

body.dark-mode .sold-actor-card-trade-date {
  color: #888;
}

/* ===== Dark Mode for Post-Sale Performance ===== */
body.dark-mode .sold-actor-card-post-sale {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.dark-mode .sold-actor-card-post-sale-header {
  color: #e0e6ed;
  border-color: #444;
}

body.dark-mode .sold-actor-card-post-sale-current,
body.dark-mode .sold-actor-card-post-sale-change,
body.dark-mode .sold-actor-card-post-sale-days {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.dark-mode .sold-actor-card-post-sale-label {
  color: #b9b9b9;
}

body.dark-mode .sold-actor-card-post-sale-value {
  color: #5faeff;
}

body.dark-mode .sold-actor-card-post-sale-change.up .sold-actor-card-post-sale-value {
  color: #22b14c;
}

body.dark-mode .sold-actor-card-post-sale-change.down .sold-actor-card-post-sale-value {
  color: #e8413a;
}

body.dark-mode .post-sale-change-pct {
  color: #888;
}

/* ===== Dark Mode for Chart Section ===== */
body.dark-mode .sold-actor-card-chart-section {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.dark-mode .sold-actor-card-chart-header {
  color: #e0e6ed;
}

body.dark-mode .sold-actor-card-chart-btn {
  background: #1a1a1a;
  border-color: #333;
  color: #b9b9b9;
}

body.dark-mode .sold-actor-card-chart-btn:hover {
  background: #5faeff;
  border-color: #5faeff;
  color: #fff;
}

body.dark-mode .sold-actor-card-chart-area {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.dark-mode .sold-actor-card-bottom-col {
  background: #181818;
  border-color: #333;
  box-shadow: 0 1px 4px #0003;
}

body.dark-mode .sold-actor-card-bottom-label {
  color: #e0e6ed;
}

body.dark-mode .sold-actor-card-bottom-num {
  color: #5faeff;
}

body.dark-mode .sold-actor-card-percent .sold-actor-card-bottom-num,
body.dark-mode .sold-actor-card-profit .sold-actor-card-bottom-num {
  color: #22b14c;
}

body.dark-mode .sold-actor-card-percent.down .sold-actor-card-bottom-num,
body.dark-mode .sold-actor-card-profit.down .sold-actor-card-bottom-num {
  color: #e8413a;
}

/* ===== Mobile Dark Mode for Sold Section ===== */
@media (max-width: 600px) {
  body.dark-mode .sold-actor-card {
    background: #191a1d !important;
    box-shadow: 0 2px 12px #0008 !important;
    border: 1.5px solid #232323 !important;
  }
  
  body.dark-mode .sold-actor-card-photo {
    background: #222 !important;
  }
}

/* ===== Portfolio Content Container & View Toggle ===== */
.portfolio-content-container {
  overflow: visible;
}

/* Center the toggle above the table */
.portfolio-view-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

/* Mobile portfolio list - show on tablet and mobile, hide on desktop */
.mobile-portfolio-list {
  display: none;
}

@media (max-width: 900px) {
  .mobile-portfolio-list {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 12px 32px 12px;
    background: none;
  }
  
  .portfolio-list-table-full {
    display: none !important;
  }
}

#portfolio-content:not(.grid-view) .portfolio-list-table-full {
  display: table;
}

@media (max-width: 900px) {
  #portfolio-content:not(.grid-view) .portfolio-list-table-full {
    display: none !important;
  }
  
  /* Ensure mobile portfolio list is visible on tablet and mobile */
  .mobile-portfolio-list {
    display: flex !important;
  }
}

@media (max-width: 700px) {
  .portfolio-view-toggle {
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }
}

/* Scrollable wrapper for wide tables */
.portfolio-list-scroll {
  width: 100%;
  overflow-x: auto;
  display: block;
  margin: 0 auto;
}

/* Table fills the available width of the main container */
.portfolio-list-table-full {
  width: 100%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-code, 'Roboto Mono', monospace);
  font-size: 0.97em;
}
.portfolio-list-table-full th, .portfolio-list-table-full td {
  padding: 0.8em 0.5em;
  vertical-align: middle;
  font-size: 0.9em;
}
.portfolio-list-table-full th {
  font-family: var(--font-heading);
  font-size: 0.9em;
  color: #222;
  font-weight: 700;
  background: #fff;
  letter-spacing: 0.02em;
  text-transform: none;
  border-bottom: 2px solid #eee;
}
.portfolio-list-table-full tbody tr:nth-child(even) {
  background: #fafbfc;
}
.portfolio-list-table-full tbody tr:nth-child(odd) {
  background: #fff;
}

/* Ensure all table cells have consistent styling to prevent visual artifacts */
.portfolio-list-table-full tbody tr td {
  background: inherit;
  border: none;
  padding: 0.75em 0.5em;
}
.portfolio-list-table-full td {
  font-family: var(--font-code, 'Roboto Mono', monospace);
  color: #222;
  vertical-align: middle;
  font-size: 0.9em;
}
.portfolio-list-table-full td:first-child {
  padding: 0 !important;
}

.portfolio-list-actor-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  text-align: center;
  padding: 0.5em 0.2em;
}
.portfolio-list-actor-name {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.5em;
  margin-top: 0.15em;
}
.portfolio-list-starscore {
  font-family: var(--font-code, 'Roboto Mono', monospace);
  font-weight: 700;
  color: #178aff;
  font-size: 0.95em;
  letter-spacing: 0.01em;
}
.portfolio-list-change {
  font-family: var(--font-code, 'Roboto Mono', monospace);
  font-weight: 500;
  font-size: 0.9em;
}
.portfolio-list-change.up {
  color: #22b14c;
}
.portfolio-list-change.down {
  color: #e8413a;
}
.portfolio-list-profit {
  font-family: var(--font-code, 'Roboto Mono', monospace);
  font-weight: 700;
  font-size: 0.9em;
}
.portfolio-list-profit.up {
  color: #22b14c;
}
.portfolio-list-profit.down {
  color: #e8413a;
}
.portfolio-list-table-full td .change-pct {
  font-size: 0.98em;
  margin-left: 0.2em;
}
.portfolio-list-table-full td .change-pct {
  display: inline-block;
}
.portfolio-list-table-full td button {
  font-family: var(--font-heading);
  font-size: 0.85em;
  font-weight: 700;
  padding: 0.4em 0.8em;
  border-radius: 6px;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px #0001;
  transition: background 0.2s, color 0.2s;
  margin-right: 0.2em;
}
.portfolio-list-table-full td .sell-btn {
  background: #e8413a;
  color: #fff;
  border: 2px solid #c0392b;
  margin-right: 0.5em;
}
.portfolio-list-table-full td .sell-btn:hover { background: #c0392b; }
.portfolio-list-table-full td .buy-btn {
  background: #22b14c;
  color: #fff;
  border: 2px solid #18832f;
}
.portfolio-list-table-full td .buy-btn:hover { background: #18832f; }
@media (max-width: 900px) {
  .portfolio-list-table-full th, .portfolio-list-table-full td {
    padding: 0.7em 0.3em;
    font-size: 0.97em;
  }
  .portfolio-list-photo {
    width: 75px;
    height: 100px;
  }
  .portfolio-list-link {
    font-size: 0.25em;
  }
}

.portfolio-toggle-icon {
  font-size: 2.1rem;
  color: #bbb;
  cursor: pointer;
  padding: 0.18em 0.32em;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  user-select: none;
}
.portfolio-toggle-icon.active {
  color: #178aff;
  background: #e8f4ff;
}
.portfolio-toggle-icon:hover {
  background: #e8f4ff;
  color: #178aff;
}
body.dark-mode .portfolio-toggle-icon {
  color: #666;
  background: none;
}
body.dark-mode .portfolio-toggle-icon.active {
  color: #5faeff;
  background: #232c38;
}
body.dark-mode .portfolio-toggle-icon:hover {
  background: #232c38;
  color: #5faeff;
}

/* === Star Stocks List: Full-bleed wide container === */
.star-stocks-list-outer {
  max-width: 1400px;
  min-width: unset;
  width: 100%;
  margin: 2rem auto 2rem auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 24px #0001;
  border: 1.5px solid #e0e6ed;
  display: block;
  padding: 2rem 2.5rem;
  box-sizing: border-box;
  overflow-x: auto;
}

.star-stocks-list-outer .portfolio-list-table-full {
  width: 100%;
  min-width: unset;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .star-stocks-list-outer {
    max-width: 100vw;
    min-width: unset;
    padding: 0.5rem 0.1rem;
  }
  .star-stocks-list-outer .portfolio-list-table-full {
    min-width: unset;
  }
}

/* === Star Stocks Main Container === */
.star-stocks-main {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  box-sizing: border-box;
}

/* === Star Stocks Intro Container === */
.star-stocks-intro {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  box-sizing: border-box;
}

.star-stocks-intro-text {
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  box-sizing: border-box;
}

.star-stocks-intro-text p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.portfolio-list-flex {
  width: 100%;
  margin: 0 auto;
}
.portfolio-list-header-row,
.portfolio-list-row {
  width: 100%;
  min-width: 1200px;
  box-sizing: border-box;
}
.portfolio-list-rows {
  width: 100%;
}
.portfolio-list-header-row {
  font-family: var(--font-heading);
  font-size: 1.05em;
  color: #178aff;
  background: #f8faff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 18px 18px 0 0;
  margin-bottom: 0.7em;
  padding: 1.1em 0.7em;
}
.portfolio-list-rows {
  display: flex;
  flex-direction: column;
  gap: 1.1em;
}
.portfolio-list-row {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px #0001;
  padding: 1.2em 0.9em;
  transition: box-shadow 0.18s, background 0.18s;
  font-size: 1.08em;
}
.portfolio-list-row:hover {
  background: #f8faff;
  box-shadow: 0 4px 16px #0002;
}
.portfolio-list-col {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 0.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portfolio-list-col.actor {
  font-weight: 600;
  font-family: var(--font-heading);
}
.portfolio-list-photo {
  width: 40px;
  height: 50px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 2px 8px #0002;
  margin-right: 0.7em;
}

.portfolio-list-photo-cell {
  text-align: center;
  padding: 0.5em;
  width: 80px;
  vertical-align: middle;
}

.portfolio-list-actor {
  text-align: center;
  padding: 0.5em 0.2em;
  width: 100%;
  vertical-align: middle;
}
.portfolio-list-link {
  display: block;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.08em;
  color: #178aff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.portfolio-list-link:hover {
  color: #0056b3;
}
.portfolio-list-col.profit.up {
  color: #22b14c;
  font-weight: 700;
}
.portfolio-list-col.profit.down {
  color: #e8413a;
  font-weight: 700;
}
.portfolio-list-col.change.up {
  color: #22b14c;
}
.portfolio-list-col.change.down {
  color: #e8413a;
}
.portfolio-list-col.actions {
  gap: 0.5em;
  justify-content: flex-end;
}
.portfolio-list-row button {
  font-family: var(--font-heading);
  font-size: 1.05em;
  font-weight: 700;
  padding: 0.6em 1.1em;
  border-radius: 8px;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px #0001;
  transition: background 0.2s, color 0.2s;
  margin-right: 0.3em;
}
.portfolio-list-row .sell-btn {
  background: #e8413a;
  color: #fff;
  border: 2px solid #c0392b;
}
.portfolio-list-row .sell-btn:hover { background: #c0392b; }
.portfolio-list-row .buy-btn {
  background: #22b14c;
  color: #fff;
  border: 2px solid #18832f;
}
.portfolio-list-row .buy-btn:hover { background: #18832f; }
@media (max-width: 1200px) {
  .portfolio-list-header-row,
  .portfolio-list-row {
    grid-template-columns: 2.2fr 1fr 1.2fr 1.2fr 1.2fr 1.2fr 0.9fr 1fr 0.8fr 1.2fr;
    font-size: 0.97em;
    padding: 0.7em 0.3em;
  }
  .portfolio-list-photo {
    width: 32px;
    height: 32px;
  }
}
@media (max-width: 900px) {
  .portfolio-list-header-row,
  .portfolio-list-row {
    grid-template-columns: 0.8fr 1.8fr 0.8fr 1fr 1fr 1fr 1fr 0.7fr 0.8fr 0.7fr 1fr;
    font-size: 0.95em;
    padding: 0.6em 0.2em;
  }
  .portfolio-list-col {
    padding: 0 0.2em;
  }
  .portfolio-list-rows {
    gap: 0.5em;
  }
  
  .portfolio-list-photo-cell {
    width: 60px;
    padding: 0.3em;
  }
}
@media (max-width: 700px) {
  .portfolio-list-header-row,
  .portfolio-list-row {
    grid-template-columns: 0.7fr 1.5fr 0.7fr 0.8fr 0.8fr 0.8fr 0.8fr 0.6fr 0.7fr 0.6fr 0.9fr;
    font-size: 0.93em;
    padding: 0.4em 0.1em;
  }
  .portfolio-list-col {
    padding: 0 0.1em;
  }
}

.portfolio-list-flex {
  overflow-x: auto;
}

.star-stocks-list-outer-centered {
  margin: 2rem auto;
  max-width: 2000px;
  min-width: 1400px;
  width: fit-content;
  text-align: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px #0001;
  border: 1.5px solid #e0e6ed;
  padding: 2rem 2.5rem;
  box-sizing: border-box;
  overflow-x: auto;
  display: block;
}

.star-stocks-list-outer-centered .portfolio-list-table-full {
  margin: 0 auto;
  width: 100%;
  min-width: 1400px;
  border-collapse: separate;
  border-spacing: 0;
}

@media (max-width: 1400px) {
  .star-stocks-list-outer-centered {
    min-width: unset;
    width: 100vw;
    padding: 1rem 0.5rem;
  }
  .star-stocks-list-outer-centered .portfolio-list-table-full {
    min-width: 900px;
  }
}

.star-stocks-table-center {
  margin-left: auto;
  margin-right: auto;
  display: block;
  max-width: 2000px;
  min-width: 1400px;
  width: fit-content;
  text-align: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px #0001;
  border: 1.5px solid #e0e6ed;
  padding: 2rem 2.5rem;
  box-sizing: border-box;
  overflow-x: auto;
}

.star-stocks-table-center .portfolio-list-table-full {
  margin: 0 auto;
  width: 100%;
  min-width: 1400px;
  border-collapse: separate;
  border-spacing: 0;
}

@media (max-width: 1400px) {
  .star-stocks-table-center {
    min-width: unset;
    width: 100vw;
    padding: 1rem 0.5rem;
  }
  .star-stocks-table-center .portfolio-list-table-full {
    min-width: 900px;
  }
  
  #sold-content .sold-actors-list-table-full {
    min-width: 900px;
  }
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#portfolio-content,
#portfolio-totals-row,
.portfolio-view-toggle {
  width: auto !important;
  min-width: unset !important;
  max-width: unset !important;
  margin: 0 0 1.2em 0;
  text-align: center;
  display: block;
}

#portfolio-content .portfolio-list-table-full {
  margin: 0 auto !important;
  width: auto !important;
  min-width: unset !important;
  max-width: unset !important;
  display: table;
}

#portfolio-content.grid-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  #portfolio-content.grid-view {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  /* Override container width constraints */
  .content-about {
    max-width: none !important;
    padding: 0 1rem !important;
  }
  
  .star-stocks-main {
    max-width: none !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  #portfolio-content.grid-view {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    padding: 0;
    width: 100% !important;
  }
  
  .actor-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }
  
  .actor-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  
  /* Center the name and emojis in mobile grid view */
  .actor-card-name-row {
    justify-content: center;
  }
  
  .actor-card-emojis-row {
    justify-content: center;
  }
  
  .actor-card-photo {
    height: 200px;
    width: auto;
  }
  
  /* Hide the first instance of chart buttons on mobile (desktop layout) */
  .actor-card-header .actor-card-chart-buttons {
    display: none;
  }
  
  /* Move chart buttons to new line below StarScore on mobile */
  .actor-card-statscore-row {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .actor-card-statscore {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  /* Create a new row for chart buttons */
  .actor-card-chart-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .actor-card-chart-btn,
  .actor-card-line-chart-btn,
  .actor-card-sell-strategies-btn {
    font-size: 1.4rem;
    padding: 0.3rem;
    min-width: auto;
  }
  
  /* Ensure buttons are properly sized on mobile */
  .actor-card-chart-buttons .material-icons {
    font-size: 2rem;
  }
  
  /* Add some spacing between the StarScore and chart buttons */
  .actor-card-statscore-row + .actor-card-chart-buttons {
    margin-top: 0.5rem;
  }
  
  /* Responsive chart controls */
  .chart-controls {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .date-range-picker-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .date-range-picker-btn {
    width: 100%;
    max-width: 200px;
    min-width: 110px;
    justify-content: center;
  }
  
  .chart-time-range-btn {
    width: 100%;
    max-width: 200px;
    min-width: 110px;
    text-align: center;
  }
}

/* Additional mobile improvements for chart controls */
@media (max-width: 500px) {
  .chart-controls {
    padding: 0.3rem;
    gap: 0.4rem;
  }
  
  .date-range-picker-container,
  .chart-time-range-container {
    width: 100%;
  }
  
  .date-range-picker-btn,
  .chart-time-range-btn {
    max-width: 160px;
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
}

/* ===== Sortable Table Headers ===== */
.portfolio-list-table-full th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  vertical-align: middle;
}

.portfolio-list-table-full th.sortable .sort-arrow {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4em;
  margin-bottom: 0;
  position: relative;
  top: 0;
}

.portfolio-list-table-full th.sortable:hover {
  background-color: #f0f0f0;
}

body.dark-mode .portfolio-list-table-full th.sortable:hover {
  background-color: #2a2a2a !important;
}

.sort-arrow {
  font-size: 0.9em;
  color: #999;
  transition: color 0.2s ease;
}

.sort-arrow.active {
  color: #178aff;
  font-weight: bold;
}

body.dark-mode .sort-arrow.active {
  color: #5faeff !important;
}

/* ===== Buy/Sell Buttons in Table View ===== */
.portfolio-list-table-full td {
  vertical-align: middle;
}

.portfolio-list-ath {
  text-align: center;
  width: 50px;
}


.portfolio-list-table-full td:last-child {
  white-space: nowrap;
}

.portfolio-list-table-full td .sell-btn,
.portfolio-list-table-full td .buy-btn {
  display: inline-block;
  width: auto;
  min-width: 80px;
  margin: 0 0.2em 0 0;
  vertical-align: middle;
}

.portfolio-list-table-full td .buy-btn {
  margin-right: 0;
}

@media (max-width: 700px) {
  .portfolio-list-table-full td .sell-btn,
  .portfolio-list-table-full td .buy-btn {
    min-width: 60px;
    font-size: 0.95em;
    padding: 0.5em 0.5em;
  }
}

/* ===== Portfolio Table: Dark Mode ===== */
body.dark-mode .portfolio-list-table-full {
  background: #181818 !important;
  color: #e0e6ed !important;
}

body.dark-mode .portfolio-list-table-full th,
body.dark-mode .portfolio-list-table-full td {
  background: #181818 !important;
  color: #e0e6ed !important;
  border-color: #232323 !important;
}

body.dark-mode .portfolio-list-table-full th {
  font-weight: 700;
  color: #5faeff !important;
  background: #191a1d !important;
}

body.dark-mode .portfolio-list-table-full th.sortable:hover {
  background: #232c38 !important;
}

body.dark-mode .portfolio-list-table-full tr {
  background: #181818 !important;
}

body.dark-mode .portfolio-list-table-full tbody tr:nth-child(even) {
  background: #20232a !important;
}

body.dark-mode .portfolio-list-table-full tbody tr:nth-child(odd) {
  background: #181818 !important;
}

/* Ensure dark mode table cells inherit background properly */
body.dark-mode .portfolio-list-table-full tbody tr td {
  background: inherit !important;
}

body.dark-mode .portfolio-list-table-full td .portfolio-list-link {
  color: #5faeff !important;
}

body.dark-mode .portfolio-list-table-full td .portfolio-list-link:hover {
  color: #7bb8ff !important;
}

body.dark-mode .portfolio-list-table-full td .portfolio-list-bought-in,
body.dark-mode .portfolio-list-table-full td .portfolio-list-starscore {
  color: #5faeff !important;
}

body.dark-mode .portfolio-list-table-full td .portfolio-list-change.up,
body.dark-mode .portfolio-list-table-full td .portfolio-list-profit.up {
  color: #22b14c !important;
}

body.dark-mode .portfolio-list-table-full td .portfolio-list-change.down,
body.dark-mode .portfolio-list-table-full td .portfolio-list-profit.down {
  color: #e8413a !important;
}

body.dark-mode .portfolio-list-table-full td .sell-btn {
  background: #e8413a !important;
  color: #fff !important;
  border: 2px solid #c0392b !important;
}

body.dark-mode .portfolio-list-table-full td .sell-btn:hover {
  background: #c0392b !important;
}

body.dark-mode .portfolio-list-table-full td .buy-btn {
  background: #22b14c !important;
  color: #fff !important;
  border: 2px solid #18832f !important;
}

body.dark-mode .portfolio-list-table-full td .buy-btn:hover {
  background: #18832f !important;
}

body.dark-mode .portfolio-list-table-full th.sortable .sort-arrow.active {
  color: #5faeff !important;
}

body.dark-mode .star-stocks-list-outer,
body.dark-mode .star-stocks-list-outer-centered,
body.dark-mode .star-stocks-table-center {
  background: #181818 !important;
  border: 1.5px solid #232323 !important;
  box-shadow: 0 4px 24px #0007 !important;
}

body.dark-mode .portfolio-list-change.up,
body.dark-mode .portfolio-list-profit.up {
  color: #22b14c !important;
}
body.dark-mode .portfolio-list-change.down,
body.dark-mode .portfolio-list-profit.down {
  color: #e8413a !important;
}


@media (max-width: 600px) {
  .cash-box {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    padding: 1.1rem 1rem !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .cash-amount {
    word-break: break-all;
    font-size: 2.1rem !important;
  }
}

@media (max-width: 600px) {
  .actor-card-header {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.7rem !important;
    padding: 1rem 0.5rem 0 0.5rem !important;
  }
  .actor-card-bottom-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    padding: 0 0.5rem 1rem 0.5rem !important;
    margin-top: 1rem !important;
  }
  .actor-card-bottom-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0.25rem 0 !important;
    text-align: center !important;
  }
  .actor-card-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-top: 1rem !important;
  }
  .actor-card-actions button {
    width: 100% !important;
    margin-bottom: 0 !important;
    font-size: 1rem !important;
    padding: 0.7em 0 !important;
  }
}

@media (max-width: 600px) {
  /* Hide duplicate star score and trading info in mobile */
  .actor-card-header .actor-card-trading {
    display: none !important;
  }
  
  /* Hide the entire upper statscore row on mobile */
  .actor-card-header .actor-card-statscore-row {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .chart-controls {
    padding: 4px 6px;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .chart-time-range-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.4rem;
    min-width: 110px;
  }
  
  .actor-card-chart-area {
    margin: 1.2rem 0.2rem 0.5rem 0.2rem !important;
    max-height: 300px !important;
    min-height: 240px !important;
    background: #fff !important;
    border-radius: 10px !important;
    padding: 0.5rem 0.2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .chart-canvas-wrap {
    width: 100% !important;
    height: 220px !important;
    min-height: 200px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  .actor-card-chart-area canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    display: block !important;
    background: #fff !important;
  }
  

}


@media (max-width: 900px) {
  /* Hide the table in list view on tablet and mobile */
  .portfolio-list-table-full {
    display: none !important;
  }
  
  /* New Mobile/Tablet Card Design */
  .mobile-portfolio-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid #666;
    padding-bottom: 24px;
  }
  
  .mobile-card-top-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
  }
  
  .mobile-card-photo {
    flex-shrink: 0;
    width: 70px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
  }
  
  .mobile-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .mobile-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  
  .mobile-card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  
  .mobile-card-category-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
  }
  
  .mobile-card-name {
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 1;
    letter-spacing: 0.5px;
    text-align: left;
  }
  
  .mobile-card-special-emoji {
    font-size: 16px;
    flex-shrink: 0;
  }
  
  .mobile-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  
  .mobile-metric-box {
    display: flex;
    flex-direction: column;
  }
  
  .mobile-metric-label {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    text-align: left;
  }
  
  .mobile-metric-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: 'Roboto Mono', monospace;
    text-align: left;
  }
  
  .mobile-metric-value.starscore-value {
    color: #178aff;
    font-size: 20px;
    font-weight: 800;
  }
  
  .mobile-metric-value.current-value {
    color: #178aff;
    font-weight: 700;
  }
  
  .mobile-value-display.starscore-value-bold {
    color: #178aff;
    font-weight: 700;
    font-size: 16px;
  }
  
  .mobile-metric-value.market-value {
    color: #22b14c;
    font-size: 20px;
    font-weight: 700;
  }
  
  .mobile-card-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  
  .mobile-value-container {
    display: flex;
    flex-direction: column;
    min-width: 80px;
    text-align: center;
  }
  
  .mobile-value-display {
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Roboto Mono', monospace;
  }
  
  .mobile-profit-display.positive {
    font-size: 20px;
    font-weight: 800;
    color: #22b14c;
  }
  
  .mobile-profit-display.negative {
    font-size: 20px;
    font-weight: 800;
    color: #d32f2f;
  }
  
  .mobile-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex: 1;
  }
  
  .mobile-buy-btn,
  .mobile-sell-btn {
    flex: 1;
    padding: 6px 16px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    cursor: pointer;
  }
  
  .mobile-buy-btn {
    background: #22b14c;
    color: #fff;
  }
  
  .mobile-buy-btn:hover {
    background: #1a9a3f;
    transform: translateY(-1px);
  }
  
  .mobile-sell-btn {
    background: #e8413a;
    color: #fff;
  }
  
  .mobile-sell-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
  }
}

/* Dark Mode Styles for Mobile Cards */
body.dark-mode .mobile-card-photo {
  background: #333;
}

body.dark-mode .mobile-card-name {
  color: #e0e0e0;
}

body.dark-mode .mobile-metric-label {
  color: #999;
}

body.dark-mode .mobile-metric-value {
  color: #e0e0e0;
}

body.dark-mode .mobile-metric-value.small-text {
  font-size: 14px;
  font-weight: 600;
}

body.dark-mode .mobile-metric-value.starscore-value {
  color: #5faeff;
}

body.dark-mode .mobile-metric-value.current-value {
  color: #5faeff;
}

body.dark-mode .mobile-value-display.starscore-value-bold {
  color: #5faeff;
}

body.dark-mode .mobile-metric-value.market-value {
  color: #22b14c;
}

body.dark-mode .mobile-metric-value.positive {
  font-size: 20px;
  font-weight: 800;
  color: #22b14c;
}

body.dark-mode .mobile-metric-value.negative {
  font-size: 20px;
  font-weight: 800;
  color: #d32f2f;
}

body.dark-mode .mobile-value-display.market-value {
  color: #22b14c;
}

.mobile-metric-value.positive {
  font-size: 20px;
  font-weight: 800;
  color: #22b14c;
}

.mobile-metric-value.negative {
  font-size: 20px;
  font-weight: 800;
  color: #d32f2f;
}

/* ============ Date Range Picker Styles ============= */

.date-range-picker-container {
  position: relative;
  display: inline-block;
}

.date-range-picker-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: #f8f9fa;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  color: #495057;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 120px;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.date-range-picker-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.date-range-picker-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.date-range-picker-btn .material-icons {
  font-size: 1rem;
  color: inherit;
}

.date-range-picker-popup {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  width: 180px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.date-range-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e0e6ed;
  background: #f8f9fa;
}

.date-range-picker-header span {
  font-weight: 600;
  color: #495057;
  font-size: 0.75rem;
}

.date-range-close-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.date-range-close-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.date-range-close-btn .material-icons {
  font-size: 1.1rem;
}

.date-range-picker-content {
  padding: 0.6rem;
}

.date-range-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.date-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.date-input-group label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.date-input-group input[type="date"] {
  padding: 0.4rem;
  border: 1px solid #e0e6ed;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #495057;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.date-input-group input[type="date"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.date-range-actions {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-end;
}

.date-range-apply-btn,
.date-range-clear-btn {
  padding: 0.4rem 0.6rem;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.date-range-apply-btn {
  background: #007bff;
  color: #fff;
}

.date-range-apply-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.date-range-clear-btn {
  background: #6c757d;
  color: #fff;
}

.date-range-clear-btn:hover {
  background: #545b62;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
}

/* Chart time range dropdown - matching the "All Time" style */
.chart-time-range-container {
  position: relative;
  display: inline-block;
}

.chart-time-range-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: #f8f9fa;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  color: #495057;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: 120px;
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-time-range-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chart-time-range-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.chart-time-range-popup {
  position: absolute;
  top: 80%;
  left: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  width: 180px;
  margin-top: 0.5rem;
  overflow: hidden;
  max-height: 300px;
}

/* Smart positioning for desktop - ensure popup fits */
@media (min-width: 601px) {
  .chart-time-range-popup {
    /* Check if there's enough space below, if not, position above */
    max-height: 280px;
    /* Ensure popup doesn't extend beyond chart container */
    max-width: calc(100vw - 2rem);
  }
}

/* Ensure popup fits within chart container on desktop */
.chart-time-range-container {
  position: relative;
  display: inline-block;
}

.chart-time-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e0e6ed;
  background: #f8f9fa;
}

.chart-time-range-header span {
  font-weight: 600;
  color: #495057;
  font-size: 0.75rem;
}

.chart-time-range-close-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-time-range-close-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.chart-time-range-close-btn .material-icons {
  font-size: 1.1rem;
}

.chart-time-range-content {
  padding: 0.6rem;
}

.chart-time-range-options {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.chart-time-range-option {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #495057;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.chart-time-range-option:hover {
  background: #f8f9fa;
  border-color: #007bff;
}

.chart-time-range-option.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* Dark mode styles for date range picker */
body.dark-mode .date-range-picker-btn {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .date-range-picker-btn:hover {
  background: #4a5568;
  border-color: #718096;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

body.dark-mode .date-range-picker-btn.active {
  background: #3182ce;
  border-color: #3182ce;
  color: #fff;
  box-shadow: 0 2px 6px rgba(49, 130, 206, 0.4);
}

body.dark-mode .date-range-picker-popup {
  background: #2d3748;
  border-color: #4a5568;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .date-range-picker-header {
  background: #1a202c;
  border-color: #4a5568;
}

body.dark-mode .date-range-picker-header span {
  color: #e2e8f0;
}

body.dark-mode .date-range-close-btn {
  color: #a0aec0;
}

body.dark-mode .date-range-close-btn:hover {
  background: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .date-input-group label {
  color: #e2e8f0;
}

body.dark-mode .date-input-group input[type="date"] {
  background: #1a202c;
  border-color: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .date-input-group input[type="date"]:focus {
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

body.dark-mode .date-range-apply-btn {
  background: #3182ce;
}

body.dark-mode .date-range-apply-btn:hover {
  background: #2c5aa0;
}

body.dark-mode .date-range-clear-btn {
  background: #718096;
}

body.dark-mode .date-range-clear-btn:hover {
  background: #4a5568;
}

/* Dark mode for chart time range */
body.dark-mode .chart-time-range-btn {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .chart-time-range-btn:hover {
  background: #4a5568;
  border-color: #718096;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

body.dark-mode .chart-time-range-btn.active {
  background: #3182ce;
  border-color: #3182ce;
  color: #fff;
  box-shadow: 0 2px 6px rgba(49, 130, 206, 0.4);
}

body.dark-mode .chart-time-range-popup {
  background: #2d3748;
  border-color: #4a5568;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .chart-time-range-header {
  background: #1a202c;
  border-color: #4a5568;
}

body.dark-mode .chart-time-range-header span {
  color: #e2e8f0;
}

body.dark-mode .chart-time-range-close-btn {
  color: #a0aec0;
}

body.dark-mode .chart-time-range-close-btn:hover {
  background: #4a5568;
  color: #e2e8f0;
}

body.dark-mode .chart-time-range-option {
  color: #e2e8f0;
}

body.dark-mode .chart-time-range-option:hover {
  background: #4a5568;
  border-color: #3182ce;
}

body.dark-mode .chart-time-range-option.active {
  background: #3182ce;
  color: white;
  border-color: #3182ce;
}

/* Mobile responsive styles for date range picker */
@media (max-width: 600px) {
  .date-range-picker-popup {
    position: absolute;
    top: 80%;
    left: 0;
    width: 100%;
    max-width: 220px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
  }
  
  .date-range-picker-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 110px;
  }
  
  .date-range-picker-btn .material-icons {
    font-size: 0.9rem;
  }
  
  .date-range-picker-content {
    padding: 0.75rem;
  }
  
  .date-range-inputs {
    gap: 0.6rem;
    margin-bottom: 0.6rem;
  }
  
  .date-range-actions {
    gap: 0.4rem;
  }
  
  .date-range-apply-btn,
  .date-range-clear-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .chart-time-range-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 110px;
  }
  
  .chart-time-range-popup {
    position: absolute;
    top: 80%;
    left: 0;
    width: 100%;
    max-width: 220px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
  }
  
  /* Improve chart controls layout on mobile */
  .chart-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  
  .date-range-picker-container,
  .chart-time-range-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .date-range-picker-btn,
  .chart-time-range-btn {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }
}

/* Very small screen adjustments */
@media (max-width: 480px) {
  .date-range-picker-btn,
  .chart-time-range-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    min-width: 100px;
  }
  
  .chart-controls {
    padding: 0.4rem;
    gap: 0.4rem;
  }
  
  .date-range-picker-btn,
  .chart-time-range-btn {
    max-width: 180px;
    font-size: 0.7rem;
  }
  
  .date-range-picker-popup,
  .chart-time-range-popup {
    width: 95%;
    max-width: 200px;
  }
}

/* ===== Dark Mode for Partial Sales ===== */
body.dark-mode .partial-sales-total-box {
  background: #2a2a2a !important;
  box-shadow: 0 2px 10px #0007 !important;
}

body.dark-mode .partial-sales-total-box .total-label {
  color: #e0e6ed !important;
}

body.dark-mode .partial-sales-total-box .total-num {
  color: #5faeff !important;
}

body.dark-mode .partial-sales-total-box .total-num.up {
  color: #22b14c !important;
}

body.dark-mode .partial-sales-total-box .total-num.down {
  color: #e8413a !important;
}

body.dark-mode .partial-sale-card {
  background: #2a2a2a !important;
  box-shadow: 0 2px 10px #0007 !important;
}

body.dark-mode .partial-sale-card-category-emoji,
body.dark-mode .partial-sale-card-special-classification-emoji {
  filter: brightness(1.2) !important;
}

body.dark-mode .partial-sale-card-photo {
  background: #222 !important;
  box-shadow: 0 2px 10px #0007 !important;
}

body.dark-mode .partial-sale-card-name-row,
body.dark-mode .partial-sale-card-name {
  color: #fff !important;
}

body.dark-mode .partial-sale-card-link {
  color: #5faeff !important;
}

body.dark-mode .partial-sale-card-stats-row {
  color: #e0e6ed !important;
}

body.dark-mode .partial-sale-card-stats-row span {
  color: #8bafd9 !important;
}

body.dark-mode .partial-sale-card-trading-row {
  color: #b9b9b9 !important;
}

body.dark-mode .partial-sale-card-statscore-label {
  color: #fff !important;
}

body.dark-mode .partial-sale-card-statscore {
  color: #5faeff !important;
}

body.dark-mode .partial-sale-card-bottom-label {
  color: #e0e6ed !important;
}

body.dark-mode .partial-sale-card-bottom-num {
  color: #5faeff !important;
}

body.dark-mode .partial-sale-card-change .partial-sale-card-bottom-num {
  color: #1cd76f !important;
}

body.dark-mode .partial-sale-card-change.down .partial-sale-card-bottom-num {
  color: #ff6565 !important;
}

body.dark-mode .partial-sale-card-profit .partial-sale-card-bottom-num {
  color: #22b14c !important;
}

body.dark-mode .partial-sale-card-profit.down .partial-sale-card-bottom-num {
  color: #e8413a !important;
}

body.dark-mode .no-partial-sales {
  color: #8bafd9 !important;
}

/* ===== Mobile Responsive for Partial Sales ===== */
@media (max-width: 600px) {
  #partial-sales-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .partial-sale-card {
    width: 100%;
    margin: 1rem auto;
    padding: 0.5rem;
  }
  
  .partial-sale-card-header {
    padding: 1rem 1rem 0 1rem;
    gap: 1rem;
  }
  
  .partial-sale-card-photo {
    height: 120px;
  }
  
  .partial-sale-card-name {
    font-size: 1.2rem;
  }
  
  .partial-sale-card-stats-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .partial-sale-card-statscore {
    font-size: 2rem;
  }
  
  .partial-sale-card-bottom-row {
    padding: 0 1rem 1rem 1rem;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .partial-sale-card-bottom-col {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 120px;
  }
  
  .partial-sale-card-bottom-label {
    font-size: 0.9rem;
  }
  
  .partial-sale-card-bottom-num {
    font-size: 0.9rem;
  }
}

/* ===== Partial Sales View Toggle - Use portfolio toggle styling ===== */
.partial-sales-view-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

.partial-sales-view-toggle .portfolio-toggle-icon {
  font-size: 2.1rem;
  color: #bbb;
  cursor: pointer;
  padding: 0.18em 0.32em;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  user-select: none;
}

.partial-sales-view-toggle .portfolio-toggle-icon.active {
  color: #178aff;
  background: #e8f4ff;
}

.partial-sales-view-toggle .portfolio-toggle-icon:hover {
  background: #e8f4ff;
  color: #178aff;
}

body.dark-mode .partial-sales-view-toggle .portfolio-toggle-icon {
  color: #666;
  background: none;
}

body.dark-mode .partial-sales-view-toggle .portfolio-toggle-icon.active {
  color: #5faeff;
  background: #232c38;
}

body.dark-mode .partial-sales-view-toggle .portfolio-toggle-icon:hover {
  background: #232c38;
  color: #5faeff;
}

@media (max-width: 700px) {
  .partial-sales-view-toggle {
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }
}

/* ===== Sold Positions View Toggle - Use portfolio toggle styling ===== */
.sold-view-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

.sold-view-toggle .portfolio-toggle-icon {
  font-size: 2.1rem;
  color: #bbb;
  cursor: pointer;
  padding: 0.18em 0.32em;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  user-select: none;
}

.sold-view-toggle .portfolio-toggle-icon.active {
  color: #178aff;
  background: #e8f4ff;
}

.sold-view-toggle .portfolio-toggle-icon:hover {
  background: #e8f4ff;
  color: #178aff;
}

body.dark-mode .sold-view-toggle .portfolio-toggle-icon {
  color: #666;
  background: none;
}

body.dark-mode .sold-view-toggle .portfolio-toggle-icon.active {
  color: #5faeff;
  background: #232c38;
}

body.dark-mode .sold-view-toggle .portfolio-toggle-icon:hover {
  background: #232c38;
  color: #5faeff;
}

@media (max-width: 700px) {
  .sold-view-toggle {
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }
}

/* ===== Sold Positions List View Styles ===== */

/* Mobile Sold Positions List View - Match portfolio mobile styling exactly */
.mobile-sold-actors-list {
  display: none;
}

@media (max-width: 900px) {
  .mobile-sold-actors-list {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 12px 32px 12px;
    background: none;
  }
  
  /* Hide desktop table on mobile */
  .sold-actors-list-table-full {
    display: none !important;
  }
}

.mobile-sold-actor-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #666;
  padding-bottom: 24px;
}

.mobile-sold-card-top-section {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.mobile-sold-card-photo {
  flex-shrink: 0;
  width: 70px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.mobile-sold-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-sold-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-sold-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}


.mobile-sold-card-name {
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  flex: 1;
  letter-spacing: 0.5px;
  text-align: left;
}

.mobile-sold-card-special-emoji {
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-sold-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.mobile-sold-metric-box {
  display: flex;
  flex-direction: column;
}

.mobile-sold-metric-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  text-align: left;
}

.mobile-sold-metric-value {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  font-family: 'Roboto Mono', monospace;
  text-align: left;
}

.mobile-sold-metric-value.starscore-value {
  color: #178aff;
  font-size: 20px;
  font-weight: 800;
}

.mobile-sold-metric-value.market-value {
  color: #22b14c;
}

.mobile-sold-metric-value.positive {
  color: #22b14c;
}

.mobile-sold-metric-value.negative {
  color: #e8413a;
}

.mobile-sold-card-bottom-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.mobile-sold-starscore {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
}

.mobile-sold-starscore-value {
  color: #178aff;
  font-size: 20px;
  font-weight: 800;
  font-family: 'Roboto Mono', monospace;
}

.mobile-sold-actor-value-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-sold-actor-value-display {
  font-size: 1rem;
  font-weight: 700;
  color: #22b14c;
}

.mobile-sold-actor-value-display.market-value {
  color: #22b14c;
}

.mobile-sold-actor-value-display.starscore-value {
  color: #178aff;
}

.mobile-sold-actions {
  display: flex;
  gap: 8px;
}

.mobile-sold-buy-btn,
.mobile-sold-sell-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
}

.mobile-sold-buy-btn {
  background: #059669;
  color: white;
}

.mobile-sold-buy-btn:hover {
  background: #047857;
}

.mobile-sold-sell-btn {
  background: #dc2626;
  color: white;
}

.mobile-sold-sell-btn:hover {
  background: #b91c1c;
}

/* Dark mode mobile sold actors list */
body.dark-mode .mobile-sold-actor-card {
  border-bottom-color: #444;
}

body.dark-mode .mobile-sold-card-photo {
  background: #333;
}

body.dark-mode .mobile-sold-card-name {
  color: #e0e0e0;
}

body.dark-mode .mobile-sold-metric-label {
  color: #999;
}

body.dark-mode .mobile-sold-metric-value {
  color: #e0e0e0;
}

body.dark-mode .mobile-sold-metric-value.small-text {
  font-size: 14px;
  font-weight: 600;
}

body.dark-mode .mobile-sold-starscore {
  color: #999;
}

/* Desktop Sold Positions List View - Use portfolio table styling */
.sold-actors-list-scroll {
  width: 100%;
  overflow-x: auto;
  display: block;
  margin: 0 auto;
}

.sold-actors-list-table-full {
  width: 100%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-code, 'Roboto Mono', monospace);
  font-size: 0.97em;
  min-width: 1000px;
  table-layout: fixed;
}

/* Override width constraints for sold positions section */
#sold-content,
.sold-view-toggle {
  width: auto !important;
  min-width: unset !important;
  max-width: unset !important;
  margin: 0 0 1.2em 0;
  text-align: center;
  display: block;
}

#sold-content .sold-actors-list-table-full {
  margin: 0 auto !important;
  width: auto !important;
  min-width: unset !important;
  max-width: unset !important;
  display: table;
}


.sold-actors-list-table-full th, 
.sold-actors-list-table-full td {
  padding: 0.8em 0.5em;
  vertical-align: middle;
  font-size: 0.9em;
}

/* Column width distribution for sold actors table */
.sold-actors-list-table-full th:nth-child(1),
.sold-actors-list-table-full td:nth-child(1) {
  width: 8%; /* Photo */
}

.sold-actors-list-table-full th:nth-child(2),
.sold-actors-list-table-full td:nth-child(2) {
  width: 12%; /* Actor name */
}

.sold-actors-list-table-full th:nth-child(3),
.sold-actors-list-table-full td:nth-child(3) {
  width: 10%; /* Total Shares */
}

.sold-actors-list-table-full th:nth-child(4),
.sold-actors-list-table-full td:nth-child(4) {
  width: 10%; /* Avg Buy Price */
}

.sold-actors-list-table-full th:nth-child(5),
.sold-actors-list-table-full td:nth-child(5) {
  width: 10%; /* Avg Sell Price */
}

.sold-actors-list-table-full th:nth-child(6),
.sold-actors-list-table-full td:nth-child(6) {
  width: 10%; /* Current StarScore */
}

.sold-actors-list-table-full th:nth-child(7),
.sold-actors-list-table-full td:nth-child(7) {
  width: 10%; /* Price Change */
}

.sold-actors-list-table-full th:nth-child(8),
.sold-actors-list-table-full td:nth-child(8) {
  width: 10%; /* Total Proceeds */
}

.sold-actors-list-table-full th:nth-child(9),
.sold-actors-list-table-full td:nth-child(9) {
  width: 10%; /* Profit/Loss */
}

.sold-actors-list-table-full th:nth-child(10),
.sold-actors-list-table-full td:nth-child(10) {
  width: 10%; /* Buy/Sell buttons */
}

.sold-actors-list-table-full th {
  font-family: var(--font-heading);
  font-size: 0.9em;
  color: #222;
  font-weight: 700;
  background: #fff;
  letter-spacing: 0.02em;
  text-transform: none;
  border-bottom: 2px solid #eee;
}

.sold-actors-list-table-full tbody tr:nth-child(even) {
  background: #fafbfc;
}

.sold-actors-list-table-full tbody tr:nth-child(odd) {
  background: #fff;
}

.sold-actors-list-table-full tbody tr:nth-child(even):hover {
  background: #f8faff;
  box-shadow: 0 4px 16px #0002;
}

.sold-actors-list-table-full tbody tr:nth-child(odd):hover {
  background: #f8faff;
  box-shadow: 0 4px 16px #0002;
}

.sold-actors-list-table-full tbody tr td {
  background: inherit !important;
  border: none;
  padding: 0.75em 0.5em;
}

.sold-actors-list-table-full td {
  font-family: var(--font-code, 'Roboto Mono', monospace);
  color: #222;
  vertical-align: middle;
  text-align: center;
  text-transform: none !important;
}

.sold-actors-list-photo-cell {
  text-align: center;
  padding: 0.5em;
  width: 80px;
}

.sold-actors-list-photo {
  width: 40px;
  height: 50px;
  border-radius: 5px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.sold-actors-list-actor {
  text-align: center;
  padding: 0.5em 0.2em;
  width: 100%;
  font-family: var(--font-heading);
  font-weight: 600;
}

.sold-actors-list-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-heading);
  transition: color 0.2s ease;
}

.sold-actors-list-link:hover {
  color: var(--color-primary-dark);
}

.sold-actors-list-bought-in,
.sold-actors-list-sold-at,
.sold-actors-list-starscore {
  color: var(--color-primary);
  font-weight: 600;
}

.sold-actors-list-change.up,
.sold-actors-list-profit.up {
  color: #22b14c !important;
  font-weight: 700;
}

.sold-actors-list-change.down,
.sold-actors-list-profit.down {
  color: #e8413a !important;
  font-weight: 700;
}

.sold-actors-list-buy-btn,
.sold-actors-list-sell-btn {
  font-family: var(--font-heading);
  font-size: 0.9em;
  font-weight: 700;
  padding: 0.5em 0.8em;
  border-radius: 6px;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px #0001;
  transition: background 0.2s, color 0.2s;
  margin-right: 0.3em;
}

.sold-actors-list-buy-btn {
  background: #22b14c;
  color: #fff;
  border: 2px solid #18832f;
}

.sold-actors-list-buy-btn:hover {
  background: #18832f;
}

.sold-actors-list-sell-btn {
  background: #e8413a;
  color: #fff;
  border: 2px solid #c0392b;
}

.sold-actors-list-sell-btn:hover {
  background: #c0392b;
}

/* Dark mode sold positions table */
body.dark-mode .sold-actors-list-table-full {
  background: #181818 !important;
  color: #e0e6ed !important;
}

body.dark-mode .sold-actors-list-table-full th,
body.dark-mode .sold-actors-list-table-full td {
  background: #181818 !important;
  color: #e0e6ed !important;
  border-color: #232323 !important;
}

body.dark-mode .sold-actors-list-table-full th {
  font-weight: 700;
  color: #5faeff !important;
  background: #191a1d !important;
}

body.dark-mode .sold-actors-list-table-full th.sortable:hover {
  background: #232c38 !important;
}

body.dark-mode .sold-actors-list-table-full tr {
  background: #181818 !important;
}

body.dark-mode .sold-actors-list-table-full tbody tr:nth-child(even) {
  background: #20232a !important;
}

body.dark-mode .sold-actors-list-table-full tbody tr:nth-child(odd) {
  background: #181818 !important;
}

body.dark-mode .sold-actors-list-table-full tbody tr td {
  background: inherit !important;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-link {
  color: #5faeff !important;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-link:hover {
  color: #7bb8ff !important;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-bought-in,
body.dark-mode .sold-actors-list-table-full td .sold-actors-list-sold-at,
body.dark-mode .sold-actors-list-table-full td .sold-actors-list-starscore {
  color: #5faeff !important;
}

body.dark-mode .sold-actors-list-table-full td.sold-actors-list-change.up,
body.dark-mode .sold-actors-list-table-full td.sold-actors-list-profit.up {
  color: #22b14c !important;
}

body.dark-mode .sold-actors-list-table-full td.sold-actors-list-change.down,
body.dark-mode .sold-actors-list-table-full td.sold-actors-list-profit.down {
  color: #e8413a !important;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-buy-btn {
  background: #22b14c;
  color: #fff;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-buy-btn:hover {
  background: #18832f;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-sell-btn {
  background: #e8413a;
  color: #fff;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-sell-btn:hover {
  background: #c0392b;
}

/* Responsive sold positions table */
@media (max-width: 1200px) {
  .sold-actors-list-table-full {
    min-width: 900px;
  }
  
  .sold-actors-list-table-full th, 
  .sold-actors-list-table-full td {
    padding: 0.6em 0.3em;
    font-size: 0.85em;
  }
  
  .sold-actors-list-photo {
    width: 32px;
    height: 40px;
  }
  
  .sold-actors-list-photo-cell {
    width: 60px;
    padding: 0.3em;
  }
}

@media (max-width: 900px) {
  .sold-actors-list-table-full {
    min-width: 800px;
  }
  
  .sold-actors-list-table-full th, 
  .sold-actors-list-table-full td {
    padding: 0.5em 0.2em;
    font-size: 0.8em;
  }
  
  .sold-actors-list-photo {
    width: 28px;
    height: 35px;
  }
  
  .sold-actors-list-photo-cell {
    width: 50px;
    padding: 0.2em;
  }
  
  .sold-actors-list-buy-btn,
  .sold-actors-list-sell-btn {
    font-size: 0.8em;
    padding: 0.4em 0.6em;
    margin-right: 0.2em;
  }
}

@media (max-width: 700px) {
  .sold-actors-list-table-full {
    min-width: 700px;
  }
  
  .sold-actors-list-table-full th, 
  .sold-actors-list-table-full td {
    padding: 0.4em 0.1em;
    font-size: 0.75em;
  }
  
  .sold-actors-list-photo {
    width: 24px;
    height: 30px;
  }
  
  .sold-actors-list-photo-cell {
    width: 40px;
    padding: 0.1em;
  }
  
  .sold-actors-list-buy-btn,
  .sold-actors-list-sell-btn {
    font-size: 0.7em;
    padding: 0.3em 0.5em;
    margin-right: 0.1em;
  }
  
  /* Hide less important columns on very small screens */
  .sold-actors-list-table-full th:nth-child(3),
  .sold-actors-list-table-full td:nth-child(3),
  .sold-actors-list-table-full th:nth-child(6),
  .sold-actors-list-table-full td:nth-child(6) {
    display: none;
  }
}

.sold-actors-list-photo {
  width: 40px;
  height: 50px;
  border-radius: 5px;
  overflow: hidden;
  background: #f5f5f5;
}

.sold-actors-list-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sold-actors-list-actor {
  font-weight: 600;
  font-family: var(--font-heading);
}

.sold-actors-list-link {
  color: #178aff;
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-heading);
}

.sold-actors-list-link:hover {
  color: #0056b3;
}

.sold-actors-list-bought-in,
.sold-actors-list-sold-at {
  color: #666;
}

.sold-actors-list-change.up,
.sold-actors-list-profit.up {
  color: #22b14c !important;
  font-weight: 600;
}

.sold-actors-list-change.down,
.sold-actors-list-profit.down {
  color: #e8413a !important;
  font-weight: 600;
}

.sold-actors-list-table-full td .sold-actors-list-change.up,
.sold-actors-list-table-full td .sold-actors-list-profit.up {
  color: #22b14c !important;
}

.sold-actors-list-table-full td .sold-actors-list-change.down,
.sold-actors-list-table-full td .sold-actors-list-profit.down {
  color: #e8413a !important;
}

.sold-actors-list-table-full td:last-child {
  white-space: nowrap;
}

.sold-actors-list-table-full td .sold-actors-list-sell-btn,
.sold-actors-list-table-full td .sold-actors-list-buy-btn {
  font-family: var(--font-heading);
  font-size: 0.85em;
  font-weight: 700;
  padding: 0.4em 0.8em;
  border-radius: 6px;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px #0001;
  transition: background 0.2s, color 0.2s;
  margin-right: 0.2em;
}

.sold-actors-list-table-full td .sold-actors-list-sell-btn {
  background: #e8413a;
  color: #fff;
  border: 2px solid #c0392b;
  margin-right: 0.5em;
}

.sold-actors-list-table-full td .sold-actors-list-sell-btn:hover {
  background: #c0392b;
}

.sold-actors-list-table-full td .sold-actors-list-buy-btn {
  background: #22b14c;
  color: #fff;
  border: 2px solid #18832f;
}

.sold-actors-list-table-full td .sold-actors-list-buy-btn:hover {
  background: #18832f;
}

@media (max-width: 900px) {
  .sold-actors-list-table-full th, .sold-actors-list-table-full td {
    padding: 0.7em 0.3em;
    font-size: 0.97em;
  }
  .sold-actors-list-photo {
    width: 40px;
    height: 60px;
  }
  .sold-actors-list-link {
    font-size: 0.9em;
  }
}

@media (max-width: 700px) {
  .sold-actors-list-table-full td .sold-actors-list-sell-btn,
  .sold-actors-list-table-full td .sold-actors-list-buy-btn {
    padding: 0.3em 0.6em;
    font-size: 0.8em;
  }
}

/* Dark mode styles for sold positions list views */
body.dark-mode .mobile-sold-actor-card {
  background: #191a1d;
  border-color: #444;
}

body.dark-mode .mobile-sold-actor-name {
  color: #e0e0e0;
}

body.dark-mode .mobile-sold-actor-metric-label {
  color: #999;
}

body.dark-mode .mobile-sold-actor-metric-value {
  color: #e0e6ed;
}

body.dark-mode .mobile-sold-actor-metric-value.starscore-value {
  color: #5faeff;
}

body.dark-mode .mobile-sold-metric-value.market-value {
  color: #22b14c;
}

body.dark-mode .mobile-sold-actor-value-display {
  color: #22b14c;
}

body.dark-mode .mobile-sold-actor-value-display.market-value {
  color: #22b14c;
}

body.dark-mode .mobile-sold-actor-value-display.starscore-value {
  color: #5faeff;
}

body.dark-mode .mobile-sold-metric-value.positive {
  color: #22b14c;
}

body.dark-mode .mobile-sold-metric-value.negative {
  color: #e8413a;
}

body.dark-mode .sold-actors-list-table-full {
  background: #181818;
  border-color: #444;
}

body.dark-mode .sold-actors-list-table-full th,
body.dark-mode .sold-actors-list-table-full td {
  border-bottom-color: #3a4f6f;
}

body.dark-mode .sold-actors-list-table-full th {
  background: linear-gradient(135deg, #5faeff 0%, #3182ce 100%);
}

body.dark-mode .sold-actors-list-table-full tr {
  background: #181818;
}

body.dark-mode .sold-actors-list-table-full tbody tr:nth-child(even) {
  background: #20232a;
}

body.dark-mode .sold-actors-list-table-full tbody tr:nth-child(odd) {
  background: #181818;
}

body.dark-mode .sold-actors-list-table-full tbody tr td {
  background: inherit;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-link {
  color: #5faeff;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-link:hover {
  color: #7bb8ff;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-bought-in,
body.dark-mode .sold-actors-list-table-full td .sold-actors-list-sold-at {
  color: #8bafd9;
}

/* Dark mode color styling for sold actors table positive/negative numbers */
body.dark-mode .sold-actors-list-table-full td.sold-actors-list-change.up,
body.dark-mode .sold-actors-list-table-full td.sold-actors-list-profit.up {
  color: #22b14c !important;
}

body.dark-mode .sold-actors-list-table-full td.sold-actors-list-change.down,
body.dark-mode .sold-actors-list-table-full td.sold-actors-list-profit.down {
  color: #e8413a !important;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-sell-btn {
  background: #e8413a;
  color: #fff;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-sell-btn:hover {
  background: #c0392b;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-buy-btn {
  background: #22b14c;
  color: #fff;
}

body.dark-mode .sold-actors-list-table-full td .sold-actors-list-buy-btn:hover {
  background: #18832f;
}

/* ===== Partial Sales List View Styles ===== */

/* Mobile Partial Sales List View - Use mobile portfolio card styling */
.mobile-partial-sales-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 12px 32px 12px;
  background: none;
}

.mobile-partial-sale-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #666;
  padding-bottom: 24px;
}

.mobile-sold-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #666;
  padding-bottom: 24px;
}

.mobile-partial-sale-top-section {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.mobile-partial-sale-photo {
  flex-shrink: 0;
  width: 70px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.mobile-partial-sale-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-partial-sale-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-partial-sale-header {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.mobile-partial-sale-category-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.mobile-partial-sale-name {
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  flex: 1;
  letter-spacing: 0.5px;
  text-align: left;
}

.mobile-partial-sale-special-emoji {
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-partial-sale-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.mobile-partial-sale-metric-box {
  display: flex;
  flex-direction: column;
}

.mobile-partial-sale-metric-label {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  text-align: left;
}

.mobile-partial-sale-metric-value {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  font-family: 'Roboto Mono', monospace;
  text-align: left;
}

.mobile-partial-sale-metric-value.starscore-value {
  color: #178aff;
  font-size: 20px;
  font-weight: 800;
}

.mobile-partial-sale-metric-value.market-value {
  color: #22b14c;
  font-size: 20px;
  font-weight: 700;
}

.mobile-partial-sale-metric-value.positive {
  color: #22b14c;
  font-size: 20px;
  font-weight: 800;
}

.mobile-partial-sale-metric-value.negative {
  color: #d32f2f;
  font-size: 20px;
  font-weight: 800;
}

.mobile-partial-sale-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.mobile-partial-sale-value-container {
  display: flex;
  flex-direction: column;
  min-width: 80px;
  text-align: center;
}

.mobile-partial-sale-value-display {
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Roboto Mono', monospace;
}

.mobile-partial-sale-value-display.market-value {
  color: #22b14c;
}

.mobile-partial-sale-value-display.starscore-value {
  color: #178aff;
  font-size: 20px;
  font-weight: 800;
}

.mobile-partial-sale-action-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex: 1;
}

.mobile-partial-sale-buy-btn,
.mobile-partial-sale-sell-btn {
  flex: 1;
  padding: 6px 16px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.mobile-partial-sale-buy-btn {
  background: #22b14c;
  color: #fff;
}

.mobile-partial-sale-buy-btn:hover {
  background: #1a9a3f;
  transform: translateY(-1px);
}

.mobile-partial-sale-sell-btn {
  background: #e8413a;
  color: #fff;
}

.mobile-partial-sale-sell-btn:hover {
  background: #d32f2f;
  transform: translateY(-1px);
}

/* Desktop Partial Sales List View - Use portfolio table styling */
.partial-sales-list-table-full {
  width: 100%;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-code, 'Roboto Mono', monospace);
  font-size: 0.97em;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.partial-sales-list-table-full th, 
.partial-sales-list-table-full td {
  padding: 0.8em 0.5em;
  vertical-align: middle;
  font-size: 0.9em;
}

.partial-sales-list-table-full th {
  font-family: var(--font-heading);
  font-size: 0.9em;
  color: #222;
  font-weight: 700;
  background: #fff;
  letter-spacing: 0.02em;
  text-transform: none;
  border-bottom: 2px solid #eee;
}

.partial-sales-list-table-full tbody tr:nth-child(even) {
  background: #fafbfc;
}

.partial-sales-list-table-full tbody tr:nth-child(odd) {
  background: #fff;
}

.partial-sales-list-table-full tbody tr:nth-child(even):hover {
  background: #f8faff;
  box-shadow: 0 4px 16px #0002;
}

.partial-sales-list-table-full tbody tr:nth-child(odd):hover {
  background: #f8faff;
  box-shadow: 0 4px 16px #0002;
}

.partial-sales-list-table-full tbody tr td {
  background: inherit !important;
  border: none;
  padding: 0.75em 0.5em;
}

.partial-sales-list-table-full td {
  font-family: var(--font-code, 'Roboto Mono', monospace);
  color: #222;
  vertical-align: middle;
  text-align: center;
}

.partial-sales-list-photo-cell {
  text-align: center;
  padding: 0.5em;
  width: 80px;
}

.partial-sales-list-photo {
  width: 40px;
  height: 50px;
  border-radius: 5px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.partial-sales-list-actor {
  text-align: center;
  padding: 0.5em 0.2em;
  width: 100%;
}

.partial-sales-list-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-heading);
}

.partial-sales-list-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.partial-sales-list-bought-in,
.partial-sales-list-sold-at,
.partial-sales-list-starscore {
  color: #178aff;
  font-weight: 600;
}

.partial-sales-list-change.up,
.partial-sales-list-profit.up {
  color: #22b14c;
}

.partial-sales-list-change.down,
.partial-sales-list-profit.down {
  color: #e8413a;
}

/* Ensure positive amounts are green in both light and dark modes */
.partial-sales-list-table-full td .partial-sales-list-change.up,
.partial-sales-list-table-full td .partial-sales-list-profit.up {
  color: #22b14c !important;
}

.partial-sales-sell-btn,
.partial-sales-buy-btn {
  display: inline-block;
  width: auto;
  min-width: 70px;
  padding: 0.4em 0.8em;
  margin: 0 0.15em;
  border: none;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.8em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.partial-sales-sell-btn {
  background: #e8413a;
  color: #fff;
  border: 2px solid #c0392b;
}

.partial-sales-sell-btn:hover {
  background: #c0392b;
}

.partial-sales-buy-btn {
  background: #22b14c;
  color: #fff;
  border: 2px solid #18832f;
}

.partial-sales-buy-btn:hover {
  background: #18832f;
}

/* Ensure buttons are side by side in partial sales table */
.partial-sales-list-table-full td:last-child {
  white-space: nowrap;
}

/* Better column spacing for partial sales table */
.partial-sales-list-table-full {
  table-layout: fixed;
  width: 100%;
}

.partial-sales-list-table-full th:nth-child(1),
.partial-sales-list-table-full td:nth-child(1) {
  width: 80px; /* Photo column */
}

.partial-sales-list-table-full th:nth-child(2),
.partial-sales-list-table-full td:nth-child(2) {
  width: 120px; /* Actor name column */
}

.partial-sales-list-table-full th:nth-child(3),
.partial-sales-list-table-full td:nth-child(3) {
  width: 80px; /* Remaining column */
}

.partial-sales-list-table-full th:nth-child(4),
.partial-sales-list-table-full td:nth-child(4) {
  width: 90px; /* Bought @ column */
}

.partial-sales-list-table-full th:nth-child(5),
.partial-sales-list-table-full td:nth-child(5) {
  width: 90px; /* Sold @ column */
}

.partial-sales-list-table-full th:nth-child(6),
.partial-sales-list-table-full td:nth-child(6) {
  width: 90px; /* StarScore column */
}

.partial-sales-list-table-full th:nth-child(7),
.partial-sales-list-table-full td:nth-child(7) {
  width: 140px; /* Sale Change column */
}

.partial-sales-list-table-full th:nth-child(8),
.partial-sales-list-table-full td:nth-child(8) {
  width: 120px; /* Total Proceeds column */
}

.partial-sales-list-table-full th:nth-child(9),
.partial-sales-list-table-full td:nth-child(9) {
  width: 120px; /* Sale Profit column */
}

.partial-sales-list-table-full th:nth-child(10),
.partial-sales-list-table-full td:nth-child(10) {
  width: 160px; /* Buy/Sell buttons column - increased width */
  padding: 0.5em 0.3em; /* Add some padding to prevent cutoff */
}

/* Responsive adjustments for partial sales table */
@media (max-width: 1200px) {
  .partial-sales-list-table-full th:nth-child(2),
  .partial-sales-list-table-full td:nth-child(2) {
    width: 100px; /* Reduce actor name column on smaller screens */
  }
  
  .partial-sales-list-table-full th:nth-child(7),
  .partial-sales-list-table-full td:nth-child(7) {
    width: 120px; /* Reduce sale change column */
  }
  
  .partial-sales-list-table-full th:nth-child(8),
  .partial-sales-list-table-full td:nth-child(8) {
    width: 100px; /* Reduce total proceeds column */
  }
  
  .partial-sales-list-table-full th:nth-child(9),
  .partial-sales-list-table-full td:nth-child(9) {
    width: 100px; /* Reduce sale profit column */
  }
  
  .partial-sales-list-table-full th:nth-child(10),
  .partial-sales-list-table-full td:nth-child(10) {
    width: 150px; /* Maintain adequate width for buttons on smaller screens */
  }
}

/* Sortable headers for partial sales table */
.partial-sales-list-table-full th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.2s ease;
}

.partial-sales-list-table-full th.sortable .sort-arrow {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4em;
  color: #666;
  font-size: 0.8em;
}

.partial-sales-list-table-full th.sortable:hover {
  background-color: #f0f0f0;
}

.partial-sales-list-table-full th.sortable.active .sort-arrow {
  color: #178aff;
}

/* Dark mode styles for partial sales list views */
body.dark-mode .mobile-partial-sale-card {
  border-bottom-color: #444;
}

body.dark-mode .mobile-partial-sale-name {
  color: #fff;
}

body.dark-mode .mobile-partial-sale-metric-label {
  color: #999;
}

body.dark-mode .mobile-partial-sale-metric-value {
  color: #e0e6ed;
}

body.dark-mode .mobile-partial-sale-metric-value.starscore-value {
  color: #5faeff;
}

body.dark-mode .mobile-partial-sale-metric-value.market-value {
  color: #22b14c;
}

body.dark-mode .mobile-partial-sale-value-display {
  color: #22b14c;
}

body.dark-mode .mobile-partial-sale-value-display.market-value {
  color: #22b14c;
}

body.dark-mode .mobile-partial-sale-value-display.starscore-value {
  color: #5faeff;
}

body.dark-mode .mobile-partial-sale-metric-value.positive {
  color: #22b14c;
}

body.dark-mode .mobile-partial-sale-metric-value.negative {
  color: #e8413a;
}

body.dark-mode .partial-sales-list-table-full {
  background: #181818 !important;
  color: #e0e6ed !important;
}

body.dark-mode .partial-sales-list-table-full th,
body.dark-mode .partial-sales-list-table-full td {
  background: #181818 !important;
  color: #e0e6ed !important;
  border-color: #232323 !important;
}

body.dark-mode .partial-sales-list-table-full th {
  font-weight: 700;
  color: #5faeff !important;
  background: #191a1d !important;
}

body.dark-mode .partial-sales-list-table-full th.sortable:hover {
  background: #232c38 !important;
}

body.dark-mode .partial-sales-list-table-full tr {
  background: #181818 !important;
}

body.dark-mode .partial-sales-list-table-full tbody tr:nth-child(even) {
  background: #20232a !important;
}

body.dark-mode .partial-sales-list-table-full tbody tr:nth-child(odd) {
  background: #181818 !important;
}

body.dark-mode .partial-sales-list-table-full tbody tr td {
  background: inherit !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-list-link {
  color: #5faeff !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-list-link:hover {
  color: #7bb8ff !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-list-bought-in,
body.dark-mode .partial-sales-list-table-full td .partial-sales-list-sold-at,
body.dark-mode .partial-sales-list-table-full td .partial-sales-list-starscore {
  color: #5faeff !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-list-change.up,
body.dark-mode .partial-sales-list-table-full td .partial-sales-list-profit.up {
  color: #22b14c !important;
}

/* More specific selector to override general table cell color */
body.dark-mode .partial-sales-list-table-full tbody tr td.partial-sales-list-change.up,
body.dark-mode .partial-sales-list-table-full tbody tr td.partial-sales-list-profit.up {
  color: #22b14c !important;
}

/* Even more specific to override the general td color rule */
body.dark-mode .partial-sales-list-table-full td.partial-sales-list-change.up,
body.dark-mode .partial-sales-list-table-full td.partial-sales-list-profit.up {
  color: #22b14c !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-list-change.down,
body.dark-mode .partial-sales-list-table-full td .partial-sales-list-profit.down {
  color: #e8413a !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-sell-btn {
  background: #e8413a !important;
  color: #fff !important;
  border: 2px solid #c0392b !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-sell-btn:hover {
  background: #c0392b !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-buy-btn {
  background: #22b14c !important;
  color: #fff !important;
  border: 2px solid #18832f !important;
}

body.dark-mode .partial-sales-list-table-full td .partial-sales-buy-btn:hover {
  background: #18832f !important;
}

body.dark-mode .partial-sales-list-table-full th.sortable .sort-arrow.active {
  color: #5faeff !important;
}

/* Responsive styles for partial sales list views */
@media (max-width: 900px) {
  .partial-sales-list-table-full {
    display: none !important;
  }
  
  .mobile-partial-sales-list {
    display: block !important;
  }
}

@media (max-width: 700px) {
  .mobile-partial-sale-action-buttons {
    justify-content: center;
  }
}

/* ===== Sell Strategies Styles ===== */
.actor-card-sell-strategies-btn {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}


.actor-card-sell-strategies-btn.expanded {
  background: rgba(95, 174, 255, 0.2);
  color: #4a90e2;
}

.actor-card-sell-strategies-btn .material-icons {
  font-size: 20px;
}

.actor-card-sell-strategies-area {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 400px;
  opacity: 1;
}

.actor-card-sell-strategies-area.collapsed {
  max-height: 0;
  opacity: 0;
}

.sell-strategies-content {
  padding: 16px;
  max-height: 350px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc;
}

.sell-strategies-content::-webkit-scrollbar {
  width: 6px;
}

.sell-strategies-content::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 3px;
}

.sell-strategies-content::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.sell-strategies-content::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

.sell-strategies-loading {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 20px;
}

.sell-strategies-error {
  text-align: center;
  color: #dc3545;
  font-weight: 600;
  padding: 20px;
}

.sell-strategies-header {
  margin-bottom: 16px;
  text-align: center;
}

.sell-strategies-header h4 {
  text-transform: uppercase;
  color: #495057;
  font-size: 1.1rem;
  font-weight: 600;
}

.sell-strategies-header p {
  margin: 0 0 12px 0;
  color: #6c757d;
  font-size: 0.75rem;
}

.sell-strategies-recommendation {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
  margin: 0;
  max-width: none;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sell-strategies-recommendation.triggered {
  background: #28a745 !important;
  color: white !important;
}

.sell-strategies-recommendation.safe {
  background: #dc3545 !important;
  color: white !important;
}

.sell-strategies-recommendation.completed {
  background: #007bff !important;
  color: white !important;
}

.sell-strategies-recommendation.insufficient-data {
  background: #6c757d;
  color: white;
}

.sell-strategies-recommendations {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 12px;
  justify-content: flex-start;
  align-items: center;
}

.sell-strategies-recommendation.watch {
  background: #ffc107 !important;
  color: #212529 !important;
}

.sell-strategies-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.strategy-category {
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.strategy-category-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.strategy-category-header h5 {
  margin: 0 0 4px 0;
  color: #495057;
  font-size: 1rem;
  font-weight: 600;
}

.strategy-category-header p {
  margin: 0;
  color: #6c757d;
  font-size: 0.75rem;
  line-height: 1.3;
}

.strategy-category-content {
  padding: 8px 0;
}

.sell-strategies-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.strategy-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 0;
  border-left: 4px solid #dee2e6;
  background: transparent;
  transition: all 0.2s ease;
  margin: 0;
}

.strategy-item:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.strategy-item.triggered {
  border-left-color: #28a745;
  background: #f8fff9;
}

.strategy-item.watch {
  border-left-color: #ffc107;
  background: #fffdf8;
}

.strategy-item.safe {
  border-left-color: #dc3545;
  background: #fff8f8;
}

.strategy-item.completed {
  border-left-color: #007bff;
  background: #f8fbff;
}

.strategy-item.insufficient-data {
  border-left-color: #6c757d;
  background: #f8f9fa;
}

.strategy-icon {
  font-size: 1.2rem;
  min-width: 24px;
  text-align: center;
  margin-top: 2px;
}

.strategy-info {
  flex: 1;
  min-width: 0;
}

.strategy-name {
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.strategy-description {
  color: #6c757d;
  font-size: 0.85rem;
  margin-bottom: 4px;
  font-style: italic;
}

.strategy-details {
  font-family: var(--font-code);
  font-size: 0.9rem;
  font-weight: 500;
}

.strategy-action {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  min-width: 60px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #6c757d;
  color: white;
}

.sell-strategies-content .strategy-action.triggered {
  background: #28a745 !important;
  color: white !important;
}

.sell-strategies-content .strategy-action.watch {
  background: #ffc107 !important;
  color: #212529 !important;
}

.sell-strategies-content .strategy-action.safe {
  background: #dc3545 !important;
  color: white !important;
}

.sell-strategies-content .strategy-action.completed {
  background: #007bff !important;
  color: white !important;
}

.strategy-action.insufficient-data {
  background: #6c757d;
  color: white;
}

/* Dark Mode Styles for Sell Strategies */
body.dark-mode .actor-card-sell-strategies-btn {
  color: #5faeff;
}

body.dark-mode .actor-card-sell-strategies-btn:hover {
  background: rgba(95, 174, 255, 0.15);
}

body.dark-mode .actor-card-sell-strategies-btn.expanded {
  background: rgba(95, 174, 255, 0.25);
  color: #4a90e2;
}


body.dark-mode .sell-strategies-loading {
  color: #a0aec0;
}

body.dark-mode .sell-strategies-error {
  color: #f56565;
}

body.dark-mode .sell-strategies-header h4 {
  color: #e2e8f0;
}

body.dark-mode .sell-strategies-header p {
  color: #a0aec0;
}

body.dark-mode .sell-strategies-recommendation.triggered {
  background: #48bb78 !important;
  color: white !important;
}

body.dark-mode .sell-strategies-recommendation.safe {
  background: #f56565 !important;
  color: white !important;
}

body.dark-mode .sell-strategies-recommendation.completed {
  background: #5faeff !important;
  color: white !important;
}

body.dark-mode .sell-strategies-recommendation.watch {
  background: #f6ad55 !important;
  color: #2d3748 !important;
}

body.dark-mode .sell-strategies-recommendations {
  gap: 8px;
}

body.dark-mode .sell-strategies-recommendation.insufficient-data {
  background: #718096;
  color: white;
}

body.dark-mode .strategy-category {
  background: #4a5568;
  border-color: #718096;
}

body.dark-mode .strategy-category-header {
  background: #2d3748;
  border-bottom-color: #718096;
}

body.dark-mode .strategy-category-header h5 {
  color: #e2e8f0;
}

body.dark-mode .strategy-category-header p {
  color: #a0aec0;
}

body.dark-mode .strategy-item {
  background: transparent;
  border-left-color: #718096;
}

body.dark-mode .strategy-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.dark-mode .strategy-item.triggered {
  border-left-color: #48bb78;
  background: #2d3748;
}

body.dark-mode .strategy-item.watch {
  border-left-color: #ed8936;
  background: #2d3748;
}

body.dark-mode .strategy-item.safe {
  border-left-color: #f56565;
  background: #2d3748;
}

body.dark-mode .strategy-item.completed {
  border-left-color: #5faeff;
  background: #2d3748;
}

body.dark-mode .strategy-item.insufficient-data {
  border-left-color: #718096;
  background: #2d3748;
}

body.dark-mode .strategy-name {
  color: #e2e8f0;
}

body.dark-mode .strategy-description {
  color: #a0aec0;
}

body.dark-mode .strategy-details {
  color: #e2e8f0;
}

body.dark-mode .sell-strategies-content .strategy-action.triggered {
  background: #48bb78 !important;
  color: white !important;
}

body.dark-mode .sell-strategies-content .strategy-action.watch {
  background: #f6ad55 !important;
  color: #2d3748 !important;
}

body.dark-mode .sell-strategies-content .strategy-action.safe {
  background: #f56565 !important;
  color: white !important;
}

body.dark-mode .sell-strategies-content .strategy-action.completed {
  background: #5faeff !important;
  color: white !important;
}

body.dark-mode .strategy-action.insufficient-data {
  background: #718096;
  color: white;
}

/* Mobile Responsive Styles for Sell Strategies */
@media (max-width: 600px) {
  .actor-card-sell-strategies-btn {
    padding: 6px;
    margin-left: 4px;
  }
  
  
  .sell-strategies-content {
    padding: 12px;
  }
  
  .strategy-item {
    padding: 10px;
    gap: 10px;
  }
  
  .strategy-name {
    font-size: 0.9rem;
  }
  
  .strategy-description {
    font-size: 0.8rem;
  }
  
  .strategy-details {
    font-size: 0.85rem;
  }
  
  .sell-strategies-recommendations {
    gap: 4px;
    flex-wrap: wrap;
  }
  
  .sell-strategies-recommendation {
    font-size: 0.75rem;
    padding: 4px 8px;
    letter-spacing: 0.2px;
  }
}

/* ==============================================================
   MARKET METER STYLES
============================================================== */

#market-meter-container {
  margin: var(--spacing-lg) 0;
}

.market-meter-row {
  display: flex;
  justify-content: space-around;
  gap: var(--spacing-md);
  flex-wrap: nowrap;
}

.market-meter-box {
  background: var(--card-bg, #fff);
  border-radius: 1rem;
  box-shadow: 0 2px 8px #0002;
  padding: 1.2rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 220px;
  flex: 1;
  transition: transform 0.2s ease-out;
}





.market-meter-box .market-meter-label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: .75rem;
  font-weight: 500;
  margin-bottom: 0.4em;
  color: var(--color-text-secondary);
}

.market-meter-box .market-meter-num {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-code);
  letter-spacing: 0.02em;
  margin-bottom: 0.2em;
}

.market-meter-box .market-meter-num.up {
  color: #22b14c; /* green */
}

.market-meter-box .market-meter-num.down {
  color: #e8413a; /* red */
}

.market-meter-box .market-meter-pct {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.market-meter-box .market-meter-status {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 0.5rem;
  margin-top: 0.2em;
}



/* Dark Mode Support */
body.dark-mode .market-meter-box {
  background: #222;
  color: #eee;
  box-shadow: 0 2px 8px #0006;
}

body.dark-mode .market-meter-box .market-meter-label {
  color: #9bb0c8;
}

body.dark-mode .market-meter-box .market-meter-pct {
  color: #9bb0c8;
}

body.dark-mode .market-meter-box.up .market-meter-status {
  background: #1a3a1a;
  color: #22b14c;
}

body.dark-mode .market-meter-box.down .market-meter-status {
  background: #3a1a1a;
  color: #e8413a;
}



@media (max-width: 700px) {
  .market-meter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.7rem !important;
  }
  
  .market-meter-box {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem;
    font-size: 0.97em;
  }
  
  .market-meter-box .market-meter-label {
    font-size: 0.97em;
    margin-bottom: 0.25em;
  }
  
  .market-meter-box .market-meter-num {
    font-size: 1.2em;
  }
  
  .market-meter-box .market-meter-pct {
    font-size: 0.85em;
  }
  
  .market-meter-box .market-meter-status {
    font-size: 0.75em;
    padding: 3px 6px;
  }
}

/* Market Chart Styles */
#market-chart-container {
  display: flex !important;
  flex-direction: row !important;
  gap: 1.5rem !important;
  justify-content: center !important;
  align-items: stretch !important;
  text-align: center;
  margin: 0 0 1.2em 0;
}

.market-chart-card {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  box-shadow: 0 2px 8px #0002;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  transition: transform 0.2s ease-out;
  width: 100%;
}



.market-chart-wrapper {
  background: rgba(255, 255, 255);
  border-radius: 1rem;
  box-shadow: 0 2px 8px #0002;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  transition: transform 0.2s ease-out;
}

.market-chart-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: var(--drop-shadow-2);
}

.market-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.market-chart-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.market-chart-stats {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.market-chart-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.market-chart-stat .stat-label {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.market-chart-stat .stat-value {
  font-weight: 600;
  font-family: var(--font-code);
}

.market-chart-stat .stat-value.up {
  color: #22b14c;
}

.market-chart-stat .stat-value.down {
  color: #e8413a;
}

.market-chart-canvas-container {
  position: relative;
  height: 400px;
  margin-bottom: var(--spacing-lg);
}

.market-chart-legend {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.legend-color.up {
  background: #22b14c;
}

.legend-color.down {
  background: #e8413a;
}

.legend-color.line {
  background: #22b14c;
}

.legend-label {
  font-weight: 500;
}

.market-chart-error {
  text-align: center;
  color: var(--color-text-secondary);
  font-style: italic;
  padding: var(--spacing-lg);
}

/* Market Chart Controls */
.market-chart-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

/* Market Chart Tabs */
.market-chart-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0.5rem;
  padding: 0.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive tabs - force vertical layout on mobile */
.market-chart-tabs-responsive {
  /* Default horizontal layout */
  flex-direction: row;
}

/* Mobile responsive - force vertical layout */
@media (max-width: 700px) {
  .market-chart-tabs-responsive {
    flex-direction: column !important;
    width: 100%;
    gap: 0.25rem;
  }
  
  .market-chart-tabs-responsive .market-chart-tab {
    flex: none !important;
    width: 100% !important;
    min-height: 44px;
    padding: 0.6rem 1rem;
  }
}

@media (max-width: 600px) {
  .market-chart-tabs-responsive {
    gap: 0.2rem;
  }
  
  .market-chart-tabs-responsive .market-chart-tab {
    min-height: 48px;
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
  }
}

.market-chart-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.market-chart-tab:hover {
  background: var(--color-hover, #f5f5f5);
  color: var(--color-text-primary);
}

.market-chart-tab.active {
  background: var(--color-primary, #007bff);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.market-chart-tab .material-icons {
  font-size: 1rem;
}

.market-chart-date-navigation-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.market-chart-date-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0.5rem;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.market-chart-date-nav-btn:hover {
  background: var(--color-hover, #f5f5f5);
  border-color: var(--color-primary, #007bff);
}

.market-chart-date-nav-btn .material-icons {
  font-size: 1.2rem;
}

.market-chart-date-picker-container,
.market-chart-time-range-container {
  position: relative;
}

.market-chart-date-picker-btn,
.market-chart-time-range-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0.5rem;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.market-chart-date-picker-btn:hover,
.market-chart-time-range-btn:hover {
  background: var(--color-hover, #f5f5f5);
  border-color: var(--color-primary, #007bff);
}

.market-chart-date-picker-btn.active,
.market-chart-time-range-btn.active {
  background: var(--color-primary, #007bff);
  color: white;
  border-color: var(--color-primary, #007bff);
}

.market-chart-date-picker-btn .material-icons,
.market-chart-time-range-btn .material-icons {
  font-size: 1rem;
}

.market-chart-date-picker-popup,
.market-chart-time-range-popup {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  background: var(--card-bg, #fff);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  margin-top: 0.5rem;
}

.market-chart-date-picker-header,
.market-chart-time-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--color-border, #ddd);
  font-weight: 600;
}

.market-chart-date-close-btn,
.market-chart-time-range-close-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

.market-chart-date-close-btn:hover,
.market-chart-time-range-close-btn:hover {
  background: var(--color-hover, #f5f5f5);
}

.market-chart-date-picker-content {
  padding: 1rem;
}

/* Custom Calendar Styles */
.market-chart-custom-calendar {
  width: 100%;
  max-width: 300px;
}

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

.calendar-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0.25rem;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-nav-btn:hover {
  background: var(--color-hover, #f5f5f5);
  border-color: var(--color-primary, #007bff);
}

.calendar-nav-btn .material-icons {
  font-size: 1rem;
}

.calendar-month-year {
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text-primary);
}

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

.weekday {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: 0.5rem 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}

.calendar-day {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  margin: 0 auto;
}

.calendar-day:hover {
  background: var(--color-hover, #f5f5f5);
  border-color: var(--color-primary, #007bff);
}

.calendar-day.empty {
  cursor: default;
  background: transparent;
}

.calendar-day.empty:hover {
  background: transparent;
  border-color: transparent;
}

.calendar-day.today {
  border-color: var(--color-primary, #007bff);
  font-weight: 600;
}

.calendar-day.selected {
  background: var(--color-primary, #007bff);
  color: white;
  border-color: var(--color-primary, #007bff);
}

.calendar-day.has-data {
  background: #e8f4fd;
  color: #0056b3;
  font-weight: 500;
}

.calendar-day.has-data:hover {
  background: #d1e7fd;
}

.calendar-day.selected.has-data {
  background: var(--color-primary, #007bff);
  color: white;
}



.market-chart-time-range-content {
  padding: 1rem;
}

.market-chart-time-range-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.market-chart-time-range-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0.25rem;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.market-chart-time-range-option:hover {
  background: var(--color-hover, #f5f5f5);
  border-color: var(--color-primary, #007bff);
}

.market-chart-time-range-option.active {
  background: var(--color-primary, #007bff);
  color: white;
  border-color: var(--color-primary, #007bff);
}

.market-chart-date-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.market-chart-date-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.market-chart-date-input-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.market-chart-date-input-group input[type="date"] {
  padding: 0.5rem;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 0.25rem;
  font-size: 0.9rem;
  background: var(--card-bg, #fff);
  color: var(--color-text-primary);
}

.market-chart-date-input-group input[type="date"]:focus {
  outline: none;
  border-color: var(--color-primary, #007bff);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.market-chart-date-actions {
  display: flex;
  gap: 0.5rem;
}

.market-chart-date-apply-btn,
.market-chart-date-clear-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.25rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.market-chart-date-apply-btn {
  background: var(--color-primary, #007bff);
  color: white;
}

.market-chart-date-apply-btn:hover {
  background: var(--color-primary-dark, #0056b3);
}

.market-chart-date-clear-btn {
  background: var(--color-secondary, #6c757d);
  color: white;
}

.market-chart-date-clear-btn:hover {
  background: var(--color-secondary-dark, #545b62);
}

/* Dark Mode Support for Market Chart */
body.dark-mode .market-chart-card {
  background: #222;
  color: #eee;
  box-shadow: 0 2px 8px #0006;
}



body.dark-mode .market-chart-wrapper {
  background: #222;
  color: #eee;
  box-shadow: 0 2px 8px #0006;
}

body.dark-mode .market-chart-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px #0008;
}

body.dark-mode .market-chart-title {
  color: #e0e6ed;
}

body.dark-mode .market-chart-stat .stat-label {
  color: #9bb0c8;
}

body.dark-mode .market-chart-stat .stat-value.up {
  color: #22b14c;
}

body.dark-mode .market-chart-stat .stat-value.down {
  color: #e8413a;
}

body.dark-mode .legend-item {
  color: #9bb0c8;
}

body.dark-mode .market-chart-error {
  color: #9bb0c8;
}

/* Dark Mode Support for Market Chart Controls */
body.dark-mode .market-chart-tabs {
  background: #222;
  border-color: #444;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode .market-chart-tab {
  color: #9bb0c8;
}

body.dark-mode .market-chart-tab:hover {
  background: #333;
  color: #e0e6ed;
}

body.dark-mode .market-chart-tab.active {
  background: #5faeff;
  color: #000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.dark-mode .market-chart-date-picker-btn,
body.dark-mode .market-chart-time-range-btn {
  background: #222;
  border-color: #444;
  color: #e0e6ed;
}

body.dark-mode .market-chart-date-picker-btn:hover,
body.dark-mode .market-chart-time-range-btn:hover {
  background: #333;
  border-color: #5faeff;
}

body.dark-mode .market-chart-date-picker-btn.active,
body.dark-mode .market-chart-time-range-btn.active {
  background: #5faeff;
  color: #000;
  border-color: #5faeff;
}

body.dark-mode .market-chart-date-picker-popup,
body.dark-mode .market-chart-time-range-popup {
  background: #222;
  border-color: #444;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .market-chart-date-picker-header,
body.dark-mode .market-chart-time-range-header {
  border-color: #444;
  color: #e0e6ed;
}

body.dark-mode .market-chart-date-close-btn,
body.dark-mode .market-chart-time-range-close-btn {
  color: #9bb0c8;
}

body.dark-mode .market-chart-date-close-btn:hover,
body.dark-mode .market-chart-time-range-close-btn:hover {
  background: #333;
}

body.dark-mode .market-chart-time-range-option {
  background: transparent;
  border-color: #444;
  color: #e0e6ed;
}

body.dark-mode .market-chart-time-range-option:hover {
  background: #333;
  border-color: #5faeff;
}

body.dark-mode .market-chart-time-range-option.active {
  background: #5faeff;
  color: #000;
  border-color: #5faeff;
}

body.dark-mode .market-chart-date-input-group label {
  color: #9bb0c8;
}

body.dark-mode .market-chart-date-input-group input[type="date"] {
  background: #333;
  border-color: #444;
  color: #e0e6ed;
}

body.dark-mode .market-chart-date-input-group input[type="date"]:focus {
  border-color: #5faeff;
  box-shadow: 0 0 0 2px rgba(95, 174, 255, 0.25);
}

body.dark-mode .market-chart-date-apply-btn {
  background: #5faeff;
  color: #000;
}

body.dark-mode .market-chart-date-apply-btn:hover {
  background: #4a9eff;
}

body.dark-mode .market-chart-date-clear-btn {
  background: #666;
  color: #fff;
}

body.dark-mode .market-chart-date-clear-btn:hover {
  background: #777;
}

body.dark-mode .market-chart-date-nav-btn {
  background: #222;
  border-color: #444;
  color: #eee;
}

body.dark-mode .market-chart-date-nav-btn:hover {
  background: #333;
  border-color: #007bff;
}

/* Dark Mode Support for Custom Calendar */
body.dark-mode .calendar-nav-btn {
  background: transparent;
  border-color: #444;
  color: #eee;
}

body.dark-mode .calendar-nav-btn:hover {
  background: #333;
  border-color: #007bff;
}

body.dark-mode .calendar-month-year {
  color: #e0e6ed;
}

body.dark-mode .weekday {
  color: #9bb0c8;
}

body.dark-mode .calendar-day {
  color: #e0e6ed;
}

body.dark-mode .calendar-day:hover {
  background: #333;
  border-color: #007bff;
}

body.dark-mode .calendar-day.has-data {
  background: #1a3a4a;
  color: #5faeff;
}

body.dark-mode .calendar-day.has-data:hover {
  background: #2a4a5a;
}

body.dark-mode .calendar-day.selected.has-data {
  background: #007bff;
  color: white;
}



/* Mobile Responsive for Market Chart */
@media (max-width: 700px) {
  .market-chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .market-chart-stats {
    gap: var(--spacing-md);
  }
  
  .market-chart-controls {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  /* Chart tabs are now handled by .market-chart-tabs-responsive */
  
  .market-chart-date-picker-popup,
  .market-chart-time-range-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 320px;
    margin-top: 0;
  }
  
  .market-chart-canvas-container {
    height: 300px;
  }
  
  .market-chart-legend {
    gap: var(--spacing-md);
  }
}

@media (max-width: 600px) {
  .market-chart-wrapper {
    padding: var(--spacing-md);
  }
  
  .market-chart-title {
    font-size: 1.3rem;
  }
  
  .market-chart-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .market-chart-controls {
    gap: 0.5rem;
  }
  
  /* Chart tabs are now handled by .market-chart-tabs-responsive */
  
  .market-chart-date-picker-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }
  
  .market-chart-date-nav-btn {
    width: 1.8rem;
    height: 1.8rem;
  }
  
  .market-chart-date-nav-btn .material-icons {
    font-size: 1rem;
  }
  
  .market-chart-canvas-container {
    height: 250px;
  }
  
  .market-chart-legend {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}

/* ===== Portfolio Grid View ===== */
#portfolio-content.grid-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

/* Desktop layout - buttons stay inline with StarScore */
.actor-card-statscore-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==============================================================
   ABOUT HOLLYWOOD STOCKER STYLES
============================================================== */

.about-hollywood-stocker-content {  
  margin: 0 auto;
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8f0ff;
}

body.dark-mode .about-hollywood-stocker-content {
  border-color: #3a4f6f;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Main Section Headers */
.about-hollywood-stocker-content h3 {
  font-family: "Roboto Slab", serif !important;
  font-size: 1.8rem;
  font-weight: 700;
  color: #178aff;
  margin: 2.5rem 0 1.5rem 0;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid #e8f0ff;
  position: relative;
}

.about-hollywood-stocker-content h3:first-child {
  margin-top: 0;
}

body.dark-mode .about-hollywood-stocker-content h3 {
  color: #5faeff;
  border-bottom-color: #3a4f6f;
}

/* Subsection Headers */
.about-hollywood-stocker-content h4 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 2rem 0 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid #178aff;
}

body.dark-mode .about-hollywood-stocker-content h4 {
  color: #e0e6ed;
  border-left-color: #5faeff;
}

/* Sub-subsection Headers */
.about-hollywood-stocker-content h5 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: #34495e;
  margin: 1.5rem 0 0.8rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.dark-mode .about-hollywood-stocker-content h5 {
  color: #cbd5e0;
}

/* Paragraphs */
.about-hollywood-stocker-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: #4a5568;
  margin-bottom: 1.2rem;
  text-align: justify;
}

body.dark-mode .about-hollywood-stocker-content p {
  color: #a0aec0;
}

/* Lists */
.about-hollywood-stocker-content ul,
.about-hollywood-stocker-content ol {
  margin: 1rem 0 1.5rem 2rem;
  padding-left: 0;
}

.about-hollywood-stocker-content li {
  font-size: 1rem;
  line-height: 1.6;
  color: #4a5568;
  margin-bottom: 0.8rem;
  position: relative;
}

body.dark-mode .about-hollywood-stocker-content li {
  color: #a0aec0;
}

/* Custom list markers - with higher specificity */
.about-hollywood-stocker-content ul {
  list-style: none !important;
}

.about-hollywood-stocker-content ul li {
  position: relative;
}

.about-hollywood-stocker-content ul li::before {
  content: "•" !important;
  color: #178aff !important;
  font-weight: bold !important;
  display: inline-block !important;
  width: 1.5em !important;
  margin-left: -1.5em !important;
  font-size: 1.2em !important;
  position: absolute !important;
  left: 0 !important;
}

body.dark-mode .about-hollywood-stocker-content ul li::before {
  color: #5faeff !important;
}

.about-hollywood-stocker-content ol {
  list-style: none !important;
  counter-reset: item;
}

.about-hollywood-stocker-content ol li {
  counter-increment: item;
  position: relative;
}

.about-hollywood-stocker-content ol li::before {
  content: counter(item) !important;
  color: #178aff !important;
  font-weight: bold !important;
  display: inline-block !important;
  width: 2em !important;
  margin-left: -2.5em !important;
  font-size: 0.9em !important;
  background: #e8f0ff !important;
  border-radius: 50% !important;
  text-align: center !important;
  line-height: 1.8 !important;
  position: absolute !important;
  left: 0 !important;
}

body.dark-mode .about-hollywood-stocker-content ol li::before {
  color: #5faeff !important;
  background: #3a4f6f !important;
}

/* Nested lists */
.about-hollywood-stocker-content ul ul,
.about-hollywood-stocker-content ol ol {
  margin: 0.5rem 0 0.5rem 1.5rem;
}

.about-hollywood-stocker-content ul ul li::before {
  content: "◦";
  color: #5a67d8;
}

body.dark-mode .about-hollywood-stocker-content ul ul li::before {
  color: #7c8bb8;
}

/* Tables */
.about-hollywood-stocker-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.dark-mode .about-hollywood-stocker-content table {
  background: #2a2f3e;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.about-hollywood-stocker-content th {
  background: linear-gradient(135deg, #178aff 0%, #0056b3 100%);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 1rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.dark-mode .about-hollywood-stocker-content th {
  background: linear-gradient(135deg, #5faeff 0%, #3182ce 100%);
}

.about-hollywood-stocker-content td {
  padding: 1rem;
  border-bottom: 1px solid #e8f0ff;
  font-size: 0.9rem;
  line-height: 1.5;
}

body.dark-mode .about-hollywood-stocker-content td {
  border-bottom-color: #3a4f6f;
}

.about-hollywood-stocker-content tr:last-child td {
  border-bottom: none;
}

.about-hollywood-stocker-content tr:hover {
  background: #f8faff;
}

body.dark-mode .about-hollywood-stocker-content tr:hover {
  background: #323a4e;
}

/* Code blocks */
.about-hollywood-stocker-content code {
  background: #f1f5f9;
  color: #1e293b;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-code);
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
}

body.dark-mode .about-hollywood-stocker-content code {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #475569;
}

/* Strong text */
.about-hollywood-stocker-content strong {
  color: #178aff;
  font-weight: 600;
}

body.dark-mode .about-hollywood-stocker-content strong {
  color: #5faeff;
}

/* Horizontal rule */
.about-hollywood-stocker-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #178aff 50%, transparent 100%);
  margin: 3rem 0;
  border-radius: 1px;
}

body.dark-mode .about-hollywood-stocker-content hr {
  background: linear-gradient(90deg, transparent 0%, #5faeff 50%, transparent 100%);
}

/* Strategy status indicators */
.about-hollywood-stocker-content .strategy-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-hollywood-stocker-content .strategy-status.sell {
  background: #dcfce7;
  color: #166534;
}

.about-hollywood-stocker-content .strategy-status.watch {
  background: #fef3c7;
  color: #92400e;
}

.about-hollywood-stocker-content .strategy-status.hold {
  background: #fee2e2;
  color: #991b1b;
}

.about-hollywood-stocker-content .strategy-status.complete {
  background: #dbeafe;
  color: #1e40af;
}

body.dark-mode .about-hollywood-stocker-content .strategy-status.sell {
  background: #1a3a1a;
  color: #22b14c;
}

body.dark-mode .about-hollywood-stocker-content .strategy-status.watch {
  background: #3a2a1a;
  color: #f6ad55;
}

body.dark-mode .about-hollywood-stocker-content .strategy-status.hold {
  background: #3a1a1a;
  color: #f56565;
}

body.dark-mode .about-hollywood-stocker-content .strategy-status.complete {
  background: #1a3a4a;
  color: #5faeff;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .about-hollywood-stocker-content {
    padding: 1.5rem;
    margin: 1rem;
    border-radius: 16px;
  }
  
  .about-hollywood-stocker-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
  }
  
  .about-hollywood-stocker-content h4 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem 0;
  }
  
  .about-hollywood-stocker-content h5 {
    font-size: 1rem;
    margin: 1.2rem 0 0.6rem 0;
  }
  
  .about-hollywood-stocker-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .about-hollywood-stocker-content li {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .about-hollywood-stocker-content table {
    font-size: 0.8rem;
  }
  
  .about-hollywood-stocker-content th,
  .about-hollywood-stocker-content td {
    padding: 0.8rem 0.6rem;
  }
  
  .about-hollywood-stocker-content ul,
  .about-hollywood-stocker-content ol {
    margin: 0.8rem 0 1.2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .about-hollywood-stocker-content {
    padding: 1rem;
    margin: 0.5rem;
  }
  
  .about-hollywood-stocker-content h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.8rem 0;
  }
  
  .about-hollywood-stocker-content h4 {
    font-size: 1.1rem;
    margin: 1.2rem 0 0.6rem 0;
  }
  
  .about-hollywood-stocker-content h5 {
    font-size: 0.95rem;
    margin: 1rem 0 0.5rem 0;
  }
  
  .about-hollywood-stocker-content p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .about-hollywood-stocker-content li {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .about-hollywood-stocker-content table {
    font-size: 0.75rem;
  }
  
  .about-hollywood-stocker-content th,
  .about-hollywood-stocker-content td {
    padding: 0.6rem 0.4rem;
  }
  
  .about-hollywood-stocker-content ul,
  .about-hollywood-stocker-content ol {
    margin: 0.6rem 0 1rem 1.2rem;
  }
}

/* ===== Responsive Table Styles for Mobile ===== */
@media (max-width: 600px) {
  .about-hollywood-stocker-content {
    overflow-x: hidden;
  }
  
  .about-hollywood-stocker-content table {
    display: block;
    overflow-x: visible;
    white-space: normal;
    border-radius: 8px;
    margin: 1rem 0;
    max-width: 100%;
    box-sizing: border-box;
    border-spacing: 0 !important;
    border-collapse: collapse !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  
  .about-hollywood-stocker-content table thead {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }
  
  .about-hollywood-stocker-content table tr:first-child {
    display: none !important;
  }
  
  .about-hollywood-stocker-content table tbody,
  .about-hollywood-stocker-content table tr {
    display: block;
  }
  
  .about-hollywood-stocker-content table th {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    visibility: hidden !important;
  }
  
  .about-hollywood-stocker-content table tr {
    border: 1px solid #e8f0ff;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: transparent;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  body.dark-mode .about-hollywood-stocker-content table tr {
    border-color: #3a4f6f;
  }
  
  .about-hollywood-stocker-content table td {
    display: block;
    text-align: left;
    padding: 0.5rem 0;
    border: none;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  body.dark-mode .about-hollywood-stocker-content table td {
    border-bottom-color: #444;
  }
  
  .about-hollywood-stocker-content table td:last-child {
    border-bottom: none;
  }
  
  .about-hollywood-stocker-content table td::before {
    content: attr(data-label) ": ";
    font-family: var(--font-heading);
    font-weight: 600;
    color: #178aff;
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  body.dark-mode .about-hollywood-stocker-content table td::before {
    color: #5faeff;
  }
  
  /* Specific styling for the Core Stock Categories table */
  .about-hollywood-stocker-content table td:nth-child(1)::before {
    content: "Category: ";
  }
  
  .about-hollywood-stocker-content table td:nth-child(2)::before {
    content: "Value Range: ";
  }
  
  .about-hollywood-stocker-content table td:nth-child(3)::before {
    content: "Description: ";
  }
  
  .about-hollywood-stocker-content table td:nth-child(4)::before {
    content: "Examples: ";
  }
  
}

/* ===== Extra Small Mobile Styles ===== */
@media (max-width: 400px) {
  .about-hollywood-stocker-content {
    padding: 0.8rem;
    margin: 0.3rem;
    border-radius: 12px;
    overflow-x: hidden;
  }
  
  .about-hollywood-stocker-content h3 {
    font-size: 1.2rem;
    margin: 1.2rem 0 0.6rem 0;
  }
  
  .about-hollywood-stocker-content h4 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem 0;
  }
  
  .about-hollywood-stocker-content h5 {
    font-size: 0.9rem;
    margin: 0.8rem 0 0.4rem 0;
  }
  
  .about-hollywood-stocker-content p {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  .about-hollywood-stocker-content li {
    font-size: 0.85rem;
    line-height: 1.3;
  }
  
  .about-hollywood-stocker-content table td {
    font-size: 0.8rem;
    padding: 0.4rem 0;
  }
  
  .about-hollywood-stocker-content table td::before {
    min-width: 70px;
    font-size: 0.8rem;
  }
  
  .about-hollywood-stocker-content ul,
  .about-hollywood-stocker-content ol {
    margin: 0.5rem 0 0.8rem 1rem;
  }
}

/* Mobile card expansion styles */
.mobile-portfolio-card.mobile-card-expanded {
  position: relative;
  z-index: 10;
  margin: 8px 0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  background: #fff;
  overflow: hidden;
}

body.dark-mode .mobile-portfolio-card.mobile-card-expanded {
  background: #1a1a1a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Ensure expanded mobile cards have proper spacing */
.mobile-portfolio-list .mobile-portfolio-card.mobile-card-expanded {
  margin: 12px 0;
}

/* Make sure expanded cards don't break mobile/tablet layout */
@media (max-width: 900px) {
  .mobile-portfolio-card.mobile-card-expanded {
    width: 100%;
    max-width: 100%;
  }
  
  /* Ensure the expanded card content fits well on mobile/tablet */
  .mobile-portfolio-card.mobile-card-expanded .actor-card {
    margin: 0;
    border-radius: 12px;
  }
  
  .mobile-portfolio-card.mobile-card-expanded .actor-card-header {
    padding: 12px;
  }

  .mobile-portfolio-card.mobile-card-expanded .actor-card-name {
    font-family: 'Roboto';
    font-size: 1rem;
  }
  
  .mobile-portfolio-card.mobile-card-expanded .actor-card-photo {
    width: 80px;
    height: 120px;
  }
  
  .mobile-portfolio-card.mobile-card-expanded .actor-card-chart-area {
    margin: 8px 0;
  }
  
  .mobile-portfolio-card.mobile-card-expanded .actor-card-bottom-row {
    padding: 8px 12px;
  }
  
  .mobile-portfolio-card.mobile-card-expanded .actor-card-actions {
    padding: 8px 12px;
  }

  /* Style the new emojis row for mobile/tablet expanded cards */
  .mobile-portfolio-card.mobile-card-expanded .actor-card-emojis-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
  }

  /* Center the actor card info section (name and emojis) */
  .mobile-portfolio-card.mobile-card-expanded .actor-card-info {
    text-align: center;
  }

  .mobile-portfolio-card.mobile-card-expanded .actor-card-name-row {
    display: flex;
    justify-content: center;
  }
}

/* Center sold actor card chart header on mobile */
@media (max-width: 900px) {
  .sold-actor-card-chart-header {
    text-align: center !important;
    justify-content: center !important;
  }
  
  .sold-actor-card-chart-header span {
    text-align: center !important;
  }
  
  /* Center sold actor card name and icons on mobile */
  .sold-actor-card-name-row {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
  }
  
  .sold-actor-card-name {
    text-align: center !important;
    margin-bottom: 4px !important;
  }
  
  .sold-actor-card-emojis-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
  }
}

/* General styling for actor card emojis row */
.actor-card-emojis-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.actor-card-ath-emoji,
.mobile-card-ath-emoji,
.portfolio-list-ath-emoji {
  font-size: 1.2em;
}

.mobile-card-ath-emoji {
  margin-left: 8px;
  margin-right: 4px;
}

.mobile-card-watch-emoji {
  margin-left: 8px;
  margin-right: 4px;
  font-size: 1.2em;
}

/* ===== Watch Emoji Styles ===== */
.actor-card-watch-emoji {
  font-size: 1.4em;
  margin: 0 0.3em;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* ===== Stock Ticker Styles ===== */
.stock-ticker {
  position: fixed;
  bottom: 70px; /* Increased clearance above footer to prevent overlap */
  left: 0;
  width: 100%;
  height: 50px; /* Optimal height for clean look */
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); /* Subtle gradient */
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #d0d0d0; /* Clean separation line */
  overflow: hidden;
  z-index: 101; /* Higher than footer to ensure border visibility */
  font-family: 'Roboto Mono', monospace;
  font-size: 13px; /* Slightly smaller for elegance */
  line-height: 50px; /* Perfect vertical centering */
  padding: 0;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.075); /* Subtle top shadow */
}

body.dark-mode .stock-ticker {
  background: linear-gradient(135deg, #1a1a1a 0%, #111111 100%); /* Subtle dark gradient */
  border-top-color: #333;
  border-bottom-color: #444; /* Clean dark separation line */
  color: var(--color-white, #fff);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3); /* Darker shadow for dark mode */
}

.ticker-content {
  display: flex;
  white-space: nowrap;
  /* Animation now handled by JavaScript for seamless looping */
}

.ticker-text {
  padding-right: 50px;
  color: var(--color-dark, #333);
}

body.dark-mode .ticker-text {
  color: var(--color-white, #fff);
}

.ticker-item {
  display: inline-block;
  margin-right: 40px; /* More spacing between items */
  white-space: nowrap;
  font-weight: 500; /* Slightly bolder for better readability */
  transition: opacity 0.2s ease; /* Smooth transitions */
}

/* Ticker name styling */
.ticker-name {
  color: #333; /* Dark in light mode */
  font-weight: 500;
}

body.dark-mode .ticker-name {
  color: #fff; /* Light in dark mode */
}

/* Ticker special emoji styling */
.ticker-special-emoji {
  margin-left: 4px;
  margin-right: 2px;
  font-size: 14px; /* Slightly larger for visibility */
}

/* Ticker ATH fire emoji styling */
.ticker-ath-emoji {
  margin-right: 2px;
  font-size: 14px; /* Same size as special emoji */
}

/* Ticker star styling */
.ticker-star {
  color: #1976d2; /* Blue color */
  font-size: 17.5px; /* 25% bigger than 14px */
  margin-right: 2px;
  vertical-align: middle; /* Center align vertically */
  line-height: 1; /* Prevent line-height from affecting vertical alignment */
  position: relative; /* Enable positioning */
  top: -3px; /* Move star up */
}

body.dark-mode .ticker-star {
  color: #64b5f6; /* Lighter blue for dark mode */
}

/* Ticker score styling */
.ticker-score {
  color: #1976d2; /* Blue color */
  font-weight: 700; /* Bold */
}

body.dark-mode .ticker-score {
  color: #64b5f6; /* Lighter blue for dark mode */
}

/* Ticker period styling */
.ticker-period {
  font-family: 'Roboto', sans-serif; /* Regular Roboto */
  font-size: 10px; /* Smaller size */
  font-weight: 400; /* Regular weight */
  text-transform: uppercase; /* Uppercase */
  color: #666; /* Gray color */
  margin-right: 4px; /* Small spacing before percentage */
}

body.dark-mode .ticker-period {
  color: #999; /* Lighter gray for dark mode */
}

/* Ticker change styling */
.ticker-change.up {
  color: #2e7d32; /* Professional green for gains */
}

.ticker-change.down {
  color: #d32f2f; /* Professional red for losses */
}

.ticker-change.neutral {
  color: #666;
  opacity: 0.8; /* Slightly faded for neutral items */
}

body.dark-mode .ticker-change.up {
  color: #4caf50; /* Brighter green for dark mode */
}

body.dark-mode .ticker-change.down {
  color: #f44336; /* Brighter red for dark mode */
}

body.dark-mode .ticker-change.neutral {
  color: #ccc;
  opacity: 0.7; /* More faded in dark mode */
}

/* Old CSS animation removed - now using JavaScript for seamless ticker */

/* Responsive adjustments */
@media (max-width: 850px) {
  .stock-ticker {
    bottom: 50px; /* Increased clearance for mobile footer */
    height: 30px; /* Optimal mobile height */
    font-size: 12px; /* Smaller font for mobile */
    line-height: 30px; /* Perfect vertical centering */
    padding: 0;
    -webkit-text-size-adjust: none; /* Prevent iOS text scaling */
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
  }
  
  .ticker-item {
    margin-right: 25px; /* Adjusted spacing for mobile */
    font-size: 12px !important; /* Force smaller font size on mobile */
    color: #555;
  }
  
  .ticker-text,
  .ticker-name,
  .ticker-score,
  .ticker-period,
  .ticker-change {
    font-size: 12px !important; /* Force smaller font size on mobile */
  }
  
  .ticker-special-emoji {
    font-size: 12px !important; /* Smaller emoji on mobile */
    margin-left: 2px;
    margin-right: 1px;
  }
  
  .ticker-ath-emoji {
    font-size: 12px !important; /* Smaller emoji on mobile */
    margin-right: 1px;
  }
  
  .ticker-star {
    font-size: 15px !important; /* 25% bigger than 12px */
    margin-right: 1px;
    vertical-align: middle; /* Center align vertically */
    line-height: 1; /* Prevent line-height from affecting vertical alignment */
    position: relative; /* Enable positioning */
    top: -2px; /* Move star up (smaller adjustment for mobile) */
  }
}

/* Additional mobile-specific media query for smaller screens */
@media (max-width: 480px) and (max-height: 800px) {
  .stock-ticker {
    font-size: 8px !important;
    height: 25px !important;
    line-height: 25px !important;
  }
  
  .ticker-period,
  .ticker-text {
    font-size: 8px !important;
  }
  
  .ticker-item,
  .ticker-name,
  .ticker-score,
  .ticker-change {
    font-size: 10px !important;
  }
  
  .ticker-special-emoji {
    font-size: 10px !important; /* Even smaller emoji on very small screens */
    margin-left: 1px;
    margin-right: 1px;
  }
  
  .ticker-ath-emoji {
    font-size: 10px !important; /* Even smaller emoji on very small screens */
    margin-right: 1px;
  }
  
  .ticker-star {
    font-size: 14px !important; /* Even smaller star on very small screens */
    margin-right: 1px;
    position: relative; /* Enable positioning */
    top: -2px; /* Move star up */
  }
}