* { box-sizing: border-box; }

:root {
  --bg: #05070d;
  --panel: rgba(10, 14, 24, 0.88);
  --border: rgba(255, 255, 255, 0.095);
  --border-gold: rgba(240, 185, 11, 0.34);
  --text: #f8fafc;
  --muted: #98a2b3;
  --gold: #f0b90b;
  --gold-light: #ffe680;
  --green: #20e080;
  --red: #ff4d5e;
  --input: rgba(5, 7, 13, 0.88);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(240, 185, 11, 0.24), transparent 26%),
    radial-gradient(circle at 86% 16%, rgba(240, 185, 11, 0.14), transparent 28%),
    radial-gradient(circle at 70% 86%, rgba(255, 230, 128, 0.1), transparent 34%),
    linear-gradient(135deg, #05070d 0%, #090c14 45%, #03050a 100%);
  color: var(--text);
  padding: 24px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.12));
}

.hidden { display: none !important; }

.app {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topbar, .panel, .controls, .site-footer {
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255,255,255,0.055);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(240, 185, 11, 0.08), rgba(5, 7, 13, 0.72));
  animation: pageDropIn .55s cubic-bezier(.2,.8,.2,1) both;
}

.brand, .topbar-right, .exchange-logos, .footer-brand, .footer-exchanges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #05070d;
  font-weight: 1000;
  letter-spacing: -0.08em;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 34px rgba(240, 185, 11, 0.36);
  animation: logoPulse 3.2s ease-in-out infinite;
}

.brand-name {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.brand-subtitle, .table-hint, .note, .summary-small, .feature-text, .footer-text {
  color: var(--muted);
  font-size: 13px;
}

.install-btn { display: none; }

.exchange-logos {
  padding: 7px;
  border-radius: 18px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}

.exchange-logo-card, .footer-logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
  animation: softFloat 4.5s ease-in-out infinite;
}

.exchange-logo-img, .footer-logo-img {
  display: block;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

.bybit-logo-img { height: 25px; }
.htx-logo-img { height: 30px; }

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  background: linear-gradient(180deg, rgba(17,21,31,.92), rgba(5,7,13,.82));
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.title-card {
  padding: 34px;
  min-height: 285px;
  animation: fadeUp .7s cubic-bezier(.2,.8,.2,1) both;
}

.hero-visual {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 210px;
  height: 170px;
  pointer-events: none;
  opacity: .86;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(240,185,11,.18);
  transform: rotate(-18deg);
}

.orbit-one {
  width: 170px;
  height: 88px;
  right: 8px;
  bottom: 38px;
  animation: orbitDrift 7s ease-in-out infinite;
}

.orbit-two {
  width: 128px;
  height: 64px;
  right: 32px;
  bottom: 50px;
  animation: orbitDriftReverse 6s ease-in-out infinite;
}

.coin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-weight: 1000;
  color: #05070d;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 15px 38px rgba(240,185,11,.22);
}

.coin-one { right: 24px; bottom: 88px; animation: coinFloat 4s ease-in-out infinite; }
.coin-two { right: 128px; bottom: 34px; opacity: .72; animation: coinFloat 4.8s ease-in-out .4s infinite; }

.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--gold-light);
  border: 1px solid rgba(240,185,11,.28);
  background: rgba(240,185,11,.08);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: livePulse 1.7s ease-in-out infinite;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: .95;
  letter-spacing: -.075em;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #ffe680 40%, #f0b90b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 720px;
}

.summary-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
  animation: fadeUp .7s cubic-bezier(.2,.8,.2,1) .08s both;
}

.summary-item, .feature-card, .setting-card, .history-item {
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.015)), rgba(5,7,13,.58);
  border: 1px solid var(--border);
  transition: transform .18s ease, border-color .18s ease;
}

.summary-item:hover, .feature-card:hover, .setting-card:hover, .history-item:hover {
  transform: translateY(-3px);
  border-color: rgba(240,185,11,.24);
}

.summary-item {
  position: relative;
  padding: 17px;
  min-height: 96px;
  overflow: hidden;
}

.summary-item.main {
  grid-column: span 2;
  border-color: var(--border-gold);
}

.summary-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 9px;
  font-weight: 750;
}

.summary-value {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.goal-progress {
  position: relative;
  height: 16px;
  padding: 3px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.085);
}

