:root {
  --orange-1: #ff8c3a;
  --orange-2: #f25c4a;
  --orange-3: #f9a44c;
  --teal: #3ac5b9;
  --text: #1e2738;
  --muted: #7c879b;
  --line: #e8ecf4;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --shadow: 0 14px 40px rgba(28, 42, 64, 0.08);
  --shadow-soft: 0 10px 30px rgba(28, 42, 64, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 18px;
}

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

button,
.btn {
  border: none;
  cursor: pointer;
  font-weight: 700;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
  background: linear-gradient(120deg, var(--orange-1), var(--orange-2));
  color: #fff;
  box-shadow: 0 10px 26px rgba(242, 92, 74, 0.25);
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: #556070;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--line);
  background: #f5f7fb;
  color: #6b7383;
}

.pill.accent {
  background: rgba(255, 140, 58, 0.12);
  border-color: rgba(255, 140, 58, 0.3);
  color: #de5f29;
}

.ghost-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.review-banner {
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #f4d7a8;
  background: #fff8e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-soft);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 26, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

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

.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.16);
  border: 1px solid var(--line);
}

.modal-box h3 {
  margin: 0 0 8px 0;
}

.modal-box p {
  margin: 0 0 16px 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.muted {
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

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

.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: var(--shadow-soft);
  overflow-y: auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  width: 100%;
  box-shadow: 0 6px 18px rgba(28, 42, 64, 0.05);
  font-weight: 700;
  letter-spacing: 0.8px;
  justify-content: center;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, var(--orange-1), var(--orange-2));
  color: #fff;
  font-weight: 800;
}

.nav-group {
  margin-top: 18px;
}

.nav-group h5 {
  margin: 0 0 10px 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #9ca5b6;
  font-size: 13px;
  font-weight: 800;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 10px;
  color: #6a7486;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nav-item .icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f3f5fa;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.nav-item.active {
  background: linear-gradient(120deg, rgba(255, 140, 58, 0.14), rgba(242, 92, 74, 0.12));
  color: var(--text);
  box-shadow: 0 10px 22px rgba(242, 92, 74, 0.16);
}

.nav-item:hover {
  color: #273245;
  background: #f3f5fa;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.logged-out .nav-list .nav-item:not(.plan-link),
.logged-out .nav-accordion summary {
  pointer-events: none;
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(1);
}

.nav-accordion {
  margin-top: 8px;
}

.nav-accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: 10px;
  color: #6a7486;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nav-accordion summary::-webkit-details-marker {
  display: none;
}

.nav-accordion[open] summary {
  background: #f3f5fa;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.nav-accordion .chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.nav-accordion[open] .chevron {
  transform: rotate(180deg);
}

.nav-accordion ul {
  list-style: none;
  margin: 0;
  padding: 6px 0 10px 8px;
  display: grid;
  gap: 6px;
}

.nav-accordion ul a {
  display: block;
  padding: 10px 12px 10px 40px;
  border-radius: 10px;
  color: #6a7486;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-accordion ul a:hover {
  background: #f3f5fa;
  color: #273245;
}

.nav-accordion ul a.active {
  background: #f3f5fa;
  color: #273245;
  font-weight: 800;
}

.app-main {
  padding: 18px 18px 40px;
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  background: #fff;
  color: #1f2735;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(28, 42, 64, 0.08);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 30px;
}

.topbar-header .topbar-brand {
  display: none;
}

.topbar-header .topbar-brand.desktop {
  display: inline-flex;
}

.topbar-header .topbar-brand.mobile-only {
  display: none;
}

.topbar-brand {
  padding: 8px 10px;
  width: auto;
  box-shadow: none;
  border: 1px solid var(--line);
}

.topbar-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: none;
  position: absolute;
  right: 30px;
}

.topbar-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 140, 58, 0.4);
}

.topbar-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar h1 {
  margin: 0;
  letter-spacing: 1px;
  font-size: 24px;
  font-weight: 800;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search {
  position: relative;
}

.search input {
  padding-left: 36px;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.search input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.search::before {
  content: "⌕";
  position: absolute;
  left: 12px;
  top: 9px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
}

.profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--orange-2);
  font-weight: 800;
}

.profile-menu {
  position: relative;
  display: inline-block;
}

