/* ==========================================================================
   Stats Page Standalone Styles (Navid Academy)
   ========================================================================== */

:root {
  --na-purple: #3d3155;
  --na-purple-light: #4c3d69;
  --na-orange: #fd9903;
  --na-orange-light: #fff5e6;
  --na-bullish: #00bb34;
  --na-bearish: #c60000;
  --na-text-dark: #1a202c;
  --na-text-muted: #626679;
  --na-bg-light: #f8f9fa;
  --na-border-subtle: #d5d5d7;
}

body {
  font-family: iransans !important;
}

.dashboard-container {
  display: flex;
  width: 100%;
}

.dash-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  width: 100%;
}

.dash-container > .dash-card {
  flex: 0 0 50% !important;
  max-width: 50% !important;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.dash-card {
  padding: 10px;
  box-sizing: border-box;
  align-self: stretch;
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.dash-card-body {
  background: #ffffff;
  box-shadow: -35px 183px 75px rgba(0, 0, 0, 0.01),
              -20px 103px 63px rgba(0, 0, 0, 0.05),
              -9px 46px 47px rgba(0, 0, 0, 0.09),
              -2px 11px 26px rgba(0, 0, 0, 0.1);
  border-radius: 25px;
  padding: 25px 20px;
  width: 100%;
  box-sizing: border-box;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  height: auto;
}

.dash-card-body.pie-card {
  display: flex;
  flex-direction: column;
}

/* Card Header & Titles */
.line-title {
  margin-bottom: 10px;
  text-align: center;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  color: #3d3155;
}

.line-title span {
  color: #fd9903;
}

/* Top Market Selector */
.top-market {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100% !important;
  flex: 0 0 100% !important;
  text-align: center;
  margin-bottom: 20px;
}

.market-btn {
  color: #fbc412;
  cursor: pointer;
  margin: 0 10px;
  padding: 10px 20px;
  border: 3px solid #fbc412;
  border-radius: 15px;
}

.market-menu,
.market-sub-menu {
  width: max-content;
  position: absolute;
  top: 0;
  right: 50px;
  background: #314e55;
  z-index: 10000;
  border-radius: 15px;
  border: white 3px solid;
}

.market-sub-menu {
  right: 200px;
  z-index: 1000000;
}

.market-item {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  cursor: pointer;
}

.market-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Buttons & Timeframes */
.btns.line {
  margin-bottom: 10px;
}

.stats .btns .buy {
  background: #007621;
}

.stats .btns .sell {
  background: #c60000;
}

.stats .btns .all {
  background: #314e55;
}

.stats {
  margin-top: 20px;
  flex-wrap: wrap;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats .value {
  padding-right: 10px;
  padding-left: 10px;
  border-left: 1px black solid;
}

.stats .titles > div:last-child .value {
  border-left: 0;
}

.stats .all .value {
  font-weight: 500;
  color: #fd9903;
}

.stats .buy .value {
  font-weight: 500;
  color: #00bb34;
}

.stats .sell .value {
  font-weight: 500;
  color: #c60000;
}

.stats .btns {
  display: flex;
  justify-content: space-between;
}

.stats .btns-tf {
  display: flex;
  justify-content: space-between;
}

.stats .btns-tf > div {
  text-wrap: nowrap;
  color: black;
  border: 1px #f3f3f3 solid;
  padding: 10px 10px;
  border-radius: 15px;
  margin: 0 10px;
  text-align: center;
  cursor: pointer;
}

.stats .btns-tf > div:hover,
.stats .btns-tf > div.active {
  background: #f3f3f3;
  color: #fd9903;
}

.stats .btns > div {
  text-wrap: nowrap;
  color: white;
  padding: 10px 30px;
  border-radius: 15px;
  margin: 0 10px;
  opacity: 0.4;
  text-align: center;
  cursor: pointer;
}

.stats .btns > div:hover {
  opacity: 0.9;
}

.stats .btns > div.active {
  opacity: 1;
}

/* Pie Chart Container (Dynamic Flex Growth) */
#pie-chart {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

/* Chart Canvas Wrapper Container (Dynamic Flex Growth) */
.chart-wrapper {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

/* Tables & Filtering */
.filter-container {
  flex-wrap: wrap;
  margin-top: 20px;
  flex: 0 0 100% !important;
  max-width: 100% !important;
  display: flex;
}

.filter-container > div {
  flex: 0 0 25%;
  max-width: 25%;
  padding: 0 10px;
}

.table-container {
  margin-top: 15px;
  overflow-y: auto;
  height: 300px;
  width: 100%;
}

.filter-item {
  background: #ffffff;
  box-shadow: -35px 183px 75px rgba(0, 0, 0, 0.01),
              -20px 103px 63px rgba(0, 0, 0, 0.05),
              -9px 46px 47px rgba(0, 0, 0, 0.09),
              -2px 11px 26px rgba(0, 0, 0, 0.1);
  border-radius: 25px;
  padding: 40px 30px;
}

.filter-title {
  font-weight: 600;
  color: #3d3155;
  width: 100%;
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 2px solid #fbc412;
}

table {
  width: 100%;
  font-weight: 600 !important;
  font-size: 15px !important;
}

table td,
table th {
  text-align: center !important;
  font-size: 13px !important;
}

th {
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid #d5d5d5 !important;
}

td.bold {
  font-weight: 600;
}

td,
th {
  border: 1px solid #c4c4c4;
}

th {
  border-top: 0;
}

th:first-child,
td:first-child {
  border-right: 0;
}

th:last-child,
td:last-child {
  border-left: 0;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td span.green {
  padding-left: 2px;
  color: green;
}

td span.red {
  padding-left: 2px;
  color: red;
}

td {
  padding: 10px 7px;
  direction: ltr;
}

/* ApexCharts Overrides */
.apexcharts-legend {
  direction: ltr;
}

.apexcharts-legend-marker {
  margin-left: 3px;
}

/* Select2 Overrides */
.select2.select2-container .select2-selection {
  border: 1px solid #f9f6f6;
  border-radius: 12px;
  background: #f9f6f6;
  height: 40px;
  margin-bottom: 15px;
  outline: none !important;
  transition: all 0.15s ease-in-out;
}

.select2.select2-container .select2-selection .select2-selection__rendered {
  color: #333;
  line-height: 40px;
  padding-right: 33px;
}

.select2.select2-container .select2-selection .select2-selection__arrow {
  background: #f9f6f6;
  border-radius: 0 12px 12px 0;
  height: 40px;
  width: 33px;
}

/* Responsive Media Queries */
@media screen and (max-width: 1300px) {
  .dash-container > div {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .filter-container > div {
    margin-bottom: 20px;
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

@media screen and (max-width: 1000px) {
  .dash-card {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
  .filter-container > div {
    margin-bottom: 20px;
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

@media screen and (max-width: 600px) {
  .sidebar {
    display: none;
  }

  .dash-container > div {
    flex: 0 0 100% !important;
  }

  .dash-card {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .filter-container > div {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .input-group input,
  .input-group select {
    width: 100%;
  }

  .input-group > div {
    margin: 0 20px;
    width: 450px;
    flex-direction: column;
  }

  .radio-group {
    flex-direction: column;
    text-align: right;
  }

  .radio-group > div {
    width: 100%;
  }

  .input-group {
    text-align: right;
  }
}
