:root {
  --bg: #f8f8f9;
  --surface: #ffffff;
  --surface-alt: #f4f7fb;
  --border: #e5e7eb;
  --muted: #6b7280;
  --text: #1f2937;
  --text-soft: #4b5563;
  --primary: #1976d2;
  --primary-dark: #115293;
  --primary-soft: #e8f1fd;
  --success: #6fe6bb;
  --success-strong: #2a8f6a;
  --danger: #f7b3b3;
  --danger-strong: #c24d4d;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-width: 72px;
  --footer-height: 94px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  display: block;
}

body.modal-open {
  overflow: hidden;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  background: #fbfbfc;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  width: 42px;
  height: 42px;
  position: relative;
  border: 4px solid #000;
  border-left-width: 8px;
  border-radius: 4px;
}

.logo::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 4px solid #000;
  border-radius: 50%;
  right: -6px;
  top: 2px;
  background: #fff;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.nav-link {
  width: 58px;
  min-height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  transition: 0.2s ease;
}

.nav-link:hover {
  background: #f0f4fb;
}

.nav-link.active {
  background: #e8eefb;
}

.nav-link-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
}

.user-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(25, 118, 210, 0.25);
  cursor: pointer;
}

.main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 22px;
}

.topbar.compact {
  visibility: hidden;
}

.notification-button {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
}

.notification-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: white;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.content {
  flex: 1;
  padding: 0 28px 0 28px;
}

.page {
  max-width: 1320px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 6px 16px rgba(25, 118, 210, 0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border-color: #b7cff3;
}

.btn-secondary:hover {
  background: #f8fbff;
}

.btn-muted {
  background: #eef2f7;
  color: var(--text-soft);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.asset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px 10px 18px;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04);
}

.asset-card-small {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.asset-image-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, #dce7f2, #f6e8d8);
  height: 350px;
}

.asset-image-wrap.small {
  height: 220px;
}

.asset-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asset-open-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--success);
  color: #0d3c2c;
  font-weight: 700;
  padding: 7px 15px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(111, 230, 187, 0.35);
}

.asset-body {
  padding: 16px 8px 0;
}

.progress-row,
.asset-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-row {
  color: #7c8797;
  font-weight: 500;
  margin-bottom: 10px;
}

.progress-row strong {
  color: #637085;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: #ebedf0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #88f0c8, #6fe6bb);
  border-radius: 999px;
}

.asset-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.asset-title-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-title {
  font-size: 15px;
  font-weight: 700;
}

.asset-value,
.asset-raised {
  font-size: 14px;
  color: #69758b;
  margin-top: 8px;
}

.asset-right {
  text-align: right;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid var(--border);
}

