:root {
  --bg: #000000;
  --panel: rgba(16, 16, 20, 0.58);
  --panel-2: rgba(24, 24, 29, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3f5f8;
  --muted: #b8bec8;
  --accent: #ff1a1a;
  --good: #2fe36d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(255, 42, 42, 0.14), transparent 60%),
    radial-gradient(1000px 420px at 100% 0%, rgba(132, 45, 199, 0.14), transparent 58%),
    #050507;
}

.top-ticker {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: hidden;
  background: #070707;
  border-bottom: 1px solid #2a2a2a;
  height: 38px;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  padding-left: 18px;
}

.ticker-item {
  color: #ffd0d0;
  font-size: 13px;
}

.ticker-up {
  color: #2fe36d;
}

.ticker-down {
  color: #ff6a6a;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(12px);
}

.brand h1 {
  margin: 0;
  font-size: 18px;
}

.brand p {
  margin-top: 8px;
  color: #b8bfcc;
  font-size: 13px;
}

nav {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.nav-item {
  text-align: left;
  color: #f1f4fa;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
}

.nav-item.active {
  border-color: #ff2020;
  box-shadow: inset 0 0 0 1px #ff2020;
}

.sources {
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.main {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
}

.printh-header {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(20, 20, 23, 0.75), rgba(14, 14, 18, 0.5));
}

.ph-date {
  background: rgba(20, 20, 22, 0.8);
  padding: 16px;
  font-size: 34px;
  font-weight: 700;
  color: #ffffff;
}

.ph-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 22px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ph-hero h1 {
  margin: 0;
  font-size: 42px;
  color: #ff1010;
}

.ph-hero p {
  margin: 8px 0 0;
  color: #f6a0a0;
  font-size: 18px;
}

.ph-cta {
  background: linear-gradient(180deg, rgba(23, 17, 17, 0.8), rgba(16, 12, 12, 0.8));
  border: 1px solid rgba(255, 90, 90, 0.28);
  color: #ff8f8f;
  padding: 16px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ph-cta:hover {
  color: #ff3e3e;
  border-color: #6a2a2a;
}

.ph-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 14px 16px;
  background: rgba(17, 17, 20, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 700;
}

.ph-breaking {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(19, 19, 22, 0.65);
  color: #ffffff;
}

.ph-breaking strong {
  background: #c91010;
  color: #fff;
  padding: 8px 10px;
}

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

.panel-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

h2 {
  margin: 0 0 14px;
  font-size: 26px;
  color: #ff3d3d;
}

.add-wallet h2 {
  font-size: 24px;
  margin: 0;
}

.safety-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #28589a;
  background: #0f2346;
  color: #b9d6ff;
  font-size: 12px;
}

.wallet-form {
  display: grid;
  grid-template-columns: 200px 180px 1fr 120px;
  gap: 10px;
}

select,
input,
button {
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: #f4f7ff;
  padding: 0 12px;
  font-size: 14px;
}

button {
  cursor: pointer;
  background: linear-gradient(180deg, #ff3030, #c70d0d);
  border: none;
  font-weight: 600;
}

.tip {
  color: var(--muted);
  font-size: 13px;
  margin: 10px 2px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
}

.stat-card h3 {
  margin: 8px 0;
  font-size: 34px;
  color: #fff;
}

.positive {
  color: var(--good);
  font-size: 13px;
}

.wallet-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.wallet-card {
  background: linear-gradient(150deg, rgba(26, 26, 30, 0.78), rgba(16, 16, 19, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
}

.wallet-card h4 {
  margin: 0 0 10px;
}

.wallet-card p {
  margin: 5px 0;
  color: #e2e8f5;
}

.warning {
  margin-top: 8px;
  color: #fbbf24;
  font-size: 12px;
}

.table-wrap {
  overflow: auto;
  border-radius: 12px;
}

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

th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

th {
  color: #ff8080;
  font-weight: 600;
}

td a {
  color: #ff6e6e;
  text-decoration: none;
}

td a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #2c0808;
  border: 1px solid #8d2020;
  border-radius: 9px;
  padding: 10px 14px;
}

.hidden {
  display: none;
}

.btn-secondary {
  background: rgba(37, 17, 17, 0.8);
  border: 1px solid rgba(255, 111, 111, 0.38);
  color: #ffd6d6;
  height: 36px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 7, 17, 0.72);
  z-index: 20;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(560px, 100%);
  background: #0d0d0d;
  border: 1px solid #3b1b1b;
  border-radius: 14px;
  padding: 18px;
}

.modal-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.modal-card ul {
  margin: 0;
  padding-left: 20px;
  color: #f2f5fb;
  line-height: 1.5;
}

.modal-card button {
  margin-top: 14px;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

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

.stat-chart {
  margin-top: 10px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-size: 100% 100%;
}

.stat-chart-a {
  background: linear-gradient(180deg, rgba(255, 43, 43, 0.18), rgba(255, 43, 43, 0.04));
}

.stat-chart-b {
  background: linear-gradient(180deg, rgba(140, 96, 255, 0.2), rgba(140, 96, 255, 0.04));
}

.stat-chart-c {
  background: linear-gradient(180deg, rgba(252, 125, 61, 0.2), rgba(252, 125, 61, 0.05));
}

.stat-chart-d {
  background: linear-gradient(180deg, rgba(255, 56, 94, 0.2), rgba(255, 56, 94, 0.04));
}

.move-chip {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(70, 195, 111, 0.35);
  color: #69e698;
  background: rgba(30, 72, 46, 0.28);
}

.move-chip-red {
  border-color: rgba(255, 82, 82, 0.45);
  color: #ff8a8a;
  background: rgba(90, 25, 25, 0.3);
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-card h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.mini-item-title {
  color: #f8fbff;
  font-size: 14px;
  line-height: 1.35;
}

.mini-item-sub {
  margin-top: 6px;
  color: #95a5ba;
  font-size: 12px;
}

.mini-item a {
  color: #ff7272;
  text-decoration: none;
}

.mini-item a:hover {
  text-decoration: underline;
}

.text-list {
  margin: 0;
  padding-left: 18px;
  color: #f3f6fd;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .wallet-form {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ph-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .ph-hero h1 {
    font-size: 38px;
  }

  .ph-cta {
    width: 100%;
  }
  .panel-head-right {
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-bottom {
    grid-template-columns: 1fr;
  }
}
