body {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

nav {
  position: fixed;
  display: flex;
  top: 0; 
  left: 0;
  width: 100vw; 
  height: 50px; 
  background-color: #00FF00;
  justify-content: flex-start;
  align-items: center;
}

a{
  color: inherit;
  text-decoration: none;
}

label{
  color: lightgray;
}

table{
  width: 90vw;
  border-width: 1px;
  border-color: aquamarine;
  border-style: solid;
  border-collapse: separate;
  border-radius: 10px;
  overflow: hidden;
  border-spacing: 0;
  text-align: center;
  font-size: 0.8rem;
}

thead{
  color: darkgray;
  font-weight: bold;
  background-color: darkslategray;
}

tbody{
  color: lightgray;
}

th, td {
  border: 1px solid #626162;
  line-height: 10px;
}

@media (max-width: 768px) {
  th, td {
    line-height: normal;
  }

  /* Назва активу — менший шрифт у півтора рази (1.4rem / 1.5) */
  .asset-title {
    font-size: 0.93rem;
  }

  /* % росту/падіння, ціна, "треба купити/продати за..." — менший шрифт удвічі (1rem / 2) */
  .asset-last-price,
  .asset-change,
  .asset-action {
    font-size: 0.5rem;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  th.pocket-date, td.pocket-date {
    display: none;
  }
}

tr{
  height: 25px;
}

input[type="text"], input[type="number"]{
  background-color: transparent;
  color: lightgray;
  border: none;
  text-align: center;
  width: 50px;
}

input[type="button"], input[type="number"] {
  border-radius: 10px;
  border: 1px fuchsia solid;
  height: 30px;
  min-width: 25px;
}

#menu {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  width: 40px;
  height: 40px;
  margin-left: 5px;
  border-radius: 20px;
  background-color: fuchsia;
}

#panel-menu {
  position: fixed;
  left: -250px;
  top: 50px;
  border-radius: 0 0 20px 0;
  background-color: fuchsia;
  color: yellow;
  padding: 20px;
  transition-duration: 0.5s;
}

.auth-div {
  display: flex;
  flex-direction: column;
}

.title{
  color: magenta;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  height: 100%;
  flex-grow: 1;
  font-size: 2rem;
}

.container {
  width: 100vw;
  padding: 70px 5% 0 5%;
}

.asset-title{
  display: flex;
  width: 90vw;
  margin-bottom: 5px;
  justify-content: center;
  align-content: center;
  color: lavender;
  font-size: 1.4rem;
}

.threshold-indicator{
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.dropdown {
  height: 30px;
  margin: 10px;
  padding: 0 10px;
  background-color: transparent;
  color: lightgray;
  border-radius: 16px;
  border-color: darkgray;
  border-style: solid;
  border-width: 1px;
  text-align: start;
}

.icon {
  display: block;
  background-image: url("../images/sprite.svg");
  background-repeat: no-repeat;
}

.icon-sandwich {
  background-position: 0 0;
  width: 24px;
  height: 18px;
}

.centered-abs {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

#charts-toolbar {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 16px;
}

#total-range-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

#charts-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.chart-block {
  position: relative;
  background-color: #161a1f;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 14px 12px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Кнопки купівлі/продажу в правому верхньому куті рамки графіка */
.chart-actions {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

/* Ховаємо кнопки лише в мобільній портретній орієнтації */
@media (max-width: 768px) and (orientation: portrait) {
  .chart-actions {
    display: none;
  }
}

.chart-block .asset-title {
  margin-bottom: 8px;
}

.asset-last-price {
  margin-left: 12px;
  font-size: 1rem;
  color: #eaecef;
}

.asset-change {
  margin-left: 12px;
  font-size: 1rem;
}

.asset-action {
  margin-left: 12px;
  font-size: 1rem;
}

.price-chart {
  width: 100%;
  height: 260px;
  display: block;
  touch-action: pan-y;
  border-radius: 8px;
}

.add-pocket-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 30px;
  width: 100%;
  max-width: 360px;
}

.add-pocket-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.add-pocket-row label {
  flex: 0 0 90px;
  text-align: right;
  color: lightgray;
}

.add-pocket-row input[type="text"] {
  flex: 1 1 auto;
  width: auto;
  text-align: left;
  padding: 4px 8px;
  border: 1px solid lightgray;
  border-radius: 5px;
}

.add-pocket-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.moment-btn {
  background-color: transparent;
  border: none;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: #1e2329;
  color: lightgray;
  border-radius: 12px;
  border: 1px solid fuchsia;
  padding: 16px 20px;
  width: min(90vw, 420px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: lavender;
  font-size: 1.4rem;
}

.modal-close {
  background: transparent;
  color: lightgray;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.modal-table {
  width: 100%;
  border: none;
  border-radius: 0;
  font-size: 0.95rem;
}

.modal-table td {
  border: none;
  border-bottom: 1px solid #848e9c;
  text-align: left;
  padding: 8px;
  line-height: normal;
}

.modal-table tr:last-child td {
  border-bottom: none;
}

.modal-table td:last-child {
  text-align: right;
  color: #eaecef;
}