/* =========================================
   COMPONENTS: 버튼, 폼, 테이블, 토스트 등
   ========================================= */

.hidden {
  display: none !important;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

/* 주가정보 - 기간별 변동률 비교 박스 (실전 매도 내역과 동일한 표 스타일로 통일) */
.price-info-comparison-table th {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.price-info-comparison-table td {
  border: none !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.price-info-comparison-table tr td:first-child {
  border-radius: 3px 0 0 3px;
}

.price-info-comparison-table tr td:last-child {
  border-radius: 0 3px 3px 0;
}

.panel-settings,
#alwaysVisibleInputs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-settings>* {
  margin: 0 !important;
}

/* 상단바 & 아이콘 버튼 */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--card-border);
  padding: 0 16px;
  margin-top: 4px;
  border-radius: 12px;
  flex-shrink: 0;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.led-lamp {
  width: 10px;
  height: 10px;
  background: #475569;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  transition: all 0.3s;
  flex-shrink: 0;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.led-on {
  background: #10b981 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8), inset 0 0 4px rgba(255, 255, 255, 0.5);
}

.led-loading {
  background: #f59e0b !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8), inset 0 0 4px rgba(255, 255, 255, 0.5);
  animation: blink 1s infinite;
}

.top-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 18px;
  min-width: 34px;
  padding: 5px 5px;
  gap: 0;
  font-family: inherit;
  font-weight: 600;
  white-space: nowrap;
}

.top-icon-btn .btn-text {
  font-size: 12px;
}

.top-icon-btn:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.top-icon-btn.active {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

/* 설정 오버레이 & 모달 */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(15px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s forwards;
}

.settings-modal {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.settings-modal h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  color: var(--primary);
  text-align: center;
}

/* 상태 패널 */
.status-panel {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 12px;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.status-panel-title {
  font-size: 10px;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.status-row span:first-child {
  color: var(--text-muted);
  font-weight: 600;
}

.status-row span:last-child {
  color: #fbbf24;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

.status-icon {
  transition: all 0.3s;
  opacity: 0.3;
  font-size: 14px;
}

.status-ready {
  opacity: 1 !important;
  color: var(--success);
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
}

/* 버튼 */
.btn-action {
  width: 100%;
  height: 38px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  color: white;
  text-transform: uppercase;
  font-size: 12px;
  padding: 0 10px;
  box-sizing: border-box;
}

.btn-instant {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.btn-perf {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.btn-run {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-save {
  background: linear-gradient(135deg, #10b981, #059669);
}

.btn-adv {
  background: rgba(51, 65, 85, 0.8);
}

.btn-action:hover {
  transform: translateY(-3px);
  filter: brightness(1.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-action:active {
  transform: scale(0.96);
}

.btn-icon-sub {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon-sub:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.btn-icon-sub.active {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

/* 폼 요소 */
.input-group {
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  width: 60px;
  flex-shrink: 0;
  white-space: nowrap;
}

input,
select {
  flex: 1;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 2px 4px;
  color: white;
  font-size: 11px;
  height: 22px;
  min-width: 0;
  outline: none;
  transition: all 0.2s;
  text-align: center;
  box-sizing: border-box;
}

select option {
  color: #000000 !important;
  background-color: #ffffff !important;
}

input:focus {
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  display: flex;
  justify-content: center;
  text-align: center;
}

/* 테이블 */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 1px 1px;
}

.data-table th {
  color: var(--text-muted);
  font-size: 11px !important;
  font-weight: 700;
  padding: 1px 0.5px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: -0.1px;
  -webkit-user-select: none;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.slot-title {
  text-align: center;
  padding: 2px 0;
  font-weight: bold;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table td {
  background: rgba(255, 255, 255, 0.02) !important;
  padding: 2px 0.5px;
  text-align: center;
  border: none !important;
  font-size: var(--app-font-size, 10.5px) !important;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

.data-table tr td:first-child {
  border-radius: 3px 0 0 3px;
}

.data-table tr td:last-child {
  border-radius: 0 3px 3px 0;
}

.section-header {
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 2px;
}

.section-header h2 {
  flex: 1;
  text-align: left;
}

.panel-header-stats {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  align-items: center;
}

.panel-order h2,
.panel-monthly h2 {
  font-size: 14px !important;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.sub-actions-container {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

h2:hover {
  opacity: 0.8;
}

.metric-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 4px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all 0.2s;
}

.metric-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.metric-label {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.metric-value {
  color: #fff;
  font-size: 10px;
  font-weight: 400;
}

/* 로그인 */
.login-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, #1e1b4b, #020617 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
  box-sizing: border-box;
  animation: fadeIn 0.8s ease-out;
}

.login-container .login-inner {
  background: var(--card);
  padding: 50px;
  border-radius: 32px;
  width: 100%;
  max-width: 400px;
  backdrop-filter: blur(30px);
  border: 1px solid var(--card-border);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.login-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.login-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  padding: 16px;
  border-radius: 14px;
  color: white;
  margin-bottom: 16px;
  box-sizing: border-box;
  font-size: 14px;
  outline: none;
}

.login-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 14px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s;
}

/* 색상 클래스 */
.val-plus {
  color: #3b82f6 !important;
  font-weight: 700;
}

.val-minus {
  color: var(--danger) !important;
  font-weight: 700;
}

#statsTable .val-plus,
#statsTable .val-minus {
  font-weight: 400;
}

.stats-profit-rate {
  font-size: calc(100% - 2px) !important;
  font-weight: inherit !important;
  opacity: 0.8 !important;
  line-height: 1;
}

.buy {
  color: #ef4444 !important;
  font-weight: 700;
}

.buy-price {
  color: #ef4444 !important;
}

#combinedHoldingsBody .buy-price {
  color: #7c3aed !important;
}

.sell {
  color: var(--success) !important;
  font-weight: 700;
}

.sell-price {
  color: var(--success) !important;
}

.profit-plus {
  color: #3b82f6 !important;
  font-weight: 700;
}

.profit-minus {
  color: #ef4444 !important;
  font-weight: 700;
}

#combinedHoldingsBody .profit-plus,
#combinedHoldingsBody .profit-minus,
[id^="holdingsBody"] .profit-plus,
[id^="holdingsBody"] .profit-minus,
#historyTableBody .profit-plus,
#historyTableBody .profit-minus {
  font-weight: 400 !important;
}

#combinedHoldingsBody .date-sync-highlight-row > .profit-plus,
#combinedHoldingsBody .date-sync-highlight-row > .profit-minus,
[id^="holdingsBody"] .date-sync-highlight-row > .profit-plus,
[id^="holdingsBody"] .date-sync-highlight-row > .profit-minus,
#historyTableBody .date-sync-highlight-row > .profit-plus,
#historyTableBody .date-sync-highlight-row > .profit-minus {
  font-weight: 800 !important;
}

/* 토스트 알림 */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 99px;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s ease-out, toastOut 0.3s ease-in 2s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-rotate {
  animation: icon-rotate 0.6s ease-out;
  display: inline-block;
}

/* 슬롯 버튼 */
.q-slot-btn,
.q-strat-btn {
  flex: 1;
  height: 30px;
  background: rgba(51, 65, 85, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qSlot1.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border-color: var(--primary);
}

#qSlot2.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-color: var(--success);
}

#qSlot3.active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  border-color: #d97706;
}

#qSlot4.active {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: white;
  border-color: #e11d48;
}

#qSlot5.active {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  border-color: #7c3aed;
}

#qSlot6.active {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: white;
  border-color: #0891b2;
}

.q-strat-btn.active {
  background: linear-gradient(135deg, #a855f7, #9333ea);
  color: white;
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.q-slot-btn:hover,
.q-strat-btn:hover {
  filter: brightness(1.2);
}

/* 스위치 & 유저박스 */
.switch-container {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  border-radius: 10px;
  height: 38px;
  flex-shrink: 0;
}

.user-id-box {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  font-size: 16px;
}

.user-id-box:hover {
  filter: brightness(1.2);
}

/* 차트 */
.chart-container {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}

#periodChartContainer {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 200px;
  padding: 4px 0 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#periodBarChartWrapper {
  flex: 1;
  width: 100%;
  height: 100% !important;
  position: relative;
}

#periodBarChart {
  width: 100% !important;
  height: 100% !important;
}

#perfYearlyChartContainer,
#perfMonthlyChartContainer,
#perfDailyChartContainer {
  padding-bottom: 0 !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#periodChartContainer::-webkit-scrollbar,
#perfYearlyChartContainer::-webkit-scrollbar,
#perfMonthlyChartContainer::-webkit-scrollbar,
#perfDailyChartContainer::-webkit-scrollbar {
  display: none;
  width: 0 !important;
  height: 0 !important;
}

#perfYearlyChartWrapper,
#perfMonthlyChartWrapper,
#perfDailyChartWrapper {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 500px) {
  #periodChartContainer {
    min-height: 180px;
  }
}

/* 탭 컨테이너 */
#settingsTabContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

#settingsTabContainer>button {
  flex: 1 1 30%;
  min-width: 80px;
}

/* 스크롤 영역 */
#dualOrderContainer,
#periodTableContainer {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#dualOrderContainer {
  overflow-x: auto !important;
  touch-action: pan-x pan-y;
}

.data-table th,
.data-table td {
  white-space: nowrap;
}

/* 보유현황 그리드 */
.holdings-grid-row {
  display: grid;
  grid-template-columns: 24px 24px 60px 44px 75px 32px 1fr;
  gap: 4px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  align-items: center;
  font-size: 10.5px;
  white-space: nowrap;
  text-align: center;
}

.holdings-empty {
  color: #64748b;
}

/* 실전 매매내역 */
#historyTable {
  border-collapse: separate !important;
  border-spacing: 1px 1px !important;
}

#historyTable th {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

#historyTable td {
  border: none !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

#historyTable tr td:first-child {
  border-radius: 3px 0 0 3px;
}