.tab {
  height: 52px;
  font-weight: 600;
  color: var(--text-soft);
  background: white;
  border-bottom: 2px solid transparent;
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.filter-row {
  padding: 18px 18px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.field {
  position: relative;
}

.field-inline-label {
  position: absolute;
  left: 12px;
  top: -8px;
  font-size: 11px;
  color: var(--muted);
  background: white;
  padding: 0 4px;
}

.select,
.input {
  min-width: 138px;
  min-height: 44px;
  border: 1px solid #d7dbe2;
  background: white;
  border-radius: 10px;
  padding: 0 14px;
  color: var(--text);
}

.input,
.select,
.textarea {
  width: 100%;
}

.textarea {
  border: 1px solid #d7dbe2;
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 92px;
  resize: vertical;
}

.listings {
  display: flex;
  flex-direction: column;
}

.listing-row {
  display: grid;
  grid-template-columns: minmax(240px, 2.2fr) repeat(3, minmax(120px, 1fr)) 120px;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.listing-row:last-child {
  border-bottom: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 24px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-right: 12px;
}

.pill-buy {
  background: #dbf7e6;
  color: var(--success-strong);
}

.pill-sell {
  background: #fde6e6;
  color: var(--danger-strong);
}

.listing-main {
  display: flex;
  align-items: center;
}

.listing-title {
  font-weight: 700;
  margin-bottom: 2px;
}

.listing-subtitle,
.inline-note {
  color: var(--muted);
  font-size: 13px;
}

.inline-note {
  color: #f97316;
  margin-left: 8px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.metric-value {
  font-weight: 700;
}

.wallet-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 26px;
}

.wallet-summary .summary-block {
  padding: 16px 22px;
}

.summary-label {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 4px;
}

.summary-value {
  font-size: 18px;
  font-weight: 700;
}

.wallet-table-row {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) minmax(100px, 0.8fr) repeat(3, 86px);
  align-items: center;
  border-top: 1px solid var(--border);
}

.wallet-table-row > div {
  padding: 14px 16px;
}

.link-button {
  color: var(--primary);
  font-weight: 600;
}

.link-button.muted {
  color: #6b7280;
}

.info-banner {
  margin-top: 18px;
  padding: 14px 16px;
  background: #dff0fb;
  color: #16537b;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-card {
  max-width: 520px;
  margin: 0 auto;
}

.settings-item {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr 18px;
  gap: 12px;
  align-items: center;
  padding: 18px 16px;
  border-top: 1px solid var(--border);
  text-align: left;
}

.settings-item:first-child {
  border-top: none;
}

.icon-circle {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer {
  min-height: var(--footer-height);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 20px 10px;
  text-align: center;
  color: #9aa2b1;
  font-size: 12px;
  line-height: 1.45;
}

.footer p {
  margin: 2px 0;
}

.footer strong {
  color: var(--primary);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 1000;
}

.modal {
  width: min(700px, 100%);
  background: white;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.22);
  padding: 26px;
}

.modal.modal-wide {
  width: min(900px, 100%);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-title {
  margin: 0;
  font-size: 22px;
}

.modal-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.close-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #6b7280;
}

.close-button:hover {
  background: #f1f5f9;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.radio-group {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.radio-item,
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
}

.radio-dot,
.check-box {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.radio-dot.active {
  border-color: var(--primary);
}

.radio-dot.active::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.check-box {
  border-radius: 6px;
}

.check-box.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.modal-card {
  background: #f6f7f8;
  border-radius: 14px;
  padding: 18px 16px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  color: var(--text-soft);
}

.summary-line.total {
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  border-top: 1px solid #d5dae2;
  margin-top: 6px;
  padding-top: 10px;
}

.modal-actions {
  display: flex;
  gap: 14px;
  margin-top: 22px;
}

.modal-actions .btn {
  flex: 1;
  height: 48px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 12px;
  z-index: 1200;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  background: #111827;
  color: white;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.toast-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.toast-message {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

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

.empty-state {
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
}

.page-narrow {
  max-width: 760px;
  margin: 0 auto;
}

.desktop-only {
  display: inline-flex;
}

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

.mobile-logo-area {
  display: none;
}

.mobile-hint-text {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.nav-link-external {
  display: none;
}

.mobile-topbar {
  display: none;
}

@media (max-width: 1100px) {
  .asset-grid,
  .asset-card-small,
  .listing-row,
  .wallet-summary,
  .wallet-table-row,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

  .listing-row {
    gap: 12px;
  }

  .wallet-table-row > div {
    border-top: 1px dashed #edf0f4;
  }

  .wallet-table-row > div:first-child {
    border-top: none;
  }
}

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

  .sidebar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    height: 74px;
    z-index: 50;
    border-radius: 20px;
    padding: 10px 14px;
    flex-direction: row;
    justify-content: space-between;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  }

  .logo,
  .user-badge {
    display: none;
  }

  .mobile-settings-btn {
    display: grid;
  }

  .mobile-logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.25s ease;
  }

  .mobile-logo-area.hidden-on-scroll {
    opacity: 0;
    pointer-events: none;
  }

  /* Show the logo mark inside mobile topbar even though .logo is globally hidden on mobile */
  .mobile-logo-area .logo {
    display: block;
  }

  .nav-link-external {
    display: flex;
  }

  .nav-links {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }

  .nav-link {
    width: auto;
    flex: 1;
  }

  .main-shell {
    padding-bottom: 96px;
  }

  .content {
    padding: 0 16px;
  }

  .topbar {
    display: none;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 4px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal,
  .modal.modal-wide {
    width: 100%;
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 20px 20px 32px;
    max-height: 88vh;
    overflow-y: auto;
  }

  .modal-actions {
    flex-direction: column;
  }

  .sidebar-bottom-actions {
    display: none;
  }


  .page-asset-detail {
    overflow-x: hidden;
  }

  .asset-detail-grid,
  .asset-main-column,
  .asset-side-column,
  .asset-gallery-card,
  .asset-invest-card {
    min-width: 0;
    max-width: 100%;
  }
}


.desktop-only { display: block; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.empty-panel { padding: 28px; }

.asset-card {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.asset-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.listing-link {
  color: var(--text);
  padding: 0;
  font-weight: 700;
  text-align: left;
}
.listing-link:hover { color: var(--primary); }

.page-asset-detail {
  padding-bottom: 36px;
}

.asset-detail-top {
  margin-bottom: 12px;
}

.asset-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.asset-detail-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text);
}

.asset-detail-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  flex: 1;
}

.asset-share-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.asset-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: start;
}

.asset-gallery-card,
.asset-invest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
}

.asset-gallery-card {
  padding: 0;
  overflow: hidden;
}

.asset-hero-image-wrap {
  position: relative;
  min-height: 470px;
  background: #e9edf4;
}

.asset-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 470px;
}