.goal-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, #f0b90b 0%, #ffd84d 45%, #ffe680 72%, #f0b90b 100%);
  background-size: 160% 100%;
  box-shadow: 0 0 18px rgba(240,185,11,.34);
  transition: width .85s cubic-bezier(.2,.9,.2,1);
  animation: goalGradient 5.5s ease-in-out infinite;
}

.goal-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, transparent 34%, rgba(255,255,255,.42) 48%, transparent 62%, transparent 100%);
  transform: translateX(-120%);
  animation: goalShine 3.4s ease-in-out infinite;
}

.feature-strip, .settings-panel {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.settings-panel { grid-template-columns: 1fr 1fr 1fr; }

.feature-card, .setting-card {
  padding: 18px;
  animation: fadeUp .65s cubic-bezier(.2,.8,.2,1) both;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 112px;
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #05070d;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 12px 28px rgba(240,185,11,.16);
  font-weight: 1000;
  flex: 0 0 auto;
}

.feature-title, .setting-title, .table-title, .footer-title, .history-date {
  color: #f8fafc;
  font-weight: 950;
}

.feature-title { font-size: 15px; margin-bottom: 6px; }
.setting-title { margin-bottom: 12px; font-size: 14px; }
.table-title { font-size: 18px; letter-spacing: -.03em; }

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.switch-label { margin: 0; }

.switch {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
  flex: 0 0 auto;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  transition: .2s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}

.switch input:checked + .slider { background: var(--gold); }
.switch input:checked + .slider::before { transform: translateX(24px); background: #05070d; }

input, select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 15px;
  background: var(--input);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: .18s ease;
}

select option { background: #090c14; color: var(--text); }
input:focus, select:focus {
  border-color: rgba(240,185,11,.75);
  box-shadow: 0 0 0 4px rgba(240,185,11,.12);
  transform: translateY(-1px);
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(5,7,13,.38);
  animation: fadeUp .65s cubic-bezier(.2,.8,.2,1) .18s both;
}

button {
  border: none;
  border-radius: 16px;
  padding: 13px 16px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  transition: .18s ease;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

button:hover { transform: translateY(-1px); filter: brightness(1.06); }
button:active { transform: translateY(1px) scale(.985); }

.btn-primary { color: #05070d; background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.btn-secondary { background: rgba(240,185,11,.12); border: 1px solid rgba(240,185,11,.24); color: var(--gold-light); }
.btn-danger { background: rgba(255,77,94,.14); color: #fecdd3; border: 1px solid rgba(255,77,94,.3); }
.btn-green { background: rgba(32,224,128,.13); color: #bbf7d0; border: 1px solid rgba(32,224,128,.28); }

.button-ripple {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.42);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: ripple .55s ease-out forwards;
}

.table-card {
  padding: 18px;
  margin-bottom: 18px;
  animation: fadeUp .65s cubic-bezier(.2,.8,.2,1) both;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 4px 2px 0;
}

.edit-mode-info { display: none; margin-top: 6px; }

.table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(5,7,13,.48);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

thead { background: linear-gradient(135deg, rgba(240,185,11,.16), rgba(240,185,11,.06)); }

th, td {
  padding: 13px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.075);
}

tbody tr {
  transition: .15s ease;
  animation: rowIn .34s cubic-bezier(.2,.8,.2,1) both;
}

tbody tr:hover { background: rgba(255,255,255,.035); }
tbody tr.row-error { background: rgba(255,77,94,.045); }
tbody tr.row-great { background: rgba(240,185,11,.045); }

th {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

td:first-child, th:first-child {
  width: 64px;
  text-align: center;
  color: var(--muted);
}

.money, .percent {
  font-weight: 950;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.great { color: var(--gold-light); }
.profit { color: var(--green); }
.loss { color: var(--red); }
.zero { color: var(--gold); }
.error { color: #fecdd3; }

.delete-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 13px;
  background: rgba(255,77,94,.12);
  color: #fecdd3;
  border: 1px solid rgba(255,77,94,.25);
  font-size: 20px;
  line-height: 1;
}

.note { margin: 14px 2px 0; line-height: 1.55; }
.empty { display: none; padding: 24px; text-align: center; color: var(--muted); }

.history-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.history-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.history-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #05070d;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  flex: 0 0 auto;
}

.history-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.history-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.06);
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.history-profit {
  min-width: 92px;
  text-align: right;
  font-size: 16px;
}

.history-btn {
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 12px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(5,7,13,.48);
}

.small-logo { width: 34px; height: 34px; border-radius: 11px; font-size: 13px; }
.footer-exchanges { justify-content: flex-end; flex-wrap: wrap; }
.footer-logo-card { min-width: 104px; height: 40px; }
.footer-logo-img { max-width: 88px; max-height: 23px; }

.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  gap: 11px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(5,7,13,.92);
  border: 1px solid rgba(240,185,11,.18);
  box-shadow: 0 18px 55px rgba(0,0,0,.36);
  animation: toastSlideIn .28s cubic-bezier(.2,.8,.2,1) both;
}

.toast-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #05070d;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  font-weight: 1000;
  flex: 0 0 auto;
}

.toast.success .toast-icon { background: var(--green); }
.toast.error .toast-icon { background: var(--red); color: #fff; }

.toast-title {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 950;
  margin-bottom: 3px;
}

.toast-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.custom-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.custom-modal.show { display: flex; }

.custom-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(10px);
}

.custom-modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 22px;
  border-radius: 26px;
  background: rgba(5,7,13,.96);
  border: 1px solid rgba(240,185,11,.22);
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
  animation: modalSpring .28s cubic-bezier(.2,.9,.2,1.15) both;
}

.custom-modal-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 16px;
  color: #05070d;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  font-size: 22px;
  font-weight: 1000;
}