#historyTable tr td:last-child {
  border-radius: 0 3px 3px 0;
}

#historyTable th {
  font-size: 11px !important;
}

#historyTableBody td,
.stats-row div {
  font-size: var(--app-font-size, 10.5px) !important;
}

.date-sync-highlight,
.date-sync-highlight-row > td {
  font-weight: 800 !important;
}

/* 통합 보유현황 */
#combinedHoldingsView .data-table {
  border-collapse: separate !important;
  border-spacing: 1px 1px !important;
  width: 100% !important;
}

#combinedHoldingsView .data-table th {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  font-size: 11px !important;
}

#combinedHoldingsView .data-table td {
  border: none !important;
  background: rgba(255, 255, 255, 0.02) !important;
  font-size: var(--app-font-size, 10.5px) !important;
}

#combinedHoldingsView .data-table tr td:first-child {
  border-radius: 3px 0 0 3px;
}

#combinedHoldingsView .data-table tr td:last-child {
  border-radius: 0 3px 3px 0;
}

/* 개별 보유현황 */
[id^="holdingsView"] .data-table td {
  background: rgba(255, 255, 255, 0.02) !important;
  border: none !important;
  font-size: var(--app-font-size, 10.5px) !important;
}

[id^="holdingsView"] .data-table {
  border-collapse: separate !important;
  border-spacing: 1px 1px !important;
  width: 100% !important;
}

