/* Custom premium styling for Yangjian Dashboard */
:root {
  --bg-color: #0b0f19;
  --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #111827 100%);
  --card-bg: rgba(17, 24, 39, 0.7);
  --card-border: rgba(255, 255, 255, 0.06);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.15);
  
  --positive: #ef4444;
  --positive-glow: rgba(239, 68, 68, 0.15);
  --positive-text-glow: 0 0 10px rgba(239, 68, 68, 0.4);
  
  --negative: #10b981;
  --negative-glow: rgba(16, 185, 129, 0.15);
  --negative-text-glow: 0 0 10px rgba(16, 185, 129, 0.4);
  
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dashboard-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Glassmorphism Common Styles */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
}

/* Header Area */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 10px var(--primary));
}

.logo-text h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  background: linear-gradient(to right, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Segment Control */
.segment-control {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.segment-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 20px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
}

.segment-btn:hover {
  color: var(--text-main);
}

.segment-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* Main Content Layout */
.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Control Panel */
.control-panel {
  padding: 1.2rem 1.5rem;
}

.control-panel-main {
  width: 100%;
}

.selector-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.selector-container label {
  color: var(--text-muted);
  font-weight: 500;
}

.custom-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.custom-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.custom-select option {
  background: #111827;
  color: var(--text-main);
}

.date-badge {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.period-details {
  flex-wrap: wrap;
}

.refresh-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.refresh-button:hover:not(:disabled) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.refresh-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 3px;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.refresh-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform;
}

.refresh-button.is-refreshing .refresh-icon {
  animation: refresh-spin 0.8s linear infinite;
}

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

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 14px;
  color: var(--text-main);
  background: rgba(17, 24, 39, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition:
    opacity 0.24s cubic-bezier(0.4, 0, 1, 1),
    transform 0.32s cubic-bezier(0.4, 0, 1, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.16);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.26s cubic-bezier(0.4, 0, 1, 1),
    visibility 0s linear 0.32s;
}

.modal-overlay.is-open,
.modal-overlay.is-closing {
  visibility: visible;
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  transition:
    opacity 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear;
}

.modal-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

.modal-panel {
  width: min(880px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 1.5rem;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.96);
  transform-origin: center;
  transition:
    opacity 0.24s cubic-bezier(0.4, 0, 1, 1),
    transform 0.32s cubic-bezier(0.4, 0, 1, 1);
}

.modal-overlay.is-open .modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-overlay.is-closing .modal-panel {
  opacity: 0;
  transform: scale(0.96);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: var(--transition);
}

.modal-close-button:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.modal-close-button:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.6);
  outline-offset: 3px;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
}

.card-icon {
  font-size: 2.2rem;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-info {
  flex: 1;
}

.card-info h3 {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.card-info .value {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02rem;
}

.card-info .value.positive {
  color: var(--positive);
  text-shadow: var(--positive-text-glow);
}

.card-info .value.negative {
  color: var(--negative);
  text-shadow: var(--negative-text-glow);
}

.market-comparison {
  padding: 0.9rem 1.5rem 0.8rem;
}

.period-performance-group {
  display: flex;
  flex-direction: column;
}

.period-kpi-grid {
  display: grid;
}

.mobile-card-link {
  display: none;
}

.period-card-link {
  height: 1.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.5rem;
}

.period-card-link-node {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(165 180 252 / 35%);
}

.period-card-link-node::before,
.period-card-link-node::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 0.38rem;
  border-left: 1px dashed rgba(129, 140, 248, 0.28);
}

.period-card-link-node::before { top: 0; }
.period-card-link-node::after { bottom: 0; }

.period-card-link-node svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.market-comparison-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.market-comparison-heading h2 {
  flex: 1;
  min-width: 0;
}

.market-comparison-range {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.market-comparison-range-separator {
  margin: 0 0.25rem;
}

.market-comparison-items {
  --market-column-gap: clamp(1.5rem, 4vw, 4.5rem);
  --market-divider-offset: clamp(-2.25rem, -2vw, -0.75rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--market-column-gap);
}

.market-comparison-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 0.3rem 0;
}

.market-comparison-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--market-divider-offset);
  width: 1px;
  height: 1.75rem;
  background: rgba(148, 163, 184, 0.18);
  transform: translate(50%, -50%);
}

.market-comparison-name {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.market-comparison-point {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.market-comparison-quote {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  white-space: nowrap;
}

.market-comparison-quote .market-comparison-rate {
  color: inherit;
  font-size: 0.8rem;
  font-weight: 500;
}

.market-comparison-quote.positive { color: var(--positive); }
.market-comparison-quote.negative { color: var(--negative); }

.market-comparison-rate {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.market-comparison-rate.positive { color: var(--positive); }
.market-comparison-rate.negative { color: var(--negative); }

@media (max-width: 768px) {
  .period-kpi-grid {
    display: flex !important;
    flex-direction: column;
    gap: 0 !important;
  }

  .period-card-link {
    display: none;
  }

  .mobile-card-link {
    position: relative;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(165 180 252 / 35%);
  }

  .mobile-card-link::before,
  .mobile-card-link::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 1px;
    height: 0.38rem;
    border-left: 1px dashed rgba(129, 140, 248, 0.34);
  }

  .mobile-card-link::before { top: 0; }
  .mobile-card-link::after { bottom: 0; }

  .mobile-card-link svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .market-comparison-items {
    --market-column-gap: 2rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0.4rem;
  }

  .market-comparison-item::after {
    display: none;
  }

  .market-comparison-item {
    padding: 0.35rem 0;
  }
}

@media (max-width: 430px) {
  .market-comparison-heading {
    align-items: flex-start;
    flex-direction: row;
    gap: 1rem;
  }

  .market-comparison-period-heading {
    align-items: center;
  }

  .market-comparison-period-range {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    line-height: 1.35;
  }

  .market-comparison-items {
    grid-template-columns: 1fr;
    row-gap: 0.2rem;
  }

  .market-comparison-item {
    padding: 0.4rem 0;
  }

  .market-comparison-point {
    font-size: 1rem;
  }
}

.double-value {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.double-value .separator {
  color: var(--text-muted);
}

/* Chart Styles */
.chart-section {
  padding: 1.8rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary);
  padding-left: 0.8rem;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.data-freshness {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.glow-indicator {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  color: var(--positive);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  animation: pulse 2s infinite;
}

.updated-at {
  margin-top: -1rem;
  padding-left: 0.15rem;
  color: rgba(156, 163, 175, 0.72);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: right;
}

.footer-repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  color: #a5b4fc;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-repo-link:hover {
  color: var(--text-main);
}

.footer-repo-link:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.55);
  outline-offset: 4px;
  border-radius: 4px;
}

.footer-repo-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex: 0 0 auto;
}

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