.custom-modal-title {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 950;
  margin-bottom: 8px;
}

.custom-modal-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.custom-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}


/* Auth / account layer */
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: min(560px, 100%);
  padding: 34px;
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(240, 185, 11, 0.095), rgba(255,255,255,0.02)),
    rgba(5, 7, 13, 0.82);
  border: 1px solid rgba(240,185,11,.22);
  box-shadow: 0 30px 110px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
  animation: fadeUp .65s cubic-bezier(.2,.8,.2,1) both;
}

.auth-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 20px;
  color: #05070d;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 42px rgba(240,185,11,.34);
  font-weight: 1000;
  letter-spacing: -.08em;
}

.auth-subtitle {
  margin-bottom: 22px;
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.auth-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.app-locked {
  display: none;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}

.user-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #05070d;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: -.06em;
}

.user-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
}

.user-email {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 850;
}

.logout-btn {
  padding: 11px 14px;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}

.sync-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(32,224,128,.8);
}

@media (max-width: 980px) and (min-width: 721px) {
  .hero, .settings-panel, .feature-strip { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .auth-screen { padding: 14px; }
  .auth-card { padding: 22px; border-radius: 26px; }
  .auth-actions button { flex: 1; }
  .user-box { width: 100%; }

  body { padding: 14px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-right, .exchange-logos { width: 100%; justify-content: space-between; }
  .exchange-logo-card { flex: 1; min-width: 0; }
  .hero, .settings-panel, .feature-strip { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-item.main { grid-column: span 1; }
  .title-card, .table-card { padding: 14px; }
  .hero-visual { opacity: .35; right: -20px; }
  h1 { font-size: 42px; }
  .table-header { align-items: flex-start; flex-direction: column; }
  .table-hint { text-align: left; }
  .site-footer, .history-item { align-items: flex-start; flex-direction: column; }
  .history-actions { width: 100%; justify-content: space-between; }
  .history-profit { text-align: left; }

  .table-wrap { overflow: visible; border: none; background: transparent; }
  table, thead, tbody, th, td, tr { display: block; }
  table { min-width: 0; width: 100%; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; }

  tbody tr {
    padding: 14px;
    border-radius: 22px;
    background: rgba(5,7,13,.72);
    border: 1px solid rgba(255,255,255,.09);
  }

  tbody tr td {
    width: 100% !important;
    display: grid;
    grid-template-columns: minmax(110px, 42%) 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,.075);
    text-align: left !important;
    color: var(--text);
  }

  tbody tr td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  tbody tr td:nth-child(1)::before { content: "Ордер"; }
  tbody tr td:nth-child(2)::before { content: "Отдал"; }
  tbody tr td:nth-child(3)::before { content: "Получил"; }
  tbody tr td:nth-child(4)::before { content: "Комиссия"; }
  tbody tr td:nth-child(5)::before { content: "Прибыль"; }
  tbody tr td:nth-child(6)::before { content: "Процент"; }
  tbody tr td:nth-child(7)::before { content: "Оценка"; }

  tbody tr td:nth-child(8) {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-bottom: none;
  }

  tbody tr td:nth-child(8)::before { content: none; }

  .order-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    justify-self: end;
    border-radius: 12px;
    color: #05070d;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    font-weight: 1000;
  }

  .money, .percent, .status {
    justify-self: end;
    text-align: right;
  }

  tbody tr td input {
    justify-self: end;
    text-align: right;
  }

  .delete-btn { width: 44px; height: 44px; }
}

@keyframes pageDropIn { from { opacity: 0; transform: translateY(-14px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes logoPulse { 0%,100% { box-shadow: 0 0 34px rgba(240,185,11,.32); } 50% { box-shadow: 0 0 48px rgba(240,185,11,.48); } }
@keyframes livePulse { 0%,100% { transform: scale(1); opacity: .82; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes softFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes orbitDrift { 0%,100% { transform: rotate(-18deg) translateX(0); } 50% { transform: rotate(-10deg) translateX(-8px); } }
@keyframes orbitDriftReverse { 0%,100% { transform: rotate(-18deg) translateX(0); } 50% { transform: rotate(-26deg) translateX(8px); } }
@keyframes coinFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-9px) rotate(6deg); } }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(18); opacity: 0; } }
@keyframes modalSpring { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastSlideIn { from { opacity: 0; transform: translateX(16px) translateY(10px) scale(.98); } to { opacity: 1; transform: translateX(0) translateY(0) scale(1); } }
@keyframes goalGradient { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes goalShine { 0% { transform: translateX(-140%); opacity: 0; } 18% { opacity: .65; } 42% { transform: translateX(140%); opacity: 0; } 100% { transform: translateX(140%); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}


/* Performance / sync optimizations */
.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 15px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(32,224,128,.65);
}

.sync-status.saving .sync-dot {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(240,185,11,.75);
  animation: livePulse 1.2s ease-in-out infinite;
}

.sync-status.error .sync-dot {
  background: var(--red);
  box-shadow: 0 0 12px rgba(255,77,94,.7);
}

@media (max-width: 720px) {
  body::after { display: none; }
  .hero-visual { display: none; }
  .orbit, .coin { animation: none !important; }
  .exchange-logo-card,
  .footer-logo-card,
  .logo {
    animation: none !important;
  }
  .sync-status {
    width: 100%;
    justify-content: center;
  }
  .topbar,
  .panel,
  .controls,
  .site-footer {
    backdrop-filter: blur(8px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .feature-card,
  .summary-item,
  .setting-card,
  .history-item {
    transform: translateZ(0);
  }
}



/* Mobile layout hotfix */
html {
  width: 100%;
  min-height: 100%;
  background: #05070d;
  overflow-x: hidden;
}

body {
  width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: #05070d;
}

.app {
  overflow-x: hidden;
}

@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    background-color: #05070d;
  }

  body {
    padding: 14px 10px 28px;
  }

  .app {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .topbar {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    overflow: hidden;
  }

  .brand {
    width: 100%;
    min-width: 0;
  }

  .brand > div:last-child {
    min-width: 0;
  }

  .brand-name,
  .brand-subtitle {
    white-space: normal;
  }

  .topbar-right {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-content: stretch;
    align-items: stretch;
    overflow: hidden;
  }

  .exchange-logos {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 7px;
    overflow: hidden;
  }

  .exchange-logo-card {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
  }

  .bybit-logo-img {
    height: 22px;
    max-width: 92px;
  }

  .htx-logo-img {
    height: 25px;
    max-width: 82px;
  }

  .user-box {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .user-box > div:last-child {
    min-width: 0;
  }

  .user-email {
    max-width: none;
    width: 100%;
  }

  .sync-status {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  .logout-btn,
  .install-btn {
    width: 100%;
    justify-content: center;
  }

  .hero,
  .summary-grid,
  .feature-strip,
  .settings-panel,
  .controls,
  .table-card,
  .site-footer {
    width: 100%;
    max-width: 100%;
  }

  .controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .controls button {
    width: 100%;
  }

  .panel,
  .feature-card,
  .setting-card,
  .table-card,
  .site-footer,
  .history-item {
    max-width: 100%;
  }

  .title-card {
    min-height: auto;
  }

  .subtitle {
    font-size: 15px;
    line-height: 1.55;
  }

  .table-wrap,
  table,
  tbody,
  tbody tr {
    max-width: 100%;
  }

  tbody tr td {
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
  }

  tbody tr td input {
    width: 100%;
    min-width: 0;
  }

  .money,
  .percent,
  .status {
    min-width: 0;
  }

  .footer-exchanges {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .footer-logo-card {
    width: 100%;
    min-width: 0;
  }

  .toast-container {
    left: 10px;
    right: 10px;
    bottom: 14px;
    width: auto;
  }
}