.gallery-nav {
  position: absolute;
  top: calc(50% - 22px);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  color: var(--text);
}
.gallery-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.gallery-nav-left { left: 14px; }
.gallery-nav-right { right: 14px; }

.asset-thumbs {
  display: flex;
  gap: 10px;
  padding: 16px 18px 8px;
  flex-wrap: wrap;
}

.asset-thumb {
  width: 78px;
  height: 58px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: transparent;
}
.asset-thumb.active {
  border-color: var(--primary);
}
.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-detail-tabs {
  display: flex;
  gap: 22px;
  padding: 18px 24px 0;
  border-bottom: 1px solid var(--border);
}

.detail-tab {
  position: relative;
  padding: 0 0 14px;
  color: var(--text-soft);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.detail-tab.active {
  color: var(--primary);
}
.detail-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px;
  background: var(--primary);
}
.detail-tab-count {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--text-soft);
  display: grid;
  place-items: center;
  font-size: 12px;
}

.asset-detail-panel {
  padding: 20px 24px 24px;
}

.asset-info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.asset-info-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.asset-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.asset-info-label {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.asset-info-value {
  color: var(--text);
  line-height: 1.55;
}

.asset-bullet-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  display: grid;
  gap: 8px;
  line-height: 1.5;
}

.asset-update-date {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.asset-doc-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.asset-doc-row {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #e6edf7;
}

.asset-doc-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.asset-doc-meta {
  color: var(--muted);
  font-size: 13px;
}

.asset-invest-card {
  padding: 16px;
  position: sticky;
  top: 18px;
}

.countdown-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 18px;
  text-align: center;
  margin-bottom: 14px;
}

.countdown-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.countdown-value {
  font-size: 24px;
  letter-spacing: 1px;
}

.invest-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 10px;
  margin-bottom: 14px;
}

.money-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  background: white;
}

.money-prefix {
  color: var(--text-soft);
  font-weight: 500;
}

.money-input-field {
  border: none;
  outline: none;
  flex: 1;
  background: transparent;
  min-width: 0;
}

.money-max-button {
  height: 44px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--border);
  font-weight: 700;
}

.asset-invest-button {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  background: #3464eb;
  color: white;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(52, 100, 235, 0.24);
  margin-bottom: 14px;
}