.profile-actions {
  position: absolute;
  right: 0;
  top: 48px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  padding: 8px;
  display: none;
  min-width: 160px;
  z-index: 10;
}

.profile-actions a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.profile-actions a:hover {
  background: #f3f5fa;
}

.profile-menu.open .profile-actions {
  display: block;
}

.wallet-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.wallet-card {
  padding: 16px 18px;
  border-radius: 12px;
  color: #0c1a2b;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  border: 1px solid var(--line);
}

.wallet-card.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.wallet-btc {
  border: 1px solid var(--line);
}

.wallet-settle {
  color: #0a1b33;
}

.wallet-plan {
  color: #1c1640;
}

.wallet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(28, 42, 64, 0.14);
  border-color: rgba(255, 140, 58, 0.3);
}

.wallet-card .value {
  font-size: 20px;
  font-weight: 800;
}

.wallet-card .label {
  color: rgba(12, 26, 43, 0.8);
}

.wallet-card.secondary .label {
  color: var(--muted);
}

.icon-ghost {
  font-size: 42px;
  opacity: 0.28;
}

.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.chart-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chart-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.chart-body {
  padding: 0 14px 12px;
  flex: 1;
}

.tv-chart {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

.price-list table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

.price-list {
  position: sticky;
  top: 80px;
}

.live-prices {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.price-row .pair {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.price-row .pair .icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f5f7fb;
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.pair-name {
  color: #2f3a4f;
  font-weight: 800;
}

.price-row .btc-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f7931a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.pair-symbol {
  font-size: 12px;
}

.price-row .price {
  color: #1a7f37;
}

.price-row .change {
  min-width: 84px;
  text-align: right;
}

.price-row .change.up {
  color: #1a7f37;
}

.price-row .change.down {
  color: #d64545;
}

.price-row.error {
  color: #d64545;
  border-color: #f3c2c2;
  background: #fff5f5;
}

.price-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--muted);
}

.skeleton-grid {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.skeleton-block {
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f2f4f9 0%, #e7ebf3 50%, #f2f4f9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-row {
  display: grid;
  grid-template-columns: 1fr 0.5fr 0.4fr;
  gap: 10px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--orange-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.amount-up {
  color: #1a7f37;
  font-weight: 800;
}

.amount-down {
  color: #d64545;
  font-weight: 800;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--line);
}

.status.complete {
  color: #1a7f37;
  border-color: #bfe4c8;
  background: #effaf2;
}

.status.pending {
  color: #c97312;
  border-color: #f3d9a4;
  background: #fff7e6;
}

.status.cancelled,
.status.failed {
  color: #d64545;
  border-color: #f3c2c2;
  background: #fff5f5;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.history-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(28, 42, 64, 0.12);
  border-color: rgba(255, 140, 58, 0.25);
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.history-amount {
  font-weight: 800;
}

.trade-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: 12px 12px 4px;
}

.trade-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
}

.trade-tab {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f5f7fb;
  font-weight: 800;
  color: #273245;
  cursor: pointer;
}

.trade-tab.active {
  background: #fff;
  box-shadow: 0 8px 20px rgba(28, 42, 64, 0.08);
  border-color: rgba(255, 140, 58, 0.3);
}

.trade-table {
  width: 100%;
  border-collapse: collapse;
}

.trade-table th,
.trade-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.trade-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.trade-row {
  background: #fff;
}

.trade-row:nth-child(even) {
  background: #fafbfe;
}

.trade-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--line);
}

.trade-status.closed {
  color: #c97312;
  background: #fff7e6;
  border-color: #f3d9a4;
}

.trade-status.liquidated {
  color: #d64545;
  background: #fff5f5;
  border-color: #f3c2c2;
}

.pair-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.pair-chip .btc-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f7931a;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}


.price-list th,
.price-list td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.price-list th {
  color: var(--muted);
  font-size: 12px;
}

.price-change.up {
  color: #45b26b;
  font-weight: 700;
}

.price-change.down {
  color: #e85b4f;
  font-weight: 700;
}

.panel-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
}

.page-lede {
  color: var(--muted);
  line-height: 1.6;
}