.chart-container {
  position: relative;
  width: 100%;
  height: 350px;
}

.trend-subtitle {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 400;
}

.trend-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(156, 163, 175, 0.72);
  font-size: 0.9rem;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}

.trend-chart-container {
  position: relative;
  width: 100%;
  height: min(52vh, 360px);
  min-height: 240px;
}

.modal-trend-chart-container {
  height: min(52vh, 360px);
}

/* Details Section Table */
.details-section,
.trades-section {
  padding: 1.8rem;
}

.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

.details-table,
.trades-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.details-table th,
.details-table td,
.trades-table th,
.trades-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.details-table th,
.trades-table th {
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05rem;
}

.details-table tr:last-child td,
.trades-table tr:last-child td {
  border-bottom: none;
}

.details-table tbody tr,
.trades-table tbody tr {
  transition: var(--transition);
}

.details-table tbody tr:hover,
.trades-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.details-table tbody tr.day-detail-row {
  cursor: pointer;
}

.details-table tbody tr.day-detail-row:focus-visible {
  outline: 2px solid rgba(165, 180, 252, 0.6);
  outline-offset: -2px;
  background: rgba(99, 102, 241, 0.08);
}

.details-table tbody tr.day-detail-row:hover {
  background: rgba(99, 102, 241, 0.06);
}

.table-pnl {
  font-weight: 600;
}

.table-pnl.positive {
  color: var(--positive);
}

.table-pnl.negative {
  color: var(--negative);
}

/* Action Pills for Trade Operations */
.action-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.action-pill.buy {
  background: var(--positive-glow);
  color: var(--positive);
  border: 1px solid rgba(239, 68, 68, 0.2);
  text-shadow: var(--positive-text-glow);
}

.action-pill.sell {
  background: var(--negative-glow);
  color: var(--negative);
  border: 1px solid rgba(16, 185, 129, 0.2);
  text-shadow: var(--negative-text-glow);
}

/* Trade price styling */
.trade-buy {
  color: var(--positive);
  font-weight: 500;
}

.trade-sell {
  color: var(--negative);
  font-weight: 500;
}

/* Trade Date Cards */
.trades-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trade-date-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.trade-date-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.trade-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(99, 102, 241, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-date-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.details-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-calendar-icon {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
  flex: 0 0 auto;
  border-radius: 0.28rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.trade-date-icon {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
  flex: 0 0 auto;
  border-radius: 0.3rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.trade-date-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.trade-count-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.6rem;
  border-radius: 10px;
  font-weight: 500;
}

.trades-list {
  display: flex;
  flex-direction: column;
}

.trade-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: var(--transition);
}

.trade-item:last-child {
  border-bottom: none;
}

.trade-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.trade-item-number {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.trade-item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 1rem;
}

.trade-item-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.trade-item-symbol {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

.trade-item-price {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Outfit', monospace;
}

.trade-item-action {
  display: flex;
  align-items: center;
}

/* Status Badges */
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-pill.profit {
  background: var(--positive-glow);
  color: var(--positive);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-pill.loss {
  background: var(--negative-glow);
  color: var(--negative);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Footer Section */
.main-footer {
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive Rules */
@media(max-width: 768px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .segment-control {
    width: 100%;
    justify-content: space-around;
  }
  .control-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Extra Mobile Spacing Optimizations */
@media(max-width: 640px) {
  .details-table th,
  .details-table td,
  .trades-table th,
  .trades-table td {
    padding: 8px 8px !important;
    font-size: 0.75rem !important;
  }
  .trade-item-number,
  .trade-item-symbol,
  .trade-item-price {
    font-size: 0.75rem !important;
  }
  .glass-card {
    padding: 1rem !important;
  }
  .logo-icon {
    font-size: 2rem !important;
  }
  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    justify-content: center;
    transform: translateY(28px);
  }
  .toast.is-visible {
    transform: translateY(0);
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 12px;
  }
  .modal-panel {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 1rem;
    border-radius: 14px;
    transform: translateY(48px);
    transform-origin: bottom center;
  }
  .modal-overlay.is-open .modal-panel {
    transform: translateY(0);
  }
  .modal-overlay.is-closing .modal-panel {
    transform: translateY(48px);
  }
  .modal-title {
    font-size: 1rem;
  }
  .trend-chart-container {
    height: 46vh;
    min-height: 220px;
  }
  .trend-empty {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .modal-overlay,
  .modal-panel {
    transition-duration: 0.01ms !important;
  }
}