.asset-warning-box {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fafafa;
  padding: 14px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.asset-warning-box p { margin: 0; }

.asset-warning-icon {
  color: #7a7f88;
  display: grid;
  place-items: start;
  padding-top: 2px;
}

.asset-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.asset-stat-row-last { border-bottom: none; padding-bottom: 6px; }

.asset-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.asset-stat-value {
  font-weight: 700;
  color: var(--text-soft);
}

.asset-progress-summary {
  padding: 14px 0 8px;
}

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

.asset-progress-pct {
  color: #11a56f;
  font-weight: 700;
}

.asset-progress-total {
  color: var(--text-soft);
  font-size: 14px;
}

.progress-bar.detail {
  height: 6px;
  background: #ebedf0;
}

.progress-bar.detail .progress-fill {
  background: #29c48b;
}

@media (max-width: 1180px) {
  .asset-detail-grid {
    grid-template-columns: 1fr;
  }
  .asset-invest-card {
    position: static;
  }
}

@media (max-width: 920px) {
  .content {
    padding: 0 16px;
  }
  .asset-grid,
  .asset-card-small {
    grid-template-columns: 1fr;
  }
  .asset-hero-image-wrap,
  .asset-hero-image {
    min-height: 320px;
  }
  .asset-info-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 640px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .topbar {
    display: none;
  }
  .mobile-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 8px;
  }
  .asset-detail-title {
    font-size: 24px;
  }
  .asset-detail-tabs {
    gap: 16px;
    overflow-x: auto;
  }
  .asset-thumbs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

.logo-custom {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 6px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.settings-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: default;
  border-top: none !important;
}

.settings-logo-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.logo-upload-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.sidebar-bottom-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.sidebar-home-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 58px;
  padding: 8px 0;
  border-radius: 14px;
  text-decoration: none;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.18s, color 0.18s;
}

.sidebar-home-btn:hover {
  background: #f0f4fb;
  color: var(--primary);
}

.sidebar-home-btn svg {
  opacity: 0.7;
}

.sidebar-home-btn:hover svg {
  opacity: 1;
}

.cta-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 300;
}

.cta-trigger-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(25, 118, 210, 0.40);
  border: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
  position: relative;
}

.cta-trigger-btn:not(.cta-open)::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(25, 118, 210, 0.45);
  animation: cta-pulse 2s ease-out infinite;
}

.cta-trigger-btn:not(.cta-open)::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(25, 118, 210, 0.2);
  animation: cta-pulse 2s ease-out 0.4s infinite;
}

@keyframes cta-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.55); opacity: 0; }
}

.cta-trigger-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.06);
}

.cta-trigger-btn.cta-open {
  background: var(--text-soft);
}

.cta-popover {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 22px 20px;
  width: 240px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  position: relative;
  animation: cta-popover-in 0.18s ease;
}

@keyframes cta-popover-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cta-popover-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.cta-popover-close:hover {
  background: var(--border);
  color: var(--text);
}

.cta-popover-icon {
  width: 42px;
  height: 42px;
  background: var(--primary-soft);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  margin-bottom: 14px;
}

.cta-popover-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.cta-popover-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.cta-popover-link {
  display: block;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 10px;
  text-align: center;
  transition: background 0.15s;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.28);
}

.cta-popover-link:hover {
  background: var(--primary-dark);
}

.logo-hint-tooltip {
  position: fixed;
  top: 20px;
  left: 82px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px 9px 14px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.10);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  z-index: 200;
  pointer-events: auto;
}

.logo-hint-tooltip::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 7px 6px 0;
  border-style: solid;
  border-color: transparent var(--border) transparent transparent;
}

.logo-hint-tooltip::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px 6px 5px 0;
  border-style: solid;
  border-color: transparent var(--surface) transparent transparent;
}

.logo-hint-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.logo-hint-close:hover {
  background: var(--border);
  color: var(--text);
}

.image-upload-area {
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s;
}

.image-upload-area:hover {
  border-color: var(--primary);
}

.image-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  font-size: 13px;
}

.image-upload-preview {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

body.gate-active #app,
body.gate-active #modal-root,
body.gate-active #toast-root {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  padding: 24px;
}

.gate-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 44px 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  text-align: center;
}

@media (max-width: 820px) {
  .logo-hint-tooltip {
    display: none;
  }

  .sidebar-bottom-actions {
    display: none;
  }

  .cta-widget {
    bottom: 104px;
    right: 16px;
  }
}

.gate-logo {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.gate-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.gate-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
  line-height: 1.6;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gate-btn {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
}

.gate-error {
  color: var(--danger-strong);
  font-size: 13px;
  margin: 10px 0 0;
  min-height: 18px;
}

.gate-footnote {
  color: var(--muted);
  font-size: 12px;
  margin: 14px 0 0;
}
