@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap");

@media (max-width: 576px) {
  .vh-100 {
    height: auto !important;
  }

  .modal-title {
    font-size: 16px !important;
  }

  .modal-menu, .modal-menu label, .modal-menu input {
    font-size: 13px !important;
  }

  .modal-menu label {
    margin-right: 8px !important;
  }

  .eod-order-padding-left-0 {
    padding-left: 15px;
  }  
}

@media (min-width: 576px) {

  .eod-order-padding-left-0 {
    padding-left: 0px !important;
  }  
}

/* sidebar 265px + 메인 화면 1013px*/
@media (max-width: 1278px) {
  .page-inner, .page-inner-table {
    display: block !important;
    /* You can also override other flex properties if needed */
  }
}

@media (min-width: 1278px) {
  .page-inner, .page-inner-table {
    display: flex !important;
    justify-content: center !important;
  }
}

.page-inner, .page-chart-inner {
  min-height: 100vh; 
}

.overflow-x-auto {
  overflow-x:auto !important;
}


.login-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
}

.login-card .form-control {
    border-radius: 5px;
}

.login-card .btn-primary {
    border-radius: 5px;
}

.login-logo {
    text-align: center;
}

.login-logo img {
    width: 50px;
}

.login-logo h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: bold;
    font-style: italic;
}

.sidebar .nav>.nav-item a p {
    margin-left: 5px;
    font-size: 1.05rem !important;
    font-weight: 400;
}

/*
// sticky table header
.table-responsive-sm {
    max-height: 500px !important;
    overflow-y: auto !important;
}

.table-sm thead th {
    position: sticky !important;
    top: 0;
    z-index: 1;
}
*/

.card-badge {
  position: relative;
}

.card-badge .card-badge-1 {
  position: absolute;
  bottom: 19px; /* 원하는 위치에 맞게 조정 */
  left: 0px; 
}

.card-badge .card-badge-2 {
  position: absolute;
  bottom: 20px; /* 원하는 위치에 맞게 조정 */
  left: 85px; 
}

#heatmap, #eodContainer .table-sm thead th {
    font-family: 'Inter', sans-serif, 'Noto Sans KR', sans-serif !important;
    font-weight: normal !important;
    font-size: 0.80rem;
    white-space: nowrap !important;
    /* overflow: hidden !important; */
    text-overflow: ellipsis !important;
}

#heatmap, #eodContainer .table-sm tbody td {
    font-family: 'Inter', sans-serif, 'Noto Sans KR', sans-serif !important;
    font-size: 0.86rem;
    white-space: nowrap !important;
    /* overflow: hidden !important; */
    text-overflow: ellipsis !important;
}

#heatmap, #eodContainer .table-sm>:not(caption)>*>* {
    padding: .22rem .25rem !important;
}

.heatmap-th-fixed-width {
    min-width: 38px !important;
    max-width: 38px !important;
}


.eod-th-fixed-width {
    min-width: 82px !important;
    max-width: 82px !important;
}
.eod-th-wide-fixed-width {
    min-width: 180px !important;
    max-width: 180px !important;
}
.eod-th-btn-fixed-width {
    min-width: 42px !important;
    max-width: 42px !important;
}