[id^="holdingsView"] .data-table th {
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
  font-size: 11px !important;
}

[id^="holdingsView"] .data-table th:last-child,
[id^="holdingsView"] .data-table td:last-child {
  min-width: 64px !important;
  white-space: nowrap !important;
}

/* 실시간 운영현황 & 성과지표 - 데이터 테이블과 동일하게 셀 단위 박스 스타일 */
.stats-row {
  background: transparent !important;
  border: none !important;
}

.stats-row > div {
  background: rgba(255, 255, 255, 0.02) !important;
  border-radius: 0;
  align-self: stretch !important;
  box-sizing: border-box !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

.stats-row > div:first-child {
  border-radius: 3px 0 0 3px;
}

.stats-row > div:last-child {
  border-radius: 0 3px 3px 0;
}

.stats-header-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

#statsTable .stats-profit-value {
  font-size: calc(var(--app-font-size, 10.5px) - 1px) !important;
}

#statsTable .stats-label-note {
  font-size: calc(var(--app-font-size, 10.5px) - 1px) !important;
  line-height: 1;
}

/* 성과 탭 레이아웃 */
.perf-tab-layout .period-toggle {
  cursor: default !important;
}

/* 자산현황 범례 */
.stats-chart-legend {
  position: absolute;
  inset: 6px auto 6px 4px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1px;
  overflow-y: auto;
  overflow-x: hidden;
  height: calc(100% - 12px);
  max-height: calc(100% - 12px);
  padding-right: 2px;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stats-chart-legend::-webkit-scrollbar {
  display: none;
}

.stats-donut-wrap {
  position: absolute;
  left: calc(210px + (100% - 210px) / 2);
  top: 50%;
  width: clamp(170px, min(calc(100% - 222px), calc(100% - 6px)), 320px);
  height: clamp(170px, calc(100% - 6px), 320px);
  max-height: calc(100% - 6px);
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.stats-donut-wrap canvas {
  max-width: 100% !important;
  max-height: 100% !important;
}

.stats-asset-legend-row {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 8px 38px auto;
  align-items: center;
  gap: 1px;
  width: 138px;
  min-width: 138px;
  min-height: 16px;
  padding: 1px 4px;
  border-radius: 3px;
  background: transparent !important;
  border: none !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-asset-legend-row:not(.stats-asset-header) > * {
  background: rgba(255, 255, 255, 0.02) !important;
  align-self: stretch !important;
  border-radius: 0;
  box-sizing: border-box !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

.stats-asset-legend-row:not(.stats-asset-header) > *:first-child {
  border-radius: 3px 0 0 3px;
  padding-left: 4px;
}

.stats-asset-legend-row:not(.stats-asset-header) > *:last-child {
  border-radius: 0 3px 3px 0;
  padding-right: 4px;
}

.stats-asset-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.stats-asset-legend-row[style*="cursor: pointer"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateX(2px);
}

.stats-asset-cash,
.stats-asset-eval,
.stats-asset-principal,
.stats-asset-total {
  position: static;
  width: 153px;
  min-width: 0;
  grid-template-columns: 8px 38px auto;
  gap: 1px;
}

.stats-asset-eval {
  background: transparent !important;
  border: none !important;
}

.stats-asset-cash {
  background: transparent !important;
  border: none !important;
}

.stats-asset-principal {
  background: transparent !important;
  border: none !important;
}

.stats-asset-principal b,
.stats-asset-principal-val {
  color: #c084fc !important;
}

.stats-asset-total {
  background: transparent !important;
  border: none !important;
  gap: 1px !important;
}

.stats-asset-total > * {
  background: rgba(255, 255, 255, 0.02) !important;
  border-radius: 0;
  align-self: stretch !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
}

.stats-asset-total > *:first-child {
  border-radius: 3px 0 0 3px;
}

.stats-asset-total > *:last-child {
  border-radius: 0 3px 3px 0;
}

.stats-asset-plain {
  background: transparent !important;
  border: none !important;
}

.stats-asset-profit {
  background: transparent !important;
  border: none !important;
  width: 153px;
  min-width: 153px;
}

.stats-asset-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.stats-asset-dot-spacer {
  width: 7px;
  height: 7px;
}

.stats-asset-label {
  color: var(--text-muted);
  font-size: var(--app-font-size, 10.5px);
  font-weight: 700;
  white-space: nowrap;
}

.stats-asset-legend-row b {
  color: var(--text);
  font-size: var(--app-font-size, 10.5px);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 통합 자산현황 투자법별 기간 수익률 */
.stats-sub-strat-profit-container {
  display: none !important;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px;
  padding: 6px 8px;
  min-width: 190px;
  max-width: 220px;
  box-sizing: border-box;
  overflow: hidden;
  height: auto;
}

@media (min-width: 720px) {
  .stats-sub-strat-profit-container {
    display: none !important;
  }
}