.faq-accordion {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq-body {
  padding: 0 16px 14px;
  color: var(--muted);
  line-height: 1.65;
}

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

.support-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f5f7fb;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.support-link span {
  color: var(--muted);
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  background: var(--panel);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
  padding: 8px 10px env(safe-area-inset-bottom);
  z-index: 1200;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.mobile-nav a {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
}

.mobile-nav .icon {
  font-size: 18px;
}

.mobile-nav a.active {
  border-color: rgba(255, 140, 58, 0.35);
  background: rgba(255, 140, 58, 0.12);
  color: var(--text);
}

.quick-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  padding: 16px;
}

.quick-modal-overlay.open {
  display: flex;
}

.quick-modal {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.quick-modal__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.quick-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.quick-modal__close {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 140, 58, 0.35);
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 22px rgba(242, 92, 74, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quick-modal__close:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(242, 92, 74, 0.4);
}

.quick-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quick-modal__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.quick-modal__item .icon {
  font-size: 18px;
}

.quick-modal__item small {
  display: block;
  font-weight: 600;
  color: var(--muted);
}

.quick-modal__actions {
  display: grid;
  gap: 10px;
}

.quick-modal__btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-modal__meta {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  display: block;
}

@media (max-width: 900px) {
  .quick-modal-overlay {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .quick-modal {
    width: 100%;
    max-width: none;
    height: 100%;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    padding: 16px;
    gap: 14px;
    overflow-y: auto;
  }

  .quick-modal__head {
    position: sticky;
    top: 0;
    background: var(--panel);
    padding: 6px 0 10px 0;
    z-index: 1;
  }

  .quick-modal__close {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }
}

.inline-inputs {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.input-stack {
  display: grid;
  gap: 10px;
  margin: 14px 0 10px 0;
}

.recent-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.pill-row {
  display: inline-flex;
  gap: 8px;
}

.wallet-address {
  display: grid;
  gap: 10px;
}

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 1160px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }
}

@media (max-width: 960px) {
  .grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .wallet-row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

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

@media (max-width: 900px) {
  body {
    font-size: 16px;
  }

  .sidebar {
    display: none;
  }

  .nav-item,
  .nav-accordion summary {
    padding: 12px 12px;
    font-size: 15px;
  }

  .nav-accordion ul a {
    padding: 10px 12px 10px 32px;
  }

  .brand-mark {
    padding: 8px 10px;
  }

  .app-main {
    padding: 12px 12px 28px;
  }

  .topbar {
    padding: 14px 16px;
    gap: 10px;
  }

  .topbar h1 {
    font-size: 20px;
    letter-spacing: 0.5px;
  }

  .profile {
    padding: 4px 6px;
  }

  .profile-actions {
    right: 4px;
    top: 42px;
  }

  .panel {
    padding: 14px;
  }

  .panel-head,
  .chart-head {
    padding: 12px 14px;
  }

  .wallet-card {
    grid-template-columns: 1fr;
    align-items: flex-start;
    grid-column: span 4;
  }

  .wallet-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
  }

  .chart-body {
    padding: 0 8px 10px;
  }

  .price-row {
    padding: 10px;
  }

  .trade-table th,
  .trade-table td {
    padding: 10px 8px;
    font-size: 14px;
  }

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

  .content-grid {
    grid-template-columns: 1fr;
  }

  .app-main {
    padding-bottom: 110px;
  }

  .mobile-nav {
    display: block;
  }

  .topbar {
    padding: 12px 14px;
  }

  .topbar-details {
    display: none !important;
  }

  .topbar.open .topbar-details {
    display: none !important;
  }

  .topbar-toggle {
    display: grid;
  }

  .topbar-header .topbar-brand {
    display: inline-flex;
  }

  .topbar-header .topbar-brand.desktop {
    display: none;
  }

  .topbar-header .topbar-brand.mobile-only {
    display: inline-flex;
  }
}

@media (min-width: 901px) {
  .mobile-nav {
    display: none !important;
  }

  .topbar-header .topbar-brand {
    display: none !important;
  }

  .topbar-header .topbar-brand.desktop {
    display: inline-flex !important;
  }

  .topbar-header .topbar-brand.mobile-only {
    display: none !important;
  }

  .topbar-toggle {
    display: none !important;
  }

  .topbar-details {
    display: flex !important;
  }
}
