/* Головні налаштування */
body {
  font-family: Arial, sans-serif; /* Використовуйте Inter, якщо підключено */
  background-color: #121212;
  color: #e0e0e0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header styles */
header {
    background-color: #1a1a1a;
    padding: 1rem 2rem;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left {
    font-size: 1.5rem;
    font-weight: bold;
    color: #36FF6C; /* Accent color for the terminal name */
}
.header-center {
    display: flex;
    gap: 2rem;
}
.header-center a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}
.header-center a:hover {
    background-color: #2a2a2a;
}
.header-center a.active {
    background-color: #36FF6C;
    color: #1a1a1a;
}

.container {
  max-width: 1200px;
  margin: auto;
  flex-grow: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Блок ціни обраної пари */
.data-box.price-box {
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
  text-align: center;
}
.data-box h2 {
    color: #36FF6C;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}
#current-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #36FF6C;
    cursor: pointer;
    transition: color 0.2s;
}
#current-price:hover {
    color: #28e05c;
}
#current-symbol {
    font-size: 1.2rem;
    color: #aaa;
}

/* Форми купівлі та продажу та список пар */
.main-container {
  display: grid; /* Використовуємо Grid для точного контролю колонок */
  grid-template-columns: 3fr 3fr 2fr; /* Пропорції: 30% для Buy, 30% для Sell, 20% для Symbol List */
  gap: 2rem; /* Відступ між елементами */
  margin-bottom: 20px;
  align-items: stretch; /* Розтягуємо елементи на однакову висоту */
  /* Забезпечуємо стабільність grid-розташування */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Запобігає впливу зовнішніх елементів */
  isolation: isolate;
  /* justify-content: space-between; не потрібно з fr одиницями в grid-template-columns */
}

/* Стилі для окремих форм купівлі/продажу */
.trade-form {
  background: #2a2a2a;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-width: 280px; /* Мінімальна ширина, щоб елементи не стискалися занадто сильно */
  /* height: 100%; */ /* Займає всю доступну висоту */
  display: flex;
  flex-direction: column;
}

/* Явне розміщення форм у сітці */
.trade-form.buy {
  grid-column: 1; /* Перша колонка */
  /* Додаткова ізоляція від positions-tabs-container */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Запобігає стисканню від інших елементів */
  min-width: 280px;
  flex-shrink: 0;
  /* Ізоляція контексту */
  isolation: isolate;
}

.trade-form.sell {
  grid-column: 2; /* Друга колонка */
}

.trade-form label {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: #aaa;
  flex-shrink: 0; /* Запобігає стисканню лейблів */
}

.trade-form input {
  width: calc(100% - 20px);
  padding: 0.75rem 10px;
  margin-top: 5px;
  box-sizing: border-box;
  border: 1px solid #555;
  border-radius: 0.5rem;
  background-color: #1a1a1a;
  color: #e0e0e0;
  font-size: 1rem;
  margin-bottom: 1rem;
  flex-shrink: 0; /* Запобігає стисканню полів вводу */
}

/* Група кнопок BUY/SELL + М */
.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  margin-top: auto; /* Притискаємо кнопки до низу форми */
  flex-shrink: 0; /* Запобігає стисканню кнопок */
}