.bg-low { background-color: #FA3626 !important; }
.bg-mid { background-color: #fff3cd !important; }
.bg-high { background-color: #5ABF6C !important; }
.bg-normal { background-color: #f8f9fa !important; }

.bg-reviewed { background-color: #FFC90E !important; }
.bg-owned { background-color: #FFC90E !important; }


/* loading */
.hidden { display: none !important; }

.lds-default,
.lds-default div {
  box-sizing: border-box;
}
.lds-default {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}
.lds-default div {
  position: absolute;
  width: 6.4px;
  height: 6.4px;
  background: currentColor;
  border-radius: 50%;
  animation: lds-default 1.2s linear infinite;
}
.lds-default div:nth-child(1) {
  animation-delay: 0s;
  top: 36.8px;
  left: 66.24px;
}
.lds-default div:nth-child(2) {
  animation-delay: -0.1s;
  top: 22.08px;
  left: 62.29579px;
}
.lds-default div:nth-child(3) {
  animation-delay: -0.2s;
  top: 11.30421px;
  left: 51.52px;
}
.lds-default div:nth-child(4) {
  animation-delay: -0.3s;
  top: 7.36px;
  left: 36.8px;
}
.lds-default div:nth-child(5) {
  animation-delay: -0.4s;
  top: 11.30421px;
  left: 22.08px;
}
.lds-default div:nth-child(6) {
  animation-delay: -0.5s;
  top: 22.08px;
  left: 11.30421px;
}
.lds-default div:nth-child(7) {
  animation-delay: -0.6s;
  top: 36.8px;
  left: 7.36px;
}
.lds-default div:nth-child(8) {
  animation-delay: -0.7s;
  top: 51.52px;
  left: 11.30421px;
}
.lds-default div:nth-child(9) {
  animation-delay: -0.8s;
  top: 62.29579px;
  left: 22.08px;
}
.lds-default div:nth-child(10) {
  animation-delay: -0.9s;
  top: 66.24px;
  left: 36.8px;
}
.lds-default div:nth-child(11) {
  animation-delay: -1s;
  top: 62.29579px;
  left: 51.52px;
}
.lds-default div:nth-child(12) {
  animation-delay: -1.1s;
  top: 51.52px;
  left: 62.29579px;
}
@keyframes lds-default {
  0%, 20%, 80%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
}

.page-font-sm {
  font-size: 12px !important;
}

#modalEntryCriteriaCondition2Amount, #modalExitCriteriaCondition2Amount {
  padding-top: 5.25px !important;
  padding-bottom: 5.25px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

/* ✅ 모달 폭: 화면의 절반 */
/* 팝업 폭을 화면의 절반을 넘지 않되 최대 600px로 제한 */
#bookmarkModal { --bs-modal-width: min(50vw, 600px); }
@media (max-width: 576px) {
  #bookmarkModal { --bs-modal-width: 90vw; } /* 모바일 보호 */
}

/* ✅ 테이블을 고정 레이아웃으로 */
#bookmarkTable {
  table-layout: fixed !important;
  width: 100%;
}

/* thead/tbody 공통 타이포 (기존 유지) */
#bookmarkModal .table-sm thead th {
  font-family: 'Inter', 'Noto Sans KR', sans-serif !important;
  font-weight: normal !important;
  font-size: 0.80rem;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}
#bookmarkModal .table-sm tbody td {
  font-family: 'Inter', 'Noto Sans KR', sans-serif !important;
  font-size: 0.86rem;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}
#bookmarkModal .table-sm>:not(caption)>*>* {
  padding: .22rem .25rem !important;
}

/* ✅ 1열(북마크) 100px 강제: 인라인/JS가 덮어써도 이김 */
#bookmarkTable thead th:nth-child(1),
#bookmarkTable tbody td:nth-child(1) {
  width: 100px !important;
  max-width: 100px !important;
  min-width: 100px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

/* ✅ 헤더 flex가 셀 폭보다 커지지 않도록 */
#bookmarkTable th[data-sort="bookmark"] .d-flex {
  min-width: 0;
  gap: 0 !important;
}

/* ✅ 50px 유지 위해 텍스트 숨김(체크박스만 표시) */
#bookmarkTable th[data-sort="bookmark"] .bookmark-label {
  display: none;
}

/* ✅ 종목명: 남은 폭을 자동으로, 말줄임 처리 */
#bookmarkTable th[data-col="name"],
#bookmarkTable td[data-col="name"] {
  /* colgroup 2번째 <col>이 남은폭을 먹음 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#bookmarkTable td[data-col="name"] > .nm {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  text-align: left;
}

/* 헤더 내 마스터 체크박스 정렬 */
#bookmarkTable th[data-sort="bookmark"] .form-check-input {
  transform: scale(1.0);
  margin: 0;
}