/* Кнопки BUY/SELL */
.button-group button:first-child {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.trade-form.buy .button-group button:first-child {
    background-color: #36FF6C;
    color: #1a1a1a;
}
.trade-form.buy .button-group button:first-child:hover {
    background-color: #28e05c;
}
.trade-form.sell .button-group button:first-child {
    background-color: #FF363A;
    color: #1a1a1a;
}
.trade-form.sell .button-group button:first-child:hover {
    background-color: #e0282c;
}


/* Кнопка Market ("М") */
.button-group button:last-child {
  width: 60px;
  background-color: #555;
  color: #e0e0e0;
  font-weight: bold;
  border: none;
  padding: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button-group button:last-child:hover {
  background-color: #777;
}

/* Список усіх пар */
.symbol-list {
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  height: 300px; /* Залишаємо фіксовану висоту для прокрутки */
  overflow-y: auto;
  min-width: 200px; /* Мінімальна ширина */
  grid-column: 3; /* Третя колонка */
}

.symbol-list input {
  width: calc(100% - 20px);
  padding: 0.75rem 10px;
  margin-top: 10px;
  box-sizing: border-box;
  border: 1px solid #555;
  border-radius: 0.5rem;
  background-color: #2a2a2a;
  color: #e0e0e0;
}

.symbol-list table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.symbol-list th,
.symbol-list td {
  padding: 0.75rem;
  border-bottom: 1px solid #333;
  text-align: left;
  cursor: pointer;
}

.symbol-list td:hover {
  background-color: #2a2a2a;
}
.symbol-list th {
    background-color: #2a2a2a;
    color: #36FF6C;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Заголовок позицій */
.positions-header {
  display: flex;
  background: #232323;
  border-radius: 0.5rem 0.5rem 0 0;
  font-weight: bold;
  font-size: 1rem;
  min-width: 100%;
  padding: 0.5rem 0;
}
.positions-header span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  min-height: 32px;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.ph-count {
  min-width: 32px;
  max-width: 40px;
  width: 40px;
}
.ph-cycle {
  min-width: 48px;
  max-width: 60px;
  width: 60px;
}
.ph-date {
  min-width: 90px;
  max-width: 100px;
  width: 100px;
}
.ph-entry {
  min-width: 70px;
  max-width: 90px;
  width: 90px;
}
.ph-symbol {
  min-width: 90px;
  max-width: 110px;
  width: 110px;
}
.ph-volume, .ph-profit {
  min-width: 118px;
  max-width: 118px;
  width: 118px;
}
.ph-earn {
  min-width: 118px;
  max-width: 118px;
  width: 118px;
}
.ph-targets {
  flex: 1 1 56px;
  min-width: 56px;
  justify-content: center;
  align-items: center;
}

.ph-icons {
  min-width: 80px;
  max-width: 100px;
  width: 100px;
}



/* Позиції - ізольований блок */
.positions-box {
    width: 100%;
    background-color: #1a1a1a;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    grid-column: 1 / -1; /* Розтягуємо на всі 3 колонки Grid */
    /* Ізоляція від інших блоків */
    max-width: 100%;
    box-sizing: border-box;
    /* Ізоляція контексту */
    isolation: isolate;
    /* Запобігає переповненню */
    overflow: visible;
    /* Фіксована ширина для стабільності */
    min-width: 0;
    flex-shrink: 0;
    /* Запобігає впливу на розміри інших елементів */
    contain: layout style paint;
}
.positions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.position-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 1rem 0;
  border-bottom: 1px solid #333;
  font-size: 0.9rem;
  background-color: #2a2a2a;
  border-radius: 0.5rem;
}
.position-item > div {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  min-height: 32px;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}
.position-item .ph-count {
  min-width: 32px;
  max-width: 40px;
  width: 40px;
}
.position-item .ph-cycle {
  min-width: 48px;
  max-width: 60px;
  width: 60px;
}
.position-item .ph-date {
  min-width: 90px;
  max-width: 100px;
  width: 100px;
}
.position-item .ph-entry {
  min-width: 70px;
  max-width: 90px;
  width: 90px;
}
.position-item .ph-symbol {
  min-width: 90px;
  max-width: 110px;
  width: 110px;
}
.position-item .ph-volume, .position-item .ph-profit {
  min-width: 118px;
  max-width: 118px;
  width: 118px;
}
.position-item .ph-earn {
  min-width: 118px;
  max-width: 118px;
  width: 118px;
}
.position-item .ph-targets {
  flex: 1 1 56px;
  min-width: 56px;
  justify-content: center;
  align-items: center;
}

.position-item .ph-icons {
  min-width: 80px;
  max-width: 100px;
  width: 100px;
}



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

.position-item div {
  padding: 0 0.25rem;
  text-align: center;
}

.position-item .position-icon {
  min-width: 30px;
  text-align: center;
}

.position-item .order-type {
  font-weight: bold;
}

.position-item .date {
  font-weight: normal;
}

.position-item .price,
.position-item .pair,
.position-item .volume,
.position-item .profit,
.position-item .percent {
  font-weight: normal;
}

.position-item .volume {
  cursor: pointer;
}

.position-item .currency-buttons {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
}

.position-item .tools {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

/* Кнопки валют */
.currency-button {
  background-color: #333;
  color: #aaa;
  border: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.currency-button.active {
  background-color: #36FF6C;
  color: #1a1a1a;
}

.currency-button:hover {
  background-color: #2a2a2a;
}

/* Іконки у позиціях */
.position-icon img,
.position-tools img {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

/* Стилі для text-icon з нотаткою */
.text-icon-with-note {
  filter: hue-rotate(200deg) saturate(1.5) brightness(1.2) !important;
}

/* Стилі для іконки свічок */
.position-tools img[src*="Candels_regular.svg"] {
  filter: brightness(1.1) saturate(1.2);
  transition: filter 0.3s ease;
}

.position-tools img[src*="Candels_regular.svg"]:hover {
  filter: brightness(1.3) saturate(1.4);
}

/* Модальне вікно для Trailing Stop */
.trailing-stop-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.trailing-stop-modal-content {
  background-color: #1a1a1a;
  margin: 5% auto;
  padding: 0;
  border: 1px solid #36FF6C;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 4px 20px rgba(54, 255, 108, 0.3);
}

.trailing-stop-modal-header {
  padding: 20px 20px 15px 20px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trailing-stop-modal-title {
  color: #fff;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  flex-grow: 1;
}

.trailing-stop-modal-close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  margin-left: 10px;
}

.trailing-stop-modal-close:hover {
  color: #36FF6C;
}

/* Інформація про цикл позиції */
.position-cycle-info {
  margin: 0 20px 15px 20px;
  padding: 12px 15px;
  background-color: #2a2a2a;
  border-radius: 6px;
  border-left: 4px solid #36FF6C;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cycle-label {
  color: #aaa;
  font-size: 14px;
  font-weight: 500;
}

.cycle-value {
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: #333;
}

.cycle-value.buy {
  color: #4CAF50;
  background-color: rgba(76, 175, 80, 0.1);
  border: 1px solid #4CAF50;
}

.cycle-value.sell {
  color: #f44336;
  background-color: rgba(244, 67, 54, 0.1);
  border: 1px solid #f44336;
}

/* Контейнер для кнопок інтервалів */
.interval-buttons-container {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.interval-btn {
  background-color: transparent;
  color: #36FF6C;
  border: 1px solid #36FF6C;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 50px;
  text-align: center;
}

.interval-btn:hover {
  background-color: rgba(54, 255, 108, 0.1);
}

.interval-btn.active {
  background-color: #36FF6C;
  color: #1a1a1a;
}

/* Контейнер для вводу прибутку */
.profit-input-container {
  padding: 0 20px 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.profit-label {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.profit-input {
  background-color: #2a2a2a;
  border: 1px solid #36FF6C;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  width: 80px;
  text-align: center;
}

.profit-input:focus {
  outline: none;
  border-color: #36FF6C;
  box-shadow: 0 0 5px rgba(54, 255, 108, 0.3);
}

.profit-input::placeholder {
  color: #666;
}

/* Блок для відображення поточного S/L */
.current-sl-container {
    padding: 0 20px 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.current-sl-label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
.current-sl-value {
    color: #36FF6C;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Блок для відображення статусу моніторингу */
.monitoring-status-container {
    padding: 0 20px 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.monitoring-status-label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
.monitoring-status-value {
    color: #FFA500;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.current-interval-container {
    padding: 0 20px 15px 20px;
}

.current-interval-label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.current-interval-value {
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* Блок для відображення останньої свічки */
.last-candle-container {
    padding: 0 20px 15px 20px;
}
.last-candle-label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}
.last-candle-value {
    background-color: #444;
    padding: 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #ccc;
    border-left: 4px solid #888;
}

/* Блок для відображення виконання S/L */
.execution-status-container {
    padding: 0 20px 15px 20px;
}
.execution-status-label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}
.execution-status-value {
    background-color: #444;
    padding: 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #ccc;
    border-left: 4px solid #888;
}

/* Стилі для різних станів виконання */
.execution-status-value.execution-waiting {
    border-left-color: #888;
}
.execution-status-value.execution-ready {
    border-left-color: #FFA500;
    background-color: #2a2a1a;
}
.execution-status-value.execution-executed {
    border-left-color: #FF4444;
    background-color: #2a1a1a;
}

/* Стилі для різних кольорів свічок */
.last-candle-value.candle-green {
    border-left-color: #00FF00;
}
.last-candle-value.candle-red {
    border-left-color: #FF4444;
}
.last-candle-value.candle-neutral {
    border-left-color: #888888;
}

.last-candle-value.candle-no-data {
    border-left-color: #666666;
    background-color: #2a2a2a;
}

.last-candle-value.candle-error {
    border-left-color: #FF4444;
    background-color: #2a1a1a;
}

.execution-error {
    border-left-color: #FF4444;
    background-color: #2a1a1a;
}

/* Опис */
.trailing-stop-description {
  padding: 0 20px 20px 20px;
  color: #aaa;
  font-size: 12px;
  line-height: 1.4;
  text-align: justify;
}

/* Кнопки модального вікна */
.trailing-stop-modal-buttons {
  padding: 15px 20px 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #333;
}

.trailing-stop-btn {
  background-color: transparent;
  border: 1px solid #36FF6C;
  color: #36FF6C;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 80px;
}

.trailing-stop-btn:hover {
  background-color: rgba(54, 255, 108, 0.1);
}

.trailing-stop-btn-ok {
  background-color: #36FF6C;
  color: #1a1a1a;
}

.trailing-stop-btn-ok:hover {
  background-color: #2dd85a;
  border-color: #2dd85a;
}

/* Модальне вікно для нотаток */
.note-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.note-modal-content {
  background-color: #1a1a1a;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  position: relative;
}

.note-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
}

.note-modal-title {
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

.note-modal-close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
}

.note-modal-close:hover {
  color: #fff;
}

.note-textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border: 1px solid #333;
  border-radius: 4px;
  background-color: #2a2a2a;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.note-textarea:focus {
  outline: none;
  border-color: #36FF6C;
}

.note-char-count {
  text-align: right;
  color: #aaa;
  font-size: 12px;
  margin-top: 5px;
}

.note-char-count.limit-reached {
  color: #FF363A;
}

.note-modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.note-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.note-btn-save {
  background-color: #36FF6C;
  color: #1a1a1a;
}

.note-btn-save:hover {
  background-color: #2dd85a;
}

.note-btn-cancel {
  background-color: #333;
  color: #fff;
}

.note-btn-cancel:hover {
  background-color: #444;
}

.position-icon img:hover,
.position-tools img:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Цільова ціна та S/L/T/P */
.target-input {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
/* Для input зміни ціни у першій позиції (NEW/PARTIALLY_FILLED) */
.target-input input[type='number'][id^='target-price-input-'] {
  width: 80px;
}
/* Для S/L та T/P у другій позиції залишаємо 40px */
.target-input input {
  width: 40px;
  flex-grow: 0;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #555;
  background-color: #1a1a1a;
  color: #e0e0e0;
}
.target-input button {
  padding: 0.5rem 1rem;
  background-color: #36FF6C;
  color: #1a1a1a;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

/* Для кнопки Change Price у першій позиції (NEW/PARTIALLY_FILLED) */
.target-input button[id^='change-price-btn-'] {
  width: 73px;
  min-width: 0;
  max-width: 100px;
}

/* Styles for the modal */
.sl-tp-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    display: flex; /* Use flexbox for centering */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}

.modal-content {
    background-color: #1a1a1a;
    margin: auto;
    padding: 20px;
    border: 1px solid #333;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    color: #eee;
    font-family: 'Inter', sans-serif;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5em;
}

.modal-symbol-header {
    background-color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.modal-symbol-header #modal-symbol-base {
    color: #fff;
}

.modal-symbol-header #modal-symbol-quote {
    background-color: #555;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

.modal-body {
    font-size: 0.9em;
}

.modal-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.modal-item {
    flex: 1;
    padding: 5px;
}

.input-row .modal-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-row input[type="number"] {
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 8px;
    color: #eee;
    width: 80px; /* Adjust width as needed */
    text-align: right;
}

.modal-body input[type='number'] {
  width: 40px;
  min-width: 0;
}

.input-row .currency-label {
    color: #aaa;
    font-size: 0.8em;
}

.pnl-row .pnl-item {
    font-weight: bold;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #333;
    padding-top: 15px;
    margin-top: 20px;
}

.modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#modal-cancel-button {
    background-color: #555;
    color: #fff;
}

#modal-cancel-button:hover {
    background-color: #777;
}

#modal-ok-button {
    background-color: #36FF6C;
    color: #1a1a1a;
}

#modal-ok-button:hover {
    background-color: #28e05c;
}

.api-add-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid #0070ff;
  border-radius: 12px;
  padding: 32px 24px;
  margin: 32px 0 24px 0;
  background: #181818;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.api-add-title {
  font-size: 2rem;
  color: #fff;
  font-weight: 600;
}
.api-add-btn {
  font-size: 1.2rem;
  padding: 12px 32px;
  border: 2px solid #0070ff;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.api-add-btn:hover {
  background: #0070ff;
  color: #fff;
}

.api-connected-block {
  display: flex;
  align-items: flex-start;
  border: 2px solid #0070ff;
  border-radius: 12px;
  padding: 32px 24px;
  background: #181818;
  max-width: 600px;
  margin: 0 auto 32px auto;
  position: relative;
}
.api-status-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 32px;
}
.api-status-active {
  color: #36FF6C;
  font-size: 1rem;
  margin-bottom: 8px;
  align-self: flex-start;
}
.api-avatar {
  width: 80px;
  height: 80px;
  border: 2px solid #0070ff;
  border-radius: 50%;
  background: #111;
  margin-bottom: 8px;
}
.api-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
.api-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.api-info-label {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  min-width: 120px;
}
.api-info-value {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 400;
}
.api-balance {
  color: #36FF6C;
  font-weight: 600;
}
.api-trash-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s;
}
.api-trash-btn:hover {
  opacity: 1;
  background: #222;
  border-radius: 50%;
}
.api-trash-btn img {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

/* --- SPA header avatar & popup --- */
.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #36FF6C 40%, #0070ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: 2px solid #222;
}
.profile-popup {
  position: absolute;
  top: 60px;
  right: 24px;
  background: #181818;
  border: 2px solid #0070ff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  min-width: 180px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  padding: 12px 0;
}
.profile-popup .popup-item {
  color: #fff;
  padding: 12px 24px;
  text-decoration: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
  display: block;
}
.profile-popup .popup-item:hover {
  background: #222;
  color: #36FF6C;
}

/* --- Profile page modern styles --- */
.profile-main-container {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  margin: 48px auto;
  max-width: 600px;
  background: #181818;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 40px 32px;
}
.profile-avatar-big {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #36FF6C 40%, #0070ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  margin-right: 24px;
}
.profile-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 18px;
}
.profile-row label {
  min-width: 90px;
  color: #36FF6C;
  font-weight: 600;
  font-size: 1.1rem;
}
.profile-row input[type="text"] {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid #0070ff;
  border-radius: 8px;
  background: #222;
  color: #fff;
  font-size: 1.1rem;
  outline: none;
  transition: border 0.2s;
}
.profile-row input[type="text"]:focus {
  border-color: #36FF6C;
}
.profile-save-btn {
  margin-top: 12px;
  padding: 12px 36px;
  background: #36FF6C;
  color: #181818;
  border: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.18s;
  align-self: flex-start;
}
.profile-save-btn:hover {
  background: #28e05c;
}
.profile-date-row {
  color: #aaa;
  font-size: 1rem;
  margin-top: 18px;
  gap: 8px;
}

/* Стилі для іконки Alert */
.alert-icon {
  transition: all 0.3s ease;
  cursor: pointer;
}

.alert-icon.active {
  filter: brightness(1.2) saturate(1.5) !important;
}

.alert-icon.inactive {
  filter: grayscale(0.8) !important;
}

.alert-icon:hover {
  transform: scale(1.1);
}

/* Стилі для спрощеного підключення Telegram */
.telegram-simple-connect {
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 20px;
  margin-top: 10px;
}

.telegram-instructions h4 {
  color: #36FF6C;
  margin: 0 0 15px 0;
  font-size: 1.1rem;
}

.telegram-instructions p {
  margin: 0 0 15px 0;
  color: #e0e0e0;
}

.telegram-instructions ol {
  margin: 0 0 15px 0;
  padding-left: 20px;
  color: #e0e0e0;
}

.telegram-instructions li {
  margin-bottom: 8px;
  line-height: 1.4;
}

.telegram-link {
  color: #36FF6C;
  text-decoration: none;
  font-weight: bold;
}

.telegram-link:hover {
  text-decoration: underline;
}

.telegram-note {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 12px;
  margin-top: 15px;
  color: #aaa;
  font-size: 0.9rem;
}

.tg-refresh-btn {
  background: #36FF6C;
  color: #1a1a1a;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 15px;
  transition: background-color 0.2s;
}

.tg-refresh-btn:hover {
  background: #28e05c;
}

.tg-status-ok {
  color: #36FF6C;
  font-weight: bold;
  margin-left: 10px;
}

.tg-status-refresh-btn {
  background: #444;
  color: #e0e0e0;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 10px;
  font-size: 0.8rem;
  transition: background-color 0.2s;
}

.tg-status-refresh-btn:hover {
  background: #555;
}

.tg-generate-btn {
  background: #0070ff;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 15px;
  transition: background-color 0.2s;
}

.tg-generate-btn:hover {
  background: #0056cc;
}

.tg-generate-btn:disabled {
  background: #666;
  cursor: not-allowed;
}

.telegram-link-block {
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 15px;
  margin-top: 15px;
}

.link-info {
  margin-bottom: 10px;
}

.link-info strong {
  color: #36FF6C;
  display: block;
  margin-bottom: 5px;
}

.link-expires {
  color: #ff6b6b;
  font-size: 0.8em;
  margin-top: 5px;
}

/* Стилі для закритих позицій - ізольований блок */
.closed-positions-box {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 1.5rem;
    /* Ізоляція від інших блоків */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Запобігає впливу на grid-розташування */
    grid-column: 1 / -1;
    /* Ізоляція контексту */
    isolation: isolate;
    /* Запобігає переповненню */
    overflow: visible;
    /* Фіксована ширина для стабільності */
    min-width: 0;
    flex-shrink: 0;
    /* Запобігає впливу на розміри інших елементів */
    contain: layout style paint;
}

.closed-positions-box h2 {
    color: #888;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.closed-position {
    opacity: 0.8;
    background-color: #1a1a1a !important;
    border-left: 3px solid #888 !important;
}

.closed-position:hover {
    opacity: 1;
    background-color: #2a2a2a !important;
}

.closed-position .ph-icons {
    color: #888;
    font-size: 0.8em;
}

.closed-position .position-icon img {
    filter: grayscale(0.5);
}

.closed-position .order-type span {
    opacity: 0.7;
}

/* Стилі для іконок в позиціях */
.ph-icons {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ph-icons img {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.ph-icons img:hover {
    opacity: 0.8;
}

.status-icon {
    width: 24px;
    height: 24px;
}

.telegram-icon {
    width: 20px;
    height: 20px;
}

.close-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Блок для відображення активних Trailing Stop моніторингів - ізольований блок */
.trailing-stop-box {
    margin-top: 20px;
    /* Ізоляція від інших блоків */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Запобігає впливу на grid-розташування */
    grid-column: 1 / -1;
    /* Ізоляція контексту */
    isolation: isolate;
    /* Запобігає переповненню */
    overflow: visible;
    /* Фіксована ширина для стабільності */
    min-width: 0;
    flex-shrink: 0;
    /* Запобігає впливу на розміри інших елементів */
    contain: layout style paint;
}

.trailing-stop-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.clear-trailing-stop-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.clear-trailing-stop-btn:hover {
    background: #cc3333;
}

.trailing-stop-list {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.trailing-stop-header {
    display: grid;
    grid-template-columns: 1fr 0.8fr 0.8fr 1fr 1fr 1fr 1fr 0.8fr;
    gap: 10px;
    padding: 12px 15px;
    background-color: #333;
    font-weight: 600;
    font-size: 12px;
    color: #fff;
    border-bottom: 1px solid #444;
}

.trailing-stop-item {
    display: grid;
    grid-template-columns: 1fr 0.8fr 0.8fr 1fr 1fr 1fr 1fr 0.8fr;
    gap: 10px;
    padding: 10px 15px;
    border-bottom: 1px solid #444;
    font-size: 12px;
    color: #ccc;
    align-items: center;
}

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

.trailing-stop-item:hover {
    background-color: #3a3a3a;
}

.tsh-symbol, .tsh-cycle, .tsh-interval, .tsh-entry, .tsh-target, .tsh-current-sl, .tsh-status, .tsh-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.tsh-cycle.buy {
    color: #00FF00;
}

.tsh-cycle.sell {
    color: #FF4444;
}

.tsh-status.waiting {
    color: #FFA500;
}

.tsh-status.target-reached {
    color: #36FF6C;
}

.tsh-status.sl-set {
    color: #00FFFF;
}

.tsh-status.executed {
    color: #FF4444;
    font-weight: bold;
}

.tsh-actions {
    display: flex;
    gap: 5px;
}

.tsh-actions button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    background-color: #555;
    color: #fff;
}

.tsh-actions button:hover {
    background-color: #666;
}

.tsh-actions button.stop {
    background-color: #FF4444;
}

.tsh-actions button.stop:hover {
    background-color: #CC3333;
}

/* Стилі для сповіщень */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #2a2a2a;
    color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease-out;
}

.notification-content {
    flex: 1;
}

.notification-message {
    font-weight: 500;
    margin-bottom: 5px;
}

.notification-time {
    font-size: 12px;
    color: #ccc;
}

.notification-close {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: white;
}

.notification-success {
    background-color: #2a5a2a;
    border-left: 4px solid #36FF6C;
}

.notification-error {
    background-color: #5a2a2a;
    border-left: 4px solid #FF4444;
}

.notification-info {
    background-color: #2a2a5a;
    border-left: 4px solid #00FFFF;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Стилі для вкладок позицій - ізольований блок */
.positions-tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a1a;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Ізоляція від інших блоків */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  /* Запобігає впливу на grid-розташування */
  grid-column: 1 / -1;
  /* Ізоляція контексту */
  isolation: isolate;
  /* Запобігає переповненню */
  overflow: visible;
  /* Фіксована ширина для стабільності */
  min-width: 0;
  flex-shrink: 0;
}

/* Контейнер для контролів справа */
.tab-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Контейнер для checkbox Hide Other Pairs */
.hide-pairs-checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Стилі для checkbox Hide Other Pairs */
.hide-pairs-checkbox {
  accent-color: #36FF6C;
  width: 18px;
  height: 18px;
  cursor: pointer;
  border-radius: 3px;
}

/* Стилі для label Hide Other Pairs */
.hide-pairs-label {
  color: #e0e0e0;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.hide-pairs-label:hover {
  color: #36FF6C;
}

.positions-tabs {
  display: flex;
  gap: 0.5rem;
  /* Запобігає переповненню та впливу на інші елементи */
  flex-wrap: nowrap;
  overflow: hidden;
  /* Ізоляція від батьківського контейнера */
  isolation: isolate;
}

.tab-btn {
  background: #2a2a2a;
  color: #e0e0e0;
  border: 1px solid #333;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 80px;
  text-align: center;
  /* Запобігає впливу на ширину інших елементів */
  flex-shrink: 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Ізоляція контексту */
  isolation: isolate;
}

.tab-btn:hover {
  background: #3a3a3a;
  border-color: #555;
}

.tab-btn.active {
  background: #36FF6C;
  color: #1a1a1a;
  border-color: #36FF6C;
  font-weight: 600;
}

.merge-btn {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 80px;
  /* Запобігає впливу на ширину інших елементів */
  flex-shrink: 0;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* Ізоляція контексту */
  isolation: isolate;
}

.merge-btn:hover {
  background: #e55a2b;
  transform: translateY(-1px);
}

.merge-btn:active {
  transform: translateY(0);
}

/* Додаткові стилі для повної ізоляції блоків */
/* Запобігає впливу positions-tabs-container на trade-form */
.container > .positions-tabs-container {
  /* Повна ізоляція від grid-елементів */
  position: relative;
  z-index: 1;
  /* Запобігає впливу на розміри інших елементів */
  contain: layout style paint;
}

/* Забезпечує стабільність trade-form.buy */
.container .main-container .trade-form.buy {
  /* Повна ізоляція від зовнішніх елементів */
  position: relative;
  z-index: 2;
  /* Запобігає впливу на розміри */
  contain: layout style paint;
  /* Гарантує стабільну ширину */
  width: 100%;
  max-width: 100%;
  min-width: 280px;
}

/* Запобігає переповненню контейнера */
.container {
  /* Забезпечує правильне розташування елементів */
  contain: layout style;
  /* Запобігає впливу дочірніх елементів на батьківський */
  overflow: visible;
}

/* Додаткові стилі для ізоляції всіх блоків даних від trade-form */
/* Запобігає впливу closed-positions-box на trade-form */
.container > .data-box.closed-positions-box {
  /* Повна ізоляція від grid-елементів */
  position: relative;
  z-index: 1;
  /* Запобігає впливу на розміри інших елементів */
  contain: layout style paint;
}

/* Запобігає впливу trailing-stop-box на trade-form */
.container > .data-box.trailing-stop-box {
  /* Повна ізоляція від grid-елементів */
  position: relative;
  z-index: 1;
  /* Запобігає впливу на розміри інших елементів */
  contain: layout style paint;
}

/* Запобігає впливу positions-box на trade-form */
.container > .data-box.positions-box {
  /* Повна ізоляція від grid-елементів */
  position: relative;
  z-index: 1;
  /* Запобігає впливу на розміри інших елементів */
  contain: layout style paint;
}

/* Додаткова захист для trade-form.buy від всіх зовнішніх блоків */
.container .main-container .trade-form.buy {
  /* Повна ізоляція від зовнішніх елементів */
  position: relative;
  z-index: 3;
  /* Запобігає впливу на розміри */
  contain: layout style paint;
  /* Гарантує стабільну ширину */
  width: 100%;
  max-width: 100%;
  min-width: 280px;
  /* Додаткова ізоляція */
  isolation: isolate;
  /* Запобігає стисканню */
  flex-shrink: 0;
}

/* ===== СТИЛІ ДЛЯ ФУНКЦІОНАЛЬНОСТІ MERGE ===== */

/* Контейнер для кнопок контролю Merge */
.merge-controls {
  display: none;
  gap: 10px;
  margin-left: 10px;
  align-items: center;
}

/* Кнопки контролю Merge */
.merge-btn-ok,
.merge-btn-separate,
.merge-btn-cancel {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

/* Кнопка OK */
.merge-btn-ok {
  background: #36FF6C;
  color: #1a1a1a;
}

.merge-btn-ok:hover {
  background: #28e05c;
  transform: translateY(-1px);
}

/* Кнопка Separate */
.merge-btn-separate {
  background: #FFA500;
  color: #1a1a1a;
}

.merge-btn-separate:hover {
  background: #e69500;
  transform: translateY(-1px);
}

/* Кнопка Cancel */
.merge-btn-cancel {
  background: #FF363A;
  color: #ffffff;
}

.merge-btn-cancel:hover {
  background: #e02e32;
  transform: translateY(-1px);
}

/* Чекбокси для вибору позицій */
.merge-checkbox {
  margin-right: 8px;
  cursor: pointer;
  transform: scale(1.2);
  accent-color: #36FF6C;
}

.merge-checkbox:checked {
  background-color: #36FF6C;
  border-color: #36FF6C;
}

/* Стилі для позицій в режимі об'єднання */
.position-item.merge-mode {
  border: 2px solid #36FF6C;
  background-color: rgba(54, 255, 108, 0.1);
}

/* Стилі для вибраних позицій */
.position-item.selected-for-merge {
  border: 2px solid #FFA500;
  background-color: rgba(255, 165, 0, 0.1);
}

/* ===== СТИЛІ ДЛЯ ДЕТАЛЕЙ ОБ'ЄДНАНОЇ ПОЗИЦІЇ ===== */

/* ===== СТИЛІ ДЛЯ ДЕТАЛЕЙ ОБ'ЄДНАНОЇ ПОЗИЦІЇ ===== */

.merged-position-details {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 5px;
  margin-top: 5px;
  padding: 15px;
  animation: slideDown 0.3s ease-out;
  border-left: 3px solid #36FF6C;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.original-position-item {
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 5px;
  margin: 8px 0;
  padding: 12px;
  transition: all 0.2s ease;
}

.original-position-item:hover {
  background: #333;
  border-color: #555;
  transform: translateX(5px);
}

.original-position-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.original-position-icon {
  width: 25px;
  height: 25px;
  background: #444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.original-position-info {
  flex: 1;
  min-width: 0;
}

.original-position-symbol {
  font-weight: bold;
  color: #36FF6C;
  font-size: 0.9rem;
}

.original-position-side {
  color: #FFA500;
  font-size: 0.8rem;
}

.original-position-date,
.original-position-entry,
.original-position-volume,
.original-position-profit,
.original-position-percent {
  min-width: 70px;
  text-align: center;
  font-size: 0.8rem;
}

/* Стилі для об'єднаної позиції */
.merged-position {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 2px solid #36FF6C;
  box-shadow: 0 0 10px rgba(54, 255, 108, 0.3);
}

.merged-position .ph-cycle span {
  font-weight: bold;
  text-shadow: 0 0 5px rgba(54, 255, 108, 0.5);
}

/* Приховування полів для оригінальних позицій в об'єднаних позиціях */
.original-position-item .ph-earn,
.original-position-item .ph-icons,
.original-position-item .ph-targets {
  display: none !important;
}

/* Приховування відповідних заголовків у заголовку таблиці для оригінальних позицій */
.merged-position-details .positions-header .ph-earn,
.merged-position-details .positions-header .ph-icons,
.merged-position-details .positions-header .ph-targets {
  display: none !important;
}

